/
QAG4SimulationEicCalorimeterSum.h
executable file
·158 lines (124 loc) · 3.45 KB
/
QAG4SimulationEicCalorimeterSum.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#ifndef EICQA_QAG4SIMULATIONEICCALORIMETERSUM_H
#define EICQA_QAG4SIMULATIONEICCALORIMETERSUM_H
#include <fun4all/SubsysReco.h>
#include <cstdint>
#include <memory>
#include <string>
class PHCompositeNode;
class PHG4TruthInfoContainer;
class PHG4Particle;
class CaloEvalStack;
class SvtxEvalStack;
class SvtxTrack;
/// \class QAG4SimulationEicCalorimeterSum
class QAG4SimulationEicCalorimeterSum : public SubsysReco
{
public:
enum enu_flags
{
// kProcessTower = 1 << 1,
kProcessCluster = 1 << 2, // histograms of best cluster matched to truth particle
kProcessTrackProj = 1 << 3, // histograms of tower/tower sums VS track projections
kDefaultFlag = kProcessCluster | kProcessTrackProj
};
QAG4SimulationEicCalorimeterSum(enu_flags flags = kDefaultFlag);
virtual ~QAG4SimulationEicCalorimeterSum() {}
int Init(PHCompositeNode *topNode);
int InitRun(PHCompositeNode *topNode);
int process_event(PHCompositeNode *topNode);
uint32_t
get_flags() const
{
return _flags;
}
void
set_flags(enu_flags flags)
{
_flags = (uint32_t) flags;
}
void
set_flag(enu_flags flag)
{
_flags |= (uint32_t) flag;
}
bool
flag(enu_flags flag)
{
return _flags & flag;
}
void
reset_flag(enu_flags flag)
{
_flags &= ~(uint32_t) flag;
}
//! common prefix for QA histograms
std::string
get_histo_prefix();
std::string
get_calo_name_cemc() const
{
return _calo_name_cemc;
}
void
set_calo_name_cemc(const std::string &caloNameCemc)
{
_calo_name_cemc = caloNameCemc;
}
std::string
get_calo_name_hcalin() const
{
return _calo_name_hcalin;
}
void
set_calo_name_hcalin(const std::string &caloNameHcalin)
{
_calo_name_hcalin = caloNameHcalin;
}
std::string
get_calo_name_hcalout() const
{
return _calo_name_hcalout;
}
void
set_calo_name_hcalout(const std::string &caloNameHcalout)
{
_calo_name_hcalout = caloNameHcalout;
}
float get_mag_field() const { return _magField; }
void set_mag_field(float magField) { _magField = magField; }
void set_track_nodename(const std::string &name) { m_TrackNodeName = name; }
private:
// int
// Init_Tower(PHCompositeNode *topNode);
// int
// process_event_Tower(PHCompositeNode *topNode);
int Init_Cluster(PHCompositeNode *topNode);
int process_event_Cluster(PHCompositeNode *topNode);
int Init_TrackProj(PHCompositeNode *topNode);
int process_event_TrackProj(PHCompositeNode *topNode);
std::shared_ptr<CaloEvalStack> _caloevalstack_cemc;
std::shared_ptr<CaloEvalStack> _caloevalstack_hcalin;
std::shared_ptr<CaloEvalStack> _caloevalstack_hcalout;
std::shared_ptr<SvtxEvalStack> _svtxevalstack;
uint32_t _flags;
std::string m_TrackNodeName;
std::string _calo_name_cemc;
std::string _calo_name_hcalin;
std::string _calo_name_hcalout;
PHG4TruthInfoContainer *_truth_container;
//! fetch the truth particle to be analyzed. By default it is the last primary particle in truth container (therefore works in single particle embedding)
PHG4Particle *
get_truth_particle();
//! fetch tower around track and histogram energy distributions
bool
eval_trk_proj(const std::string &detector, SvtxTrack *track,
PHCompositeNode *topNode);
//! central magnetic field strength in T
float _magField;
enum
{
//! max number of tower row/column to process around a track projection
Max_N_Tower = 11
};
};
#endif // EICQA_QAG4SIMULATIONEICCALORIMETERSUM_H