4 #include <calobase/TowerInfo.h>
5 #include <calobase/TowerInfo.h>
6 #include <calobase/TowerInfoContainer.h>
7 #include <calobase/TowerInfoContainerv1.h>
8 #include <calobase/TowerInfoContainerv2.h>
9 #include <calobase/TowerInfov1.h>
10 #include <calobase/TowerInfov2.h>
40 , m_dettype(CaloTowerDefs::
HCALOUT)
41 , m_detector(
"HCALOUT")
46 if (
Verbosity() > 0) std::cout <<
"CaloTowerCalib::CaloTowerCalib(const std::string &name) Calling ctor" << std::endl;
53 if (
Verbosity() > 0) std::cout <<
"CaloTowerCalib::~CaloTowerCalib() Calling dtor" << std::endl;
61 EventHeader *evtHeader = findNode::getClass<EventHeader>(topNode,
"EventHeader");
76 std::string default_time_independent_calib =
"cemc_pi0_twrSlope_v1_default";
87 if (!calibdir.empty())
97 std::cout <<
"CaloTowerCalib::::InitRun No EMCal Calibration NOT even a default" << std::endl;
101 std::cout <<
"CaloTowerCalib::::InitRun No specific file for " <<
m_calibName <<
" found, using default calib " << default_time_independent_calib << std::endl;
118 if (!calibdir.empty())
124 std::cout <<
"CaloTowerCalib::::InitRun No calibration file for domain " <<
m_calibName <<
" found" << std::endl;
142 if (!calibdir.empty())
148 std::cout <<
"CaloTowerCalib::::InitRun No calibration file for domain " <<
m_calibName <<
" found" << std::endl;
166 if (!calibdir.empty())
172 std::cout <<
"CaloTowerCalib::::InitRun No calibration file for domain " <<
m_calibName <<
" found" << std::endl;
190 if (!calibdir.empty())
196 std::cout <<
"CaloTowerCalib::::InitRun No calibration file for domain " <<
m_calibName <<
" found" << std::endl;
213 std::cout <<
Name() <<
"::" <<
m_detector <<
"::" << __PRETTY_FUNCTION__
214 <<
"DST Node missing, doing nothing." << std::endl;
221 catch (std::exception &
e)
223 std::cout << e.what() << std::endl;
235 unsigned int ntowers = _raw_towers->
size();
242 float raw_amplitude = caloinfo_raw->
get_energy();
244 _calib_towers->get_tower_at_channel(
channel)->set_energy(raw_amplitude * calibconst);
247 _calib_towers->get_tower_at_channel(
channel)->set_isNoCalib(
true);
259 std::cerr <<
Name() <<
"::" <<
m_detector <<
"::" << __PRETTY_FUNCTION__
260 <<
"DST Node missing, doing nothing." << std::endl;
261 throw std::runtime_error(
"Failed to find DST node in RawTowerCalibration::CreateNodes");
278 std::cout <<
Name() <<
"::" << m_detector <<
"::" << __PRETTY_FUNCTION__
281 throw std::runtime_error(
282 "Failed to find " +
RawTowerNodeName +
" node in RawTowerCalibration::CreateNodes");
292 DetNode->
addNode(calibtowerNode);