Fixes for bug #49914: Compilation breaks in trunk, and bug #48629: Trunk cannot read...
[u/mrichter/AliRoot.git] / MUON / AliMUONQADataMakerRec.cxx
index 0bd194a..b343c9f 100644 (file)
@@ -29,7 +29,7 @@
 #include "AliMUONRawStreamTracker.h"
 #include "AliMUONRawStreamTrigger.h"
 #include "AliMUONRegHeader.h"
-#include "AliMUONTrackerCalibratedDataMaker.h"
+#include "AliMUONTrackerDataMaker.h"
 #include "AliMUONTriggerDisplay.h"
 #include "AliMUONVCluster.h"
 #include "AliMUONVClusterStore.h"
@@ -87,7 +87,7 @@ ClassImp(AliMUONQADataMakerRec)
            
 //____________________________________________________________________________ 
 AliMUONQADataMakerRec::AliMUONQADataMakerRec() : 
-AliQADataMakerRec(AliQA::GetDetName(AliQA::kMUON), "MUON Quality Assurance Data Maker"),
+AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kMUON), "MUON Quality Assurance Data Maker"),
 fIsInitRaws(kFALSE),
 fIsInitRecPointsTracker(kFALSE),
 fIsInitRecPointsTrigger(kFALSE),
@@ -96,18 +96,7 @@ fDigitStore(0x0),
 fTriggerStore(0x0),
 fDigitMaker(0x0),
 fClusterStore(0x0),
-fTrackerDataMaker(0x0),
-fhESDnTotClustersPerCh(0x0),
-fhESDnTotClustersPerDE(0x0),
-fhESDnTotFullClustersPerDE(0x0),
-fhESDSumClusterChargePerDE(0x0),
-fhESDSumClusterSizePerDE(0x0),
-fhESDSumResidualXPerDE(0x0),
-fhESDSumResidualYPerDE(0x0),
-fhESDSumResidualX2PerDE(0x0),
-fhESDSumResidualY2PerDE(0x0),
-fhESDSumLocalChi2XPerDE(0x0),
-fhESDSumLocalChi2YPerDE(0x0)
+fTrackerDataMaker(0x0)
 {
     /// ctor
        
@@ -136,18 +125,7 @@ fDigitStore(0x0),
 fTriggerStore(0x0),
 fDigitMaker(0x0),
 fClusterStore(0x0),
-fTrackerDataMaker(0x0),
-fhESDnTotClustersPerCh(0x0),
-fhESDnTotClustersPerDE(0x0),
-fhESDnTotFullClustersPerDE(0x0),
-fhESDSumClusterChargePerDE(0x0),
-fhESDSumClusterSizePerDE(0x0),
-fhESDSumResidualXPerDE(0x0),
-fhESDSumResidualYPerDE(0x0),
-fhESDSumResidualX2PerDE(0x0),
-fhESDSumResidualY2PerDE(0x0),
-fhESDSumLocalChi2XPerDE(0x0),
-fhESDSumLocalChi2YPerDE(0x0)
+fTrackerDataMaker(0x0)
 {
     ///copy ctor 
 
@@ -192,21 +170,10 @@ AliMUONQADataMakerRec::~AliMUONQADataMakerRec()
   delete fDigitMaker;
   delete fClusterStore;
   delete fTrackerDataMaker;
-  delete fhESDnTotClustersPerCh;
-  delete fhESDnTotClustersPerDE;
-  delete fhESDnTotFullClustersPerDE;
-  delete fhESDSumClusterChargePerDE;
-  delete fhESDSumClusterSizePerDE;
-  delete fhESDSumResidualXPerDE;
-  delete fhESDSumResidualYPerDE;
-  delete fhESDSumResidualX2PerDE;
-  delete fhESDSumResidualY2PerDE;
-  delete fhESDSumLocalChi2XPerDE;
-  delete fhESDSumLocalChi2YPerDE;
 }
 
 //____________________________________________________________________________ 
-void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray** list)
+void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray** list)
 {
   ///Detector specific actions at end of cycle
   
@@ -217,7 +184,7 @@ void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArra
   
   for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
     SetEventSpecie(specie) ; 
-    if ( task == AliQA::kRAWS && fTrackerDataMaker ) 
+    if ( task == AliQAv1::kRAWS && fTrackerDataMaker ) 
       {
         TIter next(list[specie]);
         TObject* o;
@@ -249,9 +216,62 @@ void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArra
                 }
             }
       }
-  
+    
+    // Normalize RecPoints histos
+    if ( task == AliQAv1::kRECPOINTS ) {
+      
+      TH1* hTrackerClusterChargePerChMean = GetRecPointsData(kTrackerClusterChargePerChMean);
+      TH1* hTrackerClusterChargePerChSigma = GetRecPointsData(kTrackerClusterChargePerChSigma);
+      TH1* hTrackerClusterMultiplicityPerChMean = GetRecPointsData(kTrackerClusterMultiplicityPerChMean);
+      TH1* hTrackerClusterMultiplicityPerChSigma = GetRecPointsData(kTrackerClusterMultiplicityPerChSigma);
+      TH1* hTrackerClusterChargePerDEMean = GetRecPointsData(kTrackerClusterChargePerDEMean);
+      TH1* hTrackerClusterMultiplicityPerDEMean = GetRecPointsData(kTrackerClusterMultiplicityPerDEMean);
+      
+      // loop over chambers
+      for (Int_t iCh = 0; iCh < AliMUONConstants::NTrackingCh(); iCh++) {
+       
+       TH1* hTrackerClusterChargePerChamber = GetRecPointsData(kTrackerClusterChargePerChamber+iCh);
+       Double_t sigmaCharge = hTrackerClusterChargePerChamber->GetRMS();
+       hTrackerClusterChargePerChMean->SetBinContent(iCh+1, hTrackerClusterChargePerChamber->GetMean());
+       hTrackerClusterChargePerChMean->SetBinError(iCh+1, hTrackerClusterChargePerChamber->GetMeanError());
+       hTrackerClusterChargePerChSigma->SetBinContent(iCh+1, sigmaCharge);
+       hTrackerClusterChargePerChSigma->SetBinError(iCh+1, hTrackerClusterChargePerChamber->GetRMSError());
+       
+       TH1* hTrackerClusterMultiplicityPerChamber = GetRecPointsData(kTrackerClusterMultiplicityPerChamber+iCh);
+       Double_t sigmaSize = hTrackerClusterMultiplicityPerChamber->GetRMS();
+       hTrackerClusterMultiplicityPerChMean->SetBinContent(iCh+1, hTrackerClusterMultiplicityPerChamber->GetMean());
+       hTrackerClusterMultiplicityPerChMean->SetBinError(iCh+1, hTrackerClusterMultiplicityPerChamber->GetMeanError());
+       hTrackerClusterMultiplicityPerChSigma->SetBinContent(iCh+1, sigmaSize);
+       hTrackerClusterMultiplicityPerChSigma->SetBinError(iCh+1, hTrackerClusterMultiplicityPerChamber->GetRMSError());
+       
+       // loop over DE into chamber iCh
+       AliMpDEIterator it;
+       it.First(iCh);
+       while ( !it.IsDone()) {
+         
+         Int_t iDE = it.CurrentDEId();
+         
+         TH1* hTrackerClusterChargePerDE = GetRecPointsData(kTrackerClusterChargePerDE+iDE);
+         hTrackerClusterChargePerDEMean->SetBinContent(iDE+1, hTrackerClusterChargePerDE->GetMean());
+         Double_t nClusters = hTrackerClusterChargePerDE->GetEntries();
+         if (nClusters > 1) hTrackerClusterChargePerDEMean->SetBinError(iDE+1, sigmaCharge/TMath::Sqrt(nClusters));
+         else hTrackerClusterChargePerDEMean->SetBinError(iDE+1, hTrackerClusterChargePerChamber->GetXaxis()->GetXmax());
+         
+         TH1* hTrackerClusterMultiplicityPerDE = GetRecPointsData(kTrackerClusterMultiplicityPerDE+iDE);
+         hTrackerClusterMultiplicityPerDEMean->SetBinContent(iDE+1, hTrackerClusterMultiplicityPerDE->GetMean());
+         nClusters = hTrackerClusterMultiplicityPerDE->GetEntries();
+         if (nClusters > 1) hTrackerClusterMultiplicityPerDEMean->SetBinError(iDE+1, sigmaSize/TMath::Sqrt(nClusters));
+         else hTrackerClusterMultiplicityPerDEMean->SetBinError(iDE+1, hTrackerClusterMultiplicityPerChamber->GetXaxis()->GetXmax());
+         
+         it.Next();
+       }
+         
+      }
+      
+    }
+    
     // Normalize ESD histos
