/[PAMELA software]/PamVMC/PamG4RunConfiguration/src/PamG4RunConfiguration.cxx
ViewVC logotype

Annotation of /PamVMC/PamG4RunConfiguration/src/PamG4RunConfiguration.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Wed Feb 18 17:05:15 2009 UTC (15 years, 9 months ago) by nikolas
Branch: MAIN
Changes since 1.1: +48 -11 lines
Migrating to a new version

1 nikolas 1.2 #include <TG4ComposedPhysicsList.h>
2     #include "PamG4RunConfiguration.h"
3     #include <TG4EmPhysicsList.h>
4     #include <TG4HadronPhysicsList.h>
5     #include <TG4OpticalPhysicsList.h>
6     #include <TG4SpecialPhysicsList.h>
7     #include <TG4Globals.h>
8    
9 nikolas 1.1
10 nikolas 1.2 #include "PamG4RangeCutsPhysicsList.h"
11     ClassImp(PamG4RunConfiguration)
12 nikolas 1.1
13    
14 nikolas 1.2 PamG4RunConfiguration::PamG4RunConfiguration(const TString& userGeometry,
15     const TString& physicsList,
16     const TString& specialProcess)
17     : TG4RunConfiguration(userGeometry, physicsList, specialProcess)
18     {
19    
20 nikolas 1.1 }
21    
22    
23 nikolas 1.2 PamG4RunConfiguration::~PamG4RunConfiguration()
24     {
25     /// Destructor
26 nikolas 1.1 }
27    
28    
29 nikolas 1.2 G4VUserPhysicsList* PamG4RunConfiguration::CreatePhysicsList()
30 nikolas 1.1 {
31 nikolas 1.2 // Create default Geant4 VMC physics list
32 nikolas 1.1
33 nikolas 1.2 TG4ComposedPhysicsList* builder = new TG4ComposedPhysicsList();
34    
35     TString token1 = TG4Globals::GetToken(0, fPhysicsListSelection);
36     TString token2 = TG4Globals::GetToken(1, fPhysicsListSelection);
37    
38     if ( token1 == "emStandard" ) {
39     G4cout << "Adding EMPhysicsList" << G4endl;
40     builder->AddPhysicsList(new TG4EmPhysicsList());
41 nikolas 1.1 }
42 nikolas 1.2 else {
43     G4cout << "Adding HadronPhysicsList " << token1.Data() << G4endl;
44     builder->AddPhysicsList(new TG4HadronPhysicsList(token1.Data()));
45     }
46    
47     if ( token2 == "optical" ) {
48     G4cout << "Adding OpticalPhysicsList " << G4endl;
49     builder->AddPhysicsList(new TG4OpticalPhysicsList());
50     }
51    
52     // add option here
53     G4cout << "Adding SpecialPhysicsList " << G4endl;
54     builder->AddPhysicsList(new TG4SpecialPhysicsList(
55     fSpecialProcessSelection.Data()));
56 nikolas 1.1
57 nikolas 1.2 G4cout << "Adding Range Cuts PhysicsList " << G4endl;
58     builder->AddPhysicsList(new PamG4RangeCutsPhysicsList());
59    
60     return builder;
61     }

  ViewVC Help
Powered by ViewVC 1.1.23