Geant4  10.02.p03
Em10DetectorMessenger Class Reference

#include <Em10DetectorMessenger.hh>

Inheritance diagram for Em10DetectorMessenger:
Collaboration diagram for Em10DetectorMessenger:

Public Member Functions

 Em10DetectorMessenger (Em10DetectorConstruction *)
 
 ~Em10DetectorMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 
void SetNewValue (G4UIcommand *, G4int)
 
- 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

Em10DetectorConstructionEm10Detector
 
G4UIdirectoryEm10detDir
 
G4UIcmdWithAnIntegerModelCmd
 
G4UIcmdWithAnIntegerFoilNumCmd
 
G4UIcmdWithAStringAbsMaterCmd
 
G4UIcmdWithAStringDetectorSetUpCmd
 
G4UIcmdWithADoubleAndUnitAbsThickCmd
 
G4UIcmdWithADoubleAndUnitAbsRadCmd
 
G4UIcmdWithAStringRadiatorMaterCmd
 
G4UIcmdWithADoubleAndUnitRadiatorThickCmd
 
G4UIcmdWithADoubleAndUnitGasGapThickCmd
 
G4UIcmdWithADoubleAndUnitAbsZposCmd
 
G4UIcmdWithAStringWorldMaterCmd
 
G4UIcmdWithADoubleAndUnitWorldZCmd
 
G4UIcmdWithADoubleAndUnitWorldRCmd
 
G4UIcmdWithADoubleAndUnitMagFieldCmd
 
G4UIcmdWithoutParameterUpdateCmd
 

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 51 of file Em10DetectorMessenger.hh.

Constructor & Destructor Documentation

◆ Em10DetectorMessenger()

Em10DetectorMessenger::Em10DetectorMessenger ( Em10DetectorConstruction Em10Det)

Definition at line 45 of file Em10DetectorMessenger.cc.