-    if ( task == AliQA::kESDS ) {
+    if ( task == AliQAv1::kESDS ) {
       
       Double_t nTracks = GetESDsData(kESDnClustersPerTrack)->GetEntries();
       if (nTracks <= 0) continue;
@@ -276,11 +296,22 @@ void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArra
       TH1* hESDResidualYPerDESigma = GetESDsData(kESDResidualYPerDESigma);
       TH1* hESDLocalChi2XPerDEMean = GetESDsData(kESDLocalChi2XPerDEMean);
       TH1* hESDLocalChi2YPerDEMean = GetESDsData(kESDLocalChi2YPerDEMean);
-      
+      TH1* hESDnTotClustersPerCh = GetESDsData(kESDnTotClustersPerCh);
+      TH1* hESDnTotClustersPerDE = GetESDsData(kESDnTotClustersPerDE);
+      TH1* hESDnTotFullClustersPerDE = GetESDsData(kESDnTotFullClustersPerDE);
+      TH1* hESDSumClusterChargePerDE = GetESDsData(kESDSumClusterChargePerDE);
+      TH1* hESDSumClusterSizePerDE = GetESDsData(kESDSumClusterSizePerDE);
+      TH1* hESDSumResidualXPerDE = GetESDsData(kESDSumResidualXPerDE);
+      TH1* hESDSumResidualYPerDE = GetESDsData(kESDSumResidualYPerDE);
+      TH1* hESDSumResidualX2PerDE = GetESDsData(kESDSumResidualX2PerDE);
+      TH1* hESDSumResidualY2PerDE = GetESDsData(kESDSumResidualY2PerDE);
+      TH1* hESDSumLocalChi2XPerDE = GetESDsData(kESDSumLocalChi2XPerDE);
+      TH1* hESDSumLocalChi2YPerDE = GetESDsData(kESDSumLocalChi2YPerDE);
+                         
       hESDnClustersPerCh->Reset();
       hESDnClustersPerDE->Reset();
-      hESDnClustersPerCh->Add(fhESDnTotClustersPerCh, 1./nTracks);
-      hESDnClustersPerDE->Add(fhESDnTotClustersPerDE, 1./nTracks);
+      hESDnClustersPerCh->Add(hESDnTotClustersPerCh, 1./nTracks);
+      hESDnClustersPerDE->Add(hESDnTotClustersPerDE, 1./nTracks);
       
       // loop over chambers
       for (Int_t iCh = 0; iCh < AliMUONConstants::NTrackingCh(); iCh++) {
@@ -330,62 +361,62 @@ void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArra
          
          Int_t iDE = it.CurrentDEId();
          
-         Double_t nClusters = fhESDnTotClustersPerDE->GetBinContent(iDE+1);
+         Double_t nClusters = hESDnTotClustersPerDE->GetBinContent(iDE+1);
          if (nClusters > 1) {
            
-           hESDClusterChargePerDE->SetBinContent(iDE+1, fhESDSumClusterChargePerDE->GetBinContent(iDE+1)/nClusters);
+           hESDClusterChargePerDE->SetBinContent(iDE+1, hESDSumClusterChargePerDE->GetBinContent(iDE+1)/nClusters);
            hESDClusterChargePerDE->SetBinError(iDE+1, sigmaCharge/TMath::Sqrt(nClusters));
            
-           Double_t meanResX = fhESDSumResidualXPerDE->GetBinContent(iDE+1)/nClusters;
+           Double_t meanResX = hESDSumResidualXPerDE->GetBinContent(iDE+1)/nClusters;
            hESDResidualXPerDEMean->SetBinContent(iDE+1, meanResX);
            hESDResidualXPerDEMean->SetBinError(iDE+1, sigmaResidualX/TMath::Sqrt(nClusters));
-           hESDResidualXPerDESigma->SetBinContent(iDE+1, TMath::Sqrt(fhESDSumResidualX2PerDE->GetBinContent(iDE+1)/nClusters - meanResX*meanResX));
+           hESDResidualXPerDESigma->SetBinContent(iDE+1, TMath::Sqrt(hESDSumResidualX2PerDE->GetBinContent(iDE+1)/nClusters - meanResX*meanResX));
            hESDResidualXPerDESigma->SetBinError(iDE+1, sigmaResidualX/TMath::Sqrt(2.*nClusters));
            
-           Double_t meanResY = fhESDSumResidualYPerDE->GetBinContent(iDE+1)/nClusters;
+           Double_t meanResY = hESDSumResidualYPerDE->GetBinContent(iDE+1)/nClusters;
            hESDResidualYPerDEMean->SetBinContent(iDE+1, meanResY);
            hESDResidualYPerDEMean->SetBinError(iDE+1, sigmaResidualY/TMath::Sqrt(nClusters));
-           hESDResidualYPerDESigma->SetBinContent(iDE+1, TMath::Sqrt(fhESDSumResidualY2PerDE->GetBinContent(iDE+1)/nClusters - meanResY*meanResY));
+           hESDResidualYPerDESigma->SetBinContent(iDE+1, TMath::Sqrt(hESDSumResidualY2PerDE->GetBinContent(iDE+1)/nClusters - meanResY*meanResY));
            hESDResidualYPerDESigma->SetBinError(iDE+1, sigmaResidualY/TMath::Sqrt(2.*nClusters));
            
-           hESDLocalChi2XPerDEMean->SetBinContent(iDE+1, fhESDSumLocalChi2XPerDE->GetBinContent(iDE+1)/nClusters);
+           hESDLocalChi2XPerDEMean->SetBinContent(iDE+1, hESDSumLocalChi2XPerDE->GetBinContent(iDE+1)/nClusters);
            hESDLocalChi2XPerDEMean->SetBinError(iDE+1, sigmaLocalChi2X/TMath::Sqrt(nClusters));
            
-           hESDLocalChi2YPerDEMean->SetBinContent(iDE+1, fhESDSumLocalChi2YPerDE->GetBinContent(iDE+1)/nClusters);
+           hESDLocalChi2YPerDEMean->SetBinContent(iDE+1, hESDSumLocalChi2YPerDE->GetBinContent(iDE+1)/nClusters);
            hESDLocalChi2YPerDEMean->SetBinError(iDE+1, sigmaLocalChi2Y/TMath::Sqrt(nClusters));
            
          } else {
            
-           hESDClusterChargePerDE->SetBinContent(iDE+1, fhESDSumClusterChargePerDE->GetBinContent(iDE+1));
+           hESDClusterChargePerDE->SetBinContent(iDE+1, hESDSumClusterChargePerDE->GetBinContent(iDE+1));
            hESDClusterChargePerDE->SetBinError(iDE+1, hESDClusterChargeInCh->GetXaxis()->GetXmax());
            
-           hESDResidualXPerDEMean->SetBinContent(iDE+1, fhESDSumResidualXPerDE->GetBinContent(iDE+1));
+           hESDResidualXPerDEMean->SetBinContent(iDE+1, hESDSumResidualXPerDE->GetBinContent(iDE+1));
            hESDResidualXPerDEMean->SetBinError(iDE+1, hESDResidualXInCh->GetXaxis()->GetXmax());
            hESDResidualXPerDESigma->SetBinContent(iDE+1, 0.);
            hESDResidualXPerDESigma->SetBinError(iDE+1, hESDResidualXInCh->GetXaxis()->GetXmax());
            
-           hESDResidualYPerDEMean->SetBinContent(iDE+1, fhESDSumResidualYPerDE->GetBinContent(iDE+1));
+           hESDResidualYPerDEMean->SetBinContent(iDE+1, hESDSumResidualYPerDE->GetBinContent(iDE+1));
            hESDResidualYPerDEMean->SetBinError(iDE+1, hESDResidualYInCh->GetXaxis()->GetXmax());
            hESDResidualYPerDESigma->SetBinContent(iDE+1, 0.);
            hESDResidualYPerDESigma->SetBinError(iDE+1, hESDResidualYInCh->GetXaxis()->GetXmax());
            
-           hESDLocalChi2XPerDEMean->SetBinContent(iDE+1, fhESDSumLocalChi2XPerDE->GetBinContent(iDE+1));
+           hESDLocalChi2XPerDEMean->SetBinContent(iDE+1, hESDSumLocalChi2XPerDE->GetBinContent(iDE+1));
            hESDLocalChi2XPerDEMean->SetBinError(iDE+1, hESDLocalChi2XInCh->GetXaxis()->GetXmax());
            
-           hESDLocalChi2YPerDEMean->SetBinContent(iDE+1, fhESDSumLocalChi2YPerDE->GetBinContent(iDE+1));
+           hESDLocalChi2YPerDEMean->SetBinContent(iDE+1, hESDSumLocalChi2YPerDE->GetBinContent(iDE+1));
            hESDLocalChi2YPerDEMean->SetBinError(iDE+1, hESDLocalChi2YInCh->GetXaxis()->GetXmax());
            
          }
          
-         Double_t nFullClusters = fhESDnTotFullClustersPerDE->GetBinContent(iDE+1);
+         Double_t nFullClusters = hESDnTotFullClustersPerDE->GetBinContent(iDE+1);
          if (nFullClusters > 1) {
            
-           hESDClusterSizePerDE->SetBinContent(iDE+1, fhESDSumClusterSizePerDE->GetBinContent(iDE+1)/nFullClusters);
+           hESDClusterSizePerDE->SetBinContent(iDE+1, hESDSumClusterSizePerDE->GetBinContent(iDE+1)/nFullClusters);
            hESDClusterSizePerDE->SetBinError(iDE+1, sigmaSize/TMath::Sqrt(nFullClusters));
            
          } else {
            
-           hESDClusterSizePerDE->SetBinContent(iDE+1, fhESDSumClusterSizePerDE->GetBinContent(iDE+1));
+           hESDClusterSizePerDE->SetBinContent(iDE+1, hESDSumClusterSizePerDE->GetBinContent(iDE+1));
            hESDClusterSizePerDE->SetBinError(iDE+1, hESDClusterSizeInCh->GetXaxis()->GetXmax());
            
          }
@@ -400,7 +431,7 @@ void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArra
   }
   
   // do the QA checking
-  AliQAChecker::Instance()->Run(AliQA::kMUON, task, list) ;
+  AliQAChecker::Instance()->Run(AliQAv1::kMUON, task, list) ;
 }
 
 //____________________________________________________________________________ 
@@ -479,6 +510,10 @@ void AliMUONQADataMakerRec::InitRaws()
          Add2RawsList(h9, kTriggerHVDisplay + iChamber, !forExpert);
        }
 
