Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackEvaluation.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackEvaluation.h
1 #ifndef G4EVAL_TRACKEVALUATION_H
2 #define G4EVAL_TRACKEVALUATION_H
3 
10 
11 #include <fun4all/SubsysReco.h>
12 
14 #include <trackbase/TrkrDefs.h>
15 
17 
18 #include <map>
19 #include <set>
20 #include <string>
21 #include <vector>
22 
23 class ActsGeometry;
26 class PHG4Hit;
27 class PHG4HitContainer;
28 class PHG4Particle;
30 class SvtxTrack;
31 class SvtxTrackMap;
32 class TrkrCluster;
36 class TrkrHitTruthAssoc;
37 
39 {
40  public:
42  TrackEvaluation(const std::string& = "TrackEvaluation");
43 
45  int Init(PHCompositeNode*) override;
46 
48  int InitRun(PHCompositeNode*) override;
49 
51  int process_event(PHCompositeNode*) override;
52 
54  int End(PHCompositeNode*) override;
55 
56  enum Flags
57  {
58  EvalEvent = 1 << 0,
59  EvalClusters = 1 << 1,
60  EvalTracks = 1 << 2
61  };
62 
64  void set_flags(int flags)
65  {
66  m_flags = flags;
67  }
68 
69  private:
72 
74  void evaluate_event();
75 
77  void evaluate_clusters();
78 
80  void evaluate_tracks();
81 
82  // get geant hits associated to a cluster
83  using G4HitSet = std::set<PHG4Hit*>;
85  G4HitSet find_g4hits(TrkrDefs::cluskey, int id) const;
86 
88  std::pair<int, int> get_max_contributor(SvtxTrack*) const;
89 
91  int get_embed(PHG4Particle*) const;
92 
95 
98 
100 
105 
106  // add truth information
107  void add_truth_information(TrackEvaluationContainerv1::ClusterStruct&, const std::set<PHG4Hit*>&) const;
108 
109  // add truth information
114  void add_truth_information_micromegas(TrackEvaluationContainerv1::ClusterStruct&, int /* tileid */, const std::set<PHG4Hit*>&) const;
115 
118 
121 
124 
127 
130 
133 
136 
139 
141 
147 
150 
153 
156 
157  // map cluster keys to g4hits
158  using G4HitMap = std::map<TrkrDefs::cluskey, G4HitSet>;
161 };
162 
163 #endif // G4EVAL_TrackEvaluation_H