QwGeant4
QweakSimShieldingWallMessenger.cc
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // ---------------------------
4 // | Doxygen File Information |
5 // ---------------------------
6 //
7 /**
8 
9  \file QweakSimShieldingWallMessenger.cc
10 
11  $Revision: 1.4 $
12  $Date: 2006/04/26 20:03:31 $
13 
14  \author Klaus Hans Grimm
15 
16 */
17 //=============================================================================
18 
19 //=============================================================================
20 // -----------------------
21 // | CVS File Information |
22 // -----------------------
23 //
24 // Last Update: $Author: grimm $
25 // Update Date: $Date: 2006/04/26 20:03:31 $
26 // CVS/RCS Revision: $Revision: 1.4 $
27 // Status: $State: Exp $
28 //
29 // ===================================
30 // CVS Revision Log at end of file !!
31 // ===================================
32 //
33 //============================================================================
34 
35 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
36 
38 
39 // user includes
40 #include "QweakSimShieldingWall.hh"
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44 
46 :myShieldingWall(theShieldingWall)
47 {
48  // ShieldingWall related
49  DetectorHutDir = new G4UIdirectory("/DetectorHut/");
50  DetectorHutDir -> SetGuidance("Detector Hut Control.");
51 
52  VisibilityDir = new G4UIdirectory("/DetectorHut/Visibility/");
53  VisibilityDir -> SetGuidance("Detector Hut Visibility Control.");
54 
55  CollimatorWallDir = new G4UIdirectory("/DetectorHut/CollimatorWall/");
56  CollimatorWallDir -> SetGuidance("Collimator Wall Control.");
57 
58  CollimatorWallZPosCmd = new G4UIcmdWithADoubleAndUnit("/DetectorHut/CollimatorWall/SetCenterPositionInZ",this);
59  CollimatorWallZPosCmd->SetGuidance("Set the Z position of the Collimator Wall center");
60  CollimatorWallZPosCmd->SetParameterName("Size",true);
61  CollimatorWallZPosCmd->SetUnitCategory("Length");
62  CollimatorWallZPosCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
63 
64  CollimatorWallMatCmd = new G4UIcmdWithAString("/DetectorHut/CollimatorWall/SetCollimatorWallMaterial",this);
65  CollimatorWallMatCmd->SetGuidance("Select Material of the CollimatorWall.");
66  CollimatorWallMatCmd->SetParameterName("choice",false);
67  CollimatorWallMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
68 
69  ShowCollimatorWall_Cmd = new G4UIcmdWithoutParameter("/DetectorHut/Visibility/ShowCollimatorWall",this);
70  ShowCollimatorWall_Cmd->SetGuidance("Make the Shielding Wall visible");
71  ShowCollimatorWall_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
72  //
73  HideCollimatorWall_Cmd = new G4UIcmdWithoutParameter("/DetectorHut/Visibility/HideCollimatorWall",this);
74  HideCollimatorWall_Cmd->SetGuidance("Make the Collimator Wall invisible");
75  HideCollimatorWall_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
76 
77  ShowFrontWall_Cmd = new G4UIcmdWithoutParameter("/DetectorHut/Visibility/ShowFrontWall",this);
78  ShowFrontWall_Cmd->SetGuidance("Make the Front Wall visible");
79  ShowFrontWall_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
80  //
81  HideFrontWall_Cmd = new G4UIcmdWithoutParameter("/DetectorHut/Visibility/HideFrontWall",this);
82  HideFrontWall_Cmd->SetGuidance("Make the Front Wall invisible");
83  HideFrontWall_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
84 
85  ShowBackWall_Cmd = new G4UIcmdWithoutParameter("/DetectorHut/Visibility/ShowBackWall",this);
86  ShowBackWall_Cmd->SetGuidance("Make the Back Wall visible");
87  ShowBackWall_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
88  //
89  HideBackWall_Cmd = new G4UIcmdWithoutParameter("/DetectorHut/Visibility/HideBackWall",this);
90  HideBackWall_Cmd->SetGuidance("Make the Back Wall invisible");
91  HideBackWall_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
92 
93  ShowLeftWall_Cmd = new G4UIcmdWithoutParameter("/DetectorHut/Visibility/ShowLeftWall",this);
94  ShowLeftWall_Cmd->SetGuidance("Make the Left Wall visible");
95  ShowLeftWall_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
96  //
97  HideLeftWall_Cmd = new G4UIcmdWithoutParameter("/DetectorHut/Visibility/HideLeftWall",this);
98  HideLeftWall_Cmd->SetGuidance("Make the Left Wall invisible");
99  HideLeftWall_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
100 
101 
102  ShowRightWall_Cmd = new G4UIcmdWithoutParameter("/DetectorHut/Visibility/ShowRightWall",this);
103  ShowRightWall_Cmd->SetGuidance("Make the Right Wall visible");
104  ShowRightWall_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
105  //
106  HideRightWall_Cmd = new G4UIcmdWithoutParameter("/DetectorHut/Visibility/HideRightWall",this);
107  HideRightWall_Cmd->SetGuidance("Make the Right Wall invisible");
108  HideRightWall_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
109 
110  ShowTopWall_Cmd = new G4UIcmdWithoutParameter("/DetectorHut/Visibility/ShowTopWall",this);
111  ShowTopWall_Cmd->SetGuidance("Make the Top Wall visible");
112  ShowTopWall_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
113  //
114  HideTopWall_Cmd = new G4UIcmdWithoutParameter("/DetectorHut/Visibility/HideTopWall",this);
115  HideTopWall_Cmd->SetGuidance("Make the Top Wall invisible");
116  HideTopWall_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
117 
118 
119 }
120 
121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
122 
124 {
125 
126 
127  delete CollimatorWallMatCmd;
128  delete CollimatorWallZPosCmd;
129  delete ShowCollimatorWall_Cmd;
130  delete HideCollimatorWall_Cmd;
131 
132  delete ShowFrontWall_Cmd;
133  delete HideFrontWall_Cmd;
134 
135  delete ShowBackWall_Cmd;
136  delete HideBackWall_Cmd;
137 
138  delete ShowLeftWall_Cmd;
139  delete HideLeftWall_Cmd;
140 
141  delete ShowRightWall_Cmd;
142  delete HideRightWall_Cmd;
143 
144  delete VisibilityDir;
145  delete CollimatorWallDir;
146  delete DetectorHutDir;
147 
148 }
149 
150 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
151 
152 void QweakSimShieldingWallMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
153 {
154  G4cout << "#### Calling QweakSimShieldingWallMessenger::SetNewValue() " << newValue << G4endl;
155 
156  //-----------------------------------------------------------------------
157 
158  if( command == CollimatorWallZPosCmd )
159  {
160  G4cout << "#### Messenger: Setting CollimatorWall Z position to " << newValue << G4endl;
161 
163  }
164 
165  if( command == CollimatorWallMatCmd )
166  {
167  G4cout << "#### Messenger: Setting CollimatorWall Material to " << newValue << G4endl;
168 
170  }
171 
172  //-----------------------------------------------------------------------
173 
174  if( command == ShowCollimatorWall_Cmd )
175  {
176  G4cout << "#### Messenger: Show CollimatorWall " << G4endl;
177 
179  }
180 
181  if( command == HideCollimatorWall_Cmd )
182  {
183  G4cout << "#### Messenger: Hide CollimatorWall " << G4endl;
184 
186  }
187 
188  //-----------------------------------------------------------------------
189 
190  if( command == ShowFrontWall_Cmd )
191  {
192  G4cout << "#### Messenger: Show FrontWall " << G4endl;
193 
195  }
196 
197  if( command == HideFrontWall_Cmd )
198  {
199  G4cout << "#### Messenger: Hide FrontWall " << G4endl;
200 
202  }
203 
204  //-----------------------------------------------------------------------
205 
206  if( command == ShowBackWall_Cmd )
207  {
208  G4cout << "#### Messenger: Show BackWall " << G4endl;
209 
211  }
212 
213  if( command == HideBackWall_Cmd )
214  {
215  G4cout << "#### Messenger: Hide BackWall " << G4endl;
216 
218  }
219 
220  //-----------------------------------------------------------------------
221 
222  if( command == ShowLeftWall_Cmd )
223  {
224  G4cout << "#### Messenger: Show LeftWall " << G4endl;
225 
227  }
228 
229  if( command == HideLeftWall_Cmd )
230  {
231  G4cout << "#### Messenger: Hide LeftWall " << G4endl;
232 
234  }
235 
236  //-----------------------------------------------------------------------
237 
238  if( command == ShowRightWall_Cmd )
239  {
240  G4cout << "#### Messenger: Show RightWall " << G4endl;
241 
243  }
244 
245  if( command == HideRightWall_Cmd )
246  {
247  G4cout << "#### Messenger: Hide RightWall " << G4endl;
248 
250  }
251 
252  //-----------------------------------------------------------------------
253 
254 
255  if( command == ShowTopWall_Cmd )
256  {
257  G4cout << "#### Messenger: Show TopWall " << G4endl;
258 
260  }
261 
262  if( command == HideTopWall_Cmd )
263  {
264  G4cout << "#### Messenger: Hide TopWall " << G4endl;
265 
267  }
268 
269  //-----------------------------------------------------------------------
270 
271  G4cout << "#### Leaving QweakSimShieldingWallMessenger::SetNewValue() " << newValue << G4endl;
272 }
273 
274 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
275 
276 //=======================================================
277 // -----------------------
278 // | CVS File Information |
279 // -----------------------
280 //
281 // $Revisions$
282 // $Log: QweakSimShieldingWallMessenger.cc,v $
283 // Revision 1.4 2006/04/26 20:03:31 grimm
284 // Added commands for (un)hiding the walls of the shielding detector hut
285 //
286 // Revision 1.3 2006/01/18 20:20:45 grimm
287 // Added visibility functions: ShowShieldingWall(), HideShieldingWall()
288 //
289 // Revision 1.2 2005/12/27 19:14:49 grimm
290 // - Redesign of Doxygen header containing CVS info like revision and date
291 // - Added CVS revision log at the end of file
292 //
293 //
Defines the Shielding Wall with trapezoid cut outs (located after Main Magnet and before Region 3 VDC...
G4UIcmdWithoutParameter * HideCollimatorWall_Cmd
void SetCollimatorWallMaterial(G4String)
G4UIcmdWithoutParameter * ShowCollimatorWall_Cmd
QweakSimShieldingWallMessenger(QweakSimShieldingWall *)
void SetCollimatorWall_CenterPositionInZ(G4double)
G4UIcmdWithADoubleAndUnit * CollimatorWallZPosCmd