QwGeant4
QweakSimCollimatorSupport.cc
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // ---------------------------
4 // | Doxygen File Information |
5 // ---------------------------
6 //
7 /**
8 
9  \file QweakSimCollimatorSupport.cc
10 
11  $Revision: 1.2 $
12  $Date: 2005/12/28 22:45:27 $
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: 2005/12/28 22:45:27 $
26 // CVS/RCS Revision: $Revision: 1.2 $
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 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41 : FirstCollimator(Colli1), LastCollimator(Colli2)
42 {
43  G4cout << G4endl << "###### Calling QweakSimCollimatorSupport::QweakCollimatorSupport() " << G4endl << G4endl;
44 
45 
46  // Top Cover
49 
50  G4double Start_CenterZPos = (FirstCollimator ->GetCollimatorHousing_CenterPositionInZ()) - 0.5*(FirstCollimator ->GetCollimatorHousing_FullLengthInZ());
51  G4double End_CenterZPos = (LastCollimator ->GetCollimatorHousing_CenterPositionInZ()) + 0.5*(LastCollimator ->GetCollimatorHousing_FullLengthInZ());
52 
53  TopCover_FullLength_Y = 20.0*cm;
54  TopCover_FullLength_Z = End_CenterZPos - Start_CenterZPos;
56 
57  TopCover_CenterXPosition = 0.0*cm;
59  TopCover_CenterZPosition = Start_CenterZPos + 0.5*TopCover_FullLength_Z;
60 
61  // Bottom Cover
64 
68 
72 
73  // Left Cover
76 
77  LeftCover_FullLength_X = 20.0*cm;
80 
84 
85  // Right Cover
88 
92 
96 
97 
98 
99  //Collimator_Messenger = new QweakSimCollimatorMessenger(this);
100 
101  // get access to material definition
103 
104  G4cout << G4endl << "###### Leaving QweakSimCollimatorSupport::QweakCollimatorSupport() " << G4endl << G4endl;
105 
106 }
107 
108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
110 
111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
112 void QweakSimCollimatorSupport::ConstructSupport(G4VPhysicalVolume* MotherVolume)
113 {
114  G4cout << G4endl << "###### Calling QweakSimCollimatorSupport::ConstructSupport() " << G4endl << G4endl;
115 
116  // assign material
117  // G4Material* CollimatorSupport_Material = pMaterial->GetMaterial("CDA943");
118  G4Material* CollimatorSupport_Material = pMaterial->GetMaterial("ShieldingConcrete");
119 
120 
121  //===========
122  // Top Cover
123  //===========
124  G4ThreeVector positionCollimatorSupport_TopCover(TopCover_CenterXPosition,
127 
128  //**********************************************************************************
129  //Construct collimator support Top Cover
130  G4Box* CollimatorSupport_TopCover_Solid = new G4Box("CollimatorSupport_TopCover_Sol",
131  0.5 * TopCover_FullLength_X,
132  0.5 * TopCover_FullLength_Y,
133  0.5 * TopCover_FullLength_Z);
134 
135  //**********************************************************************************
136  // Define collimator logical and physical volumes
137 
138  CollimatorSupport_TopCover_Logical = new G4LogicalVolume( CollimatorSupport_TopCover_Solid,
139  CollimatorSupport_Material,
140  "CollimatorSupport_TopCover_Log",
141  0,0,0);
142 
143  CollimatorSupport_TopCover_Physical = new G4PVPlacement(0,
144  positionCollimatorSupport_TopCover,
145  "CollimatorSupport_TopCover",
147  MotherVolume,
148  false,
149  0,
150  pSurfChk);
151  //**********************************************************************************
152 
153  //==============
154  // Bottom Cover
155  //==============
156  G4ThreeVector positionCollimatorSupport_BottomCover(BottomCover_CenterXPosition,
159 
160  //**********************************************************************************
161  //Construct collimator support Bottom Cover
162  G4Box* CollimatorSupport_BottomCover_Solid = new G4Box("CollimatorSupport_BottomCover_Sol",
166 
167  //**********************************************************************************
168  // Define collimator logical and physical volumes
169 
170  CollimatorSupport_BottomCover_Logical = new G4LogicalVolume( CollimatorSupport_BottomCover_Solid,
171  CollimatorSupport_Material,
172  "CollimatorSupport_BottomCover_Log",
173  0,0,0);
174 
175  CollimatorSupport_BottomCover_Physical = new G4PVPlacement(0,
176  positionCollimatorSupport_BottomCover,
177  "CollimatorSupport_BottomCover",
179  MotherVolume,
180  false,
181  0,
182  pSurfChk);
183  //**********************************************************************************
184 
185 
186  //==============
187  // Left Cover
188  //==============
189  G4ThreeVector positionCollimatorSupport_LeftCover(LeftCover_CenterXPosition,
192 
193  //**********************************************************************************
194  //Construct collimator support Left Cover
195  G4Box* CollimatorSupport_LeftCover_Solid = new G4Box("CollimatorSupport_LeftCover_Sol",
196  0.5 * LeftCover_FullLength_X,
197  0.5 * LeftCover_FullLength_Y,
198  0.5 * LeftCover_FullLength_Z);
199 
200  //**********************************************************************************
201  // Define collimator logical and physical volumes
202 
203  CollimatorSupport_LeftCover_Logical = new G4LogicalVolume( CollimatorSupport_LeftCover_Solid,
204  CollimatorSupport_Material,
205  "CollimatorSupport_LeftCover_Log",
206  0,0,0);
207 
208  CollimatorSupport_LeftCover_Physical = new G4PVPlacement(0,
209  positionCollimatorSupport_LeftCover,
210  "CollimatorSupport_LeftCover",
212  MotherVolume,
213  false,
214  0,
215  pSurfChk);
216  //**********************************************************************************
217 
218 
219 
220  //==============
221  // Right Cover
222  //==============
223  G4ThreeVector positionCollimatorSupport_RightCover(RightCover_CenterXPosition,
226 
227  //**********************************************************************************
228  //Construct collimator support Right Cover
229  G4Box* CollimatorSupport_RightCover_Solid = new G4Box("CollimatorSupport_RightCover_Sol",
233 
234  //**********************************************************************************
235  // Define collimator logical and physical volumes
236 
237  CollimatorSupport_RightCover_Logical = new G4LogicalVolume( CollimatorSupport_RightCover_Solid,
238  CollimatorSupport_Material,
239  "CollimatorSupport_RightCover_Log",
240  0,0,0);
241 
242  CollimatorSupport_RightCover_Physical = new G4PVPlacement(0,
243  positionCollimatorSupport_RightCover,
244  "CollimatorSupport_RightCover",
246  MotherVolume,
247  false,
248  0,
249  pSurfChk);
250  //**********************************************************************************
251 
252 
253  //**********************************************************************************
254  //Make it pretty...
255  G4Colour blue (0.,0.,1.);
256  G4Colour mangenta (237/255.,173/255.,255/255.);
257  G4Colour mangenta1 (104/255., 49/255., 94/255.);
258 
259  //**********************************************************************************
260  G4VisAttributes* CollimatorSupport_TopCover_VisAtt = new G4VisAttributes(blue);
261  CollimatorSupport_TopCover_VisAtt->SetVisibility(false);
262  // CollimatorSupport_TopCover_VisAtt->SetForceSolid(true);
263  // CollimatorSupport_TopCover_VisAtt->SetForceWireframe(true);
264  CollimatorSupport_TopCover_Logical->SetVisAttributes(CollimatorSupport_TopCover_VisAtt);
265  //**********************************************************************************
266  G4VisAttributes* CollimatorSupport_BottomCover_VisAtt = new G4VisAttributes(blue);
267  CollimatorSupport_BottomCover_VisAtt->SetVisibility(false);
268  // CollimatorSupport_BottomCover_VisAtt->SetForceSolid(true);
269  // CollimatorSupport_BottomCover_VisAtt->SetForceWireframe(true);
270  CollimatorSupport_BottomCover_Logical->SetVisAttributes(CollimatorSupport_BottomCover_VisAtt);
271  //**********************************************************************************
272  G4VisAttributes* CollimatorSupport_LeftCover_VisAtt = new G4VisAttributes(blue);
273  CollimatorSupport_LeftCover_VisAtt->SetVisibility(false);
274  // CollimatorSupport_LeftCover_VisAtt->SetVisibility(true);
275  // CollimatorSupport_LeftCover_VisAtt->SetForceSolid(true);
276  // CollimatorSupport_LeftCover_VisAtt->SetForceWireframe(true);
277  CollimatorSupport_LeftCover_Logical->SetVisAttributes(CollimatorSupport_LeftCover_VisAtt);
278  //**********************************************************************************
279  G4VisAttributes* CollimatorSupport_RightCover_VisAtt = new G4VisAttributes(blue);
280  // CollimatorSupport_RightCover_VisAtt->SetVisibility(false);
281  CollimatorSupport_RightCover_VisAtt->SetVisibility(false);
282  // CollimatorSupport_RightCover_VisAtt->SetForceSolid(true);
283  // CollimatorSupport_RightCover_VisAtt->SetForceWireframe(true);
284  CollimatorSupport_RightCover_Logical->SetVisAttributes(CollimatorSupport_RightCover_VisAtt);
285  //**********************************************************************************
286 
287 
288  G4cout << G4endl << "###### Leaving QweakSimCollimatorSupport::ConstructSupport() " << G4endl << G4endl;
289 
290 }
291 
292 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
294 {
295 //---------------------------------------------------------------------------------------------
296 //! Sets the material of the Collimator Support
297  /*!
298 
299  \param materialName Name of the material defined in class QweakSimG4Material
300 
301  */
302 //---------------------------------------------------------------------------------------------
303 
304  G4Material* pttoMaterial = G4Material::GetMaterial(materialName);
305  if (pttoMaterial)
306  CollimatorSupport_TopCover_Logical->SetMaterial(pttoMaterial);
307 }
308 
309 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
310 
311 
312 //=======================================================
313 // -----------------------
314 // | CVS File Information |
315 // -----------------------
316 //
317 // $Revisions$
318 // $Log: QweakSimCollimatorSupport.cc,v $
319 // Revision 1.2 2005/12/28 22:45:27 grimm
320 // Completed all cover plates (Top, Bottom, Left, Right)
321 // Plate dimensions and location are extracted dynamically from the upstream and downstream collimator positions and sizes.
322 //
323 // Revision 1.1 2005/12/28 18:30:04 grimm
324 // First Version of a support/shielding of the 3 collimators.
325 // At present only a top cover is implemented with rather arbitrary size and position.
326 //
327 //
328 
G4double GetCollimatorHousing_CenterPositionInZ()
static QweakSimMaterial * GetInstance()
G4VPhysicalVolume * CollimatorSupport_LeftCover_Physical
G4VPhysicalVolume * CollimatorSupport_BottomCover_Physical
G4VPhysicalVolume * CollimatorSupport_TopCover_Physical
G4double GetCollimatorHousing_FullLengthInY()
static const G4bool pSurfChk
G4VPhysicalVolume * CollimatorSupport_RightCover_Physical
Definition of the Collimators.
QweakSimCollimatorSupport(QweakSimCollimator *, QweakSimCollimator *)
Constructor.
G4LogicalVolume * CollimatorSupport_BottomCover_Logical
G4Material * GetMaterial(G4String material)
G4LogicalVolume * CollimatorSupport_LeftCover_Logical
void ConstructSupport(G4VPhysicalVolume *)
G4LogicalVolume * CollimatorSupport_TopCover_Logical
G4double GetCollimatorHousing_FullLengthInX()
G4LogicalVolume * CollimatorSupport_RightCover_Logical