12 #include <calobase/RawTower.h>
13 #include <calobase/RawTowerContainer.h>
14 #include <calobase/RawTowerGeom.h>
15 #include <calobase/RawTowerGeomContainer.h>
18 #include <calobase/RawCluster.h>
19 #include <calobase/RawClusterContainer.h>
38 , outfilename(filename)
41 , g4hitntuple(nullptr)
42 , g4cellntuple(nullptr)
43 , towerntuple(nullptr)
44 , clusterntuple(nullptr)
64 g4hitntuple =
new TNtuple(
"hitntup",
"G4Hits",
"x0:y0:z0:x1:y1:z1:edep");
65 g4cellntuple =
new TNtuple(
"cellntup",
"G4Cells",
"phi:eta:edep");
66 towerntuple =
new TNtuple(
"towerntup",
"Towers",
"phi:eta:energy");
67 clusterntuple =
new TNtuple(
"clusterntup",
"Clusters",
"phi:z:energy:towers");
91 ostringstream nodename;
106 hit_iter->second->get_y(0),
107 hit_iter->second->get_z(0),
108 hit_iter->second->get_x(1),
109 hit_iter->second->get_y(1),
110 hit_iter->second->get_z(1),
111 hit_iter->second->get_edep());
119 ostringstream nodename;
124 PHG4CellContainer* cells = findNode::getClass<PHG4CellContainer>(topNode, nodename.str());
149 cout <<
"unknown cell binning, implement 0x" << hex <<
PHG4CellDefs::get_binning(cell_iter->second->get_cellid()) << dec << endl;
154 cell_iter->second->get_edep());
162 ostringstream nodename;
163 ostringstream geonodename;
167 nodename <<
"TOWER_CALIB_" <<
detector;
169 geonodename <<
"TOWERGEOM_" <<
detector;
170 RawTowerGeomContainer* towergeom = findNode::getClass<RawTowerGeomContainer>(topNode, geonodename.str().c_str());
175 RawTowerContainer* towers = findNode::getClass<RawTowerContainer>(topNode, nodename.str().c_str());
183 int phibin = tower_iter->second->get_binphi();
184 int etabin = tower_iter->second->get_bineta();
189 tower_iter->second->get_energy());
197 ostringstream nodename;
202 RawClusterContainer* clusters = findNode::getClass<RawClusterContainer>(topNode, nodename.str().c_str());
209 cluster_iter->second->get_z(),
210 cluster_iter->second->get_energy(),
211 cluster_iter->second->getNTowers());