Geant4  10.02.p03
WLSPhysicsListMessenger Class Reference

Provide control of the physics list and cut parameters. More...

#include <WLSPhysicsListMessenger.hh>

Inheritance diagram for WLSPhysicsListMessenger:
Collaboration diagram for WLSPhysicsListMessenger:

Public Member Functions

 WLSPhysicsListMessenger (WLSPhysicsList *)
 
virtual ~WLSPhysicsListMessenger ()
 
virtual void SetNewValue (G4UIcommand *, G4String)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Private Attributes

WLSPhysicsListfPhysicsList
 
G4UIdirectoryfDirectory
 
G4UIdirectoryfDecayDirectory
 
G4UIcmdWithABoolfSetAbsorptionCMD
 
G4UIcmdWithAnIntegerfVerboseCmd
 
G4UIcmdWithAnIntegerfCerenkovCmd
 
G4UIcmdWithADoubleAndUnitfGammaCutCMD
 
G4UIcmdWithADoubleAndUnitfElectCutCMD
 
G4UIcmdWithADoubleAndUnitfPosCutCMD
 
G4UIcmdWithADoubleAndUnitfAllCutCMD
 
G4UIcmdWithADoubleAndUnitfStepMaxCMD
 
G4UIcmdWithAStringfRemovePhysicsCMD
 
G4UIcmdWithoutParameterfClearPhysicsCMD
 
G4UIcmdWithoutParameterfListCMD
 
G4UIcmdWithoutParameterfPienuCMD
 
G4UIcmdWithoutParameterfPimunuCMD
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Provide control of the physics list and cut parameters.

Definition at line 58 of file WLSPhysicsListMessenger.hh.

Constructor & Destructor Documentation

◆ WLSPhysicsListMessenger()

WLSPhysicsListMessenger::WLSPhysicsListMessenger ( WLSPhysicsList pPhys)

Definition at line 49 of file WLSPhysicsListMessenger.cc.

