3 #include <calobase/TowerInfo.h>
4 #include <calobase/TowerInfoContainerv1.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;
60 int detid = (
_detid.find(*iter))->second;
64 geonodename <<
"TOWERGEOM_" << *iter;
65 RawTowerGeomContainer *towergeom = findNode::getClass<RawTowerGeomContainer>(topNode, geonodename.str());
68 cout <<
"no geometry node " << geonodename.str() <<
" for " << *iter << endl;
73 TowerInfoContainer *towers = findNode::getClass<TowerInfoContainerv1>(topNode, nodename.str());
77 unsigned int nchannels = towers->
size();
82 if (!isfinite(energy))
84 cout <<
"invalid energy: " << energy << endl;
99 for (eiter =
eloss.begin(); eiter !=
eloss.end(); ++eiter)
101 (*eiter)->Fill(esum);
121 ostringstream twrname;
122 twrname << twrtype <<
"_" <<
name;
124 _tower_type.insert(make_pair(name, twrname.str()));