Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4InttHitReco.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4InttHitReco.h
1 // Tell emacs that this is a C++ source
2 // This file is really -*- C++ -*-.
3 #ifndef G4INTT_PHG4INTTHITRECO_H
4 #define G4INTT_PHG4INTTHITRECO_H
5 
6 
7 #include <fun4all/SubsysReco.h>
8 #include <gsl/gsl_vector.h> // for gsl_vector
9 #include <phparameter/PHParameterInterface.h>
10 #include <trackbase/TrkrDefs.h>
11 
12 #include <cmath>
13 #include <map>
14 #include <string>
15 
16 class PHCompositeNode;
17 
18 class ClusHitsVerbosev1;
19 class PHG4Hit;
24 class TrkrTruthTrack;
26 
28 {
29  public:
30  PHG4InttHitReco(const std::string &name = "PHG4InttHitReco");
31 
32  ~PHG4InttHitReco() override;
34  int InitRun(PHCompositeNode *topNode) override;
35 
37  int process_event(PHCompositeNode *topNode) override;
38 
40  void SetDefaultParameters() override;
41 
42  void Detector(const std::string &d) { m_Detector = d; }
43 
44  protected:
49 
50  double m_Tmin;
51  double m_Tmax;
53 
54  gsl_vector *m_LocalOutVec = nullptr;
55  gsl_vector *m_PathVec = nullptr;
56  gsl_vector *m_SegmentVec = nullptr;
57 
58  // needed for clustering truth tracks
59  private:
60  TrkrTruthTrackContainer* m_truthtracks { nullptr }; // output truth tracks
61  TrkrClusterContainer* m_truthclusters { nullptr }; // output clusters indexed to TrkrDefs::cluskeys in m_truthtracks
63  int m_trkid { -1 };
64  bool m_is_emb { false };
66  const int m_cluster_version { 4 };
67  TrkrHitSetContainer* m_truth_hits; // generate and delete a container for each truth track
68  std::map<TrkrDefs::hitsetkey,unsigned int> m_hitsetkey_cnt {}; // counter for making ckeys form hitsetkeys
69 
70  PHG4Hit* prior_g4hit { nullptr }; // used to check for jumps in g4hits for loopers;
71  void truthcheck_g4hit ( PHG4Hit*, PHCompositeNode* topNode );
72  void addtruthhitset ( TrkrDefs::hitsetkey, TrkrDefs::hitkey, float neffelectrons );
73  void cluster_truthhits ( PHCompositeNode* topNode );
74  void end_event_truthcluster ( PHCompositeNode* topNode );
75 
76  double m_pixel_thresholdrat { 0.01 };
77  float max_g4hitstep { 2.0 };
78  bool record_ClusHitsVerbose { false };
79 
80  public:
81  void set_pixel_thresholdrat (double val) { m_pixel_thresholdrat = val; };
82  void set_max_g4hitstep (float _) { max_g4hitstep =_; };
83 
84  void set_ClusHitsVerbose(bool set=true) { record_ClusHitsVerbose = set; };
86 
87 };
88 
89 #endif