EDepSimPhysicsListMessenger.cc
Go to the documentation of this file.
1 #include "globals.hh"
2 
4 #include "EDepSimPhysicsList.hh"
5 #include "EDepSimExtraPhysics.hh"
6 
7 #include <G4UIdirectory.hh>
8 #include <G4UIcmdWithAString.hh>
9 #include <G4UIcmdWithoutParameter.hh>
10 #include <G4UIcmdWithADoubleAndUnit.hh>
11 #include <G4UIcmdWithABool.hh>
12 
13 #include "G4ParticleTable.hh"
14 #include "G4ParticleDefinition.hh"
15 
17 : fPhysicsList(pPhys) {
18  fDirectory = new G4UIdirectory("/edep/phys/");
19  fDirectory->SetGuidance("Control the physics lists");
20 
21  fGammaCutCMD = new G4UIcmdWithADoubleAndUnit("/edep/phys/gammaCut",this);
22  fGammaCutCMD->SetGuidance("Set gamma cut");
23  fGammaCutCMD->SetParameterName("Gcut",false);
24  fGammaCutCMD->SetUnitCategory("Length");
25  fGammaCutCMD->SetRange("Gcut>0.0");
26  fGammaCutCMD->SetDefaultUnit("mm");
27  fGammaCutCMD->AvailableForStates(G4State_PreInit,G4State_Idle);
28 
29  fElectCutCMD = new G4UIcmdWithADoubleAndUnit("/edep/phys/electronCut",
30  this);
31  fElectCutCMD->SetGuidance("Set electron cut");
32  fElectCutCMD->SetParameterName("Ecut",false);
33  fElectCutCMD->SetUnitCategory("Length");
34  fElectCutCMD->SetRange("Ecut>0.0");
35  fElectCutCMD->SetDefaultUnit("mm");
36  fElectCutCMD->AvailableForStates(G4State_PreInit,G4State_Idle);
37 
38  fPosCutCMD = new G4UIcmdWithADoubleAndUnit("/edep/phys/positronCut",
39  this);
40  fPosCutCMD->SetGuidance("Set positron cut");
41  fPosCutCMD->SetParameterName("Pcut",false);
42  fPosCutCMD->SetUnitCategory("Length");
43  fPosCutCMD->SetRange("Pcut>0.0");
44  fPosCutCMD->SetDefaultUnit("mm");
45  fPosCutCMD->AvailableForStates(G4State_PreInit,G4State_Idle);
46 
47  fAllCutCMD = new G4UIcmdWithADoubleAndUnit("/edep/phys/allCuts",this);
48  fAllCutCMD->SetGuidance("Set cut for all");
49  fAllCutCMD->SetParameterName("cut",false);
50  fAllCutCMD->SetUnitCategory("Length");
51  fAllCutCMD->SetRange("cut>0.0");
52  fAllCutCMD->SetDefaultUnit("mm");
53  fAllCutCMD->AvailableForStates(G4State_PreInit,G4State_Idle);
54 
55  fIonizationModelCMD = new G4UIcmdWithABool("/edep/phys/ionizationModel",
56  this);
57  fIonizationModelCMD->SetGuidance("Set ionization model in the LAr");
58  fIonizationModelCMD->SetParameterName("fraction",false);
59  fIonizationModelCMD->AvailableForStates(G4State_PreInit,G4State_Idle);
60 }
61 
63  delete fGammaCutCMD;
64  delete fElectCutCMD;
65  delete fPosCutCMD;
66  delete fAllCutCMD;
67  delete fIonizationModelCMD;
68 }
69 
71  G4String newValue) {
72  if (command == fGammaCutCMD) {
74  ->GetNewDoubleValue(newValue));
75  }
76  else if (command == fElectCutCMD) {
78  ->GetNewDoubleValue(newValue));
79  }
80  else if (command == fPosCutCMD) {
82  ->GetNewDoubleValue(newValue));
83  }
84  else if (command == fAllCutCMD) {
85  G4double cut = fAllCutCMD->GetNewDoubleValue(newValue);
89  }
90  else if (command == fIonizationModelCMD) {
91  G4double cut = fIonizationModelCMD->GetNewBoolValue(newValue);
93  }
94 }
G4UIcmdWithADoubleAndUnit * fGammaCutCMD
void SetCutForGamma(G4double)
Set the range cut for photons.
int command
PhysicsListMessenger(EDepSim::PhysicsList *)
G4UIcmdWithADoubleAndUnit * fElectCutCMD
virtual void SetNewValue(G4UIcommand *, G4String)
void SetCutForPositron(G4double)
Set the range cut for positrons.
void SetCutForElectron(G4double)
Set the range cut for electrons.
G4UIcmdWithADoubleAndUnit * fAllCutCMD
G4UIcmdWithADoubleAndUnit * fPosCutCMD