Changes related to the extraction of the V0 finder into a separate class (A. Dainese...
[u/mrichter/AliRoot.git] / ITS / AliITSQASSDDataMakerRec.cxx
index 75f573e..e07ffac 100644 (file)
@@ -34,7 +34,7 @@
 #include "AliITSQASSDDataMakerRec.h"
 #include "AliQADataMakerRec.h"
 #include "AliLog.h"
-#include "AliQA.h"
+#include "AliQAv1.h"
 #include "AliQAChecker.h"
 #include "AliRawReader.h"
 #include "AliRawReaderRoot.h"
@@ -42,6 +42,8 @@
 #include "AliITSgeomTGeo.h"
 #include "AliRawEventHeaderBase.h"
 #include "AliITSRecPoint.h"
+#include "AliITSdigitSSD.h"
+#include "AliITSBadChannelsSSDv2.h"
 
 #include "AliCDBManager.h"
 #include "AliCDBEntry.h"
@@ -55,22 +57,28 @@ fSSDEvent(0),
 fSSDEventPerCycle(0),
 fkOnline(kMode),
 fLDC(ldc),
-fSSDRawsOffset(0),
+fSSDRawsOffset(0), fSSDRawsDAOffset(0),
 fSSDRawsCommonLevelOffset(0),
-fSSDhTask(0),
-fGenOffset(0) {
+fSSDhRawsTask(0),
+fSSDhDigitsTask(0),
+fSSDhRecPointsTask(0),
+fGenRawsOffset(0),
+fGenDigitsOffset(0),
+fGenRecPointsOffset(0),
+fCDBManager(0) {
   // Default constructor   
   //initilize the raw signal vs strip number histograms
   if(fkOnline) {
-    AliCDBManager * man = AliCDBManager::Instance();
-    man->SetDefaultStorage("local://$ALICE_ROOT");
+    fCDBManager = AliCDBManager::Instance();
+    //fCDBManager->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+    fCDBManager->SetDefaultStorage(gSystem->Getenv("AMORE_CDB_URI"));
     Int_t runNumber = atoi(gSystem->Getenv("DATE_RUN_NUMBER"));
     if(!runNumber) 
-      AliInfo("DATE_RUN_NUMBER not defined!!!\n");
+      AliWarning("DATE_RUN_NUMBER not defined!!!\n");
     
-    man->SetRun(runNumber);
-    AliCDBEntry *geomGRP = man->Get("GRP/Geometry/Data");
-    if(!geomGRP) AliInfo("GRP geometry not found!!!\n");
+    fCDBManager->SetRun(runNumber);
+    AliCDBEntry *geomGRP = fCDBManager->Get("GRP/Geometry/Data");
+    if(!geomGRP) AliWarning("GRP geometry not found!!!\n");
     
     Int_t gLayer = 0,gLadder = 0, gModule = 0;
     Int_t gHistCounter = 0;
@@ -86,12 +94,13 @@ fGenOffset(0) {
       gHistCounter += 1;
       
       for(Int_t iStrip = 0; iStrip < 2*fgkNumberOfPSideStrips; iStrip++)
-       fOccupancyMatrix[iModule][iStrip] = 0; 
+       fOccupancyMatrix[iModule-500][iStrip] = 0; 
     }//module loop
   }//online flag
   else {
     for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++) 
       fHistSSDRawSignalModule[iModule]=NULL;
+    fCDBManager = NULL;
   }
 }
 
@@ -103,10 +112,15 @@ fSSDEvent(qadm.fSSDEvent),
 fSSDEventPerCycle(qadm.fSSDEventPerCycle),
 fkOnline(qadm.fkOnline),
 fLDC(qadm.fLDC),
-fSSDRawsOffset(qadm.fSSDRawsOffset),
+fSSDRawsOffset(qadm.fSSDRawsOffset), fSSDRawsDAOffset(qadm.fSSDRawsDAOffset),
 fSSDRawsCommonLevelOffset(qadm.fSSDRawsCommonLevelOffset),
-fSSDhTask(qadm.fSSDhTask),
-fGenOffset(qadm.fGenOffset) {
+fSSDhRawsTask(qadm.fSSDhRawsTask),
+fSSDhDigitsTask(qadm.fSSDhDigitsTask),
+fSSDhRecPointsTask(qadm.fSSDhRecPointsTask),
+fGenRawsOffset(qadm.fGenRawsOffset),
+fGenDigitsOffset(qadm.fGenDigitsOffset),
+fGenRecPointsOffset(qadm.fGenRecPointsOffset),
+fCDBManager(qadm.fCDBManager) {
   //copy ctor 
   fAliITSQADataMakerRec->SetName((const char*)qadm.fAliITSQADataMakerRec->GetName()) ; 
   fAliITSQADataMakerRec->SetTitle((const char*)qadm.fAliITSQADataMakerRec->GetTitle());
@@ -126,23 +140,77 @@ AliITSQASSDDataMakerRec::~AliITSQASSDDataMakerRec() {
   // destructor
   for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++)
     if(fHistSSDRawSignalModule[iModule]) delete fHistSSDRawSignalModule[iModule];
+  if(fCDBManager) delete fCDBManager;
 }
 
 //____________________________________________________________________________ 
 void AliITSQASSDDataMakerRec::StartOfDetectorCycle()
 {
+  if (  fAliITSQADataMakerRec->GetRawsData(0) == NULL ) // Raws not defined
+    return ; 
+
   //Detector specific actions at start of cycle
-  AliDebug(1,"AliITSQADM::Start of SSD Cycle\n");
+  AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of SSD Cycle\n");    
+
+  //Data size per DDL
+  ((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+4)))->Reset();
+  //Data size per LDC
+  ((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+22)))->Reset();
+
+  //online part
+  if(fkOnline) {
+    for(Int_t iModule = 500; iModule < fgkSSDMODULES + 500; iModule++) {
+      for(Int_t iStrip = 0; iStrip < 2*fgkNumberOfPSideStrips; iStrip++)
+       fOccupancyMatrix[iModule-500][iStrip] = 0; 
+    }//module loop
+
+    Int_t gHistPositionOccupancyPerLadder = 0;
+    Int_t gLayer = 0, gLadder = 0, gModule = 0;
+    for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++) {
+      AliITSgeomTGeo::GetModuleId(iModule+500,gLayer,gLadder,gModule);
+      
+      gHistPositionOccupancyPerLadder = (gLayer == 5) ? 2*(gLadder - 1) : 2*(gLadder - 1 + fgkSSDLADDERSLAYER5);
+      
+      //P-SIDE OCCUPANCY
+      fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder)->Reset();
+      //N-SIDE OCCUPANCY
+      fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder+1)->Reset();
+
+      ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6))->Reset();
+      ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1))->Reset();
+    }//module loop
+  }//online flag
 }
 
 //____________________________________________________________________________ 
-void AliITSQASSDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)
+void AliITSQASSDDataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t /*task*/, TObjArray* /*list*/)
 {
   // launch the QA checking
-  AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n"); 
-  
+  // launch the QA checking
+  AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n"); 
+  AliDebug(AliQAv1::GetQADebugLevel(), Form("Offset: %d\n",fGenRawsOffset));
+
+  if (fAliITSQADataMakerRec->GetRawsData(0) != NULL ) {
+    //Data size per DDL
+    for(Int_t i = 0; i < fgkNumOfDDLs; i++) {
+      Double_t gSizePerDDL = ((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+5+i))->GetMean();
+      //cout<<"DDL: "<<i+2<<" - Size: "<<gSizePerDDL<<" - Mean: "<<
+      //(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+5+i))->GetMean()<<endl;
+      ((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+4)))->SetBinContent(i+2,gSizePerDDL);
+    }
+    
+    //Data size per LDC
+    for(Int_t i = 0; i < fgkNumOfLDCs; i++) {
+      Double_t gSizePerLDC = ((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+23+i))->GetMean();
+      ((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+22)))->SetBinContent(i+6,gSizePerLDC);
+    }
+  }//raw data end of cycle
+
   //online part
   if(fkOnline) {
+    //Output of the DA
+    MonitorOCDBObjects();
+
     Int_t gHistPositionOccupancyPerModule = 0;
     Int_t gLayer = 0, gLadder = 0, gModule = 0;
     //occupancy per module
@@ -151,118 +219,162 @@ void AliITSQASSDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjAr
 
       gHistPositionOccupancyPerModule = (gLayer == 5) ? ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + gModule - 1) : ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + gModule + fgkSSDMODULESLAYER5 - 1);
       for(Int_t iBins = 1; iBins < fHistSSDRawSignalModule[iModule]->GetXaxis()->GetNbins(); iBins++)
-       fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule)->SetBinContent(iBins,fOccupancyMatrix[iModule][iBins-1]);
+       fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule)->SetBinContent(iBins,fOccupancyMatrix[iModule][iBins-1]);
       
       if(fSSDEventPerCycle != 0)
-       ((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule)))->Scale(100./fSSDEventPerCycle);
+       ((TH1F *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule)))->Scale(100./fSSDEventPerCycle);
     }//module loop
 
     //occupancy per ladder
     Int_t gHistPositionOccupancyPerLadder = 0;
     Int_t lLadderLocationY = 0;
-    Double_t occupancy = 0.0;
+    Double_t occupancy = 0.0, occupancyThreshold = 0.0, occupancyAverage = 0.0;
     for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++) {
       AliITSgeomTGeo::GetModuleId(iModule+500,gLayer,gLadder,gModule);
       
       gHistPositionOccupancyPerModule = (gLayer == 5) ? ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + gModule - 1) : ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + gModule + fgkSSDMODULESLAYER5 - 1);
       gHistPositionOccupancyPerLadder = (gLayer == 5) ? 2*(gLadder - 1) : 2*(gLadder - 1 + fgkSSDLADDERSLAYER5);
       
-      //P-SIDE OCCUPANCY                                                                                            
-      occupancy = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerModule),0);
-      fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+fgkSSDMODULES+gHistPositionOccupancyPerLadder)->Fill(gModule,occupancy);
+      //P-SIDE OCCUPANCY
+      occupancy = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),0,0,0);
+      occupancyThreshold = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),0,1,3);
+      occupancyAverage = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),0,2,0);
+
+      fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder)->Fill(gModule,occupancy);
       lLadderLocationY = 3*gLadder; // sideP=1 sideN=0 
-      if(gLayer == 5)                                                               
-        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6))->SetBinContent(gModule,lLadderLocationY,occupancy);
-      else if(gLayer == 6)
-        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1))->SetBinContent(gModule,lLadderLocationY,occupancy);
-
-      //N-SIDE OCCUPANCY                                                                                            
-      occupancy = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerModule),1);   
-      fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+fgkSSDMODULES+gHistPositionOccupancyPerLadder+1)->Fill(gModule,occupancy);
-      if(gLayer == 5)                                                               
-        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6))->SetBinContent(gModule,lLadderLocationY-1,occupancy);
-      else if(gLayer == 6)
-        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1))->SetBinContent(gModule,lLadderLocationY-1,occupancy);
+      if(gLayer == 5) {
+       //occupancy per module - no threshold
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6))->SetBinContent(gModule,lLadderLocationY,occupancy);
+       //occupancy per module - threshold @ 3%
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+2))->SetBinContent(gModule,lLadderLocationY,occupancyThreshold);
+       //average occupancy per module
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+4))->SetBinContent(gModule,lLadderLocationY,occupancyAverage);
+      }
+      else if(gLayer == 6) {
+       //occupancy per module - no threshold
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1))->SetBinContent(gModule,lLadderLocationY,occupancy);
+       //occupancy per module - threshold @ 3%
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+3))->SetBinContent(gModule,lLadderLocationY,occupancyThreshold);
+       //average occupancy per module
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+5))->SetBinContent(gModule,lLadderLocationY,occupancyAverage);
+      }
+
+      //N-SIDE OCCUPANCY
+      occupancy = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),1,0,0);   
+      occupancyThreshold = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),1,1,3);   
+      occupancyAverage = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),1,2,0);   
+
+      fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder+1)->Fill(gModule,occupancy);
+      if(gLayer == 5) {
+       //occupancy per module - no threshold
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6))->SetBinContent(gModule,lLadderLocationY-1,occupancy);
+       //occupancy per module - threshold @ 3%
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+2))->SetBinContent(gModule,lLadderLocationY-1,occupancyThreshold);
+       //average occupancy per module
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+4))->SetBinContent(gModule,lLadderLocationY-1,occupancyAverage);
+      }
+      else if(gLayer == 6) {
+       //occupancy per module - no threshold
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1))->SetBinContent(gModule,lLadderLocationY-1,occupancy);
+       //occupancy per module - threshold @ 3%
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+3))->SetBinContent(gModule,lLadderLocationY-1,occupancyThreshold);
+       //average occupancy per module
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+5))->SetBinContent(gModule,lLadderLocationY-1,occupancyAverage);
+      }
     }//module loop
   }//online flag for SSD
 
   fSSDEventPerCycle = 0;
   
