EIC 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 #include <trackbase/TrkrDefs.h>
14 
15 #include <map>
16 #include <set>
17 #include <string>
18 #include <vector>
19 
20 struct ActsSurfaceMaps;
24 class PHG4Hit;
25 class PHG4HitContainer;
26 class PHG4Particle;
28 class SvtxTrack;
29 class SvtxTrackMap;
30 class TrkrCluster;
34 class TrkrHitTruthAssoc;
35 
37 {
38  public:
39 
41  TrackEvaluation( const std::string& = "TrackEvaluation" );
42 
44  int Init(PHCompositeNode*) override;
45 
47  int InitRun(PHCompositeNode*) override;
48 
50  int process_event(PHCompositeNode*) override;
51 
53  int End(PHCompositeNode*) override;
54 
55  enum Flags
56  {
57  EvalEvent = 1<<0,
58  EvalClusters = 1<<1,
59  EvalTracks = 1<<2
60  };
61 
63  void set_flags( int flags )
64  { m_flags = flags; }
65 
66  private:
67 
70 
72  void evaluate_event();
73 
75  void evaluate_clusters();
76 
78  void evaluate_tracks();
79 
80  // get geant hits associated to a cluster
81  using G4HitSet = std::set<PHG4Hit*>;
83 
85  std::pair<int,int> get_max_contributor( SvtxTrack* ) const;
86 
88  int get_embed(PHG4Particle*) const;
89 
92 
95 
97 
102 
103  // add truth information
104  void add_truth_information( TrackEvaluationContainerv1::ClusterStruct&, std::set<PHG4Hit*> ) const;
105 
106  // add truth information
111  void add_truth_information_micromegas( TrackEvaluationContainerv1::ClusterStruct&, int /* tileid */, std::set<PHG4Hit*> ) const;
112 
115 
118 
121 
124 
127 
130 
133 
136 
139 
142 
144 
150 
153 
156 
159 
160  // map cluster keys to g4hits
161  using G4HitMap = std::map<TrkrDefs::cluskey,G4HitSet>;
163 
164 };
165 
166 #endif // G4EVAL_TrackEvaluation_H