Geant4  10.02.p03
WLSDetectorMessenger Class Reference

#include <WLSDetectorMessenger.hh>

Inheritance diagram for WLSDetectorMessenger:
Collaboration diagram for WLSDetectorMessenger:

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
 
G4bool CommandsShouldBeInMaster () const
 

Private Attributes

WLSDetectorConstructionfDetector
 
G4UIdirectoryfDetDir
 
G4UIcmdWithAStringfSetPhotonDetGeometryCmd
 
G4UIcmdWithAnIntegerfSetNumOfCladLayersCmd
 
G4UIcmdWithADoubleAndUnitfSetWLSLengthCmd
 
G4UIcmdWithADoubleAndUnitfSetWLSRadiusCmd
 
G4UIcmdWithADoubleAndUnitfSetClad1RadiusCmd
 
G4UIcmdWithADoubleAndUnitfSetClad2RadiusCmd
 
G4UIcmdWithADoubleAndUnitfSetPhotonDetHalfLengthCmd
 
G4UIcmdWithADoubleAndUnitfSetGapCmd
 
G4UIcmdWithADoubleAndUnitfSetPhotonDetAlignmentCmd
 
G4UIcmdWithADoublefSetXYRatioCmd
 
G4UIcmdWithADoublefSetSurfaceRoughnessCmd
 
G4UIcmdWithADoublefSetMirrorPolishCmd
 
G4UIcmdWithADoublefSetMirrorReflectivityCmd
 
G4UIcmdWithADoublefSetPhotonDetPolishCmd
 
G4UIcmdWithADoublefSetPhotonDetReflectivityCmd
 
G4UIcmdWithABoolfSetMirrorCmd
 
G4UIcmdWithADoubleAndUnitfSetBarLengthCmd
 
G4UIcmdWithADoubleAndUnitfSetBarBaseCmd
 
G4UIcmdWithADoubleAndUnitfSetHoleRadiusCmd
 
G4UIcmdWithADoubleAndUnitfSetCoatingThicknessCmd
 
G4UIcmdWithADoubleAndUnitfSetCoatingRadiusCmd
 

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 53 of file WLSDetectorMessenger.hh.

Constructor & Destructor Documentation

◆ WLSDetectorMessenger()

WLSDetectorMessenger::WLSDetectorMessenger ( WLSDetectorConstruction det)

Definition at line 44 of file WLSDetectorMessenger.cc.

