ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
GammaRayTelDetectorConstruction.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file GammaRayTelDetectorConstruction.hh
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
// ------------------------------------------------------------
28
// GEANT 4 class header file
29
// CERN Geneva Switzerland
30
//
31
//
32
// ------------ GammaRayTelDetectorConstruction ------
33
// by F.Longo, R.Giannitrapani & G.Santin (13 nov 2000)
34
//
35
// ************************************************************
36
37
#ifndef GammaRayTelDetectorConstruction_h
38
#define GammaRayTelDetectorConstruction_h 1
39
40
#include "
G4VUserDetectorConstruction.hh
"
41
#include "
G4Cache.hh
"
42
#include "
globals.hh
"
43
44
class
G4Box
;
45
class
G4LogicalVolume
;
46
class
G4VPhysicalVolume
;
47
class
G4Material
;
48
class
G4UniformMagField
;
49
class
G4Region
;
50
class
GammaRayTelDetectorMessenger
;
51
class
GammaRayTelTrackerSD
;
52
class
GammaRayTelAnticoincidenceSD
;
53
class
GammaRayTelCalorimeterSD
;
54
class
G4GlobalMagFieldMessenger
;
55
56
//class GammaRayTelTrackerROGeometry;
57
58
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
59
60
class
GammaRayTelDetectorConstruction
:
public
G4VUserDetectorConstruction
61
{
62
public
:
63
64
GammaRayTelDetectorConstruction
();
65
~GammaRayTelDetectorConstruction
();
66
67
public
:
68
69
void
SetNbOfTKRLayers
(
G4int
);
// TKR number of layers, material, detector
70
void
SetTKRTileSizeXY
(
G4double
);
71
void
SetNbOfTKRTiles
(
G4int
);
72
void
SetTKRSiliconThickness
(
G4double
);
73
void
SetTKRSiliconPitch
(
G4double
);
74
75
void
SetTKRLayerDistance
(
G4double
);
76
void
SetTKRViewsDistance
(
G4double
);
77
78
void
SetConverterMaterial
(
G4String
);
// TKR Converter material & thickness
79
void
SetConverterThickness
(
G4double
);
80
81
void
SetNbOfCALLayers
(
G4int
);
// CAL material, lenght, thickness
82
void
SetNbOfCALBars
(
G4int
);
83
void
SetCALBarThickness
(
G4double
);
84
85
void
SetACDThickness
(
G4double
);
//ACD Thickness
86
87
void
SetMagField
(
G4double
);
// Magnetic Field
88
89
90
G4VPhysicalVolume
*
Construct
();
91
void
UpdateGeometry
();
92
void
ConstructSDandField
();
93
94
public
:
95
96
void
PrintPayloadParameters
();
97
98
99
G4double
GetWorldSizeZ
()
const
{
return
WorldSizeZ
;};
100
G4double
GetWorldSizeXY
()
const
{
return
WorldSizeXY
;};
101
102
G4double
GetPayloadSizeZ
()
const
{
return
PayloadSizeZ
;};
103
G4double
GetPayloadSizeXY
()
const
{
return
PayloadSizeXY
;};
104
105
G4double
GetTKRSizeZ
()
const
{
return
TKRSizeZ
;};
106
G4double
GetTKRSizeXY
()
const
{
return
TKRSizeXY
;};
107
108
G4double
GetCALSizeZ
()
const
{
return
CALSizeZ
;};
109
G4double
GetCALTKRDistance
()
const
{
return
CALTKRDistance
;};
110
111
G4double
GetTKRSiliconThickness
()
const
{
return
TKRSiliconThickness
;};
112
G4double
GetTKRSiliconTileXY
()
const
{
return
TKRSiliconTileXY
;};
113
G4double
GetTKRSiliconPitch
()
const
{
return
TKRSiliconPitch
;};
114
G4int
GetNbOfTKRLayers
()
const
{
return
NbOfTKRLayers
;};
115
G4int
GetNbOfTKRTiles
()
const
{
return
NbOfTKRTiles
;};
116
G4int
GetNbOfTKRStrips
()
const
{
return
NbOfTKRStrips
;};
117
G4double
GetTKRLayerDistance
()
const
{
return
TKRLayerDistance
;};
118
G4double
GetTKRViewsDistance
()
const
{
return
TKRViewsDistance
;};
119
120
G4double
GetTKRActiveTileXY
()
const
{
return
TKRActiveTileXY
;};
121
G4double
GetTKRActiveTileZ
()
const
{
return
TKRActiveTileZ
;};
122
G4double
GetSiliconGuardRing
()
const
{
return
SiliconGuardRing
;}
123
G4double
GetTilesSeparation
()
const
{
return
TilesSeparation
;};
124
125
G4Material
*
GetConverterMaterial
()
const
{
return
ConverterMaterial
;};
126
G4double
GetConverterThickness
()
const
{
return
ConverterThickness
;};
127
128
G4double
GetCALBarThickness
()
const
{
return
CALBarThickness
;};
129
G4int
GetNbOfCALLayers
()
const
{
return
NbOfCALLayers
;};
130
G4int
GetNbOfCALBars
()
const
{
return
NbOfCALBars
;};
131
132
G4double
GetACDThickness
()
const
{
return
ACDThickness
;};
133
G4int
GetNbOfACDTopTiles
()
const
{
return
NbOfACDTopTiles
;};
134
G4int
GetNbOfACDLateralTiles
()
const
{
return
NbOfACDLateralTiles
;};
135
136
private
:
137
138
G4Material
*
ConverterMaterial
;
139
G4double
ConverterThickness
;
140
141
G4double
TKRSiliconThickness
;
142
G4double
TKRSiliconTileXY
;
143
G4double
TKRSiliconPitch
;
144
145
G4double
TKRSizeXY
;
146
G4double
TKRSizeZ
;
147
148
G4double
TKRLayerDistance
;
149
G4double
TKRViewsDistance
;
150
G4double
TKRSupportThickness
;
151
152
G4int
NbOfTKRLayers
;
153
G4int
NbOfTKRTiles
;
154
155
G4double
CALBarThickness
;
156
G4int
NbOfCALLayers
;
157
G4int
NbOfCALBars
;
158
G4double
CALSizeXY
;
159
G4double
CALSizeZ
;
160
161
G4double
CALBarX
;
162
G4double
CALBarY
;
163
G4double
CALBarZ
;
164
165
G4double
ACDThickness
;
166
G4double
ACTSizeXY
;
167
G4double
ACTSizeZ
;
168
169
G4double
ACL1SizeX
;
170
G4double
ACL1SizeY
;
171
G4double
ACL1SizeZ
;
172
173
G4double
ACL2SizeX
;
174
G4double
ACL2SizeY
;
175
G4double
ACL2SizeZ
;
176
177
178
G4int
NbOfACDLateralTiles
;
179
G4int
NbOfACDTopTiles
;
180
181
G4double
TilesSeparation
;
182
G4double
ACDTKRDistance
;
183
G4double
CALTKRDistance
;
184
G4double
TKRActiveTileXY
;
185
G4double
TKRActiveTileZ
;
186
187
G4double
SiliconGuardRing
;
188
G4int
NbOfTKRStrips
;
189
190
G4double
TKRXStripX
;
191
G4double
TKRYStripX
;
192
G4double
TKRXStripY
;
193
G4double
TKRYStripY
;
194
G4double
TKRZStrip
;
195
196
G4double
PayloadSizeZ
;
197
G4double
PayloadSizeXY
;
198
199
G4Material
*
defaultMaterial
;
200
G4Material
*
CALMaterial
;
201
G4Material
*
TKRMaterial
;
202
G4Material
*
ACDMaterial
;
203
G4double
WorldSizeXY
;
204
G4double
WorldSizeZ
;
205
206
G4Box
*
solidWorld
;
// World
207
G4LogicalVolume
*
logicWorld
;
208
G4VPhysicalVolume
*
physiWorld
;
209
210
G4Box
*
solidPayload
;
// Payload
211
G4LogicalVolume
*
logicPayload
;
212
G4VPhysicalVolume
*
physiPayload
;
213
214
G4Box
*
solidTKR
;
// Tracker
215
G4LogicalVolume
*
logicTKR
;
216
G4VPhysicalVolume
*
physiTKR
;
217
218
G4Box
*
solidCAL
;
// Calorimeter
219
G4LogicalVolume
*
logicCAL
;
220
G4VPhysicalVolume
*
physiCAL
;
221
222
G4Box
*
solidACT
;
// Top Anticoincidence
223
G4LogicalVolume
*
logicACT
;
224
G4VPhysicalVolume
*
physiACT
;
225
226
G4Box
*
solidACL1
;
// Lateral Anticoincidence
227
G4LogicalVolume
*
logicACL1
;
228
G4VPhysicalVolume
*
physiACL1
;
229
230
G4Box
*
solidACL2
;
231
G4LogicalVolume
*
logicACL2
;
232
G4VPhysicalVolume
*
physiACL2
;
233
234
G4Box
*
solidTKRDetectorX
;
// Tracker PLANE X
235
G4LogicalVolume
*
logicTKRDetectorX
;
236
G4VPhysicalVolume
*
physiTKRDetectorX
;
237
238
G4Box
*
solidTKRDetectorY
;
// Tracker PLANE Y
239
G4LogicalVolume
*
logicTKRDetectorY
;
240
G4VPhysicalVolume
*
physiTKRDetectorY
;
241
242
G4Box
*
solidCALLayerX
;
// Calorimeter PLANE X
243
G4LogicalVolume
*
logicCALLayerX
;
244
G4VPhysicalVolume
*
physiCALLayerX
;
245
246
G4Box
*
solidCALLayerY
;
// Calorimeter PLANE Y
247
G4LogicalVolume
*
logicCALLayerY
;
248
G4VPhysicalVolume
*
physiCALLayerY
;
249
250
G4Box
*
solidCALDetectorX
;
// Calorimeter DETECTOR X
251
G4LogicalVolume
*
logicCALDetectorX
;
252
G4VPhysicalVolume
*
physiCALDetectorX
;
253
254
G4Box
*
solidCALDetectorY
;
// Calorimeter DETECTOR Y
255
G4LogicalVolume
*
logicCALDetectorY
;
256
G4VPhysicalVolume
*
physiCALDetectorY
;
257
258
G4Box
*
solidPlane
;
// Support Plane
259
G4LogicalVolume
*
logicPlane
;
260
G4VPhysicalVolume
*
physiPlane
;
261
262
G4Box
*
solidConverter
;
// Converter
263
G4LogicalVolume
*
logicConverter
;
264
G4VPhysicalVolume
*
physiConverter
;
265
266
G4LogicalVolume
*
logicTKRStripX
;
267
G4LogicalVolume
*
logicTKRStripY
;
268
269
// magnetic field messenger
270
static
G4ThreadLocal
G4GlobalMagFieldMessenger
*
fMagFieldMessenger
;
271
272
GammaRayTelDetectorMessenger
*
detectorMessenger
;
//pointer to the Messenger
273
274
275
G4Cache<GammaRayTelTrackerSD*>
trackerSD
;
//pointer to the sensitive detector
276
G4Cache<GammaRayTelCalorimeterSD*>
calorimeterSD
;
//pointer to the sensitive detector
277
G4Cache<GammaRayTelAnticoincidenceSD*>
anticoincidenceSD
;
//pointer to the sensitive detector
278
279
//G4Region* aTKRRegion; // TKR cut region
280
//G4Region* aCALRegion; // CAL cut region
281
282
private
:
283
284
void
DefineMaterials
();
285
void
ComputePayloadParameters
();
286
G4VPhysicalVolume
*
ConstructPayload
();
287
};
288
289
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
290
291
inline
void
GammaRayTelDetectorConstruction::ComputePayloadParameters
()
292
{
293
// Compute derived parameters of the payload
294
295
TKRSupportThickness
=
TKRLayerDistance
-2.*
TKRSiliconThickness
296
-
TKRViewsDistance
-
ConverterThickness
;
297
TKRSizeXY
=
NbOfTKRTiles
*
TKRSiliconTileXY
+ (
NbOfTKRTiles
+1)*
TilesSeparation
;
298
TKRSizeZ
=
NbOfTKRLayers
*
TKRLayerDistance
;
299
300
TKRActiveTileXY
=
TKRSiliconTileXY
- 2*
SiliconGuardRing
;
301
TKRActiveTileZ
=
TKRSiliconThickness
;
302
NbOfTKRStrips
=
G4int
(
TKRActiveTileXY
/
TKRSiliconPitch
);
303
304
SiliconGuardRing =
TKRActiveTileXY
-
NbOfTKRStrips
*
TKRSiliconPitch
;
305
TKRActiveTileXY
=
TKRSiliconTileXY
- 2*
SiliconGuardRing
;
306
307
TKRXStripX
=
TKRYStripY
=
TKRSiliconPitch
;
308
TKRYStripX
=
TKRXStripY
=
TKRActiveTileXY
;
309
TKRZStrip
=
TKRSiliconThickness
;
310
311
CALSizeXY
=
TKRSizeXY
;
312
CALSizeZ
= 2.*
NbOfCALLayers
*
CALBarThickness
;
313
314
CALBarX
=
CALSizeXY
;
315
CALBarY
=
CALSizeXY
/(
NbOfCALBars
);
316
CALBarZ
=
CALBarThickness
;
317
318
ACTSizeXY
=
TKRSizeXY
+ 2*
ACDTKRDistance
+ 2*
ACDThickness
;
319
ACTSizeZ
=
ACDThickness
;
320
321
ACL1SizeX
=
TKRSizeXY
+ 2*
ACDTKRDistance
+
ACDThickness
;
322
ACL1SizeY
=
ACDThickness
;
323
ACL1SizeZ
= TKRSizeZ +
CALSizeZ
+
ACDTKRDistance
+
CALTKRDistance
;
324
325
ACL2SizeX
=
ACDThickness
;
326
ACL2SizeY
=
TKRSizeXY
+ 2*
ACDTKRDistance
+
ACDThickness
;
327
ACL2SizeZ
= TKRSizeZ +
CALSizeZ
+
ACDTKRDistance
+
CALTKRDistance
;
328
329
PayloadSizeZ
= 1.1*(
ACL1SizeZ
+
ACTSizeZ
);
330
PayloadSizeXY
= (
ACTSizeXY
);
331
332
WorldSizeZ
= 1.5*
PayloadSizeZ
;
WorldSizeXY
= 1.5*
PayloadSizeXY
;
333
334
}
335
336
#endif
337
338
339
340
341
342
343
344
345
geant4
tree
geant4-10.6-release
examples
advanced
gammaray_telescope
include
GammaRayTelDetectorConstruction.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:58
using
1.8.2 with
ECCE GitHub integration