Geant4  10.02.p03
F04PhysicsListMessenger Class Reference

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

#include <F04PhysicsListMessenger.hh>

Inheritance diagram for F04PhysicsListMessenger:
Collaboration diagram for F04PhysicsListMessenger:

Public Member Functions

 F04PhysicsListMessenger (F04PhysicsList *)
 
virtual ~F04PhysicsListMessenger ()
 
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

F04PhysicsListfPhysicsList
 
G4UIdirectoryfDirectory
 
G4UIdirectoryfDecayDirectory
 
G4UIcmdWithADoubleAndUnitfGammaCutCMD
 
G4UIcmdWithADoubleAndUnitfElectCutCMD
 
G4UIcmdWithADoubleAndUnitfPosCutCMD
 
G4UIcmdWithADoubleAndUnitfAllCutCMD
 
G4UIcmdWithADoubleAndUnitfStepMaxCMD
 
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 47 of file F04PhysicsListMessenger.hh.

Constructor & Destructor Documentation

◆ F04PhysicsListMessenger()

F04PhysicsListMessenger::F04PhysicsListMessenger ( F04PhysicsList pPhys)

Definition at line 53 of file F04PhysicsListMessenger.cc.

54  : fPhysicsList(pPhys)
55 {
56  fDirectory = new G4UIdirectory("/exp/phys/");
57  fDirectory->SetGuidance("Control the physics lists");
58 
59  fGammaCutCMD = new G4UIcmdWithADoubleAndUnit("/exp/phys/gammaCut",this);
60  fGammaCutCMD->SetGuidance("Set gamma cut");
61  fGammaCutCMD->SetParameterName("Gcut",false);
62  fGammaCutCMD->SetUnitCategory("Length");
63  fGammaCutCMD->SetRange("Gcut>0.0");
66 
67  fElectCutCMD = new G4UIcmdWithADoubleAndUnit("/exp/phys/electronCut",
68  this);
69  fElectCutCMD->SetGuidance("Set electron cut");
70  fElectCutCMD->SetParameterName("Ecut",false);
71  fElectCutCMD->SetUnitCategory("Length");
72  fElectCutCMD->SetRange("Ecut>0.0");
75 
76  fPosCutCMD = new G4UIcmdWithADoubleAndUnit("/exp/phys/positronCut",
77  this);
78  fPosCutCMD->SetGuidance("Set positron cut");
79  fPosCutCMD->SetParameterName("Pcut",false);
80  fPosCutCMD->SetUnitCategory("Length");
81  fPosCutCMD->SetRange("Pcut>0.0");
84 
85  fAllCutCMD = new G4UIcmdWithADoubleAndUnit("/exp/phys/allCuts",this);
86  fAllCutCMD->SetGuidance("Set cut for all");
87  fAllCutCMD->SetParameterName("cut",false);
88  fAllCutCMD->SetUnitCategory("Length");
89  fAllCutCMD->SetRange("cut>0.0");
92 
93  fStepMaxCMD = new G4UIcmdWithADoubleAndUnit("/exp/phys/stepMax",this);
94  fStepMaxCMD->SetGuidance("Set max. step length in the detector");
95  fStepMaxCMD->SetParameterName("mxStep",false);
96  fStepMaxCMD->SetUnitCategory("Length");
97  fStepMaxCMD->SetRange("mxStep>0.0");
100 /*
101  fClearPhysicsCMD = new G4UIcmdWithoutParameter("/exp/phys/clearPhysics",
102  this);
103  fClearPhysicsCMD->SetGuidance("Clear the physics list");
104  fClearPhysicsCMD->AvailableForStates(G4State_PreInit,G4State_Idle);
105 
106  fRemovePhysicsCMD = new G4UIcmdWithAString("/exp/phys/removePhysics",this);
107  fRemovePhysicsCMD->
108  SetGuidance("Remove a physics process from Physics List");
109  fRemovePhysicsCMD->SetParameterName("PList",false);
110  fRemovePhysicsCMD->AvailableForStates(G4State_PreInit,G4State_Idle);
111 */
112  fDecayDirectory = new G4UIdirectory("/decay/");
113  fDecayDirectory->SetGuidance("Decay chain control commands.");
114 
115  fPienuCMD = new G4UIcmdWithoutParameter("/decay/pienu", this);
116  fPienuCMD->SetGuidance("Sets the pi+ to decay into e+, nu");
117 
118  fPimunuCMD = new G4UIcmdWithoutParameter("/decay/pimunu", this);
119  fPimunuCMD->SetGuidance("Sets the pi+ to decay into mu+, nu");
120 
121 }
G4UIcmdWithADoubleAndUnit * fStepMaxCMD
G4UIcmdWithoutParameter * fPimunuCMD
G4UIcmdWithADoubleAndUnit * fAllCutCMD
G4UIcmdWithoutParameter * fPienuCMD
void SetUnitCategory(const char *unitCategory)
G4UIcmdWithADoubleAndUnit * fGammaCutCMD
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
void SetDefaultUnit(const char *defUnit)
G4UIcmdWithADoubleAndUnit * fPosCutCMD
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADoubleAndUnit * fElectCutCMD
Here is the call graph for this function:

◆ ~F04PhysicsListMessenger()

F04PhysicsListMessenger::~F04PhysicsListMessenger ( )
virtual

Definition at line 125 of file F04PhysicsListMessenger.cc.

