]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSOnlineCalibrationSPDhandler.cxx
Mainly changes related to the added treatment of inactive detector parts in
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineCalibrationSPDhandler.cxx
index 6887f0ab0171a62fef4f636b278d3e23b7733327..fdedb537d3d213f2f2f797edc0e54f093f7f5d74 100644 (file)
@@ -2,6 +2,10 @@
 // Author: Henrik Tydesjo                                           //
 // For easier handling of dead and noisy pixels they are kept in    //
 // container maps (AliITSIntMap).                                   //
+// Handling of inactive equipments,HSs,chips have been added.       //
+// A pixel that is either dead or inactive is called SILENT here.   //
+// The lists of single dead and noisy pixels are separated from the //
+// information about which eq/hs/chip are inactive.                 //
 // The TArrayS objects that are put in the AliITSCalibrationSPD     //
 // objects can be obtained from the methods GetDeadArray and        //
 // GetNoisyArray.                                                   //
@@ -33,9 +37,11 @@ AliITSOnlineCalibrationSPDhandler::AliITSOnlineCalibrationSPDhandler():
     fNrDead[gloChip]=0;
     fNrNoisy[gloChip]=0;
     fDeadPixelMap[gloChip] = new AliITSIntMap();
-    fNoisyPixelMap[gloChip] = new AliITSIntMap();
+    fNoisyPixelMap[gloChip] = new AliITSIntMap();    
   }
+  ActivateALL();
 }
+//____________________________________________________________________________________________
 AliITSOnlineCalibrationSPDhandler::AliITSOnlineCalibrationSPDhandler(const AliITSOnlineCalibrationSPDhandler& handle): 
   fFileLocation(".")
 {
@@ -46,8 +52,18 @@ AliITSOnlineCalibrationSPDhandler::AliITSOnlineCalibrationSPDhandler(const AliIT
     fDeadPixelMap[gloChip] = handle.fDeadPixelMap[gloChip]->Clone();
     fNoisyPixelMap[gloChip] = handle.fNoisyPixelMap[gloChip]->Clone();
   }
+  for (UInt_t eq=0; eq<20; eq++) {
+    fActiveEq[eq] = handle.fActiveEq[eq];
+    for (UInt_t hs=0; hs<6; hs++) {
+      fActiveHS[eq][hs] = handle.fActiveHS[eq][hs];
+      for (UInt_t chip=0; chip<10; chip++) {
+       fActiveChip[eq][hs][chip] = handle.fActiveChip[eq][hs][chip];
+      }
+    }
+  }
   fFileLocation = handle.fFileLocation;
 }
