3 #include <calobase/RawTowerGeomContainer.h>
4 #include <calobase/RawTowerContainer.h>
5 #include <calobase/RawTower.h>
43 ostringstream hname, htit;
46 ntuptwr =
new TNtuple(
"twr",
"Towers",
"detid:phi:eta:edep:t");
47 ntupe =
new TNtuple(
"truth",
"The Absolute Truth",
"phi:theta:eta:e:p");
54 map<int, PHG4Particle*>::const_iterator particle_iter;
55 PHG4TruthInfoContainer *_truth_container = findNode::getClass<PHG4TruthInfoContainer>(topNode,
"G4TruthInfo");
59 float ntvars[5] = {0};
61 particle_iter != primary_range.second; ++particle_iter)
64 ntvars[0] = atan2(particle->
get_py(), particle->
get_px());
65 ntvars[1] = atan(sqrt(particle->
get_py()*particle->
get_py() +
68 ntvars[2] = 0.5*log((particle->
get_e()+particle->
get_pz())/
70 ntvars[3] = particle->
get_e();
71 ntvars[4] = particle->
get_pz();
81 string nodename[3] = {
"TOWER_SIM_CEMC",
"TOWER_SIM_HCALIN",
"TOWER_SIM_HCALOUT"};
82 string geonodename[3] = {
"TOWERGEOM_CEMC",
"TOWERGEOM_HCALIN",
"TOWERGEOM_HCALOUT"};
83 for (
int j=0;
j<3;
j++)
85 towers = findNode::getClass<RawTowerContainer>(topNode,nodename[
j]);
91 cout <<
"no geometry node " << geonodename << endl;
97 double energy = twr_iter->second->get_energy();
98 int phibin = twr_iter->second->get_binphi();
99 int etabin = twr_iter->second->get_bineta();
106 twr_iter->second->get_time());