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
HcalRawTowerBuilder.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file HcalRawTowerBuilder.h
1
#ifndef G4CALO_HCALRAWTOWERBUILDER_H
2
#define G4CALO_HCALRAWTOWERBUILDER_H
3
4
#include <
fun4all/SubsysReco.h
>
5
6
#include <phparameter/PHParameterInterface.h>
7
8
#include <cmath>
9
#include <map>
// for map
10
#include <string>
11
#include <utility>
// for pair
12
#include <vector>
13
14
class
PHCompositeNode
;
15
class
RawTowerContainer
;
16
class
RawTowerGeomContainer
;
17
18
class
HcalRawTowerBuilder
:
public
SubsysReco
,
public
PHParameterInterface
19
{
20
public
:
21
HcalRawTowerBuilder
(
const
std::string
&
name
=
"HcalRawTowerBuilder"
);
22
~HcalRawTowerBuilder
()
override
{}
23
24
int
InitRun
(
PHCompositeNode
*topNode)
override
;
25
int
process_event
(
PHCompositeNode
*topNode)
override
;
26
void
Detector
(
const
std::string
&d)
27
{
28
m_InputDetector
= d;
29
m_OutputDetector
= d;
30
}
31
void
InDetector
(
const
std::string
&d) {
m_InputDetector
= d; }
32
void
OutDetector
(
const
std::string
&d) {
m_OutputDetector
= d; }
33
void
EminCut
(
const
double
e
) {
m_Emin
=
e
; }
34
void
checkenergy
(
const
int
i
= 1) {
m_ChkEnergyConservationFlag
=
i
; }
35
36
enum
enu_tower_energy_src
37
{
39
kEnergyDeposition
,
40
42
kLightYield
,
43
45
kIonizationEnergy
,
46
48
kRawLightYield
,
49
51
unknown
= -1
52
};
53
enum
ProcessTowerType
54
{
55
kRawTowerOnly
= 0,
56
kTowerInfoOnly
= 1,
57
kBothTowers
=2
58
};
59
60
61
int
get_tower_energy_src
()
const
62
{
63
return
m_TowerEnergySrc
;
64
}
65
66
std::string
67
get_sim_tower_node_prefix
()
const
68
{
69
return
m_SimTowerNodePrefix
;
70
}
71
72
void
73
set_sim_tower_node_prefix
(
const
std::string
&simTowerNodePrefix)
74
{
75
m_SimTowerNodePrefix
= simTowerNodePrefix;
76
}
77
78
short
get_tower_row
(
const
short
cellrow)
const
;
79
80
void
set_decal_filename
(
const
std::string
&
fname
) {
m_DeCalibrationFileName
=
fname
; }
81
82
void
SetDefaultParameters
()
override
;
83
84
void
set_cell_decal_factor
(
const
int
etabin
,
const
int
phibin,
const
double
d);
85
void
set_tower_decal_factor
(
const
int
etabin
,
const
int
phibin,
const
double
d);
86
void
Print
(
const
std::string
&what =
"ALL"
)
const override
;
87
88
void
set_towerinfo
(
HcalRawTowerBuilder::ProcessTowerType
UseTowerInfo )
89
{
90
m_UseTowerInfo
= UseTowerInfo;
91
}
92
93
private
:
94
void
CreateNodes
(
PHCompositeNode
*topNode);
95
void
ReadParamsFromNodeTree
(
PHCompositeNode
*topNode);
96
void
SetTowerDecalFactors
();
97
void
set_tower_decal_factor_real
(
const
int
etabin
,
const
int
phibin,
const
double
d);
98
99
RawTowerContainer
*
m_Towers
=
nullptr
;
100
RawTowerGeomContainer
*
m_RawTowerGeom
=
nullptr
;
101
102
double
m_Emin
= NAN;
103
int
m_ChkEnergyConservationFlag
= 0;
104
int
m_TowerEnergySrc
= enu_tower_energy_src::unknown;
105
int
m_NcellToTower
= -1;
106
HcalRawTowerBuilder::ProcessTowerType
m_UseTowerInfo
= HcalRawTowerBuilder::ProcessTowerType::kBothTowers;
// 0 just produce RawTowers, 1 just produce TowerInfo objects, and 2 produce both
107
108
109
110
std::string
m_OutputDetector
;
111
std::string
m_InputDetector
;
112
std::string
m_TowerNodeName
;
113
std::string
m_TowerInfoNodeName
;
114
std::string
m_TowerGeomNodeName
;
115
std::string
m_SimTowerNodePrefix
;
116
std::string
m_DeCalibrationFileName
;
117
std::vector<std::vector<double> >
m_DecalArray
;
118
std::map<std::pair<int, int>,
double
>
m_TowerDecalFactors
;
119
};
120
121
#endif
/* G4CALO_HCALRAWTOWERBUILDER_H */
coresoftware
blob
master
simulation
g4simulation
g4calo
HcalRawTowerBuilder.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:12
using
1.8.2 with
sPHENIX GitHub integration