7 #include <TClonesArray.h>
11 #include "EzEEtowerExample.h"
13 #include "StEEmcUtil/EEfeeRaw/EEfeeRawEvent.h"
14 #include "StEEmcUtil/EEfeeRaw/EEstarTrig.h"
15 #include "StEEmcUtil/EEfeeRaw/EEmcEventHeader.h"
17 #include "StEEmcUtil/EEfeeRaw/EEfeeDataBlock.h"
18 #include "StEEmcUtil/EEfeeRaw/EEname2Index.h"
20 #include "StEEmcUtil/database/EEmcDbItem.h"
24 #include "EEmcDb/EEmcDb.h"
26 #include "StEEmcUtil/database/StEEmcDb.h"
34 printf(
"EzEEtowerExample() constructed\n");
43 void EzEEtowerExample::init (){
44 printf(
"EzEEtowerExample() init\n");
50 EzEEtowerExample::~EzEEtowerExample() {}
56 void EzEEtowerExample::make(){
67 void EzEEtowerExample::unpackEzTree(){
74 for ( isl = 0; isl < 240; isl++ ) {
75 ctbSum+= eTrig -> CTB[isl];
81 for(ic=0;ic<eEve->block->GetEntries();ic++) {
83 if( !b->isValid() )
continue;
85 int crateID=b->getCrateID();
86 if(crateID>MaxTwCrateID)
continue;
90 UShort_t*
data=b->getData();
91 int nd=b->getValidDataLen();
93 for(chan=0;chan<nd;chan++) {
94 const EEmcDbItem *x=eeDb->getByCrate(crateID,chan);
96 if(x->fail )
continue;
98 float rawAdc=data[chan];
99 if(rawAdc <x->thr)
continue;
102 float value=(rawAdc-x->ped)/x->gain;
103 int iphi=(x->sec-1)*5+(x->sub-
'A');
105 assert(iphi>=0 && iphi<MaxPhiBins);
106 assert(ieta>=0 && ieta<MaxEtaBins);
float towerE[MaxEtaBins][MaxPhiBins]
no. of input events