Geant4  10.02.p03
PassiveProtonBeamLineMessenger Class Reference

#include <PassiveProtonBeamLineMessenger.hh>

Inheritance diagram for PassiveProtonBeamLineMessenger:
Collaboration diagram for PassiveProtonBeamLineMessenger:

Public Member Functions

 PassiveProtonBeamLineMessenger (PassiveProtonBeamLine *)
 
 ~PassiveProtonBeamLineMessenger ()
 
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

PassiveProtonBeamLinepassiveProton
 
G4UIdirectorychangeTheBeamLineDir
 
G4UIcmdWithAStringchangeTheBeamLineNameCmd
 
G4UIdirectorymodulatorDir
 
G4UIdirectorybeamLineDir
 
G4UIdirectoryrangeShifterDir
 
G4UIdirectoryfirstScatteringFoilDir
 
G4UIdirectorysecondScatteringFoilDir
 
G4UIdirectoryrangeStopperDir
 
G4UIdirectoryfinalCollimatorDir
 
G4UIcmdWithADoubleAndUnitmodulatorAngleCmd
 
G4UIcmdWithAStringrangeShifterMatCmd
 
G4UIcmdWithADoubleAndUnitrangeShifterXSizeCmd
 
G4UIcmdWithADoubleAndUnitrangeShifterXPositionCmd
 
G4UIcmdWithADoubleAndUnitfirstScatteringFoilXSizeCmd
 
G4UIcmdWithADoubleAndUnitsecondScatteringFoilXSizeCmd
 
G4UIcmdWithADoubleAndUnitouterRadiusStopperCmd
 
G4UIcmdWithADoubleAndUnitinnerRadiusFinalCollimatorCmd
 

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 41 of file PassiveProtonBeamLineMessenger.hh.

Constructor & Destructor Documentation

◆ PassiveProtonBeamLineMessenger()

PassiveProtonBeamLineMessenger::PassiveProtonBeamLineMessenger ( PassiveProtonBeamLine beamLine)

Definition at line 36 of file PassiveProtonBeamLineMessenger.cc.

