QwGeant4
QweakSimGEMMessenger.cc
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // ---------------------------
4 // | Doxygen File Information |
5 // ---------------------------
6 //
7 /**
8 
9  \file QweakSimGEMMessenger.cc
10 
11  $Revision: 1.2 $
12  $Date: 2005/12/27 19:10:09 $
13 
14  \author Klaus Hans Grimm
15 
16 */
17 //=============================================================================
18 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
19 
20 #include "QweakSimGEMMessenger.hh"
21 
22 // user includes
23 #include "QweakSimGEM.hh"
25 
26 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
27 
29 :myGEM(theGEM)
30 {
31  // GEM related
32  GEMDir = new G4UIdirectory("/GEM/");
33  GEMDir -> SetGuidance("GEM control.");
34 
35  //--------------------
36 
37  GEM_FrontCenterPositionInX_Cmd = new G4UIcmdWithADoubleAndUnit("/GEM/SetFrontCenterPositionInX",this);
38  GEM_FrontCenterPositionInX_Cmd->SetGuidance("Set the X position of the GEM Front container center");
39  GEM_FrontCenterPositionInX_Cmd->SetParameterName("Size",true);
40  GEM_FrontCenterPositionInX_Cmd->SetUnitCategory("Length");
41  GEM_FrontCenterPositionInX_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
42 
43  GEM_FrontCenterPositionInY_Cmd = new G4UIcmdWithADoubleAndUnit("/GEM/SetFrontCenterPositionInY",this);
44  GEM_FrontCenterPositionInY_Cmd->SetGuidance("Set the Y position of the GEM Front container center");
45  GEM_FrontCenterPositionInY_Cmd->SetParameterName("Size",true);
46  GEM_FrontCenterPositionInY_Cmd->SetUnitCategory("Length");
47  GEM_FrontCenterPositionInY_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
48 
49  GEM_FrontCenterPositionInZ_Cmd = new G4UIcmdWithADoubleAndUnit("/GEM/SetFrontCenterPositionInZ",this);
50  GEM_FrontCenterPositionInZ_Cmd->SetGuidance("Set the Z position of the GEM Front container center");
51  GEM_FrontCenterPositionInZ_Cmd->SetParameterName("Size",true);
52  GEM_FrontCenterPositionInZ_Cmd->SetUnitCategory("Length");
53  GEM_FrontCenterPositionInZ_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
54 
55  //--------------------
56 
57  GEM_BackCenterPositionInX_Cmd = new G4UIcmdWithADoubleAndUnit("/GEM/SetBackCenterPositionInX",this);
58  GEM_BackCenterPositionInX_Cmd->SetGuidance("Set the X position of the GEM Back container center");
59  GEM_BackCenterPositionInX_Cmd->SetParameterName("Size",true);
60  GEM_BackCenterPositionInX_Cmd->SetUnitCategory("Length");
61  GEM_BackCenterPositionInX_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
62 
63  GEM_BackCenterPositionInY_Cmd = new G4UIcmdWithADoubleAndUnit("/GEM/SetBackCenterPositionInY",this);
64  GEM_BackCenterPositionInY_Cmd->SetGuidance("Set the Y position of the GEM Back container center");
65  GEM_BackCenterPositionInY_Cmd->SetParameterName("Size",true);
66  GEM_BackCenterPositionInY_Cmd->SetUnitCategory("Length");
67  GEM_BackCenterPositionInY_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
68 
69  GEM_BackCenterPositionInZ_Cmd = new G4UIcmdWithADoubleAndUnit("/GEM/SetBackCenterPositionInZ",this);
70  GEM_BackCenterPositionInZ_Cmd->SetGuidance("Set the Z position of the GEM Back container center");
71  GEM_BackCenterPositionInZ_Cmd->SetParameterName("Size",true);
72  GEM_BackCenterPositionInZ_Cmd->SetUnitCategory("Length");
73  GEM_BackCenterPositionInZ_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
74 
75  //--------------------
76 
77  GEM_MasterContainerMatCmd = new G4UIcmdWithAString("/GEM/SetMasterContainerMaterial",this);
78  GEM_MasterContainerMatCmd->SetGuidance("Select Material of the GEM MasterContainer.");
79  GEM_MasterContainerMatCmd->SetParameterName("choice",false);
80  GEM_MasterContainerMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
81 
82  GEM_SubContainerMatCmd = new G4UIcmdWithAString("/GEM/SetSubContainerMaterial",this);
83  GEM_SubContainerMatCmd->SetGuidance("Select Material of the GEM MasterContainer.");
84  GEM_SubContainerMatCmd->SetParameterName("choice",false);
85  GEM_SubContainerMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
86 
87 // GEM_FoilMatCmd = new G4UIcmdWithAString("/GEM/SetFoilMaterial",this);
88 // GEM_FoilMatCmd->SetGuidance("Select Material of the GEM Foil.");
89 // GEM_FoilMatCmd->SetParameterName("choice",false);
90 // GEM_FoilMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
91 
92  GEM_FrameMatCmd = new G4UIcmdWithAString("/GEM/SetFrameMaterial",this);
93  GEM_FrameMatCmd->SetGuidance("Select Material of the GEM Frame.");
94  GEM_FrameMatCmd->SetParameterName("choice",false);
95  GEM_FrameMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
96 
97 // GEM_WirePlaneMatCmd = new G4UIcmdWithAString("/GEM/SetWirePlaneMaterial",this);
98 // GEM_WirePlaneMatCmd->SetGuidance("Select Material of the GEM WirePlane.");
99 // GEM_WirePlaneMatCmd->SetParameterName("choice",false);
100 // GEM_WirePlaneMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
101 
102 
103  GEM_FrontChamber_RotationAngleInPhi_Cmd = new G4UIcmdWithADoubleAndUnit("/GEM/SetFrontChamberRotationAngleInPhi",this);
104  GEM_FrontChamber_RotationAngleInPhi_Cmd ->SetGuidance("Set the Front GEM rotation angle in phi");
105  GEM_FrontChamber_RotationAngleInPhi_Cmd ->SetParameterName("Size",true);
106  GEM_FrontChamber_RotationAngleInPhi_Cmd ->SetUnitCategory("Angle");
107  GEM_FrontChamber_RotationAngleInPhi_Cmd ->AvailableForStates(G4State_PreInit,G4State_Idle);
108 
109 
110  GEM_BackChamber_RotationAngleInPhi_Cmd = new G4UIcmdWithADoubleAndUnit("/GEM/SetBackChamberRotationAngleInPhi",this);
111  GEM_BackChamber_RotationAngleInPhi_Cmd ->SetGuidance("Set the Back GEM rotation angle in phi");
112  GEM_BackChamber_RotationAngleInPhi_Cmd ->SetParameterName("Size",true);
113  GEM_BackChamber_RotationAngleInPhi_Cmd ->SetUnitCategory("Angle");
114  GEM_BackChamber_RotationAngleInPhi_Cmd ->AvailableForStates(G4State_PreInit,G4State_Idle);
115 
116 }
117 
118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119 
121 {
122 
123  // if (GEM_WirePlaneMatCmd) delete GEM_WirePlaneMatCmd;
124  // if (GEM_FoilMatCmd) delete GEM_FoilMatCmd;
125  if (GEM_FrameMatCmd) delete GEM_FrameMatCmd;
128 
132 
136 
139 
140  if (GEMDir) delete GEMDir;
141 }
142 
143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
144 
145 void QweakSimGEMMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
146 {
147  G4cout << "#### Calling QweakSimGEMMessenger::SetNewValue() " << newValue << G4endl;
148 
149 
150  if( command == GEM_MasterContainerMatCmd )
151  {
152  G4cout << "#### Messenger: Setting GEM MasterContainer Material to " << newValue << G4endl;
153 
155  }
156 
157 
158  if( command == GEM_SubContainerMatCmd )
159  {
160  G4cout << "#### Messenger: Setting GEM SubContainer Material to " << newValue << G4endl;
161 
163  }
164 
165 
166  if( command == GEM_FrameMatCmd )
167  {
168  G4cout << "#### Messenger: Setting GEM Frame Material to " << newValue << G4endl;
169 
170  myGEM->SetGEM_FrameMaterial(newValue);
171  }
172 
173 
174 // if( command == GEM_FoilMatCmd )
175 // {
176 // G4cout << "#### Messenger: Setting GEM Foil Material to " << newValue << G4endl;
177 //
178 // myGEM->SetGEM_FoilMaterial(newValue);
179 // }
180 
181 
182 
183 // if( command == GEM_WirePlaneMatCmd )
184 // {
185 // G4cout << "#### Messenger: Setting GEM WirePlane Material to " << newValue << G4endl;
186 //
187 // myGEM->SetGEM_WirePlaneMaterial(newValue);
188 // }
189 
190 
191 
192  if( command == GEM_FrontCenterPositionInX_Cmd )
193  {
194  G4cout << "#### Messenger: Setting GEM FrontCenter Xpos to " << newValue << G4endl;
195 
197  }
198 
199  if( command == GEM_FrontCenterPositionInY_Cmd )
200  {
201  G4cout << "#### Messenger: Setting GEM FrontCenter Ypos to " << newValue << G4endl;
202 
204  }
205 
206  if( command == GEM_FrontCenterPositionInZ_Cmd )
207  {
208  G4cout << "#### Messenger: Setting GEM FrontCenter Zpos to " << newValue << G4endl;
209 
211  }
212 
214  {
215  G4cout << "#### Messenger: Setting Front Chamber GEM rotation angle in phi to " << newValue << G4endl;
216 
218  }
219 
220 
221 
222  if( command == GEM_BackCenterPositionInX_Cmd )
223  {
224  G4cout << "#### Messenger: Setting GEM BackCenter Xpos to " << newValue << G4endl;
225 
227  }
228 
229  if( command == GEM_BackCenterPositionInY_Cmd )
230  {
231  G4cout << "#### Messenger: Setting GEM BackCenter Ypos to " << newValue << G4endl;
232 
234  }
235 
236  if( command == GEM_BackCenterPositionInZ_Cmd )
237  {
238  G4cout << "#### Messenger: Setting GEM BackCenter Zpos to " << newValue << G4endl;
239 
241 
242  }
243 
244 
246  {
247  G4cout << "#### Messenger: Setting BackChamber GEM rotation angle in phi to " << newValue << G4endl;
248 
250  }
251 
252 
253  G4cout << "#### Leaving QweakSimGEMMessenger::SetNewValue() " << newValue << G4endl;
254 }
255 
256 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
257 
G4UIcmdWithADoubleAndUnit * GEM_FrontCenterPositionInZ_Cmd
void SetGEM_MasterContainerMaterial(G4String)
Definition: QweakSimGEM.cc:891
void SetFrontGEM_CenterPositionInZ(G4double zPos)
void SetFrontGEM_CenterPositionInX(G4double xPos)
Definition: QweakSimGEM.cc:981
G4UIcmdWithADoubleAndUnit * GEM_FrontCenterPositionInX_Cmd
void SetGEM_FrameMaterial(G4String)
Definition: QweakSimGEM.cc:925
QweakSimGEMMessenger(QweakSimGEM *)
void SetBackGEM_CenterPositionInZ(G4double zPos)
G4UIcmdWithADoubleAndUnit * GEM_BackCenterPositionInX_Cmd
G4UIcmdWithAString * GEM_MasterContainerMatCmd
G4UIcmdWithADoubleAndUnit * GEM_BackCenterPositionInY_Cmd
void SetGEM_BackChamber_RotationAngleInPhi(G4double GEM_phiangleBack)
G4UIcmdWithADoubleAndUnit * GEM_FrontChamber_RotationAngleInPhi_Cmd
void SetFrontGEM_CenterPositionInY(G4double yPos)
Definition: QweakSimGEM.cc:995
void SetBackGEM_CenterPositionInY(G4double yPos)
void SetGEM_SubContainerMaterial(G4String)
Definition: QweakSimGEM.cc:908
void SetGEM_FrontChamber_RotationAngleInPhi(G4double GEM_phiangleFront)
G4UIcmdWithADoubleAndUnit * GEM_BackChamber_RotationAngleInPhi_Cmd
Region 1 GEM (Gas Electron Multiplier)
Definition: QweakSimGEM.hh:64
G4UIcmdWithADoubleAndUnit * GEM_BackCenterPositionInZ_Cmd
G4UIcmdWithADoubleAndUnit * GEM_FrontCenterPositionInY_Cmd
void SetBackGEM_CenterPositionInX(G4double xPos)
G4UIcmdWithAString * GEM_FrameMatCmd
G4UIcmdWithAString * GEM_SubContainerMatCmd
void SetNewValue(G4UIcommand *, G4String)