-  AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
+ // AliQAChecker::Instance()->Run( AliQAv1::kITS , task, list);
 }
 
 //____________________________________________________________________________ 
-void AliITSQASSDDataMakerRec::InitRaws() {  
+Int_t AliITSQASSDDataMakerRec::InitRaws() {  
   // Initialization for RAW data - SSD -
-    fGenOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
+  const Bool_t expert   = kTRUE ; 
+  const Bool_t saveCorr = kTRUE ; 
+  const Bool_t image    = kTRUE ; 
+  Int_t rv = 0 ; 
+//  fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
 
   if(fkOnline) {
-    AliInfo("Book Online Histograms for SSD\n");
+    AliDebug(AliQAv1::GetQADebugLevel(), "Book Online Histograms for SSD\n");
   }
   else {
-    AliInfo("Book Offline Histograms for SSD\n ");
+    AliDebug(AliQAv1::GetQADebugLevel(), "Book Offline Histograms for SSD\n ");
   }
-  AliInfo(Form("Number of histograms (SPD+SDD): %d\n",fGenOffset));
+  AliDebug(AliQAv1::GetQADebugLevel(), Form("Number of histograms (SPD+SDD): %d\n",fGenRawsOffset));
   TString gTitle = 0;
+  TString gName  = 0;
   //book online-offline QA histos
-  TH1F *fHistSSDEventType = new TH1F("fHistSSDEventType",
-                                    ";Event type;Events",
+  TH1D *fHistSSDEventType = new TH1D("fHistSSDEventType",
+                                    "SSD Event Type;Event type;Events",
                                     31,-1,30);
-  fAliITSQADataMakerRec->Add2RawsList(fHistSSDEventType, 
-                                     fGenOffset+fSSDRawsOffset);
+  rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDEventType, 
+                                     fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
   fSSDRawsOffset += 1;
-  TH1F *fHistSSDDataSize = new TH1F("fHistSSDDataSize",
-                                   ";log(SSD data size) [Bytes];Events",
-                                   100,3,8);
-  fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSize, 
-                                     fGenOffset+fSSDRawsOffset);
+  TH1D *fHistSSDDataSize = new TH1D("fHistSSDDataSize",
+                                   "SSD Data Size;(SSD data size) [KB];Events",
+                                   1000,0,500);
+  rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSize, 
+                                     fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
   fSSDRawsOffset += 1;
-  TH1F *fHistSSDDataSizePercentage = new TH1F("fHistSSDDataSizePercentage",
-                                             ";SSD data size [%];Events",
-                                             100,0,100);
-  fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePercentage, 
-                                     fGenOffset+fSSDRawsOffset);
+  TH1D *fHistSSDDataSizePercentage = new TH1D("fHistSSDDataSizePercentage",
+                                             "SSD Data Size Percentage;SSD data size [%];Events",
+                                             1000,0,100);
+  rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePercentage, 
+                                     fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
   fSSDRawsOffset += 1;
-  TH1F *fHistSSDDDLId = new TH1F("fHistSSDDDLId",
-                                ";DDL id;Events",20,510.5,530.5);
-  fAliITSQADataMakerRec->Add2RawsList(fHistSSDDDLId, 
-                                     fGenOffset+fSSDRawsOffset);
+  TH1D *fHistSSDDDLId = new TH1D("fHistSSDDDLId",
+                                "SSD DDL Id;DDL id;Events",20,510.5,530.5);
+  rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDDLId, 
+                                     fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
   fSSDRawsOffset += 1;
-  TH1F *fHistSSDDataSizePerDDL = new TH1F("fHistSSDDataSizePerDDL",
-                                         ";DDL id;<SSD data size> [MB]",
+  TH1D *fHistSSDDataSizePerDDL = new TH1D("fHistSSDDataSizePerDDL",
+                                         "SSD Data Size Per DDL;DDL id;<SSD data size> [KB]",
                                          20,510.5,530.5);
-  fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerDDL, 
-                                     fGenOffset+fSSDRawsOffset);
+  rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerDDL, 
+                                     fGenRawsOffset+fSSDRawsOffset, !expert, image, !saveCorr);
   fSSDRawsOffset += 1;
-  TH1F *fHistSSDDataSizeDDL[fgkNumOfDDLs];
+  TH1D *fHistSSDDataSizeDDL[fgkNumOfDDLs];
   for(Int_t i = 1; i < fgkNumOfDDLs+1; i++) {
-    gTitle = "fHistSSDDataSizeDDL"; gTitle += i+511;
-    fHistSSDDataSizeDDL[i-1] = new TH1F(gTitle.Data(),
-                                       ";log(SSD data size) [Bytes];Events",
-                                       100,1,8);
-    fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeDDL[i-1], 
-                                       fGenOffset+fSSDRawsOffset);
+    gName = Form("fHistSSDDataSizeDDL%d", i+511) ;
+    gTitle = Form("SSD Data Size DDL %d", i+511) ;
+    fHistSSDDataSizeDDL[i-1] = new TH1D(gName.Data(),
+                                        Form("%s;(SSD data size) [KB];Events", gTitle.Data()),
+                                        1000,0,50);
+    rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeDDL[i-1], 
+                                       fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
     fSSDRawsOffset += 1;
   }
   
-  TH1F *fHistSSDLDCId = new TH1F("fHistSSDLDCId",";LDC id;Events",10,0.5,10.5);
-  fAliITSQADataMakerRec->Add2RawsList(fHistSSDLDCId, 
-                                     fGenOffset+fSSDRawsOffset);
+  TH1D *fHistSSDLDCId = new TH1D("fHistSSDLDCId","SSD LDC Id;LDC id;Events",10,0.5,10.5);
+  rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDLDCId, 
+                                     fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
   fSSDRawsOffset += 1;
-  TH1F *fHistSSDDataSizePerLDC = new TH1F("fHistSSDDataSizePerLDC",
-                                         ";LDC id;<SSD data size> [MB]",
-                                         100,0,20);
-  fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerLDC, 
-                                     fGenOffset+fSSDRawsOffset);
+  TH1D *fHistSSDDataSizePerLDC = new TH1D("fHistSSDDataSizePerLDC",
+                                         "SSD Data Size Per LDC;LDC id;<SSD data size> [KB]",
+                                         20,0.5,20.5);
+  rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerLDC, 
+                                     fGenRawsOffset+fSSDRawsOffset, !expert, image, !saveCorr);
   fSSDRawsOffset += 1;
-  TH1F *fHistSSDDataSizeLDC[fgkNumOfLDCs];
+  TH1D *fHistSSDDataSizeLDC[fgkNumOfLDCs];
   for(Int_t i = 1; i < fgkNumOfLDCs+1; i++) {
-    gTitle = "fHistSSDDataSizeLDC"; gTitle += i;
-    fHistSSDDataSizeLDC[i-1] = new TH1F(gTitle.Data(),
-                                       ";log(SSD data size) [Bytes];Events",
-                                       100,1,8);
-    fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeLDC[i-1], 
-                                       fGenOffset+fSSDRawsOffset);
+    gName = "fHistSSDDataSizeLDC"; 
+    if(i == 1) gName += "082";
+    if(i == 2) gName += "086";
+    if(i == 3) gName += "085";
+    
+    gTitle = "SSD Data Size LDC "; 
+    if(i == 1) gTitle += "082";
+    if(i == 2) gTitle += "086";
+    if(i == 3) gTitle += "085";
+    fHistSSDDataSizeLDC[i-1] = new TH1D(gName.Data(),
+                                       Form("%s;SSD data size [KB];Events", gTitle.Data()),
+                                       1000,0,100);
+    rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeLDC[i-1], 
+                                       fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
     fSSDRawsOffset += 1;
   }
   fSSDRawsCommonLevelOffset = fSSDRawsOffset;
@@ -273,19 +385,28 @@ void AliITSQASSDDataMakerRec::InitRaws() {
     TH1D *fHistSSDOccupancyModule[fgkSSDMODULES]; 
     for(Int_t i = 500; i < fgkSSDMODULES + 500; i++) {
       AliITSgeomTGeo::GetModuleId(i,gLayer,gLadder,gModule);
-      gTitle = "fHistSSD_Occupancy_Layer"; gTitle += gLayer;
-      gTitle += "_Ladder"; 
-      if(gLayer == 5)
-       gTitle += 499+gLadder;
-      if(gLayer == 6)
-       gTitle += 599+gLadder;
+      gName = "fHistSSD_Occupancy_Layer";
+      gTitle = "SSD Occupancy Layer";
+      if(gLayer == 5) {
+        gName += gLayer; gName += "_Ladder"; 
+        gName += 499+gLadder;
+        gTitle += gLayer; gTitle += "_Ladder"; 
+        gTitle += 499+gLadder;
+      }
+      if(gLayer == 6) {
+        gName += gLayer; gName += "_Ladder"; 
+        gName += 599+gLadder;
+        gTitle += gLayer; gTitle += "_Ladder"; 
+        gTitle += 599+gLadder;
+      }
+      gName += "_Module"; gName += gModule; 
       gTitle += "_Module"; gTitle += gModule; 
-      fHistSSDOccupancyModule[i-500] = new TH1D(gTitle.Data(),gTitle.Data(),
-                                               2*fgkNumberOfPSideStrips,0,2*fgkNumberOfPSideStrips);
+
+      fHistSSDOccupancyModule[i-500] = new TH1D(gName.Data(),Form("%s;N_{strip};Occupancy [%]", gTitle.Data()),
+                                                2*fgkNumberOfPSideStrips,0,2*fgkNumberOfPSideStrips);
       fHistSSDOccupancyModule[i-500]->GetXaxis()->SetTitleColor(1);
-      fHistSSDOccupancyModule[i-500]->GetXaxis()->SetTitle("N_{strip}");
-      fHistSSDOccupancyModule[i-500]->GetYaxis()->SetTitle("Occupancy [%]");
-      fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyModule[i-500], fGenOffset+fSSDRawsOffset);
+      rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyModule[i-500], 
+                                         fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
       fSSDRawsOffset += 1;
     }
 