+       TH1F* h10 = new TH1F("hTriggerScalersTime", "Trigger scalers acquisition time", 1, 0.5, 1.5);
+       h10->GetXaxis()->SetBinLabel(1, "One-bin histogram: bin is filled at each scaler event.");
+       h10->GetYaxis()->SetTitle("Cumulated scaler time (s)");
+       Add2RawsList(h10, kTriggerScalersTime, !forExpert);
        
   Int_t nbp(0);
   TIter next(AliMpDDLStore::Instance()->CreateBusPatchIterator());
@@ -493,16 +528,14 @@ void AliMUONQADataMakerRec::InitRaws()
   Add2RawsList(hbp,kTrackerBusPatchOccupancy,!forExpert);
 
   const Bool_t histogram(kFALSE);
-  const Bool_t fastDecoder(kTRUE);
-
-  fTrackerDataMaker = new AliMUONTrackerCalibratedDataMaker(GetRecoParam(),
-                                                           AliCDBManager::Instance()->GetRun(),
-                                                           0x0,
-                                                           AliCDBManager::Instance()->GetDefaultStorage()->GetURI(),
-                                                           "NOGAIN",
-                                                           histogram,
-                                                           0.0,0.0,
-                                                           fastDecoder);
+
+  fTrackerDataMaker = new AliMUONTrackerDataMaker(GetRecoParam(),
+                                                  AliCDBManager::Instance()->GetRun(),
+                                                  0x0,
+                                                  AliCDBManager::Instance()->GetDefaultStorage()->GetURI(),
+                                                  "NOGAIN",
+                                                  histogram,
+                                                  0.0,0.0);
                
   fTrackerDataMaker->Data()->DisableChannelLevel(); // to save up disk space, we only store starting at the manu level
        
