Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #ifndef TPC_LASERCLUSTERIZER_H
0002 #define TPC_LASERCLUSTERIZER_H
0003 
0004 #include <fun4all/SubsysReco.h>
0005 #include <g4detectors/PHG4TpcCylinderGeomContainer.h>
0006 #include <trackbase/ActsGeometry.h>
0007 #include <trackbase/TrkrCluster.h>
0008 #include <trackbase/TrkrDefs.h>
0009 
0010 
0011 // BOOST for combi seeding
0012 #include <boost/geometry.hpp>
0013 #include <boost/geometry/geometries/box.hpp>
0014 #include <boost/geometry/geometries/point.hpp>
0015 #include <boost/geometry/index/rtree.hpp>
0016 
0017 #include <map>
0018 #include <string>
0019 #include <vector>
0020 
0021 class EventHeader;
0022 class LaserEventInfo;
0023 class LaserClusterContainer;
0024 class LaserCluster;
0025 class PHCompositeNode;
0026 class TrkrHitSet;
0027 class TrkrHitSetContainer;
0028 class PHG4TpcCylinderGeom;
0029 class PHG4TpcCylinderGeomContainer;
0030 
0031 class LaserClusterizer : public SubsysReco
0032 {
0033  public:
0034   LaserClusterizer(const std::string &name = "LaserClusterizer");
0035   ~LaserClusterizer() override = default;
0036 
0037   int InitRun(PHCompositeNode *topNode) override;
0038   int process_event(PHCompositeNode *topNode) override;
0039 
0040   //void calc_cluster_parameter(std::vector<pointKeyLaser> &clusHits, std::multimap<unsigned int, std::pair<std::pair<TrkrDefs::hitkey, TrkrDefs::hitsetkey>, std::array<int, 3>>> &adcMap, bool isLamination);
0041   //void remove_hits(std::vector<pointKeyLaser> &clusHits, boost::geometry::index::rtree<pointKeyLaser, boost::geometry::index::quadratic<16>> &rtree, std::multimap<unsigned int, std::pair<std::pair<TrkrDefs::hitkey, TrkrDefs::hitsetkey>, std::array<int, 3>>> &adcMap);
0042 
0043   void set_adc_threshold(float val) { m_adc_threshold = val; }
0044   void set_min_clus_size(float val) { min_clus_size = val; }
0045   void set_min_adc_sum(float val) { min_adc_sum = val; }
0046   void set_max_time_samples(int val) { m_time_samples_max = val; }
0047   void set_lamination(bool val) { m_lamination = val; }
0048   void set_do_sequential(bool val) { m_do_sequential = val; }
0049   void set_do_fitting(bool val) { m_do_fitting = val; }
0050 
0051  private:
0052   int m_event {-1};
0053   int m_time_samples_max {360};
0054 
0055   EventHeader *eventHeader{nullptr};
0056 
0057   LaserEventInfo *m_laserEventInfo {nullptr};
0058 
0059   TrkrHitSetContainer *m_hits {nullptr};
0060   LaserClusterContainer *m_clusterlist {nullptr};
0061   ActsGeometry *m_tGeometry {nullptr};
0062   PHG4TpcCylinderGeomContainer *m_geom_container {nullptr};
0063   double min_clus_size {1};
0064   double min_adc_sum {10};
0065   double m_adc_threshold {74.4};
0066 
0067   bool m_lamination {false};
0068 
0069   bool m_do_sequential {false};
0070 
0071   bool m_do_fitting {true};
0072   
0073   double m_tdriftmax {0};
0074   double AdcClockPeriod {53.0};  // ns
0075   double NZBinsSide {249};
0076 
0077   // TPC shaping offset correction parameter
0078   // From Tony Frawley July 5, 2022
0079   // double m_sampa_tbias {39.6};  // ns
0080 
0081 };
0082 
0083 #endif