5 #include "StMuDSTMaker/EZTREE/EztEmcRawData.h"
7 #include "SpyCopyCat.h"
11 SpyCopyCat:: SpyCopyCat(
char x,
int y){
18 case 'T': crateID=1+icr; nb=128;
19 text=
"ETOW crate=";
break;
20 case 'M': crateID=64+icr; nb=192;
21 text=
"ESMD crate=";
break;
27 txt=
"SpyCopyCat"; txt+=crateID;
28 h=
new TH1F(txt,txt,nb,-0.5,nb-0.5);
43 case 'T': eRaw=e;
break;
44 case 'M': eRaw=m;
break;
49 assert( icr>=0 && icr<eRaw->getNBlocks());
50 if(eRaw->isCrateVoid(icr))
return;
52 const UShort_t*
data=eRaw->data(icr);
56 for(i=1;i<eRaw->sizeData(icr);i++) {
57 int del=data[i-1]-data[i];
89 SpyCopyCat:: incrHist(
int i0,
int i1){
91 for(i=i0; i<=i1;i++) h->Fill(i);
98 SpyCopyCat::sense(FILE *fd) {
103 float nThres=nEve*thres;
104 if(nThres<minEve) nThres=minEve;
106 int nMax=(int)h->GetMaximum();
107 bool isBad=nMax>nThres;
112 fprintf(fd,
"\nSpyCopyCat: %s , bad channels: ",text.Data());
115 for(i=1;i<=h->GetNbinsX();i++) {
116 if(h->GetBinContent(i) <nThres)
continue;
120 fprintf(fd,
" --> nChan=%d\n",k);