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
Proto2ShowerCalib.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Proto2ShowerCalib.h
1
#ifndef __Proto2ShowerCalib_H__
2
#define __Proto2ShowerCalib_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
SvtxTrack
;
21
23
class
Proto2ShowerCalib
:
public
SubsysReco
24
{
25
26
public
:
27
28
Proto2ShowerCalib
(
const
std::string
&
filename
=
"cemc_ana.root"
);
29
virtual
30
~Proto2ShowerCalib
();
31
32
int
33
Init
(
PHCompositeNode
*topNode);
34
int
35
InitRun
(
PHCompositeNode
*topNode);
36
int
37
process_event
(
PHCompositeNode
*topNode);
38
int
39
End
(
PHCompositeNode
*topNode);
40
41
int
42
LoadRecalibMap
(
const
std::string
&
file
);
43
44
void
45
is_sim
(
bool
b
) {
_is_sim
=
b
;}
46
47
class
Eval_Run
:
public
TObject
48
{
49
public
:
50
Eval_Run
()
51
{
52
reset
();
53
}
54
virtual
55
~Eval_Run
()
56
{
57
}
58
59
void
60
reset
()
61
{
62
run
= -31454;
63
event
= -31454;
64
beam_mom
= -0;
65
hodo_h
= -31454;
66
hodo_v
= -31454;
67
C2_sum
= -31454;
68
69
sum_energy_T
= -31454;
70
EoP
= -31454;
71
truth_y
= -31454;
72
truth_z
= -31454;
73
74
valid_hodo_v
=
false
;
75
valid_hodo_h
=
false
;
76
trigger_veto_pass
=
false
;
77
good_temp
=
false
;
78
good_e
=
false
;
79
good_data
=
false
;
80
}
81
82
int
run
;
83
int
event
;
84
85
float
beam_mom
;
86
87
int
hodo_h
;
88
int
hodo_v
;
89
90
float
C2_sum
;
91
93
float
sum_energy_T
;
95
float
EoP
;
96
97
bool
valid_hodo_v
;
98
bool
valid_hodo_h
;
99
bool
trigger_veto_pass
;
100
bool
good_temp
;
101
bool
good_e
;
102
bool
good_data
;
103
104
float
truth_y
;
105
float
truth_z
;
106
107
ClassDef(
Eval_Run
,3)
108
};
109
110
class
Eval_Cluster
:
public
TObject
111
{
112
public
:
113
Eval_Cluster
()
114
{
115
reset
();
116
}
117
118
virtual
119
~Eval_Cluster
()
120
{
121
}
122
123
void
124
reset
()
125
{
126
max_col
= -1;
127
max_row
= -1;
128
average_col
= 0;
129
average_row
= 0;
130
131
sum_E
= 0;
132
}
133
134
void
135
reweight_clus_pol
()
136
{
137
if
(
sum_E
> 0)
138
{
139
average_col
/=
sum_E
;
140
average_row
/=
sum_E
;
141
}
142
else
143
{
144
average_col
= -31454;
145
average_row
= -31454;
146
147
}
148
}
149
150
int
max_col
;
151
int
max_row
;
152
153
float
average_col
;
154
float
average_row
;
155
float
sum_E
;
156
157
ClassDef(
Eval_Cluster
,2)
158
};
159
160
private
:
161
162
// calorimeter size
163
enum
164
{
165
n_size
= 8
166
};
167
168
bool
_is_sim
;
169
170
Fun4AllHistoManager
*
171
get_HistoManager
();
172
173
std::pair<int, int>
174
find_max
(
RawTowerContainer
* towers,
int
cluster_size);
175
176
std::string
_filename
;
177
178
unsigned
long
_ievent
;
179
180
fstream
fdata
;
181
182
Eval_Run
_eval_run
;
183
184
Eval_Cluster
_eval_3x3_raw
;
185
Eval_Cluster
_eval_5x5_raw
;
186
187
Eval_Cluster
_eval_3x3_prod
;
188
Eval_Cluster
_eval_5x5_prod
;
189
190
Eval_Cluster
_eval_3x3_temp
;
191
Eval_Cluster
_eval_5x5_temp
;
192
193
Eval_Cluster
_eval_3x3_recalib
;
194
Eval_Cluster
_eval_5x5_recalib
;
195
196
std::map<std::pair<int, int>,
double
>
_recalib_const
;
197
};
198
199
#endif // __Proto2ShowerCalib_H__
analysis
blob
master
Prototype2
EMCal
ShowerCalib
Proto2ShowerCalib.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:56
using
1.8.2 with
sPHENIX GitHub integration