Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CML2MainMessenger Class Reference

#include <ML2MainMessenger.hh>

Inheritance diagram for CML2MainMessenger:
Collaboration diagram for CML2MainMessenger:

Public Member Functions

 CML2MainMessenger (CML2CInputData *CInputData)
 
 ~CML2MainMessenger (void)
 
void SetNewValue (G4UIcommand *cmd, G4String newValue)
 
- 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
 

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 69 of file ML2MainMessenger.hh.

Constructor & Destructor Documentation

CML2MainMessenger::CML2MainMessenger ( CML2CInputData CInputData)

Definition at line 46 of file ML2MainMessenger.cc.

47 {
48 
49  CInputData=InData;
50  phaseSpaceCentre=new G4UIcmdWith3VectorAndUnit("/general/centrePhaseSpace", this);
51  phaseSpaceCentre->SetDefaultUnit("mm");
52  phaseSpaceCentre->SetDefaultValue(G4ThreeVector(0.,0.,164.));
53  phaseSpaceCentre->SetGuidance("position of the centre of the plane phase space");
54  CInputData->setPhaseSpaceCentre(G4ThreeVector(0.*mm,0.*mm,164.*mm));
55 
56  phaseSpaceHalfSize=new G4UIcmdWith3VectorAndUnit("/general/halfSizePhaseSpace", this);
57  phaseSpaceHalfSize->SetDefaultUnit("mm");
58  phaseSpaceHalfSize->SetDefaultValue(G4ThreeVector(100.,100.,1.));
59  phaseSpaceHalfSize->SetGuidance("half size of the plane phase space");
60  CInputData->setPhaseSpaceHalfSize(G4ThreeVector(100.*mm,100.*mm,1.*mm));
61 
62  bSavePhaseSpace=new G4UIcmdWithABool("/general/bSavePhaseSpace",this);
63  bSavePhaseSpace->SetDefaultValue(false);
64  bSavePhaseSpace->SetGuidance("true if to save the phase space");
65  CInputData->setbSavePhaseSPace(false);
66 
67  bForcePhaseSpaceBeforeJaws=new G4UIcmdWithABool("/general/bForcePhaseSpaceBeforeJaws",this);
68  bForcePhaseSpaceBeforeJaws->SetDefaultValue(false);
69  bForcePhaseSpaceBeforeJaws->SetGuidance("to automatically put the phase plane before the jaws");
70  CInputData->setbForcePhaseSpaceBeforeJaws(false);
71 
72  bStopAtPhaseSpace=new G4UIcmdWithABool("/general/bStopAtPhaseSpace",this);
73  bStopAtPhaseSpace->SetDefaultValue(false);
74  bStopAtPhaseSpace->SetGuidance("true if to kill the particle at the phase space");
75  CInputData->setbStopAtPhaseSpace(false);
76 
77  bSaveROG=new G4UIcmdWithABool("/general/bSaveROG",this);
78  bSaveROG->SetDefaultValue(true);
79  bSaveROG->SetGuidance("true if save the ROG volume");
80  CInputData->setbSaveROG(true);
81 
82  bOnlyVisio=new G4UIcmdWithABool("/OnlyVisio",this);
83  bOnlyVisio->SetDefaultValue(false);
84  bOnlyVisio->SetGuidance("switch the visualization mode");
85  CInputData->setbOnlyVisio(false);
86 
87  ROGOutFile=new G4UIcmdWithAString("/general/ROGOutFile",this);
88  ROGOutFile->SetDefaultValue("");
89  ROGOutFile->SetGuidance("full path of the ROG file name");
90  CInputData->setROGOutFile("defaultROGFile.txt");
91 
92  phaseSPaceOutFile=new G4UIcmdWithAString("/general/PhaseSpaceOutFile",this);
93  phaseSPaceOutFile->SetDefaultValue("");
94  phaseSPaceOutFile->SetGuidance("full file name of the phase space");
95  CInputData->setPhaseSpaceOutFile("");
96 
97  maxNumberOfEvents=new G4UIcmdWithAnInteger("/convergence/maxNumberOfEvents", this);
98  maxNumberOfEvents->SetDefaultValue(10);
99  maxNumberOfEvents->SetGuidance(" maximum number of events at least in one experimental voxel");
100  CInputData->setMaxNumberOfEvents(10);
101 
102  nMaxLoop=new G4UIcmdWithAnInteger("/convergence/nMaxLoop", this);
103  nMaxLoop->SetDefaultValue(1);
104  nMaxLoop->SetGuidance("it is used if /convergence/bCompareExp is false");
105  CInputData->setNmaxLoop(1);
106 
107  bCompareExp=new G4UIcmdWithABool("/convergence/bCompareExp",this);
108  bCompareExp->SetDefaultValue(false);
109  bCompareExp->SetGuidance("to compare the data with an experimental file data");
110  CInputData->setBCompareExp(false);
111 
112  fileExperimentalData=new G4UIcmdWithAString("/convergence/fileExperimentalData",this);
113  fileExperimentalData->SetDefaultValue("");
114  fileExperimentalData->SetGuidance("full path and name of the experimental file results");
115  CInputData->setFileExperimentalData("");
116 
117  fileExperimentalDataOut=new G4UIcmdWithAString("/convergence/fileExperimentalDataOut",this);
118  fileExperimentalDataOut->SetDefaultValue("");
119  fileExperimentalDataOut->SetGuidance("full path and name of the experimental file results");
120  CInputData->setFileExperimentalDataOut("");
121 
122  nBeam=new G4UIcmdWithAnInteger("/general/nBeam",this);
123  nBeam->SetDefaultValue(100);
124  nBeam->SetGuidance("number of events to run");
125  CInputData->setNBeams(100);
126 
127  nMaxParticlesInRamPlanePhaseSpace=new G4UIcmdWithAnInteger("/general/nMaxParticlesInRamPlanePhaseSpace",this);
128  nMaxParticlesInRamPlanePhaseSpace->SetDefaultValue(10000);
129  nMaxParticlesInRamPlanePhaseSpace->SetGuidance("maximum particle number stored in RAM before saving - for phase space");
130  CInputData->setNMaxParticlesInRamPlanePhaseSpace(10000);
131 
132  saving_in_Selected_Voxels_every_events=new G4UIcmdWithAnInteger("/general/saving_in_Selected_Voxels_every_events",this);
133  saving_in_Selected_Voxels_every_events->SetDefaultValue(10000);
134  saving_in_Selected_Voxels_every_events->SetGuidance("maximum particle number stored before saving - for experiemntal data comparison");
136 
137  saving_in_ROG_Voxels_every_events=new G4UIcmdWithAnInteger("/general/saving_in_ROG_Voxels_every_events",this);
138  saving_in_ROG_Voxels_every_events->SetDefaultValue(1000);
139  saving_in_ROG_Voxels_every_events->SetGuidance("maximum particle number stored before saving - for ROG");
140  CInputData->setSaving_in_ROG_Voxels_every_events(1000);
141 
142  max_N_particles_in_PhSp_File=new G4UIcmdWithAnInteger("/general/max_N_particles_in_PhSp_File",this);
143  max_N_particles_in_PhSp_File->SetDefaultValue(1000);
144  max_N_particles_in_PhSp_File->SetGuidance("maximum particle number stored in the phase space file");
145  CInputData->setMax_N_particles_in_PhSp_File(1000);
146 }
void setNMaxParticlesInRamPlanePhaseSpace(G4int val)
static constexpr double mm
Definition: G4SIunits.hh:115
void setPhaseSpaceCentre(G4ThreeVector val)
void setSaving_in_ROG_Voxels_every_events(G4int val)
CLHEP::Hep3Vector G4ThreeVector
void SetDefaultUnit(const char *defUnit)
void setbForcePhaseSpaceBeforeJaws(G4bool val)
void setFileExperimentalDataOut(G4String val)
void setMaxNumberOfEvents(G4int val)
void setbStopAtPhaseSpace(G4bool val)
void SetDefaultValue(G4bool defVal)
void setFileExperimentalData(G4String val)
void setbSaveROG(G4bool val)
void setPhaseSpaceHalfSize(G4ThreeVector val)
void setMax_N_particles_in_PhSp_File(G4int val)
void setBCompareExp(G4bool val)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void setNBeams(G4int val)
void setROGOutFile(G4String val)
void SetDefaultValue(G4ThreeVector defVal)
void setPhaseSpaceOutFile(G4String val)
void SetDefaultValue(const char *defVal)
void setbSavePhaseSPace(G4bool val)
void setNmaxLoop(G4int val)
void SetDefaultValue(G4int defVal)
void setSaving_in_Selected_Voxels_every_events(G4int val)
void setbOnlyVisio(G4bool val)

