QwGeant4
QweakSimPMTOnlyMessenger Class Reference

#include <QweakSimPMTOnlyMessenger.hh>

Inherits G4UImessenger.

+ Collaboration diagram for QweakSimPMTOnlyMessenger:

Public Member Functions

 QweakSimPMTOnlyMessenger (QweakSimPMTOnly *)
 
 ~QweakSimPMTOnlyMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 

Private Attributes

QweakSimPMTOnlymyPMTOnly
 
G4UIdirectory * PMTOnlyDir
 
G4UIcmdWithAString * PMTOnly_SetMaterial_Cmd
 
G4UIcmdWithADoubleAndUnit * PMTOnly_SetCenterPositionInX_Cmd
 
G4UIcmdWithADoubleAndUnit * PMTOnly_SetCenterPositionInY_Cmd
 
G4UIcmdWithADoubleAndUnit * PMTOnly_SetCenterPositionInZ_Cmd
 
G4UIcmdWithoutParameter * PMTOnly_FindMotherCenter_Cmd
 
G4UIcmdWithADoubleAndUnit * PMTOnly_SetTiltAngleInX_Cmd
 
G4UIcmdWithADoubleAndUnit * PMTOnly_SetTiltAngleInY_Cmd
 
G4UIcmdWithADoubleAndUnit * PMTOnly_SetTiltAngleInZ_Cmd
 
G4UIcmdWithoutParameter * PMTOnly_SetEnabled_Cmd
 
G4UIcmdWithoutParameter * PMTOnly_SetDisabled_Cmd
 

Detailed Description

Definition at line 21 of file QweakSimPMTOnlyMessenger.hh.

Constructor & Destructor Documentation

QweakSimPMTOnlyMessenger::QweakSimPMTOnlyMessenger ( QweakSimPMTOnly thePMTOnly)

Definition at line 18 of file QweakSimPMTOnlyMessenger.cc.

References PMTOnly_FindMotherCenter_Cmd, PMTOnly_SetCenterPositionInX_Cmd, PMTOnly_SetCenterPositionInY_Cmd, PMTOnly_SetCenterPositionInZ_Cmd, PMTOnly_SetDisabled_Cmd, PMTOnly_SetEnabled_Cmd, PMTOnly_SetMaterial_Cmd, PMTOnly_SetTiltAngleInX_Cmd, PMTOnly_SetTiltAngleInY_Cmd, PMTOnly_SetTiltAngleInZ_Cmd, and PMTOnlyDir.