50  : fPhysicsList(pPhys)
51 {
52 
53  fDirectory = new G4UIdirectory("/WLS/phys/");
54  fDirectory->SetGuidance("WLSPhysicsList control");
55 
56  fSetAbsorptionCMD = new G4UIcmdWithABool("/WLS/setAbsorption", this);
57  fSetAbsorptionCMD->SetGuidance("Turn on or off absorption process");
59 
60  fVerboseCmd = new G4UIcmdWithAnInteger("/WLS/phys/verbose",this);
61  fVerboseCmd->SetGuidance("set verbose for physics processes");
62  fVerboseCmd->SetParameterName("verbose",true);
64  fVerboseCmd->SetRange("verbose>=0");
66 
67  fCerenkovCmd =
68  new G4UIcmdWithAnInteger("/WLS/phys/cerenkovMaxPhotons",this);
69  fCerenkovCmd->SetGuidance("set max nb of photons per step");
70  fCerenkovCmd->SetParameterName("MaxNumber",false);
71  fCerenkovCmd->SetRange("MaxNumber>=0");
73 
74  fGammaCutCMD = new G4UIcmdWithADoubleAndUnit("/WLS/phys/gammaCut",this);
75  fGammaCutCMD->SetGuidance("Set gamma cut");
76  fGammaCutCMD->SetParameterName("Gcut",false);
77  fGammaCutCMD->SetUnitCategory("Length");
78  fGammaCutCMD->SetRange("Gcut>0.0");
81 
82  fElectCutCMD = new G4UIcmdWithADoubleAndUnit("/WLS/phys/electronCut",this);
83  fElectCutCMD->SetGuidance("Set electron cut");
84  fElectCutCMD->SetParameterName("Ecut",false);
85  fElectCutCMD->SetUnitCategory("Length");
86  fElectCutCMD->SetRange("Ecut>0.0");
89 
90  fPosCutCMD = new G4UIcmdWithADoubleAndUnit("/WLS/phys/positronCut",this);
91  fPosCutCMD->SetGuidance("Set positron cut");
92  fPosCutCMD->SetParameterName("Pcut",false);
93  fPosCutCMD->SetUnitCategory("Length");
94  fPosCutCMD->SetRange("Pcut>0.0");
97 
98  fAllCutCMD = new G4UIcmdWithADoubleAndUnit("/WLS/phys/allCuts",this);
99  fAllCutCMD->SetGuidance("Set cut for all");
100  fAllCutCMD->SetParameterName("cut",false);
101  fAllCutCMD->SetUnitCategory("Length");
102  fAllCutCMD->SetRange("cut>0.0");
103  fAllCutCMD->SetDefaultUnit("mm");
105 
106  fStepMaxCMD = new G4UIcmdWithADoubleAndUnit("/WLS/phys/stepMax",this);
107  fStepMaxCMD->SetGuidance("Set max. step length in the detector");
108  fStepMaxCMD->SetParameterName("mxStep",false);
109  fStepMaxCMD->SetUnitCategory("Length");
110  fStepMaxCMD->SetRange("mxStep>0.0");
113 
115  new G4UIcmdWithoutParameter("/WLS/phys/clearPhysics",this);
116  fClearPhysicsCMD->SetGuidance("Clear the physics list");
118 
119  fRemovePhysicsCMD = new G4UIcmdWithAString("/WLS/phys/removePhysics",this);
121  SetGuidance("Remove a physics process from Physics List");
122  fRemovePhysicsCMD->SetParameterName("PList",false);
124 
125  fListCMD = new G4UIcmdWithoutParameter("/WLS/phys/list",this);
126  fListCMD->SetGuidance("Available Physics Lists");
128 
129  fDecayDirectory = new G4UIdirectory("/decay/");
130  fDecayDirectory->SetGuidance("Decay chain control commands.");
131 
132  fPienuCMD = new G4UIcmdWithoutParameter("/decay/pienu", this);
133  fPienuCMD->SetGuidance("Sets the pi+ to decay into e+, nu");
134 
135  fPimunuCMD = new G4UIcmdWithoutParameter("/decay/pimunu", this);
136  fPimunuCMD->SetGuidance("Sets the pi+ to decay into mu+, nu");
137 
138 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADoubleAndUnit * fAllCutCMD
G4UIcmdWithADoubleAndUnit * fElectCutCMD
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithAnInteger * fCerenkovCmd
G4UIcmdWithoutParameter * fPienuCMD
void SetUnitCategory(const char *unitCategory)
G4UIcmdWithABool * fSetAbsorptionCMD
G4UIcmdWithoutParameter * fPimunuCMD
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
G4UIcmdWithADoubleAndUnit * fStepMaxCMD
G4UIcmdWithoutParameter * fClearPhysicsCMD
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
void SetDefaultUnit(const char *defUnit)
G4UIcmdWithADoubleAndUnit * fPosCutCMD
void SetDefaultValue(G4int defVal)
G4UIcmdWithAnInteger * fVerboseCmd
G4UIcmdWithADoubleAndUnit * fGammaCutCMD
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithAString * fRemovePhysicsCMD
G4UIcmdWithoutParameter * fListCMD
Here is the call graph for this function:

◆ ~WLSPhysicsListMessenger()

WLSPhysicsListMessenger::~WLSPhysicsListMessenger ( )
virtual

Definition at line 142 of file WLSPhysicsListMessenger.cc.

143 {
144  delete fVerboseCmd;
145  delete fCerenkovCmd;
146 
147  delete fSetAbsorptionCMD;
148 
149  delete fGammaCutCMD;
150  delete fElectCutCMD;
151  delete fPosCutCMD;
152  delete fAllCutCMD;
153 
154  delete fClearPhysicsCMD;
155  delete fRemovePhysicsCMD;
156 
157  delete fListCMD;
158 
159  delete fPienuCMD;
160  delete fPimunuCMD;
161 
162  delete fDirectory;
163 }
G4UIcmdWithADoubleAndUnit * fAllCutCMD
G4UIcmdWithADoubleAndUnit * fElectCutCMD
G4UIcmdWithAnInteger * fCerenkovCmd
G4UIcmdWithoutParameter * fPienuCMD
G4UIcmdWithABool * fSetAbsorptionCMD
G4UIcmdWithoutParameter * fPimunuCMD
G4UIcmdWithoutParameter * fClearPhysicsCMD
G4UIcmdWithADoubleAndUnit * fPosCutCMD
G4UIcmdWithAnInteger * fVerboseCmd
G4UIcmdWithADoubleAndUnit * fGammaCutCMD
G4UIcmdWithAString * fRemovePhysicsCMD
G4UIcmdWithoutParameter * fListCMD

Member Function Documentation

◆ SetNewValue()

void WLSPhysicsListMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 167 of file WLSPhysicsListMessenger.cc.

169 {
170  if( command == fSetAbsorptionCMD ) {
172  }
173 
174  else if( command == fVerboseCmd ) {
176  }
177 
178  else if( command == fCerenkovCmd ) {
179  fPhysicsList->
180  SetNbOfPhotonsCerenkov(fCerenkovCmd->GetNewIntValue(newValue));
181  }
182 
183  else if (command == fPienuCMD) {
185  G4ParticleDefinition* particleDef = particleTable->FindParticle("pi+");
186  G4VDecayChannel* mode =
187  new G4PhaseSpaceDecayChannel("pi+",1.0,2,"e+","nu_e");
188  G4DecayTable* table = new G4DecayTable();
189  table->Insert(mode);
190  // mode = new G4PionRadiativeDecayChannel("pi+",0.000017);
191  // table->Insert(mode);
192  particleDef->SetDecayTable(table);
193  }
194 
195  else if (command == fPimunuCMD) {
197  G4ParticleDefinition* particleDef = particleTable->FindParticle("pi+");
198  G4VDecayChannel* mode =
199  new G4PhaseSpaceDecayChannel("pi+",1.000,2,"mu+","nu_mu");
200  G4DecayTable* table = new G4DecayTable();
201  table->Insert(mode);
202  particleDef->SetDecayTable(table);
203  }
204 
205  else if (command == fGammaCutCMD) {
207  ->GetNewDoubleValue(newValue));
208  }
209  else if (command == fElectCutCMD) {
211  ->GetNewDoubleValue(newValue));
212  }
213  else if (command == fPosCutCMD) {
215  ->GetNewDoubleValue(newValue));
216  }
217  else if (command == fAllCutCMD) {
218  G4double cut = fAllCutCMD->GetNewDoubleValue(newValue);
222  }
223  else if (command == fStepMaxCMD) {
225  ->GetNewDoubleValue(newValue));
226  }
227  else if (command == fClearPhysicsCMD) {
229  }
230  else if (command == fRemovePhysicsCMD) {
231  G4String name = newValue;
233  }
234 }
G4UIcmdWithADoubleAndUnit * fAllCutCMD
void SetDecayTable(G4DecayTable *aDecayTable)
G4UIcmdWithADoubleAndUnit * fElectCutCMD
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4int GetNewIntValue(const char *paramString)
G4UIcmdWithAnInteger * fCerenkovCmd
G4String name
Definition: TRTMaterials.hh:40
G4UIcmdWithoutParameter * fPienuCMD
static G4double GetNewDoubleValue(const char *paramString)
G4UIcmdWithABool * fSetAbsorptionCMD
static G4bool GetNewBoolValue(const char *paramString)
G4UIcmdWithoutParameter * fPimunuCMD
void SetStepMax(G4double)
void ClearPhysics()
Make sure that the physics list is empty.
G4UIcmdWithADoubleAndUnit * fStepMaxCMD
G4UIcmdWithoutParameter * fClearPhysicsCMD
void SetCutForPositron(G4double)
void Insert(G4VDecayChannel *aChannel)
Definition: G4DecayTable.cc:60
void SetCutForGamma(G4double)
void RemoveFromPhysicsList(const G4String &)
Remove specific physics from physics list.
static G4ParticleTable * GetParticleTable()
G4UIcmdWithADoubleAndUnit * fPosCutCMD
void SetCutForElectron(G4double)
double G4double
Definition: G4Types.hh:76
G4UIcmdWithAnInteger * fVerboseCmd
G4UIcmdWithADoubleAndUnit * fGammaCutCMD
void SetAbsorption(G4bool)
void SetVerbose(G4int)
G4UIcmdWithAString * fRemovePhysicsCMD
Here is the call graph for this function:

