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();
53 nodename <<
"G4HIT_" << *iter;
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);