130 #include "StBemcRaw.h"
132 #include "StEmcUtil/others/emcDetectorName.h"
133 #include "StEmcUtil/geometry/StEmcGeom.h"
135 #include "StEventTypes.h"
138 #include "StDaqLib/GENERIC/EventReader.hh"
139 #include "StDaqLib/EMC/EMC_Reader.hh"
140 #include "StDAQMaker/StDAQReader.h"
141 #include "DAQ_READER/daq_det.h"
142 #include "DAQ_BTOW/daq_btow.h"
143 #include "DAQ_BSMD/daq_bsmd.h"
144 #include "DAQ_ETOW/daq_etow.h"
145 #include "DAQ_ESMD/daq_esmd.h"
146 #include "DAQ_EMC/daq_emc.h"
147 #include "StEmcUtil/database/StEmcDecoder.h"
148 #include "StEmcRawMaker.h"
149 #include "StMessMgr.h"
150 #include "TGenericTable.h"
152 #include "StChain/StRtsTable.h"
162 mSaveAllStEvent = kFALSE;
163 mSaveAllBTOW = kFALSE;
165 mPsdMapBug2 = kFALSE;
166 mTowerMapBug = kFALSE;
173 mControlADCtoE =
new controlADCtoE_st();
174 Int_t calib[] = {1, 1, 1, 1, 0, 0, 0, 0};
175 Int_t pedSub[] = {1, 0, 0, 0, 0, 0, 0, 0};
176 Float_t cut[] = {-1, -1, 1.5, 1.5, -1, -1, -1, -1};
179 Int_t cutType[] = {0, 1, 1, 1, 0, 0, 0, 0};
180 Int_t onlyCal[] = {0, 0, 0, 0, 0, 0, 0, 0};
181 Int_t status[] = {0, 0, 0, 0, 0, 0, 0, 0};
182 Int_t crate[] = {1, 1, 1, 1, 0, 0, 0, 0};
185 mAnyCorrupted = kFALSE;
187 for(Int_t i=0; i<MAXDETBARREL; i++)
189 mControlADCtoE->Calibration[i]=calib[i];
190 mControlADCtoE->DeductPedestal[i]=pedSub[i];
191 mControlADCtoE->CutOff[i]=cut[i];
192 mControlADCtoE->CutOffType[i]=cutType[i];
193 mControlADCtoE->OnlyCalibrated[i]=onlyCal[i];
194 mControlADCtoE->CheckStatus[i]=status[i];
195 mControlADCtoE->CheckCrate[i]=crate[i];
196 mBarrelQAHisto[i] = 0;
197 for(
int j = 0; j < 4; j++){
198 mCheckStatus[i][j]=0;
201 assert(mControlADCtoE->CutOffType[2]==mControlADCtoE->CutOffType[3]);
215 delete mControlADCtoE;
219 LOG_INFO <<
"Configuration for BEMC hit reconstruction "<<endm;
220 for(Int_t i=0;i<MAXDETBARREL;i++)
222 LOG_INFO <<
" Configuration for detector "<<detname[i].Data()<<endm;
223 LOG_INFO <<
" switch for deducting pedestal = "<<mControlADCtoE->DeductPedestal[i]<<endm;
224 LOG_INFO <<
" switch for calibration = "<<mControlADCtoE->Calibration[i]<<endm;
225 LOG_INFO <<
" cutoff type = "<<mControlADCtoE->CutOffType[i]<<endm;
226 LOG_INFO <<
" cutoff value = "<<mControlADCtoE->CutOff[i]<<endm;
227 LOG_INFO <<
" save only calibrated hits = "<<mControlADCtoE->OnlyCalibrated[i]<<endm;
228 LOG_INFO <<
" save only if status is ok = "<<mControlADCtoE->CheckStatus[i]<<endm;
229 LOG_INFO <<
" save only if crate is ok = "<<mControlADCtoE->CheckCrate[i]<<endm;
230 LOG_INFO <<
" SAVE ALL FLAG (overwrites above) = "<<(Int_t)mSaveAllStEvent<<endm;
241 void StBemcRaw::initHisto()
243 mBarrelNHitHist =
new TH2F(
"BarrelNHit",
"BarrelNHit",500,0.0,18000.0,4,0.5,4.5);
244 mBarrelEtotHist =
new TH2F(
"BarrelEtot",
"BarrelEtot",500,0.0,10000.0,4,0.5,4.5);
245 mBarrelAdcSumHist =
new TH2F(
"BarrelAdcSum",
"BarrelAdcSum",500,0.0,1000000.0,4,0.5,4.5);
246 mBarrelNCratesHist =
new TH2F(
"BarrelNCrates",
"BarrelNCrates",31,0.0,31.0,4,0.5,4.5);
247 mBarrelCrateStatusHist =
new TH2F(
"BarrelCrateStatus",
"BarrelCrateStatus",6,-0.5,5.5,30,0.5,30.5);
249 void StBemcRaw::initQAHisto()
251 for(Int_t det = 1;det<=MAXDETBARREL; det++)
256 mBarrelQAHisto[det-1] =
new TH2F(detname[det-1].Data(),detname[det-1].Data(),N,0.5,(Float_t)N+0.5,250,-0.5,249.5);
259 void StBemcRaw::fillHisto()
261 for(Int_t det = 1;det<=MAXDETBARREL; det++)
264 mBarrelEtotHist->Fill(
getTotalE(det),det);
268 for(Int_t crate = 1;crate<=MAXCRATES; crate++)
285 if(!convertFromDaq(TheData,bemcRaw))
287 return make(bemcRaw,event);
293 LOG_ERROR <<
"Could not find DAQ DataSet "<<endm;
298 LOG_ERROR <<
"Could not find StEmcRawData pointer for BEMC"<<endm;
302 StRtsTable* btow = DAQ->GetDaqElement(
"btow/adc");
305 if(RAW->header(BTOWBANK))
306 RAW->deleteBank(BTOWBANK);
307 RAW->createBank(0,BTOWHEADER,BTOWSIZE);
309 for(
int i = 0; i < BTOW_MAXFEE; i++){
310 for(
int j = 0; j < BTOW_DATSIZE; j++){
316 RAW->setData(BTOWBANK,daqid,btowdata->adc[i][j]);
318 for(
int j = 0; j < BTOW_PRESIZE; j++){
319 RAW->setHeader(BTOWBANK,i+j*30,btowdata->preamble[i][j]);
326 LOG_ERROR<<
"BTOW Structure not found"<<endm;
329 while(DAQ->GetDaqElement(
"bsmd/adc")){
330 if(mDate < 20081101)
continue;
331 int rdo = DAQ->Rdo();
333 if(rdo < 9 && mControlADCtoE->CutOffType[2])use=1;
334 if(rdo >=9 && mControlADCtoE->CutOffType[1])use=1;
338 RAW->deleteBank(rdo);
339 RAW->createBank(rdo,1,BSMD_DATSIZE);
340 RAW->setHeader(rdo,0,(
unsigned short)bsmddata->cap);
341 for(
int j = 0; j < BSMD_DATSIZE; j++){
342 RAW->setData(rdo,j,bsmddata->adc[j]);
347 while(DAQ->GetDaqElement(
"bsmd/adc_non_zs")){
348 int rdo = DAQ->Rdo();
350 if((rdo < 9 && !mControlADCtoE->CutOffType[2]) || mDate < 20081101)use=1;
351 if((rdo >= 9 && !mControlADCtoE->CutOffType[1]) || mDate < 20081101)use=1;
356 RAW->deleteBank(rdo);
357 RAW->createBank(rdo,1,BSMD_DATSIZE);
358 RAW->setHeader(rdo,0,(
unsigned short)bsmddata->cap);
360 for(
int j = 0; j < BSMD_DATSIZE; j++){
361 RAW->setData(rdo,j,bsmddata->adc[j]);
386 for(Int_t det = 1; det<=MAXDETBARREL; det++)
393 for(Int_t
id = 1;
id<=nch;
id++)
396 Int_t S =
makeHit(emc,det,
id,ADC,crate,cap,E);
400 StDetectorId did =
static_cast<StDetectorId
>(det+kBarrelEmcTowerId-1);
404 for(Int_t crate = 1;crate<=MAXCRATES;crate++)
405 detector->setCrateStatus(crate,(StEmcCrateStatus)mCrateStatus[det-1][crate-1]);
414 for(Int_t det=1;det<=MAXDETBARREL; det++)
416 for(Int_t crate = 1; crate<=MAXCRATES;crate++)
417 mCrateStatus[det-1][crate-1] = crateUnknown;
418 mIsCorrupted[det-1] = kFALSE;
422 mNCRATESOK[BPRS-1]=mNCRATESOK[BSMDE-1]=mNCRATESOK[BSMDP-1]=0;
424 for(Int_t i = 0; i<MAXSMDCRATES; i++)
426 UShort_t *header = RAW->header(i+BSMDOFFSET);
429 mCrateStatus[BSMDE-1][i] = crateOK;
430 mCrateStatus[BSMDP-1][i] = crateOK;
431 mNCRATESOK[BSMDE-1]++;
432 mNCRATESOK[BSMDP-1]++;
436 for(Int_t i = 0; i<MAXBPRSCRATES; i++)
438 UShort_t *header = RAW->header(i+BPRSOFFSET);
441 mCrateStatus[BPRS-1][i] = crateOK;
442 mNCRATESOK[BPRS-1]++;
445 for(Int_t i = 0; i < MAXDETBARREL; i++){
446 if(mIsCorrupted[i])mAnyCorrupted = kTRUE;
453 StSPtrVecEmcPoint& pvec = emc->barrelPoints();
457 for(Int_t i=0; i<MAXDETBARREL; i++)
459 StDetectorId
id =
static_cast<StDetectorId
>(i+kBarrelEmcTowerId);
463 if(detector->cluster())
465 StSPtrVecEmcCluster& cluster=detector->cluster()->clusters();
469 for(UInt_t j=1;j<=detector->numberOfModules() ;j++)
474 StSPtrVecEmcRawHit& hits=module->hits();
492 UShort_t *header = RAW->header(BTOWBANK);
496 int trgtoken =
event->l0Trigger()->triggerToken();
497 for(Int_t crate = 1;crate<=MAXCRATES;crate++)
501 Int_t sum = header[TDC];
502 Int_t token = header[TDC+BTOWTOKENOFFSET];
503 Int_t err = header[TDC+BTOWTDCERROFFSET];
504 Int_t crateFromHeader = header[TDC+BTOWCRATEOFFSET]& 0x0FF;
505 mCrateStatus[BTOW-1][crate-1] = crateUnknown;
506 if(sum==BTOWBYTESUM && err == BTOWERRFLAG && crate==crateFromHeader && token == trgtoken)
507 mCrateStatus[BTOW-1][crate-1] = crateOK;
509 mCrateStatus[BTOW-1][crate-1] = crateHeaderCorrupt;
511 if(sum==BTOWNOTPRESENT && err == BTOWNOTPRESENT)
512 mCrateStatus[BTOW-1][crate-1] = crateNotPresent;
514 if(mCrateStatus[BTOW-1][crate-1]==crateOK)
515 mNCRATESOK[BTOW-1]++;
517 if(mCrateStatus[BTOW-1][crate-1]==crateHeaderCorrupt)
518 mIsCorrupted[BTOW-1] = kTRUE;
557 LOG_DEBUG <<
"Statistics for detector "<<detname[det-1].Data()<<endm;
558 LOG_DEBUG <<
" Total number of crates with header ok = "<<mNCRATESOK[det-1]<<endm;
559 LOG_DEBUG <<
" Total number of hits = "<<mNTOTAL[det-1]<<endm;
560 LOG_DEBUG <<
" Total hits removed because of crates = "<<mNCRATE[det-1]<<endm;
561 LOG_DEBUG <<
" Total hits removed because ADC = 0 = "<<mNZ[det-1]<<endm;
562 LOG_DEBUG <<
" Total hits removed by Pedestal = "<<mNPED[det-1]+mNRMS[det-1]<<endm;
563 LOG_DEBUG <<
" Total hits removed by Status = "<<mNSTATUS[det-1]<<endm;
564 LOG_DEBUG <<
" Total number of hits saved = "<<mNOK[det-1]<<endm;
565 LOG_DEBUG <<
" Total ADCSUM of valid hits = "<<mADCSUM[det-1]<<endm;
566 LOG_DEBUG <<
" Total Energy of valid hits = "<<mTOTALE[det-1]<<endm;
578 LOG_WARN <<
"Could not find StEmcRawData pointer for BEMC det: " << det <<
" softId: " << softId <<endm;
583 LOG_WARN <<
"Could not find StEmcDecoder pointer for BEMC det: " << det <<
" softId: " << softId <<endm;
595 return RAW->data(BTOWBANK,daq);
602 Int_t S = mDecoder->
GetPsdRDO(softId,RDO,index);
605 if(RDO<0 || RDO>=MAXBPRSCRATES)
607 if(S==1 && RAW->header(RDO+BPRSOFFSET))
609 if(mDate < 20081101)CAP = RAW->header(RDO+BPRSOFFSET,SMDCAPACITOR);
610 else CAP = RAW->header(RDO+BPRSOFFSET,0);
613 return RAW->data(RDO+BPRSOFFSET,index);
619 StEmcGeom *geo = StEmcGeom::instance(
"bsmde");
621 if(geo->
getBin(softId,m,e,s)==1)
624 Int_t S = mDecoder->
GetSmdRDO(BSMDE,m,e,s,RDO,index);
626 if(S==1 && RAW->header(RDO+BSMDOFFSET) && RDO>=0 && RDO<MAXSMDCRATES)
628 if(mDate < 20081101)CAP = RAW->header(RDO+BSMDOFFSET,SMDCAPACITOR);
629 else CAP = RAW->header(RDO+BSMDOFFSET,0);
632 return RAW->data(RDO+BSMDOFFSET,index);
638 StEmcGeom *geo = StEmcGeom::instance(
"bsmdp");
640 if(geo->
getBin(softId,m,e,s)==1)
643 Int_t S = mDecoder->
GetSmdRDO(BSMDP,m,e,s,RDO,index);
645 if(S==1 && RAW->header(RDO+BSMDOFFSET) && RDO>=0 && RDO<MAXSMDCRATES)
647 if(mDate < 20081101)CAP = RAW->header(RDO+BSMDOFFSET,SMDCAPACITOR);
648 else CAP = RAW->header(RDO+BSMDOFFSET,0);
651 return RAW->data(RDO+BSMDOFFSET,index);
666 if(det==BTOW && mTowerMapBug && mDate<20060101)
672 if(det==BPRS && mPsdMapBug2 && mDate<20071101)
678 if(det==BSMDE && mSmdMapBug && mDate>=20100101 && mDate<20110101 && (!mProdVer.compare(
"SL10h") || !mProdVer.compare(
"SL10i") || !mProdVer.compare(
"SL10j")))
682 if(
id+shift < 0)
return kZero;
687 Bool_t skipSave = !mSaveAllStEvent && ( !mSaveAllBTOW || det!=BTOW );
689 if(CRATE>0 && CRATE<=MAXCRATES && mControlADCtoE->CheckCrate[det-1]==1)
690 if((mCrateStatus[det-1][CRATE-1]!=crateOK &&
691 mCrateStatus[det-1][CRATE-1]!=crateUnknown) &&
695 if(skipSave && mCrateVeto && mAnyCorrupted)
698 if(ADC==0 && skipSave)
701 if(mControlADCtoE->CheckStatus[det-1]==1)
703 if(mCheckStatus[det-1][0]==1 && skipSave){
706 if(STATUS!=STATUS_OK && skipSave)
709 if(mCheckStatus[det-1][1]==1 && skipSave){
711 mTables->
getStatus(det,
id,pedSTATUS,
"pedestal");
712 if(pedSTATUS!=STATUS_OK && skipSave)
return kStatus;
714 if(mCheckStatus[det-1][2]==1 && skipSave){
716 mTables->
getStatus(det,
id,calibSTATUS,
"calib");
717 if(calibSTATUS!=STATUS_OK && skipSave)
return kStatus;
719 if(mCheckStatus[det-1][3]==1 && skipSave){
721 mTables->
getStatus(det,
id,gainSTATUS,
"gain");
722 if(gainSTATUS!=STATUS_OK && skipSave)
return kStatus;
727 Float_t PEDESTAL = 0,RMS = 0;
730 if(mControlADCtoE->DeductPedestal[det-1]>0)
735 if(mControlADCtoE->DeductPedestal[det-1]==1)
736 if(det>=BPRS && skipSave)
737 if(CAP==CAP1 || CAP==CAP2)
741 if(mControlADCtoE->CutOffType[det-1]==1 && skipSave && mControlADCtoE->DeductPedestal[det-1] > 0)
745 Float_t x = (ADC-PEDESTAL)/RMS;
746 if(x<=mControlADCtoE->CutOff[det-1])
750 if(mControlADCtoE->Calibration[det-1]==1)
754 for(Int_t i=0;i<5;i++)
758 ADCP*=(Float_t)(ADC-PEDESTAL);
763 if(mControlADCtoE->CutOffType[det-1]==2 && skipSave)
765 if(E<mControlADCtoE->CutOff[det-1])
770 if(mControlADCtoE->OnlyCalibrated[det-1]>0 && E==0 && skipSave)
773 StDetectorId did =
static_cast<StDetectorId
>(det+kBarrelEmcTowerId-1);
775 StEmcGeom *geo = StEmcGeom::instance(det);
779 emc->setDetector(detector);
783 Int_t PsdOffset_bug[40] = {20,21,22,23,0,1,2,3,24,25,26,27,4,5,6,7,28,29,30,31,
784 8,9,10,11,32,33,34,35,12,13,14,15,36,37,38,39,16,17,18,19};
785 Int_t PsdOffset_ok[40] = {36,37,38,39,16,17,18,19,32,33,34,35,12,13,14,15,28,29,30,31,
786 8,9,10,11,24,25,26,27,4,5,6,7,20,21,22,23,0,1,2,3};
787 Int_t RDO,index,PMT,wire,A_value;
789 mDecoder->
GetPsdId(RDO,index,
id,PMT,wire,A_value);
791 id-=PsdOffset_bug[wire-1];
792 id+=PsdOffset_ok[wire-1];
798 if(mBarrelQAHisto[det-1] && !isCorrupted(det))
799 mBarrelQAHisto[det-1]->Fill((Float_t)
id,(Float_t)ADC);
801 hit->setCalibrationType(CAP);
802 detector->addHit(hit);
809 if(!strcmp(option,
"status")){
810 mCheckStatus[det][0]=flag;
813 if(!strcmp(option,
"pedestal")){
814 mCheckStatus[det][1]=flag;
817 if(!strcmp(option,
"calib")){
818 mCheckStatus[det][2]=flag;
821 if(!strcmp(option,
"gain")){
822 mCheckStatus[det][3]=flag;
826 if(strcmp(option,
"")){
827 LOG_WARN<<option<<
" is not a valid option to setCheckStatus"<<endm;
832 for(
int i = 0; i < 4; i++){
833 mCheckStatus[det][i]=flag;
840 void StBemcRaw::setCrateVeto(Int_t flag)
842 if(flag != 0 && flag != 1){
843 LOG_ERROR<<
"Invalid flag passed to StBemcRaw::setCrateVeto, only 0 and 1 accepted"<<endm;
850 LOG_WARN<<
"StBemcRaw::make(TDataSet*,StEvent*) is OBSOLETE for data in Run 9 or later"<<endm;
861 if(!convertFromDaq(TheData,bemcRaw))
863 return make(bemcRaw,event);
867 LOG_WARN<<
"StBemcRaw::convertFromDaq(TDataSet*,StEmcRawData*) is OBSOLETE for data in Run 9 or later"<<endm;
870 LOG_ERROR <<
"Could not find DAQ DataSet "<<endm;
875 LOG_ERROR <<
"Could not find StEmcRawData pointer for BEMC"<<endm;
880 if(!TheDataReader || !TheDataReader->EMCPresent())
882 LOG_ERROR <<
"Data Reader is not present "<<endm;
886 StEMCReader* TheEmcReader=TheDataReader->getEMCReader();
889 LOG_ERROR <<
"Could not find BEMC Reader "<<endm;
893 EMC_Reader* reader = TheEmcReader->getBemcReader();
896 LOG_ERROR <<
"Could not find Barrel Reader "<<endm;
900 if(reader->isTowerPresent())
903 if(RAW->header(BTOWBANK))
904 RAW->deleteBank(BTOWBANK);
905 RAW->createBank(0,BTOWHEADER,BTOWSIZE);
906 for(Int_t i = 0; i<BTOWSIZE ;i++){
907 int crate,sequence,tdc;
915 for(Int_t i = 0; i<BTOWHEADER ;i++){
916 RAW->setHeader(BTOWBANK,i,tower.
TDCHeader[i]);
921 if(reader->isSmdPresent())
924 Int_t NSMD = MAXSMDCRATES;
932 for(Int_t i = 0; i<NSMD; i++)
936 Int_t bank = i+BSMDOFFSET;
937 if(RAW->header(bank))
938 RAW->deleteBank(bank);
939 RAW->createBank(bank,BSMDHEADER,BSMDSIZE);
940 for(Int_t j=0; j<BSMDHEADER; j++)
941 RAW->setHeader(bank,j,smd.
SmdHeader[i][j]);
944 for(Int_t j=0; j<BSMDSIZE; j++){
964 for(Int_t RDO = 0; RDO<4; RDO++)
966 Int_t SMDRDO = RDO+NSMD;
969 Int_t bank = RDO+BPRSOFFSET;
970 if(RAW->header(bank))
971 RAW->deleteBank(bank);
972 RAW->createBank(bank,BPRSHEADER,BPRSSIZE);
973 for(Int_t i = 0; i<BPRSHEADER; i++)
974 RAW->setHeader(bank,i,smd.
SmdHeader[SMDRDO][i]);
977 for(Int_t i = 0; i<BPRSSIZE; i++){
int GetSmdBugCorrectionShift(int id_original, int &shift) const
Returns the index shift for the SMD in original map.
Int_t getCrateStatus(Int_t det, Int_t c)
Return the status of the crate C.
void setCheckStatus(Int_t det, Int_t flag, const char *option="")
Float_t getTotalE(Int_t det)
Return the Total Energy Sum for the detector 'det'.
Bank_BTOWERADCR & getBTOWERADCR()
EMC_Reader destructor.
void emptyEmcCollection(StEmcCollection *)
empty current emcCollection
void printStats(Int_t)
Print statistics for detector 'det'.
int GetTowerCrateFromTDC(int TDC, int &crate) const
Get crate number from TDC channel for towers.
void getGain(Int_t det, Int_t softId, Float_t &gain) const
Return gain correction factor.
Int_t makeHit(StEmcCollection *, Int_t, Int_t, Int_t, Int_t, Int_t, Float_t &)
make StEmcRawHit
void checkHeaders(StEmcRawData *, StEvent *)
Check all BEMC detector headers.
Int_t getBemcADCRaw(Int_t, Int_t, StEmcRawData *, Int_t &, Int_t &)
get ADC from StEmcRawData structure
unsigned short TowerADCArray[4800]
Matrix of ADC's as obtained from daq.
Int_t getNCratesOK(Int_t det)
Return the Total number of good crates for the detector 'det' (only tower)
Int_t getTotalADC(Int_t det)
Return the Total ADC sum for the detector 'det'.
controlADCtoE_st * getControlTable()
Return Control table (NULL)
void clearStats(Int_t)
Clear statistics for detector 'det'.
unsigned short SmdHeader[12][128]
SMDHeader for each fiber.
void getPedestal(Int_t det, Int_t softId, Int_t cap, Float_t &ped, Float_t &rms) const
Return pedestal mean and rms.
void updateStats(Int_t, Int_t, Int_t, Float_t)
Update statistics for detector 'det'.
Int_t getTotalSaved(Int_t det)
Return the Total number of SAVED hits for the detector 'det'.
int GetTowerCrateFromDaqId(int RDO, int &crate, int &sequence) const
Get crate number from Daq Id for towers.
void createDecoder(Int_t, Int_t)
Create new StEmcDecoder.
unsigned short TDCHeader[120]
This is the TDC event header.
unsigned short HasData[12]
1 if there is data for that fiber
int GetPreshowerBugCorrectionShift(int id_original, int &shift) const
Returns the index shift for the preshower in original map.
int GetTowerIdFromDaqId(int RDO, int &softId) const
Get Sofwtare Id from Daq Id for towers.
int GetPsdRDO(int softId, int &RDO, int &posInFiber) const
Get PSD fiber and position from id.
unsigned short SMDADCArray[12][4800]
Matrix of ADC's as obtained from daq.
int GetCrateFromTowerId(int softId, int &crate, int &sequence) const
Get crate number and position in crate for Software Id.
virtual TObject * GetObject() const
The depricated method (left here for the sake of the backward compatibility)
int GetTowerIdFromTDC(int TDC, int sequence, int &softId) const
Get Software Id from TDC channel number and position in TDC for towers.
void getCalib(Int_t det, Int_t softId, Int_t power, Float_t &calib) const
Return calibration constant.
virtual ~StBemcRaw()
StBemcRaw destructor.
Bool_t mPsdMapBug
switch for saving all BTOW hits (used in daq->picoDst production)
void printConf()
Print configuration.
int GetTowerBugCorrectionShift(int id_original, int &shift) const
Returns the index shift for the tower in original map.
Int_t getBin(const Float_t phi, const Float_t eta, Int_t &m, Int_t &e, Int_t &s) const
void getStatus(Int_t det, Int_t softId, Int_t &status, const char *option="") const
Return status.
int GetPsdId(int RDO, int posInFiber, int &softId, bool print=false) const
Get PSD id.
int GetTowerTDCFromCrate(int crate, int &TDC) const
Get TDC channel from crate number for towers.
int GetSmdRDO(int detector, int m, int e, int s, int &RDO, int &posInFiber) const
Get SMD fiber and position from detector number (3==SMDE, 4==SMDP), m, e, s.
int GetDaqIdFromTowerId(int softId, int &RDO) const
Get Daq Id from Software Id for towers.
int GetTDCFromTowerId(int softId, int &TDC) const
Get TDC channel from Software Id.
void checkBtowCrates(StEmcRawData *, StEvent *)
check tower crates