45  : fDetector(det)
46 {
47  fDetDir = new G4UIdirectory("/WLS/");
48  fDetDir->SetGuidance(" Geometry Setup ");
49 
51  new G4UIcmdWithAString("/WLS/setPhotonDetGeometry",this);
53  SetGuidance("Select the geometry of the PhotonDet detector");
54  fSetPhotonDetGeometryCmd->SetGuidance("Only Accepts 'Circle' and 'Square'");
55  fSetPhotonDetGeometryCmd->SetCandidates("Circle Square");
58 
60  new G4UIcmdWithAnInteger("/WLS/setNumOfLayers", this);
61  fSetNumOfCladLayersCmd->SetGuidance("Select the number of cladding layers");
62  fSetNumOfCladLayersCmd->SetGuidance("Maximum number is 2");
63  fSetNumOfCladLayersCmd->SetParameterName("numberOfLayers",false);
64  fSetNumOfCladLayersCmd->SetRange("numberOfLayers>=0 && numberOfLayers<=2");
67 
69  new G4UIcmdWithADouble("/WLS/setSurfaceRoughness", this);
71  SetGuidance("Set the roughness between Clad1 and WLS Fiber");
72  fSetSurfaceRoughnessCmd->SetParameterName("roughness",false);
73  fSetSurfaceRoughnessCmd->SetRange("roughness>0 && roughness<=1");
76 
77  fSetXYRatioCmd = new G4UIcmdWithADouble("/WLS/setXYRatio", this);
78  fSetXYRatioCmd->SetGuidance("Set the ratio between x and y axis (x/y)");
79  fSetXYRatioCmd->SetParameterName("ratio",false);
80  fSetXYRatioCmd->SetRange("ratio>0 && ratio<=1");
83 
84  fSetMirrorPolishCmd = new G4UIcmdWithADouble("/WLS/setMirrorPolish", this);
85  fSetMirrorPolishCmd->SetGuidance("Set the polish of the mirror");
86  fSetMirrorPolishCmd->SetParameterName("polish",false);
87  fSetMirrorPolishCmd->SetRange("polish>0 && polish<=1");
90 
92  new G4UIcmdWithADouble("/WLS/setMirrorReflectivity", this);
93  fSetMirrorReflectivityCmd->SetGuidance("Set the reflectivity of the mirror");
94  fSetMirrorReflectivityCmd->SetParameterName("reflectivity",false);
95  fSetMirrorReflectivityCmd->SetRange("reflectivity>=0 && reflectivity<=1");
98 
100  new G4UIcmdWithADouble("/WLS/setPhotonDetPolish", this);
101  fSetPhotonDetPolishCmd->SetGuidance("Set the polish of the mirror");
102  fSetPhotonDetPolishCmd->SetParameterName("polish",false);
103  fSetPhotonDetPolishCmd->SetRange("polish>0 && polish<=1");
106 
108  new G4UIcmdWithADouble("/WLS/setPhotonDetReflectivity", this);
110  SetGuidance("Set the reflectivity of the mirror");
111  fSetPhotonDetReflectivityCmd->SetParameterName("reflectivity",false);
112  fSetPhotonDetReflectivityCmd->SetRange("reflectivity>=0 && reflectivity<=1");
115 
116  fSetWLSLengthCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setWLSLength",this);
117  fSetWLSLengthCmd->SetGuidance("Set the half length of the WLS fiber");
118  fSetWLSLengthCmd->SetParameterName("length",false);
119  fSetWLSLengthCmd->SetRange("length>0.");
124 
125  fSetWLSRadiusCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setWLSRadius",this);
126  fSetWLSRadiusCmd->SetGuidance("Set the radius of the WLS fiber");
127  fSetWLSRadiusCmd->SetParameterName("radius",false);
128  fSetWLSRadiusCmd->SetRange("radius>0.");
133 
135  new G4UIcmdWithADoubleAndUnit("/WLS/setClad1Radius",this);
136  fSetClad1RadiusCmd->SetGuidance("Set the radius of Cladding 1");
137  fSetClad1RadiusCmd->SetParameterName("radius",false);
138  fSetClad1RadiusCmd->SetRange("radius>0.");
143 
145  new G4UIcmdWithADoubleAndUnit("/WLS/setClad2Radius",this);
146  fSetClad2RadiusCmd->SetGuidance("Set the radius of Cladding 2");
147  fSetClad2RadiusCmd->SetParameterName("radius",false);
148  fSetClad2RadiusCmd->SetRange("radius>0.");
153 
155  new G4UIcmdWithADoubleAndUnit("/WLS/setPhotonDetHalfLength",this);
157  SetGuidance("Set the half length of PhotonDet detector");
164 
165  fSetGapCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setGap",this);
166  fSetGapCmd->SetGuidance("Set the distance between PhotonDet and fiber end");
167  fSetGapCmd->SetParameterName("theta",false);
168  fSetGapCmd->SetUnitCategory("Length");
169  fSetGapCmd->SetDefaultUnit("mm");
170  fSetGapCmd->SetRange("theta>=0.");
173 
175  new G4UIcmdWithADoubleAndUnit("/WLS/setAlignment",this);
177  SetGuidance("Set the deviation of PhotonDet from z axis");
181  fSetPhotonDetAlignmentCmd->SetRange("theta>-90. && theta<90.");
184 
185  fSetMirrorCmd = new G4UIcmdWithABool("/WLS/setMirror", this);
186  fSetMirrorCmd->SetGuidance("Place a mirror at the end of the fiber");
189 
190  fSetBarLengthCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setBarLength",this);
191  fSetBarLengthCmd->SetGuidance("Set the length of the scintillator bar");
192  fSetBarLengthCmd->SetParameterName("length",false);
193  fSetBarLengthCmd->SetRange("length>0.");
198 
199  fSetBarBaseCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setBarBase",this);
200  fSetBarBaseCmd->SetGuidance("Set the side length of the scintillator bar");
201  fSetBarBaseCmd->SetParameterName("length",false);
202  fSetBarBaseCmd->SetRange("length>0.");
203  fSetBarBaseCmd->SetUnitCategory("Length");
207 
208  fSetHoleRadiusCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setHoleRadius",this);
209  fSetHoleRadiusCmd->SetGuidance("Set the radius of the fiber hole");
210  fSetHoleRadiusCmd->SetParameterName("radius",false);
211  fSetHoleRadiusCmd->SetRange("radius>0.");
216 
218  new G4UIcmdWithADoubleAndUnit("/WLS/setCoatingThickness",this);
220  SetGuidance("Set thickness of the coating on the bars");
224  fSetCoatingThicknessCmd->SetRange("thick>=0.");
227 
229  new G4UIcmdWithADoubleAndUnit("/WLS/setCoatingRadius",this);
231  SetGuidance("Set inner radius of the corner bar coating");
232  fSetCoatingRadiusCmd->SetParameterName("cradius",false);
235  fSetCoatingRadiusCmd->SetRange("cradius>=0.");
238 }
G4UIcmdWithADoubleAndUnit * fSetBarLengthCmd
G4UIcmdWithADoubleAndUnit * fSetPhotonDetHalfLengthCmd
G4UIcmdWithADoubleAndUnit * fSetHoleRadiusCmd
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADouble * fSetMirrorPolishCmd
WLSDetectorConstruction * fDetector
void SetToBeBroadcasted(G4bool val)
Definition: G4UIcommand.hh:184
G4UIcmdWithADouble * fSetXYRatioCmd
G4UIcmdWithADoubleAndUnit * fSetCoatingThicknessCmd
G4UIcmdWithADoubleAndUnit * fSetClad2RadiusCmd
void SetUnitCategory(const char *unitCategory)
G4UIcmdWithADoubleAndUnit * fSetWLSLengthCmd
G4UIcmdWithADoubleAndUnit * fSetWLSRadiusCmd
G4UIcmdWithADouble * fSetMirrorReflectivityCmd
G4UIcmdWithADoubleAndUnit * fSetCoatingRadiusCmd
G4UIcmdWithADoubleAndUnit * fSetBarBaseCmd
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
G4UIcmdWithADoubleAndUnit * fSetGapCmd
G4UIcmdWithABool * fSetMirrorCmd
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
G4UIcmdWithADoubleAndUnit * fSetClad1RadiusCmd
G4UIcmdWithADouble * fSetSurfaceRoughnessCmd
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithAString * fSetPhotonDetGeometryCmd
G4UIcmdWithADouble * fSetPhotonDetReflectivityCmd
void SetDefaultUnit(const char *defUnit)
G4UIcmdWithADoubleAndUnit * fSetPhotonDetAlignmentCmd
void SetCandidates(const char *candidateList)
G4UIcmdWithAnInteger * fSetNumOfCladLayersCmd
G4UIcmdWithADouble * fSetPhotonDetPolishCmd
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
Here is the call graph for this function:

