38 ntup =
new TNtuple(
"edepntup",
"G4Edeps",
"detid:layer:edep");
44 ostringstream nodename;
45 set<string>::const_iterator iter;
46 map<int, double> layer_edep_map;
47 map<int, double>::const_iterator edepiter;
50 layer_edep_map.clear();
51 int detid = (
_detid.find(*iter))->second;
53 nodename <<
"G4HIT_" << *iter;
54 PHG4HitContainer *hits = findNode::getClass<PHG4HitContainer>(topNode, nodename.str());
64 layer_edep_map[hit_iter->second->get_layer()] += hit_iter->second->get_edep();
65 esum += hit_iter->second->get_edep();
67 for (edepiter = layer_edep_map.begin(); edepiter != layer_edep_map.end(); ++edepiter)
69 ntup->Fill(detid, edepiter->first, edepiter->second);
71 ntup->Fill(detid, -1, esum);