19 :myPMTOnly(thePMTOnly)
20 {
21 
22  PMTOnlyDir = new G4UIdirectory("/PMTOnly/");
23  PMTOnlyDir -> SetGuidance("Lead Glass Detector control.");
24 
25  //--- Material
26 
27  PMTOnly_SetMaterial_Cmd = new G4UIcmdWithAString("/PMTOnly/SetMaterial",this);
28  PMTOnly_SetMaterial_Cmd -> SetGuidance("Select Material of the PMTOnly.");
29  PMTOnly_SetMaterial_Cmd -> SetParameterName("choice",false);
30  PMTOnly_SetMaterial_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
31 
32  //--- Position
33  //--- Set
34  PMTOnly_SetCenterPositionInX_Cmd = new G4UIcmdWithADoubleAndUnit("/PMTOnly/SetCenterPositionInX",this);
35  PMTOnly_SetCenterPositionInX_Cmd -> SetGuidance("Set the X position of the PMTOnly");
36  PMTOnly_SetCenterPositionInX_Cmd -> SetParameterName("Size",true);
37  PMTOnly_SetCenterPositionInX_Cmd -> SetUnitCategory("Length");
38  PMTOnly_SetCenterPositionInX_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
39 
40  PMTOnly_SetCenterPositionInY_Cmd = new G4UIcmdWithADoubleAndUnit("/PMTOnly/SetCenterPositionInY",this);
41  PMTOnly_SetCenterPositionInY_Cmd -> SetGuidance("Set the Y position of the PMTOnly");
42  PMTOnly_SetCenterPositionInY_Cmd -> SetParameterName("Size",true);
43  PMTOnly_SetCenterPositionInY_Cmd -> SetUnitCategory("Length");
44  PMTOnly_SetCenterPositionInY_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
45 
46  PMTOnly_SetCenterPositionInZ_Cmd = new G4UIcmdWithADoubleAndUnit("/PMTOnly/SetCenterPositionInZ",this);
47  PMTOnly_SetCenterPositionInZ_Cmd -> SetGuidance("Set the Z position of the PMTOnly");
48  PMTOnly_SetCenterPositionInZ_Cmd -> SetParameterName("Size",true);
49  PMTOnly_SetCenterPositionInZ_Cmd -> SetUnitCategory("Length");
50  PMTOnly_SetCenterPositionInZ_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
51 
52  //--- Get
53  PMTOnly_FindMotherCenter_Cmd = new G4UIcmdWithoutParameter("/PMTOnly/FindMotherCenter", this);
54  PMTOnly_FindMotherCenter_Cmd -> SetGuidance("Find Center of PMTOnly Volumes");
55  PMTOnly_FindMotherCenter_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
56 
57  //--- Rotation
58 
59  PMTOnly_SetTiltAngleInX_Cmd = new G4UIcmdWithADoubleAndUnit("/PMTOnly/SetTiltAngleInX",this);
60  PMTOnly_SetTiltAngleInX_Cmd -> SetGuidance("Set the X tilting angle of the PMTOnly");
61  PMTOnly_SetTiltAngleInX_Cmd -> SetParameterName("Angle",true);
62  PMTOnly_SetTiltAngleInX_Cmd -> SetDefaultUnit("degree");
63  PMTOnly_SetTiltAngleInX_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
64 
65  PMTOnly_SetTiltAngleInY_Cmd = new G4UIcmdWithADoubleAndUnit("/PMTOnly/SetTiltAngleInY",this);
66  PMTOnly_SetTiltAngleInY_Cmd -> SetGuidance("Set the Y tilting angle of the PMTOnly");
67  PMTOnly_SetTiltAngleInY_Cmd -> SetParameterName("Angle",true);
68  PMTOnly_SetTiltAngleInY_Cmd -> SetDefaultUnit("degree");
69  PMTOnly_SetTiltAngleInY_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
70 
71  PMTOnly_SetTiltAngleInZ_Cmd = new G4UIcmdWithADoubleAndUnit("/PMTOnly/SetTiltAngleInZ",this);
72  PMTOnly_SetTiltAngleInZ_Cmd -> SetGuidance("Set the Z tilting angle of the PMTOnly");
73  PMTOnly_SetTiltAngleInZ_Cmd -> SetParameterName("Angle",true);
74  PMTOnly_SetTiltAngleInZ_Cmd -> SetDefaultUnit("degree");
75  PMTOnly_SetTiltAngleInZ_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
76 
77  //--- Enable
78 
79  PMTOnly_SetEnabled_Cmd = new G4UIcmdWithoutParameter("/PMTOnly/Enable",this);
80  PMTOnly_SetEnabled_Cmd -> SetGuidance("Enables the PMTOnly");
81  PMTOnly_SetEnabled_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
82 
83  //--- Disable
84 
85  PMTOnly_SetDisabled_Cmd = new G4UIcmdWithoutParameter("/PMTOnly/Disable",this);
86  PMTOnly_SetDisabled_Cmd -> SetGuidance("Disables the PMTOnly");
87  PMTOnly_SetDisabled_Cmd -> AvailableForStates(G4State_PreInit, G4State_Idle);
88 
89 }
G4UIcmdWithADoubleAndUnit * PMTOnly_SetTiltAngleInX_Cmd
G4UIcmdWithoutParameter * PMTOnly_FindMotherCenter_Cmd
G4UIcmdWithADoubleAndUnit * PMTOnly_SetTiltAngleInZ_Cmd
G4UIcmdWithAString * PMTOnly_SetMaterial_Cmd
G4UIcmdWithADoubleAndUnit * PMTOnly_SetCenterPositionInY_Cmd
G4UIcmdWithoutParameter * PMTOnly_SetDisabled_Cmd
G4UIcmdWithADoubleAndUnit * PMTOnly_SetCenterPositionInX_Cmd
G4UIcmdWithADoubleAndUnit * PMTOnly_SetCenterPositionInZ_Cmd
G4UIcmdWithoutParameter * PMTOnly_SetEnabled_Cmd
G4UIcmdWithADoubleAndUnit * PMTOnly_SetTiltAngleInY_Cmd
QweakSimPMTOnlyMessenger::~QweakSimPMTOnlyMessenger ( )

Definition at line 95 of file QweakSimPMTOnlyMessenger.cc.

