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
SvtxTrack
;
21
23
class
Proto3ShowerCalib
:
public
SubsysReco
24
{
25
26
public
:
27
28
Proto3ShowerCalib
(
const
std::string
&
filename
=
"cemc_ana.root"
);
29
virtual
30
~Proto3ShowerCalib
();
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
float
beam_2CH_mm
;
108
float
beam_2CV_mm
;
109
110
ClassDef(
Eval_Run
,4)
111
};
112
113
class
Eval_Cluster
:
public
TObject
114
{
115
public
:
116
Eval_Cluster
()
117
{
118
reset
();
119
}
120
121
virtual
122
~Eval_Cluster
()
123
{
124
}
125
126
void
127
reset
()
128
{
129
max_col
= -1;
130
max_row
= -1;
131
average_col
= 0;
132
average_row
= 0;
133
134
sum_E
= 0;
135
}
136
137
void
138
reweight_clus_pol
()
139
{
140
if
(
sum_E
> 0)
141
{
142
average_col
/=
sum_E
;
143
average_row
/=
sum_E
;
144
}
145
else
146
{
147
average_col
= -31454;
148
average_row
= -31454;
149
150
}
151
}
152
153
int
max_col
;
154
int
max_row
;
155
156
float
average_col
;
157
float
average_row
;
158
float
sum_E
;
159
160
ClassDef(
Eval_Cluster
,2)
161
};
162
163
private
:
164
165
// calorimeter size
166
enum
167
{
168
n_size
= 8
169
};
170
171
bool
_is_sim
;
172
173
Fun4AllHistoManager
*
174
get_HistoManager
();
175
176
std::pair<int, int>
177
find_max
(
RawTowerContainer
* towers,
int
cluster_size);
178
179
std::string
_filename
;
180
181
unsigned
long
_ievent
;
182
183
fstream
fdata
;
184
185
Eval_Run
_eval_run
;
186
187
Eval_Cluster
_eval_3x3_raw
;
188
Eval_Cluster
_eval_5x5_raw
;
189
190
Eval_Cluster
_eval_3x3_prod
;
191
Eval_Cluster
_eval_5x5_prod
;
192
193
Eval_Cluster
_eval_3x3_temp
;
194
Eval_Cluster
_eval_5x5_temp
;
195
196
Eval_Cluster
_eval_3x3_recalib
;
197
Eval_Cluster
_eval_5x5_recalib
;
198
199
std::map<std::pair<int, int>,
double
>
_recalib_const
;
200
};
201
202
#endif // __Proto3ShowerCalib_H__
analysis
blob
master
Prototype3
EMCal
ShowerCalib
Proto3ShowerCalib.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:56
using
1.8.2 with
sPHENIX GitHub integration