◆ ~WLSDetectorMessenger()

WLSDetectorMessenger::~WLSDetectorMessenger ( )
virtual

Definition at line 242 of file WLSDetectorMessenger.cc.

243 {
244  delete fDetDir;
245 
247  delete fSetNumOfCladLayersCmd;
248  delete fSetWLSLengthCmd;
249  delete fSetWLSRadiusCmd;
250  delete fSetClad1RadiusCmd;
251  delete fSetClad2RadiusCmd;
253  delete fSetGapCmd;
256  delete fSetMirrorPolishCmd;
258  delete fSetXYRatioCmd;
259  delete fSetMirrorCmd;
260  delete fSetBarLengthCmd;
261  delete fSetBarBaseCmd;
262  delete fSetHoleRadiusCmd;
264  delete fSetCoatingRadiusCmd;
265 }
G4UIcmdWithADoubleAndUnit * fSetBarLengthCmd
G4UIcmdWithADoubleAndUnit * fSetPhotonDetHalfLengthCmd
G4UIcmdWithADoubleAndUnit * fSetHoleRadiusCmd
G4UIcmdWithADouble * fSetMirrorPolishCmd
G4UIcmdWithADouble * fSetXYRatioCmd
G4UIcmdWithADoubleAndUnit * fSetCoatingThicknessCmd
G4UIcmdWithADoubleAndUnit * fSetClad2RadiusCmd
G4UIcmdWithADoubleAndUnit * fSetWLSLengthCmd
G4UIcmdWithADoubleAndUnit * fSetWLSRadiusCmd
G4UIcmdWithADouble * fSetMirrorReflectivityCmd
G4UIcmdWithADoubleAndUnit * fSetCoatingRadiusCmd
G4UIcmdWithADoubleAndUnit * fSetBarBaseCmd
G4UIcmdWithADoubleAndUnit * fSetGapCmd
G4UIcmdWithABool * fSetMirrorCmd
G4UIcmdWithADoubleAndUnit * fSetClad1RadiusCmd
G4UIcmdWithADouble * fSetSurfaceRoughnessCmd
G4UIcmdWithAString * fSetPhotonDetGeometryCmd
G4UIcmdWithADoubleAndUnit * fSetPhotonDetAlignmentCmd
G4UIcmdWithAnInteger * fSetNumOfCladLayersCmd

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 269 of file WLSDetectorMessenger.cc.