@@ -294,81 +415,243 @@ void AliITSQASSDDataMakerRec::InitRaws() {
     TH1D *fHistSSDOccupancyLadder[2*(fgkSSDLADDERSLAYER5 + fgkSSDLADDERSLAYER6)];
     for(Int_t iLayer = 5; iLayer < 7; iLayer++) {
       for(Int_t iLadder = 1; iLadder < AliITSgeomTGeo::GetNLadders(iLayer) + 1; iLadder++) {
-       //P-side occupancy plots
-       gTitle = "fHistSSD_Occupancy_Layer"; gTitle += iLayer;
-       gTitle += "_Ladder"; 
-       if(iLayer == 5)
-         gTitle += 499+iLadder;
-       if(iLayer == 6)
-         gTitle += 599+iLadder;
-       gTitle += "_PSide";
-       fHistSSDOccupancyLadder[occupancyCounter] = new TH1D(gTitle.Data(),
-                                                            gTitle.Data(),
-                                                            AliITSgeomTGeo::GetNDetectors(iLayer),
-                                                            0.5,AliITSgeomTGeo::GetNDetectors(iLayer)+0.5);
-       fHistSSDOccupancyLadder[occupancyCounter]->GetXaxis()->SetTitleColor(1);
-       fHistSSDOccupancyLadder[occupancyCounter]->GetXaxis()->SetTitle("Module number");
-       fHistSSDOccupancyLadder[occupancyCounter]->GetYaxis()->SetTitle("Occupancy [%]");
-       fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLadder[occupancyCounter], 
-                                           fGenOffset+fSSDRawsOffset);
-       occupancyCounter += 1; fSSDRawsOffset += 1;
-       //N-side occupancy plots
-       gTitle = "fHistSSD_Occupancy_Layer"; gTitle += iLayer;
-       gTitle += "_Ladder"; 
-       if(iLayer == 5)
-         gTitle += 499+iLadder;
-       if(iLayer == 6)
-         gTitle += 599+iLadder;
-       gTitle += "_NSide";
-       fHistSSDOccupancyLadder[occupancyCounter] = new TH1D(gTitle.Data(),
-                                                            gTitle.Data(),
-                                                            AliITSgeomTGeo::GetNDetectors(iLayer),
-                                                            0.5,AliITSgeomTGeo::GetNDetectors(iLayer)+0.5);
-       fHistSSDOccupancyLadder[occupancyCounter]->GetXaxis()->SetTitleColor(1);
-       fHistSSDOccupancyLadder[occupancyCounter]->GetXaxis()->SetTitle("Module number");
-       fHistSSDOccupancyLadder[occupancyCounter]->GetYaxis()->SetTitle("Occupancy [%]");
-       fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLadder[occupancyCounter], 
-                                           fGenOffset+fSSDRawsOffset);
-       occupancyCounter += 1; fSSDRawsOffset += 1;
+        //P-side occupancy plots
+        gName  = "fHistSSD_Occupancy_Layer"; 
+        gTitle = "SSD Occupancy Layer"; 
+        if(iLayer == 5) {
+          gName += iLayer; gName += "_Ladder"; 
+          gName += 499+iLadder;
+          gTitle += iLayer; gTitle += "_Ladder"; 
+          gTitle += 499+iLadder;
+        }
+        if(iLayer == 6) {
+          gName += iLayer; gName += "_Ladder"; 
+          gName += 599+iLadder;
+          gTitle += iLayer; gTitle += "_Ladder"; 
+          gTitle += 599+iLadder;
+        }
+        gName += "_PSide";
+        gTitle += "_PSide";
+        fHistSSDOccupancyLadder[occupancyCounter] = new TH1D(gName.Data(),
+                                                             Form("%s;Module number;Occupancy [%]", gTitle.Data()),
+                                                             AliITSgeomTGeo::GetNDetectors(iLayer),
+                                                             0.5,AliITSgeomTGeo::GetNDetectors(iLayer)+0.5);
+        fHistSSDOccupancyLadder[occupancyCounter]->GetXaxis()->SetTitleColor(1);
+        rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLadder[occupancyCounter], 
+                                            fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
+        occupancyCounter += 1; fSSDRawsOffset += 1;
+        //N-side occupancy plots
+        gName = "fHistSSD_Occupancy_Layer"; 
+        gTitle = "SSD Occupancy Layer"; 
+        if(iLayer == 5) {
+          gName += iLayer; gName += "_Ladder"; 
+          gName += 499+iLadder;
+          gTitle += iLayer; gTitle += "_Ladder"; 
+          gTitle += 499+iLadder;
+        }
+        if(iLayer == 6) {
+          gName += iLayer; gName += "_Ladder"; 
+          gName += 599+iLadder;
+          gTitle += iLayer; gTitle += "_Ladder"; 
+          gTitle += 599+iLadder;
+        }
+        gName += "_NSide";
+        gTitle += "_NSide";
+        fHistSSDOccupancyLadder[occupancyCounter] = new TH1D(gName.Data(),
+                                                             Form("%s;Module number;Occupancy [%]", gTitle.Data()),
+                                                             AliITSgeomTGeo::GetNDetectors(iLayer),
+                                                             0.5,AliITSgeomTGeo::GetNDetectors(iLayer)+0.5);
+        fHistSSDOccupancyLadder[occupancyCounter]->GetXaxis()->SetTitleColor(1);
+        rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLadder[occupancyCounter], 
+                                            fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
+        occupancyCounter += 1; fSSDRawsOffset += 1;
       }//ladder loop
     }//layer loop
 
     //top level occupancy plots
+    //occupancy per module - no threshold
     TH2D *fHistSSDOccupancyLayer5 = new TH2D("fHistSSDOccupancyLayer5",
-                                            ";N_{modules};N_{Ladders}",
+                                            "SSD Occupancy (Layer 5) - No threshold;N_{modules};N_{Ladders}",
                                             fgkSSDMODULESPERLADDERLAYER5,
                                             0,fgkSSDMODULESPERLADDERLAYER5,
                                             3*fgkSSDLADDERSLAYER5,
-                                            0,fgkSSDLADDERSLAYER5);  
+                                            5000,500+fgkSSDLADDERSLAYER5);  
+    fHistSSDOccupancyLayer5->GetZaxis()->SetRangeUser(0.0,100.0);
     Char_t fLabel[3];
     for(Int_t iBin = 1; iBin < fgkSSDMODULESPERLADDERLAYER5 + 1; iBin++){
       sprintf(fLabel,"%d",iBin);
       fHistSSDOccupancyLayer5->GetXaxis()->SetBinLabel(iBin,fLabel);
     }
-    fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer5, fGenOffset+fSSDRawsOffset);
+    rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer5, 
+                                       fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
     fSSDRawsOffset += 1;
     TH2D *fHistSSDOccupancyLayer6 = new TH2D("fHistSSDOccupancyLayer6",
-                                            ";N_{modules};N_{Ladders}",
+                                            "Occupancy per module (Layer 6) - No threshold;N_{modules};N_{Ladders}",
                                             fgkSSDMODULESPERLADDERLAYER6,
                                             0,fgkSSDMODULESPERLADDERLAYER6,
                                             3*fgkSSDLADDERSLAYER6,
-                                            0,fgkSSDLADDERSLAYER6);
+                                            600,600+fgkSSDLADDERSLAYER6);
+    fHistSSDOccupancyLayer6->GetZaxis()->SetRangeUser(0.0,100.0);
     for(Int_t iBin = 1; iBin < fgkSSDMODULESPERLADDERLAYER6 + 1; iBin++){
       sprintf(fLabel,"%d",iBin);
       fHistSSDOccupancyLayer6->GetXaxis()->SetBinLabel(iBin,fLabel);
     }
-    fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer6, fGenOffset+fSSDRawsOffset);
+    rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer6, 
+                                        fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
+    fSSDRawsOffset += 1;
+
+    //occupancy per module - threshold @ 3%
+    TH2D *fHistSSDOccupancyThresholdLayer5 = new TH2D("fHistSSDOccupancyThresholdLayer5",
+                                                     "Occupancy per module (Layer 5) - Threshold 3%;N_{modules};N_{Ladders};Entries",
+                                                     fgkSSDMODULESPERLADDERLAYER5,
+                                                     0,fgkSSDMODULESPERLADDERLAYER5,
+                                                     3*fgkSSDLADDERSLAYER5,
+                                                     500,500+fgkSSDLADDERSLAYER5);  
+    fHistSSDOccupancyThresholdLayer5->GetZaxis()->SetRangeUser(3.0,10.0);
+    for(Int_t iBin = 1; iBin < fgkSSDMODULESPERLADDERLAYER5 + 1; iBin++){
+      sprintf(fLabel,"%d",iBin);
+      fHistSSDOccupancyThresholdLayer5->GetXaxis()->SetBinLabel(iBin,fLabel);
+    }
+    rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyThresholdLayer5, 
+                                        fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
     fSSDRawsOffset += 1;