37 :passiveProton(beamLine)
38 
39 {
40  changeTheBeamLineDir = new G4UIdirectory("/ChangeBeamLine/");
41  changeTheBeamLineDir -> SetGuidance("Command to change the transport beam line");
42 
43  changeTheBeamLineNameCmd = new G4UIcmdWithAString("/ChangeBeamLine/beamLineName",this);
44  changeTheBeamLineNameCmd -> SetGuidance("Insert the name of the beam line you want simulate");
45  changeTheBeamLineNameCmd -> SetParameterName("List",false);
46  changeTheBeamLineNameCmd -> AvailableForStates(G4State_PreInit);
47 
48  modulatorDir = new G4UIdirectory("/modulator/");
49  modulatorDir -> SetGuidance("Command to rotate the modulator wheel");
50 
51  beamLineDir = new G4UIdirectory("/beamLine/");
52  beamLineDir -> SetGuidance("set specification of range shifter");
53 
54  rangeShifterDir = new G4UIdirectory("/beamLine/RangeShifter/");
55  rangeShifterDir -> SetGuidance("set specification of range shifter");
56 
57  firstScatteringFoilDir = new G4UIdirectory("/beamLine/ScatteringFoil1/");
58  firstScatteringFoilDir -> SetGuidance("set specification of first scattering foil");
59 
60  secondScatteringFoilDir = new G4UIdirectory("/beamLine/ScatteringFoil2/");
61  secondScatteringFoilDir -> SetGuidance("set specification of second scattering foil");
62 
63  rangeStopperDir = new G4UIdirectory("/beamLine/Stopper/");
64  rangeStopperDir -> SetGuidance("set specification of stopper");
65 
66  finalCollimatorDir = new G4UIdirectory("/beamLine/FinalCollimator/");
67  finalCollimatorDir -> SetGuidance("set specification of final collimator");
68 
69  modulatorAngleCmd = new G4UIcmdWithADoubleAndUnit("/modulator/angle",this);
70  modulatorAngleCmd -> SetGuidance("Set Modulator Angle");
71  modulatorAngleCmd -> SetParameterName("Size",false);
72  modulatorAngleCmd -> SetRange("Size>=0.");
73  modulatorAngleCmd -> SetUnitCategory("Angle");
74  modulatorAngleCmd -> AvailableForStates(G4State_Idle);
75 
76  rangeShifterMatCmd = new G4UIcmdWithAString("/beamLine/RangeShifter/RSMat",this);
77  rangeShifterMatCmd -> SetGuidance("Set material of range shifter");
78  rangeShifterMatCmd -> SetParameterName("choice",false);
79  rangeShifterMatCmd -> AvailableForStates(G4State_Idle);
80 
81  rangeShifterXSizeCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/RangeShifter/thickness",this);
82  rangeShifterXSizeCmd -> SetGuidance("Set half of the thickness of range shifter along X axis");
83  rangeShifterXSizeCmd -> SetParameterName("Size",false);
84  rangeShifterXSizeCmd -> SetDefaultUnit("mm");
85  rangeShifterXSizeCmd -> SetUnitCandidates("mm cm m");
86  rangeShifterXSizeCmd -> AvailableForStates(G4State_Idle);
87 
88  rangeShifterXPositionCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/RangeShifter/position",this);
89  rangeShifterXPositionCmd -> SetGuidance("Set position of range shifter");
90  rangeShifterXPositionCmd -> SetParameterName("Size",false);
91  rangeShifterXPositionCmd -> SetDefaultUnit("mm");
92  rangeShifterXPositionCmd -> SetUnitCandidates("mm cm m");
93  rangeShifterXPositionCmd -> AvailableForStates(G4State_Idle);
94 
95  firstScatteringFoilXSizeCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/ScatteringFoil1/thickness",this);
96  firstScatteringFoilXSizeCmd -> SetGuidance("Set half thickness of first scattering foil");
97  firstScatteringFoilXSizeCmd -> SetParameterName("Size",false);
98  firstScatteringFoilXSizeCmd -> SetDefaultUnit("mm");
99  firstScatteringFoilXSizeCmd -> SetUnitCandidates("mm cm m");
100  firstScatteringFoilXSizeCmd -> AvailableForStates(G4State_Idle);
101 
102  secondScatteringFoilXSizeCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/ScatteringFoil2/thickness",this);
103  secondScatteringFoilXSizeCmd -> SetGuidance("Set half thickness of second scattering foil");
104  secondScatteringFoilXSizeCmd -> SetParameterName("Size",false);
105  secondScatteringFoilXSizeCmd -> SetDefaultUnit("mm");
106  secondScatteringFoilXSizeCmd -> SetUnitCandidates("mm cm m");
107  secondScatteringFoilXSizeCmd -> AvailableForStates(G4State_Idle);
108 
109  outerRadiusStopperCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/Stopper/outRadius",this);
110  outerRadiusStopperCmd -> SetGuidance("Set size of outer radius");
111  outerRadiusStopperCmd -> SetParameterName("Size",false);
112  outerRadiusStopperCmd -> SetDefaultUnit("mm");
113  outerRadiusStopperCmd -> SetUnitCandidates("mm cm m");
114  outerRadiusStopperCmd -> AvailableForStates(G4State_Idle);
115 
116  innerRadiusFinalCollimatorCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/FinalCollimator/halfInnerRad",this);
117  innerRadiusFinalCollimatorCmd -> SetGuidance("Set size of inner radius ( max 21.5 mm)");
118  innerRadiusFinalCollimatorCmd -> SetParameterName("Size",false);
119  innerRadiusFinalCollimatorCmd -> SetDefaultUnit("mm");
120  innerRadiusFinalCollimatorCmd -> SetUnitCandidates("mm cm m");
121  innerRadiusFinalCollimatorCmd -> AvailableForStates(G4State_Idle);
122 }
G4UIcmdWithADoubleAndUnit * rangeShifterXSizeCmd
G4UIcmdWithADoubleAndUnit * firstScatteringFoilXSizeCmd
G4UIcmdWithADoubleAndUnit * rangeShifterXPositionCmd
G4UIcmdWithADoubleAndUnit * modulatorAngleCmd
G4UIcmdWithADoubleAndUnit * innerRadiusFinalCollimatorCmd
G4UIcmdWithADoubleAndUnit * outerRadiusStopperCmd
G4UIcmdWithADoubleAndUnit * secondScatteringFoilXSizeCmd

