-Bool_t AliITSCalibrationSPD::IsPixelNoisy(Int_t col, Int_t row) const {
- //
- // Check if pixel (col,row) is noisy
- //
- for (UInt_t i=0; i<fNrNoisy; i++) {
- if (fNoisyChannels.At(i*2)==col && fNoisyChannels.At(i*2+1)==row) {
- return true;
+Bool_t AliITSCalibrationSPD::IsPixelBad(Int_t col, Int_t row) const {
+ // Is this pixel bad?
+ if(col<0 || col>159) {AliError("Wrong column number"); return kFALSE;}
+ Int_t chip = GetChipIndexFromCol(col);
+ if (fBadChip[chip]) return kTRUE;
+ for (UInt_t i=0; i<fNrBad; i++) {
+ if (GetBadColAt(i)==col && GetBadRowAt(i)==row) {
+ return kTRUE;
+ }
+ }
+ return kFALSE;
+}
+//______________________________________________________________________
+Int_t AliITSCalibrationSPD::GetChipIndexFromCol(UInt_t col) const {
+ // returns chip index for specific column
+ if(col>=160) {AliWarning("Wrong column number"); return -1;}
+ return col/32;
+}
+//______________________________________________________________________
+void AliITSCalibrationSPD::SetNrBad(UInt_t /*nr*/) {
+ // should not be used anymore !!!
+ AliError("This method should not be used anymore. Use SetNrBadSingle instead!!!");
+}
+//______________________________________________________________________
+void AliITSCalibrationSPD::Streamer(TBuffer &R__b) {
+ // Stream an object of class AliITSCalibrationSPD.
+ UInt_t R__s, R__c;
+ if (R__b.IsReading()) {
+ Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { }
+ AliITSCalibration::Streamer(R__b);
+ if (R__v >= 8) {
+ R__b >> fNrBad;
+ fBadChannels.Streamer(R__b);
+ R__b.ReadStaticArray((bool*)fBadChip);
+ }
+ else {
+ Double_t dummy;
+ R__b >> dummy;
+ R__b >> dummy;
+ R__b >> dummy;
+ R__b >> dummy;
+ R__b >> dummy;
+ R__b >> dummy;
+ R__b >> dummy;
+ R__b >> fNrBad;
+ if (R__v == 7) {
+ fBadChannels.Streamer(R__b);
+ R__b.ReadStaticArray((bool*)fBadChip);
+ }
+ else {
+ if (R__v == 6) {
+ fBadChannels.Streamer(R__b);
+ }
+ else {
+ TArrayI fBadChannelsV1;
+ fBadChannelsV1.Streamer(R__b);
+ fBadChannels.Set(fNrBad*2);
+ for (UInt_t i=0; i<fNrBad*2; i++) {
+ fBadChannels[i] = fBadChannelsV1[i];
+ }
+ }
+ for (UInt_t i=0; i<5; i++) {
+ fBadChip[i]=kFALSE;
+ }
+ }