Geant4  10.02.p03
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
 

Private Attributes

CML2CInputDataCInputData
 
G4UIcmdWith3VectorAndUnitphaseSpaceCentre
 
G4UIcmdWith3VectorAndUnitphaseSpaceHalfSize
 
G4UIcmdWithAStringphaseSPaceOutFile
 
G4UIcmdWithAStringROGOutFile
 
G4UIcmdWithABoolbSavePhaseSpace
 
G4UIcmdWithABoolbStopAtPhaseSpace
 
G4UIcmdWithABoolbSaveROG
 
G4UIcmdWithABoolbForcePhaseSpaceBeforeJaws
 
G4UIcmdWithAnIntegernBeam
 
G4UIcmdWithAnIntegernMaxParticlesInRamPlanePhaseSpace
 
G4UIcmdWithAnIntegermaxNumberOfEvents
 
G4UIcmdWithABoolbCompareExp
 
G4UIcmdWithABoolbOnlyVisio
 
G4UIcmdWithAStringfileExperimentalData
 
G4UIcmdWithAStringfileExperimentalDataOut
 
G4UIcmdWithAnIntegersaving_in_Selected_Voxels_every_events
 
G4UIcmdWithAnIntegersaving_in_ROG_Voxels_every_events
 
G4UIcmdWithAnIntegermax_N_particles_in_PhSp_File
 
G4UIcmdWithAnIntegernMaxLoop
 

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::CML2MainMessenger ( CML2CInputData CInputData)

Definition at line 46 of file ML2MainMessenger.cc.

47 {
48 
49  CInputData=InData;
50  phaseSpaceCentre=new G4UIcmdWith3VectorAndUnit("/general/centrePhaseSpace", this);
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);
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);
64  bSavePhaseSpace->SetGuidance("true if to save the phase space");
65  CInputData->setbSavePhaseSPace(false);
66 
67  bForcePhaseSpaceBeforeJaws=new G4UIcmdWithABool("/general/bForcePhaseSpaceBeforeJaws",this);
69  bForcePhaseSpaceBeforeJaws->SetGuidance("to automatically put the phase plane before the jaws");
70  CInputData->setbForcePhaseSpaceBeforeJaws(false);
71 
72  bStopAtPhaseSpace=new G4UIcmdWithABool("/general/bStopAtPhaseSpace",this);
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);
79  bSaveROG->SetGuidance("true if save the ROG volume");
80  CInputData->setbSaveROG(true);
81 
82  bOnlyVisio=new G4UIcmdWithABool("/OnlyVisio",this);
84  bOnlyVisio->SetGuidance("switch the visualization mode");
85  CInputData->setbOnlyVisio(false);
86 
87  ROGOutFile=new G4UIcmdWithAString("/general/ROGOutFile",this);
89  ROGOutFile->SetGuidance("full path of the ROG file name");
90  CInputData->setROGOutFile("defaultROGFile.txt");
91 
92  phaseSPaceOutFile=new G4UIcmdWithAString("/general/PhaseSpaceOutFile",this);
94  phaseSPaceOutFile->SetGuidance("full file name of the phase space");
95  CInputData->setPhaseSpaceOutFile("");
96 
97  maxNumberOfEvents=new G4UIcmdWithAnInteger("/convergence/maxNumberOfEvents", this);
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);
104  nMaxLoop->SetGuidance("it is used if /convergence/bCompareExp is false");
105  CInputData->setNmaxLoop(1);
106 
107  bCompareExp=new G4UIcmdWithABool("/convergence/bCompareExp",this);
109  bCompareExp->SetGuidance("to compare the data with an experimental file data");
110  CInputData->setBCompareExp(false);
111 
112  fileExperimentalData=new G4UIcmdWithAString("/convergence/fileExperimentalData",this);
114  fileExperimentalData->SetGuidance("full path and name of the experimental file results");
115  CInputData->setFileExperimentalData("");
116 
117  fileExperimentalDataOut=new G4UIcmdWithAString("/convergence/fileExperimentalDataOut",this);
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);
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);
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);
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);
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)
G4UIcmdWithABool * bCompareExp
void setPhaseSpaceCentre(G4ThreeVector val)
void setSaving_in_ROG_Voxels_every_events(G4int val)
G4UIcmdWithABool * bForcePhaseSpaceBeforeJaws
CLHEP::Hep3Vector G4ThreeVector
G4UIcmdWith3VectorAndUnit * phaseSpaceHalfSize
G4UIcmdWithAnInteger * max_N_particles_in_PhSp_File
G4UIcmdWithABool * bOnlyVisio
void SetDefaultUnit(const char *defUnit)
G4UIcmdWithABool * bSavePhaseSpace
G4UIcmdWithAString * fileExperimentalDataOut
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)
G4UIcmdWithAnInteger * nBeam
void setMax_N_particles_in_PhSp_File(G4int val)
void setBCompareExp(G4bool val)
G4UIcmdWithAString * phaseSPaceOutFile
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
G4UIcmdWithAnInteger * saving_in_Selected_Voxels_every_events
G4UIcmdWithAnInteger * saving_in_ROG_Voxels_every_events
G4UIcmdWithABool * bStopAtPhaseSpace
G4UIcmdWithABool * bSaveROG
void setNBeams(G4int val)
void setROGOutFile(G4String val)
void SetDefaultValue(G4ThreeVector defVal)
G4UIcmdWithAString * ROGOutFile
void setPhaseSpaceOutFile(G4String val)
void SetDefaultValue(const char *defVal)
G4UIcmdWithAnInteger * nMaxParticlesInRamPlanePhaseSpace
void setbSavePhaseSPace(G4bool val)
void setNmaxLoop(G4int val)
G4UIcmdWith3VectorAndUnit * phaseSpaceCentre
G4UIcmdWithAnInteger * maxNumberOfEvents
void SetDefaultValue(G4int defVal)
void setSaving_in_Selected_Voxels_every_events(G4int val)
G4UIcmdWithAnInteger * nMaxLoop
static const double mm
Definition: G4SIunits.hh:114
G4UIcmdWithAString * fileExperimentalData
void setbOnlyVisio(G4bool val)
Here is the call graph for this function:

◆ ~CML2MainMessenger()

CML2MainMessenger::~CML2MainMessenger ( void  )

Definition at line 148 of file ML2MainMessenger.cc.

149 {
153  delete phaseSpaceCentre;
154  delete phaseSpaceHalfSize;
155  delete phaseSPaceOutFile;
156  delete ROGOutFile;
157  delete bSavePhaseSpace;
159  delete bStopAtPhaseSpace;
160  delete bSaveROG;
161 
162  delete nBeam;
164 
165  delete maxNumberOfEvents;
166  delete bCompareExp;
167  delete bOnlyVisio;
168  delete fileExperimentalData;
170  delete nMaxLoop;
171 }
G4UIcmdWithABool * bCompareExp
G4UIcmdWithABool * bForcePhaseSpaceBeforeJaws
G4UIcmdWith3VectorAndUnit * phaseSpaceHalfSize
G4UIcmdWithAnInteger * max_N_particles_in_PhSp_File
G4UIcmdWithABool * bOnlyVisio
G4UIcmdWithABool * bSavePhaseSpace
G4UIcmdWithAString * fileExperimentalDataOut
G4UIcmdWithAnInteger * nBeam
G4UIcmdWithAString * phaseSPaceOutFile
G4UIcmdWithAnInteger * saving_in_Selected_Voxels_every_events
G4UIcmdWithAnInteger * saving_in_ROG_Voxels_every_events
G4UIcmdWithABool * bStopAtPhaseSpace
G4UIcmdWithABool * bSaveROG
G4UIcmdWithAString * ROGOutFile
G4UIcmdWithAnInteger * nMaxParticlesInRamPlanePhaseSpace
G4UIcmdWith3VectorAndUnit * phaseSpaceCentre
G4UIcmdWithAnInteger * maxNumberOfEvents
G4UIcmdWithAnInteger * nMaxLoop
G4UIcmdWithAString * fileExperimentalData

Member Function Documentation

◆ SetNewValue()

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 
180 
183 
186 
189 
190  if (cmd==phaseSpaceCentre)
192 
193  if (cmd==phaseSpaceHalfSize)
194  {
196  }
197 
198  if (cmd==bOnlyVisio)
200 
203 
204  if (cmd==bSavePhaseSpace)
206 
207  if (cmd==bSaveROG)
209 
210  if (cmd==bStopAtPhaseSpace)
212 
213  if (cmd==phaseSPaceOutFile)
214  {CInputData->setPhaseSpaceOutFile(newValue);}
215 
216  if (cmd==ROGOutFile)
217  {CInputData->setROGOutFile(newValue);}
218 
219  if (cmd==maxNumberOfEvents)
221 
222  if (cmd==nMaxLoop)
224 
225  if (cmd==bCompareExp)
227 
228  if (cmd==fileExperimentalData)
229  {CInputData->setFileExperimentalData(newValue);}
230 
231  if (cmd==fileExperimentalDataOut)
233 }
CML2CInputData * CInputData
void setNMaxParticlesInRamPlanePhaseSpace(G4int val)
G4UIcmdWithABool * bCompareExp
void setPhaseSpaceCentre(G4ThreeVector val)
void setSaving_in_ROG_Voxels_every_events(G4int val)
G4UIcmdWithABool * bForcePhaseSpaceBeforeJaws
G4UIcmdWith3VectorAndUnit * phaseSpaceHalfSize
static G4int GetNewIntValue(const char *paramString)
G4UIcmdWithAnInteger * max_N_particles_in_PhSp_File
G4UIcmdWithABool * bOnlyVisio
G4UIcmdWithABool * bSavePhaseSpace
G4UIcmdWithAString * fileExperimentalDataOut
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)
G4UIcmdWithAnInteger * nBeam
void setMax_N_particles_in_PhSp_File(G4int val)
void setBCompareExp(G4bool val)
G4UIcmdWithAString * phaseSPaceOutFile
G4UIcmdWithAnInteger * saving_in_Selected_Voxels_every_events
G4UIcmdWithAnInteger * saving_in_ROG_Voxels_every_events
G4UIcmdWithABool * bStopAtPhaseSpace
G4UIcmdWithABool * bSaveROG
void setNBeams(G4int val)
void setROGOutFile(G4String val)
G4UIcmdWithAString * ROGOutFile
void setPhaseSpaceOutFile(G4String val)
G4UIcmdWithAnInteger * nMaxParticlesInRamPlanePhaseSpace
void setbSavePhaseSPace(G4bool val)
void setNmaxLoop(G4int val)
G4UIcmdWith3VectorAndUnit * phaseSpaceCentre
G4UIcmdWithAnInteger * maxNumberOfEvents
void setSaving_in_Selected_Voxels_every_events(G4int val)
G4UIcmdWithAnInteger * nMaxLoop
static G4ThreeVector GetNew3VectorRawValue(const char *paramString)
G4UIcmdWithAString * fileExperimentalData
void setbOnlyVisio(G4bool val)
Here is the call graph for this function:

Member Data Documentation

◆ bCompareExp

G4UIcmdWithABool* CML2MainMessenger::bCompareExp
private

Definition at line 83 of file ML2MainMessenger.hh.

◆ bForcePhaseSpaceBeforeJaws

G4UIcmdWithABool * CML2MainMessenger::bForcePhaseSpaceBeforeJaws
private

Definition at line 80 of file ML2MainMessenger.hh.

◆ bOnlyVisio

G4UIcmdWithABool * CML2MainMessenger::bOnlyVisio
private

Definition at line 83 of file ML2MainMessenger.hh.

◆ bSavePhaseSpace

G4UIcmdWithABool* CML2MainMessenger::bSavePhaseSpace
private

Definition at line 80 of file ML2MainMessenger.hh.

◆ bSaveROG

G4UIcmdWithABool * CML2MainMessenger::bSaveROG
private

Definition at line 80 of file ML2MainMessenger.hh.

◆ bStopAtPhaseSpace

G4UIcmdWithABool * CML2MainMessenger::bStopAtPhaseSpace
private

Definition at line 80 of file ML2MainMessenger.hh.

◆ CInputData

CML2CInputData* CML2MainMessenger::CInputData
private

Definition at line 76 of file ML2MainMessenger.hh.

◆ fileExperimentalData

G4UIcmdWithAString* CML2MainMessenger::fileExperimentalData
private

Definition at line 84 of file ML2MainMessenger.hh.

◆ fileExperimentalDataOut

G4UIcmdWithAString * CML2MainMessenger::fileExperimentalDataOut
private

Definition at line 84 of file ML2MainMessenger.hh.

◆ max_N_particles_in_PhSp_File

G4UIcmdWithAnInteger* CML2MainMessenger::max_N_particles_in_PhSp_File
private

Definition at line 87 of file ML2MainMessenger.hh.

◆ maxNumberOfEvents

G4UIcmdWithAnInteger * CML2MainMessenger::maxNumberOfEvents
private

Definition at line 82 of file ML2MainMessenger.hh.

◆ nBeam

G4UIcmdWithAnInteger* CML2MainMessenger::nBeam
private

Definition at line 82 of file ML2MainMessenger.hh.

◆ nMaxLoop

G4UIcmdWithAnInteger * CML2MainMessenger::nMaxLoop
private

Definition at line 87 of file ML2MainMessenger.hh.

◆ nMaxParticlesInRamPlanePhaseSpace

G4UIcmdWithAnInteger * CML2MainMessenger::nMaxParticlesInRamPlanePhaseSpace
private

Definition at line 82 of file ML2MainMessenger.hh.

◆ phaseSpaceCentre

G4UIcmdWith3VectorAndUnit* CML2MainMessenger::phaseSpaceCentre
private

Definition at line 78 of file ML2MainMessenger.hh.

◆ phaseSpaceHalfSize

G4UIcmdWith3VectorAndUnit * CML2MainMessenger::phaseSpaceHalfSize
private

Definition at line 78 of file ML2MainMessenger.hh.

◆ phaseSPaceOutFile

G4UIcmdWithAString* CML2MainMessenger::phaseSPaceOutFile
private

Definition at line 79 of file ML2MainMessenger.hh.

◆ ROGOutFile

G4UIcmdWithAString * CML2MainMessenger::ROGOutFile
private

Definition at line 79 of file ML2MainMessenger.hh.

◆ saving_in_ROG_Voxels_every_events

G4UIcmdWithAnInteger* CML2MainMessenger::saving_in_ROG_Voxels_every_events
private

Definition at line 86 of file ML2MainMessenger.hh.

◆ saving_in_Selected_Voxels_every_events

G4UIcmdWithAnInteger* CML2MainMessenger::saving_in_Selected_Voxels_every_events
private

Definition at line 85 of file ML2MainMessenger.hh.


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