◆ ~PassiveProtonBeamLineMessenger()

PassiveProtonBeamLineMessenger::~PassiveProtonBeamLineMessenger ( )

Definition at line 124 of file PassiveProtonBeamLineMessenger.cc.

125 {
127  delete outerRadiusStopperCmd;
131  delete rangeShifterXSizeCmd;
132  delete rangeShifterMatCmd;
133  delete modulatorAngleCmd;
134  delete finalCollimatorDir;
135  delete rangeStopperDir;
137  delete firstScatteringFoilDir;
138  delete rangeShifterDir;
139  delete beamLineDir;
140  delete modulatorDir;
141 }
G4UIcmdWithADoubleAndUnit * rangeShifterXSizeCmd
G4UIcmdWithADoubleAndUnit * firstScatteringFoilXSizeCmd
G4UIcmdWithADoubleAndUnit * rangeShifterXPositionCmd
G4UIcmdWithADoubleAndUnit * modulatorAngleCmd
G4UIcmdWithADoubleAndUnit * innerRadiusFinalCollimatorCmd
G4UIcmdWithADoubleAndUnit * outerRadiusStopperCmd
G4UIcmdWithADoubleAndUnit * secondScatteringFoilXSizeCmd

Member Function Documentation

◆ SetNewValue()

void PassiveProtonBeamLineMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 146 of file PassiveProtonBeamLineMessenger.cc.

147 {
148  if( command == modulatorAngleCmd )
149  { passiveProton -> SetModulatorAngle
150  (modulatorAngleCmd -> GetNewDoubleValue(newValue));}
151 
152  else if( command == rangeShifterMatCmd )
153  { passiveProton -> SetRSMaterial(newValue);}
154 
155  else if( command == rangeShifterXSizeCmd )
156  { passiveProton -> SetRangeShifterXSize
157  (rangeShifterXSizeCmd -> GetNewDoubleValue(newValue));}
158 
159  else if( command == rangeShifterXPositionCmd )
160  { passiveProton -> SetRangeShifterXPosition
161  (rangeShifterXPositionCmd -> GetNewDoubleValue(newValue));}
162 
163  else if( command == firstScatteringFoilXSizeCmd )
164  { passiveProton -> SetFirstScatteringFoilXSize
165  (firstScatteringFoilXSizeCmd -> GetNewDoubleValue(newValue));}
166 
167  else if( command == secondScatteringFoilXSizeCmd )
168  { passiveProton -> SetSecondScatteringFoilXSize
169  (secondScatteringFoilXSizeCmd -> GetNewDoubleValue(newValue));}
170 
171  else if( command == outerRadiusStopperCmd )
172  { passiveProton -> SetOuterRadiusStopper(
173  outerRadiusStopperCmd -> GetNewDoubleValue(newValue));}
174 
175  else if( command == innerRadiusFinalCollimatorCmd )
176  { passiveProton -> SetInnerRadiusFinalCollimator
177  (innerRadiusFinalCollimatorCmd -> GetNewDoubleValue(newValue));}
178 }
G4UIcmdWithADoubleAndUnit * rangeShifterXSizeCmd
G4UIcmdWithADoubleAndUnit * firstScatteringFoilXSizeCmd
G4UIcmdWithADoubleAndUnit * rangeShifterXPositionCmd
G4UIcmdWithADoubleAndUnit * modulatorAngleCmd
G4UIcmdWithADoubleAndUnit * innerRadiusFinalCollimatorCmd
G4UIcmdWithADoubleAndUnit * outerRadiusStopperCmd
G4UIcmdWithADoubleAndUnit * secondScatteringFoilXSizeCmd

Member Data Documentation

◆ beamLineDir

