Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TruthNodeMaker.h
Go to the documentation of this file.
1 #ifndef _TRUTH_NODE_MAKER__H_
2 #define _TRUTH_NODE_MAKER__H_
3 #include <fun4all/SubsysReco.h>
4 #include <map>
5 #include <string>
6 
7 class TVector3;
8 class TLorentzVector;
9 namespace HepMC {
10  class GenParticle;
11 };
12 class PHHepMCGenEventMap;
14 class PHG4HitContainer;
15 class SQEvent;
16 class SQMCEvent;
17 class SQTrack;
18 class SQTrackVector;
19 class SQDimuonVector;
20 class SQHitVector;
21 class SRecEvent;
22 class SQHit;
23 class GeomSvc;
24 
26 
41 class TruthNodeMaker: public SubsysReco {
42  // input nodes
43  PHHepMCGenEventMap* genevtmap;
44  PHG4TruthInfoContainer* g4true;
45  SQHitVector* m_vec_hit;
46  SRecEvent* m_rec_evt;
47  SQTrackVector* m_vec_rec_trk;
48  std::map<int, PHG4HitContainer*> m_g4hc;
49 
50  // output nodes
51  SQEvent* m_evt;
52  SQMCEvent* m_mcevt;
53  SQTrackVector* m_vec_trk;
54  SQDimuonVector* m_vec_dim;
55 
56  // rec input container type
57  bool m_legacy_rec_container;
58  bool m_do_truthtrk_tagging;
59  bool m_do_evt_header;
60 
61  // true - rec mathcing nhits threshold
62  double m_matching_threshold;
63 
64  public:
66  virtual ~TruthNodeMaker();
67  int Init(PHCompositeNode *topNode);
68  int InitRun(PHCompositeNode *topNode);
69  int process_event(PHCompositeNode *topNode);
70  int End(PHCompositeNode *topNode);
71 
72  void set_legacy_rec_container(bool b = true) { m_legacy_rec_container = b; }
73  void set_matching_threshold(double threshold) { m_matching_threshold = threshold; }
74 
75  private:
76  int GetNodes(PHCompositeNode *topNode);
77  int MakeNodes(PHCompositeNode *topNode);
78 
79  bool FindHitAtStation(int target_detIDs[], int trkid, const std::vector<SQHit*>& hitvec, TVector3& pos, TLorentzVector& mom);
80  int FindCommonHitIDs(std::vector<int>& hitidvec1, std::vector<int>& hitidvec2);
81 };
82 
83 #endif /* _TRUTH_NODE_MAKER__H_ */
PHHepMCGenEventMap is collection of HEPMC events input into this simulation map of embedding ID -&gt; PH...
int process_event(PHCompositeNode *topNode)
An SQ interface class to hold a list of SQTrack objects.
Definition: SQTrackVector.h:19
An SubsysReco module to create a set of SQ nodes for the simulation true info.
void set_legacy_rec_container(bool b=true)
int Init(PHCompositeNode *topNode)
An SQ interface class to hold one detector hit.
Definition: SQHit.h:20
int End(PHCompositeNode *topNode)
Called at the end of all processing.
int InitRun(PHCompositeNode *topNode)
An SQ interface class to hold one true or reconstructed track.
Definition: SQTrack.h:8
An SQ interface class to hold a list of SQHit objects.
Definition: SQHitVector.h:32
An SQ interface class to hold one event header.
Definition: SQEvent.h:17
virtual ~TruthNodeMaker()
An SQ interface class to hold a list of SQDimuon objects.
An SQ interface class to hold one simulated-event header.
Definition: SQMCEvent.h:12
void set_matching_threshold(double threshold)