270 {
271  if( command == fSetPhotonDetGeometryCmd ) {
272 
274  }
275  else if( command == fSetNumOfCladLayersCmd ) {
276 
278  }
279  else if( command == fSetSurfaceRoughnessCmd ) {
280 
282  }
283  else if( command == fSetXYRatioCmd ) {
284 
286  }
287  else if( command == fSetMirrorPolishCmd ) {
288 
290  }
291  else if( command == fSetMirrorReflectivityCmd ) {
292 
293  fDetector->
294  SetMirrorReflectivity(G4UIcmdWithADouble::GetNewDoubleValue(val));
295  }
296  else if( command == fSetPhotonDetPolishCmd ) {
297 
299  }
300  else if( command == fSetPhotonDetReflectivityCmd ) {
301 
302  fDetector->
303  SetPhotonDetReflectivity(G4UIcmdWithADouble::GetNewDoubleValue(val));
304  }
305  else if( command == fSetWLSLengthCmd ) {
306 
308  }
309  else if( command == fSetWLSRadiusCmd ) {
310 
312  }
313  else if( command == fSetClad1RadiusCmd ) {
314 
315  fDetector->
317  }
318  else if( command == fSetClad2RadiusCmd ) {
319 
320  fDetector->
322  }
323  else if( command == fSetPhotonDetHalfLengthCmd ) {
324 
325  fDetector->
326  SetPhotonDetHalfLength(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
327  }
328  else if( command == fSetGapCmd ) {
329 
331  }
332  else if( command == fSetPhotonDetAlignmentCmd ) {
333 
334  fDetector->
335  SetPhotonDetAlignment(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
336  }
337  else if( command == fSetMirrorCmd ) {
338 
340  }
341  else if( command == fSetBarLengthCmd ) {
342 
344  }
345  else if( command == fSetBarBaseCmd ) {
346 
348  }
349  else if( command == fSetHoleRadiusCmd ) {
350 
352  }
353  else if( command == fSetCoatingThicknessCmd ) {
354 
356  }
357  else if( command == fSetCoatingRadiusCmd ) {
358 
360  }
361 }
G4UIcmdWithADoubleAndUnit * fSetBarLengthCmd
G4UIcmdWithADoubleAndUnit * fSetPhotonDetHalfLengthCmd
G4UIcmdWithADoubleAndUnit * fSetHoleRadiusCmd
static G4int GetNewIntValue(const char *paramString)
G4UIcmdWithADouble * fSetMirrorPolishCmd
WLSDetectorConstruction * fDetector
G4UIcmdWithADouble * fSetXYRatioCmd
G4UIcmdWithADoubleAndUnit * fSetCoatingThicknessCmd
G4UIcmdWithADoubleAndUnit * fSetClad2RadiusCmd
static G4double GetNewDoubleValue(const char *paramString)
static G4bool GetNewBoolValue(const char *paramString)
G4UIcmdWithADoubleAndUnit * fSetWLSLengthCmd
G4UIcmdWithADoubleAndUnit * fSetWLSRadiusCmd
G4UIcmdWithADouble * fSetMirrorReflectivityCmd
G4UIcmdWithADoubleAndUnit * fSetCoatingRadiusCmd
G4UIcmdWithADoubleAndUnit * fSetBarBaseCmd
static G4double GetNewDoubleValue(const char *paramString)
G4UIcmdWithADoubleAndUnit * fSetGapCmd
G4UIcmdWithABool * fSetMirrorCmd
G4UIcmdWithADoubleAndUnit * fSetClad1RadiusCmd
G4UIcmdWithADouble * fSetSurfaceRoughnessCmd
G4UIcmdWithAString * fSetPhotonDetGeometryCmd
G4UIcmdWithADouble * fSetPhotonDetReflectivityCmd
G4UIcmdWithADoubleAndUnit * fSetPhotonDetAlignmentCmd
G4UIcmdWithAnInteger * fSetNumOfCladLayersCmd
G4UIcmdWithADouble * fSetPhotonDetPolishCmd
Here is the call graph for this function:

Member Data Documentation

◆ fDetDir

G4UIdirectory* WLSDetectorMessenger::fDetDir
private

Definition at line 66 of file WLSDetectorMessenger.hh.

◆ fDetector

WLSDetectorConstruction* WLSDetectorMessenger::fDetector
private

Definition at line 64 of file WLSDetectorMessenger.hh.

◆ fSetBarBaseCmd

G4UIcmdWithADoubleAndUnit* WLSDetectorMessenger::fSetBarBaseCmd
private

Definition at line 85 of file WLSDetectorMessenger.hh.

◆ fSetBarLengthCmd

G4UIcmdWithADoubleAndUnit* WLSDetectorMessenger::fSetBarLengthCmd
private

Definition at line 84 of file WLSDetectorMessenger.hh.

◆ fSetClad1RadiusCmd

G4UIcmdWithADoubleAndUnit* WLSDetectorMessenger::fSetClad1RadiusCmd
private

Definition at line 72 of file WLSDetectorMessenger.hh.

◆ fSetClad2RadiusCmd

G4UIcmdWithADoubleAndUnit* WLSDetectorMessenger::fSetClad2RadiusCmd
private

Definition at line 73 of file WLSDetectorMessenger.hh.

◆ fSetCoatingRadiusCmd

G4UIcmdWithADoubleAndUnit* WLSDetectorMessenger::fSetCoatingRadiusCmd
private

Definition at line 88 of file WLSDetectorMessenger.hh.

◆ fSetCoatingThicknessCmd

G4UIcmdWithADoubleAndUnit* WLSDetectorMessenger::fSetCoatingThicknessCmd
private

Definition at line 87 of file WLSDetectorMessenger.hh.

◆ fSetGapCmd

G4UIcmdWithADoubleAndUnit* WLSDetectorMessenger::fSetGapCmd
private

Definition at line 75 of file WLSDetectorMessenger.hh.

◆ fSetHoleRadiusCmd

G4UIcmdWithADoubleAndUnit* WLSDetectorMessenger::fSetHoleRadiusCmd
private

Definition at line 86 of file WLSDetectorMessenger.hh.

◆ fSetMirrorCmd

G4UIcmdWithABool* WLSDetectorMessenger::fSetMirrorCmd
private

Definition at line 83 of file WLSDetectorMessenger.hh.

◆ fSetMirrorPolishCmd

G4UIcmdWithADouble* WLSDetectorMessenger::fSetMirrorPolishCmd
private

Definition at line 79 of file WLSDetectorMessenger.hh.

◆ fSetMirrorReflectivityCmd

G4UIcmdWithADouble* WLSDetectorMessenger::fSetMirrorReflectivityCmd
private

Definition at line 80 of file WLSDetectorMessenger.hh.

◆ fSetNumOfCladLayersCmd

G4UIcmdWithAnInteger* WLSDetectorMessenger::fSetNumOfCladLayersCmd
private

Definition at line 69 of file WLSDetectorMessenger.hh.

◆ fSetPhotonDetAlignmentCmd

G4UIcmdWithADoubleAndUnit* WLSDetectorMessenger::fSetPhotonDetAlignmentCmd
private

Definition at line 76 of file WLSDetectorMessenger.hh.

◆ fSetPhotonDetGeometryCmd

G4UIcmdWithAString* WLSDetectorMessenger::fSetPhotonDetGeometryCmd
private

Definition at line 68 of file WLSDetectorMessenger.hh.

◆ fSetPhotonDetHalfLengthCmd

G4UIcmdWithADoubleAndUnit* WLSDetectorMessenger::fSetPhotonDetHalfLengthCmd
private

Definition at line 74 of file WLSDetectorMessenger.hh.

◆ fSetPhotonDetPolishCmd

G4UIcmdWithADouble* WLSDetectorMessenger::fSetPhotonDetPolishCmd
private

Definition at line 81 of file WLSDetectorMessenger.hh.

◆ fSetPhotonDetReflectivityCmd

G4UIcmdWithADouble* WLSDetectorMessenger::fSetPhotonDetReflectivityCmd
private

Definition at line 82 of file WLSDetectorMessenger.hh.

◆ fSetSurfaceRoughnessCmd

G4UIcmdWithADouble* WLSDetectorMessenger::fSetSurfaceRoughnessCmd
private

Definition at line 78 of file WLSDetectorMessenger.hh.

◆ fSetWLSLengthCmd

G4UIcmdWithADoubleAndUnit* WLSDetectorMessenger::fSetWLSLengthCmd
private

Definition at line 70 of file WLSDetectorMessenger.hh.

◆ fSetWLSRadiusCmd

G4UIcmdWithADoubleAndUnit* WLSDetectorMessenger::fSetWLSRadiusCmd
private

Definition at line 71 of file WLSDetectorMessenger.hh.

◆ fSetXYRatioCmd

G4UIcmdWithADouble* WLSDetectorMessenger::fSetXYRatioCmd
private

Definition at line 77 of file WLSDetectorMessenger.hh.


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