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_Spacalv1.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4CylinderGeom_Spacalv1.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
// $$Id: PHG4CylinderGeom_Spacalv1.h,v 1.2 2014/08/12 03:49:12 jinhuang Exp $$
4
12
#ifndef G4DETECTORS_PHG4CYLINDERGEOMSPACALV1_H
13
#define G4DETECTORS_PHG4CYLINDERGEOMSPACALV1_H
14
15
#include "
PHG4CylinderGeomv2.h
"
16
17
#include <iostream>
// for cout, ostream
18
#include <map>
19
#include <string>
20
21
class
PHParameters
;
22
23
class
PHG4CylinderGeom_Spacalv1
:
public
PHG4CylinderGeomv2
24
{
25
public
:
28
29
PHG4CylinderGeom_Spacalv1
();
30
31
~PHG4CylinderGeom_Spacalv1
()
override
32
{
33
sector_map
.clear();
34
}
35
36
// from PHObject
37
void
identify
(std::ostream &
os
= std::cout)
const override
;
38
39
// from TObject
40
void
Print
(Option_t *option =
""
)
const override
;
41
42
// cppcheck-suppress virtualCallInConstructor
43
virtual
void
SetDefault
();
44
46
void
ImportParameters
(
const
PHParameters
¶m)
override
;
47
49
52
53
double
54
get_max_radius
()
const
55
{
56
return
get_radius
() +
get_thickness
();
57
}
58
59
double
60
get_half_radius
()
const
61
{
62
return
get_radius
() +
get_thickness
() / 2.;
63
}
64
65
double
66
get_length
()
const
67
{
68
return
get_zmax
() -
get_zmin
();
69
}
70
71
double
72
get_xpos
()
const
73
{
74
return
xpos
;
75
}
76
77
void
78
set_xpos
(
double
x
)
79
{
80
this->
xpos
=
x
;
81
}
82
83
double
84
get_ypos
()
const
85
{
86
return
ypos
;
87
}
88
89
void
90
set_ypos
(
double
y
)
91
{
92
this->
ypos
=
y
;
93
}
94
95
double
96
get_zpos
()
const
97
{
98
return
zpos
;
99
}
100
101
void
102
set_zpos
(
double
z
)
103
{
104
this->
zpos
=
z
;
105
}
106
108
111
112
virtual
int
113
get_azimuthal_n_sec
()
const
;
114
115
virtual
double
116
get_azimuthal_distance
()
const
;
117
118
virtual
double
119
get_z_distance
()
const
;
120
122
typedef
std::map<int, double>
sector_map_t
;
123
125
const
sector_map_t
&
126
get_sector_map
()
const
127
{
128
return
sector_map
;
129
}
130
132
sector_map_t
&
133
get_sector_map
()
134
{
135
return
sector_map
;
136
}
137
139
void
140
init_default_sector_map
();
141
143
146
147
double
148
get_fiber_outer_r
()
const
149
{
150
return
get_fiber_clading_thickness
() +
get_fiber_core_diameter
() / 2;
151
}
152
153
double
154
get_fiber_clading_thickness
()
const
155
{
156
return
fiber_clading_thickness
;
157
}
158
159
void
160
set_fiber_clading_thickness
(
double
fiberCladingThickness)
161
{
162
fiber_clading_thickness
= fiberCladingThickness;
163
}
164
165
double
166
get_fiber_core_diameter
()
const
167
{
168
return
fiber_core_diameter
;
169
}
170
171
void
172
set_fiber_core_diameter
(
double
fiberCoreDiameter)
173
{
174
fiber_core_diameter
= fiberCoreDiameter;
175
}
176
177
double
178
get_fiber_distance
()
const
179
{
180
return
fiber_distance
;
181
}
182
183
void
184
set_fiber_distance
(
double
fiberDistance)
185
{
186
fiber_distance
= fiberDistance;
187
}
188
190
193
194
std::string
195
get_absorber_mat
()
const
196
{
197
return
absorber_mat
;
198
}
199
200
void
201
set_absorber_mat
(
const
std::string
&absorberMat)
202
{
203
absorber_mat
= absorberMat;
204
}
205
206
std::string
207
get_fiber_clading_mat
()
const
208
{
209
return
fiber_clading_mat
;
210
}
211
212
void
213
set_fiber_clading_mat
(
const
std::string
&fiberCladingMat)
214
{
215
fiber_clading_mat
= fiberCladingMat;
216
}
217
218
std::string
219
get_fiber_core_mat
()
const
220
{
221
return
fiber_core_mat
;
222
}
223
224
void
225
set_fiber_core_mat
(
const
std::string
&fiberCoreMat)
226
{
227
fiber_core_mat
= fiberCoreMat;
228
}
229
231
234
235
236
double
237
get_fiber_core_step_size
()
const
238
{
239
return
get_fiber_core_diameter
() / 10.;
240
}
241
242
enum
config_t
243
{
244
246
kNonProjective
= 0,
248
k1DProjectiveSpacal
=
kNonProjective
,
249
251
kFullProjective_2DTaper
= 2,
252
254
kFullProjective_2DTaper_SameLengthFiberPerTower
= 3,
255
257
kFullProjective_2DTaper_Tilted
= 4,
258
260
kFullProjective_2DTaper_Tilted_SameLengthFiberPerTower
= 5,
261
263
k2DProjectiveSpacal
=
kFullProjective_2DTaper_Tilted_SameLengthFiberPerTower
,
264
266
kInvalidSpacalConfig
267
};
268
269
config_t
270
get_config
()
const
271
{
272
return
config
;
273
}
274
275
void
276
set_config
(
config_t
c
)
277
{
278
this->
config
=
c
;
279
}
280
281
bool
282
is_virualize_fiber
()
const
283
{
284
return
virualize_fiber
;
285
}
286
287
virtual
bool
is_azimuthal_seg_visible
()
const
288
{
289
return
false
;
290
}
291
292
void
293
set_virualize_fiber
(
bool
virualizeFiber =
true
)
294
{
295
virualize_fiber
= virualizeFiber;
296
}
297
298
int
get_construction_verbose
()
const
299
{
300
return
construction_verbose
;
301
}
302
303
void
304
set_construction_verbose
(
int
constructionVerbose)
305
{
306
construction_verbose
= constructionVerbose;
307
}
308
310
311
protected
:
312
std::string
absorber_mat
;
313
std::string
fiber_core_mat
;
314
std::string
fiber_clading_mat
;
315
double
xpos
;
316
double
ypos
;
317
double
zpos
;
318
double
fiber_core_diameter
;
319
double
fiber_clading_thickness
;
320
double
fiber_distance
;
321
config_t
config
;
322
bool
virualize_fiber
;
323
int
construction_verbose
;
324
326
sector_map_t
sector_map
;
327
328
ClassDefOverride(
PHG4CylinderGeom_Spacalv1
, 2)
329
};
330
331
#endif
coresoftware
blob
master
simulation
g4simulation
g4detectors
PHG4CylinderGeom_Spacalv1.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:12
using
1.8.2 with
sPHENIX GitHub integration