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/RawTowerGeomContainer_Cylinderv1.h>
9 #include <calobase/RawTowerGeomv1.h>
10 #include <calobase/RawTowerv1.h>
17 #include <phparameter/PHParameterInterface.h>
18 #include <phparameter/PHParameters.h>
26 #include <pdbcalbase/PdbParameterMapContainer.h>
60 <<
" Detector name not set, use HcalRawTowerBuilder::Detector(string) to set, exiting"
71 std::cout <<
PHWHERE <<
"DST Node missing, exiting" << std::endl;
76 std::string paramnodename =
"TOWERPARAM_" +
m_Detector;
82 catch (std::exception &
e)
84 std::cout << e.what() << std::endl;
103 std::string geonodename =
"TOWERGEO_" +
m_Detector;
122 std::cout <<
"HcalRawTowerBuilder::InitRun :";
125 std::cout <<
"save Geant4 energy deposition in towers" << std::endl;
129 std::cout <<
"save light yield in towers" << std::endl;
133 std::cout <<
"save ionization energy in towers" << std::endl;
137 std::cout <<
"unknown energy source" << std::endl;
154 double geom_ref_radius = innerrad + thickness / 2.;
159 std::pair<double, double> range = std::make_pair(phistart, phiend);
168 double etahibound = etalowbound +
170 std::pair<double, double> range = std::make_pair(etalowbound, etahibound);
172 etalowbound = etahibound;
189 std::cout <<
"HcalRawTowerBuilder::InitRun - Tower geometry " << key <<
" already exists" << std::endl;
192 if (fabs(tg->get_center_x() -
x) > 1e-4)
194 std::cout <<
"HcalRawTowerBuilder::InitRun - Fatal Error - duplicated Tower geometry " << key <<
" with existing x = " << tg->
get_center_x() <<
" and expected x = " << x
199 if (fabs(tg->get_center_y() -
y) > 1e-4)
201 std::cout <<
"HcalRawTowerBuilder::InitRun - Fatal Error - duplicated Tower geometry " << key <<
" with existing y = " << tg->get_center_y() <<
" and expected y = " << y
205 if (fabs(tg->get_center_z() -
z) > 1e-4)
207 std::cout <<
"HcalRawTowerBuilder::InitRun - Fatal Error - duplicated Tower geometry " << key <<
" with existing z= " << tg->get_center_z() <<
" and expected z = " <<
z
216 std::cout <<
"HcalRawTowerBuilder::InitRun - building tower geometry " << key <<
"" << std::endl;
236 for(
int i = 0; i <
n; i++){
237 for(
int j= 0; j <
m; j++){
245 std::ifstream decalibrate_tower;
247 if (decalibrate_tower.is_open())
249 while (!decalibrate_tower.eof())
253 for(
int i = 0; i <
n ; i++)
255 for(
int j = 0; j <
m; j++)
257 decalibrate_tower >> etabin >> phibin >>
m_DecalArray[i][j];
260 std::cout <<
"Calibration constant at etabin " << etabin
262 <<
" is not finite: " << m_DecalArray[i][j] << std::endl;
270 decalibrate_tower.close();
284 double cell_weight = 0.0;
287 std::cout <<
PHWHERE <<
"Process event entered" << std::endl;
291 std::string cellnodename =
"G4CELL_" +
m_Detector;
292 PHG4CellContainer *slats = findNode::getClass<PHG4CellContainer>(topNode, cellnodename);
295 std::cout <<
PHWHERE <<
" Node " << cellnodename
296 <<
" missing, quitting" << std::endl;
304 for (cell_iter = cell_range.first; cell_iter != cell_range.second;
333 std::cout <<
Name() <<
": unknown tower energy source "
345 shower_iter != range.second;
348 tower->
add_eshower(shower_iter->first, shower_iter->second);
359 if (fabs(cellE - towerE) / cellE > 1
e-5)
361 std::cout <<
"towerE: " << towerE <<
", cellE: " << cellE <<
", delta: "
362 << cellE - towerE << std::endl;
374 std::cout <<
"Energy lost by dropping towers with less than " <<
m_Emin
380 for (iter = begin_end.first; iter != begin_end.second; ++iter)
382 iter->second->identify();
395 std::cout <<
PHWHERE <<
"Run Node missing, exiting." << std::endl;
402 std::cout <<
PHWHERE <<
"DST Node missing, exiting." << std::endl;
431 DetNode->addNode(towerNode);
462 std::string geonodename =
"G4GEOPARAM_" +
m_Detector;
466 std::cout <<
"could not find " << geonodename << std::endl;
468 se->
Print(
"NODETREE");
486 m_DecalArray.resize(nTiles, std::vector<double> (nPhislices));
509 std::pair<int, int> etaphi = std::make_pair(etabin,phibin);
517 int istart = phibin*m_NcellToTower + i;