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 |
|
|
} |