File indexing completed on 2025-08-03 08:17:10
0001 #ifndef JETBACKGROUND_RETOWERCEMC_H
0002 #define JETBACKGROUND_RETOWERCEMC_H
0003
0004 #include <fun4all/SubsysReco.h>
0005
0006 #include <string>
0007
0008 class PHCompositeNode;
0009
0010 class RetowerCEMC : public SubsysReco
0011 {
0012 public:
0013 RetowerCEMC(const std::string &name = "RetowerCEMC");
0014 ~RetowerCEMC() override = default;
0015
0016 int InitRun(PHCompositeNode *topNode) override;
0017 int process_event(PHCompositeNode *topNode) override;
0018
0019 void SetEnergyDistribution(int val) { _weighted_energy_distribution = val; }
0020 void set_frac_cut(double frac_cut) { _frac_cut = frac_cut; }
0021 void set_towerinfo(bool use_towerinfo) { m_use_towerinfo = use_towerinfo; }
0022 void set_towerNodePrefix(const std::string &prefix)
0023 {
0024 m_towerNodePrefix = prefix;
0025 return;
0026 }
0027
0028 private:
0029 int CreateNode(PHCompositeNode *topNode);
0030 void get_first_phi_index(PHCompositeNode *topNode);
0031 void get_fraction(PHCompositeNode *topNode);
0032 void get_weighted_fraction(PHCompositeNode *topNode);
0033
0034 int _weighted_energy_distribution{1};
0035 double _frac_cut{0.5};
0036 bool m_use_towerinfo{false};
0037 std::string m_towerNodePrefix{"TOWERINFO_CALIB"};
0038
0039 static const int neta_ihcal = 24;
0040 static const int neta_emcal = 96;
0041 static const int nphi_ihcal = 64;
0042 static const int nphi_emcal = 256;
0043
0044 int retower_lowerbound_originaltower_ieta[neta_ihcal] = {0};
0045 int retower_upperbound_originaltower_ieta[neta_ihcal] = {0};
0046 double retower_lowerbound_originaltower_fraction[neta_ihcal] = {0.0};
0047 double retower_upperbound_originaltower_fraction[neta_ihcal] = {0.0};
0048 double retower_totalarea[neta_ihcal] = {0.0};
0049 int retower_first_lowerbound_originaltower_iphi{-1};
0050
0051 double rawtower_e[neta_emcal][nphi_emcal] = {{0.0}};
0052 double rawtower_time[neta_emcal][nphi_emcal] = {{0.0}};
0053 int rawtower_status[neta_emcal][nphi_emcal] = {{0}};
0054
0055 std::string EMTowerName;
0056 std::string IHTowerName;
0057 std::string EMRetowerName;
0058 };
0059
0060 #endif