Member Data Documentation

◆ fAllCutCMD

G4UIcmdWithADoubleAndUnit* WLSPhysicsListMessenger::fAllCutCMD
private

Definition at line 82 of file WLSPhysicsListMessenger.hh.

◆ fCerenkovCmd

G4UIcmdWithAnInteger* WLSPhysicsListMessenger::fCerenkovCmd
private

Definition at line 77 of file WLSPhysicsListMessenger.hh.

◆ fClearPhysicsCMD

G4UIcmdWithoutParameter* WLSPhysicsListMessenger::fClearPhysicsCMD
private

Definition at line 86 of file WLSPhysicsListMessenger.hh.

◆ fDecayDirectory

G4UIdirectory* WLSPhysicsListMessenger::fDecayDirectory
private

Definition at line 72 of file WLSPhysicsListMessenger.hh.

◆ fDirectory

G4UIdirectory* WLSPhysicsListMessenger::fDirectory
private

Definition at line 71 of file WLSPhysicsListMessenger.hh.

◆ fElectCutCMD

G4UIcmdWithADoubleAndUnit* WLSPhysicsListMessenger::fElectCutCMD
private

Definition at line 80 of file WLSPhysicsListMessenger.hh.

◆ fGammaCutCMD

G4UIcmdWithADoubleAndUnit* WLSPhysicsListMessenger::fGammaCutCMD
private

