4 #include <calobase/RawTowerContainer.h>
5 #include <calobase/RawTowerDefs.h>
6 #include <calobase/RawTowerGeomContainer.h>
7 #include <calobase/RawTowerGeomContainer_Cylinderv1.h>
8 #include <calobase/RawTowerGeomv1.h>
9 #include <calobase/RawTower.h>
10 #include <calobase/RawTowerv1.h>
15 #include <phparameter/PHParameters.h>
16 #include <phparameter/PHParameterInterface.h>
22 #include <pdbcalbase/PdbParameterMapContainer.h>
46 , m_CheckEnergyConservationFlag(0)
47 , m_TowerEnergySrc(kLightYield)
60 if (!runNode || !dstNode || !parNode)
62 cout <<
PHWHERE <<
"Top Nodes missing, quitting after printing node tree" << endl;
64 se->
Print(
"NODETREE");
67 string paramnodename =
"G4TOWERPARAM_" +
m_Detector;
68 string geonodename =
"G4TOWERGEO_" +
m_Detector;
126 for (
int irow = 0; irow < rawtowergeom->
get_phibins(); irow++)
128 for (
int icolumn = 0; icolumn < rawtowergeom->
get_etabins(); icolumn++)
141 cout <<
"Prototype2RawTowerBuilder::InitRun :";
144 cout <<
"save Geant4 energy deposition as the weight of the cells"
149 cout <<
"save light yield as the weight of the cells" << endl;
161 std::cout <<
PHWHERE <<
"Process event entered" << std::endl;
169 cout <<
PHWHERE <<
" " << cellnodename <<
" Node missing, doing nothing." << endl;
182 for (cell_iter = cell_range.first; cell_iter != cell_range.second;
189 std::cout <<
PHWHERE <<
" print out the cell:" << std::endl;
199 tower->set_energy(0);
202 double cell_weight = 0;
216 tower->add_ecell(cell->
get_key(), cell_weight);
218 tower->set_energy(tower->get_energy() + cell_weight);
225 if (fabs(cellE - towerE) / cellE > 1
e-5)
227 cout <<
"towerE: " << towerE <<
", cellE: " << cellE <<
", delta: "
228 << cellE - towerE << endl;
239 cout <<
"Energy lost by dropping towers with less than " <<
m_Emin
240 <<
" energy, lost energy: " << towerE - towers->
getTotalEdep()
245 for (iter = begin_end.first; iter != begin_end.second; ++iter)
247 iter->second->identify();
271 string geonodename =
"G4GEOPARAM_" +
m_Detector;
275 cout <<
"could not find " << geonodename << endl;
277 se->
Print(
"NODETREE");