@@ -525,72 +558,98 @@ void AliMUONQADataMakerRec::InitRecPoints()
 //____________________________________________________________________________ 
 void AliMUONQADataMakerRec::InitRecPointsTracker()
 {
-       /// create Reconstructed Points histograms in RecPoints subdir for the
-       /// MUON tracker subsystem.
-
+  /// create Reconstructed Points histograms in RecPoints subdir for the
+  /// MUON tracker subsystem.
+  
   AliCodeTimerAuto("");
   
   Bool_t forExpert(kTRUE);
+  TH1I *h1I;
+  TH1F *h1F;
+  TH2F *h2F;
   
-       AliMpDEIterator it;
-       
-       it.First();
-       
-       Int_t ndes(0);
-       
-       while ( !it.IsDone())
-       {
-               Int_t detElemId = it.CurrentDEId();
-               
-               it.Next();
-
-               if ( AliMpDEManager::GetStationType(detElemId) != AliMp::kStationTrigger )
-               {
-                       ndes = TMath::Max(ndes,detElemId);
-
-                       TH1* h = new TH1I(Form("hTrackerClusterMultiplicityForDE%04d",detElemId),
-                                         Form("Multiplicity of the clusters in detection element %d",detElemId),
-                                         100,0,100);
-                       
-                       h->GetXaxis()->SetTitle("Detection Element Id");
-                       
-                       Add2RecPointsList(h,kTrackerClusterMultiplicityPerDE+detElemId,forExpert);
-                       
-                       h =  new TH1I(Form("hTrackerClusterChargeForDE%04d",detElemId),
-                                     Form("Charge of the clusters in detection element %d",detElemId),
-                                     100,0,1000);
-
-                       h->GetXaxis()->SetTitle("Detection Element Id");
-
-                       Add2RecPointsList(h,kTrackerClusterChargePerDE+detElemId,forExpert);
-
-               }
-
-       }
-
-       TH1* h = new TH1I("hTrackerNumberOfClustersPerDE","Number of clusters per detection element",
-                                                                               ndes, 0.5, ndes + 0.5);
-
-       h->GetXaxis()->SetTitle("Detection Element Id");
-
-       Add2RecPointsList(h, kTrackerNumberOfClustersPerDE,!forExpert);
-
-       for ( Int_t i = 0; i < AliMpConstants::NofTrackingChambers(); ++i ) 
-       {
-               TH1* h1 = new TH1I("hTrackerNumberOfClustersPerChamber","Number of clusters per chamber",
-                                  AliMpConstants::NofTrackingChambers(),-0.5,AliMpConstants::NofTrackingChambers()-0.5);
-               Add2RecPointsList(h1,kTrackerNumberOfClustersPerChamber,forExpert);
-               h1 = new TH1I(Form("hTrackerClusterMultiplicityForChamber%d",i),
-                             Form("Cluster multiplicity for chamber %d",i),
-                             100,0,100);
-               Add2RecPointsList(h1,kTrackerClusterMultiplicityPerChamber+i,forExpert);
-               h1 = new TH1I(Form("hTrackerClusterChargeForChamber%d",i),
-                             Form("Cluster charge for chamber %d",i),
-                             100,0,1000);
-               Add2RecPointsList(h1,kTrackerClusterChargePerChamber+i,forExpert);
-       }
-       
-       fIsInitRecPointsTracker=kTRUE;
+  // histograms per chamber
+  Int_t nCh = AliMpConstants::NofTrackingChambers();
+  for ( Int_t i = 0; i < nCh; ++i ) 
+  {
+    h1I = new TH1I(Form("hTrackerClusterMultiplicityForChamber%d",i+1), Form("cluster size distribution in chamber %d;size (n_{pads})",i+1), 100,0,100);
+    Add2RecPointsList(h1I,kTrackerClusterMultiplicityPerChamber+i,forExpert);
+    
+    h1I = new TH1I(Form("hTrackerClusterChargeForChamber%d",i+1), Form("cluster charge distribution in chamber %d;charge (ADC counts)",i+1), 500,0,5000);
+    Add2RecPointsList(h1I,kTrackerClusterChargePerChamber+i,forExpert);
+    
+    Float_t rMax = AliMUONConstants::Rmax(i/2);
+    h2F = new TH2F(Form("hTrackerClusterHitMapForChamber%d",i+1), Form("cluster position distribution in chamber %d;X (cm);Y (cm)",i+1), 100, -rMax, rMax, 100, -rMax, rMax);
+    Add2RecPointsList(h2F, kTrackerClusterHitMapPerChamber+i,forExpert);
+  }
+  
+  // summary histograms per chamber
+  h1I = new TH1I("hTrackerNumberOfClustersPerChamber", "Number of clusters per chamber;chamber ID;n_{clusters}", nCh,-0.5,nCh-0.5);
+  Add2RecPointsList(h1I,kTrackerNumberOfClustersPerChamber,forExpert);
+  
+  h1F = new TH1F("hTrackerClusterMultiplicityPerChMean", "cluster mean size per chamber;chamber ID;<size> (n_{pads})", nCh,-0.5,nCh-0.5);
+  h1F->SetOption("P");
+  h1F->SetMarkerStyle(kFullDotMedium);
+  h1F->SetMarkerColor(kRed);
+  Add2RecPointsList(h1F, kTrackerClusterMultiplicityPerChMean,forExpert);
+  
+  h1F = new TH1F("hTrackerClusterMultiplicityPerChSigma", "cluster size dispersion per chamber;chamber ID;#sigma_{size} (n_{pads})", nCh,-0.5,nCh-0.5);
+  h1F->SetOption("P");
+  h1F->SetMarkerStyle(kFullDotMedium);
+  h1F->SetMarkerColor(kRed);
+  Add2RecPointsList(h1F, kTrackerClusterMultiplicityPerChSigma,forExpert);
+  
+  h1F = new TH1F("hTrackerClusterChargePerChMean", "cluster mean charge per chamber;chamber ID;<charge> (ADC counts)", nCh,-0.5,nCh-0.5);
+  h1F->SetOption("P");
+  h1F->SetMarkerStyle(kFullDotMedium);
+  h1F->SetMarkerColor(kRed);
+  Add2RecPointsList(h1F, kTrackerClusterChargePerChMean,forExpert);
+  
+  h1F = new TH1F("hTrackerClusterChargePerChSigma", "cluster charge dispersion per chamber;chamber ID;#sigma_{charge} (ADC counts)", nCh,-0.5,nCh-0.5);
+  h1F->SetOption("P");
+  h1F->SetMarkerStyle(kFullDotMedium);
+  h1F->SetMarkerColor(kRed);
+  Add2RecPointsList(h1F, kTrackerClusterChargePerChSigma,forExpert);
+  
+  // histograms per DE
+  Int_t ndes(0);
+  AliMpDEIterator it;
+  it.First();
+  while ( !it.IsDone())
+  {
+    Int_t detElemId = it.CurrentDEId();
+    
+    if ( AliMpDEManager::GetStationType(detElemId) != AliMp::kStationTrigger )
+    {
+      ndes = TMath::Max(ndes,detElemId);
+      
+      h1I = new TH1I(Form("hTrackerClusterMultiplicityForDE%04d",detElemId), Form("cluster size distribution in detection element %d;size (n_{pads})",detElemId), 100,0,100);
+      Add2RecPointsList(h1I,kTrackerClusterMultiplicityPerDE+detElemId,forExpert);
+      
+      h1I = new TH1I(Form("hTrackerClusterChargeForDE%04d",detElemId), Form("cluster charge distribution in detection element %d;charge (ADC counts)",detElemId), 500,0,5000);
+      Add2RecPointsList(h1I,kTrackerClusterChargePerDE+detElemId,forExpert);
+    }
+    
+    it.Next();
+  }
+  
+  // summary histograms per DE
+  h1I = new TH1I("hTrackerNumberOfClustersPerDE", "Number of clusters per detection element;DetElem ID;n_{clusters}", ndes+1,-0.5,ndes+0.5);
+  Add2RecPointsList(h1I, kTrackerNumberOfClustersPerDE,!forExpert);
+  
+  h1F = new TH1F("hTrackerClusterMultiplicityPerDEMean", "cluster mean size per DE;DetElem ID;<size> (n_{pads})", ndes+1,-0.5,ndes+0.5);
+  h1F->SetOption("P");
+  h1F->SetMarkerStyle(kFullDotMedium);
+  h1F->SetMarkerColor(kRed);
+  Add2RecPointsList(h1F, kTrackerClusterMultiplicityPerDEMean,forExpert);
+  
+  h1F = new TH1F("hTrackerClusterChargePerDEMean", "cluster mean charge per DE;DetElem ID;<charge> (ADC counts)", ndes+1,-0.5,ndes+0.5);
+  h1F->SetOption("P");
+  h1F->SetMarkerStyle(kFullDotMedium);
+  h1F->SetMarkerColor(kRed);
+  Add2RecPointsList(h1F, kTrackerClusterChargePerDEMean,forExpert);
+  
+  fIsInitRecPointsTracker=kTRUE;
 }
 
 //____________________________________________________________________________ 
@@ -686,11 +745,11 @@ void AliMUONQADataMakerRec::InitESDs()
   TH1F* hESDnClustersPerTrack = new TH1F("hESDnClustersPerTrack", "number of associated clusters per track;n_{clusters}", 20, 0., 20.);
   Add2ESDsList(hESDnClustersPerTrack, kESDnClustersPerTrack,!forExpert);
   
-  TH1F* hESDnClustersPerCh = new TH1F("hESDnClustersPerCh", "averaged number of clusters per chamber per track;chamber ID;<n_{clusters}>", nCh, 0, nCh);
+  TH1F* hESDnClustersPerCh = new TH1F("hESDnClustersPerCh", "averaged number of clusters per chamber per track;chamber ID;<n_{clusters}>", nCh, -0.5, nCh-0.5);
   hESDnClustersPerCh->SetFillColor(kRed);
   Add2ESDsList(hESDnClustersPerCh, kESDnClustersPerCh,forExpert);
   
-  TH1F* hESDnClustersPerDE = new TH1F("hESDnClustersPerDE", "averaged number of clusters per DE per track;DetElem ID;<n_{clusters}>", nDE, 0, nDE);
+  TH1F* hESDnClustersPerDE = new TH1F("hESDnClustersPerDE", "averaged number of clusters per DE per track;DetElem ID;<n_{clusters}>", nDE+1, -0.5, nDE+0.5);
   hESDnClustersPerDE->SetFillColor(kRed);
   Add2ESDsList(hESDnClustersPerDE, kESDnClustersPerDE,forExpert);
   
@@ -699,19 +758,19 @@ void AliMUONQADataMakerRec::InitESDs()
     Add2ESDsList(hESDClusterChargeInCh, kESDClusterChargeInCh+i,forExpert);
   }
   