References PMTOnly_FindMotherCenter_Cmd, PMTOnly_SetCenterPositionInX_Cmd, PMTOnly_SetCenterPositionInY_Cmd, PMTOnly_SetCenterPositionInZ_Cmd, PMTOnly_SetDisabled_Cmd, PMTOnly_SetEnabled_Cmd, PMTOnly_SetMaterial_Cmd, and PMTOnlyDir.

96 {
98 
102 
104 
107 
108  if (PMTOnlyDir) delete PMTOnlyDir;
109 
110 }
G4UIcmdWithoutParameter * PMTOnly_FindMotherCenter_Cmd
G4UIcmdWithAString * PMTOnly_SetMaterial_Cmd
G4UIcmdWithADoubleAndUnit * PMTOnly_SetCenterPositionInY_Cmd
G4UIcmdWithoutParameter * PMTOnly_SetDisabled_Cmd
G4UIcmdWithADoubleAndUnit * PMTOnly_SetCenterPositionInX_Cmd
G4UIcmdWithADoubleAndUnit * PMTOnly_SetCenterPositionInZ_Cmd
G4UIcmdWithoutParameter * PMTOnly_SetEnabled_Cmd

Member Function Documentation

void QweakSimPMTOnlyMessenger::SetNewValue ( G4UIcommand *  command,
G4String  newValue 
)

Definition at line 116 of file QweakSimPMTOnlyMessenger.cc.

References myPMTOnly, PMTOnly_FindMotherCenter_Cmd, PMTOnly_SetCenterPositionInX_Cmd, PMTOnly_SetCenterPositionInY_Cmd, PMTOnly_SetCenterPositionInZ_Cmd, PMTOnly_SetDisabled_Cmd, PMTOnly_SetEnabled_Cmd, PMTOnly_SetMaterial_Cmd, PMTOnly_SetTiltAngleInX_Cmd, PMTOnly_SetTiltAngleInY_Cmd, and PMTOnly_SetTiltAngleInZ_Cmd.

117 {
118  G4cout << "=== Calling QweakSimPMTOnlyMessenger::SetNewValue() " << newValue << G4endl;
119 
120  //--- Set New Material
121 
122  if (command == PMTOnly_SetMaterial_Cmd)
123  {
124  G4cout << "=== Messenger: Setting PMTOnly Material to " << newValue << G4endl;
125  myPMTOnly -> SetPMTOnly_Material(newValue);
126  }
127 
128  //--- Set New Position
129 
130  if (command == PMTOnly_SetCenterPositionInX_Cmd)
131  {
132  G4cout << "=== Messenger: Setting PMTOnly X position to " << newValue << G4endl;
133  myPMTOnly -> SetPMTOnly_CenterPositionInX(PMTOnly_SetCenterPositionInX_Cmd -> GetNewDoubleValue(newValue));
134  }
135 
136  if (command == PMTOnly_SetCenterPositionInY_Cmd)
137  {
138  G4cout << "=== Messenger: Setting PMTOnly Y position to " << newValue << G4endl;
139  myPMTOnly -> SetPMTOnly_CenterPositionInY(PMTOnly_SetCenterPositionInY_Cmd -> GetNewDoubleValue(newValue));
140  }
141 
142  if (command == PMTOnly_SetCenterPositionInZ_Cmd)
143  {
144  G4cout << "=== Messenger: Setting PMTOnly Z position to " << newValue << G4endl;
145  myPMTOnly -> SetPMTOnly_CenterPositionInZ(PMTOnly_SetCenterPositionInZ_Cmd -> GetNewDoubleValue(newValue));
146  }
147 
148 
149  //--- Find New Position
150  if (command == PMTOnly_FindMotherCenter_Cmd)
151  {
152  G4cout << "=== Messenger: Finding PMTOnly Center position" << G4endl;
153  myPMTOnly -> FindPMTOnly_MotherCenter();
154  }
155 
156  //--- Set New Tilting Anngle
157 
158  if (command == PMTOnly_SetTiltAngleInX_Cmd)
159  {
160  G4cout << "=== Messenger: Setting PMTOnly X tilting angle to " << newValue << G4endl;
161  myPMTOnly -> SetPMTOnly_TiltAngleInX(PMTOnly_SetTiltAngleInX_Cmd -> GetNewDoubleValue(newValue));
162  }
163 
164  if (command == PMTOnly_SetTiltAngleInY_Cmd)
165  {
166  G4cout << "=== Messenger: Setting PMTOnly Y tilting angle to " << newValue << G4endl;
167  myPMTOnly -> SetPMTOnly_TiltAngleInY(PMTOnly_SetTiltAngleInY_Cmd -> GetNewDoubleValue(newValue));
168  }
169 
170  if (command == PMTOnly_SetTiltAngleInZ_Cmd)
171  {
172  G4cout << "=== Messenger: Setting PMTOnly Z tilting angle to " << newValue << G4endl;
173  myPMTOnly -> SetPMTOnly_TiltAngleInZ(PMTOnly_SetTiltAngleInZ_Cmd -> GetNewDoubleValue(newValue));
174  }
175 
176  //--- Enable
177 
178  if (command == PMTOnly_SetEnabled_Cmd)
179  {
180  G4cout << "=== Messenger: ENABLE the PMTOnly" << G4endl;
181  myPMTOnly -> SetPMTOnly_Enabled();
182  }
183 
184  //----Disable
185 
186  if (command == PMTOnly_SetDisabled_Cmd)
187  {
188  G4cout << "=== Messenger: DISABLE the PMTOnly" << G4endl;
189  myPMTOnly -> SetPMTOnly_Disabled();
190  }
191 
192  G4cout << "=== Leaving QweakSimPMTOnlyMessenger::SetNewValue() " << newValue << G4endl;
193 }
G4UIcmdWithADoubleAndUnit * PMTOnly_SetTiltAngleInX_Cmd
G4UIcmdWithoutParameter * PMTOnly_FindMotherCenter_Cmd
G4UIcmdWithADoubleAndUnit * PMTOnly_SetTiltAngleInZ_Cmd
G4UIcmdWithAString * PMTOnly_SetMaterial_Cmd
G4UIcmdWithADoubleAndUnit * PMTOnly_SetCenterPositionInY_Cmd
G4UIcmdWithoutParameter * PMTOnly_SetDisabled_Cmd
G4UIcmdWithADoubleAndUnit * PMTOnly_SetCenterPositionInX_Cmd
G4UIcmdWithADoubleAndUnit * PMTOnly_SetCenterPositionInZ_Cmd
G4UIcmdWithoutParameter * PMTOnly_SetEnabled_Cmd
G4UIcmdWithADoubleAndUnit * PMTOnly_SetTiltAngleInY_Cmd