G4UIdirectory* PassiveProtonBeamLineMessenger::beamLineDir
private

Definition at line 58 of file PassiveProtonBeamLineMessenger.hh.

◆ changeTheBeamLineDir

G4UIdirectory* PassiveProtonBeamLineMessenger::changeTheBeamLineDir
private

Definition at line 54 of file PassiveProtonBeamLineMessenger.hh.

◆ changeTheBeamLineNameCmd

G4UIcmdWithAString* PassiveProtonBeamLineMessenger::changeTheBeamLineNameCmd
private

Definition at line 55 of file PassiveProtonBeamLineMessenger.hh.

◆ finalCollimatorDir

G4UIdirectory* PassiveProtonBeamLineMessenger::finalCollimatorDir
private

Definition at line 72 of file PassiveProtonBeamLineMessenger.hh.

◆ firstScatteringFoilDir

G4UIdirectory* PassiveProtonBeamLineMessenger::firstScatteringFoilDir
private

Definition at line 63 of file PassiveProtonBeamLineMessenger.hh.

◆ firstScatteringFoilXSizeCmd

G4UIcmdWithADoubleAndUnit* PassiveProtonBeamLineMessenger::firstScatteringFoilXSizeCmd
private

Definition at line 90 of file PassiveProtonBeamLineMessenger.hh.

◆ innerRadiusFinalCollimatorCmd

G4UIcmdWithADoubleAndUnit* PassiveProtonBeamLineMessenger::innerRadiusFinalCollimatorCmd
private

Definition at line 102 of file PassiveProtonBeamLineMessenger.hh.

◆ modulatorAngleCmd

G4UIcmdWithADoubleAndUnit* PassiveProtonBeamLineMessenger::modulatorAngleCmd
private

Definition at line 75 of file PassiveProtonBeamLineMessenger.hh.

◆ modulatorDir

G4UIdirectory* PassiveProtonBeamLineMessenger::modulatorDir
private

Definition at line 57 of file PassiveProtonBeamLineMessenger.hh.

◆ outerRadiusStopperCmd

G4UIcmdWithADoubleAndUnit* PassiveProtonBeamLineMessenger::outerRadiusStopperCmd
private

Definition at line 98 of file PassiveProtonBeamLineMessenger.hh.

◆ passiveProton

PassiveProtonBeamLine* PassiveProtonBeamLineMessenger::passiveProton
private

Definition at line 52 of file PassiveProtonBeamLineMessenger.hh.

◆ rangeShifterDir

G4UIdirectory* PassiveProtonBeamLineMessenger::rangeShifterDir
private

Definition at line 60 of file PassiveProtonBeamLineMessenger.hh.

◆ rangeShifterMatCmd

G4UIcmdWithAString* PassiveProtonBeamLineMessenger::rangeShifterMatCmd
private

Definition at line 78 of file PassiveProtonBeamLineMessenger.hh.

◆ rangeShifterXPositionCmd

G4UIcmdWithADoubleAndUnit* PassiveProtonBeamLineMessenger::rangeShifterXPositionCmd
private

Definition at line 86 of file PassiveProtonBeamLineMessenger.hh.

◆ rangeShifterXSizeCmd

G4UIcmdWithADoubleAndUnit* PassiveProtonBeamLineMessenger::rangeShifterXSizeCmd
private

Definition at line 82 of file PassiveProtonBeamLineMessenger.hh.

◆ rangeStopperDir

G4UIdirectory* PassiveProtonBeamLineMessenger::rangeStopperDir
private

Definition at line 69 of file PassiveProtonBeamLineMessenger.hh.

◆ secondScatteringFoilDir

G4UIdirectory* PassiveProtonBeamLineMessenger::secondScatteringFoilDir
private

Definition at line 66 of file PassiveProtonBeamLineMessenger.hh.

◆ secondScatteringFoilXSizeCmd

G4UIcmdWithADoubleAndUnit* PassiveProtonBeamLineMessenger::secondScatteringFoilXSizeCmd
private

Definition at line 94 of file PassiveProtonBeamLineMessenger.hh.


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