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
PHG4SpacalDetector.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4SpacalDetector.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
12
#ifndef G4DETECTORS_PHG4SPACALDETECTOR_H
13
#define G4DETECTORS_PHG4SPACALDETECTOR_H
14
15
#include "
PHG4CellDefs.h
"
16
#include "
PHG4CylinderGeom_Spacalv1.h
"
17
18
#include <
g4main/PHG4Detector.h
>
19
20
#include <Geant4/G4Transform3D.hh>
21
#include <Geant4/G4Types.hh>
// for G4double
22
23
#include <map>
24
#include <string>
// for string
25
#include <utility>
// for pair
26
27
class
G4LogicalVolume;
28
class
G4UserLimits;
29
class
G4VPhysicalVolume
;
30
class
PHCompositeNode
;
31
class
PHG4CylinderGeom
;
32
class
PHG4GDMLConfig
;
33
class
PHG4SpacalDisplayAction
;
34
class
PHParameters
;
35
class
PHG4Subsystem
;
36
class
RawTowerGeomContainer
;
37
38
class
PHG4SpacalDetector
:
public
PHG4Detector
39
{
40
public
:
41
typedef
PHG4CylinderGeom_Spacalv1
SpacalGeom_t
;
42
43
PHG4SpacalDetector
(
PHG4Subsystem
* subsys,
PHCompositeNode
* Node,
const
std::string
& dnam,
44
PHParameters
*
parameters
,
const
int
layer
= 0,
bool
init_geom =
true
);
45
46
~PHG4SpacalDetector
(
void
)
override
;
47
48
void
49
ConstructMe
(G4LogicalVolume* world)
override
;
50
51
virtual
std::pair<G4LogicalVolume*, G4Transform3D>
52
Construct_AzimuthalSeg
();
53
54
virtual
G4LogicalVolume*
55
Construct_Fiber
(
const
G4double
length
,
const
std::string
&
id
);
56
57
void
58
SetActive
(
const
int
i
= 1)
59
{
60
active
=
i
;
61
}
62
63
void
64
SetAbsorberActive
(
const
int
i
= 1)
65
{
66
absorberactive
=
i
;
67
}
68
69
void
70
SetDetectorType
(
const
std::string
& typ)
71
{
72
detector_type
= typ;
73
}
74
75
int
IsInCylinderActive
(
const
G4VPhysicalVolume
*);
76
77
void
78
SuperDetector
(
const
std::string
&
name
)
79
{
80
superdetector
=
name
;
81
}
82
83
const
std::string
84
SuperDetector
()
const
85
{
86
return
superdetector
;
87
}
88
89
int
get_Layer
()
const
90
{
91
return
layer
;
92
}
93
94
void
95
Print
(
const
std::string
& what =
"ALL"
)
const override
;
96
97
const
SpacalGeom_t
*
98
get_geom
()
const
99
{
100
return
_geom
;
101
}
102
103
virtual
PHG4CylinderGeom
*
clone_geom
()
const
104
{
105
return
new
SpacalGeom_t
(*
_geom
);
106
}
107
108
enum
109
{
110
FIBER_CORE
= 1,
111
FIBER_CLADING
= 0,
112
ABSORBER
= -1,
113
SUPPORT
= -2,
114
INACTIVE
= -100
115
};
116
117
PHG4SpacalDisplayAction
*
GetDisplayAction
() {
return
m_DisplayAction
; }
118
119
void
CosmicSetup
(
const
int
i
) {
m_CosmicSetupFlag
=
i
; }
120
int
CosmicSetup
() {
return
m_CosmicSetupFlag
; }
121
122
private
:
123
PHG4SpacalDisplayAction
*
m_DisplayAction
=
nullptr
;
124
125
protected
:
126
void
AddTowerGeometryNode
();
127
void
AddCellGeometryNode
();
128
std::map<const G4VPhysicalVolume*, int>
fiber_core_vol
;
129
131
std::map<const G4VPhysicalVolume*, int>
fiber_vol
;
132
134
std::map<const G4VPhysicalVolume*, int>
calo_vol
;
135
137
std::map<const G4VPhysicalVolume*, int>
block_vol
;
138
139
int
active
= 0;
140
int
absorberactive
= 0;
141
int
layer
= -9999;
142
int
m_CosmicSetupFlag
= 0;
143
int
m_CellBinning
=
PHG4CellDefs::undefined
;
144
int
m_NumLayers
= -1;
145
int
m_NumPhiBins
= -1;
146
int
m_NumEtaBins
= -1;
147
double
m_Emin
= 1
e
-6;
148
double
m_EtaMin
= NAN;
149
double
m_PhiMin
= NAN;
150
double
m_EtaStep
= NAN;
151
double
m_PhiStep
= NAN;
152
std::string
detector_type
;
153
std::string
superdetector
;
154
155
// G4UserLimits * step_limits;
156
// G4UserLimits * clading_step_limits;
157
G4UserLimits*
fiber_core_step_limits
=
nullptr
;
158
160
PHG4GDMLConfig
*
gdml_config
=
nullptr
;
161
// private:
162
163
SpacalGeom_t
*
_geom
=
nullptr
;
164
165
RawTowerGeomContainer
*
m_RawTowerGeomContainer
=
nullptr
;
166
std::string
m_TowerGeomNodeName
;
167
};
168
169
#endif
coresoftware
blob
master
simulation
g4simulation
g4detectors
PHG4SpacalDetector.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:13
using
1.8.2 with
sPHENIX GitHub integration