}
return false;
}
+//___________________________________________________________________________
+Int_t AliITSCalibrationSPD::GetNrBadInColumn(Int_t col) const {
+ //
+ // Count n. of bad in a given column: col. range [0,159]
+ //
+ if(col<0 || col>159) {AliWarning("GetNrBadInColumn: wrong column number"); return -1;}
+ Int_t bad=0;
+ for (UInt_t i=0; i<fNrBad; i++) if (fBadChannels.At(i*2)==col) bad++;
+ return bad;
+}
+//___________________________________________________________________________
+Int_t AliITSCalibrationSPD::GetNrBadInChip(Int_t chip) const {
+ //
+ // Count n. of bad in a given chip: chip range [0,4]
+ //
+ if(chip<0 || chip>4) {AliWarning("GetNrBadInChip: wrong chip number"); return -1;}
+ Int_t bad=0;
+ for (Int_t col=32*chip; col<32*(chip+1); col++) bad+=GetNrBadInColumn(col);
+ return bad;
+}
void AddBad(UInt_t col, UInt_t row);
Int_t GetNrBad() const {return fNrBad;}
+ Int_t GetNrBadInChip(Int_t chip) const ;
+ Int_t GetNrBadInColumn(Int_t col) const ;
Int_t GetBadColAt(UInt_t index); //returns -1 if out of bounds
Int_t GetBadRowAt(UInt_t index); //returns -1 if out of bounds
void ClearBad() {fBadChannels.Reset(); fNrBad=0;}
void SetBadList(TArrayI badlist) {fBadChannels=badlist;}
void SetNrBad(UInt_t nr) {fNrBad=nr;}
virtual Bool_t IsBad() const {return (GetNrBad()==256*160);};
+ virtual Bool_t IsChipBad(Int_t chip) const {return (GetNrBadInChip(chip)==256*32);};
+ Bool_t IsColumnBad(Int_t col) const {return (GetNrBadInColumn(col)==256);};
protected:
// static const Double_t fgkDiffCoeffDefault; //default for fDiffCoeff