QwGeant4
QweakSimCerenkovDetector.hh
Go to the documentation of this file.
1 #ifndef QweakSimCerenkovDetector_h
2 #define QweakSimCerenkovDetector_h
3 
4 // system includes
5 #include <vector>
6 
7 // user includes
8 #include "QweakSimSolids.hh"
9 #include "QweakSimMaterial.hh"
15 
16 // user classes
18 class QweakSimMaterial;
19 
21 {
22 public:
24  virtual ~QweakSimCerenkovDetector();
25 
26  void SetMotherVolume(G4VPhysicalVolume* mv) {theMotherPV = mv;}
28 
29  void ConstructComponent(G4VPhysicalVolume* MotherVolume);
31  void DestroyComponent();
32 
33  void SetNumberOfDetectors(G4int number);
34 
35  void SetCerenkovDetectorMaterial(G4String materialName);
36  void SetPreradiatorMaterial(G4String materialName);
37  void SetContainerMaterial(G4String materialName);
38 
39  void SetCerenkovDetectorCenterPositionInX(G4double xPos, G4int octant);
40  void SetCerenkovDetectorCenterPositionInY(G4double yPos, G4int octant);
41  void SetCerenkovDetectorCenterPositionInZ(G4double zPos, G4int octant);
42  void SetCerenkovDetectorRotationInX(G4double xRot, G4int octant);
43  void SetCerenkovDetectorRotationInY(G4double yRot, G4int octant);
44  void SetCerenkovDetectorRotationInZ(G4double zRot, G4int octant);
45  void SetCerenkovDetectorTiltAngle(G4double tiltangle);
46  void SetCerenkovDetectorThickness(G4double thickness);
47 
49 
52 
53  G4LogicalVolume* GetPMT_LogicalVolume() {return Cathode_Logical;}
54  G4VPhysicalVolume* GetPMT_PhysicalVolume() {return Cathode_Physical;}
55 
56 private:
57 
59 
60  std::vector< QweakSimCerenkovDetectorMessenger* > CerenkovDetectorMessenger; // pointer to the Messenger
61 
63 
64  G4VPhysicalVolume* theMotherPV;
65 
66  // Number of Cerenkov detectors
68 
69  // Needed for manual coil placement
70  std::vector< G4VPhysicalVolume* > CerenkovMasterContainer_Physical;
71  std::vector< G4ThreeVector > Translation_CerenkovMasterContainer;
72  std::vector< G4RotationMatrix* > Rotation_CerenkovMasterContainer;
73 
74  std::vector< G4RotationMatrix* > Rotation_SideBracket;
75  std::vector< G4ThreeVector > Position_SideBracket;
76 
77  std::vector< G4RotationMatrix* > Rotation_EndBracket;
78  std::vector< G4ThreeVector > Position_EndBracket;
79 
80  std::vector< G4RotationMatrix* > Rotation_SideBracketPad;
81  std::vector< G4ThreeVector > Position_SideBracketPad;
82 
83  std::vector< G4RotationMatrix* > Rotation_EndBracketPad;
84  std::vector< G4ThreeVector > Position_EndBracketPad;
85 
86 
87  G4LogicalVolume* CerenkovContainer_Logical;
88  G4VPhysicalVolume* CerenkovContainer_Physical;
90 
91  G4LogicalVolume* ActiveArea_Logical;
92  G4VPhysicalVolume* ActiveArea_Physical;
93  G4Material* ActiveArea_Material;
94 
95  G4LogicalVolume* QuartzBar_LogicalLeft;
96  G4LogicalVolume* QuartzBar_LogicalRight;
97  G4VPhysicalVolume* QuartzBar_PhysicalLeft;
98  G4VPhysicalVolume* QuartzBar_PhysicalRight;
99  G4Material* QuartzBar_Material;
100 
101  G4LogicalVolume* LightGuide_LogicalLeft;
102  G4LogicalVolume* LightGuide_LogicalRight;
103  G4VPhysicalVolume* LightGuide_PhysicalLeft;
104  G4VPhysicalVolume* LightGuide_PhysicalRight;
105  G4Material* LightGuide_Material;
106 
107  G4LogicalVolume* QuartzGlue_Logical;
108  G4VPhysicalVolume* QuartzGlue_PhysicalLeft;
109  G4VPhysicalVolume* QuartzGlue_PhysicalCenter;
110  G4VPhysicalVolume* QuartzGlue_PhysicalRight;
111  G4Material* QuartzGlue_Material;
112 
113  G4LogicalVolume* Radiator_Logical;
114  G4VPhysicalVolume* Radiator_Physical;
115  G4Material* Radiator_Material;
116 
117  G4LogicalVolume* PMT_PbShield_Logical;
118  G4VPhysicalVolume* PMT_PbShield_Physical;
120 
121  G4LogicalVolume* PMTContainer_Logical;
122  G4VPhysicalVolume* PMTContainer_PhysicalLeft;
123  G4VPhysicalVolume* PMTContainer_PhysicalRight;
125 
126  G4LogicalVolume* PMTQuartzOpticalFilm_Logical;
127  G4VPhysicalVolume* PMTQuartzOpticalFilm_Physical;
129 
130  G4LogicalVolume* PMTEntranceWindow_Logical;
131  G4VPhysicalVolume* PMTEntranceWindow_Physical;
133 
134  G4LogicalVolume* Cathode_Logical;
135  G4VPhysicalVolume* Cathode_Physical;
136  G4Material* Cathode_Material;
137 
138  G4LogicalVolume* Frame_Logical;
139  G4VPhysicalVolume* Frame_Physical;
140  G4Material* Frame_Material;
141 
142  G4LogicalVolume* CrossBar_Logical;
143  G4VPhysicalVolume* CrossBarR_Physical;
144  G4VPhysicalVolume* CrossBarL_Physical;
145 
146  G4LogicalVolume* FrontWindow_Logical;
147  G4VPhysicalVolume* FrontWindow_Physical;
148  G4LogicalVolume* BackWindow_Logical;
149  G4VPhysicalVolume* BackWindow_Physical;
150  G4Material* Window_Material;
151 
152  G4LogicalVolume* FrontClip_Logical;
153  G4VPhysicalVolume* FrontClip_Physical;
154 
155  G4LogicalVolume* BackClip_Logical;
156  G4VPhysicalVolume* BackClip_Physical;
157 
158  G4LogicalVolume* SquareFlange_Logical;
159  G4VPhysicalVolume* SquareFlangeR_Physical;
160  G4VPhysicalVolume* SquareFlangeL_Physical;
161 
162  G4LogicalVolume* SquareFlangeSeal_Logical;
163  G4VPhysicalVolume* SquareFlangeSealR_Physical;
164  G4VPhysicalVolume* SquareFlangeSealL_Physical;
165 
166  G4LogicalVolume* PMTHousingWall_Logical;
167  G4VPhysicalVolume* PMTHousingWallR_Physical;
168  G4VPhysicalVolume* PMTHousingWallL_Physical;
169 
170  G4LogicalVolume* PMTHousingFlange_Logical;
171  G4VPhysicalVolume* PMTHousingFlangeR_Physical;
172  G4VPhysicalVolume* PMTHousingFlangeL_Physical;
173 
174  G4LogicalVolume* PMTHousingLid_Logical;
175  G4VPhysicalVolume* PMTHousingLidR_Physical;
176  G4VPhysicalVolume* PMTHousingLidL_Physical;
177 
178  G4LogicalVolume* SideBracket_Logical;
179  std::vector< G4VPhysicalVolume* > SideBracket_Physical;
180 
181  G4LogicalVolume* EndBracket_Logical;
182  std::vector< G4VPhysicalVolume* > EndBracket_Physical;
183 
184  G4LogicalVolume* SideBracketPad_Logical;
185  std::vector< G4VPhysicalVolume* > SideBracketPad_Physical;
186 
187  G4LogicalVolume* EndBracketPad_Logical;
188  std::vector< G4VPhysicalVolume* > EndBracketPad_Physical;
189 
190  G4Material* BracketPad_Material;
191 
192  G4LogicalVolume* ExoSkeltonFrame_Logical;
193  G4VPhysicalVolume* ExoSkeltonFrame_Physical;
195 
196 // G4Box *QuartzBar_Solid;
197 // G4Box *PMTEntranceWindow_Solid;
198 // G4Box *PMT_Solid;
199 // G4Box *PMTContainer_Solid;
200 
204 
208 
212 
216 
220 
224 
228 
232 
236 
240 
244 
248 
252 
253  G4double WindowThickness;
254 
258 
262 
266 
270 
275 
278 
281 
284 
287 
289 
290  G4double LGAngCutXDim;
291  G4double LGAngCutYDim;
292  G4double LGAngCutZDim;
293 
294 
295  // needed for boolean union
296  std::vector< G4SubtractionSolid* > RightQuartz_Solid;
297  std::vector< G4SubtractionSolid* > LeftQuartz_Solid;
298  std::vector< G4SubtractionSolid* > LeftGuide_Solid;
299  std::vector< G4SubtractionSolid* > RightGuide_Solid;
300 
301  // std::vector< G4Box* > mirror_solid;
302  G4Material* mirror_material;
303  std::vector< G4LogicalVolume* > mirror_logical;
304  std::vector< G4VPhysicalVolume* > mirror_physical;
305 
306  G4double Tilting_Angle; // total tilting angle towards mean track
307  G4double Kink_Angle; // Vshape angle
308  G4double Thickness;
309 
310  // placing the container
312  G4RotationMatrix* Rotation_CerenkovContainer;
313 
314  // placing the chamfers
315  G4ThreeVector Position_Chamfer1;
316  G4RotationMatrix Rotation_Chamfer1;
317  G4ThreeVector Position_Chamfer2;
318  G4RotationMatrix Rotation_Chamfer2;
319  G4ThreeVector Position_Chamfer3;
320  G4RotationMatrix Rotation_Chamfer3;
321  G4ThreeVector Position_Chamfer4;
322  G4RotationMatrix Rotation_Chamfer4;
323 
324  G4ThreeVector Position_AngCut1;
325  G4RotationMatrix Rotation_AngCut1;
326 
327  G4ThreeVector Position_AngCut2;
328  G4RotationMatrix Rotation_AngCut2;
329 
330  G4ThreeVector Position_LGRight;
331  G4RotationMatrix Rotation_LGRight;
332  G4ThreeVector Position_LGLeft;
333  G4RotationMatrix Rotation_LGLeft;
334 
336  G4RotationMatrix Rotation_LGFaceMirrorLeft;
337 
339  G4RotationMatrix Rotation_LGEdgeMirrorLeft;
340 
342  G4RotationMatrix Rotation_LGFaceMirrorRight;
343 
345  G4RotationMatrix Rotation_LGEdgeMirrorRight;
346 
347  // placing the left SingleBar
349  G4RotationMatrix Rotation_SingleBarLeft;
350 
351  // placing the right SingleBar
353  G4RotationMatrix Rotation_SingleBarRight;
354 
355  // placing the left PMTContainer
357  G4RotationMatrix Rotation_PMTContainerLeft;
358 
359  // placing the right PMTContainer
361  G4RotationMatrix Rotation_PMTContainerRight;
362 
363  // placing the PMT
364  G4ThreeVector Translation_Cathode;
365  G4RotationMatrix Rotation_Cathode;
366 
367  // placing the PMTEntranceWindow
369  G4RotationMatrix Rotation_PMTQuartzOpticalFilm;
370 
372  G4RotationMatrix Rotation_PMTEntranceWindow;
373 
374  // pointer to the sensitive detectors
375  G4VSensitiveDetector* CerenkovDetectorSD;
376  G4VSensitiveDetector* CerenkovRadiatorSD;
377  G4VSensitiveDetector* CerenkovDetector_PMTSD;
378 
379  // Cerenkov Position variable now a vector for eight positions
380  std::vector< G4double > Position_CerenkovContainer_X;
381  std::vector< G4double > Position_CerenkovContainer_Y;
382  std::vector< G4double > Position_CerenkovContainer_Z;
383 
384  // Cerenkov Rotation variable now a vector for eight positions
385  std::vector< G4double > Rotation_CerenkovContainer_X;
386  std::vector< G4double > Rotation_CerenkovContainer_Y;
387  std::vector< G4double > Rotation_CerenkovContainer_Z;
388 
389  // Default values for position
393 
394  // Default values for rotation
398 
399  // Repositions the center point that all components are built around
403 
404  G4ThreeVector Container_Center;
405 };
406 #endif
407 
408 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
std::vector< G4RotationMatrix * > Rotation_EndBracket
G4VPhysicalVolume * GetPMT_PhysicalVolume()
std::vector< G4SubtractionSolid * > LeftGuide_Solid
QweakSimCerenkovDetector(QweakSimUserInformation *)
G4VSensitiveDetector * CerenkovRadiatorSD
G4VPhysicalVolume * CerenkovContainer_Physical
G4VPhysicalVolume * PMTHousingLidL_Physical
std::vector< G4double > Rotation_CerenkovContainer_X
std::vector< G4ThreeVector > Position_SideBracket
std::vector< G4RotationMatrix * > Rotation_SideBracketPad
G4LogicalVolume * SquareFlangeSeal_Logical
std::vector< G4double > Rotation_CerenkovContainer_Y
std::vector< G4ThreeVector > Translation_CerenkovMasterContainer
void SetCerenkovDetectorRotationInZ(G4double zRot, G4int octant)
G4VPhysicalVolume * SquareFlangeSealL_Physical
G4LogicalVolume * PMTEntranceWindow_Logical
G4RotationMatrix Rotation_PMTQuartzOpticalFilm
G4LogicalVolume * GetCerenkovDetector_LogicalVolume()
void SetCerenkovDetectorThickness(G4double thickness)
G4VPhysicalVolume * CrossBarR_Physical
QweakSimUserInformation * myUserInfo
G4VPhysicalVolume * PMTHousingFlangeL_Physical
G4LogicalVolume * PMTHousingFlange_Logical
G4VPhysicalVolume * QuartzGlue_PhysicalCenter
G4VPhysicalVolume * PMTHousingWallL_Physical
G4VPhysicalVolume * QuartzBar_PhysicalLeft
G4VPhysicalVolume * ActiveArea_Physical
G4VPhysicalVolume * CrossBarL_Physical
G4LogicalVolume * CerenkovContainer_Logical
void SetCerenkovDetectorRotationInX(G4double xRot, G4int octant)
G4VSensitiveDetector * CerenkovDetectorSD
std::vector< G4double > Position_CerenkovContainer_Y
std::vector< G4ThreeVector > Position_EndBracket
G4VSensitiveDetector * CerenkovDetector_PMTSD
void SetContainerMaterial(G4String materialName)
Definition of elements and materials.
std::vector< G4VPhysicalVolume * > EndBracket_Physical
std::vector< G4RotationMatrix * > Rotation_EndBracketPad
std::vector< G4VPhysicalVolume * > SideBracket_Physical
G4VPhysicalVolume * ExoSkeltonFrame_Physical
void SetMotherVolume(G4VPhysicalVolume *mv)
std::vector< G4VPhysicalVolume * > mirror_physical
void SetCerenkovDetectorMaterial(G4String materialName)
G4VPhysicalVolume * QuartzBar_PhysicalRight
G4VPhysicalVolume * SquareFlangeL_Physical
std::vector< G4double > Position_CerenkovContainer_Z
G4VPhysicalVolume * PMTHousingFlangeR_Physical
std::vector< G4ThreeVector > Position_SideBracketPad
std::vector< G4LogicalVolume * > mirror_logical
std::vector< G4SubtractionSolid * > RightGuide_Solid
G4VPhysicalVolume * PMTHousingWallR_Physical
G4VPhysicalVolume * SquareFlangeSealR_Physical
G4VPhysicalVolume * PMTEntranceWindow_Physical
void SetCerenkovDetectorRotationInY(G4double yRot, G4int octant)
void SetCerenkovDetectorTiltAngle(G4double tiltangle)
G4VPhysicalVolume * BackWindow_Physical
std::vector< G4VPhysicalVolume * > SideBracketPad_Physical
G4VPhysicalVolume * GetCerenkovDetector_PhysicalVolume()
std::vector< G4SubtractionSolid * > RightQuartz_Solid
G4VPhysicalVolume * SquareFlangeR_Physical
G4VPhysicalVolume * FrontWindow_Physical
Scans the input file for /Cerenkov/xyz commands.
G4VPhysicalVolume * QuartzGlue_PhysicalRight
G4VPhysicalVolume * PMT_PbShield_Physical
void ConstructComponent(G4VPhysicalVolume *MotherVolume)
std::vector< G4SubtractionSolid * > LeftQuartz_Solid
G4VPhysicalVolume * PMTContainer_PhysicalRight
G4VPhysicalVolume * LightGuide_PhysicalRight
G4LogicalVolume * GetPMT_LogicalVolume()
G4RotationMatrix * Rotation_CerenkovContainer
G4VPhysicalVolume * PMTQuartzOpticalFilm_Physical
std::vector< G4double > Rotation_CerenkovContainer_Z
void SetPreradiatorMaterial(G4String materialName)
G4LogicalVolume * QuartzBar_LogicalRight
void SetCerenkovDetectorCenterPositionInX(G4double xPos, G4int octant)
void SetCerenkovDetectorCenterPositionInZ(G4double zPos, G4int octant)
std::vector< G4VPhysicalVolume * > CerenkovMasterContainer_Physical
G4VPhysicalVolume * PMTHousingLidR_Physical
std::vector< G4RotationMatrix * > Rotation_SideBracket
void SetCerenkovDetectorCenterPositionInY(G4double yPos, G4int octant)
std::vector< QweakSimCerenkovDetectorMessenger * > CerenkovDetectorMessenger
std::vector< G4RotationMatrix * > Rotation_CerenkovMasterContainer
std::vector< G4VPhysicalVolume * > EndBracketPad_Physical
G4VPhysicalVolume * LightGuide_PhysicalLeft
G4VPhysicalVolume * PMTContainer_PhysicalLeft
G4LogicalVolume * PMTQuartzOpticalFilm_Logical
std::vector< G4ThreeVector > Position_EndBracketPad
G4VPhysicalVolume * FrontClip_Physical
G4VPhysicalVolume * QuartzGlue_PhysicalLeft
std::vector< G4double > Position_CerenkovContainer_X