70 #ifndef STAR_StBemcRaw
71 #define STAR_StBemcRaw
75 #include "StEmcUtil/database/StBemcTables.h"
77 #include "tables/St_controlADCtoE_Table.h"
80 #include "StChain/StRTSBaseMaker.h"
90 enum {kZero, kCrate, kStatus, kRms, kPed, kEn, kCalib, kOK};
93 TH2F* mBarrelNHitHist;
94 TH2F* mBarrelEtotHist;
95 TH2F* mBarrelAdcSumHist;
96 TH2F* mBarrelNCratesHist;
97 TH2F* mBarrelCrateStatusHist;
98 TH2F* mBarrelQAHisto[MAXDETBARREL];
102 controlADCtoE_st* mControlADCtoE;
104 Bool_t mSaveAllStEvent;
114 Int_t mNZ[MAXDETBARREL];
115 Int_t mNCRATE[MAXDETBARREL];
116 Int_t mNSTATUS[MAXDETBARREL];
117 Int_t mNRMS[MAXDETBARREL];
118 Int_t mNPED[MAXDETBARREL];
119 Int_t mNOK[MAXDETBARREL];
120 Int_t mNTOTAL[MAXDETBARREL];
121 Int_t mADCSUM[MAXDETBARREL];
122 Int_t mNCRATESOK[MAXDETBARREL];
123 Float_t mTOTALE[MAXDETBARREL];
124 Int_t mCrateStatus[MAXDETBARREL][MAXCRATES];
125 Bool_t mIsCorrupted[MAXDETBARREL];
126 Int_t mCheckStatus[MAXDETBARREL][4];
128 Bool_t mAnyCorrupted;
151 Bool_t isCorrupted(Int_t det)
153 return mIsCorrupted[det-1];
159 void setCheckStatus(Int_t det, Int_t flag,
const char* option =
"");
160 void setCrateVeto(Int_t flag);
217 return mControlADCtoE;
222 return mCrateStatus[det-1][c-1];
226 return mNTOTAL[det-1];
234 return mADCSUM[det-1];
238 return mTOTALE[det-1];
242 return mNRMS[det-1]+mNPED[det-1];
250 return mNSTATUS[det-1];
254 return mNCRATE[det-1];
258 return mNCRATESOK[det-1];
void psdMapBug2(Bool_t a)
Set to ktrue to correct PSD swaps in 2006 and 2007 data.
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'.
void emptyEmcCollection(StEmcCollection *)
empty current emcCollection
void printStats(Int_t)
Print statistics for detector 'det'.
Int_t getRejectStatus(Int_t det)
Return the Total number of hits rejected because of STATUS issues for the detector 'det'...
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 getRejectPed(Int_t det)
Return the Total number of hits rejected by pedestal issues for the detector 'det'.
Int_t getBemcADCRaw(Int_t, Int_t, StEmcRawData *, Int_t &, Int_t &)
get ADC from StEmcRawData structure
Int_t getNCratesOK(Int_t det)
Return the Total number of good crates for the detector 'det' (only tower)
void saveAllBTOW(Bool_t a)
Set to kTRUE if all BTOW hits are to be saved on StEvent (for picoDst/triggerSimu) ...
void smdMapBug(Bool_t a)
Set to ktrue to correct SMD swaps.
void setProdVer(string prodVer)
Set event date.
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'.
StBemcTables * getTables()
Return the StBemcTable pointer.
void setDate(Int_t d)
Set event date.
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'.
void createDecoder(Int_t, Int_t)
Create new StEmcDecoder.
StEmcDecoder * getDecoder()
Return the StEmcDecoder pointer.
Int_t getTotalHits(Int_t det)
Return the Total number of hits for the detector 'det'.
void psdMapBug(Bool_t a)
Set to ktrue to correct PSD map inthe P04* productions.
void towerMapBug(Bool_t a)
Set to ktrue to correct for the tower map bug (only runs before 2006)
virtual ~StBemcRaw()
StBemcRaw destructor.
Bool_t mPsdMapBug
switch for saving all BTOW hits (used in daq->picoDst production)
void saveAllStEvent(Bool_t a)
Set to kTRUE if all hits are to be saved on StEvent.
void printConf()
Print configuration.
Int_t getRejectZero(Int_t det)
Return the Total number of hits rejected because of zero ADC for the detector 'det'.
Int_t getRejectCrate(Int_t det)
Return the Total number of hits rejected because of BAD crates for the detector 'det' (only tower) ...
void setTime(Int_t t)
Set event time.
StBemcRaw()
StBemcRaw constructor.
void checkBtowCrates(StEmcRawData *, StEvent *)
check tower crates