3 #include <calobase/RawTower.h>
4 #include <calobase/RawTowerContainer.h>
5 #include <calobase/RawTowerGeomContainer.h>
43 ntup =
new TNtuple(
"towerntup",
"G4Towers",
"detid:phi:eta:energy");
45 TH1 *
h1 =
new TH1F(
"energy1GeV",
"energy 0-1GeV", 1000, 0, 1);
47 h1 =
new TH1F(
"energy100GeV",
"energy 0-100GeV", 1000, 0, 100);
54 ostringstream nodename;
55 ostringstream geonodename;
56 set<string>::const_iterator iter;
57 vector<TH1 *>::const_iterator eiter;
64 geonodename <<
"TOWERGEOM_" << *iter;
65 RawTowerGeomContainer *towergeom = findNode::getClass<RawTowerGeomContainer>(topNode, geonodename.str());
68 cout <<
"no geometry node " << geonodename.str() <<
" for " << *iter << endl;
71 RawTowerContainer *towers = findNode::getClass<RawTowerContainer>(topNode, nodename.str());
82 double energy = tower_iter->second->get_energy();
85 cout <<
"invalid energy: " << energy << endl;
87 esum += tower_iter->second->get_energy();
88 int phibin = tower_iter->second->get_binphi();
89 int etabin = tower_iter->second->get_bineta();
96 tower_iter->second->get_energy());
98 for (eiter =
eloss.begin(); eiter !=
eloss.end(); ++eiter)
100 (*eiter)->Fill(esum);
120 ostringstream twrname;
121 twrname << twrtype <<
"_" <<
name;
123 _tower_type.insert(make_pair(name, twrname.str()));