Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef COSMICTRACKQA_H
0004 #define COSMICTRACKQA_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 #include <trackbase/ActsGeometry.h>
0008 #include <trackbase/TrkrDefs.h>
0009 
0010 #include <string>
0011 #include <vector>
0012 
0013 class SvtxTrack;
0014 class PHCompositeNode;
0015 
0016 class CosmicTrackQA : public SubsysReco
0017 {
0018  public:
0019   CosmicTrackQA(const std::string &name = "CosmicTrackQA");
0020 
0021   ~CosmicTrackQA() override = default;
0022 
0023   int InitRun(PHCompositeNode *topNode) override;
0024   int process_event(PHCompositeNode *topNode) override;
0025   int EndRun(const int runnumber) override;
0026   int End(PHCompositeNode *topNode) override;
0027 
0028   void beginRun(const int run) { m_beginRun = run; }
0029   void endRun(const int run) { m_endRun = run; }
0030 
0031  private:
0032   static std::vector<TrkrDefs::cluskey> get_cluster_keys(SvtxTrack *track);
0033   void createHistos();
0034   // xy slope, xy int, zr slope, zr int
0035   static std::tuple<float, float, float, float> lineFitClusters(std::vector<Acts::Vector3> &positions);
0036   std::string getHistoPrefix() const;
0037 
0038   int m_event = 0;
0039   int m_tracks = 0;
0040   std::string m_trackMapName = "SvtxTrackMap";
0041   int m_beginRun = 25900;
0042   int m_endRun = 26200;
0043   int m_runbins = m_endRun - m_beginRun;
0044 };
0045 
0046 #endif  // COSMICTRACKQA_H