Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/extended/optical/wls/src/WLSDetectorMessenger.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/optical/wls/src/WLSDetectorMessenger.cc (Version 11.3.0) and /examples/extended/optical/wls/src/WLSDetectorMessenger.cc (Version 10.7.p2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //                                                 26 //
 27 /// \file optical/wls/src/WLSDetectorMessenger     27 /// \file optical/wls/src/WLSDetectorMessenger.cc
 28 /// \brief Implementation of the WLSDetectorMe     28 /// \brief Implementation of the WLSDetectorMessenger class
 29 //                                                 29 //
 30 //                                                 30 //
 31 #include "WLSDetectorMessenger.hh"                 31 #include "WLSDetectorMessenger.hh"
 32                                                    32 
 33 #include "G4UIcmdWithABool.hh"                     33 #include "G4UIcmdWithABool.hh"
 34 #include "G4UIcmdWithADouble.hh"                   34 #include "G4UIcmdWithADouble.hh"
 35 #include "G4UIcmdWithADoubleAndUnit.hh"            35 #include "G4UIcmdWithADoubleAndUnit.hh"
 36 #include "G4UIcmdWithAString.hh"               << 
 37 #include "G4UIcmdWithAnInteger.hh"                 36 #include "G4UIcmdWithAnInteger.hh"
                                                   >>  37 #include "G4UIcmdWithAString.hh"
 38 #include "G4UIcmdWithoutParameter.hh"              38 #include "G4UIcmdWithoutParameter.hh"
 39 #include "G4UIdirectory.hh"                        39 #include "G4UIdirectory.hh"
 40                                                    40 
 41 //....oooOO0OOooo........oooOO0OOooo........oo     41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 42                                                    42 
 43 WLSDetectorMessenger::WLSDetectorMessenger(WLS <<  43 WLSDetectorMessenger::WLSDetectorMessenger(WLSDetectorConstruction* det)
                                                   >>  44   : fDetector(det)
 44 {                                                  45 {
 45   fDetDir = new G4UIdirectory("/WLS/");            46   fDetDir = new G4UIdirectory("/WLS/");
 46   fDetDir->SetGuidance(" Geometry Setup ");        47   fDetDir->SetGuidance(" Geometry Setup ");
 47                                                    48 
 48   fSetPhotonDetGeometryCmd = new G4UIcmdWithAS <<  49   fSetPhotonDetGeometryCmd =
 49   fSetPhotonDetGeometryCmd->SetGuidance("Selec <<  50     new G4UIcmdWithAString("/WLS/setPhotonDetGeometry", this);
                                                   >>  51   fSetPhotonDetGeometryCmd->SetGuidance(
                                                   >>  52     "Select the geometry of the PhotonDet detector");
 50   fSetPhotonDetGeometryCmd->SetGuidance("Only      53   fSetPhotonDetGeometryCmd->SetGuidance("Only Accepts 'Circle' and 'Square'");
 51   fSetPhotonDetGeometryCmd->SetCandidates("Cir     54   fSetPhotonDetGeometryCmd->SetCandidates("Circle Square");
 52   fSetPhotonDetGeometryCmd->AvailableForStates     55   fSetPhotonDetGeometryCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 53   fSetPhotonDetGeometryCmd->SetToBeBroadcasted     56   fSetPhotonDetGeometryCmd->SetToBeBroadcasted(false);
 54                                                    57 
 55   fSetNumOfCladLayersCmd = new G4UIcmdWithAnIn <<  58   fSetNumOfCladLayersCmd =
                                                   >>  59     new G4UIcmdWithAnInteger("/WLS/setNumOfLayers", this);
 56   fSetNumOfCladLayersCmd->SetGuidance("Select      60   fSetNumOfCladLayersCmd->SetGuidance("Select the number of cladding layers");
 57   fSetNumOfCladLayersCmd->SetGuidance("Maximum     61   fSetNumOfCladLayersCmd->SetGuidance("Maximum number is 2");
 58   fSetNumOfCladLayersCmd->SetParameterName("nu     62   fSetNumOfCladLayersCmd->SetParameterName("numberOfLayers", false);
 59   fSetNumOfCladLayersCmd->SetRange("numberOfLa     63   fSetNumOfCladLayersCmd->SetRange("numberOfLayers>=0 && numberOfLayers<=2");
 60   fSetNumOfCladLayersCmd->AvailableForStates(G     64   fSetNumOfCladLayersCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 61   fSetNumOfCladLayersCmd->SetToBeBroadcasted(f     65   fSetNumOfCladLayersCmd->SetToBeBroadcasted(false);
 62                                                    66 
 63   fSetSurfaceRoughnessCmd = new G4UIcmdWithADo <<  67   fSetSurfaceRoughnessCmd =
 64   fSetSurfaceRoughnessCmd->SetGuidance("Set th <<  68     new G4UIcmdWithADouble("/WLS/setSurfaceRoughness", this);
                                                   >>  69   fSetSurfaceRoughnessCmd->SetGuidance(
                                                   >>  70     "Set the roughness between Clad1 and WLS Fiber");
 65   fSetSurfaceRoughnessCmd->SetParameterName("r     71   fSetSurfaceRoughnessCmd->SetParameterName("roughness", false);
 66   fSetSurfaceRoughnessCmd->SetRange("roughness     72   fSetSurfaceRoughnessCmd->SetRange("roughness>0 && roughness<=1");
 67   fSetSurfaceRoughnessCmd->AvailableForStates(     73   fSetSurfaceRoughnessCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 68   fSetSurfaceRoughnessCmd->SetToBeBroadcasted(     74   fSetSurfaceRoughnessCmd->SetToBeBroadcasted(false);
 69                                                    75 
 70   fSetXYRatioCmd = new G4UIcmdWithADouble("/WL     76   fSetXYRatioCmd = new G4UIcmdWithADouble("/WLS/setXYRatio", this);
 71   fSetXYRatioCmd->SetGuidance("Set the ratio b     77   fSetXYRatioCmd->SetGuidance("Set the ratio between x and y axis (x/y)");
 72   fSetXYRatioCmd->SetParameterName("ratio", fa     78   fSetXYRatioCmd->SetParameterName("ratio", false);
 73   fSetXYRatioCmd->SetRange("ratio>0 && ratio<=     79   fSetXYRatioCmd->SetRange("ratio>0 && ratio<=1");
 74   fSetXYRatioCmd->AvailableForStates(G4State_P     80   fSetXYRatioCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 75   fSetXYRatioCmd->SetToBeBroadcasted(false);       81   fSetXYRatioCmd->SetToBeBroadcasted(false);
 76                                                    82 
 77   fSetMirrorPolishCmd = new G4UIcmdWithADouble     83   fSetMirrorPolishCmd = new G4UIcmdWithADouble("/WLS/setMirrorPolish", this);
 78   fSetMirrorPolishCmd->SetGuidance("Set the po     84   fSetMirrorPolishCmd->SetGuidance("Set the polish of the mirror");
 79   fSetMirrorPolishCmd->SetParameterName("polis     85   fSetMirrorPolishCmd->SetParameterName("polish", false);
 80   fSetMirrorPolishCmd->SetRange("polish>0 && p     86   fSetMirrorPolishCmd->SetRange("polish>0 && polish<=1");
 81   fSetMirrorPolishCmd->AvailableForStates(G4St     87   fSetMirrorPolishCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 82   fSetMirrorPolishCmd->SetToBeBroadcasted(fals     88   fSetMirrorPolishCmd->SetToBeBroadcasted(false);
 83                                                    89 
 84   fSetMirrorReflectivityCmd = new G4UIcmdWithA <<  90   fSetMirrorReflectivityCmd =
                                                   >>  91     new G4UIcmdWithADouble("/WLS/setMirrorReflectivity", this);
 85   fSetMirrorReflectivityCmd->SetGuidance("Set      92   fSetMirrorReflectivityCmd->SetGuidance("Set the reflectivity of the mirror");
 86   fSetMirrorReflectivityCmd->SetParameterName(     93   fSetMirrorReflectivityCmd->SetParameterName("reflectivity", false);
 87   fSetMirrorReflectivityCmd->SetRange("reflect     94   fSetMirrorReflectivityCmd->SetRange("reflectivity>=0 && reflectivity<=1");
 88   fSetMirrorReflectivityCmd->AvailableForState     95   fSetMirrorReflectivityCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 89   fSetMirrorReflectivityCmd->SetToBeBroadcaste     96   fSetMirrorReflectivityCmd->SetToBeBroadcasted(false);
 90                                                    97 
 91   fSetPhotonDetPolishCmd = new G4UIcmdWithADou <<  98   fSetPhotonDetPolishCmd =
                                                   >>  99     new G4UIcmdWithADouble("/WLS/setPhotonDetPolish", this);
 92   fSetPhotonDetPolishCmd->SetGuidance("Set the    100   fSetPhotonDetPolishCmd->SetGuidance("Set the polish of the mirror");
 93   fSetPhotonDetPolishCmd->SetParameterName("po    101   fSetPhotonDetPolishCmd->SetParameterName("polish", false);
 94   fSetPhotonDetPolishCmd->SetRange("polish>0 &    102   fSetPhotonDetPolishCmd->SetRange("polish>0 && polish<=1");
 95   fSetPhotonDetPolishCmd->AvailableForStates(G    103   fSetPhotonDetPolishCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
 96   fSetPhotonDetPolishCmd->SetToBeBroadcasted(f    104   fSetPhotonDetPolishCmd->SetToBeBroadcasted(false);
 97                                                   105 
 98   fSetPhotonDetReflectivityCmd = new G4UIcmdWi << 106   fSetPhotonDetReflectivityCmd =
 99   fSetPhotonDetReflectivityCmd->SetGuidance("S << 107     new G4UIcmdWithADouble("/WLS/setPhotonDetReflectivity", this);
                                                   >> 108   fSetPhotonDetReflectivityCmd->SetGuidance(
                                                   >> 109     "Set the reflectivity of the mirror");
100   fSetPhotonDetReflectivityCmd->SetParameterNa    110   fSetPhotonDetReflectivityCmd->SetParameterName("reflectivity", false);
101   fSetPhotonDetReflectivityCmd->SetRange("refl    111   fSetPhotonDetReflectivityCmd->SetRange("reflectivity>=0 && reflectivity<=1");
102   fSetPhotonDetReflectivityCmd->AvailableForSt    112   fSetPhotonDetReflectivityCmd->AvailableForStates(G4State_PreInit);
103   fSetPhotonDetReflectivityCmd->SetToBeBroadca    113   fSetPhotonDetReflectivityCmd->SetToBeBroadcasted(false);
104                                                   114 
105   fSetWLSLengthCmd = new G4UIcmdWithADoubleAnd    115   fSetWLSLengthCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setWLSLength", this);
106   fSetWLSLengthCmd->SetGuidance("Set the half     116   fSetWLSLengthCmd->SetGuidance("Set the half length of the WLS fiber");
107   fSetWLSLengthCmd->SetParameterName("length",    117   fSetWLSLengthCmd->SetParameterName("length", false);
108   fSetWLSLengthCmd->SetRange("length>0.");        118   fSetWLSLengthCmd->SetRange("length>0.");
109   fSetWLSLengthCmd->SetUnitCategory("Length");    119   fSetWLSLengthCmd->SetUnitCategory("Length");
110   fSetWLSLengthCmd->SetDefaultUnit("mm");         120   fSetWLSLengthCmd->SetDefaultUnit("mm");
111   fSetWLSLengthCmd->AvailableForStates(G4State    121   fSetWLSLengthCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
112   fSetWLSLengthCmd->SetToBeBroadcasted(false);    122   fSetWLSLengthCmd->SetToBeBroadcasted(false);
113                                                   123 
114   fSetWLSRadiusCmd = new G4UIcmdWithADoubleAnd    124   fSetWLSRadiusCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setWLSRadius", this);
115   fSetWLSRadiusCmd->SetGuidance("Set the radiu    125   fSetWLSRadiusCmd->SetGuidance("Set the radius of the WLS fiber");
116   fSetWLSRadiusCmd->SetParameterName("radius",    126   fSetWLSRadiusCmd->SetParameterName("radius", false);
117   fSetWLSRadiusCmd->SetRange("radius>0.");        127   fSetWLSRadiusCmd->SetRange("radius>0.");
118   fSetWLSRadiusCmd->SetUnitCategory("Length");    128   fSetWLSRadiusCmd->SetUnitCategory("Length");
119   fSetWLSRadiusCmd->SetDefaultUnit("mm");         129   fSetWLSRadiusCmd->SetDefaultUnit("mm");
120   fSetWLSRadiusCmd->AvailableForStates(G4State    130   fSetWLSRadiusCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
121   fSetWLSRadiusCmd->SetToBeBroadcasted(false);    131   fSetWLSRadiusCmd->SetToBeBroadcasted(false);
122                                                   132 
123   fSetClad1RadiusCmd = new G4UIcmdWithADoubleA << 133   fSetClad1RadiusCmd =
                                                   >> 134     new G4UIcmdWithADoubleAndUnit("/WLS/setClad1Radius", this);
124   fSetClad1RadiusCmd->SetGuidance("Set the rad    135   fSetClad1RadiusCmd->SetGuidance("Set the radius of Cladding 1");
125   fSetClad1RadiusCmd->SetParameterName("radius    136   fSetClad1RadiusCmd->SetParameterName("radius", false);
126   fSetClad1RadiusCmd->SetRange("radius>0.");      137   fSetClad1RadiusCmd->SetRange("radius>0.");
127   fSetClad1RadiusCmd->SetUnitCategory("Length"    138   fSetClad1RadiusCmd->SetUnitCategory("Length");
128   fSetClad1RadiusCmd->SetDefaultUnit("mm");       139   fSetClad1RadiusCmd->SetDefaultUnit("mm");
129   fSetClad1RadiusCmd->AvailableForStates(G4Sta    140   fSetClad1RadiusCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
130   fSetClad1RadiusCmd->SetToBeBroadcasted(false    141   fSetClad1RadiusCmd->SetToBeBroadcasted(false);
131                                                   142 
132   fSetClad2RadiusCmd = new G4UIcmdWithADoubleA << 143   fSetClad2RadiusCmd =
                                                   >> 144     new G4UIcmdWithADoubleAndUnit("/WLS/setClad2Radius", this);
133   fSetClad2RadiusCmd->SetGuidance("Set the rad    145   fSetClad2RadiusCmd->SetGuidance("Set the radius of Cladding 2");
134   fSetClad2RadiusCmd->SetParameterName("radius    146   fSetClad2RadiusCmd->SetParameterName("radius", false);
135   fSetClad2RadiusCmd->SetRange("radius>0.");      147   fSetClad2RadiusCmd->SetRange("radius>0.");
136   fSetClad2RadiusCmd->SetUnitCategory("Length"    148   fSetClad2RadiusCmd->SetUnitCategory("Length");
137   fSetClad2RadiusCmd->SetDefaultUnit("mm");       149   fSetClad2RadiusCmd->SetDefaultUnit("mm");
138   fSetClad2RadiusCmd->AvailableForStates(G4Sta    150   fSetClad2RadiusCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
139   fSetClad2RadiusCmd->SetToBeBroadcasted(false    151   fSetClad2RadiusCmd->SetToBeBroadcasted(false);
140                                                   152 
141   fSetPhotonDetHalfLengthCmd = new G4UIcmdWith << 153   fSetPhotonDetHalfLengthCmd =
142   fSetPhotonDetHalfLengthCmd->SetGuidance("Set << 154     new G4UIcmdWithADoubleAndUnit("/WLS/setPhotonDetHalfLength", this);
                                                   >> 155   fSetPhotonDetHalfLengthCmd->SetGuidance(
                                                   >> 156     "Set the half length of PhotonDet detector");
143   fSetPhotonDetHalfLengthCmd->SetParameterName    157   fSetPhotonDetHalfLengthCmd->SetParameterName("halfL", false);
144   fSetPhotonDetHalfLengthCmd->SetRange("halfL>    158   fSetPhotonDetHalfLengthCmd->SetRange("halfL>0.");
145   fSetPhotonDetHalfLengthCmd->SetUnitCategory(    159   fSetPhotonDetHalfLengthCmd->SetUnitCategory("Length");
146   fSetPhotonDetHalfLengthCmd->SetDefaultUnit("    160   fSetPhotonDetHalfLengthCmd->SetDefaultUnit("mm");
147   fSetPhotonDetHalfLengthCmd->AvailableForStat    161   fSetPhotonDetHalfLengthCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
148   fSetPhotonDetHalfLengthCmd->SetToBeBroadcast    162   fSetPhotonDetHalfLengthCmd->SetToBeBroadcasted(false);
149                                                   163 
150   fSetGapCmd = new G4UIcmdWithADoubleAndUnit("    164   fSetGapCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setGap", this);
151   fSetGapCmd->SetGuidance("Set the distance be    165   fSetGapCmd->SetGuidance("Set the distance between PhotonDet and fiber end");
152   fSetGapCmd->SetParameterName("theta", false)    166   fSetGapCmd->SetParameterName("theta", false);
153   fSetGapCmd->SetUnitCategory("Length");          167   fSetGapCmd->SetUnitCategory("Length");
154   fSetGapCmd->SetDefaultUnit("mm");               168   fSetGapCmd->SetDefaultUnit("mm");
155   fSetGapCmd->SetRange("theta>=0.");              169   fSetGapCmd->SetRange("theta>=0.");
156   fSetGapCmd->AvailableForStates(G4State_PreIn    170   fSetGapCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
157   fSetGapCmd->SetToBeBroadcasted(false);          171   fSetGapCmd->SetToBeBroadcasted(false);
158                                                   172 
159   fSetPhotonDetAlignmentCmd = new G4UIcmdWithA << 173   fSetPhotonDetAlignmentCmd =
160   fSetPhotonDetAlignmentCmd->SetGuidance("Set  << 174     new G4UIcmdWithADoubleAndUnit("/WLS/setAlignment", this);
                                                   >> 175   fSetPhotonDetAlignmentCmd->SetGuidance(
                                                   >> 176     "Set the deviation of PhotonDet from z axis");
161   fSetPhotonDetAlignmentCmd->SetParameterName(    177   fSetPhotonDetAlignmentCmd->SetParameterName("theta", false);
162   fSetPhotonDetAlignmentCmd->SetUnitCategory("    178   fSetPhotonDetAlignmentCmd->SetUnitCategory("Angle");
163   fSetPhotonDetAlignmentCmd->SetDefaultUnit("d    179   fSetPhotonDetAlignmentCmd->SetDefaultUnit("deg");
164   fSetPhotonDetAlignmentCmd->SetRange("theta>-    180   fSetPhotonDetAlignmentCmd->SetRange("theta>-90. && theta<90.");
165   fSetPhotonDetAlignmentCmd->AvailableForState    181   fSetPhotonDetAlignmentCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
166   fSetPhotonDetAlignmentCmd->SetToBeBroadcaste    182   fSetPhotonDetAlignmentCmd->SetToBeBroadcasted(false);
167                                                   183 
168   fSetMirrorCmd = new G4UIcmdWithABool("/WLS/s    184   fSetMirrorCmd = new G4UIcmdWithABool("/WLS/setMirror", this);
169   fSetMirrorCmd->SetGuidance("Place a mirror a    185   fSetMirrorCmd->SetGuidance("Place a mirror at the end of the fiber");
170   fSetMirrorCmd->AvailableForStates(G4State_Pr    186   fSetMirrorCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
171   fSetMirrorCmd->SetToBeBroadcasted(false);       187   fSetMirrorCmd->SetToBeBroadcasted(false);
172                                                   188 
173   fSetBarLengthCmd = new G4UIcmdWithADoubleAnd    189   fSetBarLengthCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setBarLength", this);
174   fSetBarLengthCmd->SetGuidance("Set the lengt    190   fSetBarLengthCmd->SetGuidance("Set the length of the scintillator bar");
175   fSetBarLengthCmd->SetParameterName("length",    191   fSetBarLengthCmd->SetParameterName("length", false);
176   fSetBarLengthCmd->SetRange("length>0.");        192   fSetBarLengthCmd->SetRange("length>0.");
177   fSetBarLengthCmd->SetUnitCategory("Length");    193   fSetBarLengthCmd->SetUnitCategory("Length");
178   fSetBarLengthCmd->SetDefaultUnit("mm");         194   fSetBarLengthCmd->SetDefaultUnit("mm");
179   fSetBarLengthCmd->AvailableForStates(G4State    195   fSetBarLengthCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
180   fSetBarLengthCmd->SetToBeBroadcasted(false);    196   fSetBarLengthCmd->SetToBeBroadcasted(false);
181                                                   197 
182   fSetBarBaseCmd = new G4UIcmdWithADoubleAndUn    198   fSetBarBaseCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setBarBase", this);
183   fSetBarBaseCmd->SetGuidance("Set the side le    199   fSetBarBaseCmd->SetGuidance("Set the side length of the scintillator bar");
184   fSetBarBaseCmd->SetParameterName("length", f    200   fSetBarBaseCmd->SetParameterName("length", false);
185   fSetBarBaseCmd->SetRange("length>0.");          201   fSetBarBaseCmd->SetRange("length>0.");
186   fSetBarBaseCmd->SetUnitCategory("Length");      202   fSetBarBaseCmd->SetUnitCategory("Length");
187   fSetBarBaseCmd->SetDefaultUnit("mm");           203   fSetBarBaseCmd->SetDefaultUnit("mm");
188   fSetBarBaseCmd->AvailableForStates(G4State_P    204   fSetBarBaseCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
189   fSetBarBaseCmd->SetToBeBroadcasted(false);      205   fSetBarBaseCmd->SetToBeBroadcasted(false);
190                                                   206 
191   fSetHoleRadiusCmd = new G4UIcmdWithADoubleAn    207   fSetHoleRadiusCmd = new G4UIcmdWithADoubleAndUnit("/WLS/setHoleRadius", this);
192   fSetHoleRadiusCmd->SetGuidance("Set the radi    208   fSetHoleRadiusCmd->SetGuidance("Set the radius of the fiber hole");
193   fSetHoleRadiusCmd->SetParameterName("radius"    209   fSetHoleRadiusCmd->SetParameterName("radius", false);
194   fSetHoleRadiusCmd->SetRange("radius>0.");       210   fSetHoleRadiusCmd->SetRange("radius>0.");
195   fSetHoleRadiusCmd->SetUnitCategory("Length")    211   fSetHoleRadiusCmd->SetUnitCategory("Length");
196   fSetHoleRadiusCmd->SetDefaultUnit("mm");        212   fSetHoleRadiusCmd->SetDefaultUnit("mm");
197   fSetHoleRadiusCmd->AvailableForStates(G4Stat    213   fSetHoleRadiusCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
198   fSetHoleRadiusCmd->SetToBeBroadcasted(false)    214   fSetHoleRadiusCmd->SetToBeBroadcasted(false);
199                                                   215 
200   fSetCoatingThicknessCmd = new G4UIcmdWithADo << 216   fSetCoatingThicknessCmd =
201   fSetCoatingThicknessCmd->SetGuidance("Set th << 217     new G4UIcmdWithADoubleAndUnit("/WLS/setCoatingThickness", this);
                                                   >> 218   fSetCoatingThicknessCmd->SetGuidance(
                                                   >> 219     "Set thickness of the coating on the bars");
202   fSetCoatingThicknessCmd->SetParameterName("t    220   fSetCoatingThicknessCmd->SetParameterName("thick", false);
203   fSetCoatingThicknessCmd->SetUnitCategory("Le    221   fSetCoatingThicknessCmd->SetUnitCategory("Length");
204   fSetCoatingThicknessCmd->SetDefaultUnit("mm"    222   fSetCoatingThicknessCmd->SetDefaultUnit("mm");
205   fSetCoatingThicknessCmd->SetRange("thick>=0.    223   fSetCoatingThicknessCmd->SetRange("thick>=0.");
206   fSetCoatingThicknessCmd->AvailableForStates(    224   fSetCoatingThicknessCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
207   fSetCoatingThicknessCmd->SetToBeBroadcasted(    225   fSetCoatingThicknessCmd->SetToBeBroadcasted(false);
208                                                   226 
209   fSetCoatingRadiusCmd = new G4UIcmdWithADoubl << 227   fSetCoatingRadiusCmd =
210   fSetCoatingRadiusCmd->SetGuidance("Set inner << 228     new G4UIcmdWithADoubleAndUnit("/WLS/setCoatingRadius", this);
                                                   >> 229   fSetCoatingRadiusCmd->SetGuidance(
                                                   >> 230     "Set inner radius of the corner bar coating");
211   fSetCoatingRadiusCmd->SetParameterName("crad    231   fSetCoatingRadiusCmd->SetParameterName("cradius", false);
212   fSetCoatingRadiusCmd->SetUnitCategory("Lengt    232   fSetCoatingRadiusCmd->SetUnitCategory("Length");
213   fSetCoatingRadiusCmd->SetDefaultUnit("mm");     233   fSetCoatingRadiusCmd->SetDefaultUnit("mm");
214   fSetCoatingRadiusCmd->SetRange("cradius>=0."    234   fSetCoatingRadiusCmd->SetRange("cradius>=0.");
215   fSetCoatingRadiusCmd->AvailableForStates(G4S    235   fSetCoatingRadiusCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
216   fSetCoatingRadiusCmd->SetToBeBroadcasted(fal    236   fSetCoatingRadiusCmd->SetToBeBroadcasted(false);
217 }                                                 237 }
218                                                   238 
219 //....oooOO0OOooo........oooOO0OOooo........oo    239 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
220                                                   240 
221 WLSDetectorMessenger::~WLSDetectorMessenger()     241 WLSDetectorMessenger::~WLSDetectorMessenger()
222 {                                                 242 {
223   delete fDetDir;                                 243   delete fDetDir;
224                                                   244 
225   delete fSetBarLengthCmd;                        245   delete fSetBarLengthCmd;
226   delete fSetBarBaseCmd;                          246   delete fSetBarBaseCmd;
227   delete fSetClad1RadiusCmd;                      247   delete fSetClad1RadiusCmd;
228   delete fSetClad2RadiusCmd;                      248   delete fSetClad2RadiusCmd;
229   delete fSetCoatingThicknessCmd;                 249   delete fSetCoatingThicknessCmd;
230   delete fSetCoatingRadiusCmd;                    250   delete fSetCoatingRadiusCmd;
231   delete fSetGapCmd;                              251   delete fSetGapCmd;
232   delete fSetHoleRadiusCmd;                       252   delete fSetHoleRadiusCmd;
233   delete fSetMirrorCmd;                           253   delete fSetMirrorCmd;
234   delete fSetMirrorPolishCmd;                     254   delete fSetMirrorPolishCmd;
235   delete fSetMirrorReflectivityCmd;               255   delete fSetMirrorReflectivityCmd;
236   delete fSetNumOfCladLayersCmd;                  256   delete fSetNumOfCladLayersCmd;
237   delete fSetPhotonDetAlignmentCmd;               257   delete fSetPhotonDetAlignmentCmd;
238   delete fSetPhotonDetGeometryCmd;                258   delete fSetPhotonDetGeometryCmd;
239   delete fSetPhotonDetHalfLengthCmd;              259   delete fSetPhotonDetHalfLengthCmd;
240   delete fSetPhotonDetPolishCmd;                  260   delete fSetPhotonDetPolishCmd;
241   delete fSetPhotonDetReflectivityCmd;            261   delete fSetPhotonDetReflectivityCmd;
242   delete fSetSurfaceRoughnessCmd;                 262   delete fSetSurfaceRoughnessCmd;
243   delete fSetWLSLengthCmd;                        263   delete fSetWLSLengthCmd;
244   delete fSetWLSRadiusCmd;                        264   delete fSetWLSRadiusCmd;
245   delete fSetXYRatioCmd;                          265   delete fSetXYRatioCmd;
246 }                                                 266 }
247                                                   267 
248 //....oooOO0OOooo........oooOO0OOooo........oo    268 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
249                                                   269 
250 void WLSDetectorMessenger::SetNewValue(G4UIcom    270 void WLSDetectorMessenger::SetNewValue(G4UIcommand* command, G4String val)
251 {                                                 271 {
252   if (command == fSetPhotonDetGeometryCmd) {   << 272   if(command == fSetPhotonDetGeometryCmd)
                                                   >> 273   {
253     fDetector->SetPhotonDetGeometry(val);         274     fDetector->SetPhotonDetGeometry(val);
254   }                                               275   }
255   else if (command == fSetNumOfCladLayersCmd)  << 276   else if(command == fSetNumOfCladLayersCmd)
                                                   >> 277   {
256     fDetector->SetNumberOfCladding(G4UIcmdWith    278     fDetector->SetNumberOfCladding(G4UIcmdWithAnInteger::GetNewIntValue(val));
257   }                                               279   }
258   else if (command == fSetSurfaceRoughnessCmd) << 280   else if(command == fSetSurfaceRoughnessCmd)
                                                   >> 281   {
259     fDetector->SetSurfaceRoughness(G4UIcmdWith    282     fDetector->SetSurfaceRoughness(G4UIcmdWithADouble::GetNewDoubleValue(val));
260   }                                               283   }
261   else if (command == fSetXYRatioCmd) {        << 284   else if(command == fSetXYRatioCmd)
                                                   >> 285   {
262     fDetector->SetXYRatio(G4UIcmdWithADouble::    286     fDetector->SetXYRatio(G4UIcmdWithADouble::GetNewDoubleValue(val));
263   }                                               287   }
264   else if (command == fSetMirrorPolishCmd) {   << 288   else if(command == fSetMirrorPolishCmd)
                                                   >> 289   {
265     fDetector->SetMirrorPolish(G4UIcmdWithADou    290     fDetector->SetMirrorPolish(G4UIcmdWithADouble::GetNewDoubleValue(val));
266   }                                               291   }
267   else if (command == fSetMirrorReflectivityCm << 292   else if(command == fSetMirrorReflectivityCmd)
268     fDetector->SetMirrorReflectivity(G4UIcmdWi << 293   {
                                                   >> 294     fDetector->SetMirrorReflectivity(
                                                   >> 295       G4UIcmdWithADouble::GetNewDoubleValue(val));
269   }                                               296   }
270   else if (command == fSetPhotonDetPolishCmd)  << 297   else if(command == fSetPhotonDetPolishCmd)
                                                   >> 298   {
271     fDetector->SetPhotonDetPolish(G4UIcmdWithA    299     fDetector->SetPhotonDetPolish(G4UIcmdWithADouble::GetNewDoubleValue(val));
272   }                                               300   }
273   else if (command == fSetPhotonDetReflectivit << 301   else if(command == fSetPhotonDetReflectivityCmd)
274     fDetector->SetPhotonDetReflectivity(G4UIcm << 302   {
                                                   >> 303     fDetector->SetPhotonDetReflectivity(
                                                   >> 304       G4UIcmdWithADouble::GetNewDoubleValue(val));
275   }                                               305   }
276   else if (command == fSetWLSLengthCmd) {      << 306   else if(command == fSetWLSLengthCmd)
                                                   >> 307   {
277     fDetector->SetWLSLength(G4UIcmdWithADouble    308     fDetector->SetWLSLength(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
278   }                                               309   }
279   else if (command == fSetWLSRadiusCmd) {      << 310   else if(command == fSetWLSRadiusCmd)
                                                   >> 311   {
280     fDetector->SetWLSRadius(G4UIcmdWithADouble    312     fDetector->SetWLSRadius(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
281   }                                               313   }
282   else if (command == fSetClad1RadiusCmd) {    << 314   else if(command == fSetClad1RadiusCmd)
283     fDetector->SetClad1Radius(G4UIcmdWithADoub << 315   {
284   }                                            << 316     fDetector->SetClad1Radius(
285   else if (command == fSetClad2RadiusCmd) {    << 317       G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
286     fDetector->SetClad2Radius(G4UIcmdWithADoub << 318   }
                                                   >> 319   else if(command == fSetClad2RadiusCmd)
                                                   >> 320   {
                                                   >> 321     fDetector->SetClad2Radius(
                                                   >> 322       G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
                                                   >> 323   }
                                                   >> 324   else if(command == fSetPhotonDetHalfLengthCmd)
                                                   >> 325   {
                                                   >> 326     fDetector->SetPhotonDetHalfLength(
                                                   >> 327       G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
287   }                                               328   }
288   else if (command == fSetPhotonDetHalfLengthC << 329   else if(command == fSetGapCmd)
289     fDetector->SetPhotonDetHalfLength(G4UIcmdW << 330   {
290   }                                            << 
291   else if (command == fSetGapCmd) {            << 
292     fDetector->SetGap(G4UIcmdWithADoubleAndUni    331     fDetector->SetGap(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
293   }                                               332   }
294   else if (command == fSetPhotonDetAlignmentCm << 333   else if(command == fSetPhotonDetAlignmentCmd)
295     fDetector->SetPhotonDetAlignment(G4UIcmdWi << 334   {
                                                   >> 335     fDetector->SetPhotonDetAlignment(
                                                   >> 336       G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
296   }                                               337   }
297   else if (command == fSetMirrorCmd) {         << 338   else if(command == fSetMirrorCmd)
                                                   >> 339   {
298     fDetector->SetMirror(G4UIcmdWithABool::Get    340     fDetector->SetMirror(G4UIcmdWithABool::GetNewBoolValue(val));
299   }                                               341   }
300   else if (command == fSetBarLengthCmd) {      << 342   else if(command == fSetBarLengthCmd)
                                                   >> 343   {
301     fDetector->SetBarLength(G4UIcmdWithADouble    344     fDetector->SetBarLength(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
302   }                                               345   }
303   else if (command == fSetBarBaseCmd) {        << 346   else if(command == fSetBarBaseCmd)
                                                   >> 347   {
304     fDetector->SetBarBase(G4UIcmdWithADoubleAn    348     fDetector->SetBarBase(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
305   }                                               349   }
306   else if (command == fSetHoleRadiusCmd) {     << 350   else if(command == fSetHoleRadiusCmd)
307     fDetector->SetHoleRadius(G4UIcmdWithADoubl << 351   {
308   }                                            << 352     fDetector->SetHoleRadius(
309   else if (command == fSetCoatingThicknessCmd) << 353       G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
310     fDetector->SetCoatingThickness(G4UIcmdWith << 354   }
311   }                                            << 355   else if(command == fSetCoatingThicknessCmd)
312   else if (command == fSetCoatingRadiusCmd) {  << 356   {
313     fDetector->SetCoatingRadius(G4UIcmdWithADo << 357     fDetector->SetCoatingThickness(
                                                   >> 358       G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
                                                   >> 359   }
                                                   >> 360   else if(command == fSetCoatingRadiusCmd)
                                                   >> 361   {
                                                   >> 362     fDetector->SetCoatingRadius(
                                                   >> 363       G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val));
314   }                                               364   }
315 }                                                 365 }
316                                                   366