Geant4  10.02.p03
G4EnergyLossMessenger Class Reference

#include <G4EnergyLossMessenger.hh>

Inheritance diagram for G4EnergyLossMessenger:
Collaboration diagram for G4EnergyLossMessenger:

Public Member Functions

 G4EnergyLossMessenger ()
 
virtual ~G4EnergyLossMessenger ()
 
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

G4EmProcessOptionsopt
 
G4UIcmdWithABoolSubSecCmd
 
G4UIcommandStepFuncCmd
 
G4UIcommanddeexCmd
 
G4UIcmdWithABoolIntegCmd
 
G4UIcommandbfCmd
 
G4UIcommandfiCmd
 
G4UIcommandbrCmd
 

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

Definition at line 74 of file G4EnergyLossMessenger.hh.

Constructor & Destructor Documentation

◆ G4EnergyLossMessenger()

G4EnergyLossMessenger::G4EnergyLossMessenger ( )

Definition at line 76 of file G4EnergyLossMessenger.cc.

77 {
78 
79  opt = 0;
80  SubSecCmd = new G4UIcmdWithABool("/process/eLoss/subsec",this);
81  SubSecCmd->SetGuidance("Switch true/false the subcutoff generation.");
82  SubSecCmd->SetParameterName("choice",true);
85 
86  StepFuncCmd = new G4UIcommand("/process/eLoss/StepFunction",this);
87  StepFuncCmd->SetGuidance("Set the energy loss step limitation parameters.");
88  StepFuncCmd->SetGuidance(" dRoverR : max Range variation per step");
89  StepFuncCmd->SetGuidance(" finalRange: range for final step");
90 
91  G4UIparameter* dRoverRPrm = new G4UIparameter("dRoverR",'d',false);
92  dRoverRPrm->SetGuidance("max Range variation per step (fractional number)");
93  dRoverRPrm->SetParameterRange("dRoverR>0. && dRoverR<=1.");
94  StepFuncCmd->SetParameter(dRoverRPrm);
95 
96  G4UIparameter* finalRangePrm = new G4UIparameter("finalRange",'d',false);
97  finalRangePrm->SetGuidance("range for final step");
98  finalRangePrm->SetParameterRange("finalRange>0.");
99  StepFuncCmd->SetParameter(finalRangePrm);
100 
101  G4UIparameter* unitPrm = new G4UIparameter("unit",'s',true);
102  unitPrm->SetGuidance("unit of finalRange");
103  unitPrm->SetDefaultValue("mm");
104  G4String unitCandidates =
106  unitPrm->SetParameterCandidates(unitCandidates);
107 
108  StepFuncCmd->SetParameter(unitPrm);
110 
111  IntegCmd = new G4UIcmdWithABool("/process/eLoss/integral",this);
112  IntegCmd->SetGuidance("Switch true/false the integral option");
113  IntegCmd->SetParameterName("integ",true);
114  IntegCmd->SetDefaultValue(true);
116 
117  deexCmd = new G4UIcommand("/process/em/deexcitation",this);
118  deexCmd->SetGuidance("Set deexcitation flags per G4Region.");
119  deexCmd->SetGuidance(" regName : G4Region name");
120  deexCmd->SetGuidance(" flagFluo : Fluorescence");
121  deexCmd->SetGuidance(" flagAuger : Auger");
122  deexCmd->SetGuidance(" flagPIXE : PIXE");
123 
124  G4UIparameter* regName = new G4UIparameter("regName",'s',false);
125  deexCmd->SetParameter(regName);
126 
127  G4UIparameter* flagFluo = new G4UIparameter("flagFluo",'s',false);
128  deexCmd->SetParameter(flagFluo);
129 
130  G4UIparameter* flagAuger = new G4UIparameter("flagAuger",'s',false);
131  deexCmd->SetParameter(flagAuger);
132 
133  G4UIparameter* flagPIXE = new G4UIparameter("flagPIXE",'s',false);
134  deexCmd->SetParameter(flagPIXE);
135 
136  bfCmd = new G4UIcommand("/process/em/setBiasingFactor",this);
137  bfCmd->SetGuidance("Set factor for the process cross section.");
138  bfCmd->SetGuidance(" procName : process name");
139  bfCmd->SetGuidance(" procFact : factor");
140  bfCmd->SetGuidance(" flagFact : flag to change weight");
141 
142  G4UIparameter* procName = new G4UIparameter("procName",'s',false);
143  bfCmd->SetParameter(procName);
144 
145  G4UIparameter* procFact = new G4UIparameter("procFact",'d',false);
146  bfCmd->SetParameter(procFact);
147 
148  G4UIparameter* flagFact = new G4UIparameter("flagFact",'s',false);
149  bfCmd->SetParameter(flagFact);
151 
152  fiCmd = new G4UIcommand("/process/em/setForcedInteraction",this);
153  fiCmd->SetGuidance("Set factor for the process cross section.");
154  fiCmd->SetGuidance(" procNam : process name");
155  fiCmd->SetGuidance(" regNam : region name");
156  fiCmd->SetGuidance(" tlength : fixed target length");
157  fiCmd->SetGuidance(" tflag : flag to change weight");
158 
159  G4UIparameter* procNam = new G4UIparameter("procNam",'s',false);
160  fiCmd->SetParameter(procNam);
161 
162  G4UIparameter* regNam = new G4UIparameter("regNam",'s',false);
163  fiCmd->SetParameter(regNam);
164 
165  G4UIparameter* tlength = new G4UIparameter("tlength",'d',false);
166  fiCmd->SetParameter(tlength);
167 
168  G4UIparameter* unitT = new G4UIparameter("unitT",'s',true);
169  fiCmd->SetParameter(unitT);
170  unitT->SetGuidance("unit of tlength");
171 
172  G4UIparameter* flagT = new G4UIparameter("tflag",'s',true);
173  fiCmd->SetParameter(flagT);
175 
176  brCmd = new G4UIcommand("/process/em/setSecBiasing",this);
177  brCmd->SetGuidance("Set bremsstrahlung or delta-e- splitting/Russian roullette per region.");
178  brCmd->SetGuidance(" bProcNam : process name");
179  brCmd->SetGuidance(" bRegNam : region name");
180  brCmd->SetGuidance(" bFactor : number of splitted gamma or probability of Russian roulette");
181  brCmd->SetGuidance(" bEnergy : max energy of a secondary for this biasing method");
182 
183  G4UIparameter* bProcNam = new G4UIparameter("bProcNam",'s',false);
184  brCmd->SetParameter(bProcNam);
185 
186  G4UIparameter* bRegNam = new G4UIparameter("bRegNam",'s',false);
187  brCmd->SetParameter(bRegNam);
188 
189  G4UIparameter* bFactor = new G4UIparameter("bFactor",'d',false);
190  brCmd->SetParameter(bFactor);
191 
192  G4UIparameter* bEnergy = new G4UIparameter("bEnergy",'d',false);
193  brCmd->SetParameter(bEnergy);
194 
195  G4UIparameter* bUnit = new G4UIparameter("bUnit",'s',true);
196  brCmd->SetParameter(bUnit);
197  brCmd->SetGuidance("unit of energy");
198 
200 }
void SetParameter(G4UIparameter *const newParameter)
Definition: G4UIcommand.hh:152
G4UIcmdWithABool * IntegCmd
void SetParameterRange(const char *theRange)
void SetParameterCandidates(const char *theString)
void SetDefaultValue(const char *theDefaultValue)
void SetDefaultValue(G4bool defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4String UnitsList(const char *unitCategory)
Definition: G4UIcommand.cc:320
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
G4EmProcessOptions * opt
G4UIcmdWithABool * SubSecCmd
void SetGuidance(const char *theGuidance)
static G4String CategoryOf(const char *unitName)
Definition: G4UIcommand.cc:315
Here is the call graph for this function:

◆ ~G4EnergyLossMessenger()

G4EnergyLossMessenger::~G4EnergyLossMessenger ( )
virtual

Definition at line 204 of file G4EnergyLossMessenger.cc.

205 {
206  delete opt;
207  delete SubSecCmd;
208  delete StepFuncCmd;
209  delete IntegCmd;
210  delete bfCmd;
211  delete fiCmd;
212  delete brCmd;
213 }
G4UIcmdWithABool * IntegCmd
G4EmProcessOptions * opt
G4UIcmdWithABool * SubSecCmd

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 217 of file G4EnergyLossMessenger.cc.

218 {
219  if(!opt) { opt = new G4EmProcessOptions(); }
220 
221  if(command == SubSecCmd) {
223  G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
224  } else if (command == StepFuncCmd) {
225  G4double v1,v2;
226  G4String unt;
227  std::istringstream is(newValue);
228  is >> v1 >> v2 >> unt;
229  v2 *= G4UIcommand::ValueOf(unt);
230  opt->SetStepFunction(v1,v2);
231  } else if (command == deexCmd) {
232  G4String s1 (""), s2(""), s3(""), s4("");
233  G4bool b2(false), b3(false), b4(false);
234  std::istringstream is(newValue);
235  is >> s1 >> s2 >> s3 >> s4;
236  if(s2 == "true") { b2 = true; }
237  if(s3 == "true") { b3 = true; }
238  if(s4 == "true") { b4 = true; }
240  G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
241  } else if (command == IntegCmd) {
243  } else if (command == bfCmd) {
244  G4double v1(1.0);
245  G4String s0(""),s1("");
246  std::istringstream is(newValue);
247  is >> s0 >> v1 >> s1;
248  G4bool yes = false;
249  if(s1 == "true") { yes = true; }
250  opt->SetProcessBiasingFactor(s0,v1,yes);
251  G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
252  } else if (command == fiCmd) {
253  G4double v1(0.0);
254  G4String s1(""),s2(""),s3(""),unt("mm");
255  std::istringstream is(newValue);
256  is >> s1 >> s2 >> v1 >> unt >> s3;
257  G4bool yes = false;
258  if(s3 == "true") { yes = true; }
259  v1 *= G4UIcommand::ValueOf(unt);
260  opt->ActivateForcedInteraction(s1,v1,s2,yes);
261  G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
262  } else if (command == brCmd) {
263  G4double fb(1.0),en(1.e+30);
264  G4String s1(""),s2(""),unt("MeV");
265  std::istringstream is(newValue);
266  is >> s1 >> s2 >> fb >> en >> unt;
267  en *= G4UIcommand::ValueOf(unt);
268  if (s1=="phot"||s1=="compt"||s1=="conv")
270  else opt->ActivateSecondaryBiasing(s1,s2,fb,en);
271  G4UImanager::GetUIpointer()->ApplyCommand("/run/physicsModified");
272  }
273 }
G4UIcmdWithABool * IntegCmd
void SetStepFunction(G4double v1, G4double v2)
void ActivateSecondaryBiasingForGamma(const G4String &name, const G4String &region, G4double factor, G4double energyLimit)
static G4bool GetNewBoolValue(const char *paramString)
TFile fb
Definition: plot2.C:13
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:58
static const G4double b3
bool G4bool
Definition: G4Types.hh:79
static const G4double b2
void SetDeexcitationActiveRegion(const G4String &rname="", G4bool valDeexcitation=true, G4bool valAuger=true, G4bool valPIXE=true)
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:308
G4EmProcessOptions * opt
G4UIcmdWithABool * SubSecCmd
void ActivateSecondaryBiasing(const G4String &name, const G4String &region, G4double factor, G4double energyLimit)
void ActivateForcedInteraction(const G4String &name, G4double length=0.0, const G4String &region="", G4bool flag=true)
void SetIntegral(G4bool val)
double G4double
Definition: G4Types.hh:76
void SetSubCutoff(G4bool val, const G4Region *r=0)
static const G4double b4
void SetProcessBiasingFactor(const G4String &name, G4double val, G4bool flag=true)
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:446
Here is the call graph for this function:

Member Data Documentation

◆ bfCmd

G4UIcommand* G4EnergyLossMessenger::bfCmd
private

Definition at line 90 of file G4EnergyLossMessenger.hh.

◆ brCmd

G4UIcommand* G4EnergyLossMessenger::brCmd
private

Definition at line 92 of file G4EnergyLossMessenger.hh.

◆ deexCmd

G4UIcommand* G4EnergyLossMessenger::deexCmd
private

Definition at line 88 of file G4EnergyLossMessenger.hh.

◆ fiCmd

G4UIcommand* G4EnergyLossMessenger::fiCmd
private

Definition at line 91 of file G4EnergyLossMessenger.hh.

◆ IntegCmd

G4UIcmdWithABool* G4EnergyLossMessenger::IntegCmd
private

Definition at line 89 of file G4EnergyLossMessenger.hh.

◆ opt

G4EmProcessOptions* G4EnergyLossMessenger::opt
private

Definition at line 85 of file G4EnergyLossMessenger.hh.

◆ StepFuncCmd

G4UIcommand* G4EnergyLossMessenger::StepFuncCmd
private

Definition at line 87 of file G4EnergyLossMessenger.hh.

◆ SubSecCmd

G4UIcmdWithABool* G4EnergyLossMessenger::SubSecCmd
private

Definition at line 86 of file G4EnergyLossMessenger.hh.


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