Here is the call graph for this function:

CML2MainMessenger::~CML2MainMessenger ( void  )

Definition at line 148 of file ML2MainMessenger.cc.

149 {
150  delete saving_in_Selected_Voxels_every_events;
151  delete saving_in_ROG_Voxels_every_events;
152  delete max_N_particles_in_PhSp_File;
153  delete phaseSpaceCentre;
154  delete phaseSpaceHalfSize;
155  delete phaseSPaceOutFile;
156  delete ROGOutFile;
157  delete bSavePhaseSpace;
158  delete bForcePhaseSpaceBeforeJaws;
159  delete bStopAtPhaseSpace;
160  delete bSaveROG;
161 
162  delete nBeam;
163  delete nMaxParticlesInRamPlanePhaseSpace;
164 
165  delete maxNumberOfEvents;
166  delete bCompareExp;
167  delete bOnlyVisio;
168  delete fileExperimentalData;
169  delete fileExperimentalDataOut;
170  delete nMaxLoop;
171 }

Member Function Documentation

void CML2MainMessenger::SetNewValue ( G4UIcommand cmd,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 173 of file ML2MainMessenger.cc.

174 {
175  if (cmd==nBeam)
176  {CInputData->setNBeams(nBeam->GetNewIntValue(newValue));}
177 
178  if (cmd==nMaxParticlesInRamPlanePhaseSpace)
179  {CInputData->setNMaxParticlesInRamPlanePhaseSpace(nMaxParticlesInRamPlanePhaseSpace->GetNewIntValue(newValue));}
180 
181  if (cmd==saving_in_Selected_Voxels_every_events)
182  {CInputData->setSaving_in_Selected_Voxels_every_events(saving_in_Selected_Voxels_every_events->GetNewIntValue(newValue));}
183 
184  if (cmd==saving_in_ROG_Voxels_every_events)
185  {CInputData->setSaving_in_ROG_Voxels_every_events(saving_in_ROG_Voxels_every_events->GetNewIntValue(newValue));}
186 
187  if (cmd==max_N_particles_in_PhSp_File)
188  {CInputData->setMax_N_particles_in_PhSp_File(max_N_particles_in_PhSp_File->GetNewIntValue(newValue));}
189 
190  if (cmd==phaseSpaceCentre)
191  {CInputData->setPhaseSpaceCentre(phaseSpaceCentre->GetNew3VectorRawValue(newValue));}
192 
193  if (cmd==phaseSpaceHalfSize)
194  {
195  CInputData->setPhaseSpaceHalfSize(phaseSpaceHalfSize->GetNew3VectorRawValue(newValue));
196  }
197 
198  if (cmd==bOnlyVisio)
199  {CInputData->setbOnlyVisio(bOnlyVisio->GetNewBoolValue(newValue));}
200 
201  if (cmd==bForcePhaseSpaceBeforeJaws)
202  {CInputData->setbForcePhaseSpaceBeforeJaws(bForcePhaseSpaceBeforeJaws->GetNewBoolValue(newValue));}
203 
204  if (cmd==bSavePhaseSpace)
205  {CInputData->setbSavePhaseSPace(bSavePhaseSpace->GetNewBoolValue(newValue));}
206 
207  if (cmd==bSaveROG)
208  {CInputData->setbSaveROG(bSaveROG->GetNewBoolValue(newValue));}
209 
210  if (cmd==bStopAtPhaseSpace)
211  {CInputData->setbStopAtPhaseSpace(bStopAtPhaseSpace->GetNewBoolValue(newValue));}
212 
213  if (cmd==phaseSPaceOutFile)
214  {CInputData->setPhaseSpaceOutFile(newValue);}
215 
216  if (cmd==ROGOutFile)
217  {CInputData->setROGOutFile(newValue);}
218 
219  if (cmd==maxNumberOfEvents)
220  {CInputData->setMaxNumberOfEvents(maxNumberOfEvents->GetNewIntValue(newValue));}
221 
222  if (cmd==nMaxLoop)
223  {CInputData->setNmaxLoop(nMaxLoop->GetNewIntValue(newValue));}
224 
225  if (cmd==bCompareExp)
226  {CInputData->setBCompareExp(bCompareExp->GetNewBoolValue(newValue));}
227 
228  if (cmd==fileExperimentalData)
229  {CInputData->setFileExperimentalData(newValue);}
230 
231  if (cmd==fileExperimentalDataOut)
232  {CInputData->setFileExperimentalDataOut(newValue);}
233 }
void setNMaxParticlesInRamPlanePhaseSpace(G4int val)
void setPhaseSpaceCentre(G4ThreeVector val)
void setSaving_in_ROG_Voxels_every_events(G4int val)
static G4int GetNewIntValue(const char *paramString)
void setbForcePhaseSpaceBeforeJaws(G4bool val)
void setFileExperimentalDataOut(G4String val)
void setMaxNumberOfEvents(G4int val)
static G4bool GetNewBoolValue(const char *paramString)
void setbStopAtPhaseSpace(G4bool val)
void setFileExperimentalData(G4String val)
void setbSaveROG(G4bool val)
void setPhaseSpaceHalfSize(G4ThreeVector val)
void setMax_N_particles_in_PhSp_File(G4int val)
void setBCompareExp(G4bool val)
void setNBeams(G4int val)
void setROGOutFile(G4String val)
void setPhaseSpaceOutFile(G4String val)
void setbSavePhaseSPace(G4bool val)
void setNmaxLoop(G4int val)
void setSaving_in_Selected_Voxels_every_events(G4int val)
static G4ThreeVector GetNew3VectorRawValue(const char *paramString)
void setbOnlyVisio(G4bool val)

Here is the call graph for this function:


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