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
Proto4TowerCalib.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Proto4TowerCalib.h
1
#ifndef __Proto4TowerCalib_H__
2
#define __Proto4TowerCalib_H__
3
4
#include <TFile.h>
5
#include <TNtuple.h>
6
#include <
fun4all/SubsysReco.h
>
7
#include <stdint.h>
8
#include <fstream>
9
#include <string>
10
11
class
PHCompositeNode
;
12
class
PHG4HitContainer
;
13
class
Fun4AllHistoManager
;
14
class
TH1F;
15
class
TTree;
16
class
TChain;
17
class
SvtxEvalStack
;
18
class
PHG4Particle
;
19
class
RawTowerGeom
;
20
class
RawTowerContainer
;
21
class
SvtxTrack
;
22
24
class
Proto4TowerCalib
:
public
SubsysReco
25
{
26
public
:
28
Proto4TowerCalib
(
const
std::string
&
filename
=
"Proto4TowerCalib.root"
);
29
31
virtual
~Proto4TowerCalib
();
32
34
int
Init
(
PHCompositeNode
*topNode);
35
37
int
InitRun
(
PHCompositeNode
*topNode);
38
40
int
process_event
(
PHCompositeNode
*topNode);
41
43
int
End
(
PHCompositeNode
*topNode);
44
46
void
is_sim
(
bool
b
)
47
{
48
_is_sim
=
b
;
49
}
50
51
// TowerCalib Analysis
52
int
InitAna
();
53
54
int
MakeAna
();
55
56
int
FinishAna
();
57
58
void
set_det
(
std::string
detector
)
59
{
60
_mDet
=
detector
;
61
}
62
63
void
set_colID
(
int
colID)
64
{
65
_mCol
= colID;
66
}
67
68
69
class
HCAL_Tower
:
public
TObject
70
{
71
public
:
72
HCAL_Tower
()
73
{
74
reset
();
75
}
76
77
virtual
~HCAL_Tower
(){}
78
79
void
reset
()
80
{
81
// HCALIN
82
hcalin_e_sim
= 0.;
83
84
hcalin_lg_e_raw
= 0.;
85
hcalin_lg_e_calib
= 0.;
86
87
for
(
int
itwr=0; itwr<16; itwr++)
88
{
89
hcalin_twr_sim
[itwr] = 0.;
90
hcalin_lg_twr_raw
[itwr] = 0.;
91
hcalin_lg_twr_calib
[itwr] = 0.;
92
}
93
94
// HCALOUT
95
hcalout_e_sim
= 0.;
96
97
hcalout_lg_e_raw
= 0.;
98
hcalout_lg_e_calib
= 0.;
99
100
hcalout_hg_e_raw
= 0.;
101
hcalout_hg_e_calib
= 0.;
102
103
for
(
int
itwr=0; itwr<16; itwr++)
104
{
105
hcalout_twr_sim
[itwr] = 0.;
106
107
hcalout_lg_twr_raw
[itwr] = 0.;
108
hcalout_lg_twr_calib
[itwr] = 0.;
109
110
hcalout_hg_twr_raw
[itwr] = 0.;
111
hcalout_hg_twr_calib
[itwr] = 0.;
112
}
113
114
// total energy and asymmetry
115
hcal_total_sim
= -999.;
116
hcal_total_raw
= -999.;
117
hcal_total_calib
= -999.;
118
119
hcal_asym_sim
= -999.;
120
hcal_asym_raw
= -999.;
121
hcal_asym_calib
= -999.;
122
}
123
124
125
// HCALIN
126
float
hcalin_e_sim
;
127
float
hcalin_twr_sim
[16];
128
129
float
hcalin_lg_e_raw
;
130
float
hcalin_lg_twr_raw
[16];
131
132
float
hcalin_lg_e_calib
;
133
float
hcalin_lg_twr_calib
[16];
134
135
// HCALOUT
136
float
hcalout_e_sim
;
137
float
hcalout_twr_sim
[16];
138
139
float
hcalout_lg_e_raw
;
140
float
hcalout_lg_twr_raw
[16];
141
142
float
hcalout_lg_e_calib
;
143
float
hcalout_lg_twr_calib
[16];
144
145
float
hcalout_hg_e_raw
;
146
float
hcalout_hg_twr_raw
[16];
147
148
float
hcalout_hg_e_calib
;
149
float
hcalout_hg_twr_calib
[16];
150
151
// total energy and asymmetry
152
float
hcal_total_sim
;
153
float
hcal_total_raw
;
154
float
hcal_total_calib
;
155
156
float
hcal_asym_sim
;
157
float
hcal_asym_raw
;
158
float
hcal_asym_calib
;
159
160
ClassDef(
HCAL_Tower
, 10)
161
};
162
163
private
:
164
// calorimeter size
165
enum
166
{
167
n_size
= 8
168
};
169
171
bool
_is_sim
;
172
174
Fun4AllHistoManager
*
175
get_HistoManager
();
176
177
std::pair<int, int>
178
find_max
(
RawTowerContainer
*towers,
int
cluster_size);
179
180
int
getChannelNumber
(
int
column,
int
row);
181
183
std::string
_filename
;
184
186
unsigned
long
_ievent
;
187
189
HCAL_Tower
_tower
;
190
191
// TowerCalib Analysis
192
TFile *
mFile_OutPut
;
193
TChain *
mChainInPut
;
194
unsigned
long
_mStartEvent
;
195
unsigned
long
_mStopEvent
;
196
int
_mInPut_flag
;
197
std::string
_mList
;
198
std::string
_mDet
;
199
int
_mCol
;
200
float
_mPedestal
;
201
202
HCAL_Tower
*
_mTower
;
203
204
TH1F *
h_mHCAL
[16];
205
float
hcal_twr
[16];
206
bool
_is_sig
[16];
207
208
bool
is_sig
(
int
colID);
209
int
fill_sig
(
int
colID);
210
int
reset_pedestal
();
211
};
212
213
#endif // __Proto4TowerCalib_H__
analysis
blob
master
Prototype4
HCal
TowerCalib
Proto4TowerCalib.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:57
using
1.8.2 with
sPHENIX GitHub integration