46 :G4UImessenger(),
47  Em10Detector(Em10Det)
48 {
49  Em10detDir = new G4UIdirectory("/XTRdetector/");
50  Em10detDir->SetGuidance("Em10 detector control.");
51 
52  AbsMaterCmd = new G4UIcmdWithAString("/XTRdetector/setAbsMat",this);
53  AbsMaterCmd->SetGuidance("Select Material of the Absorber.");
54  AbsMaterCmd->SetParameterName("choice",true);
57 
58  RadiatorMaterCmd = new G4UIcmdWithAString("/XTRdetector/setRadMat",this);
59  RadiatorMaterCmd->SetGuidance("Select Material of the XTR radiator.");
60  RadiatorMaterCmd->SetParameterName("choice",true);
63 
64  DetectorSetUpCmd = new G4UIcmdWithAString("/XTRdetector/setup",this);
65  DetectorSetUpCmd->SetGuidance("Select setup for comparison with experiment");
66  DetectorSetUpCmd->SetParameterName("choice",true);
67  DetectorSetUpCmd->SetDefaultValue("simpleALICE");
69 
70  ModelCmd = new G4UIcmdWithAnInteger("/XTRdetector/setModel",this);
71  ModelCmd->SetGuidance("Select Model for XTR");
72  ModelCmd->SetParameterName("choice",true);
74  // ModelCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
76 
77  FoilNumCmd = new G4UIcmdWithAnInteger("/XTRdetector/setFoilNum",this);
78  FoilNumCmd->SetGuidance("Select foil number for XTR");
79  FoilNumCmd->SetParameterName("choice",true);
82 
83  WorldMaterCmd = new G4UIcmdWithAString("/XTRdetector/setWorldMat",this);
84  WorldMaterCmd->SetGuidance("Select Material of the World.");
85  WorldMaterCmd->SetParameterName("wchoice",true);
88 
89  AbsThickCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setAbsThick",this);
90  AbsThickCmd->SetGuidance("Set Thickness of the Absorber");
91  AbsThickCmd->SetParameterName("SizeZ",false,false);
93  AbsThickCmd->SetRange("SizeZ>0.");
95 
96  RadiatorThickCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setRadThick",this);
97  RadiatorThickCmd->SetGuidance("Set Thickness of XTR radiator");
98  RadiatorThickCmd->SetParameterName("SizeZ",false,false);
100  RadiatorThickCmd->SetRange("SizeZ>0.");
102 
103  GasGapThickCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setGasGapThick",this);
104  GasGapThickCmd->SetGuidance("Set Thickness of XTR gas gaps");
105  GasGapThickCmd->SetParameterName("SizeZ",false,false);
107  GasGapThickCmd->SetRange("SizeZ>0.");
109 
110  AbsRadCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setAbsRad",this);
111  AbsRadCmd->SetGuidance("Set radius of the Absorber");
112  AbsRadCmd->SetParameterName("SizeR",false,false);
113  AbsRadCmd->SetDefaultUnit("mm");
114  AbsRadCmd->SetRange("SizeR>0.");
116 
117  AbsZposCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setAbsZpos",this);
118  AbsZposCmd->SetGuidance("Set Z pos. of the Absorber");
119  AbsZposCmd->SetParameterName("Zpos",false,false);
120  AbsZposCmd->SetDefaultUnit("mm");
122 
123  WorldZCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setWorldZ",this);
124  WorldZCmd->SetGuidance("Set Z size of the World");
125  WorldZCmd->SetParameterName("WSizeZ",false,false);
126  WorldZCmd->SetDefaultUnit("mm");
127  WorldZCmd->SetRange("WSizeZ>0.");
129 
130  WorldRCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setWorldR",this);
131  WorldRCmd->SetGuidance("Set R size of the World");
132  WorldRCmd->SetParameterName("WSizeR",false,false);
133  WorldRCmd->SetDefaultUnit("mm");
134  WorldRCmd->SetRange("WSizeR>0.");
136 
137  UpdateCmd = new G4UIcmdWithoutParameter("/XTRdetector/update",this);
138  UpdateCmd->SetGuidance("Update calorimeter geometry.");
139  UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
140  UpdateCmd->SetGuidance("if you changed geometrical value(s).");
142 
143  MagFieldCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setField",this);
144  MagFieldCmd->SetGuidance("Define magnetic field.");
145  MagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
146  MagFieldCmd->SetParameterName("Bz",false,false);
147  MagFieldCmd->SetDefaultUnit("tesla");
149  /*
150  ElectronCutCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setElectronCut",this);
151  ElectronCutCmd->SetGuidance("Set electron cut in mm for vertex region");
152  ElectronCutCmd->SetParameterName("ElectronCut",false,false);
153  ElectronCutCmd->SetDefaultUnit("mm");
154  ElectronCutCmd->SetRange("ElectronCut>0.");
155  ElectronCutCmd->AvailableForStates(G4State_Idle);
156 
157 
158  PositronCutCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setPositronCut",this);
159  PositronCutCmd->SetGuidance("Set positron cut in mm for vertex region");
160  PositronCutCmd->SetParameterName("PositronCut",false,false);
161  PositronCutCmd->SetDefaultUnit("mm");
162  PositronCutCmd->SetRange("PositronCut>0.");
163  PositronCutCmd->AvailableForStates(G4State_Idle);
164 
165 
166  GammaCutCmd = new G4UIcmdWithADoubleAndUnit("/XTRdetector/setGammaCut",this);
167  GammaCutCmd->SetGuidance("Set gamma cut in mm for vertex region");
168  GammaCutCmd->SetParameterName("GammaCut",false,false);
169  GammaCutCmd->SetDefaultUnit("mm");
170  GammaCutCmd->SetRange("GammaCut>0.");
171  GammaCutCmd->AvailableForStates(G4State_Idle);
172  */
173 
174 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
Em10DetectorConstruction * Em10Detector
G4UIcmdWithADoubleAndUnit * GasGapThickCmd
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADoubleAndUnit * RadiatorThickCmd
G4UIcmdWithoutParameter * UpdateCmd
G4UIcmdWithADoubleAndUnit * AbsRadCmd
G4UIcmdWithAString * DetectorSetUpCmd
G4UIcmdWithADoubleAndUnit * WorldZCmd
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
G4UIcmdWithAnInteger * ModelCmd
G4UIcmdWithADoubleAndUnit * MagFieldCmd
G4UIcmdWithADoubleAndUnit * AbsThickCmd
G4UIcmdWithAString * WorldMaterCmd
void SetDefaultValue(const char *defVal)
G4UIcmdWithAnInteger * FoilNumCmd
void SetDefaultUnit(const char *defUnit)
G4UIcmdWithAString * RadiatorMaterCmd
void SetDefaultValue(G4int defVal)
G4UIcmdWithADoubleAndUnit * WorldRCmd
G4UIcmdWithAString * AbsMaterCmd
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADoubleAndUnit * AbsZposCmd
Here is the call graph for this function:

◆ ~Em10DetectorMessenger()

Em10DetectorMessenger::~Em10DetectorMessenger ( )

Definition at line 178 of file Em10DetectorMessenger.cc.

179 {
180  delete AbsMaterCmd;
181  delete ModelCmd;
182  delete FoilNumCmd;
183  delete AbsThickCmd;
184  delete RadiatorThickCmd;
185  delete GasGapThickCmd;
186  delete AbsRadCmd;
187  delete AbsZposCmd;
188  delete WorldMaterCmd;
189  delete RadiatorMaterCmd;
190  delete WorldZCmd;
191  delete WorldRCmd;
192  delete UpdateCmd;
193  delete MagFieldCmd;
194  delete Em10detDir;
195 }
G4UIcmdWithADoubleAndUnit * GasGapThickCmd
G4UIcmdWithADoubleAndUnit * RadiatorThickCmd
G4UIcmdWithoutParameter * UpdateCmd
G4UIcmdWithADoubleAndUnit * AbsRadCmd
G4UIcmdWithADoubleAndUnit * WorldZCmd
G4UIcmdWithAnInteger * ModelCmd
G4UIcmdWithADoubleAndUnit * MagFieldCmd
G4UIcmdWithADoubleAndUnit * AbsThickCmd
G4UIcmdWithAString * WorldMaterCmd
G4UIcmdWithAnInteger * FoilNumCmd
G4UIcmdWithAString * RadiatorMaterCmd
G4UIcmdWithADoubleAndUnit * WorldRCmd
G4UIcmdWithAString * AbsMaterCmd
G4UIcmdWithADoubleAndUnit * AbsZposCmd

Member Function Documentation

◆ SetNewValue() [1/2]

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

Reimplemented from G4UImessenger.

Definition at line 211 of file Em10DetectorMessenger.cc.

212 {
213  if( command == ModelCmd )
214  {
215  // Em10Detector->SetParametrisationModel(ModelCmd->GetNewIntValue(newValue));
216  // Em10Detector->ParametrisationModel();
217  }
218  if( command == FoilNumCmd )
219  {
221  }
222  if( command == AbsMaterCmd )
223  { Em10Detector->SetAbsorberMaterial(newValue);}
224 
225  if( command == DetectorSetUpCmd )
226  { Em10Detector->SetDetectorSetUp(newValue);}
227 
228  if( command == RadiatorMaterCmd )
229  { Em10Detector->SetRadiatorMaterial(newValue);}
230 
231  if( command == WorldMaterCmd )
232  { Em10Detector->SetWorldMaterial(newValue);}
233 
234  if( command == AbsThickCmd )
236 
237  if( command == RadiatorThickCmd )
239  GetNewDoubleValue(newValue));}
240 
241  if( command == GasGapThickCmd )
243  GetNewDoubleValue(newValue));}
244 
245  if( command == AbsRadCmd )
247 
248  if( command == AbsZposCmd )
250 
251  if( command == WorldZCmd )
253 
254  if( command == WorldRCmd )
256 
257  if( command == UpdateCmd )
259 
260  if( command == MagFieldCmd )
262  /*
263  if( command == ElectronCutCmd )
264  {
265  Em10Detector->SetElectronCut(WorldRCmd->GetNewDoubleValue(newValue));
266  }
267  if( command == PositronCutCmd )
268  {
269  Em10Detector->SetPositronCut(WorldRCmd->GetNewDoubleValue(newValue));
270  }
271  if( command == GammaCutCmd )
272  {
273  Em10Detector->SetGammaCut(WorldRCmd->GetNewDoubleValue(newValue));
274  }
275  */
276 }
Em10DetectorConstruction * Em10Detector
G4UIcmdWithADoubleAndUnit * GasGapThickCmd
static G4int GetNewIntValue(const char *paramString)
G4UIcmdWithADoubleAndUnit * RadiatorThickCmd
G4UIcmdWithoutParameter * UpdateCmd
G4UIcmdWithADoubleAndUnit * AbsRadCmd
static G4double GetNewDoubleValue(const char *paramString)
G4UIcmdWithAString * DetectorSetUpCmd
G4UIcmdWithADoubleAndUnit * WorldZCmd
G4UIcmdWithAnInteger * ModelCmd
G4UIcmdWithADoubleAndUnit * MagFieldCmd
G4UIcmdWithADoubleAndUnit * AbsThickCmd
G4UIcmdWithAString * WorldMaterCmd
G4UIcmdWithAnInteger * FoilNumCmd
G4UIcmdWithAString * RadiatorMaterCmd
G4UIcmdWithADoubleAndUnit * WorldRCmd
G4UIcmdWithAString * AbsMaterCmd
G4UIcmdWithADoubleAndUnit * AbsZposCmd
Here is the call graph for this function:

