6 #include <TClonesArray.h>
19 printf(
"EEtower() constructed\n");
27 EEtower::~EEtower() {}
33 void EEtower::init( ){
36 memset(hA,0,
sizeof(hA));
38 hA[0]=
new TH1F (
"tE",
"Eneregy (GeV) from any tower",100,0.,Emax);
39 hA[1]=
new TH1F (
"sE",
"Total Eneregy in event (GeV) (sum from all tower)",200,0.,Emax*10);
40 hA[4]=
new TH1F (
"tN",
"No. of towers with energy above th1",30,-0.5,29.5);
45 if(hA[i]==0)
continue;
55 void EEtower::clear(){
62 void EEtower::finish(){
63 printf(
"\n EEtower::finish() nInpEve=%d\n",nInpEve);
68 void EEtower::print(){
69 printf(
"\n EEtower::print()\n dump event:\n");
71 printf(
"phiBin, towerE for %d eta bins \n",MaxPhiBins);
72 for(j=0;j<MaxPhiBins;j++) {
74 for(i=0;i<MaxEtaBins;i++)
75 printf(
"%8.3f ",
towerE[i][j]);
84 void EEtower::task1(){
89 for(j=0;j<MaxPhiBins;j++) {
90 for(i=0;i<MaxEtaBins;i++) {
105 void EEtower:: saveHisto(TString fname){
106 TString outName=fname+
".hist.root";
107 TFile f( outName,
"recreate");
109 printf(
"%d histos are written to '%s' ...\n",
HList->GetEntries(),outName.Data());
float towerE[MaxEtaBins][MaxPhiBins]
no. of input events
TObjArray * HList
DB access point.