-  TH1F* hESDClusterChargePerChMean = new TH1F("hESDClusterChargePerChMean", "cluster mean charge per chamber;chamber ID;<charge> (ADC counts)", nCh, 0, nCh);
+  TH1F* hESDClusterChargePerChMean = new TH1F("hESDClusterChargePerChMean", "cluster mean charge per chamber;chamber ID;<charge> (ADC counts)", nCh, -0.5, nCh-0.5);
   hESDClusterChargePerChMean->SetOption("P");
   hESDClusterChargePerChMean->SetMarkerStyle(kFullDotMedium);
   hESDClusterChargePerChMean->SetMarkerColor(kRed);
   Add2ESDsList(hESDClusterChargePerChMean, kESDClusterChargePerChMean,forExpert);
   
-  TH1F* hESDClusterChargePerChSigma = new TH1F("hESDClusterChargePerChSigma", "cluster charge dispersion per chamber;chamber ID;#sigma_{charge} (ADC counts)", nCh, 0, nCh);
+  TH1F* hESDClusterChargePerChSigma = new TH1F("hESDClusterChargePerChSigma", "cluster charge dispersion per chamber;chamber ID;#sigma_{charge} (ADC counts)", nCh, -0.5, nCh-0.5);
   hESDClusterChargePerChSigma->SetOption("P");
   hESDClusterChargePerChSigma->SetMarkerStyle(kFullDotMedium);
   hESDClusterChargePerChSigma->SetMarkerColor(kRed);
   Add2ESDsList(hESDClusterChargePerChSigma, kESDClusterChargePerChSigma,forExpert);
   
-  TH1F* hESDClusterChargePerDE = new TH1F("hESDClusterChargePerDE", "cluster mean charge per DE;DetElem ID;<charge> (ADC counts)", nDE, 0, nDE);
+  TH1F* hESDClusterChargePerDE = new TH1F("hESDClusterChargePerDE", "cluster mean charge per DE;DetElem ID;<charge> (ADC counts)", nDE+1, -0.5, nDE+0.5);
   hESDClusterChargePerDE->SetOption("P");
   hESDClusterChargePerDE->SetMarkerStyle(kFullDotMedium);
   hESDClusterChargePerDE->SetMarkerColor(kRed);
@@ -722,19 +781,19 @@ void AliMUONQADataMakerRec::InitESDs()
     Add2ESDsList(hESDClusterSizeInCh, kESDClusterSizeInCh+i,forExpert);
   }
   
-  TH1F* hESDClusterSizePerChMean = new TH1F("hESDClusterSizePerChMean", "cluster mean size per chamber;chamber ID;<size> (n_{pads})", nCh, 0, nCh);
+  TH1F* hESDClusterSizePerChMean = new TH1F("hESDClusterSizePerChMean", "cluster mean size per chamber;chamber ID;<size> (n_{pads})", nCh, -0.5, nCh-0.5);
   hESDClusterSizePerChMean->SetOption("P");
   hESDClusterSizePerChMean->SetMarkerStyle(kFullDotMedium);
   hESDClusterSizePerChMean->SetMarkerColor(kRed);
   Add2ESDsList(hESDClusterSizePerChMean, kESDClusterSizePerChMean,forExpert);
   
-  TH1F* hESDClusterSizePerChSigma = new TH1F("hESDClusterSizePerChSigma", "cluster size dispersion per chamber;chamber ID;#sigma_{size} (n_{pads})", nCh, 0, nCh);
+  TH1F* hESDClusterSizePerChSigma = new TH1F("hESDClusterSizePerChSigma", "cluster size dispersion per chamber;chamber ID;#sigma_{size} (n_{pads})", nCh, -0.5, nCh-0.5);
   hESDClusterSizePerChSigma->SetOption("P");
   hESDClusterSizePerChSigma->SetMarkerStyle(kFullDotMedium);
   hESDClusterSizePerChSigma->SetMarkerColor(kRed);
   Add2ESDsList(hESDClusterSizePerChSigma, kESDClusterSizePerChSigma,forExpert);
   
-  TH1F* hESDClusterSizePerDE = new TH1F("hESDClusterSizePerDE", "cluster mean size per DE;DetElem ID;<size> (n_{pads})", nDE, 0, nDE);
+  TH1F* hESDClusterSizePerDE = new TH1F("hESDClusterSizePerDE", "cluster mean size per DE;DetElem ID;<size> (n_{pads})", nDE+1, -0.5, nDE+0.5);
   hESDClusterSizePerDE->SetOption("P");
   hESDClusterSizePerDE->SetMarkerStyle(kFullDotMedium);
   hESDClusterSizePerDE->SetMarkerColor(kRed);
@@ -755,101 +814,101 @@ void AliMUONQADataMakerRec::InitESDs()
     Add2ESDsList(hESDLocalChi2YInCh, kESDLocalChi2YInCh+i,forExpert);
   }
   
-  TH1F* hESDResidualXPerChMean = new TH1F("hESDResidualXPerChMean", "cluster-track residual-X per Ch: mean;chamber ID;<#Delta_{X}> (cm)", nCh, 0, nCh);
+  TH1F* hESDResidualXPerChMean = new TH1F("hESDResidualXPerChMean", "cluster-track residual-X per Ch: mean;chamber ID;<#Delta_{X}> (cm)", nCh, -0.5, nCh-0.5);
   hESDResidualXPerChMean->SetOption("P");
   hESDResidualXPerChMean->SetMarkerStyle(kFullDotMedium);
   hESDResidualXPerChMean->SetMarkerColor(kRed);
   Add2ESDsList(hESDResidualXPerChMean, kESDResidualXPerChMean,forExpert);
   
-  TH1F* hESDResidualYPerChMean = new TH1F("hESDResidualYPerChMean", "cluster-track residual-Y per Ch: mean;chamber ID;<#Delta_{Y}> (cm)", nCh, 0, nCh);
+  TH1F* hESDResidualYPerChMean = new TH1F("hESDResidualYPerChMean", "cluster-track residual-Y per Ch: mean;chamber ID;<#Delta_{Y}> (cm)", nCh, -0.5, nCh-0.5);
   hESDResidualYPerChMean->SetOption("P");
   hESDResidualYPerChMean->SetMarkerStyle(kFullDotMedium);
   hESDResidualYPerChMean->SetMarkerColor(kRed);
   Add2ESDsList(hESDResidualYPerChMean, kESDResidualYPerChMean,forExpert);
   
-  TH1F* hESDResidualXPerChSigma = new TH1F("hESDResidualXPerChSigma", "cluster-track residual-X per Ch: sigma;chamber ID;#sigma_{X} (cm)", nCh, 0, nCh);
+  TH1F* hESDResidualXPerChSigma = new TH1F("hESDResidualXPerChSigma", "cluster-track residual-X per Ch: sigma;chamber ID;#sigma_{X} (cm)", nCh, -0.5, nCh-0.5);
   hESDResidualXPerChSigma->SetOption("P");
   hESDResidualXPerChSigma->SetMarkerStyle(kFullDotMedium);
   hESDResidualXPerChSigma->SetMarkerColor(kRed);
   Add2ESDsList(hESDResidualXPerChSigma, kESDResidualXPerChSigma,forExpert);
   
-  TH1F* hESDResidualYPerChSigma = new TH1F("hESDResidualYPerChSigma", "cluster-track residual-Y per Ch: sigma;chamber ID;#sigma_{Y} (cm)", nCh, 0, nCh);
+  TH1F* hESDResidualYPerChSigma = new TH1F("hESDResidualYPerChSigma", "cluster-track residual-Y per Ch: sigma;chamber ID;#sigma_{Y} (cm)", nCh, -0.5, nCh-0.5);
   hESDResidualYPerChSigma->SetOption("P");
   hESDResidualYPerChSigma->SetMarkerStyle(kFullDotMedium);
   hESDResidualYPerChSigma->SetMarkerColor(kRed);
   Add2ESDsList(hESDResidualYPerChSigma, kESDResidualYPerChSigma,forExpert);
   
