Geant4  10.02.p03
RMC01AnalysisManagerMessenger Class Reference

#include <RMC01AnalysisManagerMessenger.hh>

Inheritance diagram for RMC01AnalysisManagerMessenger:
Collaboration diagram for RMC01AnalysisManagerMessenger:

Public Member Functions

 RMC01AnalysisManagerMessenger (RMC01AnalysisManager *)
 
virtual ~RMC01AnalysisManagerMessenger ()
 
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

RMC01AnalysisManagerfAnalysisManager
 
G4UIdirectoryfAnalysisDir
 
G4UIcmdWithADoublefSetPrecisionForConvergenceTestCmd
 
G4UIcommandfSetExpSpectrumToNormaliseAdjResCmd
 
G4UIcommandfSetPowerLawSpectrumToNormaliseAdjResCmd
 

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 61 of file RMC01AnalysisManagerMessenger.hh.

Constructor & Destructor Documentation

◆ RMC01AnalysisManagerMessenger()

RMC01AnalysisManagerMessenger::RMC01AnalysisManagerMessenger ( RMC01AnalysisManager analysisManager)

Definition at line 49 of file RMC01AnalysisManagerMessenger.cc.

51 : G4UImessenger(),
52  fAnalysisManager(analysisManager),
53  fAnalysisDir(0),
57 {
58  fAnalysisDir = new G4UIdirectory("/RMC01/analysis/");
59  fAnalysisDir->SetGuidance("Analysis commands");
60 
61  G4UIparameter* fluence_par = new G4UIparameter("Fluence",'d',true);
62  fluence_par->SetParameterRange("Fluence > 0");
63  fluence_par->SetGuidance("Omnidirectional fluence for primary spectrum");
64 
65  G4UIparameter* fluence_unit_par = new G4UIparameter("Fluence_unit",'s',true);
66  fluence_unit_par->SetParameterCandidates("1/cm2 1/m2 cm-2 m-2");
67 
68  G4UIparameter* alpha_par = new G4UIparameter("alpha",'d',true);
69 
70  G4UIparameter* e0_par = new G4UIparameter("E0",'d',true);
71  e0_par->SetParameterRange("E0 > 0");
72 
73  G4UIparameter* e1_par = new G4UIparameter("E1",'d',true);
74  e1_par->SetParameterRange("E1 > 0");
75 
76  G4UIparameter* e2_par = new G4UIparameter("E2",'d',true);
77  e2_par->SetParameterRange("E2 > 0");
78 
79  G4UIparameter* e_unit_par = new G4UIparameter("E_unit",'s',true);
80  e_unit_par->SetParameterCandidates("eV keV MeV GeV TeV");
81 
82  G4UIparameter* part_name_par = new G4UIparameter("particle_name",'s',true);
83  part_name_par->SetParameterCandidates("e- gamma proton ");
84 
86  new G4UIcommand("/RMC01/analysis/SetPowerLawPrimSpectrumForAdjointSim",this);
88  ->SetGuidance("Set the primary spectrum to which adjoint simulation "
89  "results will be normalised as a power law (Ekin^-alpha).");
99 
100 
101  fSetExpSpectrumToNormaliseAdjResCmd = new G4UIcommand("/RMC01/analysis/"
102  "SetExponentialSpectrumForAdjointSim",this);
104  ->SetGuidance("Set the primary spectrum to which adjoint simulation results"
105  "will be normalised as exponential (exp(-Ekin/E0)).");
107  ->SetParameter(new G4UIparameter(*part_name_par));
109  ->SetParameter(new G4UIparameter(*fluence_par));
111  ->SetParameter(new G4UIparameter(*fluence_unit_par));
113  ->SetParameter(new G4UIparameter(*e0_par));
115  ->SetParameter(new G4UIparameter(*e1_par));
117  ->SetParameter(new G4UIparameter(*e2_par));
119  ->SetParameter(new G4UIparameter(*e_unit_par));
122 
123 
125  "SetExpectedPrecisionOfResults",this);
127  ->SetGuidance("Set the precision in % that the computed energy deposited "
128  "in the sensitive volume should reached. If this precision is reached"
129  " before the end of the run, the run is aborted and the results are "
130  "registered.");
134 }
void SetParameter(G4UIparameter *const newParameter)
Definition: G4UIcommand.hh:152
void SetParameterRange(const char *theRange)
void SetParameterCandidates(const char *theString)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADouble * fSetPrecisionForConvergenceTestCmd
void SetGuidance(const char *theGuidance)
Here is the call graph for this function:

