Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:21:44

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4EPD_PHG4EPDMODULERECO_H
0004 #define G4EPD_PHG4EPDMODULERECO_H
0005 
0006 #include <phparameter/PHParameterInterface.h>
0007 
0008 #include <fun4all/SubsysReco.h>
0009 
0010 #include <array>
0011 #include <limits>
0012 #include <string>
0013 
0014 class PHCompositeNode;
0015 
0016 class PHG4EPDModuleReco : public SubsysReco, public PHParameterInterface
0017 {
0018  public:
0019   PHG4EPDModuleReco(const std::string &name = "EpdModuleReco");
0020 
0021   ~PHG4EPDModuleReco() override = default;
0022 
0023   //! module initialization
0024   int InitRun(PHCompositeNode *topNode) override;
0025 
0026   //! event processing
0027   int process_event(PHCompositeNode *topNode) override;
0028 
0029   //! Reset after every event
0030   int ResetEvent(PHCompositeNode * /*topNode*/) override;
0031 
0032   void SetDefaultParameters() override;
0033 
0034   void Detector(const std::string &detector);
0035 
0036   const std::string &get_epd_sim_tower_node_prefix() const
0037   {
0038     return m_EPDSimTowerNodePrefix;
0039   }
0040 
0041   void
0042   set_epd_sim_tower_node_prefix(const std::string &epdsimTowerNodePrefix)
0043   {
0044     m_EPDSimTowerNodePrefix = epdsimTowerNodePrefix;
0045   }
0046 
0047   const std::string &get_epd_calib_tower_node_prefix() const
0048   {
0049     return m_EPDCalibTowerNodePrefix;
0050   }
0051 
0052   void
0053   set_epd_calib_tower_node_prefix(const std::string &epdcalibTowerNodePrefix)
0054   {
0055     m_EPDCalibTowerNodePrefix = epdcalibTowerNodePrefix;
0056   }
0057 
0058   void set_timing_window(const double tmi, const double tma);
0059 
0060  private:
0061   void FillTilePhiArray();
0062   void FillTilePhi0Array();
0063   static int Getrmap(int rindex);
0064   static int Getphimap(int phiindex);
0065   float GetTilePhi(int thisphi);
0066   float GetTilePhi0(int thisphi0);
0067   static float GetTileR(int thisr);
0068   static float GetTileZ(int thisz);
0069   void CreateNodes(PHCompositeNode *topNode);
0070 
0071   double m_EpdMpv{std::numeric_limits<double>::quiet_NaN()};
0072   double tmin{std::numeric_limits<double>::quiet_NaN()};
0073   double tmax{std::numeric_limits<double>::quiet_NaN()};
0074   double m_DeltaT{std::numeric_limits<double>::quiet_NaN()};
0075 
0076   std::array<float, 24> m_tilephi{};
0077   std::array<float, 12> m_tilephi0{};
0078   std::array<std::array<std::array<double, 31>, 12>, 2> m_EpdTile_e = {};
0079   std::array<std::array<std::array<double, 31>, 12>, 2> m_EpdTile_Calib_e = {};
0080 
0081   std::string m_Detector;
0082   std::string m_Hitnodename;
0083   std::string m_EPDSimTowerNodePrefix{"SIM"};
0084   std::string m_EPDCalibTowerNodePrefix{"CALIB"};
0085 
0086   std::string m_TowerInfoNodeName;
0087   std::string m_TowerInfoNodeName_calib;
0088 };
0089 
0090 #endif