-  TH1F* hESDLocalChi2XPerChMean = new TH1F("hESDLocalChi2XPerChMean", "local chi2-X per Ch: mean;chamber ID;<local #chi^{2}_{X}>", nCh, 0, nCh);
+  TH1F* hESDLocalChi2XPerChMean = new TH1F("hESDLocalChi2XPerChMean", "local chi2-X per Ch: mean;chamber ID;<local #chi^{2}_{X}>", nCh, -0.5, nCh-0.5);
   hESDLocalChi2XPerChMean->SetOption("P");
   hESDLocalChi2XPerChMean->SetMarkerStyle(kFullDotMedium);
   hESDLocalChi2XPerChMean->SetMarkerColor(kRed);
   Add2ESDsList(hESDLocalChi2XPerChMean, kESDLocalChi2XPerChMean,forExpert);
   
-  TH1F* hESDLocalChi2YPerChMean = new TH1F("hESDLocalChi2YPerChMean", "local chi2-Y per Ch: mean;chamber ID;<local #chi^{2}_{Y}>", nCh, 0, nCh);
+  TH1F* hESDLocalChi2YPerChMean = new TH1F("hESDLocalChi2YPerChMean", "local chi2-Y per Ch: mean;chamber ID;<local #chi^{2}_{Y}>", nCh, -0.5, nCh-0.5);
   hESDLocalChi2YPerChMean->SetOption("P");
   hESDLocalChi2YPerChMean->SetMarkerStyle(kFullDotMedium);
   hESDLocalChi2YPerChMean->SetMarkerColor(kRed);
   Add2ESDsList(hESDLocalChi2YPerChMean, kESDLocalChi2YPerChMean,forExpert);
   
-  TH1F* hESDResidualXPerDEMean = new TH1F("hESDResidualXPerDEMean", "cluster-track residual-X per DE: mean;DetElem ID;<#Delta_{X}> (cm)", nDE, 0, nDE);
+  TH1F* hESDResidualXPerDEMean = new TH1F("hESDResidualXPerDEMean", "cluster-track residual-X per DE: mean;DetElem ID;<#Delta_{X}> (cm)", nDE+1, -0.5, nDE+0.5);
   hESDResidualXPerDEMean->SetOption("P");
   hESDResidualXPerDEMean->SetMarkerStyle(kFullDotMedium);
   hESDResidualXPerDEMean->SetMarkerColor(kRed);
   Add2ESDsList(hESDResidualXPerDEMean, kESDResidualXPerDEMean,forExpert);
   
-  TH1F* hESDResidualYPerDEMean = new TH1F("hESDResidualYPerDEMean", "cluster-track residual-Y per DE: mean;DetElem ID;<#Delta_{Y}> (cm)", nDE, 0, nDE);
+  TH1F* hESDResidualYPerDEMean = new TH1F("hESDResidualYPerDEMean", "cluster-track residual-Y per DE: mean;DetElem ID;<#Delta_{Y}> (cm)", nDE+1, -0.5, nDE+0.5);
   hESDResidualYPerDEMean->SetOption("P");
   hESDResidualYPerDEMean->SetMarkerStyle(kFullDotMedium);
   hESDResidualYPerDEMean->SetMarkerColor(kRed);
   Add2ESDsList(hESDResidualYPerDEMean, kESDResidualYPerDEMean,forExpert);
   
-  TH1F* hESDResidualXPerDESigma = new TH1F("hESDResidualXPerDESigma", "cluster-track residual-X per DE: sigma;DetElem ID;#sigma_{X} (cm)", nDE, 0, nDE);
+  TH1F* hESDResidualXPerDESigma = new TH1F("hESDResidualXPerDESigma", "cluster-track residual-X per DE: sigma;DetElem ID;#sigma_{X} (cm)", nDE+1, -0.5, nDE+0.5);
   hESDResidualXPerDESigma->SetOption("P");
   hESDResidualXPerDESigma->SetMarkerStyle(kFullDotMedium);
   hESDResidualXPerDESigma->SetMarkerColor(kRed);
   Add2ESDsList(hESDResidualXPerDESigma, kESDResidualXPerDESigma,forExpert);
   
-  TH1F* hESDResidualYPerDESigma = new TH1F("hESDResidualYPerDESigma", "cluster-track residual-Y per DE: sigma;DetElem ID;#sigma_{Y} (cm)", nDE, 0, nDE);
+  TH1F* hESDResidualYPerDESigma = new TH1F("hESDResidualYPerDESigma", "cluster-track residual-Y per DE: sigma;DetElem ID;#sigma_{Y} (cm)", nDE+1, -0.5, nDE+0.5);
   hESDResidualYPerDESigma->SetOption("P");
   hESDResidualYPerDESigma->SetMarkerStyle(kFullDotMedium);
   hESDResidualYPerDESigma->SetMarkerColor(kRed);
   Add2ESDsList(hESDResidualYPerDESigma, kESDResidualYPerDESigma,forExpert);
   
-  TH1F* hESDLocalChi2XPerDEMean = new TH1F("hESDLocalChi2XPerDEMean", "local chi2-X per DE: mean;DetElem ID;<local #chi^{2}_{X}>", nDE, 0, nDE);
+  TH1F* hESDLocalChi2XPerDEMean = new TH1F("hESDLocalChi2XPerDEMean", "local chi2-X per DE: mean;DetElem ID;<local #chi^{2}_{X}>", nDE+1, -0.5, nDE+0.5);
   hESDLocalChi2XPerDEMean->SetOption("P");
   hESDLocalChi2XPerDEMean->SetMarkerStyle(kFullDotMedium);
   hESDLocalChi2XPerDEMean->SetMarkerColor(kRed);
   Add2ESDsList(hESDLocalChi2XPerDEMean, kESDLocalChi2XPerDEMean,forExpert);
   
-  TH1F* hESDLocalChi2YPerDEMean = new TH1F("hESDLocalChi2YPerDEMean", "local chi2-Y per DE: mean;DetElem ID;<local #chi^{2}_{Y}>", nDE, 0, nDE);
+  TH1F* hESDLocalChi2YPerDEMean = new TH1F("hESDLocalChi2YPerDEMean", "local chi2-Y per DE: mean;DetElem ID;<local #chi^{2}_{Y}>", nDE+1, -0.5, nDE+0.5);
   hESDLocalChi2YPerDEMean->SetOption("P");
   hESDLocalChi2YPerDEMean->SetMarkerStyle(kFullDotMedium);
   hESDLocalChi2YPerDEMean->SetMarkerColor(kRed);
   Add2ESDsList(hESDLocalChi2YPerDEMean, kESDLocalChi2YPerDEMean,forExpert);
   
