Geant4 Cross Reference |
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 "G4UIdirectory.hh" 33 #include "G4UIcmdWithABool.hh" 34 #include "G4UIcmdWithABool.hh" 34 #include "G4UIcmdWithADouble.hh" << 35 #include "G4UIcmdWithADoubleAndUnit.hh" << 36 #include "G4UIcmdWithAString.hh" 35 #include "G4UIcmdWithAString.hh" >> 36 #include "G4UIcmdWithADouble.hh" 37 #include "G4UIcmdWithAnInteger.hh" 37 #include "G4UIcmdWithAnInteger.hh" >> 38 #include "G4UIcmdWithADoubleAndUnit.hh" 38 #include "G4UIcmdWithoutParameter.hh" 39 #include "G4UIcmdWithoutParameter.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-> >> 52 SetGuidance("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); 65 fSetSurfaceRoughnessCmd->SetParameterName("r << 69 fSetSurfaceRoughnessCmd-> >> 70 SetGuidance("Set the roughness between Clad1 and WLS Fiber"); >> 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); 100 fSetPhotonDetReflectivityCmd->SetParameterNa << 108 fSetPhotonDetReflectivityCmd-> >> 109 SetGuidance("Set the reflectivity of the mirror"); >> 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); 143 fSetPhotonDetHalfLengthCmd->SetParameterName << 155 fSetPhotonDetHalfLengthCmd-> >> 156 SetGuidance("Set the half length of PhotonDet detector"); >> 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); 161 fSetPhotonDetAlignmentCmd->SetParameterName( << 175 fSetPhotonDetAlignmentCmd-> >> 176 SetGuidance("Set the deviation of PhotonDet from z axis"); >> 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); 202 fSetCoatingThicknessCmd->SetParameterName("t << 218 fSetCoatingThicknessCmd-> >> 219 SetGuidance("Set thickness of the coating on the bars"); >> 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); 211 fSetCoatingRadiusCmd->SetParameterName("crad << 229 fSetCoatingRadiusCmd-> >> 230 SetGuidance("Set inner radius of the corner bar coating"); >> 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 fSetPhotonDetGeometryCmd; 226 delete fSetBarBaseCmd; << 246 delete fSetNumOfCladLayersCmd; >> 247 delete fSetWLSLengthCmd; >> 248 delete fSetWLSRadiusCmd; 227 delete fSetClad1RadiusCmd; 249 delete fSetClad1RadiusCmd; 228 delete fSetClad2RadiusCmd; 250 delete fSetClad2RadiusCmd; 229 delete fSetCoatingThicknessCmd; << 251 delete fSetPhotonDetHalfLengthCmd; 230 delete fSetCoatingRadiusCmd; << 231 delete fSetGapCmd; 252 delete fSetGapCmd; 232 delete fSetHoleRadiusCmd; << 233 delete fSetMirrorCmd; << 234 delete fSetMirrorPolishCmd; << 235 delete fSetMirrorReflectivityCmd; << 236 delete fSetNumOfCladLayersCmd; << 237 delete fSetPhotonDetAlignmentCmd; 253 delete fSetPhotonDetAlignmentCmd; 238 delete fSetPhotonDetGeometryCmd; << 239 delete fSetPhotonDetHalfLengthCmd; << 240 delete fSetPhotonDetPolishCmd; << 241 delete fSetPhotonDetReflectivityCmd; << 242 delete fSetSurfaceRoughnessCmd; 254 delete fSetSurfaceRoughnessCmd; 243 delete fSetWLSLengthCmd; << 255 delete fSetMirrorPolishCmd; 244 delete fSetWLSRadiusCmd; << 256 delete fSetMirrorReflectivityCmd; 245 delete fSetXYRatioCmd; 257 delete fSetXYRatioCmd; >> 258 delete fSetMirrorCmd; >> 259 delete fSetBarLengthCmd; >> 260 delete fSetBarBaseCmd; >> 261 delete fSetHoleRadiusCmd; >> 262 delete fSetCoatingThicknessCmd; >> 263 delete fSetCoatingRadiusCmd; 246 } 264 } 247 265 248 //....oooOO0OOooo........oooOO0OOooo........oo 266 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 249 267 250 void WLSDetectorMessenger::SetNewValue(G4UIcom << 268 void WLSDetectorMessenger::SetNewValue(G4UIcommand* command,G4String val) 251 { 269 { 252 if (command == fSetPhotonDetGeometryCmd) { << 270 if( command == fSetPhotonDetGeometryCmd ) { >> 271 253 fDetector->SetPhotonDetGeometry(val); 272 fDetector->SetPhotonDetGeometry(val); 254 } 273 } 255 else if (command == fSetNumOfCladLayersCmd) << 274 else if( command == fSetNumOfCladLayersCmd ) { >> 275 256 fDetector->SetNumberOfCladding(G4UIcmdWith 276 fDetector->SetNumberOfCladding(G4UIcmdWithAnInteger::GetNewIntValue(val)); 257 } 277 } 258 else if (command == fSetSurfaceRoughnessCmd) << 278 else if( command == fSetSurfaceRoughnessCmd ) { >> 279 259 fDetector->SetSurfaceRoughness(G4UIcmdWith 280 fDetector->SetSurfaceRoughness(G4UIcmdWithADouble::GetNewDoubleValue(val)); 260 } 281 } 261 else if (command == fSetXYRatioCmd) { << 282 else if( command == fSetXYRatioCmd ) { >> 283 262 fDetector->SetXYRatio(G4UIcmdWithADouble:: 284 fDetector->SetXYRatio(G4UIcmdWithADouble::GetNewDoubleValue(val)); 263 } 285 } 264 else if (command == fSetMirrorPolishCmd) { << 286 else if( command == fSetMirrorPolishCmd ) { >> 287 265 fDetector->SetMirrorPolish(G4UIcmdWithADou 288 fDetector->SetMirrorPolish(G4UIcmdWithADouble::GetNewDoubleValue(val)); 266 } 289 } 267 else if (command == fSetMirrorReflectivityCm << 290 else if( command == fSetMirrorReflectivityCmd ) { 268 fDetector->SetMirrorReflectivity(G4UIcmdWi << 291 >> 292 fDetector-> >> 293 SetMirrorReflectivity(G4UIcmdWithADouble::GetNewDoubleValue(val)); 269 } 294 } 270 else if (command == fSetPhotonDetPolishCmd) << 295 else if( command == fSetPhotonDetPolishCmd ) { >> 296 271 fDetector->SetPhotonDetPolish(G4UIcmdWithA 297 fDetector->SetPhotonDetPolish(G4UIcmdWithADouble::GetNewDoubleValue(val)); 272 } 298 } 273 else if (command == fSetPhotonDetReflectivit << 299 else if( command == fSetPhotonDetReflectivityCmd ) { 274 fDetector->SetPhotonDetReflectivity(G4UIcm << 300 >> 301 fDetector-> >> 302 SetPhotonDetReflectivity(G4UIcmdWithADouble::GetNewDoubleValue(val)); 275 } 303 } 276 else if (command == fSetWLSLengthCmd) { << 304 else if( command == fSetWLSLengthCmd ) { >> 305 277 fDetector->SetWLSLength(G4UIcmdWithADouble 306 fDetector->SetWLSLength(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val)); 278 } 307 } 279 else if (command == fSetWLSRadiusCmd) { << 308 else if( command == fSetWLSRadiusCmd ) { >> 309 280 fDetector->SetWLSRadius(G4UIcmdWithADouble 310 fDetector->SetWLSRadius(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val)); 281 } 311 } 282 else if (command == fSetClad1RadiusCmd) { << 312 else if( command == fSetClad1RadiusCmd ) { 283 fDetector->SetClad1Radius(G4UIcmdWithADoub << 313 >> 314 fDetector-> >> 315 SetClad1Radius(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val)); 284 } 316 } 285 else if (command == fSetClad2RadiusCmd) { << 317 else if( command == fSetClad2RadiusCmd ) { 286 fDetector->SetClad2Radius(G4UIcmdWithADoub << 318 >> 319 fDetector-> >> 320 SetClad2Radius(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val)); 287 } 321 } 288 else if (command == fSetPhotonDetHalfLengthC << 322 else if( command == fSetPhotonDetHalfLengthCmd ) { 289 fDetector->SetPhotonDetHalfLength(G4UIcmdW << 323 >> 324 fDetector-> >> 325 SetPhotonDetHalfLength(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val)); 290 } 326 } 291 else if (command == fSetGapCmd) { << 327 else if( command == fSetGapCmd ) { 292 fDetector->SetGap(G4UIcmdWithADoubleAndUni << 328 >> 329 fDetector->SetGap(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val)); 293 } 330 } 294 else if (command == fSetPhotonDetAlignmentCm << 331 else if( command == fSetPhotonDetAlignmentCmd ) { 295 fDetector->SetPhotonDetAlignment(G4UIcmdWi << 332 >> 333 fDetector-> >> 334 SetPhotonDetAlignment(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(val)); 296 } 335 } 297 else if (command == fSetMirrorCmd) { << 336 else if( command == fSetMirrorCmd ) { 298 fDetector->SetMirror(G4UIcmdWithABool::Get << 337 >> 338 fDetector->SetMirror(G4UIcmdWithABool::GetNewBoolValue(val)); 299 } 339 } 300 else if (command == fSetBarLengthCmd) { << 340 else if( command == fSetBarLengthCmd ) { 301 fDetector->SetBarLength(G4UIcmdWithADouble << 341 >> 342 fDetector->SetBarLength(G4UIcmdWithABool::GetNewBoolValue(val)); 302 } 343 } 303 else if (command == fSetBarBaseCmd) { << 344 else if( command == fSetBarBaseCmd ) { 304 fDetector->SetBarBase(G4UIcmdWithADoubleAn << 345 >> 346 fDetector->SetBarBase(G4UIcmdWithABool::GetNewBoolValue(val)); 305 } 347 } 306 else if (command == fSetHoleRadiusCmd) { << 348 else if( command == fSetHoleRadiusCmd ) { 307 fDetector->SetHoleRadius(G4UIcmdWithADoubl << 349 >> 350 fDetector->SetHoleRadius(G4UIcmdWithABool::GetNewBoolValue(val)); 308 } 351 } 309 else if (command == fSetCoatingThicknessCmd) << 352 else if( command == fSetCoatingThicknessCmd ) { 310 fDetector->SetCoatingThickness(G4UIcmdWith << 353 >> 354 fDetector->SetCoatingThickness(G4UIcmdWithABool::GetNewBoolValue(val)); 311 } 355 } 312 else if (command == fSetCoatingRadiusCmd) { << 356 else if( command == fSetCoatingRadiusCmd ) { 313 fDetector->SetCoatingRadius(G4UIcmdWithADo << 357 >> 358 fDetector->SetCoatingRadius(G4UIcmdWithABool::GetNewBoolValue(val)); 314 } 359 } 315 } 360 } 316 361