◆ ~RMC01AnalysisManagerMessenger()

RMC01AnalysisManagerMessenger::~RMC01AnalysisManagerMessenger ( )
virtual

Definition at line 138 of file RMC01AnalysisManagerMessenger.cc.

139 {
140  delete fAnalysisDir;
141 }

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 145 of file RMC01AnalysisManagerMessenger.cc.

147 {
149  G4double alpha,e1,e2,fluence;
150  G4String f_unit,e_unit,part_name;
151  const char* nv = (const char*)newValue;
152  std::istringstream is(nv);
153  is >> part_name>>fluence>>f_unit>>alpha>>e1>>e2>>e_unit;
154 
155  G4double factor_f_unit=1/cm2;
156  if (f_unit == "1/m2" || f_unit =="m-2") factor_f_unit=1/m2;
157  fluence*=factor_f_unit;
158  e1*= G4UnitDefinition::GetValueOf(e_unit);
159  e2*= G4UnitDefinition::GetValueOf(e_unit);
161  part_name, fluence, alpha, e1, e2);
162  }
163  else if( command == fSetExpSpectrumToNormaliseAdjResCmd){
164  G4double e0,e1,e2,fluence;
165  G4String f_unit,e_unit,part_name;
166  const char* nv = (const char*)newValue;
167  std::istringstream is(nv);
168  is >> part_name>>fluence>>f_unit>>e0>>e1>>e2>>e_unit;
169 
170  G4double factor_f_unit=1/cm2;
171  if (f_unit == "1/m2" || f_unit =="m-2") factor_f_unit=1/m2;
172 
173  fluence*=factor_f_unit;
174  e0*= G4UnitDefinition::GetValueOf(e_unit);
175  e1*= G4UnitDefinition::GetValueOf(e_unit);
176  e2*= G4UnitDefinition::GetValueOf(e_unit);
177 
179  fluence, e0, e1, e2);
180 
181  }
182  else if( command == fSetPrecisionForConvergenceTestCmd){
185  }
186 }
void SetPrimaryPowerLawSpectrumForAdjointSim(const G4String &particle_name, G4double fluence, G4double alpha, G4double Emin, G4double Emax)
static const double cm2
Definition: G4SIunits.hh:119
static const G4double e2
void SetPrimaryExpSpectrumForAdjointSim(const G4String &particle_name, G4double fluence, G4double E0, G4double Emin, G4double Emax)
static G4double GetValueOf(const G4String &)
void SetPrecision(G4double precision)
static const double m2
Definition: G4SIunits.hh:129
static G4double GetNewDoubleValue(const char *paramString)
static const G4double e1
double G4double
Definition: G4Types.hh:76
G4UIcmdWithADouble * fSetPrecisionForConvergenceTestCmd
static const G4double alpha
Here is the call graph for this function:

Member Data Documentation

◆ fAnalysisDir

G4UIdirectory* RMC01AnalysisManagerMessenger::fAnalysisDir
private

Definition at line 73 of file RMC01AnalysisManagerMessenger.hh.

◆ fAnalysisManager

RMC01AnalysisManager* RMC01AnalysisManagerMessenger::fAnalysisManager
private

Definition at line 71 of file RMC01AnalysisManagerMessenger.hh.

◆ fSetExpSpectrumToNormaliseAdjResCmd

G4UIcommand* RMC01AnalysisManagerMessenger::fSetExpSpectrumToNormaliseAdjResCmd
private

Definition at line 76 of file RMC01AnalysisManagerMessenger.hh.

◆ fSetPowerLawSpectrumToNormaliseAdjResCmd

G4UIcommand* RMC01AnalysisManagerMessenger::fSetPowerLawSpectrumToNormaliseAdjResCmd
private

Definition at line 77 of file RMC01AnalysisManagerMessenger.hh.

◆ fSetPrecisionForConvergenceTestCmd

G4UIcmdWithADouble* RMC01AnalysisManagerMessenger::fSetPrecisionForConvergenceTestCmd
private

Definition at line 75 of file RMC01AnalysisManagerMessenger.hh.


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