-  // temporary histograms
-  fhESDnTotClustersPerCh = new TH1F("fhESDnTotClustersPerCh", "total number of associated clusters per chamber;chamber ID", nCh, 0, nCh);
-  fhESDnTotClustersPerCh->SetDirectory(0);
-  fhESDnTotClustersPerDE = new TH1F("fhESDnTotClustersPerDE", "total number of associated clusters per DE;DetElem ID", nDE, 0, nDE);
-  fhESDnTotClustersPerDE->SetDirectory(0);
-  fhESDnTotFullClustersPerDE = new TH1F("fhESDnTotFullClustersPerDE", "total number of associated clusters containing pad info per DE;DetElem ID", nDE, 0, nDE);
-  fhESDnTotFullClustersPerDE->SetDirectory(0);
-  fhESDSumClusterChargePerDE = new TH1F("fhESDSumClusterChargePerDE", "sum of cluster charge per DE;DetElem ID;ADC counts", nDE, 0, nDE);
-  fhESDSumClusterChargePerDE->SetDirectory(0);
-  fhESDSumClusterSizePerDE = new TH1F("fhESDSumClusterSizePerDE", "sum of cluster size per DE;DetElem ID;averaged number of associated pads", nDE, 0, nDE);
-  fhESDSumClusterSizePerDE->SetDirectory(0);
-  fhESDSumResidualXPerDE = new TH1F("fhESDSumResidualXPerDE", "sum of cluster-track residual-X per DE;DetElem ID", nDE, 0, nDE);
-  fhESDSumResidualXPerDE->SetDirectory(0);
-  fhESDSumResidualYPerDE = new TH1F("fhESDSumResidualYPerDE", "sum of cluster-track residual-Y per DE;DetElem ID", nDE, 0, nDE);
-  fhESDSumResidualYPerDE->SetDirectory(0);
-  fhESDSumResidualX2PerDE = new TH1F("fhESDSumResidualX2PerDE", "sum of cluster-track residual-X**2 per DE;DetElem ID", nDE, 0, nDE);
-  fhESDSumResidualX2PerDE->SetDirectory(0);
-  fhESDSumResidualY2PerDE = new TH1F("fhESDSumResidualY2PerDE", "sum of cluster-track residual-Y**2 per DE;DetElem ID", nDE, 0, nDE);
-  fhESDSumResidualY2PerDE->SetDirectory(0);
-  fhESDSumLocalChi2XPerDE = new TH1F("fhESDSumLocalChi2XPerDE", "sum of local chi2-X per DE;DetElem ID", nDE, 0, nDE);
-  fhESDSumLocalChi2XPerDE->SetDirectory(0);
-  fhESDSumLocalChi2YPerDE = new TH1F("fhESDSumLocalChi2YPerDE", "sum of local chi2-Y per DE;DetElem ID", nDE, 0, nDE);
-  fhESDSumLocalChi2YPerDE->SetDirectory(0);
+  // intermediate histograms
+  TH1F* hESDnTotClustersPerCh = new TH1F("hESDnTotClustersPerCh", "total number of associated clusters per chamber;chamber ID;#Sigma(n_{clusters})", nCh, -0.5, nCh-0.5);
+  Add2ESDsList(hESDnTotClustersPerCh, kESDnTotClustersPerCh, forExpert);
+  TH1F* hESDnTotClustersPerDE = new TH1F("hESDnTotClustersPerDE", "total number of associated clusters per DE;DetElem ID;#Sigma(n_{clusters})", nDE+1, -0.5, nDE+0.5);
+  Add2ESDsList(hESDnTotClustersPerDE, kESDnTotClustersPerDE, forExpert);
+  TH1F* hESDnTotFullClustersPerDE = new TH1F("hESDnTotFullClustersPerDE", "total number of associated clusters containing pad info per DE;DetElem ID;#Sigma(n_{full clusters})", nDE+1, -0.5, nDE+0.5);
+  Add2ESDsList(hESDnTotFullClustersPerDE, kESDnTotFullClustersPerDE, forExpert);
+  TH1F* hESDSumClusterChargePerDE = new TH1F("hESDSumClusterChargePerDE", "sum of cluster charge per DE;DetElem ID;#Sigma(charge) (ADC counts)", nDE+1, -0.5, nDE+0.5);
+  Add2ESDsList(hESDSumClusterChargePerDE, kESDSumClusterChargePerDE, forExpert);
+  TH1F* hESDSumClusterSizePerDE = new TH1F("hESDSumClusterSizePerDE", "sum of cluster size per DE;DetElem ID;#Sigma(size) (n_{pads})", nDE+1, -0.5, nDE+0.5);
+  Add2ESDsList(hESDSumClusterSizePerDE, kESDSumClusterSizePerDE, forExpert);
+  TH1F* hESDSumResidualXPerDE = new TH1F("hESDSumResidualXPerDE", "sum of cluster-track residual-X per DE;DetElem ID;#Sigma(#Delta_{X}) (cm)", nDE+1, -0.5, nDE+0.5);
+  Add2ESDsList(hESDSumResidualXPerDE, kESDSumResidualXPerDE, forExpert);
+  TH1F* hESDSumResidualYPerDE = new TH1F("hESDSumResidualYPerDE", "sum of cluster-track residual-Y per DE;DetElem ID;#Sigma(#Delta_{Y}) (cm)", nDE+1, -0.5, nDE+0.5);
+  Add2ESDsList(hESDSumResidualYPerDE, kESDSumResidualYPerDE, forExpert);
+  TH1F* hESDSumResidualX2PerDE = new TH1F("hESDSumResidualX2PerDE", "sum of cluster-track residual-X**2 per DE;DetElem ID;#Sigma(#Delta_{X}^{2}) (cm^{2})", nDE+1, -0.5, nDE+0.5);
+  Add2ESDsList(hESDSumResidualX2PerDE, kESDSumResidualX2PerDE, forExpert);
+  TH1F* hESDSumResidualY2PerDE = new TH1F("hESDSumResidualY2PerDE", "sum of cluster-track residual-Y**2 per DE;DetElem ID;#Sigma(#Delta_{Y}^{2}) (cm^{2})", nDE+1, -0.5, nDE+0.5);
+  Add2ESDsList(hESDSumResidualY2PerDE, kESDSumResidualY2PerDE, forExpert);
+  TH1F* hESDSumLocalChi2XPerDE = new TH1F("hESDSumLocalChi2XPerDE", "sum of local chi2-X per DE;DetElem ID;#Sigma(local #chi^{2}_{X})", nDE+1, -0.5, nDE+0.5);
+  Add2ESDsList(hESDSumLocalChi2XPerDE, kESDSumLocalChi2XPerDE, forExpert);
+  TH1F* hESDSumLocalChi2YPerDE = new TH1F("hESDSumLocalChi2YPerDE", "sum of local chi2-Y per DE;DetElem ID;#Sigma(local #chi^{2}_{Y})", nDE+1, -0.5, nDE+0.5);
+  Add2ESDsList(hESDSumLocalChi2YPerDE, kESDSumLocalChi2YPerDE, forExpert);
   
   fIsInitESDs =  kTRUE;
 }
@@ -880,7 +939,7 @@ void AliMUONQADataMakerRec::MakeRawsTracker(AliRawReader* rawReader)
 {
        /// make QA for rawdata tracker
        
-       ((AliMUONTrackerCalibratedDataMaker*)fTrackerDataMaker)->SetRawReader(rawReader);
+       ((AliMUONTrackerDataMaker*)fTrackerDataMaker)->SetRawReader(rawReader);
        
        fTrackerDataMaker->ProcessEvent();
 }
@@ -905,6 +964,12 @@ void AliMUONQADataMakerRec::MakeRawsTrigger(AliRawReader* rawReader)
       AliMUONDDLTrigger* ddlTrigger = rawStreamTrig.GetDDLTrigger();
       AliMUONDarcHeader* darcHeader = ddlTrigger->GetDarcHeader();
 
+      if (darcHeader->GetGlobalFlag()){
+        UInt_t nOfClocks = darcHeader->GetGlobalClock();
+        Double_t nOfSeconds = ((Double_t) nOfClocks) / 40e6; // 1 clock each 25 ns
+        ((TH1F*)GetRawsData(kTriggerScalersTime))->Fill(1., nOfSeconds);
+      }
+
       Int_t nReg = darcHeader->GetRegHeaderEntries();
     
       for(Int_t iReg = 0; iReg < nReg ;iReg++)
@@ -1007,6 +1072,7 @@ void AliMUONQADataMakerRec::MakeRecPointsTracker(TTree* clustersTree)
                GetRecPointsData(kTrackerNumberOfClustersPerChamber)->Fill(chamberId);
                GetRecPointsData(kTrackerClusterChargePerChamber+chamberId)->Fill(cluster->GetCharge());
                GetRecPointsData(kTrackerClusterMultiplicityPerChamber+chamberId)->Fill(cluster->GetNDigits());
+               GetRecPointsData(kTrackerClusterHitMapPerChamber+chamberId)->Fill(cluster->GetX(),cluster->GetY());
                
        }
        
@@ -1075,10 +1141,6 @@ void AliMUONQADataMakerRec::MakeESDs(AliESDEvent* esd)
     return;
   }    
   
-  // use event specie from RecoParam
-  AliRecoParam::EventSpecie_t savedEventSpecie = fEventSpecie;
-  if (GetRecoParam()) SetEventSpecie(static_cast<AliRecoParam::EventSpecie_t>(GetRecoParam()->GetEventSpecie()));
-  
   // load ESD event in the interface
   AliMUONESDInterface esdInterface;
   if (GetRecoParam()) AliMUONESDInterface::ResetTracker(GetRecoParam());
@@ -1123,29 +1185,29 @@ void AliMUONQADataMakerRec::MakeESDs(AliESDEvent* esd)
       
       GetESDsData(kESDClusterHitMap+chId)->Fill(cluster->GetX(), cluster->GetY());
       
