Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dNdEtaINTT.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file dNdEtaINTT.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef DNDETAINTT_H
4 #define DNDETAINTT_H
5 
6 #include <fun4all/SubsysReco.h>
7 
9 
10 #include <g4eval/SvtxClusterEval.h>
11 #include <g4eval/SvtxEvalStack.h>
12 #include <g4eval/SvtxHitEval.h>
13 #include <g4eval/SvtxTruthEval.h>
14 #include <g4main/PHG4Hit.h>
15 #include <g4main/PHG4Particle.h>
17 #include <g4main/PHG4VtxPoint.h>
18 #include <phool/getClass.h>
19 
21 #include <phool/getClass.h>
22 #include <trackbase/ActsGeometry.h>
23 #include <trackbase/MvtxDefs.h>
24 #include <trackbase/InttDefs.h>
25 #include <trackbase/TrkrCluster.h>
29 #include <trackbase/TrkrDefs.h>
30 #include <trackbase/TrkrHitSet.h>
35 // #include <trackbase_historic/SvtxVertex.h>
36 // #include <trackbase_historic/SvtxVertexMap.h>
37 // #include <centrality/CentralityInfov1.h>
38 
39 #include <fstream>
40 #include <iomanip>
41 #include <iostream>
42 #include <math.h>
43 #include <string>
44 
45 #include <TFile.h>
46 #include <TLorentzVector.h>
47 #include <TTree.h>
48 #include <TVector3.h>
49 
50 class PHCompositeNode;
51 class SvtxTrack;
52 class SvtxTrackMap;
55 class CentralityInfo;
56 
57 class dNdEtaINTT : public SubsysReco
58 {
59  public:
60  dNdEtaINTT(const std::string &name = "dNdEtaINTTAnalyzer", const std::string &outputfile = "INTTdNdEta.root", const bool &isData = false);
61 
62  ~dNdEtaINTT() override;
63 
69  int Init(PHCompositeNode *topNode) override;
70 
76  int InitRun(PHCompositeNode *topNode) override;
77 
81  int process_event(PHCompositeNode *topNode) override;
82 
84  int ResetEvent(PHCompositeNode *topNode) override;
85 
87  int EndRun(const int runnumber) override;
88 
90  int End(PHCompositeNode *topNode) override;
91 
93  int Reset(PHCompositeNode * /*topNode*/) override;
94 
95  void Print(const std::string &what = "ALL") const override;
96 
97  void GetTruthPV(bool b) { _get_truth_pv = b; }
98  void GetRecoCluster(bool b) { _get_reco_cluster = b; }
99  void GetCentrality(bool b) { _get_centrality = b; }
100  void GetTrkrHit(bool b) { _get_trkr_hit = b; }
101 
102  private:
103  void ResetVectors();
104  void GetTruthPVInfo(PHCompositeNode *topNode);
105  void GetRecoClusterInfo(PHCompositeNode *topNode);
106  void GetCentralityInfo(PHCompositeNode *topNode);
107  void GetTrkrHitInfo(PHCompositeNode *topNode);
109 
114 
115  unsigned int eventNum = 0;
117  bool IsData;
118  // int InputFileListIndex;
119  // int NEvtPerFile;
120 
121  TTree *outtree;
122  int event_;
124  int ncoll_, npart_; // number of collisions and participants
125  // Truth primary vertex information
128  // Reconstructed cluster information
131  std::vector<float> ClusX_, ClusY_, ClusZ_, ClusR_, ClusPhi_, ClusEta_;
132  std::vector<unsigned int> ClusAdc_;
133  std::vector<float> ClusPhiSize_, ClusZSize_;
134  std::vector<uint8_t> ClusLadderZId_, ClusLadderPhiId_;
135  std::vector<uint32_t> ClusTrkrHitSetKey_;
136  // TrkrHit information
138  std::vector<uint16_t> TrkrHitRow_, TrkrHitColumn_, TrkrHitADC_;
140  // G4 information Matching for simulation
143  std::vector<int> UniqueAncG4P_PID_;
144 
146 
150  SvtxHitEval *hiteval = nullptr;
151 
158 };
159 
160 #endif // DNDETAINTT_H