+    TH2D *fHistSSDOccupancyThresholdLayer6 = new TH2D("fHistSSDOccupancyThresholdLayer6",
+                                                     "Occupancy per module (Layer 6) - Threshold 3%;N_{modules};N_{Ladders}",
+                                                     fgkSSDMODULESPERLADDERLAYER6,
+                                                     0,fgkSSDMODULESPERLADDERLAYER6,
+                                                     3*fgkSSDLADDERSLAYER6,
+                                                     600,600+fgkSSDLADDERSLAYER6);
+    fHistSSDOccupancyThresholdLayer6->GetZaxis()->SetRangeUser(3.0,10.0);
+    for(Int_t iBin = 1; iBin < fgkSSDMODULESPERLADDERLAYER6 + 1; iBin++){
+      sprintf(fLabel,"%d",iBin);
+      fHistSSDOccupancyThresholdLayer6->GetXaxis()->SetBinLabel(iBin,fLabel);
+    }
+    rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyThresholdLayer6, 
+                                       fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
+    fSSDRawsOffset += 1;
+
+    //Average occupancy per module
+    TH2D *fHistSSDAverageOccupancyLayer5 = new TH2D("fHistSSDAverageOccupancyLayer5",
+                                                   "Average occupancy per module (Layer 5);N_{modules};N_{Ladders}",
+                                                   fgkSSDMODULESPERLADDERLAYER5,
+                                                   0,fgkSSDMODULESPERLADDERLAYER5,
+                                                   3*fgkSSDLADDERSLAYER5,
+                                                   500,500+fgkSSDLADDERSLAYER5);  
+    fHistSSDAverageOccupancyLayer5->GetZaxis()->SetRangeUser(0.0,5.0);
+    for(Int_t iBin = 1; iBin < fgkSSDMODULESPERLADDERLAYER5 + 1; iBin++){
+      sprintf(fLabel,"%d",iBin);
+      fHistSSDAverageOccupancyLayer5->GetXaxis()->SetBinLabel(iBin,fLabel);
+    }
+    rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDAverageOccupancyLayer5, 
+                                        fGenRawsOffset+fSSDRawsOffset);
+    fSSDRawsOffset += 1;
+    TH2D *fHistSSDAverageOccupancyLayer6 = new TH2D("fHistSSDAverageOccupancyLayer6",
+                                                   "Average occupancy per module (Layer 6);N_{modules};N_{Ladders}",
+                                                   fgkSSDMODULESPERLADDERLAYER6,
+                                                   0,fgkSSDMODULESPERLADDERLAYER6,
+                                                   3*fgkSSDLADDERSLAYER6,
+                                                   600,600+fgkSSDLADDERSLAYER6);
+    fHistSSDAverageOccupancyLayer6->GetZaxis()->SetRangeUser(0.0,5.0);
+    for(Int_t iBin = 1; iBin < fgkSSDMODULESPERLADDERLAYER6 + 1; iBin++){
+      sprintf(fLabel,"%d",iBin);
+      fHistSSDAverageOccupancyLayer6->GetXaxis()->SetBinLabel(iBin,fLabel);
+    }
+    rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDAverageOccupancyLayer6, 
+                                        fGenRawsOffset+fSSDRawsOffset, !expert, image, !saveCorr);
+    fSSDRawsOffset += 1;
+
+    //Output of the DA
+    TH2D *fHistPSideBadChannelMapLayer5 = new TH2D("fHistPSideBadChannelMapLayer5",
+                                                   "Layer 5;N_{module};N_{ladder}",
+                                                   22,1,23,
+                                                   34,500,534);
+    fHistPSideBadChannelMapLayer5->GetXaxis()->SetTitleColor(1);
+    fHistPSideBadChannelMapLayer5->SetStats(kFALSE);
+    fHistPSideBadChannelMapLayer5->GetYaxis()->SetTitleOffset(1.8);
+    fHistPSideBadChannelMapLayer5->GetXaxis()->SetNdivisions(22);
+    fHistPSideBadChannelMapLayer5->GetYaxis()->SetNdivisions(34);
+    fHistPSideBadChannelMapLayer5->GetXaxis()->SetLabelSize(0.03);
+    fHistPSideBadChannelMapLayer5->GetYaxis()->SetLabelSize(0.03);
+    fHistPSideBadChannelMapLayer5->GetZaxis()->SetTitleOffset(1.6);
+    fHistPSideBadChannelMapLayer5->GetZaxis()->SetTitle("Bad channels (p-side)[%]");
+    rv = fAliITSQADataMakerRec->Add2RawsList(fHistPSideBadChannelMapLayer5, 
+                                        fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
+    fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
+
+    TH2D *fHistNSideBadChannelMapLayer5 = new TH2D("fHistNSideBadChannelMapLayer5",
+                                                   "Layer 5;N_{module};N_{ladder}",
+                                                   22,1,23,
+                                                   34,500,534);
+    fHistNSideBadChannelMapLayer5->GetXaxis()->SetTitleColor(1);
+    fHistNSideBadChannelMapLayer5->SetStats(kFALSE);
+    fHistNSideBadChannelMapLayer5->GetYaxis()->SetTitleOffset(1.8);
+    fHistNSideBadChannelMapLayer5->GetXaxis()->SetNdivisions(22);
+    fHistNSideBadChannelMapLayer5->GetYaxis()->SetNdivisions(34);
+    fHistNSideBadChannelMapLayer5->GetXaxis()->SetLabelSize(0.03);
+    fHistNSideBadChannelMapLayer5->GetYaxis()->SetLabelSize(0.03);
+    fHistNSideBadChannelMapLayer5->GetZaxis()->SetTitleOffset(1.6);
+    fHistNSideBadChannelMapLayer5->GetZaxis()->SetTitle("Bad channels (n-side)[%]");
+    rv = fAliITSQADataMakerRec->Add2RawsList(fHistNSideBadChannelMapLayer5, 
+                                        fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
+    fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
+    
+    TH2D *fHistPSideBadChannelMapLayer6 = new TH2D("fHistPSideBadChannelMapLayer6",
+                                                   "Layer 6;N_{module};N_{ladder}",
+                                                   25,1,26,
+                                                   38,600,638);
+    fHistPSideBadChannelMapLayer6->GetXaxis()->SetTitleColor(1);
+    fHistPSideBadChannelMapLayer6->SetStats(kFALSE);
+    fHistPSideBadChannelMapLayer6->GetYaxis()->SetTitleOffset(1.8);
+    fHistPSideBadChannelMapLayer6->GetXaxis()->SetNdivisions(25);
+    fHistPSideBadChannelMapLayer6->GetYaxis()->SetNdivisions(38);
+    fHistPSideBadChannelMapLayer6->GetXaxis()->SetLabelSize(0.03);
+    fHistPSideBadChannelMapLayer6->GetYaxis()->SetLabelSize(0.03);
+    fHistPSideBadChannelMapLayer6->GetZaxis()->SetTitleOffset(1.6);
+    fHistPSideBadChannelMapLayer6->GetZaxis()->SetTitle("Bad channels (p-side)[%]");
+    rv = fAliITSQADataMakerRec->Add2RawsList(fHistPSideBadChannelMapLayer6, 
+                                        fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
+    fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
+    
+    TH2D *fHistNSideBadChannelMapLayer6 = new TH2D("fHistNSideBadChannelMapLayer6",
+                                                   "Layer 6;N_{module};N_{ladder}",
+                                                   25,1,26,
+                                                   38,600,638);
+    fHistNSideBadChannelMapLayer6->GetXaxis()->SetTitleColor(1);
+    fHistNSideBadChannelMapLayer6->SetStats(kFALSE);
+    fHistNSideBadChannelMapLayer6->GetYaxis()->SetTitleOffset(1.8);
+    fHistNSideBadChannelMapLayer6->GetXaxis()->SetNdivisions(25);
+    fHistNSideBadChannelMapLayer6->GetYaxis()->SetNdivisions(38);
+    fHistNSideBadChannelMapLayer6->GetXaxis()->SetLabelSize(0.03);
+    fHistNSideBadChannelMapLayer6->GetYaxis()->SetLabelSize(0.03);
+    fHistNSideBadChannelMapLayer6->GetZaxis()->SetTitleOffset(1.6);
+    fHistNSideBadChannelMapLayer6->GetZaxis()->SetTitle("Bad channels (n-side)[%]");
+    rv = fAliITSQADataMakerRec->Add2RawsList(fHistNSideBadChannelMapLayer6, 
+                                        fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
+    fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
   }//online flag
-  fSSDhTask = fSSDRawsOffset;
-  AliDebug(1,Form("%d SSD Raws histograms booked\n",fSSDhTask));
-  AliInfo(Form("Number of histograms (SPD+SDD+SSD): %d\n",fGenOffset+fSSDhTask));  
-  AliDebug(1,Form("Number of histograms (SPD+SDD+SSD): %d\n",fGenOffset+fSSDRawsOffset));
+  
+  fSSDhRawsTask = fSSDRawsOffset;
+  AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SSD Raws histograms booked\n",fSSDhRawsTask));
+  AliDebug(AliQAv1::GetQADebugLevel(), Form("Number of histograms (SPD+SDD+SSD): %d\n",fGenRawsOffset+fSSDhRawsTask));  
+  AliDebug(AliQAv1::GetQADebugLevel(),Form("Number of histograms (SPD+SDD+SSD): %d\n",fGenRawsOffset+fSSDRawsOffset));
+  
+  /*
+   fSSDhTask = fSSDRawsOffset;
+   AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SSD Raws histograms booked\n",fSSDhTask));
+   AliDebug(AliQAv1::GetQADebugLevel(), Form("Number of histograms (SPD+SDD+SSD): %d\n",fGenRawsOffset+fSSDhTask));  
+   AliDebug(AliQAv1::GetQADebugLevel(),Form("Number of histograms (SPD+SDD+SSD): %d\n",fGenRawsOffset+fSSDRawsOffset));
+   */
+  return rv ; 
 }
 
 //____________________________________________________________________________
-void AliITSQASSDDataMakerRec::MakeRaws(AliRawReader* rawReader) { 
+Int_t AliITSQASSDDataMakerRec::MakeRaws(AliRawReader* rawReader) { 
   // Fill QA for RAW - SSD -
+  Int_t rv = 0 ; 
+  // Check id histograms already created for this Event Specie
+  if ( ! fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset) )
+    rv = InitRaws() ;
+
   Int_t gStripNumber;
   Int_t gHistPosition;
   Int_t gLayer = 0,gLadder = 0, gModule = 0;
@@ -386,7 +669,7 @@ void AliITSQASSDDataMakerRec::MakeRaws(AliRawReader* rawReader) {
 
   rawReader->Select("ITSSSD",-1,-1);  
   rawReader->Reset(); //rawReader->NextEvent();   
-  (fAliITSQADataMakerRec->GetRawsData(fGenOffset))->Fill(rawReader->GetType());
+  (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset))->Fill(rawReader->GetType());
   if(rawReader->GetType() == 7) {
     fSSDEvent += 1;
     fSSDEventPerCycle += 1;
@@ -401,347 +684,592 @@ void AliITSQASSDDataMakerRec::MakeRaws(AliRawReader* rawReader) {
   }
   while (gSSDStream.Next()) {
     if(gSSDStream.GetModuleID() < 0) continue;
+    /*cout<<"DDL: "<<rawReader->GetDDLID()<<
+      " - LDC: "<<rawReader->GetLDCId()<<
+      " - Size: "<<rawReader->GetDataSize()<<
+      " - Equipment size: "<<rawReader->GetEquipmentSize()<<endl;*/
     gSizePerDDL[rawReader->GetDDLID()] = rawReader->GetDataSize();
     gSizePerLDC[rawReader->GetLDCId()-6] = rawReader->GetDataSize();
     AliITSgeomTGeo::GetModuleId(gSSDStream.GetModuleID(),gLayer,gLadder,gModule);
-    gStripNumber = (gSSDStream.GetSideFlag() == 0) ? gSSDStream.GetStrip() : gSSDStream.GetStrip() + fgkNumberOfPSideStrips;
+    if(gSSDStream.GetStrip() < 0) continue;
+    gStripNumber = (gSSDStream.GetSideFlag() == 0) ? gSSDStream.GetStrip() : -gSSDStream.GetStrip() + 2*fgkNumberOfPSideStrips;
     gHistPosition = (gLayer == 5) ? ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + gModule - 1) : ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + gModule + fgkSSDMODULESLAYER5 - 1);
-    //AliInfo(Form("ModulePosition: %d - Layer: %d - Ladder: %d - Module: %d\n",gHistPosition,gLayer,gLadder,gModule));
+    //AliDebug(AliQAv1::GetQADebugLevel(), Form("ModulePosition: %d - Layer: %d - Ladder: %d - Module: %d\n",gHistPosition,gLayer,gLadder,gModule));
     if(fkOnline)
       fHistSSDRawSignalModule[gHistPosition]->Fill(gStripNumber,gSSDStream.GetSignal());
-    //fAliITSQADataMakerRec->GetRawsData(fGenOffset+gHistPosition+fSSDRawsCommonLevelOffset)->Fill(gStripNumber,gSSDStream.GetSignal());
+    //fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+gHistPosition+fSSDRawsCommonLevelOffset)->Fill(gStripNumber,gSSDStream.GetSignal());
   }//streamer loop   
   
   //event size calculation and filling info
   for(Int_t i = 0; i < fgkNumOfDDLs; i++) {
     sumSSDDataSize += gSizePerDDL[i];
     if(gSizePerDDL[i] > 0) {
-      (fAliITSQADataMakerRec->GetRawsData(fGenOffset+3))->Fill(i+512);
-      (fAliITSQADataMakerRec->GetRawsData(fGenOffset+5+i))->Fill(TMath::Log10(gSizePerDDL[i]));
+      (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+3))->Fill(i+512);
+      (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+5+i))->Fill(gSizePerDDL[i]/1e+03);
     }
-    (fAliITSQADataMakerRec->GetRawsData(fGenOffset+4))->Fill(i+512,gSizePerDDL[i]/1e+06);
+    //(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+4))->Fill(i+512,gSizePerDDL[i]/1e+06);
   }
   for(Int_t i = 0; i < fgkNumOfLDCs; i++) {
     if(gSizePerLDC[i] > 0) {
-      (fAliITSQADataMakerRec->GetRawsData(fGenOffset+21))->Fill(i+6);
-      (fAliITSQADataMakerRec->GetRawsData(fGenOffset+23+i))->Fill(TMath::Log10(gSizePerLDC[i]));
+      (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+21))->Fill(i+6);
+      //LDC 082
+      if(i == 0)
+       gSizePerLDC[i] = gSizePerDDL[8] + gSizePerDDL[9] + gSizePerDDL[10] +
+         gSizePerDDL[11] + gSizePerDDL[12] + gSizePerDDL[13];
+      //LDC 086
+      if(i == 1)
+       gSizePerLDC[i] = gSizePerDDL[3] + gSizePerDDL[4] + gSizePerDDL[5] +
+         gSizePerDDL[6] + gSizePerDDL[7];
+      //LDC 085
+      if(i == 2)
+       gSizePerLDC[i] = gSizePerDDL[0] + gSizePerDDL[1] + gSizePerDDL[2] +
+         gSizePerDDL[14] + gSizePerDDL[15];
+      (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+23+i))->Fill(gSizePerLDC[i]/1e+03);
+      //cout<<"Event: "<<fSSDEventPerCycle<<" - LDC: "<<i+6<<
+      //" - Data size: "<<gSizePerLDC[i]<<endl;
     }
-    (fAliITSQADataMakerRec->GetRawsData(fGenOffset+22))->Fill(i+6,gSizePerLDC[i]/1e+06);
+    //(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+22))->Fill(i+6,gSizePerLDC[i]/1e+06);
   }
   if(sumSSDDataSize) 
-    (fAliITSQADataMakerRec->GetRawsData(fGenOffset+1))->Fill(TMath::Log10(sumSSDDataSize));
+    (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+1))->Fill(sumSSDDataSize/1e+03);
   if(eventSize)
-    (fAliITSQADataMakerRec->GetRawsData(fGenOffset+2))->Fill(100.*sumSSDDataSize/eventSize);
+    (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+2))->Fill(100.*sumSSDDataSize/eventSize);
 
   //Occupancy calculation
   if(fkOnline) {
-    for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++)
+    for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++) {
       GetOccupancyStrip(fHistSSDRawSignalModule[iModule],fOccupancyMatrix[iModule]);
+      //if(iModule == 156) {    
+       //cout<<"========================================"<<endl;
+       //AliITSgeomTGeo::GetModuleId(656,gLayer,gLadder,gModule);
+       /*for(Int_t iBin = 1; iBin < fHistSSDRawSignalModule[iModule]->GetXaxis()->GetNbins(); iBin++) {
+         if((iBin >= 750)&&(iBin <= 780))
+         cout<<"Event: "<<fSSDEventPerCycle<<" - Ladder: "<<gLadder+499<<
+         " - Module: "<<gModule<<" - Strip: "<<iBin<<
+         " - Signal: "<<fHistSSDRawSignalModule[iModule]->GetBinContent(iBin)<<endl;
+         }*///strip loop --> to be removed
+      //}//module cut --> to be removed
+    }//module loop
   }//online flag for SSD
+  return rv ; 
 }
 
 //____________________________________________________________________________ //
-Double_t AliITSQASSDDataMakerRec::GetOccupancyStrip(TH1 *lHisto, Int_t *occupancyMatrix) { 
+void AliITSQASSDDataMakerRec::GetOccupancyStrip(TH1 *lHisto, Int_t *occupancyMatrix) { 
   //Increments the entries in the occupancy matrix based 
   //on whether the signal for each strip is larger than the cutoff
   //Currently the cutoff is at 0 which means that if ZS
   //works, whatever comes from the FEROM is considered as "signal"
-  Double_t cutoff = 0.0;
+  //Double_t cutoff = 0.0;
+  TString histname = lHisto->GetName();
+  //cout<<histname.Data()<<endl;
+  //if(histname.Contains("Layer5_Ladder8_Module3")) {
   for(Int_t iBin = 1; iBin < lHisto->GetXaxis()->GetNbins(); iBin++) {
     Double_t y = lHisto->GetBinContent(iBin);
-    if(y > cutoff) {
+    if(y) {
       occupancyMatrix[iBin-1] += 1;
-      //cout<<"Event: "<<iEvent<<" - Strip: "<<i<<" - Signal: "<<fRawSignal->GetBinContent(i)<<                              
-      //" - Occupancy: "<<fOccupancy[i-1]<<endl;                                                                  
     }
+    //if((iBin >= 750)&&(iBin <= 780))
+    //cout<<"Strip: "<<iBin<<
+    //" - Signal: "<<y<<
+    //" - Occupancy: "<<occupancyMatrix[iBin-1]<<endl;
+    
   }
+  //}
 }
 
 //____________________________________________________________________________ 
-Double_t AliITSQASSDDataMakerRec::GetOccupancyModule(TH1 *lHisto, Int_t stripside) { 
+Double_t AliITSQASSDDataMakerRec::GetOccupancyModule(TH1 *lHisto, 
+                                                    Int_t stripside,
+                                                    Int_t mode,
+                                                    Double_t threshold) {
+  //Mode 0: calculates the occupancy of a module 
+  //        without a threshold in the strip occupancy
+  //Mode 1: calculates the occupancy of a module 
+  //        with the set threshold in the strip occupancy
+  //Mode 2: calculates the average occupancy of a module 
+
   // bo: TDC >0 or # of sigmas wrt noise ?
   //stripside == 0 --> P-side
   //stripside == 1 --> N-side
   Int_t lNumFiredBins = 0;
+  Double_t sumOccupancy = 0.0;
+  TString histname = lHisto->GetName();
   for(Int_t iBin = 1 + stripside*fgkNumberOfPSideStrips; iBin < fgkNumberOfPSideStrips*(1 + stripside); iBin++){
-    if (lHisto->GetBinContent(iBin) > 0)
+    /*if(histname.Contains("Layer5_Ladder507_Module3")) {
+      cout<<lHisto->GetName()<<
+      " - Strip: "<<iBin<<
+      " - Bin content: "<<lHisto->GetBinContent(iBin)<<endl;
+      }*/
+    if (lHisto->GetBinContent(iBin) > threshold) {
       lNumFiredBins++; 
+      sumOccupancy = lHisto->GetBinContent(iBin);
+    }
   }
   
-  Double_t lOccupancy = (100.*lNumFiredBins)/fgkNumberOfPSideStrips; // percentage
-  //AliInfo(Form("Fired strips: %d - Total strips: %d - Occupancy :%lf\n",lNumFiredBins,lHisto->GetNbinsX(),lOccupancy));
+  Double_t lOccupancy = 0.0;
+  if((mode == 0)||(mode == 1))
+    lOccupancy = (100.*lNumFiredBins)/fgkNumberOfPSideStrips; // percentage  
+  else if(mode == 2)
+    lOccupancy = 100.*sumOccupancy/fgkNumberOfPSideStrips;
+
+  /*if(histname.Contains("Layer5_Ladder507_Module3"))
+    cout<<"Fired strips: "<<lNumFiredBins<<
+    " - Occupancy: "<<lOccupancy<<endl;*/
+  //AliDebug(AliQAv1::GetQADebugLevel(), Form("Fired strips: %d - Total strips: %d - Occupancy :%lf\n",lNumFiredBins,lHisto->GetNbinsX(),lOccupancy));
   
   return lOccupancy;
 }
 
+//____________________________________________________________________________
+void AliITSQASSDDataMakerRec::MonitorOCDBObjects() { 
+  //Monitor in AMORE the output of the DA
+  //Currently only the bad channel list is monitored
+  //Todo: Noise - Pedestal
+  ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset))->Reset();
+  ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+1))->Reset();
+  ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+2))->Reset();
+  ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+3))->Reset();
+
+  AliCDBEntry *entryBadChannelsSSD = fCDBManager->Get("ITS/Calib/BadChannelsSSD");
+  if(!entryBadChannelsSSD) 
+    AliError("OCDB entry for the bad channel list is not valid!"); 
+  AliITSBadChannelsSSDv2 *badchannelsSSD = (AliITSBadChannelsSSDv2 *)entryBadChannelsSSD->GetObject();
+  if(!badchannelsSSD)
+    AliError("Bad channel list object is not a valid AliITSBadChannelsSSD object!");
+
+  //_____________________________________________________________________________//                       
+  Int_t nBadPSideChannels = 0, nBadNSideChannels = 0;
+  Int_t layer = 0, ladder = 0, module = 0;
+  Int_t nPSideChannelsLayer5 = 0, nNSideChannelsLayer5 = 0;
+  Int_t nPSideChannelsLayer6 = 0, nNSideChannelsLayer6 = 0;
+  //_____________________________________________________________________________//                      
+
+  for(Int_t i = 0; i < fgkSSDMODULES; i++) {
+    AliITSgeomTGeo::GetModuleId(i+500,layer,ladder,module);
+    nBadPSideChannels = 0, nBadNSideChannels = 0;
+    nPSideChannelsLayer5 = 0, nNSideChannelsLayer5 = 0;
+    nPSideChannelsLayer6 = 0, nNSideChannelsLayer6 = 0;
+
+    Int_t badChannel = 0;
+    for(Int_t j = 0; j < fgkNumberOfPSideStrips; j++) {
+      badChannel = (Int_t)(badchannelsSSD->GetBadChannelP(i,j));
+      if(badChannel != 0) {
+        if(layer == 5)
+          nPSideChannelsLayer5 += 1;
+        if(layer == 6)
+          nPSideChannelsLayer6 += 1;
+        nBadPSideChannels += 1;
+      }//badchannel flag != 0
+      badChannel = (Int_t)(badchannelsSSD->GetBadChannelN(i,j));
+      if(badChannel != 0) {
+        if(layer == 5)
+          nNSideChannelsLayer5 += 1;
+        if(layer == 6)
+          nNSideChannelsLayer6 += 1;
+        nBadNSideChannels += 1;
+      }//badchannel flag != 0
+    }//loop over strips
+    if(layer == 5) {
+      if(nPSideChannelsLayer5 > 0)
+       ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset))->Fill(module,499+ladder,
+                                                                           100.*nPSideChannelsLayer5/fgkNumberOfPSideStrips);
+      else ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset))->Fill(module,499+ladder,0.0001);
+      if(nNSideChannelsLayer5 > 0)
+       ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+1))->Fill(module,499+ladder,
+                                                                           100.*nNSideChannelsLayer5/fgkNumberOfPSideStrips);
+      else ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+1))->Fill(module,499+ladder,0.0001);
+    }//layer 5                                                                                                                      
+    if(layer == 6) {
+      if(nPSideChannelsLayer6 > 0)
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+2))->Fill(module,599+ladder,
+                                                                           100.*nPSideChannelsLayer6/fgkNumberOfPSideStrips);
+      else ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+2))->Fill(module,599+ladder,0.0001);
+      if(nNSideChannelsLayer6 > 0)
+        ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+3))->Fill(module,599+ladder,
+                                                                           100.*nNSideChannelsLayer6/fgkNumberOfPSideStrips);
+      else ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+3))->Fill(module,599+ladder,0.0001);
+    }//layer 6                                                                                                                      
+  }//module loop
+}
+
+//____________________________________________________________________________ 
+Int_t AliITSQASSDDataMakerRec::InitDigits() { 
+  // Initialization for DIGIT data - SSD -
+  const Bool_t expert   = kTRUE ; 
+  const Bool_t image    = kTRUE ; 
+  Int_t rv = 0 ; 
+//  fGenDigitsOffset = (fAliITSQADataMakerRec->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
+  
+  // custom code here
+  TH1F *fHistSSDModule = new TH1F("fHistSSDDigitsModule",
+                                  ";SSD Module Number;N_{DIGITS}",
+                                  1698,499.5,2197.5);  
+ rv =  fAliITSQADataMakerRec->Add2DigitsList(fHistSSDModule,
+                                        fGenDigitsOffset + 0, !expert, image);
+  fSSDhDigitsTask += 1;
+  TH2F *fHistSSDModuleStrip = new TH2F("fHistSSDDigitsModuleStrip",
+                                       ";N_{Strip};N_{Module}",
+                                       1540,0,1540,1698,499.5,2197.5);  
+  rv = fAliITSQADataMakerRec->Add2DigitsList(fHistSSDModuleStrip,
+                                        fGenDigitsOffset + 1, !expert, image);
+  fSSDhDigitsTask += 1;
+  
+  AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SSD Digits histograms booked\n",fSSDhDigitsTask));
+  return rv ; 
+}
+
+//____________________________________________________________________________
+Int_t AliITSQASSDDataMakerRec::MakeDigits(TTree *digits) { 
+  // Fill QA for DIGIT - SSD -
+//  AliITS *fITS  = (AliITS*)gAlice->GetModule("ITS");
+//  fITS->SetTreeAddress();
+//  TClonesArray *iSSDdigits  = fITS->DigitsAddress(2);
+  Int_t rv = 0 ; 
+  TBranch *branchD = digits->GetBranch("ITSDigitsSSD");
+  if (!branchD) { 
+    AliError("can't get the branch with the SSD ITS digits !");
+    return rv;
+  }
+  
+  // Check id histograms already created for this Event Specie
+  if ( ! fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset) )
+    rv = InitDigits() ;
+
+  static TClonesArray statDigits("AliITSdigitSSD");
+  TClonesArray *iSSDdigits = &statDigits;
+  branchD->SetAddress(&iSSDdigits);  
+  for(Int_t iModule = 500; iModule < 2198; iModule++) {
+    iSSDdigits->Clear();
+    digits->GetEvent(iModule);    
+    Int_t ndigits = iSSDdigits->GetEntries();
+    fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset + 0)->Fill(iModule,ndigits);
+    if(ndigits != 0)
+      AliDebug(AliQAv1::GetQADebugLevel(),Form("Module: %d - Digits: %d",iModule,ndigits));
+    
+    for (Int_t iDigit = 0; iDigit < ndigits; iDigit++) {
+      AliITSdigit *dig = (AliITSdigit*)iSSDdigits->UncheckedAt(iDigit);
+      Int_t fStripNumber = (dig->GetCoord1() == 0) ? dig->GetCoord2() : dig->GetCoord2() + fgkNumberOfPSideStrips;
+      ((TH2F *)fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset + 1))->Fill(fStripNumber,iModule,dig->GetSignal());
+    }//digit loop
+  }//module loop
+  return rv ; 
+}
+
 //____________________________________________________________________________ 
-void AliITSQASSDDataMakerRec::InitRecPoints()
+Int_t AliITSQASSDDataMakerRec::InitRecPoints()
 {
   // Initialization for RECPOINTS - SSD -
-  fGenOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
+  const Bool_t expert   = kTRUE ; 
+  const Bool_t image    = kTRUE ; 
+  Int_t rv = 0 ; 
+//  fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
+  //AliDebug(AliQAv1::GetQADebugLevel(), Form("**-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints offset %d \t %d \n",fGenOffset,fGenRecPointsOffset));
   Int_t nModuleOffset = 500;
   Int_t nITSTotalModules = AliITSgeomTGeo::GetNModules();
 
-  TH1F *fHistModuleIdLayer5 = new TH1F("fHistModuleIdLayer5",
-                                      "Module Id - Layer 5;Module Id;Entries",
-                                      fgkSSDMODULESLAYER5,
-                                      nModuleOffset - 0.5,
-                                      nITSTotalModules-fgkSSDMODULESLAYER6+0.5);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistModuleIdLayer5, 
-                                          fGenOffset + 0);
-  fSSDhTask += 1;
-  TH1F *fHistModuleIdLayer6 = new TH1F("fHistModuleIdLayer6",
-                                      "Module Id - Layer 6;Module Id;Entries",
-                                      fgkSSDMODULESLAYER6,
-                                      nModuleOffset+fgkSSDMODULESLAYER5 - 0.5,
-                                      nITSTotalModules + 0.5);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistModuleIdLayer6, 
-                                          fGenOffset + 1);
-  fSSDhTask += 1;
-  TH1F *fHistClusterPerEventLayer5 = new TH1F("fHistClusterPerEventLayer5",
-                                             "N_{clusters} - Layer 5;N_{clusters};Entries;",
-                                             100,0.1,5000);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistClusterPerEventLayer5,
-                                          fGenOffset + 2);
-  fSSDhTask += 1;
-  TH1F *fHistClusterPerEventLayer6 = new TH1F("fHistClusterPerEventLayer6",
-                                             "N_{clusters} - Layer 6;N_{clusters};Entries;",
-                                             100,0.1,5000);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistClusterPerEventLayer6,
-                                          fGenOffset + 3);
-  fSSDhTask += 1;
-  TH1F *fHistLocalXLayer5 = new TH1F("fHistLocalXLayer5",
-                                    "Local x coord.- Layer 5;x [cm];Entries;",
-                                    100,-4.,4.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistLocalXLayer5,
-                                          fGenOffset + 4);
-  fSSDhTask += 1;
-  TH1F *fHistLocalXLayer6 = new TH1F("fHistLocalXLayer6",
-                                    "Local x coord.- Layer 6;x [cm];Entries;",
-                                    100,-4.,4.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistLocalXLayer6, 
-                                          fGenOffset + 5);
-  fSSDhTask += 1;
-  TH1F *fHistLocalZLayer5 = new TH1F("fHistLocalZLayer5",
-                                    "Local z coord.- Layer 5;z [cm];Entries;",
-                                    100,-4.,4.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistLocalZLayer5, 
-                                          fGenOffset + 6);
-  fSSDhTask += 1;
-  TH1F *fHistLocalZLayer6 = new TH1F("fHistLocalZLayer6",
-                                    "Local z coord.- Layer 6;z [cm];Entries;",
-                                    100,-4.,4.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistLocalZLayer6, 
-                                          fGenOffset + 7);
-  fSSDhTask += 1;
-  TH1F *fHistGlobalXLayer5 = new TH1F("fHistGlobalXLayer5",
-                                     "Global x - Layer 5;x [cm];Entries;",
-                                     100,-40.,40.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalXLayer5, 
-                                          fGenOffset + 8);
-  fSSDhTask += 1;
-  TH1F *fHistGlobalXLayer6 = new TH1F("fHistGlobalXLayer6",
-                                     "Global x - Layer 6;x [cm];Entries;",
-                                     100,-45.,45.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalXLayer6, 
-                                          fGenOffset + 9);
-  fSSDhTask += 1;
-  TH1F *fHistGlobalYLayer5 = new TH1F("fHistGlobalYLayer5",
-                                     "Global y - Layer 5;y [cm];Entries;",
-                                     100,-40.,40);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalYLayer5, 
-                                          fGenOffset + 10);
-  fSSDhTask += 1;
-  TH1F *fHistGlobalYLayer6 = new TH1F("fHistGlobalYLayer6",
-                                     "Global y - Layer 6;y [cm];Entries;",
-                                     100,-45.,45.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalYLayer6, 
-                                          fGenOffset + 11);
-  fSSDhTask += 1;
-  TH1F *fHistGlobalZLayer5 = new TH1F("fHistGlobalZLayer5",
-                                     "Global z - Layer 5;z [cm];Entries;",
-                                     100,-45.,45);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalZLayer5, 
-                                          fGenOffset + 12);
-  fSSDhTask += 1;
-  TH1F *fHistGlobalZLayer6 = new TH1F("fHistGlobalZLayer6",
-                                     "Global z - Layer 6;z [cm];Entries;",
-                                     100,-55.,55.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalZLayer6, 
-                                          fGenOffset + 13);
-  fSSDhTask += 1;
-  TH1F *fHistPhiLayer5 = new TH1F("fHistPhiLayer5",
-                                 "#phi - Layer 5;#phi [rad];Entries;",
-                                 100,-TMath::Pi(),TMath::Pi());
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistPhiLayer5, 
-                                          fGenOffset + 14);
-  fSSDhTask += 1;
-  TH1F *fHistPhiLayer6 = new TH1F("fHistPhiLayer6",
-                                 "#phi - Layer 6;#phi [rad];Entries;",
-                                 100,-TMath::Pi(),TMath::Pi());
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistPhiLayer6, 
-                                          fGenOffset + 15);
-  fSSDhTask += 1;
-  TH1F *fHistThetaLayer5 = new TH1F("fHistThetaLayer5",
-                                   "#theta - Layer 5;#theta [rad];Entries;",
-                                   100,-TMath::Pi(),TMath::Pi());
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistThetaLayer5, 
-                                          fGenOffset + 16);
-  fSSDhTask += 1;
-  TH1F *fHistThetaLayer6 = new TH1F("fHistThetaLayer6",
-                                   "#theta - Layer 6;#theta [rad];Entries;",
-                                   100,-TMath::Pi(),TMath::Pi());
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistThetaLayer6, 
-                                          fGenOffset + 17);
-  fSSDhTask += 1;
-  TH1F *fHistRadiusLayer5 = new TH1F("fHistRadiusLayer5",
-                                    "r - Layer 5;r [cm];Entries;",
-                                    100,35.,50.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistRadiusLayer5, 
-                                          fGenOffset + 18);
-  fSSDhTask += 1;
-  TH1F *fHistRadiusLayer6 = new TH1F("fHistRadiusLayer6",
-                                    "r - Layer 6;r [cm];Entries;",
-                                    100,35.,50.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistRadiusLayer6, 
-                                          fGenOffset + 19);
-  fSSDhTask += 1;
-  TH1F *fHistClusterTypeLayer5 = new TH1F("fHistClusterTypeLayer5",
-                                         "CL type - Layer 5;Cluster type;Entries;",
-                                         150,0,150);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistClusterTypeLayer5, 
-                                          fGenOffset + 20);
-  fSSDhTask += 1;
-  TH1F *fHistClusterTypeLayer6 = new TH1F("fHistClusterTypeLayer6",
-                                         "CL type - Layer 6;Cluster type;Entries;",
-                                         150,0,150);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistClusterTypeLayer6, 
-                                          fGenOffset + 21);
-  fSSDhTask += 1;
-  TH1F *fHistChargeRatioLayer5 = new TH1F("fHistChargeRatioLayer5",
-                                         "Charge ratio - Layer 5;q_{ratio};Entries;",
-                                         100,-2.0,2.0);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeRatioLayer5, 
-                                          fGenOffset + 22);
-  fSSDhTask += 1;
-  TH1F *fHistChargeRatioLayer6 = new TH1F("fHistChargeRatioLayer6",
-                                         "Charge ratio - Layer 6;q_{ratio};Entries;",
-                                         100,-2.0,2.0);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeRatioLayer6, 
-                                          fGenOffset + 23);
-  fSSDhTask += 1;
-  TH1F *fHistChargekeVLayer5 = new TH1F("fHistChargekeVLayer5",
-                                       "Charge - Layer 5;q [keV];Entries;",
-                                       100,0.,300.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargekeVLayer5, 
-                                          fGenOffset + 24);
-  fSSDhTask += 1;
-  TH1F *fHistChargekeVLayer6 = new TH1F("fHistChargekeVLayer6",
-                                       "Charge - Layer 6;q [keV];Entries;",
-                                       100,0.,300.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargekeVLayer6, 
-                                          fGenOffset + 25);
-  fSSDhTask += 1;
-  TH1F *fHistChargePSideLayer5 = new TH1F("fHistChargePSideLayer5",
-                                          "Charge P- Layer 5;q_{P} [keV];Entries;",
-                                          100,0.,300.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargePSideLayer5,
-                                          fGenOffset + 26);
-  fSSDhTask += 1;
-  TH1F *fHistChargePSideLayer6 = new TH1F("fHistChargePSideLayer6",
-                                          "Charge P- Layer 6;q_{P} [keV];Entries;",
-                                          100,0.,300.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargePSideLayer6,
-                                          fGenOffset + 27);
-  fSSDhTask += 1;
-  TH1F *fHistChargeNSideLayer5 = new TH1F("fHistChargeNSideLayer5",
-                                          "Charge N- Layer 5;q_{N} [keV];Entries;",
-                                          100,0.,300.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeNSideLayer5,
-                                          fGenOffset + 28);
-  fSSDhTask += 1;
-  TH1F *fHistChargeNSideLayer6 = new TH1F("fHistChargeNSideLayer6",
-                                          "Charge N- Layer 6;q_{N} [keV];Entries;",
-                                          100,0.,300.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeNSideLayer6,
-                                          fGenOffset + 29);
-  fSSDhTask += 1;
-  TH1F *fHistChargeRatio2Layer5 = new TH1F("fHistChargeRatio2Layer5",
-                                          "Charge Ratio qN/qP - Layer 5;q_{N}/q_{P};Entries;",
-                                          100,0,2);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeRatio2Layer5,
-                                          fGenOffset + 30);
-  fSSDhTask += 1;
-  TH1F *fHistChargeRatio2Layer6 = new TH1F("fHistChargeRatio2Layer6",
-                                          "Charge Ratio qN/qP - Layer 6;q_{N}/q_{P};Entries;",
-                                          100,0,2);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeRatio2Layer6,
-                                          fGenOffset + 31);
-  fSSDhTask += 1;
-  TH2F *fHistChargePNSideLayer5 = new TH2F("fHistChargePNSideLayer5",
-                                           "Charge correlation - Layer 5;q_{P} [keV];q_{N} [keV]",
-                                           100,0.,300.,
-                                           100,0.,300.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargePNSideLayer5,
-                                          fGenOffset + 32);
-  fSSDhTask += 1;
-  TH2F *fHistChargePNSideLayer6 = new TH2F("fHistChargePNSideLayer6",
-                                           "Charge correlation - Layer 6;q_{P} [keV];q_{N} [keV]",
-                                           100,0.,300.,
-                                           100,0.,300.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargePNSideLayer6,
-                                          fGenOffset + 33);
-  fSSDhTask += 1;
-  TH2F *fHistChargeMapLayer5 = new TH2F("fHistChargeMapLayer5",
-                                       "Charge map;N_{modules};N_{Ladders}",
-                                       fgkSSDMODULESPERLADDERLAYER5,
-                                       -0.5,fgkSSDMODULESPERLADDERLAYER5+0.5,
-                                       3*fgkSSDLADDERSLAYER5,
-                                       -0.5,fgkSSDLADDERSLAYER5+0.5);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeMapLayer5, 
-                                          fGenOffset + 34);
-  fSSDhTask += 1;
-  TH2F *fHistChargeMapLayer6 = new TH2F("fHistChargeMapLayer6",
-                                       "Charge map;N_{modules};N_{Ladders}",
-                                       fgkSSDMODULESPERLADDERLAYER6,
-                                       -0.5,fgkSSDMODULESPERLADDERLAYER6+0.5,
-                                       3*fgkSSDLADDERSLAYER6,
-                                       -0.5,fgkSSDLADDERSLAYER6+0.5);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeMapLayer6, 
-                                          fGenOffset + 35);
-  fSSDhTask += 1;
-
-  AliDebug(1,Form("%d SSD Recs histograms booked\n",fSSDhTask));
+  TH1F *fHistSSDModuleIdLayer5 = new TH1F("fHistSSDModuleIdLayer5",
+                                         "Module Id - Layer 5;Module Id;Entries",
+                                         fgkSSDMODULESLAYER5,
+                                         nModuleOffset - 0.5,
+                                         nITSTotalModules-fgkSSDMODULESLAYER6+0.5);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDModuleIdLayer5, 
+                                          fGenRecPointsOffset + 0, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDModuleIdLayer6 = new TH1F("fHistSSDModuleIdLayer6",
+                                         "Module Id - Layer 6;Module Id;Entries",
+                                         fgkSSDMODULESLAYER6,
+                                         nModuleOffset+fgkSSDMODULESLAYER5 - 0.5,
+                                         nITSTotalModules + 0.5);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDModuleIdLayer6, 
+                                          fGenRecPointsOffset + 1, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDClusterPerEventLayer5 = new TH1F("fHistSSDClusterPerEventLayer5",
+                                                "N_{clusters} - Layer 5;N_{clusters};Entries;",
+                                                100,0.1,5000);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterPerEventLayer5,
+                                          fGenRecPointsOffset + 2, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDClusterPerEventLayer6 = new TH1F("fHistSSDClusterPerEventLayer6",
+                                                "N_{clusters} - Layer 6;N_{clusters};Entries;",
+                                                100,0.1,5000);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterPerEventLayer6,
+                                          fGenRecPointsOffset + 3, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDLocalXLayer5 = new TH1F("fHistSSDLocalXLayer5",
+                                       "Local x coord.- Layer 5;x [cm];Entries;",
+                                       100,-4.,4.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalXLayer5,
+                                          fGenRecPointsOffset + 4, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDLocalXLayer6 = new TH1F("fHistSSDLocalXLayer6",
+                                       "Local x coord.- Layer 6;x [cm];Entries;",
+                                       100,-4.,4.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalXLayer6, 
+                                          fGenRecPointsOffset + 5, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDLocalZLayer5 = new TH1F("fHistSSDLocalZLayer5",
+                                       "Local z coord.- Layer 5;z [cm];Entries;",
+                                       100,-4.,4.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalZLayer5, 
+                                          fGenRecPointsOffset + 6, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDLocalZLayer6 = new TH1F("fHistSSDLocalZLayer6",
+                                       "Local z coord.- Layer 6;z [cm];Entries;",
+                                       100,-4.,4.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalZLayer6, 
+                                          fGenRecPointsOffset + 7, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDGlobalXLayer5 = new TH1F("fHistSSDGlobalXLayer5",
+                                        "Global x - Layer 5;x [cm];Entries;",
+                                        100,-40.,40.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalXLayer5, 
+                                          fGenRecPointsOffset + 8, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDGlobalXLayer6 = new TH1F("fHistSSDGlobalXLayer6",
+                                        "Global x - Layer 6;x [cm];Entries;",
+                                        100,-45.,45.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalXLayer6, 
+                                          fGenRecPointsOffset + 9, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDGlobalYLayer5 = new TH1F("fHistSSDGlobalYLayer5",
+                                        "Global y - Layer 5;y [cm];Entries;",
+                                        100,-40.,40);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalYLayer5, 
+                                          fGenRecPointsOffset + 10, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDGlobalYLayer6 = new TH1F("fHistSSDGlobalYLayer6",
+                                        "Global y - Layer 6;y [cm];Entries;",
+                                        100,-45.,45.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalYLayer6, 
+                                          fGenRecPointsOffset + 11, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDGlobalZLayer5 = new TH1F("fHistSSDGlobalZLayer5",
+                                        "Global z - Layer 5;z [cm];Entries;",
+                                        100,-45.,45);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalZLayer5, 
+                                          fGenRecPointsOffset + 12, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDGlobalZLayer6 = new TH1F("fHistSSDGlobalZLayer6",
+                                        "Global z - Layer 6;z [cm];Entries;",
+                                        100,-55.,55.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalZLayer6, 
+                                          fGenRecPointsOffset + 13, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDPhiLayer5 = new TH1F("fHistSSDPhiLayer5",
+                                    "#phi - Layer 5;#phi [rad];Entries;",
+                                    100,-TMath::Pi(),TMath::Pi());
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDPhiLayer5, 
+                                          fGenRecPointsOffset + 14, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDPhiLayer6 = new TH1F("fHistSSDPhiLayer6",
+                                    "#phi - Layer 6;#phi [rad];Entries;",
+                                    100,-TMath::Pi(),TMath::Pi());
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDPhiLayer6, 
+                                          fGenRecPointsOffset + 15, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDThetaLayer5 = new TH1F("fHistSSDThetaLayer5",
+                                      "#theta - Layer 5;#theta [rad];Entries;",
+                                      100,-TMath::Pi(),TMath::Pi());
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDThetaLayer5, 
+                                          fGenRecPointsOffset + 16, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDThetaLayer6 = new TH1F("fHistSSDThetaLayer6",
+                                      "#theta - Layer 6;#theta [rad];Entries;",
+                                      100,-TMath::Pi(),TMath::Pi());
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDThetaLayer6, 
+                                          fGenRecPointsOffset + 17, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDRadiusLayer5 = new TH1F("fHistSSDRadiusLayer5",
+                                       "r - Layer 5;r [cm];Entries;",
+                                       100,35.,50.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDRadiusLayer5, 
+                                          fGenRecPointsOffset + 18, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDRadiusLayer6 = new TH1F("fHistSSDRadiusLayer6",
+                                       "r - Layer 6;r [cm];Entries;",
+                                       100,35.,50.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDRadiusLayer6, 
+                                          fGenRecPointsOffset + 19, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDClusterTypeLayer5 = new TH1F("fHistSSDClusterTypeLayer5",
+                                            "CL type - Layer 5;Cluster type;Entries;",
+                                            150,0,150);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterTypeLayer5, 
+                                          fGenRecPointsOffset + 20, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDClusterTypeLayer6 = new TH1F("fHistSSDClusterTypeLayer6",
+                                            "CL type - Layer 6;Cluster type;Entries;",
+                                            150,0,150);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterTypeLayer6, 
+                                          fGenRecPointsOffset + 21, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDChargeRatioLayer5 = new TH1F("fHistSSDChargeRatioLayer5",
+                                            "Charge ratio - Layer 5;q_{ratio};Entries;",
+                                            100,-2.0,2.0);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatioLayer5, 
+                                          fGenRecPointsOffset + 22, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDChargeRatioLayer6 = new TH1F("fHistSSDChargeRatioLayer6",
+                                            "Charge ratio - Layer 6;q_{ratio};Entries;",
+                                            100,-2.0,2.0);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatioLayer6, 
+                                          fGenRecPointsOffset + 23, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDChargekeVLayer5 = new TH1F("fHistSSDChargekeVLayer5",
+                                          "Charge - Layer 5;q [keV];Entries;",
+                                          100,0.,300.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargekeVLayer5, 
+                                          fGenRecPointsOffset + 24, !expert, image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDChargekeVLayer6 = new TH1F("fHistSSDChargekeVLayer6",
+                                          "Charge - Layer 6;q [keV];Entries;",
+                                          100,0.,300.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargekeVLayer6, 
+                                          fGenRecPointsOffset + 25, !expert, image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDChargePSideLayer5 = new TH1F("fHistSSDChargePSideLayer5",
+                                            "Charge P- Layer 5;q_{P} [keV];Entries;",
+                                            100,0.,300.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePSideLayer5,
+                                          fGenRecPointsOffset + 26, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDChargePSideLayer6 = new TH1F("fHistSSDChargePSideLayer6",
+                                            "Charge P- Layer 6;q_{P} [keV];Entries;",
+                                            100,0.,300.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePSideLayer6,
+                                          fGenRecPointsOffset + 27, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDChargeNSideLayer5 = new TH1F("fHistSSDChargeNSideLayer5",
+                                            "Charge N- Layer 5;q_{N} [keV];Entries;",
+                                            100,0.,300.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeNSideLayer5,
+                                          fGenRecPointsOffset + 28, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDChargeNSideLayer6 = new TH1F("fHistSSDChargeNSideLayer6",
+                                            "Charge N- Layer 6;q_{N} [keV];Entries;",
+                                            100,0.,300.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeNSideLayer6,
+                                          fGenRecPointsOffset + 29, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDChargeRatio2Layer5 = new TH1F("fHistSSDChargeRatio2Layer5",
+                                             "Charge Ratio qN/qP - Layer 5;q_{N}/q_{P};Entries;",
+                                             100,0,2);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatio2Layer5,
+                                          fGenRecPointsOffset + 30, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH1F *fHistSSDChargeRatio2Layer6 = new TH1F("fHistSSDChargeRatio2Layer6",
+                                             "Charge Ratio qN/qP - Layer 6;q_{N}/q_{P};Entries;",
+                                             100,0,2);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatio2Layer6,
+                                          fGenRecPointsOffset + 31, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH2F *fHistSSDChargePNSideLayer5 = new TH2F("fHistSSDChargePNSideLayer5",
+                                             "Charge correlation - Layer 5;q_{P} [keV];q_{N} [keV]",
+                                             100,0.,300.,
+                                             100,0.,300.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePNSideLayer5,
+                                          fGenRecPointsOffset + 32, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH2F *fHistSSDChargePNSideLayer6 = new TH2F("fHistSSDChargePNSideLayer6",
+                                             "Charge correlation - Layer 6;q_{P} [keV];q_{N} [keV]",
+                                             100,0.,300.,
+                                             100,0.,300.);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePNSideLayer6,
+                                          fGenRecPointsOffset + 33, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH2F *fHistSSDChargeMapLayer5 = new TH2F("fHistSSDChargeMapLayer5",
+                                          "Charge map;N_{modules};N_{Ladders}",
+                                          fgkSSDMODULESPERLADDERLAYER5,
+                                          -0.5,fgkSSDMODULESPERLADDERLAYER5+0.5,
+                                          3*fgkSSDLADDERSLAYER5,
+                                          -0.5,fgkSSDLADDERSLAYER5+0.5);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeMapLayer5, 
+                                          fGenRecPointsOffset + 34, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH2F *fHistSSDChargeMapLayer6 = new TH2F("fHistSSDChargeMapLayer6",
+                                          "Charge map;N_{modules};N_{Ladders}",
+                                          fgkSSDMODULESPERLADDERLAYER6,
+                                          -0.5,fgkSSDMODULESPERLADDERLAYER6+0.5,
+                                          3*fgkSSDLADDERSLAYER6,
+                                          -0.5,fgkSSDLADDERSLAYER6+0.5);
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeMapLayer6, 
+                                          fGenRecPointsOffset + 35, expert, !image);
+  fSSDhRecPointsTask += 1;
+  TH2F *fHistSSDClusterMapLayer5 = new TH2F("fHistSSDClusterMapLayer5",
+                                           "Layer 5;N_{module};N_{ladder}",
+                                           22,1,23,
+                                           34,500,534);
+  fHistSSDClusterMapLayer5->GetXaxis()->SetTitleColor(1);
+  fHistSSDClusterMapLayer5->SetStats(kFALSE);
+  fHistSSDClusterMapLayer5->GetYaxis()->SetTitleOffset(1.8);
+  fHistSSDClusterMapLayer5->GetXaxis()->SetNdivisions(22);
+  fHistSSDClusterMapLayer5->GetYaxis()->SetNdivisions(34);
+  fHistSSDClusterMapLayer5->GetXaxis()->SetLabelSize(0.03);
+  fHistSSDClusterMapLayer5->GetYaxis()->SetLabelSize(0.03);
+  fHistSSDClusterMapLayer5->GetZaxis()->SetTitleOffset(1.4);
+  fHistSSDClusterMapLayer5->GetZaxis()->SetTitle("N_{clusters}");
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterMapLayer5,
+                                          fGenRecPointsOffset + 36, !expert, image);
+  fSSDhRecPointsTask += 1;
+  TH2F *fHistSSDClusterMapLayer6 = new TH2F("fHistSSDClusterMapLayer6",
+                                           "Layer 6;N_{module};N_{ladder}",
+                                           25,1,26,
+                                           38,600,638);
+  fHistSSDClusterMapLayer6->GetXaxis()->SetTitleColor(1);
+  fHistSSDClusterMapLayer6->SetStats(kFALSE);
+  fHistSSDClusterMapLayer6->GetYaxis()->SetTitleOffset(1.8);
+  fHistSSDClusterMapLayer6->GetXaxis()->SetNdivisions(25);
+  fHistSSDClusterMapLayer6->GetYaxis()->SetNdivisions(38);
+  fHistSSDClusterMapLayer6->GetXaxis()->SetLabelSize(0.03);
+  fHistSSDClusterMapLayer6->GetYaxis()->SetLabelSize(0.03);
+  fHistSSDClusterMapLayer6->GetZaxis()->SetTitleOffset(1.4);
+  fHistSSDClusterMapLayer6->GetZaxis()->SetTitle("N_{clusters}");
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterMapLayer6,
+                                           fGenRecPointsOffset + 37, !expert, image);
+  fSSDhRecPointsTask += 1;
+  //printf ("%d SSD Recs histograms booked\n",fSSDhRecPointsTask);
+  AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SSD Recs histograms booked\n",fSSDhRecPointsTask));
+  return rv ; 
 }
 
 //____________________________________________________________________________ 
-void AliITSQASSDDataMakerRec::MakeRecPoints(TTree *clustersTree)
+Int_t AliITSQASSDDataMakerRec::MakeRecPoints(TTree *clustersTree)
 {
   // Fill QA for recpoints - SSD -
-
+  //printf("*-*-*-*-*-*-*---*-*-*-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints called \n");
+  Int_t rv = 0 ; 
   Int_t gLayer = 0, gLadder = 0, gModule = 0;
   Int_t lLadderLocationY = 0;
   TBranch *branchRecP = clustersTree->GetBranch("ITSRecPoints");
   if (!branchRecP) { 
     AliError("can't get the branch with the ITS clusters !");
-    return;
+    return rv;
   }
+
+  // Check id histograms already created for this Event Specie
+  if ( ! fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset) )
+    rv = InitRecPoints() ;
+  
   static TClonesArray statRecpoints("AliITSRecPoint");
   TClonesArray *recpoints = &statRecpoints;
   branchRecP->SetAddress(&recpoints);
   Int_t nClustersLayer5 = 0, nClustersLayer6 = 0;
   Int_t npoints = 0;      
   Float_t cluglo[3]={0.,0.,0.}; 
+  //printf("*-*-*-*-*-*-*---*-*-*-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints STEP1 \n");
   for(Int_t module = 0; module < clustersTree->GetEntries(); module++){
     branchRecP->GetEvent(module);
     npoints += recpoints->GetEntries();
     AliITSgeomTGeo::GetModuleId(module,gLayer,gLadder,gModule);
+    //printf("SSDDataMAkerRec:::::::::::::::::::::::gLayer ========== %d \n\n",gLayer);
     lLadderLocationY = 3*gLadder;
-
+    ////printf("*-*-*-*-*-*-*---*-*-*-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints inside loop \n");
     for(Int_t j = 0;j < recpoints->GetEntries(); j++){
+      ////printf("*-*-*-*-*-*-*---*-*-*-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints inside loop 2\n");
       AliITSRecPoint *recp = (AliITSRecPoint*)recpoints->At(j);    
       Int_t layer = recp->GetLayer();
+      //printf("SSDDataMAkerRec:::::::::::::::::::::::layer ========== %d \n\n",layer);
       recp->GetGlobalXYZ(cluglo);
       Float_t radius = TMath::Sqrt(cluglo[0]*cluglo[0]+cluglo[1]*cluglo[1]); 
       Float_t phi = TMath::ATan2(cluglo[1],cluglo[0]);
@@ -751,51 +1279,119 @@ void AliITSQASSDDataMakerRec::MakeRecPoints(TTree *clustersTree)
       Double_t chargePSide = clusterCharge*(1. + chargeRatio);
       Double_t chargeNSide = clusterCharge*(1. - chargeRatio);
       if(layer == 4) {
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 0)->Fill(module);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 4)->Fill(recp->GetDetLocalX());
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 6)->Fill(recp->GetDetLocalZ());
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 8)->Fill(cluglo[0]);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 10)->Fill(cluglo[1]);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 12)->Fill(cluglo[2]);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 14)->Fill(phi);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 16)->Fill(theta);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 18)->Fill(radius);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 20)->Fill(recp->GetType());
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 22)->Fill(recp->GetChargeRatio());
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 24)->Fill(recp->GetQ());
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 26)->Fill(chargePSide);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 28)->Fill(chargeNSide);
-       if(chargePSide != 0.) fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 30)->Fill(chargeNSide/chargePSide);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 32)->Fill(chargePSide,chargeNSide);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 34)->SetBinContent(gModule,lLadderLocationY,recp->GetQ());
+       //printf("-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints Filling 4 called \n");
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 20)->Fill(recp->GetType());
+
+       if(recp->GetType() != 1) continue;
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 0)->Fill(module);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 4)->Fill(recp->GetDetLocalX());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 6)->Fill(recp->GetDetLocalZ());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 8)->Fill(cluglo[0]);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 10)->Fill(cluglo[1]);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 12)->Fill(cluglo[2]);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 14)->Fill(phi);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 16)->Fill(theta);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 18)->Fill(radius);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 22)->Fill(recp->GetChargeRatio());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 24)->Fill(recp->GetQ());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 26)->Fill(chargePSide);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 28)->Fill(chargeNSide);
+       if(chargePSide != 0.) fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 30)->Fill(chargeNSide/chargePSide);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 32)->Fill(chargePSide,chargeNSide);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 34)->SetBinContent(gModule,lLadderLocationY,recp->GetQ());
+       ((TH2F *)fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 36))->Fill(gModule,499+gLadder,1);
        nClustersLayer5 += 1;
       }//layer 5 histograms
       if(layer == 5) {
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 1)->Fill(module);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 5)->Fill(recp->GetDetLocalX());
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 7)->Fill(recp->GetDetLocalZ());
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 9)->Fill(cluglo[0]);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 11)->Fill(cluglo[1]);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 13)->Fill(cluglo[2]);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 15)->Fill(phi);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 17)->Fill(theta);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 19)->Fill(radius);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 21)->Fill(recp->GetType());
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 23)->Fill(recp->GetChargeRatio());
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 25)->Fill(recp->GetQ());
-        fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 27)->Fill(chargePSide);
-        fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 29)->Fill(chargeNSide);
-        if(chargePSide != 0.) fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 31)->Fill(chargeNSide/chargePSide);
-        fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 33)->Fill(chargePSide,chargeNSide);
-       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 35)->SetBinContent(gModule,lLadderLocationY,recp->GetQ());
+       //printf("-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints Filling 5 called \n");
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 21)->Fill(recp->GetType());
+
+       if(recp->GetType() != 1) continue;
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 1)->Fill(module);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 5)->Fill(recp->GetDetLocalX());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 7)->Fill(recp->GetDetLocalZ());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 9)->Fill(cluglo[0]);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 11)->Fill(cluglo[1]);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 13)->Fill(cluglo[2]);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 15)->Fill(phi);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 17)->Fill(theta);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 19)->Fill(radius);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 23)->Fill(recp->GetChargeRatio());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 25)->Fill(recp->GetQ());
+        fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 27)->Fill(chargePSide);
+        fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 29)->Fill(chargeNSide);
+        if(chargePSide != 0.) fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 31)->Fill(chargeNSide/chargePSide);
+        fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 33)->Fill(chargePSide,chargeNSide);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 35)->SetBinContent(gModule,lLadderLocationY,recp->GetQ());
+       ((TH2F *)fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 37))->Fill(gModule,599+gLadder,1);
        nClustersLayer6 += 1;
       }//layer 6 histograms
     }//rec. points loop
   }//module loop
-
-  fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 2)->Fill(nClustersLayer5);
-  fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 3)->Fill(nClustersLayer6);
+  
+  //printf("-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints Filling called \n");
+  fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 2)->Fill(nClustersLayer5);
+  fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 3)->Fill(nClustersLayer6);
 
   statRecpoints.Clear();
+  return rv ; 
 }
 
+//____________________________________________________________________________ 
+Int_t AliITSQASSDDataMakerRec::GetOffset(AliQAv1::TASKINDEX_t task) {
+  // Returns offset number according to the specified task 
+  Int_t offset=0;
+  if( task == AliQAv1::kRAWS ) {
+    offset=fGenRawsOffset;  
+  }
+  else if( task == AliQAv1::kDIGITSR ) {
+    offset=fGenDigitsOffset;   
+  }
+  else if( task == AliQAv1::kRECPOINTS ) {
+    offset=fGenRecPointsOffset;   
+  }
+  else {
+    AliWarning("No task has been selected. Offset set to zero.\n");
+  }
+
+  return offset;
+}
+
+//_______________________________________________________________
+
+void AliITSQASSDDataMakerRec::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset) {
+  // Returns offset number according to the specified task
+  if( task == AliQAv1::kRAWS ) {
+    fGenRawsOffset=offset;
+  }
+  else if( task == AliQAv1::kDIGITSR ) {
+    fGenDigitsOffset=offset;
+  }
+  else if( task == AliQAv1::kRECPOINTS ) {
+    fGenRecPointsOffset=offset;
+  }
+  else {
+    AliInfo("No task has been selected. Offset set to zero.\n");
+  }
+}
+
+//____________________________________________________________________________ 
+Int_t AliITSQASSDDataMakerRec::GetTaskHisto(AliQAv1::TASKINDEX_t task) {
+  // Returns the number of histograms associated to the specified task
+  Int_t histotot=0;
+
+  if( task == AliQAv1::kRAWS ) {
+    histotot=fSSDhRawsTask;  
+  }
+  else if( task == AliQAv1::kDIGITSR ) {
+    histotot=fSSDhDigitsTask;
+  }
+  else if( task == AliQAv1::kRECPOINTS ){
+    histotot=fSSDhRecPointsTask;   
+  }
+  else { 
+    AliWarning("No task has been selected. TaskHisto set to zero.\n");
+  }
+
+  return histotot;
+}