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
Proto3ShowerCalib.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Proto3ShowerCalib.h
1
#ifndef __Proto3ShowerCalib_H__
2
#define __Proto3ShowerCalib_H__
3
4
#include <
fun4all/SubsysReco.h
>
5
#include <TNtuple.h>
6
#include <TFile.h>
7
#include <string>
8
#include <stdint.h>
9
#include <fstream>
10
11
class
PHCompositeNode
;
12
class
PHG4HitContainer
;
13
class
Fun4AllHistoManager
;
14
class
TH1F;
15
class
TTree;
16
class
SvtxEvalStack
;
17
class
PHG4Particle
;
18
class
RawTowerGeom
;
19
class
RawTowerContainer
;
20
class
RawTowerGeomContainer_Cylinderv1
;
21
class
SvtxTrack
;
22
24
class
Proto3ShowerCalib
:
public
SubsysReco
25
{
26
27
public
:
28
29
Proto3ShowerCalib
(
const
std::string
&
filename
=
"cemc_ana.root"
);
30
virtual
31
~Proto3ShowerCalib
();
32
33
int
34
Init
(
PHCompositeNode
*topNode);
35
int
36
InitRun
(
PHCompositeNode
*topNode);
37
int
38
process_event
(
PHCompositeNode
*topNode);
39
int
40
End
(
PHCompositeNode
*topNode);
41
42
int
43
LoadRecalibMap
(
const
std::string
&
file
);
44
45
void
46
is_sim
(
bool
b
) {
_is_sim
=
b
;}
47
48
class
Eval_Run :
public
TObject
49
{
50
public
:
51
Eval_Run
()
52
{
53
reset
();
54
}
55
virtual
56
~Eval_Run
()
57
{
58
}
59
60
void
61
reset
()
62
{
63
run
= -31454;
64
event
= -31454;
65
beam_mom
= -0;
66
hodo_h
= -31454;
67
hodo_v
= -31454;
68
C2_sum
= -31454;
69
70
sum_energy_T
= -31454;
71
EoP
= -31454;
72
truth_y
= -31454;
73
truth_z
= -31454;
74
75
valid_hodo_v
=
false
;
76
valid_hodo_h
=
false
;
77
trigger_veto_pass
=
false
;
78
good_temp
=
false
;
79
good_e
=
false
;
80
good_data
=
false
;
81
}
82
83
int
run
;
84
int
event
;
85
86
float
beam_mom
;
87
float
getbeammom
(){
return
beam_mom
;}
88
int
hodo_h
;
89
int
hodo_v
;
90
91
float
C2_sum
;
92
94
float
sum_energy_T
;
96
float
EoP
;
97
98
bool
valid_hodo_v
;
99
bool
valid_hodo_h
;
100
bool
trigger_veto_pass
;
101
bool
good_temp
;
102
bool
good_e
;
103
bool
good_data
;
104
105
float
truth_y
;
106
float
truth_z
;
107
108
float
beam_2CH_mm
;
109
float
beam_2CV_mm
;
110
111
ClassDef(
Eval_Run
,4)
112
};
113
114
class
Eval_Cluster :
public
TObject
115
{
116
public
:
117
Eval_Cluster
()
118
{
119
reset
();
120
}
121
122
virtual
123
~Eval_Cluster
()
124
{
125
}
126
127
void
128
reset
()
129
{
130
max_col
= -1;
131
max_row
= -1;
132
average_col
= 0;
133
average_row
= 0;
134
fmodphi
= -999;
135
fmodeta
= -999;
136
sum_E
= 0;
137
}
138
139
void
140
reweight_clus_pol
()
141
{
142
if
(
sum_E
> 0)
143
{
144
average_col
/=
sum_E
;
145
average_row
/=
sum_E
;
146
}
147
else
148
{
149
average_col
= -31454;
150
average_row
= -31454;
151
152
}
153
}
154
void
setfmods
(
float
eta
,
float
phi
)
155
{
156
fmodphi
=
phi
;
157
fmodeta
=
eta
;
158
}
159
float
getfmodphi
()
160
{
161
return
fmodphi
;
162
}
163
float
getfmodeta
()
164
{
165
return
fmodeta
;
166
}
167
float
getavgcol
(){
return
average_col
;}
168
float
getavgrow
(){
return
average_row
;}
169
float
getsumE
(){
return
sum_E
;}
170
int
max_col
;
171
int
max_row
;
172
float
fmodphi
;
173
float
fmodeta
;
174
175
float
average_col
;
176
float
average_row
;
177
float
sum_E
;
178
179
ClassDef(
Eval_Cluster
,2)
180
};
181
182
private
:
183
184
// calorimeter size
185
enum
186
{
187
n_size
= 8
188
};
189
190
bool
_is_sim
;
191
bool
_use_hodoscope_calibs
;
192
Fun4AllHistoManager
*
193
get_HistoManager
();
194
195
std::pair<int, int>
196
find_max
(
RawTowerContainer
* towers,
int
cluster_size);
197
const
static
int
nfmodbins
= 17;
198
float
fmodbins
[
nfmodbins
];
199
std::string
_filename
;
200
201
unsigned
long
_ievent
;
202
float
hodoscope_recalibrations
[8][8];
203
204
float
clus_3x3_sim_recalibs
[
nfmodbins
-1][
nfmodbins
-1];
205
float
clus_5x5_sim_recalibs
[
nfmodbins
-1][
nfmodbins
-1];
206
207
fstream
fdata
;
208
209
Eval_Run
_eval_run
;
210
211
Eval_Cluster
_eval_3x3_raw
;
212
Eval_Cluster
_eval_5x5_raw
;
213
214
Eval_Cluster
_eval_3x3_prod
;
215
Eval_Cluster
_eval_5x5_prod
;
216
217
Eval_Cluster
_eval_3x3_temp
;
218
Eval_Cluster
_eval_5x5_temp
;
219
220
Eval_Cluster
_eval_3x3_recalib
;
221
Eval_Cluster
_eval_5x5_recalib
;
222
223
std::map<std::pair<int, int>,
double
>
_recalib_const
;
224
};
225
226
#endif // __Proto3ShowerCalib_H__
analysis
blob
master
Prototype3
EMCal
ShowerCalib_PositionDependent
Proto3ShowerCalib.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:56
using
1.8.2 with
sPHENIX GitHub integration