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)
58 g4hitntuple =
new TNtuple(
"hitntup",
"G4Hits",
"x0:y0:z0:x1:y1:z1:edep");
59 g4cellntuple =
new TNtuple(
"cellntup",
"G4Cells",
"phi:eta:edep");
60 towerntuple =
new TNtuple(
"towerntup",
"Towers",
"phi:eta:energy");
61 clusterntuple =
new TNtuple(
"clusterntup",
"Clusters",
"phi:z:energy:towers");
85 ostringstream nodename;
90 PHG4HitContainer* hits = findNode::getClass<PHG4HitContainer>(topNode, nodename.str().c_str());
100 hit_iter->second->get_y(0),
101 hit_iter->second->get_z(0),
102 hit_iter->second->get_x(1),
103 hit_iter->second->get_y(1),
104 hit_iter->second->get_z(1),
105 hit_iter->second->get_edep());
113 ostringstream nodename;
118 PHG4CellContainer* cells = findNode::getClass<PHG4CellContainer>(topNode, nodename.str());
143 cout <<
"unknown cell binning, implement 0x" << hex <<
PHG4CellDefs::get_binning(cell_iter->second->get_cellid()) << dec << endl;
148 cell_iter->second->get_edep());
156 ostringstream nodename;
157 ostringstream geonodename;
161 nodename <<
"TOWER_CALIB_" <<
detector;
163 geonodename <<
"TOWERGEOM_" <<
detector;
164 RawTowerGeomContainer* towergeom = findNode::getClass<RawTowerGeomContainer>(topNode, geonodename.str().c_str());
169 RawTowerContainer* towers = findNode::getClass<RawTowerContainer>(topNode, nodename.str().c_str());
177 int phibin = tower_iter->second->get_binphi();
178 int etabin = tower_iter->second->get_bineta();
183 tower_iter->second->get_energy());
191 ostringstream nodename;
203 cluster_iter->second->get_z(),
204 cluster_iter->second->get_energy(),
205 cluster_iter->second->getNTowers());