Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #ifndef TPC_LASEREVENTIDENTIFIER_H
0002 #define TPC_LASEREVENTIDENTIFIER_H
0003 
0004 #include <fun4all/SubsysReco.h>
0005 #include <g4detectors/PHG4TpcCylinderGeomContainer.h>
0006 #include <trackbase/ActsGeometry.h>
0007 #include <trackbase/TrkrDefs.h>
0008 
0009 
0010 #include <TFile.h>
0011 #include <TH1I.h>
0012 #include <TTree.h>
0013 
0014 class PHCompositeNode;
0015 class TrkrHitSet;
0016 class TrkrHitSetContainer;
0017 class PHG4TpcCylinderGeom;
0018 class PHG4TpcCylinderGeomContainer;
0019 class LaserEventInfo;
0020 class LaserEventIdentifier : public SubsysReco
0021 {
0022  public:
0023   LaserEventIdentifier(const std::string &name = "LaserEventIdentifier");
0024   ~LaserEventIdentifier() override = default;
0025 
0026   int InitRun(PHCompositeNode *topNode) override;
0027   int process_event(PHCompositeNode *topNode) override;
0028   int ResetEvent(PHCompositeNode *topNode) override;
0029   int End(PHCompositeNode *topNode) override;
0030 
0031   void set_max_time_samples(int val) { m_time_samples_max = val; }
0032 
0033   void set_runnumber(int runnum) { m_runnumber = runnum; }
0034 
0035   void set_debug(bool debug) { m_debug = debug; }
0036   void set_debug_name(const std::string &name) { m_debugFileName = name; }
0037  private:
0038   int m_time_samples_max=425;
0039 
0040   TrkrHitSetContainer *m_hits = nullptr;
0041   ActsGeometry *m_tGeometry = nullptr;
0042   PHG4TpcCylinderGeomContainer *m_geom_container = nullptr;
0043 
0044   LaserEventInfo *m_laserEventInfo = nullptr ;
0045   bool m_debug = false;
0046   std::string m_debugFileName = "LaserEventIdentifier_debug.root";
0047   TFile *m_debugFile = nullptr;
0048   TTree *m_hitTree = nullptr;
0049   TH1I *m_itHist_0 = nullptr;
0050   TH1I *m_itHist_1 = nullptr;
0051   bool isLaserEvent = false;
0052   bool isGl1LaserEvent = false;
0053   bool isGl1LaserPileupEvent = false;
0054   int peakSample0 = -999;
0055   int peakSample1 = -999;
0056   float peakWidth0 = -999;
0057   float peakWidth1 = -999;
0058   int m_runnumber = 0;
0059 
0060   uint64_t prev_BCO = 0;
0061 };
0062 
0063 #endif