Geant4.10
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
WLSDetectorMessenger Class Reference

#include <WLSDetectorMessenger.hh>

Inheritance diagram for WLSDetectorMessenger:
G4UImessenger

Public Member Functions

 WLSDetectorMessenger (WLSDetectorConstruction *)
 
virtual ~WLSDetectorMessenger ()
 
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
 

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
 

Detailed Description

Definition at line 52 of file WLSDetectorMessenger.hh.

Constructor & Destructor Documentation

WLSDetectorMessenger::WLSDetectorMessenger ( WLSDetectorConstruction det)

Definition at line 44 of file WLSDetectorMessenger.cc.

References G4UIcommand::AvailableForStates(), G4State_Idle, G4State_PreInit, G4UIcmdWithAString::SetCandidates(), G4UIcmdWithADoubleAndUnit::SetDefaultUnit(), G4UIcommand::SetGuidance(), G4UIcmdWithADouble::SetParameterName(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcommand::SetRange(), G4UIcommand::SetToBeBroadcasted(), and G4UIcmdWithADoubleAndUnit::SetUnitCategory().

45  : fDetector(det)
46 {
47  fDetDir = new G4UIdirectory("/WLS/");
48  fDetDir->SetGuidance(" Geometry Setup ");
49 
50  SetPhotonDetGeometryCmd =
51  new G4UIcmdWithAString("/WLS/setPhotonDetGeometry",this);
52  SetPhotonDetGeometryCmd->
53  SetGuidance("Select the geometry of the PhotonDet detector");
54  SetPhotonDetGeometryCmd->SetGuidance("Only Accepts 'Circle' and 'Square'");
55  SetPhotonDetGeometryCmd->SetCandidates("Circle Square");
56  SetPhotonDetGeometryCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
57  SetPhotonDetGeometryCmd->SetToBeBroadcasted(false);
58 
59  SetNumOfCladLayersCmd = new G4UIcmdWithAnInteger("/WLS/setNumOfLayers", this);
60  SetNumOfCladLayersCmd->SetGuidance("Select the number of cladding layers");
61  SetNumOfCladLayersCmd->SetGuidance("Maximum number is 2");
62  SetNumOfCladLayersCmd->SetParameterName("numberOfLayers",false);
63  SetNumOfCladLayersCmd->SetRange("numberOfLayers>=0 && numberOfLayers<=2");
64  SetNumOfCladLayersCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
65  SetNumOfCladLayersCmd->SetToBeBroadcasted(false);
66 
67  SetSurfaceRoughnessCmd =
68  new G4UIcmdWithADouble("/WLS/setSurfaceRoughness", this);
69  SetSurfaceRoughnessCmd->
70  SetGuidance("Set the roughness between Clad1 and WLS Fiber");
71  SetSurfaceRoughnessCmd->SetParameterName("roughness",false);
72  SetSurfaceRoughnessCmd->SetRange("roughness>0 && roughness<=1");
73  SetSurfaceRoughnessCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
74  SetSurfaceRoughnessCmd->SetToBeBroadcasted(false);
75 
76  SetXYRatioCmd = new G4UIcmdWithADouble("/WLS/setXYRatio", this);
77  SetXYRatioCmd->SetGuidance("Set the ratio between x and y axis (x/y)");
78  SetXYRatioCmd->SetParameterName("ratio",false);
79  SetXYRatioCmd->SetRange("ratio>0 && ratio<=1");
81  SetXYRatioCmd->SetToBeBroadcasted(false);
82 
83  SetMirrorPolishCmd = new G4UIcmdWithADouble("/WLS/setMirrorPolish", this);
84  SetMirrorPolishCmd->SetGuidance("Set the polish of the mirror");
85  SetMirrorPolishCmd->SetParameterName("polish",false);
86  SetMirrorPolishCmd->SetRange("polish>0 && polish<=1");
87  SetMirrorPolishCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
88  SetMirrorPolishCmd->SetToBeBroadcasted(false);
89 
90  SetMirrorReflectivityCmd =
91  new G4UIcmdWithADouble("/WLS/setMirrorReflectivity", this);
92  SetMirrorReflectivityCmd->SetGuidance("Set the reflectivity of the mirror");
93  SetMirrorReflectivityCmd->SetParameterName("reflectivity",false);
94  SetMirrorReflectivityCmd->SetRange("reflectivity>=0 && reflectivity<=1");
95  SetMirrorReflectivityCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
96  SetMirrorReflectivityCmd->SetToBeBroadcasted(false);
97 
98  SetPhotonDetPolishCmd =
99  new G4UIcmdWithADouble("/WLS/setPhotonDetPolish", this);
100  SetPhotonDetPolishCmd->SetGuidance("Set the polish of the mirror");
101  SetPhotonDetPolishCmd->SetParameterName("polish",false);
102  SetPhotonDetPolishCmd->SetRange("polish>0 && polish<=1");
103  SetPhotonDetPolishCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
104  SetPhotonDetPolishCmd->SetToBeBroadcasted(false);
105 
106  SetPhotonDetReflectivityCmd =
107  new G4UIcmdWithADouble("/WLS/setPhotonDetReflectivity", this);
108  SetPhotonDetReflectivityCmd->
109  SetGuidance("Set the reflectivity of the mirror");
110  SetPhotonDetReflectivityCmd->SetParameterName("reflectivity",false);
111  SetPhotonDetReflectivityCmd->SetRange("reflectivity>=0 && reflectivity<=1");
112  SetPhotonDetReflectivityCmd->AvailableForStates(G4State_PreInit);
113  SetPhotonDetReflectivityCmd->SetToBeBroadcasted(false);
114 
115  SetWLSLengthCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setWLSLength",this);
116  SetWLSLengthCmd->SetGuidance("Set the half length of the WLS fiber");
117  SetWLSLengthCmd->SetParameterName("length",false);
118  SetWLSLengthCmd->SetRange("length>0.");
119  SetWLSLengthCmd->SetUnitCategory("Length");
120  SetWLSLengthCmd->SetDefaultUnit("mm");
122  SetWLSLengthCmd->SetToBeBroadcasted(false);
123 
124  SetWLSRadiusCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setWLSRadius",this);
125  SetWLSRadiusCmd->SetGuidance("Set the radius of the WLS fiber");
126  SetWLSRadiusCmd->SetParameterName("radius",false);
127  SetWLSRadiusCmd->SetRange("radius>0.");
128  SetWLSRadiusCmd->SetUnitCategory("Length");
129  SetWLSRadiusCmd->SetDefaultUnit("mm");
131  SetWLSRadiusCmd->SetToBeBroadcasted(false);
132 
133  SetClad1RadiusCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setClad1Radius",this);
134  SetClad1RadiusCmd->SetGuidance("Set the radius of Cladding 1");
135  SetClad1RadiusCmd->SetParameterName("radius",false);
136  SetClad1RadiusCmd->SetRange("radius>0.");
137  SetClad1RadiusCmd->SetUnitCategory("Length");
138  SetClad1RadiusCmd->SetDefaultUnit("mm");
139  SetClad1RadiusCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
140  SetClad1RadiusCmd->SetToBeBroadcasted(false);
141 
142  SetClad2RadiusCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setClad2Radius",this);
143  SetClad2RadiusCmd->SetGuidance("Set the radius of Cladding 2");
144  SetClad2RadiusCmd->SetParameterName("radius",false);
145  SetClad2RadiusCmd->SetRange("radius>0.");
146  SetClad2RadiusCmd->SetUnitCategory("Length");
147  SetClad2RadiusCmd->SetDefaultUnit("mm");
148  SetClad2RadiusCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
149  SetClad2RadiusCmd->SetToBeBroadcasted(false);
150 
151  SetPhotonDetHalfLengthCmd =
152  new G4UIcmdWithADoubleAndUnit("/WLS/setPhotonDetHalfLength",this);
153  SetPhotonDetHalfLengthCmd->
154  SetGuidance("Set the half length of PhotonDet detector");
155  SetPhotonDetHalfLengthCmd->SetParameterName("halfL",false);
156  SetPhotonDetHalfLengthCmd->SetRange("halfL>0.");
157  SetPhotonDetHalfLengthCmd->SetUnitCategory("Length");
158  SetPhotonDetHalfLengthCmd->SetDefaultUnit("mm");
159  SetPhotonDetHalfLengthCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
160  SetPhotonDetHalfLengthCmd->SetToBeBroadcasted(false);
161 
162  SetGapCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setGap",this);
163  SetGapCmd->SetGuidance("Set the distance between PhotonDet and fiber end");
164  SetGapCmd->SetParameterName("theta",false);
165  SetGapCmd->SetUnitCategory("Length");
166  SetGapCmd->SetDefaultUnit("mm");
167  SetGapCmd->SetRange("theta>=0.");
169  SetGapCmd->SetToBeBroadcasted(false);
170 
171  SetPhotonDetAlignmentCmd =
172  new G4UIcmdWithADoubleAndUnit("/WLS/setAlignment",this);
173  SetPhotonDetAlignmentCmd->
174  SetGuidance("Set the deviation of PhotonDet from z axis");
175  SetPhotonDetAlignmentCmd->SetParameterName("theta",false);
176  SetPhotonDetAlignmentCmd->SetUnitCategory("Angle");
177  SetPhotonDetAlignmentCmd->SetDefaultUnit("deg");
178  SetPhotonDetAlignmentCmd->SetRange("theta>-90. && theta<90.");
179  SetPhotonDetAlignmentCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
180  SetPhotonDetAlignmentCmd->SetToBeBroadcasted(false);
181 
182  SetMirrorCmd = new G4UIcmdWithABool("/WLS/setMirror", this);
183  SetMirrorCmd->SetGuidance("Place a mirror at the end of the fiber");
185  SetMirrorCmd->SetToBeBroadcasted(false);
186 
187  SetBarLengthCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setBarLength",this);
188  SetBarLengthCmd->SetGuidance("Set the length of the scintillator bar");
189  SetBarLengthCmd->SetParameterName("length",false);
190  SetBarLengthCmd->SetRange("length>0.");
191  SetBarLengthCmd->SetUnitCategory("Length");
192  SetBarLengthCmd->SetDefaultUnit("mm");
194  SetBarLengthCmd->SetToBeBroadcasted(false);
195 
196  SetBarBaseCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setBarBase",this);
197  SetBarBaseCmd->SetGuidance("Set the side length of the scintillator bar");
198  SetBarBaseCmd->SetParameterName("length",false);
199  SetBarBaseCmd->SetRange("length>0.");
200  SetBarBaseCmd->SetUnitCategory("Length");
201  SetBarBaseCmd->SetDefaultUnit("mm");
203  SetBarBaseCmd->SetToBeBroadcasted(false);
204 
205  SetHoleRadiusCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setHoleRadius",this);
206  SetHoleRadiusCmd->SetGuidance("Set the radius of the fiber hole");
207  SetHoleRadiusCmd->SetParameterName("radius",false);
208  SetHoleRadiusCmd->SetRange("radius>0.");
209  SetHoleRadiusCmd->SetUnitCategory("Length");
210  SetHoleRadiusCmd->SetDefaultUnit("mm");
212  SetHoleRadiusCmd->SetToBeBroadcasted(false);
213 
214  SetCoatingThicknessCmd =
215  new G4UIcmdWithADoubleAndUnit("/WLS/setCoatingThickness",this);
216  SetCoatingThicknessCmd->
217  SetGuidance("Set thickness of the coating on the bars");
218  SetCoatingThicknessCmd->SetParameterName("thick",false);
219  SetCoatingThicknessCmd->SetUnitCategory("Length");
220  SetCoatingThicknessCmd->SetDefaultUnit("mm");
221  SetCoatingThicknessCmd->SetRange("thick>=0.");
222  SetCoatingThicknessCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
223  SetCoatingThicknessCmd->SetToBeBroadcasted(false);
224 
225  SetCoatingRadiusCmd =
226  new G4UIcmdWithADoubleAndUnit("/WLS/setCoatingRadius",this);
227  SetCoatingRadiusCmd->
228  SetGuidance("Set inner radius of the corner bar coating");
229  SetCoatingRadiusCmd->SetParameterName("cradius",false);
230  SetCoatingRadiusCmd->SetUnitCategory("Length");
231  SetCoatingRadiusCmd->SetDefaultUnit("mm");
232  SetCoatingRadiusCmd->SetRange("cradius>=0.");
233  SetCoatingRadiusCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
234  SetCoatingRadiusCmd->SetToBeBroadcasted(false);
235 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetToBeBroadcasted(G4bool val)
Definition: G4UIcommand.hh:184
void SetUnitCategory(const char *unitCategory)
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:225
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultUnit(const char *defUnit)
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
WLSDetectorMessenger::~WLSDetectorMessenger ( )
virtual

Definition at line 239 of file WLSDetectorMessenger.cc.

240 {
241  delete fDetDir;
242 
243  delete SetPhotonDetGeometryCmd;
244  delete SetNumOfCladLayersCmd;
245  delete SetWLSLengthCmd;
246  delete SetWLSRadiusCmd;
247  delete SetClad1RadiusCmd;
248  delete SetClad2RadiusCmd;
249  delete SetPhotonDetHalfLengthCmd;
250  delete SetGapCmd;
251  delete SetPhotonDetAlignmentCmd;
252  delete SetSurfaceRoughnessCmd;
253  delete SetMirrorPolishCmd;
254  delete SetMirrorReflectivityCmd;
255  delete SetXYRatioCmd;
256  delete SetMirrorCmd;
257  delete SetBarLengthCmd;
258  delete SetBarBaseCmd;
259  delete SetHoleRadiusCmd;
260  delete SetCoatingThicknessCmd;
261  delete SetCoatingRadiusCmd;
262 }

Member Function Documentation

void WLSDetectorMessenger::SetNewValue ( G4UIcommand command,
G4String  val 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 266 of file WLSDetectorMessenger.cc.

References G4UIcmdWithABool::GetNewBoolValue(), G4UIcmdWithADouble::GetNewDoubleValue(), G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(), G4UIcmdWithAnInteger::GetNewIntValue(), WLSDetectorConstruction::SetBarBase(), WLSDetectorConstruction::SetBarLength(), WLSDetectorConstruction::SetCoatingRadius(), WLSDetectorConstruction::SetCoatingThickness(), WLSDetectorConstruction::SetGap(), WLSDetectorConstruction::SetHoleRadius(), WLSDetectorConstruction::SetMirror(), WLSDetectorConstruction::SetMirrorPolish(), WLSDetectorConstruction::SetNumberOfCladding(), WLSDetectorConstruction::SetPhotonDetGeometry(), WLSDetectorConstruction::SetPhotonDetPolish(), WLSDetectorConstruction::SetSurfaceRoughness(), WLSDetectorConstruction::SetWLSLength(), WLSDetectorConstruction::SetWLSRadius(), and WLSDetectorConstruction::SetXYRatio().

267 {
268  if( command == SetPhotonDetGeometryCmd ) {
269 
270  fDetector->SetPhotonDetGeometry(val);
271  }
272  else if( command == SetNumOfCladLayersCmd ) {
273 
275  }
276  else if( command == SetSurfaceRoughnessCmd ) {
277 
279  }
280  else if( command == SetXYRatioCmd ) {
281 
283  }
284  else if( command == SetMirrorPolishCmd ) {
285 
287  }
288  else if( command == SetMirrorReflectivityCmd ) {
289 
290  fDetector->
291  SetMirrorReflectivity(G4UIcmdWithADouble::GetNewDoubleValue(val));
292  }
293  else if( command == SetPhotonDetPolishCmd ) {
294 
296  }
297  else if( command == SetPhotonDetReflectivityCmd ) {
298 
299  fDetector->
300  SetPhotonDetReflectivity(G4UIcmdWithADouble::GetNewDoubleValue(val));
301  }
302  else if( command == SetWLSLengthCmd ) {
303 
305  }
306  else if( command == SetWLSRadiusCmd ) {
307 
309  }
310  else if( command == SetClad1RadiusCmd ) {
311 
312  fDetector->
314  }
315  else if( command == SetClad2RadiusCmd ) {
316 
317  fDetector->
319  }
320  else if( command == SetPhotonDetHalfLengthCmd ) {
321 
322  fDetector->
323  SetPhotonDetHalfLength(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
324  }
325  else if( command == SetGapCmd ) {
326 
328  }
329  else if( command == SetPhotonDetAlignmentCmd ) {
330 
331  fDetector->
332  SetPhotonDetAlignment(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
333  }
334  else if( command == SetMirrorCmd ) {
335 
337  }
338  else if( command == SetBarLengthCmd ) {
339 
341  }
342  else if( command == SetBarBaseCmd ) {
343 
345  }
346  else if( command == SetHoleRadiusCmd ) {
347 
349  }
350  else if( command == SetCoatingThicknessCmd ) {
351 
353  }
354  else if( command == SetCoatingRadiusCmd ) {
355 
357  }
358 }
static G4int GetNewIntValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4bool GetNewBoolValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)

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