Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GammaRayTelDetectorConstruction.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: GammaRayTelDetectorConstruction.hh 82268 2014-06-13 13:47:30Z gcosmo $
28 // ------------------------------------------------------------
29 // GEANT 4 class header file
30 // CERN Geneva Switzerland
31 //
32 //
33 // ------------ GammaRayTelDetectorConstruction ------
34 // by F.Longo, R.Giannitrapani & G.Santin (13 nov 2000)
35 //
36 // ************************************************************
37 
38 #ifndef GammaRayTelDetectorConstruction_h
39 #define GammaRayTelDetectorConstruction_h 1
40 
42 #include "G4Cache.hh"
43 #include "globals.hh"
44 
45 class G4Box;
46 class G4LogicalVolume;
47 class G4VPhysicalVolume;
48 class G4Material;
49 class G4UniformMagField;
50 class G4Region;
56 
57 //class GammaRayTelTrackerROGeometry;
58 
59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
60 
62 {
63 public:
64 
67 
68 public:
69 
70  void SetNbOfTKRLayers (G4int); // TKR number of layers, material, detector
72  void SetNbOfTKRTiles (G4int);
75 
78 
79  void SetConverterMaterial (G4String); // TKR Converter material & thickness
81 
82  void SetNbOfCALLayers (G4int); // CAL material, lenght, thickness
83  void SetNbOfCALBars (G4int);
85 
86  void SetACDThickness (G4double); //ACD Thickness
87 
88  void SetMagField(G4double); // Magnetic Field
89 
90 
92  void UpdateGeometry();
93  void ConstructSDandField();
94 
95 public:
96 
98 
99 
100  G4double GetWorldSizeZ() const {return WorldSizeZ;};
101  G4double GetWorldSizeXY() const {return WorldSizeXY;};
102 
103  G4double GetPayloadSizeZ() const {return PayloadSizeZ;};
104  G4double GetPayloadSizeXY() const {return PayloadSizeXY;};
105 
106  G4double GetTKRSizeZ() const {return TKRSizeZ;};
107  G4double GetTKRSizeXY() const {return TKRSizeXY;};
108 
109  G4double GetCALSizeZ() const {return CALSizeZ;};
110  G4double GetCALTKRDistance() const {return CALTKRDistance;};
111 
112  G4double GetTKRSiliconThickness() const {return TKRSiliconThickness;};
113  G4double GetTKRSiliconTileXY() const {return TKRSiliconTileXY;};
114  G4double GetTKRSiliconPitch() const {return TKRSiliconPitch;};
115  G4int GetNbOfTKRLayers() const {return NbOfTKRLayers;};
116  G4int GetNbOfTKRTiles() const {return NbOfTKRTiles;};
117  G4int GetNbOfTKRStrips() const {return NbOfTKRStrips;};
118  G4double GetTKRLayerDistance() const {return TKRLayerDistance;};
119  G4double GetTKRViewsDistance() const {return TKRViewsDistance;};
120 
121  G4double GetTKRActiveTileXY() const {return TKRActiveTileXY;};
122  G4double GetTKRActiveTileZ() const {return TKRActiveTileZ;};
123  G4double GetSiliconGuardRing() const {return SiliconGuardRing;}
124  G4double GetTilesSeparation() const {return TilesSeparation;};
125 
126  G4Material* GetConverterMaterial() const {return ConverterMaterial;};
127  G4double GetConverterThickness() const {return ConverterThickness;};
128 
129  G4double GetCALBarThickness() const {return CALBarThickness;};
130  G4int GetNbOfCALLayers() const {return NbOfCALLayers;};
131  G4int GetNbOfCALBars() const {return NbOfCALBars;};
132 
133  G4double GetACDThickness() const {return ACDThickness;};
134  G4int GetNbOfACDTopTiles() const {return NbOfACDTopTiles;};
135  G4int GetNbOfACDLateralTiles() const {return NbOfACDLateralTiles;};
136 
137 private:
138 
139  G4Material* ConverterMaterial;
140  G4double ConverterThickness;
141 
142  G4double TKRSiliconThickness;
143  G4double TKRSiliconTileXY;
144  G4double TKRSiliconPitch;
145 
146  G4double TKRSizeXY;
147  G4double TKRSizeZ;
148 
149  G4double TKRLayerDistance;
150  G4double TKRViewsDistance;
151  G4double TKRSupportThickness;
152 
153  G4int NbOfTKRLayers;
154  G4int NbOfTKRTiles;
155 
156  G4double CALBarThickness;
157  G4int NbOfCALLayers;
158  G4int NbOfCALBars;
159  G4double CALSizeXY;
160  G4double CALSizeZ;
161 
162  G4double CALBarX;
163  G4double CALBarY;
164  G4double CALBarZ;
165 
166  G4double ACDThickness;
167  G4double ACTSizeXY;
168  G4double ACTSizeZ;
169 
170  G4double ACL1SizeX;
171  G4double ACL1SizeY;
172  G4double ACL1SizeZ;
173 
174  G4double ACL2SizeX;
175  G4double ACL2SizeY;
176  G4double ACL2SizeZ;
177 
178 
179  G4int NbOfACDLateralTiles;
180  G4int NbOfACDTopTiles;
181 
182  G4double TilesSeparation;
183  G4double ACDTKRDistance;
184  G4double CALTKRDistance;
185  G4double TKRActiveTileXY;
186  G4double TKRActiveTileZ;
187 
188  G4double SiliconGuardRing;
189  G4int NbOfTKRStrips;
190 
191  G4double TKRXStripX;
192  G4double TKRYStripX;
193  G4double TKRXStripY;
194  G4double TKRYStripY;
195  G4double TKRZStrip;
196 
197  G4double PayloadSizeZ;
198  G4double PayloadSizeXY;
199 
200  G4Material* defaultMaterial;
201  G4Material* CALMaterial;
202  G4Material* TKRMaterial;
203  G4Material* ACDMaterial;
204  G4double WorldSizeXY;
205  G4double WorldSizeZ;
206 
207  G4Box* solidWorld; // World
208  G4LogicalVolume* logicWorld;
209  G4VPhysicalVolume* physiWorld;
210 
211  G4Box* solidPayload; // Payload
212  G4LogicalVolume* logicPayload;
213  G4VPhysicalVolume* physiPayload;
214 
215  G4Box* solidTKR; // Tracker
216  G4LogicalVolume* logicTKR;
217  G4VPhysicalVolume* physiTKR;
218 
219  G4Box* solidCAL; // Calorimeter
220  G4LogicalVolume* logicCAL;
221  G4VPhysicalVolume* physiCAL;
222 
223  G4Box* solidACT; // Top Anticoincidence
224  G4LogicalVolume* logicACT;
225  G4VPhysicalVolume* physiACT;
226 
227  G4Box* solidACL1; // Lateral Anticoincidence
228  G4LogicalVolume* logicACL1;
229  G4VPhysicalVolume* physiACL1;
230 
231  G4Box* solidACL2;
232  G4LogicalVolume* logicACL2;
233  G4VPhysicalVolume* physiACL2;
234 
235  G4Box* solidTKRDetectorX; // Tracker PLANE X
236  G4LogicalVolume* logicTKRDetectorX;
237  G4VPhysicalVolume* physiTKRDetectorX;
238 
239  G4Box* solidTKRDetectorY; // Tracker PLANE Y
240  G4LogicalVolume* logicTKRDetectorY;
241  G4VPhysicalVolume* physiTKRDetectorY;
242 
243  G4Box* solidCALLayerX; // Calorimeter PLANE X
244  G4LogicalVolume* logicCALLayerX;
245  G4VPhysicalVolume* physiCALLayerX;
246 
247  G4Box* solidCALLayerY; // Calorimeter PLANE Y
248  G4LogicalVolume* logicCALLayerY;
249  G4VPhysicalVolume* physiCALLayerY;
250 
251  G4Box* solidCALDetectorX; // Calorimeter DETECTOR X
252  G4LogicalVolume* logicCALDetectorX;
253  G4VPhysicalVolume* physiCALDetectorX;
254 
255  G4Box* solidCALDetectorY; // Calorimeter DETECTOR Y
256  G4LogicalVolume* logicCALDetectorY;
257  G4VPhysicalVolume* physiCALDetectorY;
258 
259  G4Box* solidPlane; // Support Plane
260  G4LogicalVolume* logicPlane;
261  G4VPhysicalVolume* physiPlane;
262 
263  G4Box* solidConverter; // Converter
264  G4LogicalVolume* logicConverter;
265  G4VPhysicalVolume* physiConverter;
266 
267  G4LogicalVolume* logicTKRStripX;
268  G4LogicalVolume* logicTKRStripY;
269 
270  // magnetic field messenger
271  static G4ThreadLocal G4GlobalMagFieldMessenger* fMagFieldMessenger;
272 
273  GammaRayTelDetectorMessenger* detectorMessenger; //pointer to the Messenger
274 
275 
276  G4Cache<GammaRayTelTrackerSD*> trackerSD; //pointer to the sensitive detector
277  G4Cache<GammaRayTelCalorimeterSD*> calorimeterSD; //pointer to the sensitive detector
278  G4Cache<GammaRayTelAnticoincidenceSD*> anticoincidenceSD; //pointer to the sensitive detector
279 
280  //G4Region* aTKRRegion; // TKR cut region
281  //G4Region* aCALRegion; // CAL cut region
282 
283 private:
284 
285  void DefineMaterials();
286  void ComputePayloadParameters();
287  G4VPhysicalVolume* ConstructPayload();
288 };
289 
290 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
291 
292 inline void GammaRayTelDetectorConstruction::ComputePayloadParameters()
293 {
294  // Compute derived parameters of the payload
295 
296  TKRSupportThickness =TKRLayerDistance -2.*TKRSiliconThickness
297  - TKRViewsDistance - ConverterThickness;
298  TKRSizeXY = NbOfTKRTiles*TKRSiliconTileXY + (NbOfTKRTiles+1)*TilesSeparation;
299  TKRSizeZ = NbOfTKRLayers*TKRLayerDistance;
300 
301  TKRActiveTileXY = TKRSiliconTileXY - 2*SiliconGuardRing;
302  TKRActiveTileZ = TKRSiliconThickness;
303  NbOfTKRStrips = G4int(TKRActiveTileXY/TKRSiliconPitch);
304 
305  SiliconGuardRing = TKRActiveTileXY - NbOfTKRStrips*TKRSiliconPitch;
306  TKRActiveTileXY = TKRSiliconTileXY - 2*SiliconGuardRing;
307 
308  TKRXStripX = TKRYStripY = TKRSiliconPitch;
309  TKRYStripX = TKRXStripY = TKRActiveTileXY;
310  TKRZStrip = TKRSiliconThickness;
311 
312  CALSizeXY = TKRSizeXY;
313  CALSizeZ = 2.*NbOfCALLayers*CALBarThickness;
314 
315  CALBarX = CALSizeXY;
316  CALBarY = CALSizeXY/(NbOfCALBars);
317  CALBarZ = CALBarThickness;
318 
319  ACTSizeXY = TKRSizeXY + 2*ACDTKRDistance + 2*ACDThickness;
320  ACTSizeZ = ACDThickness;
321 
322  ACL1SizeX = TKRSizeXY + 2*ACDTKRDistance + ACDThickness;
323  ACL1SizeY = ACDThickness;
324  ACL1SizeZ = TKRSizeZ + CALSizeZ + ACDTKRDistance + CALTKRDistance;
325 
326  ACL2SizeX = ACDThickness;
327  ACL2SizeY = TKRSizeXY + 2*ACDTKRDistance + ACDThickness;
328  ACL2SizeZ = TKRSizeZ + CALSizeZ + ACDTKRDistance + CALTKRDistance;
329 
330  PayloadSizeZ = 1.1*(ACL1SizeZ + ACTSizeZ);
331  PayloadSizeXY = (ACTSizeXY);
332 
333  WorldSizeZ = 1.5*PayloadSizeZ; WorldSizeXY = 1.5*PayloadSizeXY;
334 
335 }
336 
337 #endif
338 
339 
340 
341 
342 
343 
344 
345 
346 
Definition: G4Box.hh:64
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76