File indexing completed on 2025-08-05 08:17:53
0001
0002
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 <cmath>
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
0024 int InitRun(PHCompositeNode *topNode) override;
0025
0026
0027 int process_event(PHCompositeNode *topNode) override;
0028
0029
0030 int ResetEvent(PHCompositeNode * ) 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 int Getrmap(int rindex);
0062 int Getphimap(int phiindex);
0063 float GetTilePhi(int thisphi);
0064 float GetTilePhi0(int thisphi0);
0065 float GetTileR(int thisr);
0066 float GetTileZ(int thisz);
0067 void CreateNodes(PHCompositeNode *topNode);
0068
0069 std::string m_Detector;
0070 std::string m_Hitnodename;
0071 std::string m_EPDSimTowerNodePrefix = "SIM";
0072 std::string m_EPDCalibTowerNodePrefix = "CALIB";
0073
0074 std::string m_TowerInfoNodeName;
0075 std::string m_TowerInfoNodeName_calib;
0076 std::array<std::array<std::array<double, 31>, 12>, 2> m_EpdTile_e = {};
0077 std::array<std::array<std::array<double, 31>, 12>, 2> m_EpdTile_Calib_e = {};
0078
0079 double m_EpdMpv = NAN;
0080
0081 double tmin = NAN;
0082 double tmax = NAN;
0083 double m_DeltaT = NAN;
0084 };
0085
0086 #endif