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
PHG4HcalDetector.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4HcalDetector.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef G4DETECTORS_PHG4HCALDETECTOR_H
4
#define G4DETECTORS_PHG4HCALDETECTOR_H
5
6
#include <
g4main/PHG4Detector.h
>
7
8
#include <Geant4/G4Region.hh>
9
#include <Geant4/G4SystemOfUnits.hh>
10
#include <Geant4/G4Types.hh>
11
12
#include <map>
13
#include <string>
// for string
14
15
class
G4Material;
16
class
G4LogicalVolume;
17
class
G4UserSteppingAction;
18
class
G4VPhysicalVolume
;
19
class
PHCompositeNode
;
20
class
PHG4Subsystem
;
21
22
class
PHG4HcalDetector
:
public
PHG4Detector
23
{
24
public
:
26
PHG4HcalDetector
(
PHG4Subsystem
* subsys,
PHCompositeNode
* Node,
const
std::string
& dnam,
const
int
layer
= 0);
27
29
~PHG4HcalDetector
(
void
)
override
30
{
31
}
32
34
void
ConstructMe
(G4LogicalVolume* world)
override
;
35
36
void
SetRadius
(
const
G4double dbl) {
radius
= dbl *
cm
; }
37
void
SetLength
(
const
G4double dbl) {
length
= dbl *
cm
; }
38
void
SetPosition
(
const
G4double
x
,
const
G4double
y
,
const
G4double
z
)
39
{
40
xpos
= x *
cm
;
41
ypos
= y *
cm
;
42
zpos
= z *
cm
;
43
}
44
45
void
SetTilt
(
const
double
tilt) {
_sciTilt
= tilt; }
46
void
SetScintWidth
(
const
double
wid) {
_sciWidth
= wid *
cm
; }
47
void
SetNumScint
(
const
int
num) {
_sciNum
= num; }
48
void
SetScintPhi0
(
const
G4double phi0) {
_sciPhi0
= phi0; }
// in units of sampling cells
49
50
void
SetThickness
(
const
G4double dbl) {
TrackerThickness
= dbl *
cm
; }
51
void
SetMaterial
(
const
std::string
& mat) {
material
= mat; }
52
void
SetActive
(
const
int
i
= 1) {
active
=
i
; }
53
void
SetAbsorberActive
(
const
int
i
= 1) {
absorberactive
=
i
; }
54
void
SetDetectorType
(
const
std::string
& typ) {
detector_type
= typ; }
55
int
IsInCylinderActive
(
const
G4VPhysicalVolume
*);
56
void
SuperDetector
(
const
std::string
&
name
) {
superdetector
=
name
; }
57
const
std::string
SuperDetector
()
const
{
return
superdetector
; }
58
int
get_Layer
()
const
{
return
layer
; }
59
G4UserSteppingAction*
GetSteppingAction
()
override
60
{
61
if
(
_region
)
62
return
_region
->GetRegionalSteppingAction();
63
else
64
return
0;
65
}
66
67
void
Print
(
const
std::string
& what =
"ALL"
)
const override
;
68
69
static
int
INACTIVE
;
70
71
private
:
72
double
GetLength
(
const
double
phi
)
const
;
73
G4Material*
TrackerMaterial
;
74
G4double
TrackerThickness
;
75
76
G4LogicalVolume*
cylinder_logic
;
77
G4VPhysicalVolume
*
cylinder_physi
;
78
std::map<const G4VPhysicalVolume*, int>
box_vol
;
79
80
G4double
radius
;
81
G4double
length
;
82
G4double
xpos
,
ypos
,
zpos
;
83
G4double
_sciTilt
;
84
G4double
_sciWidth
;
85
G4int
_sciNum
;
86
G4double
_sciPhi0
;
// in units of sampling cells
87
G4Region*
_region
;
88
std::string
material
;
89
int
active
;
90
int
absorberactive
;
91
int
layer
;
92
std::string
detector_type
;
93
std::string
superdetector
;
94
};
95
96
#endif
coresoftware
blob
master
simulation
g4simulation
g4detectors
PHG4HcalDetector.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:13
using
1.8.2 with
sPHENIX GitHub integration