Definition at line 79 of file WLSPhysicsListMessenger.hh.

◆ fListCMD

G4UIcmdWithoutParameter* WLSPhysicsListMessenger::fListCMD
private

Definition at line 88 of file WLSPhysicsListMessenger.hh.

◆ fPhysicsList

WLSPhysicsList* WLSPhysicsListMessenger::fPhysicsList
private

Definition at line 69 of file WLSPhysicsListMessenger.hh.

◆ fPienuCMD

G4UIcmdWithoutParameter* WLSPhysicsListMessenger::fPienuCMD
private

Definition at line 90 of file WLSPhysicsListMessenger.hh.

◆ fPimunuCMD

G4UIcmdWithoutParameter* WLSPhysicsListMessenger::fPimunuCMD
private

Definition at line 91 of file WLSPhysicsListMessenger.hh.

◆ fPosCutCMD

G4UIcmdWithADoubleAndUnit* WLSPhysicsListMessenger::fPosCutCMD
private

Definition at line 81 of file WLSPhysicsListMessenger.hh.

◆ fRemovePhysicsCMD

G4UIcmdWithAString* WLSPhysicsListMessenger::fRemovePhysicsCMD
private

Definition at line 85 of file WLSPhysicsListMessenger.hh.

◆ fSetAbsorptionCMD

G4UIcmdWithABool* WLSPhysicsListMessenger::fSetAbsorptionCMD
private

Definition at line 74 of file WLSPhysicsListMessenger.hh.

◆ fStepMaxCMD

G4UIcmdWithADoubleAndUnit* WLSPhysicsListMessenger::fStepMaxCMD
private

Definition at line 83 of file WLSPhysicsListMessenger.hh.

◆ fVerboseCmd

G4UIcmdWithAnInteger* WLSPhysicsListMessenger::fVerboseCmd
private

Definition at line 76 of file WLSPhysicsListMessenger.hh.


The documentation for this class was generated from the following files: