]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSQAChecker.cxx
For Pythia with tune don't switch off MI in ConfigHeavyFlavor
[u/mrichter/AliRoot.git] / ITS / AliITSQAChecker.cxx
index c5dc71df732863637b29af4962ed93aedccbe76c..d34b8ea1ff67870ba88d0d98d2e0e176dd3482c6 100644 (file)
@@ -42,22 +42,29 @@ fLDC(0),
 fSPDOffset(0), 
 fSDDOffset(0), 
 fSSDOffset(0),
+fSPDHisto(0),
+fSDDHisto(0),
+fSSDHisto(0),
 fSPDChecker(0),  // SPD Checker
 fSDDChecker(0),  // SDD Checker
 fSSDChecker(0)  // SSD Checker
+
 {
   // Standard constructor
   fkOnline = kMode; fDet = subDet; fLDC = ldc;
   if(fDet == 0 || fDet == 1) {
-    AliDebug(1,"AliITSQAChecker::Create SPD Checker\n");
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQAChecker::Create SPD Checker\n");
+    fSPDChecker = new AliITSQASPDChecker();
   }
   if(fDet == 0 || fDet == 2) {
-    AliDebug(1,"AliITSQAChecker::Create SDD Checker\n");
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQAChecker::Create SDD Checker\n");
+    fSDDChecker = new AliITSQASDDChecker();
   }
   if(fDet == 0 || fDet == 3) {
-    AliDebug(1,"AliITSQAChecker::Create SSD Checker\n");
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQAChecker::Create SSD Checker\n");
+    fSSDChecker = new AliITSQASSDChecker();
   }
-
+  InitQACheckerLimits();
 }
 
 //____________________________________________________________________________
@@ -69,9 +76,13 @@ fLDC(qac.fLDC),
 fSPDOffset(qac.fSPDOffset), 
 fSDDOffset(qac.fSDDOffset), 
 fSSDOffset(qac.fSSDOffset), 
-fSPDChecker(0), 
-fSDDChecker(0), 
-fSSDChecker(0) {
+fSPDHisto(qac.fSPDHisto),
+fSDDHisto(qac.fSDDHisto),
+fSSDHisto(qac.fSSDHisto),
+fSPDChecker(qac.fSPDChecker), 
+fSDDChecker(qac.fSDDChecker), 
+fSSDChecker(qac.fSSDChecker)
+{
   // copy constructor
   AliError("Copy should not be used with this class\n");
 }
@@ -83,185 +94,241 @@ AliITSQAChecker& AliITSQAChecker::operator=(const AliITSQAChecker& qac){
   return *this;
 }
 
+
+//____________________________________________________________________________
+AliITSQAChecker::~AliITSQAChecker(){
+  // destructor
+  if(fSPDChecker)delete fSPDChecker;
+  if(fSDDChecker)delete fSDDChecker;
+  if(fSSDChecker)delete fSSDChecker;
+
+}
 //____________________________________________________________________________
-Double_t AliITSQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
+Double_t * AliITSQAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list, const AliDetectorRecoParam * recoParam)
 {
-  
-  // Super-basic check on the QA histograms on the input list:
-  // look whether they are empty!
-  if(index == AliQA::kESD){
-    AliDebug(1,"Checker for ESD");
-    Int_t tested = 0;
-    Int_t empty = 0;
-    Double_t rv = 0.;
-    // The following flags are set to kTRUE if the corresponding
-    // QA histograms exceed a given quality threshold
-    Bool_t cluMapSA = kFALSE;
-    Bool_t cluMapMI = kFALSE;
-    Bool_t cluMI = kFALSE;
-    Bool_t cluSA = kFALSE;
-    Bool_t verSPDZ = kFALSE;
-    if (list->GetEntries() == 0) {
-      rv = 0.; // nothing to check
-    }
-    else {
-      TIter next1(list);
-      TH1 * hdata;
-      Int_t nskipped=0;
-      Bool_t skipped[6]={kFALSE,kFALSE,kFALSE,kFALSE,kFALSE,kFALSE};
-      // look for layers that we wanted to skip
-      while ( (hdata = dynamic_cast<TH1 *>(next1())) ) {
-       if(!hdata) continue;
-       TString hname = hdata->GetName();
-       if(!hname.Contains("hESDSkippedLayers")) continue;
-       for(Int_t k=1; k<7; k++) {
-         if(hdata->GetBinContent(k)>0) { 
-           nskipped++; 
-           skipped[k-1]=kTRUE; 
-         } 
-       } 
-      }
-      TIter next(list);
-      while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
-       if(hdata){
-         TString hname = hdata->GetName();
-         Double_t entries = hdata->GetEntries();
-         ++tested;
-         if(!(entries>0.))++empty;
-         AliDebug(1,Form("ESD hist name %s - entries %12.1g",hname.Data(),entries));
-
-         if(hname.Contains("hESDClusterMapSA") && entries>0.){
-           cluMapSA = kTRUE;
-           AliDebug(1,Form("Processing histogram %s",hname.Data()));
-           // Check if there are layers with anomalously low 
-           // contributing points to SA reconstructed tracks
-           for(Int_t k=1;k<7;k++){
-             // check if the layer was skipped
-             if(skipped[k-1]) continue;
-             if(hdata->GetBinContent(k)<0.5*(entries/6.)){
-               cluMapSA = kFALSE;
-               AliInfo(Form("SA tracks have few points on layer %d - look at histogram hESDClustersSA",k));
-             }
-           }  
-         }
 
-         else if(hname.Contains("hESDClusterMapMI") && entries>0.){
-           // Check if there are layers with anomalously low 
-           // contributing points to MI reconstructed tracks
-           AliDebug(1,Form("Processing histogram %s",hname.Data()));
-           cluMapMI = kTRUE;
-           for(Int_t k=1;k<7;k++){
-             // check if the layer was skipped
-             if(skipped[k-1]) continue;
-             if(hdata->GetBinContent(k)<0.5*(entries/6.)){
-               cluMapMI = kFALSE;
-               AliInfo(Form("MI tracks have few points on layer %d - look at histogram hESDClustersMI",k));
-             }
-           }  
-         }
 
-         else if(hname.Contains("hESDClustersMI") && entries>0.){
-           // Check if 6 clusters MI tracks are the majority
-           AliDebug(1,Form("Processing histogram %s",hname.Data()));
-           cluMI = kTRUE;
-           Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
-           for(Int_t k=2; k<7-nskipped; k++){
-             if(hdata->GetBinContent(k)>maxlaytracks){
-               cluMI = kFALSE;
-               AliInfo(Form("MI Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersMI",k-1,6-nskipped));
-             }
-           }
-         }
+  // basic checks on the QA histograms on the input list
+  //for the ITS subdetectorQA (Raws Digits Hits RecPoints SDigits) return the worst value of the three result
+  if(index == AliQAv1::kESD){
 
-         else if(hname.Contains("hESDClustersSA") && entries>0.){
-           // Check if 6 clusters SA tracks are the majority
-           AliDebug(1,Form("Processing histogram %s",hname.Data()));
-           cluSA = kTRUE;
-           Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
-           for(Int_t k=2; k<7-nskipped; k++){
-             if(hdata->GetBinContent(k)>maxlaytracks){
-               cluSA = kFALSE;
-               AliInfo(Form("SA Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersSA",k-1,6-nskipped));
-             }
-           }
-         }
+    Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ; 
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      rv[specie] = 0.0 ; 
+      if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) 
+        continue ; 
+      AliDebug(AliQAv1::GetQADebugLevel(),"Checker for ESD");
+      Int_t tested = 0;
+      Int_t empty = 0;
+      // The following flags are set to kTRUE if the corresponding
+      // QA histograms exceed a given quality threshold
+      Bool_t cluMapSA = kFALSE;
+      Bool_t cluMapMI = kFALSE;
+      Bool_t cluMI = kFALSE;
+      Bool_t cluSA = kFALSE;
+      Bool_t verSPDZ = kFALSE;
+      if (list[specie]->GetEntries() == 0) {
+        rv[specie] = 0.; // nothing to check
+      }
+      else {
+       Double_t *stepbit=new Double_t[AliQAv1::kNBIT];
+       Double_t histonumb= list[specie]->GetEntries();
+       CreateStepForBit(histonumb,stepbit); 
+        TIter next1(list[specie]);
+        TH1 * hdata;
+        Int_t nskipped=0;
+        Bool_t skipped[6]={kFALSE,kFALSE,kFALSE,kFALSE,kFALSE,kFALSE};
+        // look for layers that we wanted to skip
+        while ( (hdata = dynamic_cast<TH1 *>(next1())) ) {
+          if(!hdata) continue;
+          TString hname = hdata->GetName();
+          if(!hname.Contains("hESDSkippedLayers")) continue;
+          for(Int_t k=1; k<7; k++) {
+            if(hdata->GetBinContent(k)>0) { 
+              nskipped++; 
+              skipped[k-1]=kTRUE; 
+            } 
+          } 
+        }
+        TIter next(list[specie]);
+        while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
+          if(hdata){
+            TString hname = hdata->GetName();
+            Double_t entries = hdata->GetEntries();
+            ++tested;
+            if(!(entries>0.))++empty;
+            AliDebug(AliQAv1::GetQADebugLevel(),Form("ESD hist name %s - entries %12.1g",hname.Data(),entries));
+            if(hname.Contains("hESDClusterMapSA") && entries>0.){
+              cluMapSA = kTRUE;
+              AliDebug(AliQAv1::GetQADebugLevel(),Form("Processing histogram %s",hname.Data()));
+              // Check if there are layers with anomalously low 
+              // contributing points to SA reconstructed tracks
+              for(Int_t k=1;k<7;k++){
+                // check if the layer was skipped
+                if(skipped[k-1]) continue;
+                if(hdata->GetBinContent(k)<0.5*(entries/6.)){
+                  cluMapSA = kFALSE;
+                  AliDebug(AliQAv1::GetQADebugLevel(),Form("SA tracks have few points on layer %d - look at histogram hESDClustersSA",k));
+                }
+              }  
+            }
 
-         else if(hname.Contains("hSPDVertexZ") && entries>0.){
-           // Check if average Z vertex coordinate is -5 < z < 5 cm
-           AliDebug(1,Form("Processing histogram %s",hname.Data()));
-           verSPDZ = kTRUE;
-           if(hdata->GetMean()<-5. && hdata->GetMean()>5.){
-             verSPDZ = kFALSE;
-             AliInfo(Form("Average z vertex coordinate is at z= %10.4g cm",hdata->GetMean()));
-           }
-         }
+            else if(hname.Contains("hESDClusterMapMI") && entries>0.){
+              // Check if there are layers with anomalously low 
+              // contributing points to MI reconstructed tracks
+              AliDebug(AliQAv1::GetQADebugLevel(),Form("Processing histogram %s",hname.Data()));
+              cluMapMI = kTRUE;
+              for(Int_t k=1;k<7;k++){
+                // check if the layer was skipped
+                if(skipped[k-1]) continue;
+                if(hdata->GetBinContent(k)<0.5*(entries/6.)){
+                  cluMapMI = kFALSE;
+                  AliDebug(AliQAv1::GetQADebugLevel(),Form("MI tracks have few points on layer %d - look at histogram hESDClustersMI",k));
+                }
+              }  
+            }
 
+            else if(hname.Contains("hESDClustersMI") && entries>0.){
+              // Check if 6 clusters MI tracks are the majority
+              AliDebug(AliQAv1::GetQADebugLevel(),Form("Processing histogram %s",hname.Data()));
+              cluMI = kTRUE;
+              Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
+              for(Int_t k=2; k<7-nskipped; k++){
+                if(hdata->GetBinContent(k)>maxlaytracks){
+                  cluMI = kFALSE;
+                  AliDebug(AliQAv1::GetQADebugLevel(),Form("MI Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersMI",k-1,6-nskipped));
+                }
+              }
+            }
+
+            else if(hname.Contains("hESDClustersSA") && entries>0.){
+              // Check if 6 clusters SA tracks are the majority
+              AliDebug(AliQAv1::GetQADebugLevel(),Form("Processing histogram %s",hname.Data()));
+              cluSA = kTRUE;
+              Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
+              for(Int_t k=2; k<7-nskipped; k++){
+                if(hdata->GetBinContent(k)>maxlaytracks){
+                  cluSA = kFALSE;
+                  AliDebug(AliQAv1::GetQADebugLevel(), Form("SA Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersSA",k-1,6-nskipped));
+                }
+              }
+            }
+
+            else if(hname.Contains("hSPDVertexZ") && entries>0.){
+              // Check if average Z vertex coordinate is -5 < z < 5 cm
+              AliDebug(AliQAv1::GetQADebugLevel(),Form("Processing histogram %s",hname.Data()));
+              verSPDZ = kTRUE;
+              if(hdata->GetMean()<-5. && hdata->GetMean()>5.){
+                verSPDZ = kFALSE;
+                AliDebug(AliQAv1::GetQADebugLevel(),Form("Average z vertex coordinate is at z= %10.4g cm",hdata->GetMean()));
+              }
+            }
+          }
+          else{
+            AliError("ESD Checker - invalid data type");
+          }
        }
-       else{
-         AliError("ESD Checker - invalid data type");
-       }
-         
-       rv = 0.;
+       rv[specie] = 0.;
        if(tested>0){
          if(tested == empty){
-           rv = 0.1;
-           AliWarning("All ESD histograms are empty");
+           rv[specie] = 2500.; // set to error
+           AliWarning(Form("All ESD histograms are empty - specie=%d",specie));
          }
          else {
-           rv = 0.1+0.4*(static_cast<Double_t>(tested-empty)/static_cast<Double_t>(tested));
-           if(cluMapSA)rv+=0.1;
-           if(cluMapMI)rv+=0.1;
-           if(cluMI)rv+=0.1;
-           if(cluSA)rv+=0.1;
-           if(verSPDZ)rv+=0.1;
+           rv[specie] = 2500.-1500.*(static_cast<Double_t>(tested-empty)/static_cast<Double_t>(tested)); // INFO if all histos are filled
+           if(cluMapSA)rv[specie]-=200.;
+           if(cluMapMI)rv[specie]-=200.;
+           if(cluMI)rv[specie]-=200.;
+           if(cluSA)rv[specie]-=200.;
+           if(verSPDZ)rv[specie]-=199.;  // down to 1 if everything is OK
          }
        }
-  
       }
-    }  
-    AliInfo(Form("ESD - Tested %d histograms, Return value %f \n",tested,rv));
-    return rv;
+      //     AliDebug(AliQAv1::GetQADebugLevel(), Form("ESD - Tested %d histograms, Return value %f \n",tested,rv[specie]));
+      AliInfo(Form("ESD - Tested %d histograms, Return value %f \n",tested,rv[specie]));
+    }
+    return rv ; 
   }  // end of ESD QA
-
+  
+  Double_t * retval = new Double_t[AliRecoParam::kNSpecies] ; 
   //____________________________________________________________________________
 
-  Double_t spdCheck, sddCheck, ssdCheck;
-  Double_t retval = 1.;
-  //pixel
-  if(fDet == 0 || fDet == 1) {
-    AliDebug(1,"AliITSQAChecker::Create SPD Checker\n");
-    if(!fSPDChecker) {
-      fSPDChecker = new AliITSQASPDChecker();
-    }
-    fSPDChecker->SetTaskOffset(fSPDOffset);
-    spdCheck = fSPDChecker->Check(index, list);
-    if(spdCheck<retval)retval = spdCheck;
-  }
-  //drift
-  if(fDet == 0 || fDet == 2) {
-    AliDebug(1,"AliITSQAChecker::Create SDD Checker\n");
-    if(!fSDDChecker) {
-      fSDDChecker = new AliITSQASDDChecker();
-    }
-    fSDDChecker->SetTaskOffset(fSDDOffset);
-    sddCheck = fSDDChecker->Check(index, list);
-    if(sddCheck<retval)retval = sddCheck;
-  }
-  //strip
-  if(fDet == 0 || fDet == 3) {
-    AliDebug(1,"AliITSQAChecker::Create SSD Checker\n");
-    if(!fSSDChecker) {
-      fSSDChecker = new AliITSQASSDChecker();
-      AliInfo(Form("Number of monitored objects SSD: %d", list->GetEntries()));
-    }
-    fSSDChecker->SetTaskOffset(fSSDOffset);
-    ssdCheck = fSSDChecker->Check(index, list);
-    if(ssdCheck<retval)retval = ssdCheck;  }
-  // here merging part for common ITS QA result
-  // 
-  AliDebug(1,Form("AliITSQAChecker::QAChecker returned value is %f \n",retval));
-  return retval;
-  
+  Double_t spdCheck[AliRecoParam::kNSpecies] ;
+  Double_t sddCheck[AliRecoParam::kNSpecies] ;
+  Double_t ssdCheck[AliRecoParam::kNSpecies] ;
+
+
+
+    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+      if ( AliQAv1::Instance()->IsEventSpecieSet(specie) ) {
+       Double_t histotot=list[specie]->GetEntries();
+       if(histotot!=0)
+         {
+           spdCheck[specie]=0.;
+           sddCheck[specie]=0.;
+           ssdCheck[specie]=0.;
+           retval[specie] = 0.0 ;// 
+           //pixel
+           if(fDet == 0 || fDet == 1) {
+             fSPDChecker->SetTaskOffset(fSPDOffset);
+             //printf("spdoffset = %i \n",fSPDOffset );
+             Double_t histoSPD=double(GetSPDHisto());
+
+             Double_t *stepSPD=new Double_t[AliQAv1::kNBIT];
+             CreateStepForBit(histoSPD,stepSPD);
+             fSPDChecker->SetStepBit(stepSPD);
+             spdCheck[specie] = fSPDChecker->Check(index, list[specie], recoParam);
+             if(spdCheck[specie]>fUpTestValue[AliQAv1::kFATAL]||spdCheck[specie]<0.)
+               {
+                 AliInfo(Form("SPD check result for %s  is out of range (%f)!!! Retval of specie %s is sit to -1\n ",AliQAv1::GetAliTaskName(index),spdCheck[specie],AliRecoParam::GetEventSpecieName(specie)));
+                 spdCheck[specie]=fUpTestValue[AliQAv1::kFATAL];
+               }
+             //if(spdCheck[specie]<0.5)AliInfo(Form("SPD check result  for %s (%s) is < 0.5 .The result is %f ",AliQAv1::GetAliTaskName(index),AliRecoParam::GetEventSpecieName(specie),spdCheck[specie]) );
+             delete []stepSPD;
+             retval[specie]=spdCheck[specie];
+           }
+           //drift
+           if(fDet == 0 || fDet == 2) {
+             fSDDChecker->SetTaskOffset(fSDDOffset);
+             Double_t histoSDD=double(GetSDDHisto());
+             Double_t *stepSDD=new Double_t[AliQAv1::kNBIT];
+             CreateStepForBit(histoSDD,stepSDD);
+             fSDDChecker->SetStepBit(stepSDD);
+             sddCheck[specie] = fSDDChecker->Check(index, list[specie], recoParam);
+             if(sddCheck[specie]>fUpTestValue[AliQAv1::kFATAL]||sddCheck[specie]<0.)
+               {
+                 AliInfo(Form("SDD check result for %s  is out of range (%f)!!! Retval of specie %s is sit to -1\n ",AliQAv1::GetAliTaskName(index),sddCheck[specie],AliRecoParam::GetEventSpecieName(specie)));
+                 sddCheck[specie]=fUpTestValue[AliQAv1::kFATAL];
+               }
+             //if(sddCheck[specie]<0.5)AliInfo(Form("SDD check result  for %s (%s) is < 0.5 .The result is %f\f ",AliQAv1::GetAliTaskName(index),AliRecoParam::GetEventSpecieName(specie),sddCheck[specie]) );
+             delete []stepSDD;
+             if(sddCheck[specie]>retval[specie])retval[specie]=sddCheck[specie];  
+           }
+           //strip
+           if(fDet == 0 || fDet == 3) {
+             fSSDChecker->SetTaskOffset(fSSDOffset);
+             Double_t histoSSD=double(GetSSDHisto());
+             Double_t *stepSSD=new Double_t[AliQAv1::kNBIT];
+             CreateStepForBit(histoSSD,stepSSD);
+             fSSDChecker->SetStepBit(stepSSD);
+             ssdCheck[specie] = fSSDChecker->Check(index, list[specie], recoParam);
+             if(ssdCheck[specie]>fUpTestValue[AliQAv1::kFATAL]||ssdCheck[specie]<0.)
+               {
+                 AliInfo(Form("SSD check result for %s is out of range (%f)!!! Retval of specie %s is sit to -1\n ",AliQAv1::GetAliTaskName(index),ssdCheck[specie],AliRecoParam::GetEventSpecieName(specie)));
+                 ssdCheck[specie]=fUpTestValue[AliQAv1::kFATAL];
+               }
+             //if(ssdCheck[specie]<0.5)AliInfo(Form("SSD check result  for %s (%s) is < 0.5 . The result is %f ",AliQAv1::GetAliTaskName(index),AliRecoParam::GetEventSpecieName(specie),ssdCheck[specie]) );
+             delete [] stepSSD;
+             if(ssdCheck[specie]>retval[specie])retval[specie]=ssdCheck[specie];
+           }
+           
+           AliInfo(Form("Check result for %s: \n\t  SPD %f \n\t  SDD %f \n\t  SSD %f \n Check result %f \n ",AliQAv1::GetAliTaskName(index),spdCheck[specie],sddCheck[specie],ssdCheck[specie],retval[specie]));
+           // here merging part for common ITS QA result
+           // 
+         }//end entries
+      }//end if event specie
+    }//end for
+    return retval;  
 }
 
 
@@ -274,6 +341,15 @@ void AliITSQAChecker::SetTaskOffset(Int_t SPDOffset, Int_t SDDOffset, Int_t SSDO
   fSSDOffset = SSDOffset;
 }
 
+//____________________________________________________________________________
+void AliITSQAChecker::SetHisto(Int_t SPDhisto, Int_t SDDhisto, Int_t SSDhisto)
+{
+  //Setting the 3 offsets for each task called
+  fSPDHisto = SPDhisto;
+  fSDDHisto = SDDhisto;
+  fSSDHisto = SSDhisto;
+}
+
  //____________________________________________________________________________
  void AliITSQAChecker::SetDetTaskOffset(Int_t subdet,Int_t offset)
  {
@@ -293,3 +369,101 @@ void AliITSQAChecker::SetTaskOffset(Int_t SPDOffset, Int_t SDDOffset, Int_t SSDO
      break;
    }
  }
+
+ //____________________________________________________________________________
+ void AliITSQAChecker::SetDetHisto(Int_t subdet,Int_t histo)
+ {
+   switch(subdet){
+   case 1:
+     SetSPDHisto(histo);
+     break;
+   case 2:
+     SetSDDHisto(histo);
+     break;
+   case 3:
+     SetSSDHisto(histo);
+     break;
+   default:
+     AliWarning("No specific (SPD,SDD or SSD) subdetector correspond to to this number!!! all offsets set to zero for all the detectors\n");
+     SetHisto(0, 0, 0);
+     break;
+   }
+ }
+
+//_____________________________________________________________________________
+
+void AliITSQAChecker::InitQACheckerLimits()
+{
+  
+  AliInfo("Setting of tolerance values\n");
+
+  Float_t lowtolerancevalue[AliQAv1::kNBIT];
+
+  Float_t hightolerancevalue[AliQAv1::kNBIT];
+  for(Int_t bit=0;bit<AliQAv1::kNBIT;bit++)
+    {
+      lowtolerancevalue[bit]=(bit*1000.);
+      hightolerancevalue[bit]=((bit+1.)*1000.);
+    }
+  SetHiLo(hightolerancevalue,lowtolerancevalue);
+  //  AliInfo(Form("Range Value  \n INFO    -> %f <  value <  %f \n WARNING -> %f <  value <= %f \n ERROR   -> %f <  value <= %f \n FATAL   -> %f <= value <  %f \n", fLowTestValue[AliQAv1::kINFO], fUpTestValue[AliQAv1::kINFO], fLowTestValue[AliQAv1::kWARNING], fUpTestValue[AliQAv1::kWARNING], fLowTestValue[AliQAv1::kERROR], fUpTestValue[AliQAv1::kERROR], fLowTestValue[AliQAv1::kFATAL], fUpTestValue[AliQAv1::kFATAL]  ));
+
+  if(fDet == 0 || fDet == 1) {
+    fSPDChecker->SetSPDLimits( lowtolerancevalue,hightolerancevalue );
+  }
+  if(fDet == 0 || fDet == 2) {
+    fSDDChecker->SetSDDLimits( lowtolerancevalue,hightolerancevalue );
+  }
+  if(fDet == 0 || fDet == 3) {
+    fSSDChecker->SetSSDLimits( lowtolerancevalue,hightolerancevalue );
+  }
+
+
+  
+}
+
+
+//_____________________________________________________________________________
+
+void AliITSQAChecker::CreateStepForBit(Double_t histonumb,Double_t *steprange)
+{
+  for(Int_t bit=0;bit < AliQAv1::kNBIT; bit++)
+    {       
+      //printf("%i\t %f \t %f \t %f \n",bit, fUpTestValue[bit],fLowTestValue[AliQAv1::kINFO],histonumb);
+      steprange[bit]=double((fUpTestValue[bit] - fLowTestValue[AliQAv1::kINFO])/histonumb);
+      //printf("%i\t %f \t %f \t %f \t %f\n",bit, fUpTestValue[bit],fLowTestValue[AliQAv1::kINFO],histonumb,steprange[bit] );
+    }
+  //AliInfo(Form("StepBitValue:numner of histo %f\n\t INFO %f \t WARNING %f \t ERROR %f \t FATAL %f \n",histonumb, steprange[AliQAv1::kINFO],steprange[AliQAv1::kWARNING],steprange[AliQAv1::kERROR],steprange[AliQAv1::kFATAL]));
+}
+
+
+//_____________________________________________________________________________
+void AliITSQAChecker::SetQA(AliQAv1::ALITASK_t index, Double_t * value) const
+{
+
+  AliQAv1 * qa = AliQAv1::Instance(index) ;
+
+
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+
+    if (! qa->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)))
+      continue ;
+    if (  value == NULL ) { // No checker is implemented, set all QA to Fatal
+      qa->Set(AliQAv1::kFATAL, specie) ; 
+    } else {
+      if ( value[specie] > fLowTestValue[AliQAv1::kFATAL] && value[specie] <= fUpTestValue[AliQAv1::kFATAL] ) 
+        qa->Set(AliQAv1::kFATAL, AliRecoParam::ConvertIndex(specie)) ; 
+      else if ( value[specie] > fLowTestValue[AliQAv1::kERROR] && value[specie] <= fUpTestValue[AliQAv1::kERROR]  )
+        qa->Set(AliQAv1::kERROR, AliRecoParam::ConvertIndex(specie)) ; 
+      else if ( value[specie] > fLowTestValue[AliQAv1::kWARNING] && value[specie] <= fUpTestValue[AliQAv1::kWARNING]  )
+        qa->Set(AliQAv1::kWARNING, AliRecoParam::ConvertIndex(specie)) ;
+      else if ( value[specie] > fLowTestValue[AliQAv1::kINFO] && value[specie] <= fUpTestValue[AliQAv1::kINFO] ) 
+        qa->Set(AliQAv1::kINFO, AliRecoParam::ConvertIndex(specie)) ;  
+      //else if(value[specie]==0) qa->Set(AliQAv1::kFATAL, AliRecoParam::ConvertIndex(specie)) ; //no ckeck has been done
+    }
+    qa->ShowStatus(AliQAv1::kITS,index,AliRecoParam::ConvertIndex(specie));
+  }//end for
+
+}
+
+