Field Documentation

QweakSimPMTOnly* QweakSimPMTOnlyMessenger::myPMTOnly
private

Definition at line 33 of file QweakSimPMTOnlyMessenger.hh.

Referenced by SetNewValue().

G4UIcmdWithoutParameter* QweakSimPMTOnlyMessenger::PMTOnly_FindMotherCenter_Cmd
private
G4UIcmdWithADoubleAndUnit* QweakSimPMTOnlyMessenger::PMTOnly_SetCenterPositionInX_Cmd
private
G4UIcmdWithADoubleAndUnit* QweakSimPMTOnlyMessenger::PMTOnly_SetCenterPositionInY_Cmd
private
G4UIcmdWithADoubleAndUnit* QweakSimPMTOnlyMessenger::PMTOnly_SetCenterPositionInZ_Cmd
private
G4UIcmdWithoutParameter* QweakSimPMTOnlyMessenger::PMTOnly_SetDisabled_Cmd
private
G4UIcmdWithoutParameter* QweakSimPMTOnlyMessenger::PMTOnly_SetEnabled_Cmd
private
G4UIcmdWithAString* QweakSimPMTOnlyMessenger::PMTOnly_SetMaterial_Cmd
private
G4UIcmdWithADoubleAndUnit* QweakSimPMTOnlyMessenger::PMTOnly_SetTiltAngleInX_Cmd
private

Definition at line 45 of file QweakSimPMTOnlyMessenger.hh.

Referenced by QweakSimPMTOnlyMessenger(), and SetNewValue().

G4UIcmdWithADoubleAndUnit* QweakSimPMTOnlyMessenger::PMTOnly_SetTiltAngleInY_Cmd
private

Definition at line 46 of file QweakSimPMTOnlyMessenger.hh.

Referenced by QweakSimPMTOnlyMessenger(), and SetNewValue().

G4UIcmdWithADoubleAndUnit* QweakSimPMTOnlyMessenger::PMTOnly_SetTiltAngleInZ_Cmd
private

Definition at line 47 of file QweakSimPMTOnlyMessenger.hh.

Referenced by QweakSimPMTOnlyMessenger(), and SetNewValue().

G4UIdirectory* QweakSimPMTOnlyMessenger::PMTOnlyDir
private

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