-      fhESDnTotClustersPerCh->Fill(chId);
-      fhESDnTotClustersPerDE->Fill(deID);
+      GetESDsData(kESDnTotClustersPerCh)->Fill(chId);
+      GetESDsData(kESDnTotClustersPerDE)->Fill(deID);
       
       GetESDsData(kESDClusterChargeInCh+chId)->Fill(cluster->GetCharge());
-      fhESDSumClusterChargePerDE->Fill(deID, cluster->GetCharge());
+      GetESDsData(kESDSumClusterChargePerDE)->Fill(deID, cluster->GetCharge());
       
       if (cluster->GetNDigits() > 0) { // discard clusters with pad not stored in ESD
-       fhESDnTotFullClustersPerDE->Fill(deID);
+       GetESDsData(kESDnTotFullClustersPerDE)->Fill(deID);
         GetESDsData(kESDClusterSizeInCh+chId)->Fill(cluster->GetNDigits());
-       fhESDSumClusterSizePerDE->Fill(deID, cluster->GetNDigits());
+       GetESDsData(kESDSumClusterSizePerDE)->Fill(deID, cluster->GetNDigits());
       }
       
       GetESDsData(kESDResidualXInCh+chId)->Fill(residualX);
       GetESDsData(kESDResidualYInCh+chId)->Fill(residualY);
-      fhESDSumResidualXPerDE->Fill(deID, residualX);
-      fhESDSumResidualYPerDE->Fill(deID, residualY);
-      fhESDSumResidualX2PerDE->Fill(deID, residualX*residualX);
-      fhESDSumResidualY2PerDE->Fill(deID, residualY*residualY);
+      GetESDsData(kESDSumResidualXPerDE)->Fill(deID, residualX);
+      GetESDsData(kESDSumResidualYPerDE)->Fill(deID, residualY);
+      GetESDsData(kESDSumResidualX2PerDE)->Fill(deID, residualX*residualX);
+      GetESDsData(kESDSumResidualY2PerDE)->Fill(deID, residualY*residualY);
       
       GetESDsData(kESDLocalChi2XInCh+chId)->Fill(localChi2X);
       GetESDsData(kESDLocalChi2YInCh+chId)->Fill(localChi2Y);
-      fhESDSumLocalChi2XPerDE->Fill(deID, localChi2X);
-      fhESDSumLocalChi2YPerDE->Fill(deID, localChi2Y);
+      GetESDsData(kESDSumLocalChi2XPerDE)->Fill(deID, localChi2X);
+      GetESDsData(kESDSumLocalChi2YPerDE)->Fill(deID, localChi2Y);
       
       trackParam = static_cast<AliMUONTrackParam*>(track->GetTrackParamAtCluster()->After(trackParam));
     }
@@ -1154,9 +1216,6 @@ void AliMUONQADataMakerRec::MakeESDs(AliESDEvent* esd)
   
   GetESDsData(kESDMatchTrig)->Fill(nTrackMatchTrig);
   
-  // restore event specie
-  SetEventSpecie(savedEventSpecie);
-  
 }
 
 //____________________________________________________________________________ 
@@ -1167,14 +1226,14 @@ void AliMUONQADataMakerRec::StartOfDetectorCycle()
 }
 
 //____________________________________________________________________________ 
-void AliMUONQADataMakerRec::DisplayTriggerInfo(AliQA::TASKINDEX_t task)
+void AliMUONQADataMakerRec::DisplayTriggerInfo(AliQAv1::TASKINDEX_t task)
 {
   //
   /// Display trigger information in a user-friendly way:
   /// from local board and strip numbers to their position on chambers
   //
 
-  if(task!=AliQA::kRECPOINTS && task!=AliQA::kRAWS) return;
+  if(task!=AliQAv1::kRECPOINTS && task!=AliQAv1::kRAWS) return;
 
   AliMUONTriggerDisplay triggerDisplay;
   
@@ -1183,12 +1242,12 @@ void AliMUONQADataMakerRec::DisplayTriggerInfo(AliQA::TASKINDEX_t task)
 
   for (Int_t iCath = 0; iCath < AliMpConstants::NofCathodes(); iCath++)
   {
-    if(task==AliQA::kRECPOINTS){
+    if(task==AliQAv1::kRECPOINTS){
       ERecPoints hindex 
        = ( iCath == 0 ) ? kTriggerDigitsBendPlane : kTriggerDigitsNonBendPlane;
       histoStrips = (TH3F*)GetRecPointsData(hindex);
     }
-    else if(task==AliQA::kRAWS){
+    else if(task==AliQAv1::kRAWS){
       ERaw hindex 
        = ( iCath == 0 ) ? kTriggerScalersBP : kTriggerScalersNBP;
       histoStrips = (TH3F*)GetRawsData(hindex);
@@ -1197,20 +1256,24 @@ void AliMUONQADataMakerRec::DisplayTriggerInfo(AliQA::TASKINDEX_t task)
     
     for (Int_t iChamber = 0; iChamber < AliMpConstants::NofTriggerChambers(); iChamber++)
     {
-      if(task==AliQA::kRECPOINTS){
+      if(task==AliQAv1::kRECPOINTS){
        histoDisplayStrips = (TH2F*)GetRecPointsData(kTriggerDigitsDisplay + AliMpConstants::NofTriggerChambers()*iCath + iChamber);
       }
-      else if(task==AliQA::kRAWS){
+      else if(task==AliQAv1::kRAWS){
        histoDisplayStrips = (TH2F*)GetRawsData(kTriggerScalersDisplay + AliMpConstants::NofTriggerChambers()*iCath + iChamber);
       }
       Int_t bin = histoStrips->GetXaxis()->FindBin(11+iChamber);
       histoStrips->GetXaxis()->SetRange(bin,bin);
       TH2F* inputHisto = (TH2F*)histoStrips->Project3D("zy");
       triggerDisplay.FillDisplayHistogram(inputHisto, histoDisplayStrips, AliMUONTriggerDisplay::kDisplayStrips, iCath, iChamber);
+      if(task==AliQAv1::kRAWS) {
+        Float_t acquisitionTime = ((TH1F*)GetRawsData(kTriggerScalersTime))->GetBinContent(1);
+        histoDisplayStrips->Scale(1./acquisitionTime);
+      }
     } // iChamber
   } // iCath
 
-  if(task==AliQA::kRAWS){    
+  if(task==AliQAv1::kRAWS){    
     TH2F* histoI  = (TH2F*) GetRawsData(kTriggerRPCi);
     TH2F* histoHV = (TH2F*) GetRawsData(kTriggerRPChv);
     FillTriggerDCSHistos();
@@ -1224,7 +1287,7 @@ void AliMUONQADataMakerRec::DisplayTriggerInfo(AliQA::TASKINDEX_t task)
     }
   }
 
-  if(task==AliQA::kRECPOINTS){
+  if(task==AliQAv1::kRECPOINTS){
     TH1F* histoBoards = (TH1F*)GetRecPointsData(kTriggeredBoards);
     TH2F* histoDisplayBoards = (TH2F*)GetRecPointsData(kTriggerBoardsDisplay);
     triggerDisplay.FillDisplayHistogram(histoBoards, histoDisplayBoards, AliMUONTriggerDisplay::kDisplayBoards, 0, 0);
@@ -1240,14 +1303,20 @@ AliMUONQADataMakerRec::FillTriggerDCSHistos()
   
   AliCodeTimerAuto("");
 
-  AliMpDEIterator deIt;
-
-  deIt.First();
-
   AliMUONCalibrationData calibrationData(AliCDBManager::Instance()->GetRun());
 
   TMap* triggerDcsMap = calibrationData.TriggerDCS();
 
+  if ( !triggerDcsMap ) 
+  {
+    AliError("Cannot fill DCS histos, as triggerDcsMap is NULL");
+    return kFALSE;
+  }
+
+  AliMpDEIterator deIt;
+  
+  deIt.First();
+    
   AliMpDCSNamer triggerDcsNamer("TRIGGER");
 
   TH2* currHisto = 0x0;