46 ntup =
new TNtuple(
"cellntup",
"G4Cells",
"detid:layer:phi:eta:edep");
48 TH1 *
h1 =
new TH1F(
"edep1GeV",
"edep 0-1GeV", 1000, 0, 1);
50 h1 =
new TH1F(
"edep100GeV",
"edep 0-100GeV", 1000, 0, 100);
57 ostringstream nodename;
58 ostringstream geonodename;
59 set<string>::const_iterator iter;
60 vector<TH1 *>::const_iterator eiter;
65 nodename <<
"G4CELL_" << *iter;
67 geonodename <<
"CYLINDERCELLGEOM_" << *iter;
71 cout <<
"no geometry node " << geonodename.str() <<
" for " << *iter << endl;
74 PHG4CellContainer *cells = findNode::getClass<PHG4CellContainer>(topNode, nodename.str());
77 int previouslayer = -1;
87 double edep = cell_iter->second->get_edep();
90 cout <<
"invalid edep: " << edep << endl;
92 esum += cell_iter->second->get_edep();
97 int layer = cell_iter->second->get_layer();
99 if (layer != previouslayer)
102 previouslayer =
layer;
118 assert(cellgeom !=
nullptr);
120 cell_iter->second->get_layer(),
123 cell_iter->second->get_edep());
125 for (eiter =
eloss.begin(); eiter !=
eloss.end(); ++eiter)
127 (*eiter)->Fill(esum);