ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QAG4SimulationCalorimeter.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file QAG4SimulationCalorimeter.h
1 #ifndef QA_QAG4SIMULATIONCALORIMETER_H
2 #define QA_QAG4SIMULATIONCALORIMETER_H
3 
4 #include <fun4all/SubsysReco.h>
5 
6 #include <cstdint>
7 #include <memory>
8 #include <string>
9 
10 class CaloEvalStack;
11 class PHCompositeNode;
12 class PHG4HitContainer;
14 
17 {
18  public:
19  enum enu_flags
20  {
21  kProcessG4Hit = 1 << 1,
22  kProcessTower = 1 << 2,
23  kProcessCluster = 1 << 3,
24 
26  };
27 
28  QAG4SimulationCalorimeter(const std::string &calo_name, enu_flags flags =
29  kDefaultFlag);
31 
32  int Init(PHCompositeNode *topNode);
33  int InitRun(PHCompositeNode *topNode);
34  int process_event(PHCompositeNode *topNode);
35 
36  uint32_t
37  get_flags() const
38  {
39  return _flags;
40  }
41 
42  void
44  {
45  _flags = (uint32_t) flags;
46  }
47 
48  void
50  {
51  _flags |= (uint32_t) flag;
52  }
53 
54  bool
56  {
57  return _flags & flag;
58  }
59 
60  void
62  {
63  _flags &= ~(uint32_t) flag;
64  }
65 
67  std::string
69 
70  private:
71  int Init_G4Hit(PHCompositeNode *topNode);
73 
74  int Init_Tower(PHCompositeNode *topNode);
76 
77  int Init_Cluster(PHCompositeNode *topNode);
79 
80  std::shared_ptr<CaloEvalStack> _caloevalstack;
81 
82  std::string _calo_name;
83  uint32_t _flags;
84 
88 };
89 
90 #endif // QA_QAG4SIMULATIONCALORIMETER_H