3 #include <calobase/RawTower.h>
4 #include <calobase/RawTowerContainer.h>
5 #include <calobase/RawTowerDefs.h>
6 #include <calobase/RawTowerGeom.h>
7 #include <calobase/RawTowerGeomContainer.h>
8 #include <calobase/RawTowerv1.h>
9 #include <calobase/RawTowerv2.h>
11 #include <phparameter/PHParameters.h>
37 , _calib_algorithm(kNo_calibration)
39 _calib_towers(nullptr)
40 , _raw_towers(nullptr)
46 _calib_tower_node_prefix(
"CALIB")
47 , _raw_tower_node_prefix(
"RAW")
56 _calib_const_GeV_ADC(NAN)
61 , _tower_calib_params(name)
75 std::cout <<
Name() <<
"::" <<
detector <<
"::" << __PRETTY_FUNCTION__
76 <<
"DST Node missing, doing nothing." << std::endl;
84 catch (std::exception &
e)
86 std::cout << e.what() << std::endl;
96 std::cout <<
Name() <<
"::" <<
detector <<
"::" << __PRETTY_FUNCTION__
97 <<
"Process event entered" << std::endl;
102 for (rtiter = begin_end.first; rtiter != begin_end.second; ++rtiter)
106 const RawTower *raw_tower = rtiter->second;
111 assert(raw_tower_geom);
128 const double raw_energy = raw_tower->
get_energy();
141 double tower_by_tower_calib = 1.;
144 const int l = raw_tower->
get_binl();
165 const string calib_const_name(
"calib_const_eta" +
to_string(eta) +
"_phi" +
to_string(phi));
171 const string pedstal_name(
"PedCentral_ADC_eta" +
to_string(eta) +
"_phi" +
to_string(phi));
178 const string GeVperADCname(
"GeVperADC_eta" +
to_string(eta) +
"_phi" +
to_string(phi));
184 const double raw_energy = raw_tower->
get_energy();
194 std::cout <<
Name() <<
"::" <<
detector <<
"::" << __PRETTY_FUNCTION__
204 std::cout <<
Name() <<
"::" <<
detector <<
"::" << __PRETTY_FUNCTION__
206 <<
", output sum digitalized value = "
221 "PHCompositeNode",
"RUN"));
224 std::cerr <<
Name() <<
"::" <<
detector <<
"::" << __PRETTY_FUNCTION__
225 <<
"Run Node missing, doing nothing." << std::endl;
226 throw std::runtime_error(
227 "Failed to find Run node in RawTowerCalibration::CreateNodes");
231 rawtowergeom = findNode::getClass<RawTowerGeomContainer>(topNode,
235 std::cerr <<
Name() <<
"::" <<
detector <<
"::" << __PRETTY_FUNCTION__
238 throw std::runtime_error(
239 "Failed to find " +
TowerGeomNodeName +
" node in RawTowerCalibration::CreateNodes");
248 "PHCompositeNode",
"DST"));
251 std::cerr <<
Name() <<
"::" <<
detector <<
"::" << __PRETTY_FUNCTION__
252 <<
"DST Node missing, doing nothing." << std::endl;
253 throw std::runtime_error(
254 "Failed to find DST node in RawTowerCalibration::CreateNodes");
258 _raw_towers = findNode::getClass<RawTowerContainer>(dstNode,
262 std::cerr <<
Name() <<
"::" << detector <<
"::" << __PRETTY_FUNCTION__
265 throw std::runtime_error(
266 "Failed to find " +
RawTowerNodeName +
" node in RawTowerCalibration::CreateNodes");
272 "PHCompositeNode", detector));
276 dstNode->addNode(DetNode);
281 _calib_towers = findNode::getClass<RawTowerContainer>(DetNode,
287 DetNode->addNode(towerNode);