Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PHG4CylinderGeom_Spacalv3.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4CylinderGeom_Spacalv3.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
// $$Id: PHG4CylinderGeom_Spacalv3.h,v 1.3 2014/08/28 22:18:35 jinhuang Exp $$
4
12
#ifndef G4DETECTORS_PHG4CYLINDERGEOMSPACALV3_H
13
#define G4DETECTORS_PHG4CYLINDERGEOMSPACALV3_H
14
15
#include "
PHG4CylinderGeom_Spacalv2.h
"
16
17
#include <iostream>
// for operator<<, basic_ostream::op...
18
#include <map>
19
#include <string>
20
#include <utility>
// std::pair, std::make_pair
21
22
class
PHParameters
;
23
24
class
PHG4CylinderGeom_Spacalv3
:
public
PHG4CylinderGeom_Spacalv2
25
{
26
public
:
27
PHG4CylinderGeom_Spacalv3
();
28
29
~PHG4CylinderGeom_Spacalv3
()
override
;
30
31
// from PHObject
32
void
identify
(std::ostream&
os
= std::cout)
const override
;
33
34
// from TObject
35
void
Print
(Option_t* option =
""
)
const override
;
36
37
// cppcheck-suppress virtualCallInConstructor
38
void
SetDefault
()
override
;
39
41
void
ImportParameters
(
const
PHParameters
& param)
override
;
42
43
double
44
get_sidewall_outer_torr
()
const
45
{
46
return
sidewall_outer_torr
;
47
}
48
49
void
50
set_sidewall_outer_torr
(
double
sidewallOuterTorr)
51
{
52
sidewall_outer_torr
= sidewallOuterTorr;
53
}
54
55
double
56
get_sidewall_thickness
()
const
57
{
58
return
sidewall_thickness
;
59
}
60
61
void
62
set_sidewall_thickness
(
double
sidewallThickness)
63
{
64
sidewall_thickness
= sidewallThickness;
65
}
66
67
std::string
68
get_sidewall_mat
()
const
69
{
70
return
sidewall_mat
;
71
}
72
73
void
74
set_sidewall_mat
(
const
std::string
& absorberMat)
75
{
76
sidewall_mat
= absorberMat;
77
}
78
79
int
get_max_phi_bin_in_sec
()
const
80
{
81
return
max_phi_bin_in_sec
;
82
}
83
84
void
85
set_max_phi_bin_in_sec
(
int
maxPhiBinInSec)
86
{
87
max_phi_bin_in_sec
= maxPhiBinInSec;
88
}
89
90
const
std::string
&
get_divider_mat
()
const
91
{
92
return
divider_mat
;
93
}
94
95
void
set_divider_mat
(
const
std::string
& dividerMat)
96
{
97
divider_mat
= dividerMat;
98
}
99
100
double
get_divider_width
()
const
101
{
102
return
divider_width
;
103
}
104
105
void
set_divider_width
(
double
dividerWidth)
106
{
107
divider_width
= dividerWidth;
108
}
109
110
class
geom_tower
111
{
112
public
:
113
geom_tower
();
114
virtual
~geom_tower
()
115
{
116
}
117
118
int
id
;
119
double
pDz
;
120
121
double
pDy1
;
122
double
pDx1
;
123
double
pDx2
;
124
double
pDy2
;
125
double
pDx3
;
126
double
pDx4
;
127
128
double
pTheta
;
129
double
pPhi
;
130
double
pAlp1
;
131
double
pAlp2
;
132
133
double
pRotationAngleX
;
134
double
centralX
;
135
double
centralY
;
136
double
centralZ
;
137
138
double
ModuleSkinThickness
;
139
141
int
NFiberX
;
143
int
NFiberY
;
144
146
int
NSubtowerX
;
148
int
NSubtowerY
;
149
151
int
152
compose_fiber_id
(
int
index_x,
int
index_y)
const
;
154
int
155
get_sub_tower_ID_x
(
int
fiber_id)
const
;
157
int
158
get_sub_tower_ID_y
(
int
fiber_id)
const
;
160
double
161
get_position_fraction_x_in_sub_tower
(
int
fiber_id)
const
;
163
double
164
get_position_fraction_y_in_sub_tower
(
int
fiber_id)
const
;
165
167
double
LightguideHeight
;
169
double
LightguideTaperRatio
;
171
std::string
LightguideMaterial
;
172
173
virtual
void
174
identify
(std::ostream&
os
= std::cout)
const
;
175
177
void
178
ImportParameters
(
const
PHParameters
& param,
179
const
std::string
& param_prefix);
180
181
ClassDef(
PHG4CylinderGeom_Spacalv3::geom_tower
, 3)
182
};
183
typedef
std::map<int, geom_tower>
tower_map_t
;
184
185
void
186
load_demo_sector_tower_map1
();
187
void
188
load_demo_sector_tower_map2
();
189
void
190
load_demo_sector_tower_map4
();
191
192
const
tower_map_t
&
193
get_sector_tower_map
()
const
194
{
195
return
sector_tower_map
;
196
}
197
199
double
200
get_tower_radial_position
(
const
geom_tower&
tower
)
const
;
201
203
void
204
subtower_consistency_check
()
const
;
206
int
get_n_subtower_eta
()
const
;
208
int
get_n_subtower_phi
()
const
;
210
double
211
get_max_lightguide_height
()
const
;
212
213
//
214
// void
215
// set_geom_super_tower_map(geom_super_tower_map_t geomSuperTowerMap)
216
// {
217
// geom_super_tower_map = geomSuperTowerMap;
218
// }
219
221
class
scint_id_coder
222
{
223
public
:
224
explicit
scint_id_coder
(
int
scint_id);
225
scint_id_coder
(
int
sector_id,
int
tower_id,
int
fiber_id);
226
virtual
~scint_id_coder
()
227
{
228
}
229
230
virtual
void
231
identify
(std::ostream&
os
= std::cout)
const
232
{
233
os
<<
"scint_id_coder with "
234
<<
"scint_ID("
<<
scint_ID
<<
") = "
235
<<
"sector_ID("
<<
sector_ID
<<
"), "
236
<<
"tower_ID("
<<
tower_ID
237
<<
"), "
238
<<
"fiber_ID("
<<
fiber_ID
<<
")"
<< std::endl;
239
}
240
241
int
scint_ID
;
242
int
sector_ID
;
243
int
tower_ID
;
244
int
fiber_ID
;
245
246
static
const
int
kfiber_bit
= 13;
// max 8192 fiber per tower
247
static
const
int
ktower_bit
= 11;
// max 2048 towers per sector
248
static
const
int
ksector_bit
= 8;
// max 256 sectors
249
250
ClassDef(
PHG4CylinderGeom_Spacalv3::scint_id_coder
, 1)
251
};
252
255
virtual
std::pair<int, int>
256
get_tower_z_phi_ID
(
const
int
tower_ID,
const
int
sector_ID)
const
;
257
258
protected
:
259
double
sidewall_thickness
;
260
double
sidewall_outer_torr
;
261
std::string
sidewall_mat
;
262
int
max_phi_bin_in_sec
;
263
264
tower_map_t
sector_tower_map
;
265
267
double
divider_width
;
269
std::string
divider_mat
;
270
271
ClassDefOverride(
PHG4CylinderGeom_Spacalv3
, 4)
272
};
273
274
#endif
coresoftware
blob
master
simulation
g4simulation
g4detectors
PHG4CylinderGeom_Spacalv3.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:12
using
1.8.2 with
sPHENIX GitHub integration