Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4QMessenger Class Reference

#include <G4QMessenger.hh>

+ Inheritance diagram for G4QMessenger:

Public Member Functions

 ~G4QMessenger ()
 
void Add (G4QNeutrinoPhysics *weak)
 
void Add (G4QPhotoNuclearPhysics *photo)
 
void SetNewValue (G4UIcommand *aComm, G4String aS)
 
G4String GetCurrentValue (G4UIcommand *aComm)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
G4bool operator== (const G4UImessenger &messenger) const
 

Static Public Member Functions

static G4QMessengerGetPointer ()
 

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)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 

Detailed Description

Definition at line 55 of file G4QMessenger.hh.

Constructor & Destructor Documentation

◆ ~G4QMessenger()

G4QMessenger::~G4QMessenger ( )

Definition at line 64 of file G4QMessenger.cc.

65{
66 delete rootDir;
67 if(photoDir)
68 {
69 delete photoDir;
70 delete theSynchR;
71 delete minGamSR;
72 delete theGamN;
73 delete theEleN;
74 delete theMuoN;
75 delete theTauN;
76 delete biasPhotoN;
77 }
78 else if(weakDir)
79 {
80 delete weakDir;
81 delete theNuElN;
82 delete theNuMuN;
83 delete theNuTaN;
84 delete biasNuNuc;
85 }
86}

Member Function Documentation

◆ Add() [1/2]

void G4QMessenger::Add ( G4QNeutrinoPhysics weak)

Definition at line 95 of file G4QMessenger.cc.

96{
97 theWeak = weak;
98
99 weakDir = new G4UIdirectory("/CHIPS_physics/neutrino/");
100 weakDir->SetGuidance("weak (neutrino) processes");
101
102 // commands for neutrino_el-nuclear physics.
103 theNuElN = new G4UIcmdWithAString("/CHIPS_physics/neutrino/NuElNuclear",this);
104 theNuElN->SetGuidance("Switching of nu_el-nuclear physics.");
105 theNuElN->SetParameterName("status",false);
106 theNuElN->SetCandidates("on off");
107 theNuElN->SetDefaultValue("off");
109
110 // commands for neutrino_mu-nuclear physics.
111 theNuMuN = new G4UIcmdWithAString("/CHIPS_physics/neutrino/NuMuNuclear",this);
112 theNuMuN->SetGuidance("Switching of nu_mu-nuclear physics.");
113 theNuMuN->SetParameterName("status",false);
114 theNuMuN->SetCandidates("on off");
115 theNuMuN->SetDefaultValue("off");
117
118 // commands for neutrino_tau-nuclear physics.
119 theNuTaN = new G4UIcmdWithAString("/CHIPS_physics/neutrino/NuTauNuclear",this);
120 theNuTaN->SetGuidance("Switching of nu_tau-nuclear physics.");
121 theNuTaN->SetParameterName("status",false);
122 theNuTaN->SetCandidates("on off");
123 theNuTaN->SetDefaultValue("off");
125
126 // command for biasing of neutrino-nuclear reactions
127 biasNuNuc = new G4UIcmdWithADouble("/CHIPS_physics/neutrino/NuNuc_Biasing", this);
128 biasNuNuc->SetGuidance("Set a biasing coefficient for neutrino-nuclear ractions");
129 biasNuNuc->SetParameterName("NuNuc_Biasing", false);
130 biasNuNuc->SetRange("NuNuc_Biasing > 0.");
131 biasNuNuc->SetDefaultValue(1.);
133}
@ G4State_Idle
@ G4State_PreInit
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4double defVal)
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
void SetRange(const char *rs)
Definition: G4UIcommand.hh:120
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:219

Referenced by G4QNeutrinoPhysics::G4QNeutrinoPhysics(), and G4QPhotoNuclearPhysics::G4QPhotoNuclearPhysics().

◆ Add() [2/2]

void G4QMessenger::Add ( G4QPhotoNuclearPhysics photo)

Definition at line 135 of file G4QMessenger.cc.

