Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:22:13

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4TPC_PHG4TpcPadBaselineShift_H
0004 #define G4TPC_PHG4TpcPadBaselineShift_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <climits>
0009 #include <cmath>
0010 #include <limits>
0011 #include <string>
0012 
0013 class PHCompositeNode;
0014 
0015 class TTree;
0016 class TFile;
0017 
0018 class TrkrHitSetContainer;
0019 class TrkrClusterContainer;
0020 class TrkrClusterHitAssoc;
0021 class PHG4TpcGeom;
0022 
0023 struct ActsSurfaceMaps;
0024 struct ActsTrackingGeometry;
0025 
0026 class PHG4TpcPadBaselineShift : public SubsysReco
0027 {
0028  public:
0029   PHG4TpcPadBaselineShift(const std::string &name = "PHG4TpcPadBaselineShift");
0030 
0031   virtual ~PHG4TpcPadBaselineShift();
0032   int Init(PHCompositeNode *topNode) override;
0033   int InitRun(PHCompositeNode *topNode) override;
0034   int process_event(PHCompositeNode *topNode) override;
0035   int End(PHCompositeNode *topNode) override;
0036 
0037   void setScale(float CScale);
0038   void setFileName(const std::string &filename);
0039   void writeTree(int f_writeTree);
0040 
0041  private:
0042   bool is_in_sector_boundary(int phibin, int sector, PHG4TpcGeom *layergeom) const;
0043 
0044   TrkrHitSetContainer *m_hits{nullptr};
0045   TrkrClusterContainer *m_clusterlist{nullptr};
0046   TrkrClusterHitAssoc *m_clusterhitassoc{nullptr};
0047   ActsSurfaceMaps *m_surfMaps{nullptr};
0048   ActsTrackingGeometry *m_tGeometry{nullptr};
0049   TFile *outfile{nullptr};
0050   TTree *_rawHits{nullptr};
0051 
0052   //   double pedestal {74.4};
0053   double SectorFiducialCut{0.5};
0054   double AdcClockPeriod{53.0};  // ns
0055 
0056   unsigned int MaxTBins{498};
0057 
0058   int _hit_adc{std::numeric_limits<int>::min()};
0059   int _hit_adc_bls{std::numeric_limits<int>::min()};
0060   int _hit_layer{std::numeric_limits<int>::min()};
0061   int _hit_sector{std::numeric_limits<int>::min()};
0062   int _writeTree{0};
0063   int NZBinsMax{0};
0064   //   int NSearch {2};
0065 
0066   float _hit_z{std::numeric_limits<float>::quiet_NaN()};
0067   float _hit_r{std::numeric_limits<float>::quiet_NaN()};
0068   float _hit_phi{std::numeric_limits<float>::quiet_NaN()};
0069   float _hit_e{std::numeric_limits<float>::quiet_NaN()};
0070   float _CScale{1.};
0071 
0072   //   bool do_hit_assoc {true};
0073 
0074   std::string _filename{"./hitsBLS.root"};
0075 };
0076 
0077 #endif  // PHG4TpcPadBaselineShift_H