Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:18

0001 #ifndef BEAMCROSSINGANALYSIS_H
0002 #define BEAMCROSSINGANALYSIS_H
0003 
0004 #include <fun4all/SubsysReco.h>
0005 
0006 #include <trackbase/TpcDefs.h>
0007 #include <trackbase/TrkrDefs.h>
0008 
0009 #include <globalvertex/SvtxVertexMap.h>
0010 #include <trackbase_historic/SvtxTrackMap.h>
0011 
0012 class TFile;
0013 class TH1D;
0014 class TNtuple;
0015 
0016 class PHCompositeNode;
0017 class SvtxTrack;
0018 class SvtxTrackMap;
0019 class SvtxVertexMap;
0020 class TrackVertexCrossingAssoc;
0021 class TNTuple;
0022 class TH1D;
0023 
0024 class BeamCrossingAnalysis : public SubsysReco
0025 {
0026  public:
0027   BeamCrossingAnalysis(const std::string& name = "BeamCrossingAnalysis");
0028   virtual ~BeamCrossingAnalysis() {}
0029 
0030   int InitRun(PHCompositeNode* topNode) override;
0031   int process_event(PHCompositeNode* topNode) override;
0032   int End(PHCompositeNode* /*topNode*/) override;
0033 
0034   void set_output_file(const std::string& outputfile) { filepath = outputfile; }
0035 
0036  private:
0037 
0038   int getNodes(PHCompositeNode* topNode);
0039 
0040   SvtxTrackMap* m_svtxTrackMap = nullptr;
0041   SvtxVertexMap* m_vertexMap = nullptr;
0042   TrackVertexCrossingAssoc* m_track_vertex_crossing_map{nullptr};
0043 
0044   TNtuple *ntp_vertex{nullptr};
0045   TNtuple *ntp_track{nullptr};
0046   TH1D* hcross{nullptr};
0047   TH1D* hvertz{nullptr};
0048   TH1D* htrackz{nullptr};
0049   TH1D* hvertcross{nullptr};
0050   TH1D* htrackcross{nullptr};
0051 
0052   std::string filepath = "";
0053   TFile* fout = nullptr;
0054 
0055   unsigned int _event = 0;
0056 
0057 };
0058 
0059 #endif  // BEAMCROSSINGANALYSIS_H