◆ SetNewValue() [2/2]

void Em10DetectorMessenger::SetNewValue ( G4UIcommand command,
G4int  newValue 
)

Definition at line 199 of file Em10DetectorMessenger.cc.

200 {
201  if( command == ModelCmd && newValue == 0 )
202  {
203  // Em10Detector->SetParametrisationModel(newValue);
205  }
206 }
Em10DetectorConstruction * Em10Detector
G4UIcmdWithAnInteger * ModelCmd
Here is the call graph for this function:

Member Data Documentation

◆ AbsMaterCmd

G4UIcmdWithAString* Em10DetectorMessenger::AbsMaterCmd
private

Definition at line 68 of file Em10DetectorMessenger.hh.

◆ AbsRadCmd

G4UIcmdWithADoubleAndUnit* Em10DetectorMessenger::AbsRadCmd
private

Definition at line 71 of file Em10DetectorMessenger.hh.

◆ AbsThickCmd

G4UIcmdWithADoubleAndUnit* Em10DetectorMessenger::AbsThickCmd
private

Definition at line 70 of file Em10DetectorMessenger.hh.

◆ AbsZposCmd

G4UIcmdWithADoubleAndUnit* Em10DetectorMessenger::AbsZposCmd
private

Definition at line 78 of file Em10DetectorMessenger.hh.

