File indexing completed on 2025-01-31 09:22:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041 #include "Collimator100BeamLineMessenger.hh"
0042 #include "Collimator100BeamLine.hh"
0043 #include "G4UIdirectory.hh"
0044 #include "G4UIcmdWithADoubleAndUnit.hh"
0045 #include "G4UIcmdWithAString.hh"
0046
0047
0048 Collimator100BeamLineMessenger::Collimator100BeamLineMessenger(Collimator100BeamLine* beamLine)
0049 :collimator100(beamLine)
0050
0051 {
0052
0053 beamLineDir = new G4UIdirectory("/beamLine/");
0054 beamLineDir -> SetGuidance("set specification of range shifter");
0055
0056 FinalCollimatorIORTDir = new G4UIdirectory("/beamLine/FinalCollimatorIORT/");
0057 FinalCollimatorIORTDir -> SetGuidance("set specification of final collimator");
0058
0059 innerRadiusFinalCollimatorIORTCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/FinalCollimatorIORT/halfInnerRad",this);
0060 innerRadiusFinalCollimatorIORTCmd -> SetGuidance("Set size of inner radius ( max 21.5 mm)");
0061 innerRadiusFinalCollimatorIORTCmd -> SetParameterName("Size",false);
0062 innerRadiusFinalCollimatorIORTCmd -> SetDefaultUnit("mm");
0063 innerRadiusFinalCollimatorIORTCmd -> SetUnitCandidates("mm cm m");
0064 innerRadiusFinalCollimatorIORTCmd -> AvailableForStates(G4State_Idle);
0065
0066 OuterRadiusFinalCollimatorIORTCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/FinalCollimatorIORT/halfOuterRad",this);
0067 OuterRadiusFinalCollimatorIORTCmd -> SetGuidance("Set size of outer radius ( max 21.5 mm)");
0068 OuterRadiusFinalCollimatorIORTCmd -> SetParameterName("Size",false);
0069 OuterRadiusFinalCollimatorIORTCmd -> SetDefaultUnit("mm");
0070 OuterRadiusFinalCollimatorIORTCmd -> SetUnitCandidates("mm cm m");
0071 OuterRadiusFinalCollimatorIORTCmd -> AvailableForStates(G4State_Idle);
0072
0073 }
0074
0075 Collimator100BeamLineMessenger::~Collimator100BeamLineMessenger()
0076 {
0077
0078 delete OuterRadiusFinalCollimatorIORTCmd;
0079 delete innerRadiusFinalCollimatorIORTCmd;
0080 delete FinalCollimatorIORTDir;
0081 delete beamLineDir;
0082
0083
0084 }
0085
0086
0087
0088
0089 void Collimator100BeamLineMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
0090 {
0091
0092
0093 if( command == innerRadiusFinalCollimatorIORTCmd )
0094 { collimator100 -> SetInnerRadiusFinalCollimatorIORT
0095 (innerRadiusFinalCollimatorIORTCmd -> GetNewDoubleValue(newValue));}
0096
0097 else if( command == OuterRadiusFinalCollimatorIORTCmd )
0098 { collimator100 -> SetOuterRadiusFinalCollimatorIORT
0099 (OuterRadiusFinalCollimatorIORTCmd -> GetNewDoubleValue(newValue));}
0100
0101 }
0102