Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RawTowerCalibration.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RawTowerCalibration.h
1 #ifndef CALORECO_RAWTOWERCALIBRATION_H
2 #define CALORECO_RAWTOWERCALIBRATION_H
3 
4 #include <fun4all/SubsysReco.h>
5 
6 #include <phparameter/PHParameters.h>
7 
8 #include <cmath>
9 #include <iostream>
10 #include <string>
11 
12 class CDBTTree;
13 class PHCompositeNode;
14 class RawTowerContainer;
17 
22 {
23  public:
24  RawTowerCalibration(const std::string &name = "RawTowerCalibration");
25  ~RawTowerCalibration() override;
26 
27  int InitRun(PHCompositeNode *topNode) override;
28  int process_event(PHCompositeNode *topNode) override;
29  int End(PHCompositeNode *topNode) override;
30  void Detector(const std::string &d)
31  {
32  m_Detector = d;
34  }
35  void TowerType(const int type)
36  {
37  _tower_type = type;
38  }
39 
41  {
44 
47 
50 
51  // use conditions DB file/wrapper (non-xml) file for most gain tracing correction factors
53  };
55  {
59  };
60 
62  {
63  return _calib_algorithm;
64  }
65 
67  {
68  _calib_algorithm = calibAlgorithm;
69  }
70 
71  double get_calib_const_GeV_ADC() const
72  {
73  return _calib_const_GeV_ADC;
74  }
75 
76  void set_calib_const_GeV_ADC(double calibConstGeVAdc)
77  {
78  _calib_const_GeV_ADC = calibConstGeVAdc;
79  }
80 
81  void set_variable_GeV_ADC(const bool value)
82  {
84  }
85 
87  {
89  }
90 
91  void set_calib_tower_node_prefix(const std::string &calibTowerNodePrefix)
92  {
93  _calib_tower_node_prefix = calibTowerNodePrefix;
94  }
95 
96  double get_pedstal_ADC() const
97  {
98  return _pedstal_ADC;
99  }
100 
101  void set_pedstal_ADC(double pedstalAdc)
102  {
103  _pedstal_ADC = pedstalAdc;
104  }
105 
106  void set_variable_pedestal(const bool value)
107  {
109  }
110 
112  {
113  return _raw_tower_node_prefix;
114  }
115 
116  void set_raw_tower_node_prefix(const std::string &rawTowerNodePrefix)
117  {
118  _raw_tower_node_prefix = rawTowerNodePrefix;
119  }
120 
122  {
123  std::cout << "RawTowerCalibration::set_zero_suppression_GeV is deprecated!" << std::endl
124  << " See discussion at https://github.com/sPHENIX-Collaboration/coresoftware/pull/867" << std::endl
125  << std::endl;
126  }
127 
130  {
131  return _tower_calib_params;
132  }
133 
134  void set_CalibrationFileName(const char *inCalFname)
135  {
136  m_CalibrationFileName = inCalFname;
137  }
138  void set_UseConditionsDB(const bool setUseCondDB)
139  {
140  m_UseConditionsDB = setUseCondDB;
141  }
142 
144  {
145  m_UseTowerInfo = UseTowerInfo;
146  }
147 
148  protected:
149  void CreateNodes(PHCompositeNode *topNode);
150 
151 
154 
157 
159 
161 
168 
171 
173  double _pedstal_ADC = NAN;
174 
176  bool _pedestal_file = false;
177 
179  double _calib_const_GeV_ADC = NAN;
180 
182  bool _GeV_ADC_file = false;
183 
185  int _tower_type = -1;
186 
189 
191  bool m_UseConditionsDB = false;
192 
193  CDBTTree *m_CDBTTree = nullptr;
194  RawTowerCalibration::ProcessTowerType m_UseTowerInfo = RawTowerCalibration::ProcessTowerType::kBothTowers; // 0 just produce RawTowers, 1 just produce TowerInfo objects, and 2 produce both
195 };
196 
197 #endif