18 #include "StSvtHybridBadAnodes.hh"
20 StSvtHybridBadAnodes::StSvtHybridBadAnodes()
24 for (
int i=0;i<MAX_NUMBER_OF_ANODES;i++) {
26 mOverloadedAdc[i] = 0;
33 StSvtHybridBadAnodes::StSvtHybridBadAnodes(
int barrel,
int ladder,
int wafer,
int hybrid) :
38 for (
int i=0;i<MAX_NUMBER_OF_ANODES;i++) {
40 mOverloadedAdc[i] = 0;
47 StSvtHybridBadAnodes::~StSvtHybridBadAnodes()
50 void StSvtHybridBadAnodes::setBadAnode(
int anode)
52 if (!mBadAnode[anode-1]) {
53 mBadAnode[anode-1] = kTRUE;
58 void StSvtHybridBadAnodes::setNotBadAnode(
int anode)
60 if (mBadAnode[anode-1]) {
61 mBadAnode[anode-1] = kFALSE;
66 Bool_t StSvtHybridBadAnodes::isBadAnode(
int anode)
68 return mBadAnode[anode-1];
71 void StSvtHybridBadAnodes::addOverloadedAdc(
int anode, Bool_t isBad,
int nEvents)
74 mOverloadedAdc[anode-1] = (mOverloadedAdc[anode-1]*(nEvents-1) + 1)/nEvents;
78 mOverloadedAdc[anode-1] = (mOverloadedAdc[anode-1]*(nEvents-1))/nEvents;
81 void StSvtHybridBadAnodes::addNullAdc(
int anode, Bool_t isBad,
int nEvents)
84 mNullAdc[anode-1] = (mNullAdc[anode-1]*(nEvents-1) + 1)/nEvents;
88 mNullAdc[anode-1] = (mNullAdc[anode-1]*(nEvents-1))/nEvents;
91 void StSvtHybridBadAnodes::addHighOccup(
int anode, Bool_t isBad,
int nEvents)
94 mHighOccup[anode-1] = (mHighOccup[anode-1]*(nEvents-1) + 1)/nEvents;
98 mHighOccup[anode-1] = (mHighOccup[anode-1]*(nEvents-1))/nEvents;
101 void StSvtHybridBadAnodes::addBadRMS(
int anode, Bool_t isBad,
int nEvents)
104 mBadRMS[anode-1] = (mBadRMS[anode-1]*(nEvents-1) + 1)/nEvents;
108 mBadRMS[anode-1] = (mBadRMS[anode-1]*(nEvents) + 1)/nEvents;
111 void StSvtHybridBadAnodes::reset()
115 for (
int i=0;i<MAX_NUMBER_OF_ANODES;i++) {
117 mOverloadedAdc[i] = 0;