+//____________________________________________________________________________________________
 AliITSOnlineCalibrationSPDhandler::~AliITSOnlineCalibrationSPDhandler() {
   //  ClearMaps();
   for (UInt_t gloChip=0; gloChip<1200; gloChip++) {
@@ -55,6 +71,7 @@ AliITSOnlineCalibrationSPDhandler::~AliITSOnlineCalibrationSPDhandler() {
     delete fNoisyPixelMap[gloChip];
   }
 }
+//____________________________________________________________________________________________
 AliITSOnlineCalibrationSPDhandler& AliITSOnlineCalibrationSPDhandler::operator=(const AliITSOnlineCalibrationSPDhandler& handle) {
   // assignment operator
   if (this!=&handle) {
@@ -65,6 +82,15 @@ AliITSOnlineCalibrationSPDhandler& AliITSOnlineCalibrationSPDhandler::operator=(
       fDeadPixelMap[gloChip] = handle.fDeadPixelMap[gloChip]->Clone();
       fNoisyPixelMap[gloChip] = handle.fNoisyPixelMap[gloChip]->Clone();
     }
+    for (UInt_t eq=0; eq<20; eq++) {
+      fActiveEq[eq] = handle.fActiveEq[eq];
+      for (UInt_t hs=0; hs<6; hs++) {
+       fActiveHS[eq][hs] = handle.fActiveHS[eq][hs];
+       for (UInt_t chip=0; chip<10; chip++) {
+         fActiveChip[eq][hs][chip] = handle.fActiveChip[eq][hs][chip];
+       }
+      }
+    }
     fFileLocation = handle.fFileLocation;
   }
   return *this;
@@ -74,14 +100,17 @@ void AliITSOnlineCalibrationSPDhandler::ClearMaps() {
   // clear the lists of dead and noisy
   ResetDead();
   ResetNoisy();
+  ActivateALL();
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::ResetDead() {
-  // reset the dead pixel map
+  // reset the dead pixel map and inactive eq,hs,chip
   for (UInt_t gloChip=0; gloChip<1200; gloChip++) {
     fNrDead[gloChip]=0;
     fDeadPixelMap[gloChip]->Clear();
   }
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::ResetNoisy() {
   // clear the list of noisy pixels
   for (UInt_t gloChip=0; gloChip<1200; gloChip++) {
@@ -89,6 +118,7 @@ void AliITSOnlineCalibrationSPDhandler::ResetNoisy() {
     fNoisyPixelMap[gloChip]->Clear();
   }
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::ResetDeadForChip(UInt_t eq, UInt_t hs, UInt_t chip) {
   // clear the dead pixels for this chip
   UInt_t gloChip = GetGloChip(eq,hs,chip);
@@ -101,6 +131,7 @@ void AliITSOnlineCalibrationSPDhandler::ResetDeadForChip(UInt_t eq, UInt_t hs, U
     }
   }
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::ResetNoisyForChip(UInt_t eq, UInt_t hs, UInt_t chip) {
   // clear the noisy pixels for this chip
   UInt_t gloChip = GetGloChip(eq,hs,chip);
@@ -117,6 +148,7 @@ void AliITSOnlineCalibrationSPDhandler::ResetNoisyForChip(UInt_t eq, UInt_t hs,
     }
   }
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::ResetDeadForEq(UInt_t eq) {
   // clear the dead pixels for this eq
   if (eq>=20) {
@@ -129,6 +161,7 @@ void AliITSOnlineCalibrationSPDhandler::ResetDeadForEq(UInt_t eq) {
     }
   }
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::ResetNoisyForEq(UInt_t eq) {
   // clear the noisy pixels for this eq
   if (eq>=20) {
@@ -141,45 +174,56 @@ void AliITSOnlineCalibrationSPDhandler::ResetNoisyForEq(UInt_t eq) {
     }
   }
 }
+
+
 //____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::ReadFromFiles() {
-  // read dead and noisy files from file location. returns true if at least one file found
+  // read files from file location (active,dead,noisy info). returns true if at least one file found
   Bool_t b1 = ReadNoisyFromFiles();
-  Bool_t b2 = ReadDeadFromFiles();
-  return (b1 && b2);
+  Bool_t b2 = ReadSilentFromFiles();
+  return (b1 || b2);
 }
-
-Bool_t AliITSOnlineCalibrationSPDhandler::ReadDeadFromFiles() {
-  // read dead files from file location. returns true if at least one file found
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::ReadSilentFromFiles() {
+  // read dead,active files from file location. returns true if at least one file found
   Bool_t returnval=kFALSE;
   for (UInt_t eq=0; eq<20; eq++) {
-    if (ReadDeadFromFile(eq)) {
+    if (ReadSilentFromFile(eq)) {
       returnval=kTRUE;
     }
   }
   return returnval;
 }
-Bool_t AliITSOnlineCalibrationSPDhandler::ReadNoisyFromFiles() {
-  // read noisy files from file location. returns true if at least one file found
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::ReadDeadFromFiles() {
+  // read dead,active files from file location. returns true if at least one file found
   Bool_t returnval=kFALSE;
   for (UInt_t eq=0; eq<20; eq++) {
-    if (ReadNoisyFromFile(eq)) {
+    if (ReadDeadFromFile(eq)) {
       returnval=kTRUE;
     }
   }
   return returnval;
 }
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::ReadSilentFromFile(UInt_t eq) {
+  // read dead file for eq from file location. 
+  TString fileName = Form("%s/SPD_Dead_%d.root",fFileLocation.Data(),eq);
+  return ReadSilentFromFileName(fileName.Data());
+}
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::ReadDeadFromFile(UInt_t eq) {
-  // read dead file for module from file location. 
+  // read dead file for eq from file location. 
   TString fileName = Form("%s/SPD_Dead_%d.root",fFileLocation.Data(),eq);
   return ReadDeadFromFileName(fileName.Data());
 }
-Bool_t AliITSOnlineCalibrationSPDhandler::ReadNoisyFromFile(UInt_t eq) {
-  // read noisy file for module from file location. 
-  TString fileName = Form("%s/SPD_Noisy_%d.root",fFileLocation.Data(),eq);
-  return ReadNoisyFromFileName(fileName.Data());
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::ReadSilentFromFileName(const char *fileName) {
+  // read dead from file fileName (including inactive)
+  return ReadDeadFromFileName(fileName, kTRUE);
 }
-Bool_t AliITSOnlineCalibrationSPDhandler::ReadDeadFromFileName(const char *fileName) {
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::ReadDeadFromFileName(const char *fileName, Bool_t inactive) {
   // read dead from file fileName
   AliITSOnlineCalibrationSPD* calib;
   FILE* fp0 = fopen(fileName, "r");
@@ -201,11 +245,42 @@ Bool_t AliITSOnlineCalibrationSPDhandler::ReadDeadFromFileName(const char *fileN
          UInt_t row = GetRowFromKey(key);
          SetDeadPixel(eq,hs,chip,col,row);
        }
+       if (inactive) {
+         UInt_t eq = calib->GetEqNr();
+         if (calib->IsActiveEq()) ActivateEq(eq);
+         else                     ActivateEq(eq,kFALSE);
+         for (UInt_t hs=0; hs<6; hs++) {
+           if (calib->IsActiveHS(hs)) ActivateHS(eq,hs);
+           else                       ActivateHS(eq,hs,kFALSE);
+           for (UInt_t chip=0; chip<10; chip++) {
+             if (calib->IsActiveChip(hs,chip)) ActivateChip(eq,hs,chip);
+             else                              ActivateChip(eq,hs,chip,kFALSE);
+           }
+         }
+       }
       }
     }
   }
   return kTRUE;
 }
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::ReadNoisyFromFiles() {
+  // read noisy files from file location. returns true if at least one file found
+  Bool_t returnval=kFALSE;
+  for (UInt_t eq=0; eq<20; eq++) {
+    if (ReadNoisyFromFile(eq)) {
+      returnval=kTRUE;
+    }
+  }
+  return returnval;
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::ReadNoisyFromFile(UInt_t eq) {
+  // read noisy file for eq from file location. 
+  TString fileName = Form("%s/SPD_Noisy_%d.root",fFileLocation.Data(),eq);
+  return ReadNoisyFromFileName(fileName.Data());
+}
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::ReadNoisyFromFileName(const char *fileName) {
   // read noisy from file fileName
   AliITSOnlineCalibrationSPD* calib;
@@ -233,6 +308,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::ReadNoisyFromFileName(const char *file
   }
   return kTRUE;
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::ReadDeadFromText(const char *fileName, UInt_t module) {
   // read dead from a text file (lines with eq,hs,chip,col,row). returns nr of pixels added (not already here)
   // insert only those pixels that belong to module (or all if module=240). 
@@ -261,6 +337,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::ReadDeadFromText(const char *fileName,
   }
   return newNrDead;
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::ReadNoisyFromText(const char *fileName, UInt_t module) {
   // read noisy from a text file (lines with eq,hs,chip,col,row). returns nr of pixels added (not already here)
   // insert only those pixels that belong to module (or all if module=240). 
@@ -291,28 +368,51 @@ UInt_t AliITSOnlineCalibrationSPDhandler::ReadNoisyFromText(const char *fileName
 }
 //____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::WriteToFilesAlways() {
-  // write the lists of dead and noisy to files
+  // write the lists of active,dead,noisy to files
   for (UInt_t eq=0; eq<20; eq++) {
-    WriteDeadToFile(eq);
+    WriteSilentToFile(eq);
     WriteNoisyToFile(eq);
   }
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::WriteToFiles() {
   // write the lists of dead and noisy to files (only if there are >0 dead or noisy pixels) , returns nr of files produced
-  return (WriteNoisyToFiles() + WriteDeadToFiles());
+  return (WriteNoisyToFiles() + WriteSilentToFiles());
+}
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::WriteSilentToFilesAlways() {
+  // write the lists of silent to files
+  for (UInt_t eq=0; eq<20; eq++) {
+      WriteSilentToFile(eq);
+  }
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::WriteDeadToFilesAlways() {
   // write the lists of dead to files
   for (UInt_t eq=0; eq<20; eq++) {
       WriteDeadToFile(eq);
   }
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::WriteNoisyToFilesAlways() {
   // write the lists of noisy to files
   for (UInt_t eq=0; eq<20; eq++) {
     WriteNoisyToFile(eq);
   }
 }
+//____________________________________________________________________________________________
+UInt_t AliITSOnlineCalibrationSPDhandler::WriteSilentToFiles() {
+  // write the list of silent to file (only if there are >0 silent pixels) , returns nr of files produced
+  UInt_t nrFiles=0;
+  for (UInt_t eq=0; eq<20; eq++) {
+    if (GetNrSilentEq(eq) > 0) {
+      WriteSilentToFile(eq);
+      nrFiles++;
+    }
+  }
+  return nrFiles;
+}
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::WriteDeadToFiles() {
   // write the list of dead to file (only if there are >0 dead pixels) , returns nr of files produced
   UInt_t nrFiles=0;
@@ -324,6 +424,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::WriteDeadToFiles() {
   }
   return nrFiles;
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::WriteNoisyToFiles() {
   // write the list of noisy to file (only if there are >0 noisy pixels) , returns nr of files produced
   UInt_t nrFiles=0;
@@ -335,20 +436,38 @@ UInt_t AliITSOnlineCalibrationSPDhandler::WriteNoisyToFiles() {
   }
   return nrFiles;
 }
-void AliITSOnlineCalibrationSPDhandler::WriteDeadToFile(UInt_t eq) {
-  // write the lists of dead and noisy for module to file
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::WriteSilentToFile(UInt_t eq) {
+  WriteDeadToFile(eq,kTRUE);
+}
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::WriteDeadToFile(UInt_t eq, Bool_t inactive) {
+  // write the lists of dead (and inactive if input boolean is true) for eq to file
   AliITSOnlineCalibrationSPD* calib = new AliITSOnlineCalibrationSPD();
   calib->SetEqNr(eq);
   calib->SetBadList(GetDeadArrayOnline(eq));
   calib->SetNrBad(GetNrDeadEq(eq));
+  if (inactive) {
+    if (IsActiveEq(eq)) calib->ActivateEq();
+    else                calib->ActivateEq(kFALSE);
+    for (UInt_t hs=0; hs<6; hs++) {
+      if (IsActiveHS(eq,hs)) calib->ActivateHS(hs);
+      else                   calib->ActivateHS(hs,kFALSE);
+      for (UInt_t chip=0; chip<10; chip++) {
+       if (IsActiveChip(eq,hs,chip)) calib->ActivateChip(hs,chip);
+       else                          calib->ActivateChip(hs,chip,kFALSE);
+      }
+    }
+  }
   TString fileName = Form("%s/SPD_Dead_%d.root",fFileLocation.Data(),eq);
   TFile file(fileName.Data(), "RECREATE");
   file.WriteTObject(calib, "AliITSOnlineCalibrationSPD");
   file.Close();
   delete calib;
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::WriteNoisyToFile(UInt_t eq) {
-  // write the lists of noisy and noisy for module to file
+  // write the lists of noisy for eq to file
   AliITSOnlineCalibrationSPD* calib = new AliITSOnlineCalibrationSPD();
   calib->SetEqNr(eq);
   calib->SetBadList(GetNoisyArrayOnline(eq));
@@ -394,6 +513,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::ReadDeadModuleFromDB(UInt_t module, In
   spdEntry->Clear();
   return kTRUE;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::ReadNoisyModuleFromDB(UInt_t module, Int_t runNr, Bool_t treeSerial) {
   // reads noisy pixels from DB for given module and runNr
   AliCDBManager* man = AliCDBManager::Instance();
@@ -427,11 +547,13 @@ Bool_t AliITSOnlineCalibrationSPDhandler::ReadNoisyModuleFromDB(UInt_t module, I
   spdEntry->Clear();
   return kTRUE;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::ReadFromDB(Int_t runNr, Bool_t treeSerial) {
   // reads dead and noisy pixels from DB for given runNr
   // note that you may want to clear the lists (if they are not empty) before reading
   return (ReadNoisyFromDB(runNr,treeSerial) && ReadDeadFromDB(runNr,treeSerial));
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::ReadDeadFromDB(Int_t runNr, Bool_t treeSerial) {
   // reads dead pixels from DB for given runNr
   // note that you may want to clear the list (if it is not empty) before reading
@@ -469,6 +591,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::ReadDeadFromDB(Int_t runNr, Bool_t tre
   spdEntry->Clear();
   return kTRUE;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::ReadNoisyFromDB(Int_t runNr, Bool_t treeSerial) {
   // reads noisy pixels from DB for given runNr
   // note that you may want to clear the list (if it is not empty) before reading
@@ -509,6 +632,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::ReadNoisyFromDB(Int_t runNr, Bool_t tr
   spdEntry->Clear();
   return kTRUE;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::ReadDeadFromCalibObj(TObjArray* calObj) {
   // reads dead pixels from calib object
   for (UInt_t module=0; module<240; module++) {
@@ -520,6 +644,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::ReadDeadFromCalibObj(TObjArray* calObj
   }
   return kTRUE;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::ReadNoisyFromCalibObj(TObjArray* calObj) {
   // reads noisy pixels from calib object
   for (UInt_t module=0; module<240; module++) {
@@ -531,11 +656,13 @@ Bool_t AliITSOnlineCalibrationSPDhandler::ReadNoisyFromCalibObj(TObjArray* calOb
   }
   return kTRUE;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::WriteToDB(Int_t runNrStart, Int_t runNrEnd) {
   // writes dead and noisy pixels to DB for given runNrs
   // overwrites any previous entries
   return (WriteNoisyToDB(runNrStart,runNrEnd) && WriteDeadToDB(runNrStart,runNrEnd));
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::WriteDeadToDB(Int_t runNrStart, Int_t runNrEnd) {
   // writes dead pixels to DB for given runNrs
   // overwrites any previous entries
@@ -564,8 +691,8 @@ Bool_t AliITSOnlineCalibrationSPDhandler::WriteDeadToDB(Int_t runNrStart, Int_t
     spdEntry->Add(calObj);
   }
   for(UInt_t module=0; module<240; module++){
-    ((AliITSCalibrationSPD*) spdEntry->At(module)) -> SetNrBad( GetNrDead(module) );
-    ((AliITSCalibrationSPD*) spdEntry->At(module)) -> SetBadList( GetDeadArray(module) );
+    ((AliITSCalibrationSPD*) spdEntry->At(module)) -> SetNrBad( GetNrSilent(module) );
+    ((AliITSCalibrationSPD*) spdEntry->At(module)) -> SetBadList( GetSilentArray(module) );
   }
   AliCDBEntry* cdbEntry = new AliCDBEntry((TObject*)spdEntry,idCalSPD,metaData);
   man->Put(cdbEntry);
@@ -574,6 +701,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::WriteDeadToDB(Int_t runNrStart, Int_t
   delete metaData;
   return kTRUE;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::WriteNoisyToDB(Int_t runNrStart, Int_t runNrEnd) {
   // writes noisy pixels to DB for given runNrs
   // overwrites any previous entries
@@ -621,9 +749,9 @@ void AliITSOnlineCalibrationSPDhandler::RecursiveInsertDead(AliITSCalibrationSPD
   RecursiveInsertDead(calibSPD,module,lowInd,thisInd-1);
   RecursiveInsertDead(calibSPD,module,thisInd+1,highInd);
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::RecursiveInsertNoisy(AliITSCalibrationSPD* calibSPD, UInt_t module, Int_t lowInd, Int_t highInd) {
   // inserts noisy pixels recursively, used when reading from db
-  printf("Rec mod %d : %d,%d\n",module,lowInd,highInd);
   if (lowInd>highInd) return;
   Int_t thisInd = lowInd+(highInd-lowInd)/2;
   SetNoisyPixelM(module,calibSPD->GetBadColAt(thisInd),calibSPD->GetBadRowAt(thisInd));
@@ -659,6 +787,70 @@ void AliITSOnlineCalibrationSPDhandler::GenerateDCSConfigFile(const Char_t* file
   dcsfile.close();
 }
 //____________________________________________________________________________________________
+TArrayS AliITSOnlineCalibrationSPDhandler::GetSilentArray(UInt_t module, Bool_t treeSerial) {
+  // get a TArrayS of the silent=dead+inactive pixels (format for the AliITSCalibrationSPD object)
+  TArrayS returnArray;
+
+  UInt_t eq = GetEqIdFromOffline(module);
+  UInt_t hs = GetHSFromOffline(module);
+  UInt_t size=0;
+  if ( !( IsActiveEq(eq) && IsActiveHS(eq,hs) ) ) {
+    size = 8192*5;
+  }
+  else {
+    for (UInt_t ch=0; ch<5; ch++) {
+      UInt_t chip = GetChipFromOffline(module,ch*32);
+      if (!(IsActiveChip(eq,hs,chip))) {
+       size += 8192;
+      }
+      else {
+       UInt_t gloChip = GetGloChip(eq,hs,chip);
+       size += fNrDead[gloChip];
+      }
+    }
+  }
+  returnArray.Set(size*2);
+
+  UInt_t gloIndex=0;
+  if ( !( IsActiveEq(eq) && IsActiveHS(eq,hs) ) ) {
+    for (UInt_t colM=0; colM<160; colM++) {
+      for (UInt_t rowM=0; rowM<256; rowM++) {
+       returnArray.AddAt(colM,gloIndex*2);
+       returnArray.AddAt(rowM,gloIndex*2+1);
+       gloIndex++;
+      }
+    }
+  }
+  else {
+    for (UInt_t ch=0; ch<5; ch++) {
+      UInt_t chip = GetChipFromOffline(module,ch*32);
+      if (!(IsActiveChip(eq,hs,chip))) {
+       for (UInt_t colM=ch*32; colM<ch*32+32; colM++) {
+         for (UInt_t rowM=0; rowM<256; rowM++) {
+           returnArray.AddAt(colM,gloIndex*2);
+           returnArray.AddAt(rowM,gloIndex*2+1);
+           gloIndex++;
+         }
+       }
+      }
+      else {
+       UInt_t gloChip = GetGloChip(eq,hs,chip);
+       if (treeSerial) fDeadPixelMap[gloChip]->PrepareSerialize(); // for tree ordered values
+       else fDeadPixelMap[gloChip]->PrepareSerializeOrdered(); // for key ordered values
+       for (UInt_t index=0; index<fNrDead[gloChip]; index++) {
+         Int_t key = fDeadPixelMap[gloChip]->GetKeyIndex(index);
+         Int_t colM = GetColMFromKey(key);
+         Int_t rowM = GetRowMFromKey(key);
+         returnArray.AddAt(colM,gloIndex*2);
+         returnArray.AddAt(rowM,gloIndex*2+1);
+         gloIndex++;
+       }
+      }
+    }
+  }
+  return returnArray;
+}
+//____________________________________________________________________________________________
 TArrayS AliITSOnlineCalibrationSPDhandler::GetDeadArray(UInt_t module, Bool_t treeSerial) {
   // get a TArrayS of the dead pixels (format for the AliITSCalibrationSPD object)
   TArrayS returnArray;
@@ -666,14 +858,14 @@ TArrayS AliITSOnlineCalibrationSPDhandler::GetDeadArray(UInt_t module, Bool_t tr
   UInt_t eq = GetEqIdFromOffline(module);
   UInt_t hs = GetHSFromOffline(module);
   UInt_t size=0;
-  for (UInt_t chip=0; chip<5; chip++) {
-    UInt_t gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,chip*32));
+  for (UInt_t ch=0; ch<5; ch++) {
+    UInt_t gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,ch*32));
     size += fNrDead[gloChip];
   }
   returnArray.Set(size*2);
   UInt_t gloIndex=0;
-  for (UInt_t chip=0; chip<5; chip++) {
-    UInt_t gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,chip*32));
+  for (UInt_t ch=0; ch<5; ch++) {
+    UInt_t gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,ch*32));
     if (treeSerial) fDeadPixelMap[gloChip]->PrepareSerialize(); // for tree ordered values
     else fDeadPixelMap[gloChip]->PrepareSerializeOrdered(); // for key ordered values
     for (UInt_t index=0; index<fNrDead[gloChip]; index++) {
@@ -687,6 +879,7 @@ TArrayS AliITSOnlineCalibrationSPDhandler::GetDeadArray(UInt_t module, Bool_t tr
   }
   return returnArray;
 }
+//____________________________________________________________________________________________
 TArrayS AliITSOnlineCalibrationSPDhandler::GetNoisyArray(UInt_t module, Bool_t treeSerial) {
   // get a TArrayS of the noisy pixels (format for the AliITSCalibrationSPD object)
   TArrayS returnArray;
@@ -694,14 +887,14 @@ TArrayS AliITSOnlineCalibrationSPDhandler::GetNoisyArray(UInt_t module, Bool_t t
   UInt_t eq = GetEqIdFromOffline(module);
   UInt_t hs = GetHSFromOffline(module);
   UInt_t size=0;
-  for (UInt_t chip=0; chip<5; chip++) {
-    UInt_t gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,chip*32));
+  for (UInt_t ch=0; ch<5; ch++) {
+    UInt_t gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,ch*32));
     size += fNrNoisy[gloChip];
   }
   returnArray.Set(size*2);
   UInt_t gloIndex=0;
-  for (UInt_t chip=0; chip<5; chip++) {
-    UInt_t gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,chip*32));
+  for (UInt_t ch=0; ch<5; ch++) {
+    UInt_t gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,ch*32));
     if (treeSerial) fNoisyPixelMap[gloChip]->PrepareSerialize(); // for tree ordered values
     else fNoisyPixelMap[gloChip]->PrepareSerializeOrdered(); // for key ordered values
     for (UInt_t index=0; index<fNrNoisy[gloChip]; index++) {
@@ -715,6 +908,7 @@ TArrayS AliITSOnlineCalibrationSPDhandler::GetNoisyArray(UInt_t module, Bool_t t
   }
   return returnArray;
 }
+//____________________________________________________________________________________________
 TArrayI AliITSOnlineCalibrationSPDhandler::GetDeadArrayOnline(UInt_t eq) {
   // get a TArrayI of the dead pixels (format for the AliITSOnlineCalibrationSPD object)
   TArrayI returnArray;
@@ -742,6 +936,7 @@ TArrayI AliITSOnlineCalibrationSPDhandler::GetDeadArrayOnline(UInt_t eq) {
   }
   return returnArray;
 }
+//____________________________________________________________________________________________
 TArrayI AliITSOnlineCalibrationSPDhandler::GetNoisyArrayOnline(UInt_t eq) {
   // get a TArrayI of the noisy pixels (format for the AliITSOnlineCalibrationSPD object)
   TArrayI returnArray;
@@ -776,11 +971,96 @@ void AliITSOnlineCalibrationSPDhandler::PrintEqSummary() {
   printf("Eq summary:\n");
   printf("-----------\n");
   for (UInt_t eq=0; eq<20; eq++) {
-    printf("Eq %*d: %*d dead , %*d noisy\n",2,eq,5,GetNrDeadEq(eq),5,GetNrNoisyEq(eq));
+    printf("Eq %*d: %*d silent(dead+inactive) , %*d dead , %*d noisy\n",2,eq,5,GetNrSilentEq(eq),5,GetNrDeadEq(eq),5,GetNrNoisyEq(eq));
   }
 }
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::PrintSilent() const {
+  // print the inactive and dead pixels to screen
+  printf("------------------------------------------------------\n");
+  printf("Inactive Equipments: (eq  |  module1 .. module12)\n");
+  printf("------------------------------------------------------\n");
+  for (UInt_t eq=0; eq<20; eq++) {
+    if (!IsActiveEq(eq)) {
+      printf("%*d  |  ",2,eq);
+      for (UInt_t hs=0; hs<6; hs++) {
+       for (UInt_t chip=0; chip<10; chip+=5) {
+         UInt_t module = AliITSRawStreamSPD::GetOfflineModuleFromOnline(eq,hs,chip);
+         if (hs>0 || chip==5) printf(",");
+         printf("%*d",3,module);
+       }
+      }
+      printf("\n");
+    }
+  }
+
+  printf("------------------------------------------------------\n");
+  printf("Inactive Half-staves: (eq,hs  |  module1,module2)\n");
+  printf("------------------------------------------------------\n");
+  for (UInt_t eq=0; eq<20; eq++) {
+    if (IsActiveEq(eq)) {
+      for (UInt_t hs=0; hs<6; hs++) {
+       if (!IsActiveHS(eq,hs)) {
+         printf("%*d,%*d  |  ",2,eq,1,hs);
+         for (UInt_t chip=0; chip<10; chip+=5) {
+           UInt_t module = AliITSRawStreamSPD::GetOfflineModuleFromOnline(eq,hs,chip);
+           if (chip==5) printf(",");
+           printf("%*d",3,module);
+         }
+         printf("\n");
+       }
+      }
+    }
+  }
+
+  printf("------------------------------------------------------\n");
+  printf("Inactive Chips: (eq,hs,chip  |  module,colM1-colM2)\n");
+  printf("------------------------------------------------------\n");
+  for (UInt_t eq=0; eq<20; eq++) {
+    if (IsActiveEq(eq)) {
+      for (UInt_t hs=0; hs<6; hs++) {
+       if (IsActiveHS(eq,hs)) {
+         for (UInt_t chip=0; chip<10; chip++) {
+           if (!IsActiveChip(eq,hs,chip)) {
+             printf("%*d,%*d,%*d  |  ",2,eq,1,hs,1,chip);
+             UInt_t module = AliITSRawStreamSPD::GetOfflineModuleFromOnline(eq,hs,chip);
+             UInt_t colM1 = AliITSRawStreamSPD::GetOfflineColFromOnline(eq,hs,chip,0);
+             UInt_t colM2 = AliITSRawStreamSPD::GetOfflineColFromOnline(eq,hs,chip,31);
+             printf("%*d,%*d-%*d\n",3,module,3,colM1,3,colM2);
+           }
+         }
+       }
+      }
+    }
+  }
+
+  PrintDead();
+
+//!!!  printf("------------------------------------------------------\n");
+//!!!  printf("Dead Pixels: (eq,hs,chip,col,row  |  module,colM,rowM)\n");
+//!!!  printf("------------------------------------------------------\n");
+//!!!  for (UInt_t gloChip=0; gloChip<1200; gloChip++) {
+//!!!    for (UInt_t index=0; index<fNrDead[gloChip]; index++) {
+//!!!      Int_t key = fDeadPixelMap[gloChip]->GetKeyIndex(index);
+//!!!      UInt_t eq = GetEqIdFromKey(key);
+//!!!      UInt_t hs = GetHSFromKey(key);
+//!!!      UInt_t chip = GetChipFromKey(key);
+//!!!      if (!( IsActiveEq(eq) && IsActiveHS(eq,hs) && IsActiveChip(eq,hs,chip) )) continue;
+//!!!      UInt_t col = GetColFromKey(key);
+//!!!      UInt_t row = GetRowFromKey(key);
+//!!!
+//!!!      UInt_t module = AliITSRawStreamSPD::GetOfflineModuleFromOnline(eq,hs,chip);
+//!!!      UInt_t colM = AliITSRawStreamSPD::GetOfflineColFromOnline(eq,hs,chip,col);
+//!!!      UInt_t rowM = AliITSRawStreamSPD::GetOfflineRowFromOnline(eq,hs,chip,row);
+//!!!
+//!!!      printf("%*d,%*d,%*d,%*d,%*d  |  %*d,%*d,%*d\n",2,eq,1,hs,1,chip,2,col,3,row,3,module,3,colM,3,rowM);
+//!!!    }
+//!!!  }
+
+}
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::PrintDead() const {
-  // print the dead pixels to screen
+  // print the single dead pixels to screen (disregards inactive eq,hs,chip)
   printf("------------------------------------------------------\n");
   printf("Dead Pixels: (eq,hs,chip,col,row  |  module,colM,rowM)\n");
   printf("------------------------------------------------------\n");
@@ -801,6 +1081,7 @@ void AliITSOnlineCalibrationSPDhandler::PrintDead() const {
     }
   }
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::PrintNoisy() const {
   // print the dead pixels to screen
   printf("-------------------------------------------------------\n");
@@ -844,6 +1125,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::SetDeadPixel(UInt_t eq, UInt_t hs, UIn
   }
   return kFALSE;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::SetNoisyPixel(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t col, UInt_t row) {
   // set a noisy pixel, returns false if pixel is already noisy
   UInt_t gloChip = GetGloChip(eq,hs,chip);
@@ -866,6 +1148,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::SetNoisyPixel(UInt_t eq, UInt_t hs, UI
   }
   return kFALSE;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::SetDeadPixelM(UInt_t module, UInt_t colM, UInt_t rowM) {
   // set a dead pixel, returns false if pixel is already dead
   UInt_t eq = GetEqIdFromOffline(module);
@@ -875,6 +1158,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::SetDeadPixelM(UInt_t module, UInt_t co
   UInt_t row = GetRowFromOffline(module,rowM);
   return SetDeadPixel(eq,hs,chip,col,row);
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::SetNoisyPixelM(UInt_t module, UInt_t colM, UInt_t rowM) {
   // set a noisy pixel, returns false if pixel is already noisy
   UInt_t eq = GetEqIdFromOffline(module);
@@ -884,6 +1168,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::SetNoisyPixelM(UInt_t module, UInt_t c
   UInt_t row = GetRowFromOffline(module,rowM);
   return SetNoisyPixel(eq,hs,chip,col,row);
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::UnSetDeadPixel(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t col, UInt_t row) {
   // unset a dead pixel, returns false if pixel is not dead
   UInt_t gloChip = GetGloChip(eq,hs,chip);
@@ -898,6 +1183,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::UnSetDeadPixel(UInt_t eq, UInt_t hs, U
   }
   return kFALSE;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::UnSetNoisyPixel(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t col, UInt_t row) {
   // unset a noisy pixel, returns false if pixel is not noisy
   UInt_t gloChip = GetGloChip(eq,hs,chip);
@@ -912,6 +1198,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::UnSetNoisyPixel(UInt_t eq, UInt_t hs,
   }
   return kFALSE;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::UnSetDeadPixelM(UInt_t module, UInt_t colM, UInt_t rowM) {
   // unset a dead pixel, returns false if pixel is not dead
   UInt_t eq = GetEqIdFromOffline(module);
@@ -921,6 +1208,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::UnSetDeadPixelM(UInt_t module, UInt_t
   UInt_t row = GetRowFromOffline(module,rowM);
   return UnSetDeadPixel(eq,hs,chip,col,row);
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::UnSetNoisyPixelM(UInt_t module, UInt_t colM, UInt_t rowM) {
   // unset a noisy pixel, returns false if pixel is not noisy
   UInt_t eq = GetEqIdFromOffline(module);
@@ -930,6 +1218,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::UnSetNoisyPixelM(UInt_t module, UInt_t
   UInt_t row = GetRowFromOffline(module,rowM);
   return UnSetNoisyPixel(eq,hs,chip,col,row);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::SetDeadChip(UInt_t eq, UInt_t hs, UInt_t chip) {
   // set a full chip dead, returns nr of new dead pixels
   UInt_t nrNew = 0;
@@ -942,6 +1231,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::SetDeadChip(UInt_t eq, UInt_t hs, UInt
   }
   return nrNew;
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::SetNoisyChip(UInt_t eq, UInt_t hs, UInt_t chip) {
   // set a full chip noisy, returns nr of new noisy pixels
   UInt_t nrNew = 0;
@@ -954,6 +1244,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::SetNoisyChip(UInt_t eq, UInt_t hs, UIn
   }
   return nrNew;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::UnSetDeadChip(UInt_t eq, UInt_t hs, UInt_t chip) {
   // unset a full dead chip, returns false if it was not all dead before
   UInt_t nrUnset = 0;
@@ -967,6 +1258,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::UnSetDeadChip(UInt_t eq, UInt_t hs, UI
   if (nrUnset+GetNrNoisyC(eq,hs,chip)<8192) return kFALSE;
   else return kTRUE;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::UnSetNoisyChip(UInt_t eq, UInt_t hs, UInt_t chip) {
   // unset a full noisy chip, returns false if it was not all noisy before
   UInt_t nrUnset = 0;
@@ -981,36 +1273,51 @@ Bool_t AliITSOnlineCalibrationSPDhandler::UnSetNoisyChip(UInt_t eq, UInt_t hs, U
   else return kTRUE;
 }
 //____________________________________________________________________________________________
-Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelDead(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t col, UInt_t row) const {
-  // is the pixel dead?
+Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelSilent(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t col, UInt_t row) const {
+  // is the pixel silent (dead or inactive)?
   UInt_t gloChip = GetGloChip(eq,hs,chip);
-  if (gloChip>=1200) {
-    Error("AliITSOnlineCalibrationSPDhandler::IsPixelDead", "eq,hs,chip nrs (%d,%d,%d) out of bounds.",eq,hs,chip);
+  if (gloChip>=1200 || col>=32 || row>=256) {
+    Error("AliITSOnlineCalibrationSPDhandler::IsPixelSilent", "eq,hs,chip,col,row nrs (%d,%d,%d,%d,%d) out of bounds.",eq,hs,chip,col,row);
     return kFALSE;
   }
-  UInt_t key = GetKey(eq,hs,chip,col,row);
-  if ( fDeadPixelMap[gloChip]->Find(key) != NULL ) {
-    return kTRUE;
-  }
-  else {
+  if (!(IsActiveEq(eq) && IsActiveHS(eq,hs) && IsActiveChip(eq,hs,chip))) return kTRUE;
+  else return IsPixelDead(eq,hs,chip,col,row);
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelDead(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t col, UInt_t row) const {
+  // is the pixel?
+  UInt_t gloChip = GetGloChip(eq,hs,chip);
+  if (gloChip>=1200 || col>=32 || row>=256) {
+    Error("AliITSOnlineCalibrationSPDhandler::IsPixelDead", "eq,hs,chip,col,row nrs (%d,%d,%d,%d,%d) out of bounds.",eq,hs,chip,col,row);
     return kFALSE;
   }
+  UInt_t key = GetKey(eq,hs,chip,col,row);
+  if ( fDeadPixelMap[gloChip]->Find(key) != NULL ) return kTRUE;
+  else return kFALSE;
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelNoisy(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t col, UInt_t row) const {
   // is the pixel noisy?
   UInt_t gloChip = GetGloChip(eq,hs,chip);
-  if (gloChip>=1200) {
-    Error("AliITSOnlineCalibrationSPDhandler::IsPixelNoisy", "eq,hs,chip nrs (%d,%d,%d) out of bounds.",eq,hs,chip);
+  if (gloChip>=1200 || col>=32 || row>=256) {
+    Error("AliITSOnlineCalibrationSPDhandler::IsPixelNoisy", "eq,hs,chip,col,row nrs (%d,%d,%d) out of bounds.",eq,hs,chip,col,row);
     return kFALSE;
   }
   UInt_t key = GetKey(eq,hs,chip,col,row);
-  if ( fNoisyPixelMap[gloChip]->Find(key) != NULL ) {
-    return kTRUE;
-  }
-  else {
-    return kFALSE;
-  }
+  if ( fNoisyPixelMap[gloChip]->Find(key) != NULL ) return kTRUE;
+  else return kFALSE;
 }
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelSilentM(UInt_t module, UInt_t colM, UInt_t rowM) const {
+  // is the pixel silent (dead or inactive)?
+  UInt_t eq = GetEqIdFromOffline(module);
+  UInt_t hs = GetHSFromOffline(module);
+  UInt_t chip = GetChipFromOffline(module,colM);
+  UInt_t col = GetColFromOffline(module,colM);
+  UInt_t row = GetRowFromOffline(module,rowM);
+  return IsPixelSilent(eq,hs,chip,col,row);
+}
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelDeadM(UInt_t module, UInt_t colM, UInt_t rowM) const {
   // is the pixel dead?
   UInt_t eq = GetEqIdFromOffline(module);
@@ -1020,6 +1327,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelDeadM(UInt_t module, UInt_t col
   UInt_t row = GetRowFromOffline(module,rowM);
   return IsPixelDead(eq,hs,chip,col,row);
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelNoisyM(UInt_t module, UInt_t colM, UInt_t rowM) const  {
   // is the pixel noisy?
   UInt_t eq = GetEqIdFromOffline(module);
@@ -1029,6 +1337,17 @@ Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelNoisyM(UInt_t module, UInt_t co
   UInt_t row = GetRowFromOffline(module,rowM);
   return IsPixelNoisy(eq,hs,chip,col,row);
 }
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelSilentKey(Int_t key) const {
+  // is this pixel silent (dead or inactive)?
+  UInt_t eq = GetEqIdFromKey(key);
+  UInt_t hs = GetHSFromKey(key);
+  UInt_t chip = GetChipFromKey(key);
+  UInt_t col = GetColFromKey(key);
+  UInt_t row = GetRowFromKey(key);
+  return IsPixelSilent(eq,hs,chip,col,row);
+}
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelDeadKey(Int_t key) const {
   // is this pixel dead?
   UInt_t eq = GetEqIdFromKey(key);
@@ -1038,6 +1357,7 @@ Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelDeadKey(Int_t key) const {
   UInt_t row = GetRowFromKey(key);
   return IsPixelDead(eq,hs,chip,col,row);
 }
+//____________________________________________________________________________________________
 Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelNoisyKey(Int_t key) const {
   // is this pixel noisy?
   UInt_t eq = GetEqIdFromKey(key);
@@ -1048,6 +1368,34 @@ Bool_t AliITSOnlineCalibrationSPDhandler::IsPixelNoisyKey(Int_t key) const {
   return IsPixelNoisy(eq,hs,chip,col,row);
 }
 //____________________________________________________________________________________________
+UInt_t AliITSOnlineCalibrationSPDhandler::GetNrSilent() const {
+  // returns the total nr of silent pixels (dead or inactive)
+  UInt_t nrDead = 0;
+  for (UInt_t eq=0; eq<20; eq++) {
+    if (!IsActiveEq(eq)) {
+      nrDead+=81920*6;
+      continue;
+    }
+    for (UInt_t hs=0; hs<6; hs++) {
+      if (!IsActiveHS(eq,hs)) {
+       nrDead+=81920;
+       continue;
+      }
+      for (UInt_t chip=0; chip<10; chip++) {
+       if (!IsActiveChip(eq,hs,chip)) {
+         nrDead+=8192;
+         continue;
+       }
+       else {
+         UInt_t gloChip = GetGloChip(eq,hs,chip);
+         nrDead+=fNrDead[gloChip];
+       }
+      }
+    }
+  }
+  return nrDead;
+}
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNrDead() const {
   // returns the total nr of dead pixels
   UInt_t nrDead = 0;
@@ -1056,6 +1404,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNrDead() const {
   }
   return nrDead;
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNrNoisy() const {
   // returns the total nr of noisy pixels
   UInt_t nrNoisy = 0;
@@ -1064,6 +1413,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNrNoisy() const {
   }
   return nrNoisy;
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadEqIdAt(UInt_t index) {
   // get eq for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1071,6 +1421,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadEqIdAt(UInt_t index) {
   GetChipAndIndexTotDead(index,gloChip,chipIndex);
   return GetDeadEqIdAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyEqIdAt(UInt_t index) {
   // get eq for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1078,6 +1429,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyEqIdAt(UInt_t index) {
   GetChipAndIndexTotNoisy(index,gloChip,chipIndex);
   return GetNoisyEqIdAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadHSAt(UInt_t index) {
   // get hs for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1085,6 +1437,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadHSAt(UInt_t index) {
   GetChipAndIndexTotDead(index,gloChip,chipIndex);
   return GetDeadHSAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyHSAt(UInt_t index) {
   // get hs for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1092,6 +1445,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyHSAt(UInt_t index) {
   GetChipAndIndexTotNoisy(index,gloChip,chipIndex);
   return GetNoisyHSAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadChipAt(UInt_t index) {
   // get chip for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1099,6 +1453,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadChipAt(UInt_t index) {
   GetChipAndIndexTotDead(index,gloChip,chipIndex);
   return GetDeadChipAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyChipAt(UInt_t index) {
   // get chip for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1106,6 +1461,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyChipAt(UInt_t index) {
   GetChipAndIndexTotNoisy(index,gloChip,chipIndex);
   return GetNoisyChipAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadColAt(UInt_t index) {
   // get hs for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1113,6 +1469,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadColAt(UInt_t index) {
   GetChipAndIndexTotDead(index,gloChip,chipIndex);
   return GetDeadColAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyColAt(UInt_t index) {
   // get hs for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1120,6 +1477,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyColAt(UInt_t index) {
   GetChipAndIndexTotNoisy(index,gloChip,chipIndex);
   return GetNoisyColAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadRowAt(UInt_t index) {
   // get hs for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1127,6 +1485,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadRowAt(UInt_t index) {
   GetChipAndIndexTotDead(index,gloChip,chipIndex);
   return GetDeadRowAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyRowAt(UInt_t index) {
   // get hs for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1135,6 +1494,30 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyRowAt(UInt_t index) {
   return GetNoisyRowAtC2(gloChip,chipIndex);
 }
 //____________________________________________________________________________________________
+UInt_t AliITSOnlineCalibrationSPDhandler::GetNrSilent(UInt_t module) const {
+  // returns the number of silent pixels for a certain module (dead or inactive)
+  if (module>=240) {
+    Error("AliITSOnlineCalibrationSPDhandler::GetNrSilent", "module nr (%d) out of bounds.",module);
+    return 0;
+  }
+  UInt_t nrSilent = 0;
+  UInt_t eq = GetEqIdFromOffline(module);
+  if (!IsActiveEq(eq)) return 160*256;
+  UInt_t hs = GetHSFromOffline(module);
+  if (!IsActiveHS(eq,hs)) return 160*256;
+  for (UInt_t ch=0; ch<5; ch++) {
+    UInt_t chip = GetChipFromOffline(module,ch*32);
+    if (!IsActiveChip(eq,hs,chip)) {
+      nrSilent+=8192;
+    }
+    else {
+      UInt_t gloChip = GetGloChip(eq,hs,chip);
+      nrSilent+=fNrDead[gloChip];
+    }
+  }
+  return nrSilent;
+}
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNrDead(UInt_t module) const {
   // returns the number of dead pixels for a certain module
   if (module>=240) {
@@ -1144,13 +1527,13 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNrDead(UInt_t module) const {
   UInt_t nrDead = 0;
   UInt_t eq = GetEqIdFromOffline(module);
   UInt_t hs = GetHSFromOffline(module);
-  for (UInt_t chip=0; chip<5; chip++) {
-    UInt_t gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,chip*32));
+  for (UInt_t ch=0; ch<5; ch++) {
+    UInt_t gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,ch*32));
     nrDead+=fNrDead[gloChip];
-
   }
   return nrDead;
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNrNoisy(UInt_t module) const {
   // returns the number of noisy pixels for a certain module
   if (module>=240) {
@@ -1160,13 +1543,13 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNrNoisy(UInt_t module) const {
   UInt_t nrNoisy = 0;
   UInt_t eq = GetEqIdFromOffline(module);
   UInt_t hs = GetHSFromOffline(module);
-  for (UInt_t chip=0; chip<5; chip++) {
-    UInt_t gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,chip*32));
+  for (UInt_t ch=0; ch<5; ch++) {
+    UInt_t gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,ch*32));
     nrNoisy+=fNrNoisy[gloChip];
-
   }
   return nrNoisy;
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadEqIdAt(UInt_t module, UInt_t index) {
   // get eq for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1174,6 +1557,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadEqIdAt(UInt_t module, UInt_t in
   GetChipAndIndexDead(module,index,gloChip,chipIndex);
   return GetDeadEqIdAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyEqIdAt(UInt_t module, UInt_t index) {
   // get eq for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1181,6 +1565,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyEqIdAt(UInt_t module, UInt_t i
   GetChipAndIndexNoisy(module,index,gloChip,chipIndex);
   return GetNoisyEqIdAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadHSAt(UInt_t module, UInt_t index) {
   // get hs for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1188,6 +1573,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadHSAt(UInt_t module, UInt_t inde
   GetChipAndIndexDead(module,index,gloChip,chipIndex);
   return GetDeadHSAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyHSAt(UInt_t module, UInt_t index) {
   // get hs for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1195,6 +1581,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyHSAt(UInt_t module, UInt_t ind
   GetChipAndIndexNoisy(module,index,gloChip,chipIndex);
   return GetNoisyHSAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadChipAt(UInt_t module, UInt_t index) {
   // get chip for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1202,6 +1589,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadChipAt(UInt_t module, UInt_t in
   GetChipAndIndexDead(module,index,gloChip,chipIndex);
   return GetDeadChipAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyChipAt(UInt_t module, UInt_t index) {
   // get chip for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1209,6 +1597,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyChipAt(UInt_t module, UInt_t i
   GetChipAndIndexNoisy(module,index,gloChip,chipIndex);
   return GetNoisyChipAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadColAt(UInt_t module, UInt_t index) {
   // get hs for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1216,6 +1605,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadColAt(UInt_t module, UInt_t ind
   GetChipAndIndexDead(module,index,gloChip,chipIndex);
   return GetDeadColAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyColAt(UInt_t module, UInt_t index) {
   // get hs for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1223,6 +1613,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyColAt(UInt_t module, UInt_t in
   GetChipAndIndexNoisy(module,index,gloChip,chipIndex);
   return GetNoisyColAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadRowAt(UInt_t module, UInt_t index) {
   // get hs for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1230,6 +1621,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadRowAt(UInt_t module, UInt_t ind
   GetChipAndIndexDead(module,index,gloChip,chipIndex);
   return GetDeadRowAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyRowAt(UInt_t module, UInt_t index) {
   // get hs for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1238,6 +1630,28 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyRowAt(UInt_t module, UInt_t in
   return GetNoisyRowAtC2(gloChip,chipIndex);
 }
 //____________________________________________________________________________________________
+UInt_t AliITSOnlineCalibrationSPDhandler::GetNrSilentEq(UInt_t eq) const {
+  // returns nr of silent for eq (dead or inactive)
+  UInt_t returnval=0;
+  if (!IsActiveEq(eq)) return 81920*6;
+  for (UInt_t hs=0; hs<6; hs++) {
+    if (!IsActiveHS(eq,hs)) {
+      returnval+=81920;
+      continue;
+    }
+    for (UInt_t chip=0; chip<10; chip++) {
+      if (!IsActiveChip(eq,hs,chip)) {
+       returnval+=8192;
+       continue;
+      }
+      else { 
+       returnval+=GetNrDeadC(eq,hs,chip);
+      }
+    }
+  }
+  return returnval;
+}
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNrDeadEq(UInt_t eq) const {
   // returns nr of dead for eq
   UInt_t returnval=0;
@@ -1248,6 +1662,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNrDeadEq(UInt_t eq) const {
   }
   return returnval;
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNrNoisyEq(UInt_t eq) const {
   // returns nr of noisy for eq
   UInt_t returnval=0;
@@ -1258,6 +1673,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNrNoisyEq(UInt_t eq) const {
   }
   return returnval;
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadEqIdAtEq(UInt_t eq, UInt_t index) const {
   // get eq for the dead pixel at position index in list of dead
   if (eq<20 && index<GetNrDeadEq(eq)) {
@@ -1267,6 +1683,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadEqIdAtEq(UInt_t eq, UInt_t inde
     return 20;
   }
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyEqIdAtEq(UInt_t eq, UInt_t index) const {
   // get eq for the noisy pixel at position index in list of noisy
   if (eq<20 && index<GetNrNoisyEq(eq)) {
@@ -1276,6 +1693,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyEqIdAtEq(UInt_t eq, UInt_t ind
     return 20;
   }
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadHSAtEq(UInt_t eq, UInt_t index) {
   // get hs for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1283,6 +1701,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadHSAtEq(UInt_t eq, UInt_t index)
   GetChipAndIndexEqDead(eq,index,gloChip,chipIndex);
   return GetDeadHSAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyHSAtEq(UInt_t eq, UInt_t index) {
   // get hs for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1290,6 +1709,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyHSAtEq(UInt_t eq, UInt_t index
   GetChipAndIndexEqNoisy(eq,index,gloChip,chipIndex);
   return GetNoisyHSAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadChipAtEq(UInt_t eq, UInt_t index) {
   // get chip for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1297,6 +1717,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadChipAtEq(UInt_t eq, UInt_t inde
   GetChipAndIndexEqDead(eq,index,gloChip,chipIndex);
   return GetDeadChipAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyChipAtEq(UInt_t eq, UInt_t index) {
   // get chip for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1304,6 +1725,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyChipAtEq(UInt_t eq, UInt_t ind
   GetChipAndIndexEqNoisy(eq,index,gloChip,chipIndex);
   return GetNoisyChipAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadColAtEq(UInt_t eq, UInt_t index) {
   // get hs for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1311,6 +1733,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadColAtEq(UInt_t eq, UInt_t index
   GetChipAndIndexEqDead(eq,index,gloChip,chipIndex);
   return GetDeadColAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyColAtEq(UInt_t eq, UInt_t index) {
   // get hs for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1318,6 +1741,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyColAtEq(UInt_t eq, UInt_t inde
   GetChipAndIndexEqNoisy(eq,index,gloChip,chipIndex);
   return GetNoisyColAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadRowAtEq(UInt_t eq, UInt_t index) {
   // get hs for the dead pixel at position index in list of dead
   UInt_t gloChip;
@@ -1325,6 +1749,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadRowAtEq(UInt_t eq, UInt_t index
   GetChipAndIndexEqDead(eq,index,gloChip,chipIndex);
   return GetDeadRowAtC2(gloChip,chipIndex);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyRowAtEq(UInt_t eq, UInt_t index) {
   // get hs for the noisy pixel at position index in list of noisy
   UInt_t gloChip;
@@ -1333,50 +1758,69 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyRowAtEq(UInt_t eq, UInt_t inde
   return GetNoisyRowAtC2(gloChip,chipIndex);
 }
 //____________________________________________________________________________________________
+UInt_t AliITSOnlineCalibrationSPDhandler::GetNrSilentC(UInt_t eq, UInt_t hs, UInt_t chip) const {
+  // returns nr of silent for chip (dead or inactive)
+  if (!(IsActiveEq(eq) && IsActiveHS(eq,hs) && IsActiveChip(eq,hs,chip))) return 8192;
+  else return GetNrDeadC(eq,hs,chip);
+}
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNrDeadC(UInt_t eq, UInt_t hs, UInt_t chip) const {
+  // returns nr of dead for chip
   UInt_t gloChip = GetGloChip(eq,hs,chip);
   return GetNrDeadC2(gloChip);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNrNoisyC(UInt_t eq, UInt_t hs, UInt_t chip) const {
+  // returns nr of noisy for chip
   UInt_t gloChip = GetGloChip(eq,hs,chip);
   return GetNrNoisyC2(gloChip);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadEqIdAtC(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t index) const {
   UInt_t gloChip = GetGloChip(eq,hs,chip);
   return GetDeadEqIdAtC2(gloChip,index);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyEqIdAtC(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t index) const {
   UInt_t gloChip = GetGloChip(eq,hs,chip);
   return GetNoisyEqIdAtC2(gloChip,index);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadHSAtC(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t index) const {
   UInt_t gloChip = GetGloChip(eq,hs,chip);
   return GetDeadHSAtC2(gloChip,index);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyHSAtC(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t index) const {
   UInt_t gloChip = GetGloChip(eq,hs,chip);
   return GetNoisyHSAtC2(gloChip,index);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadChipAtC(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t index) const {
   UInt_t gloChip = GetGloChip(eq,hs,chip);
   return GetDeadChipAtC2(gloChip,index);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyChipAtC(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t index) const {
   UInt_t gloChip = GetGloChip(eq,hs,chip);
   return GetNoisyChipAtC2(gloChip,index);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadColAtC(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t index) const {
   UInt_t gloChip = GetGloChip(eq,hs,chip);
   return GetDeadColAtC2(gloChip,index);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyColAtC(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t index) const {
   UInt_t gloChip = GetGloChip(eq,hs,chip);
   return GetNoisyColAtC2(gloChip,index);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadRowAtC(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t index) const {
   UInt_t gloChip = GetGloChip(eq,hs,chip);
   return GetDeadRowAtC2(gloChip,index);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyRowAtC(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t index) const {
   UInt_t gloChip = GetGloChip(eq,hs,chip);
   return GetNoisyRowAtC2(gloChip,index);
@@ -1393,7 +1837,7 @@ const Char_t* AliITSOnlineCalibrationSPDhandler::GetDeadPixelAsTextC(UInt_t eq,
   if (index<fNrDead[gloChip]) {
     Int_t key = fDeadPixelMap[gloChip]->GetKeyIndex(index);
     UInt_t col = GetColFromKey(key);
-    UInt_t row = GetRowFromKey(key);    
+    UInt_t row = GetRowFromKey(key);
     UInt_t module = AliITSRawStreamSPD::GetOfflineModuleFromOnline(eq,hs,chip);
     UInt_t colM = AliITSRawStreamSPD::GetOfflineColFromOnline(eq,hs,chip,col);
     UInt_t rowM = AliITSRawStreamSPD::GetOfflineRowFromOnline(eq,hs,chip,row);
@@ -1405,6 +1849,7 @@ const Char_t* AliITSOnlineCalibrationSPDhandler::GetDeadPixelAsTextC(UInt_t eq,
     return returnMess.Data();
   }
 }
+//____________________________________________________________________________________________
 const Char_t* AliITSOnlineCalibrationSPDhandler::GetNoisyPixelAsTextC(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t index) const {
   // get a string of noisy pixel info
   TString returnMess = "";
@@ -1429,6 +1874,25 @@ const Char_t* AliITSOnlineCalibrationSPDhandler::GetNoisyPixelAsTextC(UInt_t eq,
   }
 }
 //____________________________________________________________________________________________
+UInt_t AliITSOnlineCalibrationSPDhandler::AddSilentFrom(AliITSOnlineCalibrationSPDhandler* other) {
+  // returns number of new silent pixels in this' list (dead or inactive)
+  UInt_t tmpdead = GetNrSilent();
+
+  for (UInt_t eq=0; eq<20; eq++) {
+    if (!(other->IsActiveEq(eq))) ActivateEq(eq,kFALSE);
+    for (UInt_t hs=0; hs<6; hs++) {
+      if (!(other->IsActiveHS(eq,hs))) ActivateHS(eq,hs,kFALSE);
+      for (UInt_t chip=0; chip<10; chip++) {
+       if (!(other->IsActiveChip(eq,hs,chip))) ActivateChip(eq,hs,chip,kFALSE);
+      }
+    }
+  }
+
+  AddDeadFrom(other);
+
+  return GetNrSilent() - tmpdead;
+}
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::AddDeadFrom(AliITSOnlineCalibrationSPDhandler* other) {
   // returns number of new dead pixels in this' list
   UInt_t returnval=0;
@@ -1446,6 +1910,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::AddDeadFrom(AliITSOnlineCalibrationSPD
   }
   return returnval;
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::AddNoisyFrom(AliITSOnlineCalibrationSPDhandler* other) {
   // returns number of new noisy pixels in this' list
   UInt_t returnval=0;
@@ -1465,9 +1930,39 @@ UInt_t AliITSOnlineCalibrationSPDhandler::AddNoisyFrom(AliITSOnlineCalibrationSP
 }
 //____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNrDiff(AliITSOnlineCalibrationSPDhandler* other) const {
-  // returns nr of dead/noisy in this' lists and not in other's lists
-  return GetNrDeadDiff(other) + GetNrNoisyDiff(other);
+  // returns nr of dead/noisy in this' lists and not in other's lists (including inactive)
+  return GetNrSilentDiff(other) + GetNrNoisyDiff(other);
 }
+//____________________________________________________________________________________________
+UInt_t AliITSOnlineCalibrationSPDhandler::GetNrSilentDiff(AliITSOnlineCalibrationSPDhandler* other) const {
+  // returns nr of single silent pixels in this' lists and not in other's lists (dead or inactive)
+  UInt_t returnval=0;
+  for (UInt_t eq=0; eq<20; eq++) {
+    for (UInt_t hs=0; hs<6; hs++) {
+      for (UInt_t chip=0; chip<10; chip++) {
+       if (!(IsActiveEq(eq) && IsActiveHS(eq,hs) && IsActiveChip(eq,hs,chip))) {
+         if (other->IsActiveEq(eq) && other->IsActiveHS(eq,hs) && other->IsActiveChip(eq,hs,chip)) {
+           // if this is inactive and the other is active...
+           returnval+= 8192 - other->GetNrDeadC(eq,hs,chip);
+         }
+       }
+       else {
+         UInt_t gloChip = GetGloChip(eq,hs,chip);
+         for (UInt_t ind1=0; ind1<fNrDead[gloChip]; ind1++) {
+           Int_t key = fDeadPixelMap[gloChip]->GetKeyIndex(ind1);
+           UInt_t col = GetColFromKey(key);
+           UInt_t row = GetRowFromKey(key);
+           if (!(other->IsPixelSilent(eq,hs,chip,col,row))) {
+             returnval++;
+           }
+         }
+       }
+      }
+    }
+  }
+  return returnval;
+}
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNrDeadDiff(AliITSOnlineCalibrationSPDhandler* other) const {
   // returns nr of dead in this' lists and not in other's lists
   UInt_t returnval=0;
@@ -1486,6 +1981,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNrDeadDiff(AliITSOnlineCalibrationS
   }
   return returnval;
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNrNoisyDiff(AliITSOnlineCalibrationSPDhandler* other) const {
   // returns nr of noisy in this' lists and not in other's lists
   UInt_t returnval=0;
@@ -1504,9 +2000,30 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNrNoisyDiff(AliITSOnlineCalibration
   }
   return returnval;
 }
+//____________________________________________________________________________________________
 AliITSOnlineCalibrationSPDhandler* AliITSOnlineCalibrationSPDhandler::GetDiff(AliITSOnlineCalibrationSPDhandler* other) const {
-  // returns handler with dead/noisy in this' lists, except for those in other's lists
+  // returns handler with active/dead/noisy in this' lists, removing those that are in other's lists
   AliITSOnlineCalibrationSPDhandler* newHandler = new AliITSOnlineCalibrationSPDhandler();
+
+  for (UInt_t eq=0; eq<20; eq++) {
+    if (!(IsActiveEq(eq))) {
+      newHandler->ActivateEq(eq,kFALSE);
+      if (!other->IsActiveEq(eq)) newHandler->ActivateEq(eq);
+    }
+    for (UInt_t hs=0; hs<6; hs++) {
+      if (!(IsActiveHS(eq,hs))) {
+       newHandler->ActivateHS(eq,hs,kFALSE);
+       if (!other->IsActiveHS(eq,hs)) newHandler->ActivateHS(eq,hs);
+      }
+      for (UInt_t chip=0; chip<10; chip++) {
+       if (!(IsActiveChip(eq,hs,chip))) {
+         newHandler->ActivateChip(eq,hs,chip,kFALSE);
+         if (!other->IsActiveChip(eq,hs,chip)) newHandler->ActivateHS(eq,hs,chip);
+       }
+      }
+    }
+  }
+
   for (UInt_t gloChip=0; gloChip<1200; gloChip++) {
     for (UInt_t ind1=0; ind1<fNrDead[gloChip]; ind1++) {
       Int_t key = fDeadPixelMap[gloChip]->GetKeyIndex(ind1);
@@ -1519,6 +2036,9 @@ AliITSOnlineCalibrationSPDhandler* AliITSOnlineCalibrationSPDhandler::GetDiff(Al
        newHandler->SetDeadPixel(eq,hs,chip,col,row);
       }
     }
+  }
+
+  for (UInt_t gloChip=0; gloChip<1200; gloChip++) {
     for (UInt_t ind2=0; ind2<fNrNoisy[gloChip]; ind2++) {
       Int_t key = fNoisyPixelMap[gloChip]->GetKeyIndex(ind2);
       UInt_t eq = GetEqIdFromKey(key);
@@ -1531,8 +2051,50 @@ AliITSOnlineCalibrationSPDhandler* AliITSOnlineCalibrationSPDhandler::GetDiff(Al
       }
     }
   }
+
   return newHandler;
 }
+//____________________________________________________________________________________________
+AliITSOnlineCalibrationSPDhandler* AliITSOnlineCalibrationSPDhandler::GetSilentDiff(AliITSOnlineCalibrationSPDhandler* other) const {
+  // returns handler with active/dead in this' lists, removing those that are in other's lists
+  AliITSOnlineCalibrationSPDhandler* newHandler = new AliITSOnlineCalibrationSPDhandler();
+
+  for (UInt_t eq=0; eq<20; eq++) {
+    if (!(IsActiveEq(eq))) {
+      newHandler->ActivateEq(eq,kFALSE);
+      if (!other->IsActiveEq(eq)) newHandler->ActivateEq(eq);
+    }
+    for (UInt_t hs=0; hs<6; hs++) {
+      if (!(IsActiveHS(eq,hs))) {
+       newHandler->ActivateHS(eq,hs,kFALSE);
+       if (!other->IsActiveHS(eq,hs)) newHandler->ActivateHS(eq,hs);
+      }
+      for (UInt_t chip=0; chip<10; chip++) {
+       if (!(IsActiveChip(eq,hs,chip))) {
+         newHandler->ActivateChip(eq,hs,chip,kFALSE);
+         if (!other->IsActiveChip(eq,hs,chip)) newHandler->ActivateHS(eq,hs,chip);
+       }
+      }
+    }
+  }
+
+  for (UInt_t gloChip=0; gloChip<1200; gloChip++) {
+    for (UInt_t ind1=0; ind1<fNrDead[gloChip]; ind1++) {
+      Int_t key = fDeadPixelMap[gloChip]->GetKeyIndex(ind1);
+      UInt_t eq = GetEqIdFromKey(key);
+      UInt_t hs = GetHSFromKey(key);
+      UInt_t chip = GetChipFromKey(key);
+      UInt_t col = GetColFromKey(key);
+      UInt_t row = GetRowFromKey(key);
+      if (!(other->IsPixelDead(eq,hs,chip,col,row))) {
+       newHandler->SetDeadPixel(eq,hs,chip,col,row);
+      }
+    }
+  }
+
+  return newHandler;
+}
+//____________________________________________________________________________________________
 AliITSOnlineCalibrationSPDhandler* AliITSOnlineCalibrationSPDhandler::GetDeadDiff(AliITSOnlineCalibrationSPDhandler* other) const {
   // returns handler with dead in this' lists, except for those in other's lists
   AliITSOnlineCalibrationSPDhandler* newHandler = new AliITSOnlineCalibrationSPDhandler();
@@ -1551,6 +2113,7 @@ AliITSOnlineCalibrationSPDhandler* AliITSOnlineCalibrationSPDhandler::GetDeadDif
   }
   return newHandler;
 }
+//____________________________________________________________________________________________
 AliITSOnlineCalibrationSPDhandler* AliITSOnlineCalibrationSPDhandler::GetNoisyDiff(AliITSOnlineCalibrationSPDhandler* other) const {
   // returns handler with noisy in this' lists, except for those in other's lists
   AliITSOnlineCalibrationSPDhandler* newHandler = new AliITSOnlineCalibrationSPDhandler();
@@ -1577,8 +2140,8 @@ void AliITSOnlineCalibrationSPDhandler::GetChipAndIndexDead(UInt_t module, UInt_
     UInt_t hs = GetHSFromOffline(module);
     
     UInt_t glVal=0;
-    for (UInt_t chip=0; chip<5; chip++) {
-      gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,chip*32));
+    for (UInt_t ch=0; ch<5; ch++) {
+      gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,ch*32));
       if (glVal+fNrDead[gloChip]>index) {
        chipIndex = index-glVal;
        break;
@@ -1593,6 +2156,7 @@ void AliITSOnlineCalibrationSPDhandler::GetChipAndIndexDead(UInt_t module, UInt_
     Error("AliITSOnlineCalibrationSPDhandler::GetChipAndIndexDead", "Index %d out of bounds.", index);
   }
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::GetChipAndIndexNoisy(UInt_t module, UInt_t index, UInt_t& gloChip, UInt_t& chipIndex) {
   // find gloChip and chipIndex from module and index
   if (index<GetNrNoisy(module)) {
@@ -1600,8 +2164,8 @@ void AliITSOnlineCalibrationSPDhandler::GetChipAndIndexNoisy(UInt_t module, UInt
     UInt_t hs = GetHSFromOffline(module);
     
     UInt_t glVal=0;
-    for (UInt_t chip=0; chip<5; chip++) {
-      gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,chip*32));
+    for (UInt_t ch=0; ch<5; ch++) {
+      gloChip = GetGloChip(eq,hs,GetChipFromOffline(module,ch*32));
       if (glVal+fNrNoisy[gloChip]>index) {
        chipIndex = index-glVal;
        break;
@@ -1616,6 +2180,7 @@ void AliITSOnlineCalibrationSPDhandler::GetChipAndIndexNoisy(UInt_t module, UInt
     Error("AliITSOnlineCalibrationSPDhandler::GetChipAndIndexNoisy", "Index %d out of bounds.", index);
   }
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::GetChipAndIndexEqDead(UInt_t eq, UInt_t index, UInt_t& gloChip, UInt_t& chipIndex) {
   // find gloChip and chipIndex from module and index
   if (index<GetNrDeadEq(eq)) {
@@ -1639,6 +2204,7 @@ void AliITSOnlineCalibrationSPDhandler::GetChipAndIndexEqDead(UInt_t eq, UInt_t
     Error("AliITSOnlineCalibrationSPDhandler::GetChipAndIndexEqDead", "Index %d out of bounds.", index);
   }
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::GetChipAndIndexEqNoisy(UInt_t eq, UInt_t index, UInt_t& gloChip, UInt_t& chipIndex) {
   // find gloChip and chipIndex from module and index
   if (index<GetNrNoisyEq(eq)) {
@@ -1662,6 +2228,7 @@ void AliITSOnlineCalibrationSPDhandler::GetChipAndIndexEqNoisy(UInt_t eq, UInt_t
     Error("AliITSOnlineCalibrationSPDhandler::GetChipAndIndexEqNoisy", "Index %d out of bounds.", index);
   }
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::GetChipAndIndexTotDead(UInt_t index, UInt_t& gloChip, UInt_t& chipIndex) {
   // find gloChip and chipIndex from global index
   if (index<GetNrDead()) {
@@ -1682,6 +2249,7 @@ void AliITSOnlineCalibrationSPDhandler::GetChipAndIndexTotDead(UInt_t index, UIn
     Error("AliITSOnlineCalibrationSPDhandler::GetChipAndIndexTotDead", "Index %d out of bounds.", index);
   }
 }
+//____________________________________________________________________________________________
 void AliITSOnlineCalibrationSPDhandler::GetChipAndIndexTotNoisy(UInt_t index, UInt_t& gloChip, UInt_t& chipIndex) {
   // find gloChip and chipIndex from global index
   if (index<GetNrNoisy()) {
@@ -1711,6 +2279,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetEqIdFromOffline(UInt_t module) cons
   }
   return AliITSRawStreamSPD::GetOnlineEqIdFromOffline(module);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetHSFromOffline(UInt_t module) const {
   // module to hs mapping
   if (module>=240) {
@@ -1719,6 +2288,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetHSFromOffline(UInt_t module) const
   }
   return AliITSRawStreamSPD::GetOnlineHSFromOffline(module);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetChipFromOffline(UInt_t module, UInt_t colM) const {
   // module,colM to chip mapping
   if (module>=240 || colM>=160) {
@@ -1727,6 +2297,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetChipFromOffline(UInt_t module, UInt
   }
   return AliITSRawStreamSPD::GetOnlineChipFromOffline(module,colM);
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetColFromOffline(UInt_t module, UInt_t colM) const {
   // colM to col mapping
   if (colM>=160) {
@@ -1735,7 +2306,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetColFromOffline(UInt_t module, UInt_
   }
   return AliITSRawStreamSPD::GetOnlineColFromOffline(module,colM);
 }
-
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetRowFromOffline(UInt_t module, UInt_t rowM) const {
   // rowM to row mapping
   if (rowM>=256) {
@@ -1753,6 +2324,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNrDeadC2(UInt_t gloChip) const {
   }
   return fNrDead[gloChip];
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNrNoisyC2(UInt_t gloChip) const {
   // returns nr of noisy pixels on this chip
   if (gloChip>=1200) {
@@ -1761,6 +2333,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNrNoisyC2(UInt_t gloChip) const {
   }
   return fNrNoisy[gloChip];
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadEqIdAtC2(UInt_t gloChip, UInt_t index) const {
   // get eq for the dead pixel at position index in list of dead
   if (gloChip>=1200) {
@@ -1776,6 +2349,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadEqIdAtC2(UInt_t gloChip, UInt_t
     return 0;
   }
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyEqIdAtC2(UInt_t gloChip, UInt_t index) const {
   // get eq for the noisy pixel at position index in list of noisy
   if (gloChip>=1200) {
@@ -1791,6 +2365,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyEqIdAtC2(UInt_t gloChip, UInt_
     return 0;
   }
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadHSAtC2(UInt_t gloChip, UInt_t index) const {
   // get hs for the dead pixel at position index in list of dead
   if (gloChip>=1200) {
@@ -1806,6 +2381,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadHSAtC2(UInt_t gloChip, UInt_t i
     return 0;
   }
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyHSAtC2(UInt_t gloChip, UInt_t index) const {
   // get hs for the noisy pixel at position index in list of noisy
   if (gloChip>=1200) {
@@ -1821,6 +2397,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyHSAtC2(UInt_t gloChip, UInt_t
     return 0;
   }
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadChipAtC2(UInt_t gloChip, UInt_t index) const {
   // get chip for the dead pixel at position index in list of dead
   if (gloChip>=1200) {
@@ -1836,6 +2413,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadChipAtC2(UInt_t gloChip, UInt_t
     return 0;
   }
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyChipAtC2(UInt_t gloChip, UInt_t index) const {
   // get chip for the noisy pixel at position index in list of noisy
   if (gloChip>=1200) {
@@ -1851,6 +2429,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyChipAtC2(UInt_t gloChip, UInt_
     return 0;
   }
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadColAtC2(UInt_t gloChip, UInt_t index) const {
   // get col for the dead pixel at position index in list of dead
   if (gloChip>=1200) {
@@ -1866,6 +2445,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadColAtC2(UInt_t gloChip, UInt_t
     return 0;
   }
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyColAtC2(UInt_t gloChip, UInt_t index) const {
   // get col for the noisy pixel at position index in list of noisy
   if (gloChip>=1200) {
@@ -1881,6 +2461,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyColAtC2(UInt_t gloChip, UInt_t
     return 0;
   }
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadRowAtC2(UInt_t gloChip, UInt_t index) const {
   // get row for the dead pixel at position index in list of dead
   if (gloChip>=1200) {
@@ -1896,6 +2477,7 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetDeadRowAtC2(UInt_t gloChip, UInt_t
     return 0;
   }
 }
+//____________________________________________________________________________________________
 UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyRowAtC2(UInt_t gloChip, UInt_t index) const {
   // get row for the noisy pixel at position index in list of noisy
   if (gloChip>=1200) {
@@ -1911,21 +2493,64 @@ UInt_t AliITSOnlineCalibrationSPDhandler::GetNoisyRowAtC2(UInt_t gloChip, UInt_t
     return 0;
   }
 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::ActivateALL() {
+  for (UInt_t eq=0; eq<20; eq++) {
+    ActivateEq(eq);
+    for (UInt_t hs=0; hs<6; hs++) {
+      ActivateHS(eq,hs);
+      for (UInt_t chip=0; chip<10; chip++) {
+       ActivateChip(eq,hs,chip);
+      }
+    }
+  }
+}
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::ActivateEq(UInt_t eq, Bool_t setval) {
+  if (eq>=20) {
+    Error("AliITSOnlineCalibrationSPDhandler::ActivateEq", "eq (%d) out of bounds.",eq);
+    return;
+  }
+  fActiveEq[eq] = setval;
+}
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::ActivateHS(UInt_t eq, UInt_t hs, Bool_t setval) {
+  if (eq>=20 || hs>=6) {
+    Error("AliITSOnlineCalibrationSPDhandler::ActivateHS", "eq,hs (%d,%d) out of bounds.",eq,hs);
+    return;
+  }
+  fActiveHS[eq][hs] = setval;
+}
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::ActivateChip(UInt_t eq, UInt_t hs, UInt_t chip, Bool_t setval) {
+  if (eq>=20 || hs>=6 || chip>=10) {
+    Error("AliITSOnlineCalibrationSPDhandler::ActivateChip", "eq,hs,chip (%d,%d,%d) out of bounds.",eq,hs,chip);
+    return;
+  }
+  fActiveChip[eq][hs][chip] = setval;
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsActiveEq(UInt_t eq) const {
+  if (eq>=20) {
+    Error("AliITSOnlineCalibrationSPDhandler::IsActiveEq", "eq (%d) out of bounds.",eq);
+    return kFALSE;
+  }
+  return fActiveEq[eq];
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsActiveHS(UInt_t eq, UInt_t hs) const {
+  if (eq>=20 || hs>=6) {
+    Error("AliITSOnlineCalibrationSPDhandler::IsActiveHS", "eq,hs (%d,%d) out of bounds.",eq,hs);
+    return kFALSE;
+  }
+  return fActiveHS[eq][hs];
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsActiveChip(UInt_t eq, UInt_t hs, UInt_t chip) const {
+  if (eq>=20 || hs>=6 || chip>=10) {
+    Error("AliITSOnlineCalibrationSPDhandler::IsActiveChip", "eq,hs,chip (%d,%d,%d) out of bounds.",eq,hs,chip);
+    return kFALSE;
+  }
+  return fActiveChip[eq][hs][chip];
+}