/
QAG4SimulationEicCalorimeter.h
executable file
·90 lines (70 loc) · 1.86 KB
/
QAG4SimulationEicCalorimeter.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
#ifndef EICQA_QAG4SIMULATIONEICCALORIMETER_H
#define EICQA_QAG4SIMULATIONEICCALORIMETER_H
#include <fun4all/SubsysReco.h>
#include <cstdint>
#include <memory>
#include <string>
class CaloEvalStack;
class PHCompositeNode;
class PHG4HitContainer;
class PHG4TruthInfoContainer;
/// \class QAG4SimulationEicCalorimeter
class QAG4SimulationEicCalorimeter : public SubsysReco
{
public:
enum enu_flags
{
kProcessG4Hit = 1 << 1,
kProcessTower = 1 << 2,
kProcessCluster = 1 << 3,
kDefaultFlag = kProcessG4Hit | kProcessTower | kProcessCluster
};
QAG4SimulationEicCalorimeter(const std::string &calo_name, enu_flags flags =
kDefaultFlag);
virtual ~QAG4SimulationEicCalorimeter() {}
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();
private:
int Init_G4Hit(PHCompositeNode *topNode);
int process_event_G4Hit(PHCompositeNode *topNode);
int Init_Tower(PHCompositeNode *topNode);
int process_event_Tower(PHCompositeNode *topNode);
int Init_Cluster(PHCompositeNode *topNode);
int process_event_Cluster(PHCompositeNode *topNode);
std::shared_ptr<CaloEvalStack> _caloevalstack;
std::string _calo_name;
uint32_t _flags;
PHG4HitContainer *_calo_hit_container;
PHG4HitContainer *_calo_abs_hit_container;
PHG4TruthInfoContainer *_truth_container;
};
#endif // QA_QAG4SIMULATIONEICCALORIMETER_H