ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CaloTruthEval.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CaloTruthEval.h
1 #ifndef G4EVAL_CALOTRUTHEVAL_H
2 #define G4EVAL_CALOTRUTHEVAL_H
3 
4 #include "BaseTruthEval.h"
5 
6 #include <map>
7 #include <set>
8 #include <string>
9 
10 class PHCompositeNode;
11 
12 class PHG4Hit;
13 class PHG4HitContainer;
14 class PHG4Particle;
16 class PHG4Shower;
17 class PHG4VtxPoint;
18 
20 {
21  public:
23  CaloTruthEval(PHCompositeNode* topNode, const std::string& caloname);
24  virtual ~CaloTruthEval();
25 
27  int get_caloid() { return _caloid; }
28 
30  void next_event(PHCompositeNode* topNode);
31 
33  void do_caching(bool do_cache) { _do_cache = do_cache; }
34 
37  void set_strict(bool strict)
38  {
39  _strict = strict;
40  _basetrutheval.set_strict(strict);
41  }
42 
44  unsigned int get_errors() { return _errors; }
45 
47  void set_verbosity(int verbosity)
48  {
49  _verbosity = verbosity;
50  _basetrutheval.set_verbosity(verbosity);
51  }
52 
53  // ---reduced sim node or better----------------------------------------------
54 
57 
60 
63 
66 
69 
72 
75 
78 
81 
83  bool are_same_vertex(PHG4VtxPoint* vtx1, PHG4VtxPoint* vtx2);
84 
86  bool is_primary(PHG4Shower* shower);
87 
90 
93 
95  float get_shower_eh_ratio(PHG4Particle* primary);
96 
97  // ---full sim node required--------------------------------------------------
98 
100  bool has_full_node_pointers();
101 
103  std::set<PHG4Hit*> all_truth_hits(PHG4Shower* shower);
104 
106  std::set<PHG4Hit*> all_truth_hits(PHG4Particle* particle);
107 
110 
113 
116 
118  std::set<PHG4Hit*> get_shower_hits_from_primary(PHG4Particle* primary);
119 
120  private:
121  void get_node_pointers(PHCompositeNode* topNode);
122 
124 
125  std::string _caloname;
126  int _caloid;
130 
131  bool _strict;
133  unsigned int _errors;
134 
135  bool _do_cache;
136  std::map<PHG4Particle*, float> _cache_get_shower_energy_deposit;
137  std::map<PHG4Shower*, std::set<PHG4Hit*> > _cache_all_truth_hits_g4shower;
138  std::map<PHG4Particle*, std::set<PHG4Hit*> > _cache_all_truth_hits_g4particle;
139  std::map<PHG4Hit*, PHG4Particle*> _cache_get_primary_particle_g4hit;
140  std::map<PHG4Particle*, std::set<PHG4Hit*> > _cache_get_shower_hits_from_primary;
141 };
142 
143 #endif // G4EVAL_CALOTRUTHEVAL_H