Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:59

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef TPC_HITS_H
0004 #define TPC_HITS_H
0005 
0006 #include "TPCMap.h"
0007 #include "TPC_RawHit.h"
0008 
0009 #include <trackbase/TrkrDefs.h>
0010 #include <trackbase/TrkrHitSet.h>
0011 
0012 #include <fun4all/SubsysReco.h>
0013 
0014 #include <memory>
0015 #include <string>
0016 
0017 class PHCompositeNode;
0018 class Fun4AllHistoManager;
0019 class TH2;
0020 
0021 class tpc_hits : public SubsysReco
0022 {
0023  public:
0024   tpc_hits(const std::string &name = "tpc_hits");
0025 
0026   ~tpc_hits() override;
0027 
0028   int Init(PHCompositeNode *topNode) override;
0029 
0030   /** Called for first event when run number is known.
0031       Typically this is where you may want to fetch data from
0032       database, because you know the run number. A place
0033       to book histograms which have to know the run number.
0034   */
0035   int InitRun(PHCompositeNode *topNode) override;
0036 
0037   /** Called for each event.
0038       This is where you do the real work.
0039   */
0040   int process_event(PHCompositeNode *topNode) override;
0041 
0042   /// Clean up internals after each event.
0043   // int ResetEvent(PHCompositeNode *topNode) override;
0044 
0045   /// Called at the end of each run.
0046   // int EndRun(const int runnumber) override;
0047 
0048   /// Called at the end of all processing.
0049   int End(PHCompositeNode *topNode) override;
0050 
0051   /// Reset
0052   // int Reset(PHCompositeNode * /*topNode*/) override;
0053 
0054   // void Print(const std::string &what = "ALL") const override;
0055 
0056  protected:
0057   Fun4AllHistoManager *hm = nullptr;
0058   std::string _filename;
0059 
0060   static const int layercount = 16;
0061   static const int layeroffset = 7 + 16;
0062 
0063   // TrkrHitSetContainer *m_hits = nullptr;
0064   TrkrHitSet *m_hitset[layercount] = {};
0065   // TrkrHit *m_hit = nullptr;
0066 
0067   // RawHitSetContainer *m_rawhits __attribute__ ((unused)) = nullptr;
0068 
0069   TPCMap M;
0070 
0071   int starting_BCO;
0072   int rollover_value;
0073   int current_BCOBIN;
0074 
0075  private:
0076   TH2 *_h_hit_XY = nullptr;
0077 };
0078 
0079 #endif  // TPC_HITS_H