Analysis Software
Documentation for sPHENIX simulation 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 <map> // for map
10 #include <string>
11 #include <utility> // for pair
12 #include <vector>
13 
14 class PHCompositeNode;
15 class RawTowerContainer;
17 
19 {
20  public:
21  HcalRawTowerBuilder(const std::string &name = "HcalRawTowerBuilder");
22  ~HcalRawTowerBuilder() override {}
23 
24  int InitRun(PHCompositeNode *topNode) override;
25  int process_event(PHCompositeNode *topNode) override;
26  void Detector(const std::string &d)
27  {
28  m_InputDetector = d;
29  m_OutputDetector = d;
30  }
31  void InDetector(const std::string &d) { m_InputDetector = d; }
32  void OutDetector(const std::string &d) { m_OutputDetector = d; }
33  void EminCut(const double e) { m_Emin = e; }
34  void checkenergy(const int i = 1) { m_ChkEnergyConservationFlag = i; }
35 
37  {
40 
43 
46 
49 
51  unknown = -1
52  };
54  {
58  };
59 
60 
62  {
63  return m_TowerEnergySrc;
64  }
65 
68  {
69  return m_SimTowerNodePrefix;
70  }
71 
72  void
73  set_sim_tower_node_prefix(const std::string &simTowerNodePrefix)
74  {
75  m_SimTowerNodePrefix = simTowerNodePrefix;
76  }
77 
78  short get_tower_row(const short cellrow) const;
79 
81 
82  void SetDefaultParameters() override;
83 
84  void set_cell_decal_factor(const int etabin, const int phibin, const double d);
85  void set_tower_decal_factor(const int etabin, const int phibin, const double d);
86  void Print(const std::string &what = "ALL") const override;
87 
89  {
90  m_UseTowerInfo = UseTowerInfo;
91  }
92 
93  private:
94  void CreateNodes(PHCompositeNode *topNode);
96  void SetTowerDecalFactors();
97  void set_tower_decal_factor_real(const int etabin, const int phibin, const double d);
98 
101 
102  double m_Emin = NAN;
104  int m_TowerEnergySrc = enu_tower_energy_src::unknown;
105  int m_NcellToTower = -1;
106  HcalRawTowerBuilder::ProcessTowerType m_UseTowerInfo = HcalRawTowerBuilder::ProcessTowerType::kBothTowers; // 0 just produce RawTowers, 1 just produce TowerInfo objects, and 2 produce both
107 
108 
109 
117  std::vector<std::vector<double> > m_DecalArray;
118  std::map<std::pair<int, int>, double> m_TowerDecalFactors;
119 };
120 
121 #endif /* G4CALO_HCALRAWTOWERBUILDER_H */