136{
137 thePhoto = photo;
138
139 weakDir = new G4UIdirectory("/CHIPS_physics/photoNuclear/");
140 weakDir->SetGuidance("weak (neutrino) processes");
141
142 // use G4UIcmdWithADouble for weighting of processes
143
144 // command for synchrotron radiation.
145 theSynchR = new G4UIcmdWithAString("/CHIPS_physics/photoNuclear/SynchRadiation",this);
146 theSynchR->SetGuidance("Switching on/off synchrotron radiation.");
147 theSynchR->SetParameterName("status",false);
148 theSynchR->SetCandidates("on off");
149 theSynchR->SetDefaultValue("off");
151
152 minGamSR = new G4UIcmdWithADouble("/CHIPS_physics/photoNuclear/MinGamma_SynchRad", this);
153 minGamSR->SetGuidance("Set a minimum gamma for Synchratron Radiation");
154 minGamSR->SetParameterName("MinGamma_SynchRad", false);
155 minGamSR->SetRange("MinGamma_SynchRad >> 1.");
156 minGamSR->SetDefaultValue(227.);
158
159 // command for gamma-nuclear physics.
160 theGamN = new G4UIcmdWithAString("/CHIPS_physics/photoNuclear/GammaNuclear",this);
161 theGamN->SetGuidance("Switching of gamma-nuclear physics.");
162 theGamN->SetParameterName("status",false);
163 theGamN->SetCandidates("on off");
164 theGamN->SetDefaultValue("on");
166
167 // command for electro-nuclear physics.
168 theEleN = new G4UIcmdWithAString("/CHIPS_physics/photoNuclear/ElectroNuclear",this);
169 theEleN->SetGuidance("Switching of electron-nuclear physics.");
170 theEleN->SetParameterName("status",false);
171 theEleN->SetCandidates("on off");
172 theEleN->SetDefaultValue("off");
174
175 // command for muon-nuclear physics.
176 theMuoN = new G4UIcmdWithAString("/CHIPS_physics/photoNuclear/MuonNuclear",this);
177 theMuoN->SetGuidance("Switching of muon nuclear physics.");
178 theMuoN->SetParameterName("status",false);
179 theMuoN->SetCandidates("on off");
180 theMuoN->SetDefaultValue("off");
182
183 // command for tau-nuclear physics.
184 theTauN = new G4UIcmdWithAString("/CHIPS_physics/photoNuclear/TauNuclear",this);
185 theTauN->SetGuidance("Switching of tau nuclear physics.");
186 theTauN->SetParameterName("status",false);
187 theTauN->SetCandidates("on off");
188 theTauN->SetDefaultValue("off");
190
191
192 biasPhotoN = new G4UIcmdWithADouble("/CHIPS_physics/photoNuclear/PhotoN_Biasing", this);
193 biasPhotoN->SetGuidance("Set a biasing coefficient for photo-nuclear ractions");
194 biasPhotoN->SetParameterName("PhotoN_Biasing", false);
195 biasPhotoN->SetRange("PhotoN_Biasing > 0.");
196 biasPhotoN->SetDefaultValue(1.);
198}

◆ GetCurrentValue()

G4String G4QMessenger::GetCurrentValue ( G4UIcommand aComm)
virtual

Reimplemented from G4UImessenger.

Definition at line 221 of file G4QMessenger.cc.

222{
223 if(photoDir)
224 {
225 if (aComm==theSynchR) return thePhoto->GetSynchRadOnOff();
226 else if(aComm==theGamN) return thePhoto->GetGammaNuclearOnOff();
227 else if(aComm==theEleN) return thePhoto->GetElPosNuclearOnOff();
228 else if(aComm==theMuoN) return thePhoto->GetMuonNuclearOnOff();
229 else if(aComm==theTauN) return thePhoto->GetTauNuclearOnOff();
230 }
231 else if(weakDir)
232 {
233 if (aComm==theNuElN) return theWeak->GetNuElNuclearOnOff();
234 else if(aComm==theNuMuN) return theWeak->GetNuMuNuclearOnOff();
235 else if(aComm==theNuTaN) return theWeak->GetNuTauNuclearOnOff();
236 }
237 return "not_defined";
238}
G4String GetNuElNuclearOnOff()
G4String GetNuTauNuclearOnOff()
G4String GetNuMuNuclearOnOff()

◆ GetPointer()

G4QMessenger * G4QMessenger::GetPointer ( )
static

Definition at line 89 of file G4QMessenger.cc.

90{
91 static G4QMessenger theMessenger; //**Static body of CHIPS Messenger**
92 return &theMessenger;
93}

Referenced by G4QNeutrinoPhysics::G4QNeutrinoPhysics(), and G4QPhotoNuclearPhysics::G4QPhotoNuclearPhysics().

◆ SetNewValue()

void G4QMessenger::SetNewValue ( G4UIcommand aComm,
G4String  aS 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 200 of file G4QMessenger.cc.

201{
202 if(photoDir)
203 {
204 if (aComm==theSynchR) thePhoto->SetSynchRadOnOff(aS);
205 else if(aComm==minGamSR) thePhoto->SetMinGammaSR(minGamSR->GetNewDoubleValue(aS));
206 else if(aComm==theGamN) thePhoto->SetGammaNuclearOnOff(aS);
207 else if(aComm==theMuoN) thePhoto->SetElPosNuclearOnOff(aS);
208 else if(aComm==theMuoN) thePhoto->SetMuonNuclearOnOff(aS);
209 else if(aComm==theMuoN) thePhoto->SetTauNuclearOnOff(aS);
210 else if(aComm==biasPhotoN)thePhoto->SetPhotoNucBias(biasPhotoN->GetNewDoubleValue(aS));
211 }
212 else if(weakDir)
213 {
214 if (aComm==theNuElN) theWeak->SetNuElNuclearOnOff(aS);
215 else if(aComm==theNuMuN) theWeak->SetNuMuNuclearOnOff(aS);
216 else if(aComm==theNuTaN) theWeak->SetNuTauNuclearOnOff(aS);
217 else if(aComm==biasNuNuc) theWeak->SetNuNuclearBias(biasNuNuc->GetNewDoubleValue(aS));
218 }
219}
void SetNuNuclearBias(G4double newValue)
void SetNuElNuclearOnOff(G4String &aState)
void SetNuMuNuclearOnOff(G4String &aState)
void SetNuTauNuclearOnOff(G4String &aState)
void SetGammaNuclearOnOff(G4String &aSwitch)
void SetMuonNuclearOnOff(G4String &aSwitch)
void SetMinGammaSR(G4double newValue)
void SetElPosNuclearOnOff(G4String &aSwitch)
void SetTauNuclearOnOff(G4String &aSwitch)
void SetPhotoNucBias(G4double newValue)
void SetSynchRadOnOff(G4String &aSwitch)
static G4double GetNewDoubleValue(const char *paramString)

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