EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JetTruthEval.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file JetTruthEval.h
1 #ifndef G4EVAL_JETTRUTHEVAL_H
2 #define G4EVAL_JETTRUTHEVAL_H
3 
4 #include "CaloEvalStack.h"
5 #include "SvtxEvalStack.h"
6 
7 #include <map>
8 #include <set>
9 #include <string>
10 
11 class Jet;
12 class JetMap;
13 
14 class PHCompositeNode;
15 
16 class PHG4Hit;
17 class PHG4Particle;
18 class PHG4Shower;
20 
22 {
23  public:
26  const std::string& truthjetname);
27  virtual ~JetTruthEval();
28 
30  void next_event(PHCompositeNode* topNode);
31 
33  void do_caching(bool do_cache)
34  {
35  _do_cache = do_cache;
36  _svtxevalstack.do_caching(do_cache);
37  _cemcevalstack.do_caching(do_cache);
38  _hcalinevalstack.do_caching(do_cache);
39  _hcaloutevalstack.do_caching(do_cache);
40  _femcevalstack.do_caching(do_cache);
41  _fhcalevalstack.do_caching(do_cache);
42  _eemcevalstack.do_caching(do_cache);
43  }
44 
47  void set_strict(bool strict)
48  {
49  _strict = strict;
50  _svtxevalstack.set_strict(strict);
51  _cemcevalstack.set_strict(strict);
54  _femcevalstack.set_strict(strict);
56  _eemcevalstack.set_strict(strict);
57  }
58 
60  unsigned int get_errors()
61  {
63  }
64 
66  void set_verbosity(int verbosity)
67  {
68  _verbosity = verbosity;
69  _svtxevalstack.set_verbosity(verbosity);
70  _cemcevalstack.set_verbosity(verbosity);
73  _femcevalstack.set_verbosity(verbosity);
74  _fhcalevalstack.set_verbosity(verbosity);
75  _eemcevalstack.set_verbosity(verbosity);
76  }
77 
78  //set track node name
79  void set_track_nodename(const std::string& name)
80  {
82  }
83 
86 
89 
92 
95 
98 
101 
104 
105  // ---reduced sim node or better----------------------------------------------
106 
108  Jet* get_truth_jet(PHG4Particle* truthparticle);
109 
111  std::set<PHG4Particle*> all_truth_particles(Jet* truthjet);
112 
114  std::set<PHG4Shower*> all_truth_showers(Jet* truthjet);
115 
116  // ---full sim node required--------------------------------------------------
117 
119  std::set<PHG4Hit*> all_truth_hits(Jet* truthjet);
120 
121  private:
122  void get_node_pointers(PHCompositeNode* topNode);
123 
124  std::string _truthjetname;
132 
135 
136  bool _strict;
138  unsigned int _errors;
139 
140  bool _do_cache;
141  std::map<Jet*, std::set<PHG4Particle*> > _cache_all_truth_particles;
142  std::map<Jet*, std::set<PHG4Shower*> > _cache_all_truth_showers;
143  std::map<Jet*, std::set<PHG4Hit*> > _cache_all_truth_hits;
144  std::map<PHG4Particle*, Jet*> _cache_get_truth_jet;
145 };
146 
147 #endif // JETTRUTHEVAL_H__