126 {
127  delete fGammaCutCMD;
128  delete fElectCutCMD;
129  delete fPosCutCMD;
130  delete fAllCutCMD;
131 /*
132  delete fClearPhysicsCMD;
133  delete fRemovePhysicsCMD;
134 */
135  delete fPienuCMD;
136  delete fPimunuCMD;
137 }
G4UIcmdWithoutParameter * fPimunuCMD
G4UIcmdWithADoubleAndUnit * fAllCutCMD
G4UIcmdWithoutParameter * fPienuCMD
G4UIcmdWithADoubleAndUnit * fGammaCutCMD
G4UIcmdWithADoubleAndUnit * fPosCutCMD
G4UIcmdWithADoubleAndUnit * fElectCutCMD

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 141 of file F04PhysicsListMessenger.cc.

143 {
145 
146  if (command == fPienuCMD) {
147  G4ParticleDefinition* fParticleDef = fParticleTable->FindParticle("pi+");
148  G4VDecayChannel* fMode =
149  new G4PhaseSpaceDecayChannel("pi+",0.999983,2,"e+","nu_e");
150  G4DecayTable* fTable = new G4DecayTable();
151  fTable->Insert(fMode);
152  fMode = new G4PionRadiativeDecayChannel("pi+",0.000017);
153  fTable->Insert(fMode);
154  fParticleDef->SetDecayTable(fTable);
155  }
156 
157  if (command == fPimunuCMD) {
158  G4ParticleDefinition* fParticleDef = fParticleTable->FindParticle("pi+");
159  G4VDecayChannel* fMode =
160  new G4PhaseSpaceDecayChannel("pi+",1.000,2,"mu+","nu_mu");
161  G4DecayTable* fTable = new G4DecayTable();
162  fTable->Insert(fMode);
163  fParticleDef->SetDecayTable(fTable);
164  }
165 
166  if (command == fGammaCutCMD) {
168  ->GetNewDoubleValue(newValue));
169  }
170  else if (command == fElectCutCMD) {
172  ->GetNewDoubleValue(newValue));
173  }
174  else if (command == fPosCutCMD) {
176  ->GetNewDoubleValue(newValue));
177  }
178  else if (command == fAllCutCMD) {
179  G4double cut = fAllCutCMD->GetNewDoubleValue(newValue);
183  }
184  else if (command == fStepMaxCMD) {
186  ->GetNewDoubleValue(newValue));
187  }
188 /* else if (command == fClearPhysicsCMD) {
189  fPhysicsList->ClearPhysics();
190  }
191  else if (command == fRemovePhysicsCMD) {
192  G4String name = newValue;
193  fPhysicsList->RemoveFromPhysicsList(name);
194  }
195 */
196 }
void SetDecayTable(G4DecayTable *aDecayTable)
G4UIcmdWithADoubleAndUnit * fStepMaxCMD
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4UIcmdWithoutParameter * fPimunuCMD
G4UIcmdWithADoubleAndUnit * fAllCutCMD
G4UIcmdWithoutParameter * fPienuCMD
static G4double GetNewDoubleValue(const char *paramString)
void SetCutForGamma(G4double)
void SetCutForElectron(G4double)
G4UIcmdWithADoubleAndUnit * fGammaCutCMD
void SetCutForPositron(G4double)
void SetStepMax(G4double)
void Insert(G4VDecayChannel *aChannel)
Definition: G4DecayTable.cc:60
static G4ParticleTable * GetParticleTable()
double G4double
Definition: G4Types.hh:76
G4UIcmdWithADoubleAndUnit * fPosCutCMD
G4UIcmdWithADoubleAndUnit * fElectCutCMD
Here is the call graph for this function:

Member Data Documentation

◆ fAllCutCMD

G4UIcmdWithADoubleAndUnit* F04PhysicsListMessenger::fAllCutCMD
private

Definition at line 66 of file F04PhysicsListMessenger.hh.

◆ fDecayDirectory

G4UIdirectory* F04PhysicsListMessenger::fDecayDirectory
private

Definition at line 61 of file F04PhysicsListMessenger.hh.

◆ fDirectory

G4UIdirectory* F04PhysicsListMessenger::fDirectory
private

Definition at line 60 of file F04PhysicsListMessenger.hh.

◆ fElectCutCMD

G4UIcmdWithADoubleAndUnit* F04PhysicsListMessenger::fElectCutCMD
private

Definition at line 64 of file F04PhysicsListMessenger.hh.

◆ fGammaCutCMD

G4UIcmdWithADoubleAndUnit* F04PhysicsListMessenger::fGammaCutCMD
private

Definition at line 63 of file F04PhysicsListMessenger.hh.

◆ fPhysicsList

F04PhysicsList* F04PhysicsListMessenger::fPhysicsList
private

Definition at line 58 of file F04PhysicsListMessenger.hh.

◆ fPienuCMD

G4UIcmdWithoutParameter* F04PhysicsListMessenger::fPienuCMD
private

Definition at line 72 of file F04PhysicsListMessenger.hh.

◆ fPimunuCMD

G4UIcmdWithoutParameter* F04PhysicsListMessenger::fPimunuCMD
private

Definition at line 73 of file F04PhysicsListMessenger.hh.

◆ fPosCutCMD

G4UIcmdWithADoubleAndUnit* F04PhysicsListMessenger::fPosCutCMD
private

Definition at line 65 of file F04PhysicsListMessenger.hh.

◆ fStepMaxCMD

G4UIcmdWithADoubleAndUnit* F04PhysicsListMessenger::fStepMaxCMD
private

Definition at line 67 of file F04PhysicsListMessenger.hh.


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