◆ DetectorSetUpCmd

G4UIcmdWithAString* Em10DetectorMessenger::DetectorSetUpCmd
private

Definition at line 69 of file Em10DetectorMessenger.hh.

◆ Em10detDir

G4UIdirectory* Em10DetectorMessenger::Em10detDir
private

Definition at line 63 of file Em10DetectorMessenger.hh.

◆ Em10Detector

Em10DetectorConstruction* Em10DetectorMessenger::Em10Detector
private

Definition at line 61 of file Em10DetectorMessenger.hh.

◆ FoilNumCmd

G4UIcmdWithAnInteger* Em10DetectorMessenger::FoilNumCmd
private

Definition at line 66 of file Em10DetectorMessenger.hh.

◆ GasGapThickCmd

G4UIcmdWithADoubleAndUnit* Em10DetectorMessenger::GasGapThickCmd
private

Definition at line 76 of file Em10DetectorMessenger.hh.

◆ MagFieldCmd

G4UIcmdWithADoubleAndUnit* Em10DetectorMessenger::MagFieldCmd
private

Definition at line 84 of file Em10DetectorMessenger.hh.

◆ ModelCmd

G4UIcmdWithAnInteger* Em10DetectorMessenger::ModelCmd
private

Definition at line 65 of file Em10DetectorMessenger.hh.

◆ RadiatorMaterCmd

G4UIcmdWithAString* Em10DetectorMessenger::RadiatorMaterCmd
private

Definition at line 73 of file Em10DetectorMessenger.hh.

◆ RadiatorThickCmd

G4UIcmdWithADoubleAndUnit* Em10DetectorMessenger::RadiatorThickCmd
private

Definition at line 74 of file Em10DetectorMessenger.hh.

◆ UpdateCmd

G4UIcmdWithoutParameter* Em10DetectorMessenger::UpdateCmd
private

Definition at line 85 of file Em10DetectorMessenger.hh.

◆ WorldMaterCmd

G4UIcmdWithAString* Em10DetectorMessenger::WorldMaterCmd
private

Definition at line 80 of file Em10DetectorMessenger.hh.

◆ WorldRCmd

G4UIcmdWithADoubleAndUnit* Em10DetectorMessenger::WorldRCmd
private

Definition at line 82 of file Em10DetectorMessenger.hh.

◆ WorldZCmd

G4UIcmdWithADoubleAndUnit* Em10DetectorMessenger::WorldZCmd
private

Definition at line 81 of file Em10DetectorMessenger.hh.


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