ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HcalRawTowerBuilder.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file HcalRawTowerBuilder.h
1 #ifndef G4CALO_HCALRAWTOWERBUILDER_H
2 #define G4CALO_HCALRAWTOWERBUILDER_H
3 
4 #include <fun4all/SubsysReco.h>
5 
6 #include <phparameter/PHParameterInterface.h>
7 
8 #include <cmath>
9 #include <string>
10 #include <vector>
11 
12 class PHCompositeNode;
13 class RawTowerContainer;
15 
17 {
18  public:
19  HcalRawTowerBuilder(const std::string &name = "HcalRawTowerBuilder");
20  ~HcalRawTowerBuilder() override {}
21 
22  int InitRun(PHCompositeNode *topNode) override;
23  int process_event(PHCompositeNode *topNode) override;
24  void Detector(const std::string &d) { m_Detector = d; }
25  void EminCut(const double e) { m_Emin = e; }
26  void checkenergy(const int i = 1) { m_ChkEnergyConservationFlag = i; }
27 
29  {
32 
35 
39  unknown = -1
40  };
41 
43  {
44  return m_TowerEnergySrc;
45  }
46 
47  std::string
49  {
50  return m_SimTowerNodePrefix;
51  }
52 
53  void
54  set_sim_tower_node_prefix(const std::string &simTowerNodePrefix)
55  {
56  m_SimTowerNodePrefix = simTowerNodePrefix;
57  }
58 
59  short get_tower_row(const short cellrow) const;
60 
61  void set_decal_filename(const std::string &fname) {m_DeCalibrationFileName = fname;}
62 
63  void SetDefaultParameters() override;
64 
65  void set_cell_decal_factor(const int etabin, const int phibin, const double d);
66  void set_tower_decal_factor(const int etabin, const int phibin, const double d);
67 
68  private:
69  void CreateNodes(PHCompositeNode *topNode);
71  void SetTowerDecalFactors();
72  void set_tower_decal_factor_real(const int etabin, const int phibin, const double d);
73 
76 
77  double m_Emin = NAN;
79  int m_TowerEnergySrc = enu_tower_energy_src::unknown;
80  int m_NcellToTower = -1;
81 
82  std::string m_Detector = "NONE";
83  std::string m_TowerNodeName;
84  std::string m_TowerGeomNodeName;
85  std::string m_SimTowerNodePrefix;
87  std::vector<std::vector <double> > m_DecalArray;
88  std::map<std::pair<int,int>,double> m_TowerDecalFactors;
89 };
90 
91 #endif /* G4CALO_HCALRAWTOWERBUILDER_H */