diff --git a/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.cxx b/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.cxx index 7b8780d635a..b84b2f6a04e 100644 --- a/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.cxx +++ b/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.cxx @@ -1,3 +1,4 @@ + /* * * \class StFcsTrgQaMaker @@ -40,72 +41,87 @@ Int_t StFcsTrgQaMaker::Init(){ LOG_FATAL << "Error finding StFcsTrgSimMaker"<< endm; return kStFatal; } + fcs_trg_base* trg=mFcsTrgSimMkr->getTriggerEmu(); + if(!trg){ + LOG_FATAL << "Error finding fcs_trg_base from StFcsTrgSimMaker"<< endm; + return kStFatal; + } if(mRun>0){ int yday=mRun/1000; sprintf(mFilename,"%d/%d.trgQa.root",yday,mRun); }else if(mFilename==0){ - static char* fname = const_cast("fcs.trgqa.root"); + char* fname = "fcs.trgqa.root"; mFilename=fname; } printf("StFcsTrgQaMaker::Init - Opening %s\n",mFilename); mFile=new TFile(mFilename,"RECREATE"); - const char* cname[4]={"All","SIM","DEP","TCU"}; - for(int i=0; i<4; i++){ - mETot[i] = new TH1F(Form("ETot%s", cname[i]), Form("ETot%s", cname[i]),256,0,1024); - mHTot[i] = new TH1F(Form("HTot%s", cname[i]), Form("HTot%s", cname[i]),256,0,512); - mEHT [i] = new TH1F(Form("EHT%s", cname[i]), Form("EHT%s", cname[i]),256,0,256); - mHHT [i] = new TH1F(Form("HHT%s", cname[i]), Form("HHT%s", cname[i]),256,0,256); - mJP[0][i] = new TH1F(Form("JP2%s", cname[i]), Form("JP2%s", cname[i]),256,0,1024); - mJP[1][i] = new TH1F(Form("JP1%s", cname[i]), Form("DiJP1%s", cname[i]),256,0,1024); - - mPOR [i] = new TH1F(Form("POR%s", cname[i]), Form("POR%s", cname[i]),256,0,512); - mE4b4[i] = new TH1F(Form("E4b4%s",cname[i]), Form("E4b4%s", cname[i]),256,0,256); - mH4b4[i] = new TH1F(Form("H4b4%s",cname[i]), Form("H4b4%s", cname[i]),256,0,256); - - mSum[0][i] = new TH1F(Form("Sum%s", cname[i]), Form("E+H%s", cname[i]),256,0,256); - mEHR[0][i] = new TH1F(Form("EHR%s", cname[i]), Form("EHRatio%s", cname[i]), 64,0,1.05); - mSum[1][i] = new TH1F(Form("Had%s", cname[i]), Form("E+H%s", cname[i]),256,0,256); - mEHR[1][i] = new TH1F(Form("RHad%s",cname[i]), Form("EHRatio%s", cname[i]), 64,0,1.05); - mSum[2][i] = new TH1F(Form("EM%s", cname[i]), Form("E+H%s", cname[i]),256,0,256); - mEHR[2][i] = new TH1F(Form("REM%s", cname[i]), Form("EHRatio%s", cname[i]), 64,0,1.05); - mSum[3][i] = new TH1F(Form("Gam%s", cname[i]), Form("E+H%s", cname[i]),256,0,256); - mEHR[3][i] = new TH1F(Form("RGam%s",cname[i]), Form("EHRatio%s", cname[i]), 64,0,1.05); - mSum[4][i] = new TH1F(Form("Ele%s", cname[i]), Form("E+H%s", cname[i]),256,0,256); - mEHR[4][i] = new TH1F(Form("REle%s",cname[i]), Form("EHRatio%s", cname[i]), 64,0,1.05); - - mDEm [i] = new TH2F(Form("DEm%s", cname[i]),Form("DiEM%s", cname[i]),256,0,256,256,0,256); - mDHad[i] = new TH2F(Form("DHad%s",cname[i]),Form("DiHadron%s", cname[i]),256,0,256,256,0,256); - mDGam[i] = new TH2F(Form("DGam%s",cname[i]),Form("DiGamma%s", cname[i]),256,0,256,256,0,256); - mDEle[i] = new TH2F(Form("DEle%s",cname[i]),Form("DiElectron%s",cname[i]),256,0,256,256,0,256); - mDJP [i] = new TH2F(Form("DJP%s", cname[i]),Form("DiJP%s", cname[i]),256,0,256,256,0,256); - } - mSumTot[0] = new TH2F("SumEtot","SumEtot;E4x4+H4x4;Etot",256,0,256,256,0,1024); - mSumTot[1] = new TH2F("SumHtot","SumHtot;E4x4+H4x4;Htot",256,0,256,256,0,512); - const char* NS[2]={"N","S"}; - for(int ns=0; nsJPATHR2,trg->JPBCTHR2,trg->JPDETHR2),11,-5.5,5.5); + mJPMap[1] = new TH1F("JP1",Form("JP1 THR A=%d,BC=%d,DE=%d",trg->JPATHR1,trg->JPBCTHR1,trg->JPDETHR1),11,-5.5,5.5); + mJPMap[2] = new TH1F("JP0",Form("JP0 THR A=%d,BC=%d,DE=%d",trg->JPATHR0,trg->JPBCTHR0,trg->JPDETHR0),11,-5.5,5.5); + + mE4x4 = new TH1F("E4x4", "MAX E4x4", 256,0,256); + mEM4x4 = new TH1F("EM4x4", "MAX EM4x4", 256,0,256); + mELE4x4 = new TH1F("ELE4x4", "MAX ELE4x4", 256,0,256); + mERatio = new TH1F("EMRatio", "MAX EM Ratio=E/(E+Hmax)", 64,0,1.05); + mELERatio = new TH1F("ELERatio","MAX ELE Ratio=E/(E+Hmax)", 64,0,1.05); + + mH4x4 = new TH1F("H4x4", "MAX H4x4", 256,0,256); + mEH4x4 = new TH1F("EH4x4", "MAX E+H4x4", 256,0,256); + mHAD4x4 = new TH1F("HAD4x4", "MAX Had4x4", 256,0,256); + mHRatio = new TH1F("HRatio", "MAX E+H Ratio=E/(E+H)", 64,0,1.05); + mHADRatio = new TH1F("HADRatio","MAX Had Ratio=E/(E+H)", 64,0,1.05); + + mE4x4Map[0] = new TH2F("EM4x4MapEM2", Form("EM EM2=%d",trg->EMTHR2), 19,-9.5,9.5,15,-15.5,-0.5); + mE4x4Map[1] = new TH2F("EM4x4MapEM1", Form("EM EM1=%d",trg->EMTHR1), 19,-9.5,9.5,15,-15.5,-0.5); + mE4x4Map[2] = new TH2F("EM4x4MapEM0", Form("EM EM0=%d",trg->EMTHR0), 19,-9.5,9.5,15,-15.5,-0.5); + mE4x4Map[3] = new TH2F("EM4x4MapELE2", Form("EM ELE2=%d",trg->ELETHR2),19,-9.5,9.5,15,-15.5,-0.5); + + mELE4x4Map[0] = new TH2F("ELE4x4MapELE2",Form("ELE ELE2=%d",trg->ELETHR2), 19,-9.5,9.5,15,-15.5,-0.5); + mELE4x4Map[1] = new TH2F("ELE4x4MapELE1",Form("ELE ELE1=%d",trg->ELETHR1), 19,-9.5,9.5,15,-15.5,-0.5); + + mEH4x4Map[0] = new TH2F("EHMapHAD2", Form("E+H HAD2=%d",trg->HADTHR2), 19,-9.5,9.5,15,-15.5,-0.5); + mEH4x4Map[1] = new TH2F("EHMapHAD1", Form("E+H HAD1=%d",trg->HADTHR1), 19,-9.5,9.5,15,-15.5,-0.5); + mEH4x4Map[2] = new TH2F("EHMapHAD0", Form("E+H HAD0=%d",trg->HADTHR0), 19,-9.5,9.5,15,-15.5,-0.5); + + mDsmOut = new TH1F("DsmOut","DsmOut",33,0,33); + mDepOut = new TH1F("DepOut","DepOut",33,0,33); + mTcuBit = new TH1F("TcuBit","TcuBit",33,0,33); + mTcuDep = new TH1F("TcuDep","TcuDepMismatch",33,0,33); + mSimDep = new TH1F("SimDep","SimDepMismatch",33,0,33); + + const float maxadc=500; + mAdc[0]=new TH2F("EN_Id_Adc","EcalNorth; Id; ADC",mFcsDb->maxId(0),0.0,mFcsDb->maxId(0),500,0.0,maxadc); + mAdc[1]=new TH2F("ES_Id_Adc","EcalSouth; Id; ADC",mFcsDb->maxId(1),0.0,mFcsDb->maxId(1),500,0.0,maxadc); + mAdc[2]=new TH2F("HN_Id_Adc","HcalNorth; Id; ADC",mFcsDb->maxId(2),0.0,mFcsDb->maxId(2),500,0.0,maxadc); + mAdc[3]=new TH2F("HS_Id_Adc","HcalSouth; Id; ADC",mFcsDb->maxId(3),0.0,mFcsDb->maxId(3),500,0.0,maxadc); + mAdc[4]=new TH2F("PN_Id_Adc","PresNorth; Id; ADC",mFcsDb->maxId(4),0.0,mFcsDb->maxId(4),500,0.0,maxadc); + mAdc[5]=new TH2F("PS_Id_Adc","PresSouth; Id; ADC",mFcsDb->maxId(5),0.0,mFcsDb->maxId(5),500,0.0,maxadc); return kStOK; }; @@ -116,30 +132,6 @@ Int_t StFcsTrgQaMaker::Make() { return kStFatal; } - //Getting Trigger Data - TObjectSet *os = (TObjectSet*)GetDataSet("StTriggerData"); - StTriggerData* trgd=0; - if(os){ - trgd = (StTriggerData*)os->GetObject(); - if(trgd){ - //LOG_INFO << "got StTriggerData addr="<lastDSM(5); - - //TCU bits - for(int i=0; i<16; i++) if((tcubit >> i) & 0x1) mTcuBit->Fill(i); - - //DSM out - int dsmout=trg->dsmout; - for(int i=0; i<16; i++) if((dsmout >> i) & 0x1) mDsmOut->Fill(i); - //Getting StEvent and FcsCollection StEvent* event= (StEvent*)GetInputDS("StEvent"); StFcsCollection *fcs = 0; @@ -152,6 +144,36 @@ Int_t StFcsTrgQaMaker::Make() { LOG_INFO << "No StFcsCollection found" << endm; return kStErr; } + if(fcs->isDataExist()==0) { + LOG_INFO << "No FCS data in this event" << endm; + return kStOk; + } + //Getting Trigger Data + StTriggerData* trgd = event->triggerData(); + if(!trgd){ + TObjectSet *os = (TObjectSet*)GetDataSet("StTriggerData"); + if(os){ + trgd = (StTriggerData*)os->GetObject(); + if(trgd){ + //LOG_INFO << "got StTriggerData addr="<lastDSM(2) + (trgd->lastDSM(5)<<16); + + //TCU bits + for(int i=0; i<32; i++) if((tcubit >> i) & 0x1) mTcuBit->Fill(i); + + //DSM out + unsigned int dsmout=trg->dsmout; + for(int i=0; i<32; i++) if((dsmout >> i) & 0x1) mDsmOut->Fill(i); + mDsmOut->Fill(32); //DEP out int depout=0; @@ -164,202 +186,184 @@ Int_t StFcsTrgQaMaker::Make() { int ns = hits[i]->ns(); int dep = hits[i]->dep(); int ch = hits[i]->channel(); - //printf("DEP TRG data = %1d %1d %02d %02d\n",ehp,ns,dep,ch); - if(ehp!=3) continue; - if(ns!=0) continue; - if(dep!=0) continue; - if(ch==4 || ch==5){ + if(ehp!=3) continue; //DEPIO boards only + if(dep==0 && (ch==4 || ch==5) ){ //stage3 DEP to TCU int ntb = hits[i]->nTimeBin(); for(int j=0; jadc(j); unsigned short tb = hits[i]->timebin(j); - //if(tb>=96-8 && tb<=96+8) - //if(tb>=96-8){ - if(0){ - printf("DEPIO data = d%1d ns%1d dep%2d ch%2d tb%3d 0x%x",ehp,ns,dep,ch,tb,adc); - if(ch==5 && (adc&0x1)) printf(" ELE2"); - printf("\n");; - } + //printf("DEPIO3 data = ehp%1d ns%1d dep%2d ch%2d tb%3d 0x%x\n",ehp,ns,dep,ch,tb,adc); if(tb!=mS3off) continue; if(ch==4) depout += adc; if(ch==5) depout += (adc << 8); + } + } + if(dep==1 && ch==36){ //stage2 north/south DEP to TCU + int ntb = hits[i]->nTimeBin(); + for(int j=0; jadc(j); + unsigned short tb = hits[i]->timebin(j); + //printf("DEPIO2 data = ehp%1d ns%1d dep%02d ch%02d tb%03d 0x%x\n",ehp,ns,dep,ch,tb,adc); + if(tb!=mS2off) continue; + if(ns==0) depout += (adc&0xff) << 16; + if(ns==1) depout += (adc&0xff) << 24; } - } + } + } + for(int i=0; i<32; i++) if((depout >> i) & 0x1) mDepOut->Fill(i); + + const char* BIT[32]={"HAD0","HAD1","HAD2", + "EM0","EM1","EM2", + "JP2","JPA1","JPBC1","JPDE1","JPA0","JPBC0","JPDE0", + "DiJP","DiJPAsy","DiELEA", + "ELE0-N","ELE1-N","ELE2-N","EM3-N","EHT-N","HHT-N","ETOT-N","HTOT-N", + "ELE0-S","ELE1-S","ELE2-S","EM3-S","EHT-S","HHT-S","ETOT-S","HTOT-S"}; + if(GetDebug()){ + LOG_INFO << Form("FCSBits SIM = %08x ",dsmout); + for(int i=0; i<32; i++){ if((dsmout>>i)&1) {LOG_INFO << BIT[i] << " ";} } LOG_INFO<>i)&1) {LOG_INFO << BIT[i] << " ";} } LOG_INFO<>i)&1) {LOG_INFO << BIT[i] << " ";} } LOG_INFO<> i) & 0x1) mDepOut->Fill(i); //Mismatch - for(int i=0; i<16; i++) if((depout >> i) != (tcubit >> i)) mTcuDep->Fill(i); - for(int i=0; i<16; i++) if((depout >> i) != (dsmout >> i)) mSimDep->Fill(i); + LOG_INFO << Form("FCSBitsMM DEP-TCU Mismatch "); + for(int i=0; i<32; i++) if(((depout>> i)&1) != ((tcubit>>i)&1)) {mTcuDep->Fill(i); LOG_INFO << BIT[i] << " ";} + LOG_INFO<>i)&1) != ((depout>>i)&1)) {mSimDep->Fill(i); LOG_INFO << BIT[i] << " ";} + LOG_INFO<numberOfHits(det); + StSPtrVecFcsHit& hits = fcs->hits(det); + for (int i=0; iid(); + int ehp = hits[i]->ehp(); + int ns = hits[i]->ns(); + int c = mFcsDb->getColumnNumber(det,id); + int r = mFcsDb->getRowNumber(det,id); + float cc = c * (ns*2-1); + float rr = - r; + mTow[ehp]->Fill(cc,rr,hits[i]->energy()); + } + } unsigned int max; int maxns,maxc,maxr; - + int maxns2,maxc2,maxr2; + int maxns3,maxc3,maxr3; + int maxns4,maxc4,maxr4; + int maxns5,maxc5,maxr5; //Ecal HT 2x2 - max=0; for(int ns=0; nse2x2[ns][r][c]>max){ //find max Ecal 2x2 - max=trg->e2x2[ns][r][c]; maxns=ns; maxr=r; maxc=c; + max=trg->e2x2[ns][r][c]; maxr=r; maxc=c; } } } + if(max>0){ + mEHT[ns]->Fill(max); + mEHTMap->Fill((maxc+1)*(ns*2-1),-maxr-1); + } } - mEHT[0]->Fill(max); - if((dsmout>>0)&0x1) mEHT[1]->Fill(max); - if((depout>>0)&0x1) mEHT[2]->Fill(max); - if((tcubit>>0)&0x1) mEHT[3]->Fill(max); //Hcal HT 2x2 - max=0; for(int ns=0; nsh2x2[ns][r][c]>max){ //find max Hcal 2x2 - max=trg->h2x2[ns][r][c]; maxns=ns; maxr=r; maxc=c; + max=trg->h2x2[ns][r][c]; maxr=r; maxc=c; } } } + if(max>0){ + mHHT[ns]->Fill(max); + mHHTMap->Fill((maxc+1)*(ns*2-1),-maxr-1); + } } - mHHT[0]->Fill(max); - if((dsmout>>1)&0x1) mHHT[1]->Fill(max); - if((depout>>1)&0x1) mHHT[2]->Fill(max); - if((tcubit>>1)&0x1) mHHT[3]->Fill(max); //Ecal Tot - max=trg->etot[0]; - if(trg->etot[1] > max) max=trg->etot[1]; - mETot[0]->Fill(max); - if((dsmout>>2)&0x1) mETot[1]->Fill(max); - if((depout>>2)&0x1) mETot[2]->Fill(max); - if((tcubit>>2)&0x1) mETot[3]->Fill(max); + mETot[0]->Fill(trg->etot[0]); + mETot[1]->Fill(trg->etot[1]); //Hcal Tot - max=trg->htot[0]; - if(trg->htot[1] > max) max=trg->htot[1]; - mHTot[0]->Fill(max); - if((dsmout>>3)&0x1) mHTot[1]->Fill(max); - if((depout>>3)&0x1) mHTot[2]->Fill(max); - if((tcubit>>3)&0x1) mHTot[3]->Fill(max); + mHTot[0]->Fill(trg->htot[0]); + mHTot[1]->Fill(trg->htot[1]); //JP - max=0; for(int ns=0; nsjet[ns][r]>max){ //find max JP - max=trg->jet[ns][r]; maxns=ns; maxr=r; - } + for(int j=0; j<5; j++){ + if(trg->jet[ns][j]>max){ //find max JP + mJP[ns][j]->Fill(trg->jet[ns][j]); + if((trg->d_out.s2[ns].s2_to_s3[0].d[1]>>j)&0x1) mJPMap[0]->Fill((j+1)*(ns*2-1)); + if((trg->d_out.s2[ns].s2_to_s3[1].d[1]>>j)&0x1) mJPMap[1]->Fill((j+1)*(ns*2-1)); + if((trg->d_out.s2[ns].s2_to_s3[0].d[2]>>j)&0x1) mJPMap[2]->Fill((j+1)*(ns*2-1)); + } } - } - mJP[0][0]->Fill(max); - if((dsmout>>4)&0x1) mJP[0][1]->Fill(max); - if((depout>>4)&0x1) mJP[0][2]->Fill(max); - if((tcubit>>4)&0x1) mJP[0][3]->Fill(max); - mJP[1][0]->Fill(max); - if((dsmout>>9)&0x1) mJP[1][1]->Fill(max); - if((depout>>9)&0x1) mJP[1][2]->Fill(max); - if((tcubit>>9)&0x1) mJP[1][3]->Fill(max); - - //ecal 4x4 - max=0; + } + + //Ecal 4x4 for(int ns=0; nsesum[ns][r][c]>max){ //find max Ecal 4x4 - max=trg->esum[ns][r][c]; maxns=ns; maxr=r; maxc=c; + int esum=trg->esum[ns][r][c]; + int sum=trg->sum[ns][r][c]; + if(esum>max){ //find max Ecal 4x4 + max=esum; maxns=ns; maxr=r; maxc=c; } - } - } - } - mE4b4[0]->Fill(max); - - //Fill only for max ecal 4x4 - if(max>0){ - int id=maxr*kFcsEcal4x4NCol + maxc; - float pt=max*mPtCh; - mEcal[maxns]->Fill(id,pt); - if(pt>mEcalPtThr){ - mEcalNorm[maxns]->Fill(id); - for(int dep=0; dep<6; dep++){ - for(int ch=0; ch<32; ch++){ - if(trg->phit[maxns][dep][ch]>0){ - int idp=dep*32 + ch; - mEPmap[maxns]->Fill(id,idp); - } + if(esum>emmax && trg->ratiomax[ns][r][c] > 1.0/(1.0+(float)trg->EM_HERATIO_THR/128)){ + emmax=esum; maxns2=ns; maxr2=r; maxc2=c; } - } - } - } - - //hcal - max=0; - for(int ns=0; nshsum[ns][r][c]==0) continue; - int id=r*kFcsHcal4x4NCol + c; - mHcal[ns]->Fill(id,trg->hsum[ns][r][c]*0.0316); - if(trg->hsum[ns][r][c]>max){ //find max Ecal 4x4 - max=trg->esum[ns][r][c]; maxns=ns; maxr=r; maxc=c; + if(esum>elemax && trg->ratiomax[ns][r][c] > 1.0/(1.0+(float)trg->EM_HERATIO_THR/128) && trg->epdcoin[ns][r][c]){ + elemax=esum; maxns3=ns; maxr3=r; maxc3=c; } - } - } - } - mH4b4[0]->Fill(max); - - //Pres ADC - max=0; - for(int ns=0; nspadc[ns][dep][ch]>0){ - int idp=dep*32 + ch; - mPres[ns]->Fill(idp,trg->padc[ns][dep][ch]/150.0); + if(sum>summax){ + summax=sum; maxns4=ns; maxr4=r; maxc4=c; } - if(trg->padc[ns][dep][ch]>max){ //find max Ecal 4x4 - max=trg->padc[ns][dep][ch]; maxns=ns; maxr=dep; maxc=ch; + if(sum>hadmax && trg->ratio[ns][r][c] < 1.0/(1.0+(float)trg->HAD_HERATIO_THR/128)){ + hadmax=sum; maxns5=ns; maxr5=r; maxc5=c; } - } - } - } - mPOR[0]->Fill(max); - - //ecal+hcal 4x4 - max=0; - for(int ns=0; nssum[ns][r][c]>max){ //find max Ecal 4x4 - max=trg->sum[ns][r][c]; maxns=ns; maxr=r; maxc=c; + int cc=(c+1)*(ns*2-1); + int rr=-r-1; + if(esum > trg->EMTHR2) mE4x4Map[0]->Fill(cc,rr); + if(esum > trg->EMTHR1) mE4x4Map[1]->Fill(cc,rr); + if(esum > trg->EMTHR0) mE4x4Map[2]->Fill(cc,rr); + if(esum > trg->ELETHR2) mE4x4Map[3]->Fill(cc,rr); + if(trg->epdcoin[ns][r][c]){ + if(esum > trg->ELETHR2) mELE4x4Map[0]->Fill(cc,rr); + if(esum > trg->ELETHR1) mELE4x4Map[1]->Fill(cc,rr); } + if(sum > trg->HADTHR2) mEH4x4Map[0]->Fill(cc,rr); + if(sum > trg->HADTHR1) mEH4x4Map[1]->Fill(cc,rr); + if(sum > trg->HADTHR0) mEH4x4Map[2]->Fill(cc,rr); } } - } - if(max>0){ - mSum[0][0]->Fill(max); - mSumTot[0]->Fill(max,trg->etot[maxns]); - mSumTot[1]->Fill(max,trg->htot[maxns]); - mEHR[0][0]->Fill(trg->ratio[maxns][maxr][maxc]); - if(trg->had[maxns][maxr][maxc]){ - mSum[1][0]->Fill(max); - mEHR[1][0]->Fill(trg->ratio[maxns][maxr][maxc]); - } - if(trg->em[maxns][maxr][maxc]){ - mSum[2][0]->Fill(max); - mEHR[2][0]->Fill(trg->ratio[maxns][maxr][maxc]); - if(trg->epdcoin[maxns][maxr][maxc]==0){ - mSum[3][0]->Fill(max); - mEHR[3][0]->Fill(trg->ratio[maxns][maxr][maxc]); - } - if(trg->epdcoin[maxns][maxr][maxc]==1){ - mSum[4][0]->Fill(max); - mEHR[4][0]->Fill(trg->ratio[maxns][maxr][maxc]); - } - } + if(max>0) mE4x4->Fill(max); + if(emmax>0) mEM4x4->Fill(emmax); + if(elemax>0) mELE4x4->Fill(elemax); + if(summax>0) mEH4x4->Fill(summax); + if(hadmax>0) mHAD4x4->Fill(summax); + if(max>0) mERatio->Fill(trg->ratiomax[maxns][maxr][maxc]); + if(elemax>0) mELERatio->Fill(trg->ratiomax[maxns3][maxr3][maxc3]); + if(summax>0) mHRatio->Fill(trg->ratio[maxns4][maxr4][maxc4]); + if(hadmax>0) mHADRatio->Fill(trg->ratio[maxns5][maxr5][maxc5]); } + + for(int det=0; dethits(det); + int nh=fcs->numberOfHits(det); + for(int i=0; iFill(hits[i]->id(),(float)hits[i]->adcSum()); + } + return kStOK; }; diff --git a/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.h b/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.h index 84b6ec44d3c..7ead1958a63 100644 --- a/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.h +++ b/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.h @@ -30,6 +30,7 @@ class StFcsTrgQaMaker : public StMaker { void setPtCh(float v) {mPtCh=v;} void setEcalPtThr(float v) {mEcalPtThr=v;} void setS3off(int v) {mS3off=v;} + void setS2off(int v) {mS2off=v;} protected: @@ -41,33 +42,47 @@ class StFcsTrgQaMaker : public StMaker { int mRun=0; float mPtCh=0.0316; float mEcalPtThr=1.5; - int mS3off=96; - - TH1F* mETot[4]; - TH1F* mHTot[4]; - TH1F* mEHT[4]; - TH1F* mHHT[4]; - TH1F* mJP[2][4]; - - TH1F* mE4b4[4]; - TH1F* mH4b4[4]; - TH1F* mPOR[4]; - - TH1F* mSum[5][4]; - TH1F* mEHR[5][4]; - TH2F* mSumTot[2]; - - TH2F* mDEm[4]; - TH2F* mDHad[4]; - TH2F* mDGam[4]; - TH2F* mDEle[4]; - TH2F* mDJP[4]; - - TH2F* mEcal[kFcsNorthSouth]; - TH2F* mHcal[kFcsNorthSouth]; - TH2F* mPres[kFcsNorthSouth]; - TH2F* mEPmap[kFcsNorthSouth]; - TH1F* mEcalNorm[kFcsNorthSouth]; + + //marker.adc_start = 7 + //marker.s1_out_start = marker.adc_start + 11 = 18 + //marker.s2_in_start = marker.s1_out_start + 2 = 20 + //marker.s2_to_s3_start = marker.s2_in_start + 15 = 35 + //marker.s3_in_start = marker.s2_to_s3_start + 8 = 43 + //marker.dsm_out_start=marker.s3_in_start + 14 = 57 + //So... DEPIO DSM out is 50 tb later than ADC + //center trig tb=50 => tb=47~54 and 47=marker.adc_start(7)+5xing*8tb/xing + //Thus.... mS3off=47+50 = 97 + int mS3off=97; + int mS2off=97; //Tonko says same as S3off + + TH2F* mTow[2]; + + TH1F* mETot[2]; + TH1F* mHTot[2]; + + TH1F* mEHT[2]; + TH2F* mEHTMap; + TH1F* mHHT[2]; + TH2F* mHHTMap; + + TH1F* mJP[2][5]; + TH1F* mJPMap[3]; + + TH1F* mE4x4; + TH1F* mEM4x4; + TH1F* mELE4x4; + TH1F* mERatio; + TH1F* mELERatio; + + TH1F* mH4x4; + TH1F* mEH4x4; + TH1F* mHAD4x4; + TH1F* mHRatio; + TH1F* mHADRatio; + + TH2F* mE4x4Map[4]; + TH2F* mELE4x4Map[2]; + TH2F* mEH4x4Map[3]; TH1F* mDsmOut; TH1F* mDepOut; @@ -75,6 +90,8 @@ class StFcsTrgQaMaker : public StMaker { TH1F* mTcuDep; TH1F* mSimDep; + TH2F* mAdc[3]; + ClassDef(StFcsTrgQaMaker,1); };