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
RawTowerCalibration.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RawTowerCalibration.h
1
#ifndef CALORECO_RAWTOWERCALIBRATION_H
2
#define CALORECO_RAWTOWERCALIBRATION_H
3
4
#include <
fun4all/SubsysReco.h
>
5
6
#include <phparameter/PHParameters.h>
7
8
#include <cmath>
9
#include <iostream>
10
#include <string>
11
12
class
CDBTTree
;
13
class
PHCompositeNode
;
14
class
RawTowerContainer
;
15
class
TowerInfoContainerv1
;
16
class
RawTowerGeomContainer
;
17
21
class
RawTowerCalibration
:
public
SubsysReco
22
{
23
public
:
24
RawTowerCalibration
(
const
std::string
&
name
=
"RawTowerCalibration"
);
25
~RawTowerCalibration
()
override
;
26
27
int
InitRun
(
PHCompositeNode
*topNode)
override
;
28
int
process_event
(
PHCompositeNode
*topNode)
override
;
29
int
End
(
PHCompositeNode
*topNode)
override
;
30
void
Detector
(
const
std::string
&d)
31
{
32
m_Detector
= d;
33
_tower_calib_params
.
set_name
(d);
34
}
35
void
TowerType
(
const
int
type
)
36
{
37
_tower_type
=
type
;
38
}
39
40
enum
enu_calib_algorithm
41
{
43
kNo_calibration
= 0,
44
46
kSimple_linear_calibration
= 1,
47
49
kTower_by_tower_calibration
= 2,
50
51
// use conditions DB file/wrapper (non-xml) file for most gain tracing correction factors
52
kDbfile_tbt_gain_corr
= 3
53
};
54
enum
ProcessTowerType
55
{
56
kRawTowerOnly
= 0,
57
kTowerInfoOnly
= 1,
58
kBothTowers
= 2
59
};
60
61
enu_calib_algorithm
get_calib_algorithm
()
const
62
{
63
return
_calib_algorithm
;
64
}
65
66
void
set_calib_algorithm
(
enu_calib_algorithm
calibAlgorithm)
67
{
68
_calib_algorithm
= calibAlgorithm;
69
}
70
71
double
get_calib_const_GeV_ADC
()
const
72
{
73
return
_calib_const_GeV_ADC
;
74
}
75
76
void
set_calib_const_GeV_ADC
(
double
calibConstGeVAdc)
77
{
78
_calib_const_GeV_ADC
= calibConstGeVAdc;
79
}
80
81
void
set_variable_GeV_ADC
(
const
bool
value
)
82
{
83
_GeV_ADC_file
=
value
;
84
}
85
86
std::string
get_calib_tower_node_prefix
()
const
87
{
88
return
_calib_tower_node_prefix
;
89
}
90
91
void
set_calib_tower_node_prefix
(
const
std::string
&calibTowerNodePrefix)
92
{
93
_calib_tower_node_prefix
= calibTowerNodePrefix;
94
}
95
96
double
get_pedstal_ADC
()
const
97
{
98
return
_pedstal_ADC
;
99
}
100
101
void
set_pedstal_ADC
(
double
pedstalAdc)
102
{
103
_pedstal_ADC
= pedstalAdc;
104
}
105
106
void
set_variable_pedestal
(
const
bool
value
)
107
{
108
_pedestal_file
=
value
;
109
}
110
111
std::string
get_raw_tower_node_prefix
()
const
112
{
113
return
_raw_tower_node_prefix
;
114
}
115
116
void
set_raw_tower_node_prefix
(
const
std::string
&rawTowerNodePrefix)
117
{
118
_raw_tower_node_prefix
= rawTowerNodePrefix;
119
}
120
121
void
set_zero_suppression_GeV
(
double
)
122
{
123
std::cout <<
"RawTowerCalibration::set_zero_suppression_GeV is deprecated!"
<< std::endl
124
<<
" See discussion at https://github.com/sPHENIX-Collaboration/coresoftware/pull/867"
<< std::endl
125
<< std::endl;
126
}
127
129
PHParameters
&
GetCalibrationParameters
()
130
{
131
return
_tower_calib_params
;
132
}
133
134
void
set_CalibrationFileName
(
const
char
*inCalFname)
135
{
136
m_CalibrationFileName
= inCalFname;
137
}
138
void
set_UseConditionsDB
(
const
bool
setUseCondDB)
139
{
140
m_UseConditionsDB
= setUseCondDB;
141
}
142
143
void
set_towerinfo
(
RawTowerCalibration::ProcessTowerType
UseTowerInfo)
144
{
145
m_UseTowerInfo
= UseTowerInfo;
146
}
147
148
protected
:
149
void
CreateNodes
(
PHCompositeNode
*topNode);
150
151
152
RawTowerContainer
*
_calib_towers
=
nullptr
;
153
RawTowerContainer
*
_raw_towers
=
nullptr
;
154
155
TowerInfoContainerv1
*
_calib_towerinfos
=
nullptr
;
156
TowerInfoContainerv1
*
_raw_towerinfos
=
nullptr
;
157
158
RawTowerGeomContainer
*
rawtowergeom
=
nullptr
;
159
160
enu_calib_algorithm
_calib_algorithm
;
161
162
std::string
m_Detector
;
163
std::string
RawTowerNodeName
;
164
std::string
RawTowerInfoNodeName
;
165
std::string
CaliTowerNodeName
;
166
std::string
CaliTowerInfoNodeName
;
167
std::string
TowerGeomNodeName
;
168
169
std::string
_calib_tower_node_prefix
;
170
std::string
_raw_tower_node_prefix
;
171
173
double
_pedstal_ADC
= NAN;
174
176
bool
_pedestal_file
=
false
;
177
179
double
_calib_const_GeV_ADC
= NAN;
180
182
bool
_GeV_ADC_file
=
false
;
183
185
int
_tower_type
= -1;
186
188
PHParameters
_tower_calib_params
;
189
190
std::string
m_CalibrationFileName
;
191
bool
m_UseConditionsDB
=
false
;
192
193
CDBTTree
*
m_CDBTTree
=
nullptr
;
194
RawTowerCalibration::ProcessTowerType
m_UseTowerInfo
= RawTowerCalibration::ProcessTowerType::kBothTowers;
// 0 just produce RawTowers, 1 just produce TowerInfo objects, and 2 produce both
195
};
196
197
#endif
coresoftware
blob
master
offline
packages
CaloReco
RawTowerCalibration.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:05
using
1.8.2 with
sPHENIX GitHub integration