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
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 "
PHG4CylinderGeom_Spacalv1.h
"
16
17
#include <
g4main/PHG4Detector.h
>
18
19
#include <Geant4/G4Transform3D.hh>
20
#include <Geant4/G4Types.hh>
// for G4double
21
22
#include <map>
23
#include <string>
// for string
24
#include <utility>
// for pair
25
26
class
G4LogicalVolume
;
27
class
G4UserLimits
;
28
class
G4VPhysicalVolume
;
29
class
PHCompositeNode
;
30
class
PHG4CylinderGeom
;
31
class
PHG4GDMLConfig
;
32
class
PHG4SpacalDisplayAction
;
33
class
PHParameters
;
34
class
PHG4Subsystem
;
35
36
class
PHG4SpacalDetector
:
public
PHG4Detector
37
{
38
public
:
39
typedef
PHG4CylinderGeom_Spacalv1
SpacalGeom_t
;
40
41
PHG4SpacalDetector
(
PHG4Subsystem
* subsys,
PHCompositeNode
* Node,
const
std::string& dnam,
42
PHParameters
*
parameters
,
const
int
layer
= 0,
bool
init_geom =
true
);
43
44
~PHG4SpacalDetector
(
void
)
override
;
45
46
void
47
ConstructMe
(
G4LogicalVolume
*
world
)
override
;
48
49
virtual
std::pair<G4LogicalVolume*, G4Transform3D>
50
Construct_AzimuthalSeg
();
51
52
virtual
G4LogicalVolume
*
53
Construct_Fiber
(
const
G4double
length
,
const
std::string&
id
);
54
55
void
56
SetActive
(
const
int
i = 1)
57
{
58
active
= i;
59
}
60
61
void
62
SetAbsorberActive
(
const
int
i = 1)
63
{
64
absorberactive
= i;
65
}
66
67
void
68
SetDetectorType
(
const
std::string&
typ
)
69
{
70
detector_type
=
typ
;
71
}
72
73
int
IsInCylinderActive
(
const
G4VPhysicalVolume
*);
74
75
void
76
SuperDetector
(
const
std::string&
name
)
77
{
78
superdetector
=
name
;
79
}
80
81
const
std::string
82
SuperDetector
()
const
83
{
84
return
superdetector
;
85
}
86
87
int
get_Layer
()
const
88
{
89
return
layer
;
90
}
91
92
void
93
Print
(
const
std::string& what =
"ALL"
)
const override
;
94
95
const
SpacalGeom_t
*
96
get_geom
()
const
97
{
98
return
_geom
;
99
}
100
101
virtual
PHG4CylinderGeom
*
clone_geom
()
const
102
{
103
return
new
SpacalGeom_t
(*
_geom
);
104
}
105
106
enum
107
{
108
FIBER_CORE
= 1,
109
FIBER_CLADING
= 0,
110
ABSORBER
= -1,
111
SUPPORT
= -2,
112
INACTIVE
= -100
113
};
114
115
PHG4SpacalDisplayAction
*
GetDisplayAction
() {
return
m_DisplayAction
; }
116
117
void
CosmicSetup
(
const
int
i) {
m_CosmicSetupFlag
= i; }
118
int
CosmicSetup
() {
return
m_CosmicSetupFlag
; }
119
120
private
:
121
PHG4SpacalDisplayAction
*
m_DisplayAction
=
nullptr
;
122
123
protected
:
124
std::map<const G4VPhysicalVolume*, int>
fiber_core_vol
;
125
127
std::map<const G4VPhysicalVolume*, int>
fiber_vol
;
128
130
std::map<const G4VPhysicalVolume*, int>
calo_vol
;
131
133
std::map<const G4VPhysicalVolume*, int>
block_vol
;
134
135
int
active
= 0;
136
int
absorberactive
= 0;
137
int
layer
= -9999;
138
int
m_CosmicSetupFlag
= 0;
139
std::string
detector_type
;
140
std::string
superdetector
;
141
142
// G4UserLimits * step_limits;
143
// G4UserLimits * clading_step_limits;
144
G4UserLimits
*
fiber_core_step_limits
=
nullptr
;
145
147
PHG4GDMLConfig
*
gdml_config
=
nullptr
;
148
//private:
149
150
SpacalGeom_t
*
_geom
=
nullptr
;
151
};
152
153
#endif
coresoftware
blob
master
simulation
g4simulation
g4detectors
PHG4SpacalDetector.h
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:42
using
1.8.2 with
ECCE GitHub integration