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