]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSQADataMakerRec.cxx
Fixing bug #59311
[u/mrichter/AliRoot.git] / ITS / AliITSQADataMakerRec.cxx
index f9aebb200d0d24919fa81431878bb4d1e649afdf..4c73e6c3b294aac1a39274381fe2a0551fd74948 100644 (file)
@@ -22,6 +22,8 @@
 //  -------------------------------------------------------------
 //  W. Ferrarese + P. Cerello Feb 2008
 //  INFN Torino
+//  Melinda Siciliano Aug 2008
+
 
 // --- ROOT system ---
 #include <TH2.h>
@@ -53,9 +55,11 @@ AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kITS), "ITS Quality Assurance Dat
 fkOnline(kMode),
 fSubDetector(subDet),
 fLDC(ldc),
+fRunNumber(0),
 fSPDDataMaker(NULL),
 fSDDDataMaker(NULL),
 fSSDDataMaker(NULL)
+
 {
   //ctor used to discriminate OnLine-Offline analysis
   if(fSubDetector < 0 || fSubDetector > 3) {
@@ -91,9 +95,11 @@ AliQADataMakerRec(),
 fkOnline(qadm.fkOnline),
 fSubDetector(qadm.fSubDetector),
 fLDC(qadm.fLDC),
+fRunNumber(0),
 fSPDDataMaker(NULL),
 fSDDDataMaker(NULL),
 fSSDDataMaker(NULL)
+
 {
   //copy ctor 
   SetName((const char*)qadm.GetName()) ; 
@@ -125,14 +131,17 @@ void AliITSQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArr
   // launch the QA checking
 
   for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
-    SetEventSpecie(specie) ; 
+    //SetEventSpecie(specie) ; 
+    //AliQAv1::Instance()->SetEventSpecie(specie);
+    if(AliQAv1::Instance()->IsEventSpecieSet(specie)){
     AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list[specie])\n"); 
-    if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list[specie]);
-    if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list[specie]);
-    if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list[specie]);
+    if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list[/*GetEventSpecie()*/specie]);
+    if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list[/*GetEventSpecie()*/specie]);
+    if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list[/*GetEventSpecie()*/specie]);
   
   
     AliQAChecker *qac = AliQAChecker::Instance();
+    qac->SetRunNumber(GetRunNumber());
     AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
     Int_t subdet=GetSubDet();
     qacb->SetSubDet(subdet);
@@ -146,8 +155,10 @@ void AliITSQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArr
        qacb->SetDetTaskOffset(subdet,offset);
       }
 
-    qac->Run( AliQAv1::kITS , task, list); 
-
+    qac->Run( AliQAv1::kITS , task, list);
+    }
+    
   }
 }
 
@@ -161,26 +172,25 @@ void AliITSQADataMakerRec::EndOfDetectorCycle(const char * /*fgDataName*/)
 void AliITSQADataMakerRec::InitRaws()
 {  
 
-       if(fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()) return;
-       Int_t rv = 0;
-       //AliInfo(Form("Start InitRaws on specie %d\n",AliRecoParam::AConvert(fEventSpecie)));
-       //AliInfo(Form("fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries() %d\n",fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()));
-       if(fSubDetector == 0 || fSubDetector == 1) {
-         AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitRaws\n");
-           rv = fSPDDataMaker->InitRaws();
-       }
-       if(fSubDetector == 0 || fSubDetector == 2) {
-         AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SDD InitRaws\n");
-               //AliInfo(Form("set offset to %d\n",fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()));
-      fSDDDataMaker->SetOffset(AliQAv1::kRAWS, fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(),AliRecoParam::AConvert(fEventSpecie));
-           rv = fSDDDataMaker->InitRaws();
-       }
-       if(fSubDetector == 0 || fSubDetector == 3) {
-         AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SSD InitRaws\n");
-               //AliInfo(Form("set offset to %d\n",fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()));
-      fSSDDataMaker->SetOffset(AliQAv1::kRAWS, fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(),AliRecoParam::AConvert(fEventSpecie));
-         rv = fSSDDataMaker->InitRaws();
-       }
+  //if(fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()) return;
+       
+
+  if(fSubDetector == 0 || fSubDetector == 1) {
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitRaws\n");
+    fSPDDataMaker->InitRaws();
+  }
+  if(fSubDetector == 0 || fSubDetector == 2) {
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SDD InitRaws\n");
+    
+    fSDDDataMaker->SetOffset(AliQAv1::kRAWS, fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(),AliRecoParam::AConvert(fEventSpecie));
+    fSDDDataMaker->InitRaws();
+  }
+  if(fSubDetector == 0 || fSubDetector == 3) {
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SSD InitRaws\n");
+    
+    fSSDDataMaker->SetOffset(AliQAv1::kRAWS, fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(),AliRecoParam::AConvert(fEventSpecie));
+    fSSDDataMaker->InitRaws();
+  }
 }
 
 //____________________________________________________________________________
@@ -189,35 +199,40 @@ void AliITSQADataMakerRec::MakeRaws(AliRawReader* rawReader)
   // Fill QA for RAW   
   //return ; 
 
-  //AliInfo(Form("fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries() %d\n",fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()));
+  SetRunNumber(rawReader->GetRunNumber());
+
   if(fSubDetector == 0 || fSubDetector == 1)  {
     fSPDDataMaker->MakeRaws(rawReader) ; 
   }
-  //AliInfo(Form("fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries() %d\n",fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()));
   
   if(fSubDetector == 0 || fSubDetector == 2) {
     fSDDDataMaker->MakeRaws(rawReader) ; 
   }
-  //AliInfo(Form("fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries() %d\n",fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()));
+
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeRaws(rawReader);
-  //AliInfo(Form("fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries() %d\n",fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()));
+
 }
 
 //____________________________________________________________________________ 
 void AliITSQADataMakerRec::InitDigits()
 {
-
+  
   // Initialization for DIGITS
   if(fSubDetector == 0 || fSubDetector == 1) {
     AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitDigitss\n");
+
     fSPDDataMaker->InitDigits();
   }
   if(fSubDetector == 0 || fSubDetector == 2) {
     AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SDD InitDigits\n");
+    fSDDDataMaker->SetOffset(AliQAv1::kDIGITSR, fDigitsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(),AliRecoParam::AConvert(fEventSpecie));
+
     fSDDDataMaker->InitDigits();
   }
   if(fSubDetector == 0 || fSubDetector == 3) {
     AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SSD InitDigits\n");
+    fSSDDataMaker->SetOffset(AliQAv1::kDIGITSR, fDigitsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(),AliRecoParam::AConvert(fEventSpecie));
+
     fSSDDataMaker->InitDigits();
   }
 }
@@ -226,17 +241,15 @@ void AliITSQADataMakerRec::InitDigits()
 void AliITSQADataMakerRec::MakeDigits(TTree * digitsTree)
 {
 
+  
   // Fill QA for recpoints
   if(fSubDetector == 0 || fSubDetector == 1) {
-    Int_t rv = fSPDDataMaker->MakeDigits(digitsTree) ; 
-    if ( rv != 0 )
-      fSDDDataMaker->SetOffset(AliQAv1::kDIGITSR, fDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+    fSPDDataMaker->MakeDigits(digitsTree) ; 
   }
   
   if(fSubDetector == 0 || fSubDetector == 2) {
-    Int_t rv = fSDDDataMaker->MakeDigits(digitsTree) ; 
-    if ( rv != 0 )
-      fSSDDataMaker->SetOffset(AliQAv1::kDIGITSR, fDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+    fSDDDataMaker->MakeDigits(digitsTree) ; 
+    
   }
   
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeDigits(digitsTree);
@@ -248,44 +261,44 @@ void AliITSQADataMakerRec::InitRecPoints()
 
   // Initialization for RECPOINTS
 
-  //AliInfo(Form("AliRecoParam::AConvert(fEventSpecie) %d\n",AliRecoParam::AConvert(fEventSpecie)));
-       //AliInfo(Form("fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries() %d\n",fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()));
-       if(fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()) return;
+
+  //if(fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()) return;
        if(fSubDetector == 0 || fSubDetector == 1) {
                AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitRecPoints\n");
                fSPDDataMaker->InitRecPoints();
        }
        if(fSubDetector == 0 || fSubDetector == 2) {
                AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SDD InitRecPoints\n");
-               //AliInfo(Form("set offset to %d\n",fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()));
-               fSDDDataMaker->SetOffset(AliQAv1::kRECPOINTS, fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(),AliRecoParam::AConvert(fEventSpecie));
+               fSDDDataMaker->SetOffset(AliQAv1::kRECPOINTS, fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(), AliRecoParam::AConvert(fEventSpecie));
                fSDDDataMaker->InitRecPoints();
        }
        if(fSubDetector == 0 || fSubDetector == 3) {
                AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SSD InitRecPoints\n");
-               //AliInfo(Form("set offset to %d\n",fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()));
                fSSDDataMaker->SetOffset(AliQAv1::kRECPOINTS, fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(),AliRecoParam::AConvert(fEventSpecie));
                fSSDDataMaker->InitRecPoints();
        }
-       //AliInfo(Form("fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries() %d\n",fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()));
 
-       Int_t offset = fRecPointsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries();
-       const Bool_t expert   = kTRUE ; 
-       const Bool_t image    = kTRUE ; 
-       Char_t name[50];
-       Char_t title[50];
-       TH2F**hPhiEta = new TH2F*[6];
-       for (Int_t iLay=0;iLay<6;iLay++) {
-               sprintf(name,"Phi_vs_Eta_ITS_Layer%d",iLay+1);
-               sprintf(title,"Phi vs Eta - ITS Layer %d",iLay+1);
-               hPhiEta[iLay]=new TH2F(name,title,30,-1.5,1.5,200,0.,2*TMath::Pi());
-               hPhiEta[iLay]->GetXaxis()->SetTitle("Pseudorapidity");
-               hPhiEta[iLay]->GetYaxis()->SetTitle("#varphi [rad]");
-               Add2RecPointsList((new TH2F(*hPhiEta[iLay])), iLay + offset, !expert, image);
-               //AliInfo(Form("Added histo phi vs eta at position %d\n", iLay + offset));
-               delete hPhiEta[iLay];
+
+       if(fSubDetector == 0){
+         Int_t offset = fRecPointsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries();
+         const Bool_t expert   = kTRUE ; 
+         const Bool_t image    = kTRUE ; 
+         Char_t name[50];
+         Char_t title[50];
+         TH2F**hPhiEta = new TH2F*[6];
+         for (Int_t iLay=0;iLay<6;iLay++) {
+           sprintf(name,"Phi_vs_Eta_ITS_Layer%d",iLay+1);
+           sprintf(title,"Phi vs Eta - ITS Layer %d",iLay+1);
+           hPhiEta[iLay]=new TH2F(name,title,30,-1.5,1.5,200,0.,2*TMath::Pi());
+           hPhiEta[iLay]->GetXaxis()->SetTitle("Pseudorapidity");
+           hPhiEta[iLay]->GetYaxis()->SetTitle("#varphi [rad]");
+           Add2RecPointsList((new TH2F(*hPhiEta[iLay])), iLay + offset, !expert, image);
+           
+           delete hPhiEta[iLay];
+         }
+         
        }
-       //AliInfo(Form("fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries() %d\n",fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()));
+       
 }
 
 //____________________________________________________________________________ 
@@ -305,41 +318,43 @@ void AliITSQADataMakerRec::MakeRecPoints(TTree * clustersTree)
 
 
 
-
-       // Check id histograms already created for this Event Specie
-       TBranch *branchRecP = clustersTree->GetBranch("ITSRecPoints");
-       if (!branchRecP) {
-               AliError("can't get the branch with the ITS clusters !");
-               return;
-       }
-
-       Int_t offset = fRecPointsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries();
-       Float_t cluGlo[3] = {0.,0.,0.};
-       Int_t lay, lad, det; 
-       static TClonesArray statRecpoints("AliITSRecPoint") ;
-       TClonesArray *recpoints = &statRecpoints;
-       branchRecP->SetAddress(&recpoints);
-       // Fill QA for recpoints
-       for(Int_t module=0; module<clustersTree->GetEntries();module++){
-               branchRecP->GetEvent(module);
-               AliITSgeomTGeo::GetModuleId(module, lay, lad, det);
-               for(Int_t j=0;j<recpoints->GetEntries();j++){
-                       AliITSRecPoint *rcp = (AliITSRecPoint*)recpoints->At(j);    
-                       //Check id histograms already created for this Event Specie
-                       rcp->GetGlobalXYZ(cluGlo);
-                       Double_t rad=TMath::Sqrt(cluGlo[0]*cluGlo[0]+cluGlo[1]*cluGlo[1]);
-                       Double_t phi= TMath::Pi() + TMath::ATan2(-cluGlo[1],-cluGlo[0]);
-                       Double_t theta = TMath::ACos(cluGlo[2]/rad);
-                       Double_t eta = 100.;
-                       if(IsEqual(rad,0.) == kFALSE) {
-                         if(theta<=1.e-14){ eta=30.; }
-                         else { eta = -TMath::Log(TMath::Tan(theta/2.));}
-                       }
-                       (GetRecPointsData( rcp->GetLayer() + offset - 6))->Fill(eta,phi);
-               }
+  if(fSubDetector == 0){
+    // Check id histograms already created for this Event Specie
+    TBranch *branchRecP = clustersTree->GetBranch("ITSRecPoints");
+    if (!branchRecP) {
+      AliError("can't get the branch with the ITS clusters !");
+      return;
+    }
+    
+    Int_t offset = fRecPointsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries();
+    Float_t cluGlo[3] = {0.,0.,0.};
+    Int_t lay, lad, det; 
+    static TClonesArray statRecpoints("AliITSRecPoint") ;
+    TClonesArray *recpoints = &statRecpoints;
+    branchRecP->SetAddress(&recpoints);
+    // Fill QA for recpoints
+    for(Int_t module=0; module<clustersTree->GetEntries();module++){
+      //  AliInfo(Form("Module %d\n",module));
+      branchRecP->GetEvent(module);
+      AliITSgeomTGeo::GetModuleId(module, lay, lad, det);
+      for(Int_t j=0;j<recpoints->GetEntries();j++){
+       AliITSRecPoint *rcp = (AliITSRecPoint*)recpoints->At(j);    
+       //Check id histograms already created for this Event Specie
+       rcp->GetGlobalXYZ(cluGlo);
+       Double_t rad=TMath::Sqrt(cluGlo[0]*cluGlo[0]+cluGlo[1]*cluGlo[1]+cluGlo[2]*cluGlo[2]);
+       Double_t phi= TMath::Pi() + TMath::ATan2(-cluGlo[1],-cluGlo[0]);
+       Double_t theta = TMath::ACos(cluGlo[2]/rad);
+       Double_t eta = 100.;
+       if(AreEqual(rad,0.) == kFALSE) {
+         if(theta<=1.e-14){ eta=30.; }
+         else { eta = -TMath::Log(TMath::Tan(theta/2.));}
        }
-
-
+       //      printf("=========================>hlt   rcp->GetLayer() = %d \n",rcp->GetLayer());
+       (GetRecPointsData( rcp->GetLayer() + offset - 6))->Fill(eta,phi);
+      }
+    }
+  }
+  
 }
 
 //____________________________________________________________________________ 
@@ -351,19 +366,16 @@ void AliITSQADataMakerRec::FillRecPoint(AliITSRecPoint rcp)
        Int_t offset = fRecPointsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries();
   // Check id histograms already created for this Event Specie
        rcp.GetGlobalXYZ(cluGlo);
-       Double_t rad=TMath::Sqrt(cluGlo[0]*cluGlo[0]+cluGlo[1]*cluGlo[1]);
+       Double_t rad=TMath::Sqrt(cluGlo[0]*cluGlo[0]+cluGlo[1]*cluGlo[1]+cluGlo[2]*cluGlo[2]);
        Double_t phi= TMath::Pi() + TMath::ATan2(-cluGlo[1],-cluGlo[0]);
        Double_t theta = TMath::ACos(cluGlo[2]/rad);
        Double_t eta = 100.;
-       if(IsEqual(rad,0.)==kFALSE) {
+       if(AreEqual(rad,0.)==kFALSE) {
          if(theta<=1.e-14){eta=30.;}
          else    {eta = -TMath::Log(TMath::Tan(theta/2.));}
        }
        (GetRecPointsData( rcp.GetLayer() + offset - 6))->Fill(eta,phi);        
-       /*
-       if(rad != 0) eta = -TMath::Log(TMath::Tan(theta/2.));
-       (GetRecPointsData( rcp.GetLayer() + offset - 6))->Fill(eta,phi);
-       */
+
 }
 
 //____________________________________________________________________________ 
@@ -486,33 +498,46 @@ void AliITSQADataMakerRec::InitESDs()
   TH2F* hSPDTrackletsvsFiredChips0 = 
     new TH2F("hSPDTrackletsvsFiredChips0","N SPD Tracklets vs N FiredChips Layer0",
               300,0.,300.,300,0.,300.);
-  hSPDTrackletsvsFiredChips0->GetXaxis()->SetTitle("N SPD Tracklets"); 
-  hSPDTrackletsvsFiredChips0->GetYaxis()->SetTitle("N FiredChips Layer0"); 
+  hSPDTrackletsvsFiredChips0->GetXaxis()->SetTitle("N FiredChips Layer0"); 
+  hSPDTrackletsvsFiredChips0->GetYaxis()->SetTitle("N SPD Tracklets"); 
   hSPDTrackletsvsFiredChips0->Sumw2();
   Add2ESDsList(hSPDTrackletsvsFiredChips0, 16, expertHistogram ); 
 
   TH2F* hSPDTrackletsvsFiredChips1 = 
     new TH2F("hSPDTrackletsvsFiredChips1","N SPD Tracklets vs N FiredChips Layer1",
               300,0.,300.,300,0.,300.);
-  hSPDTrackletsvsFiredChips1->GetXaxis()->SetTitle("N SPD Tracklets"); 
-  hSPDTrackletsvsFiredChips1->GetYaxis()->SetTitle("N FiredChips Layer1"); 
+  hSPDTrackletsvsFiredChips1->GetXaxis()->SetTitle("N FiredChips Layer1"); 
+  hSPDTrackletsvsFiredChips1->GetYaxis()->SetTitle("N SPD Tracklets"); 
   hSPDTrackletsvsFiredChips1->Sumw2();
   Add2ESDsList(hSPDTrackletsvsFiredChips1, 17, expertHistogram); 
+
+  TH2F* hSPDFiredChips1vsFiredChips0 = 
+    new TH2F("hSPDFiredChips1vsFiredChips0","N FiredChips Layer1 vs N FiredChips Layer0",
+              300,0.,300.,300,0.,300.);
+  hSPDFiredChips1vsFiredChips0->GetXaxis()->SetTitle("N FiredChips Layer0"); 
+  hSPDFiredChips1vsFiredChips0->GetYaxis()->SetTitle("N FiredChips Layer1"); 
+  hSPDFiredChips1vsFiredChips0->Sumw2();
+  Add2ESDsList(hSPDFiredChips1vsFiredChips0, 18, expertHistogram ); 
     
   TH1F* hSPDTrackletsDePhi = 
     new TH1F("hSPDTrackletsDePhi","DeltaPhi SPD Tracklets; DeltaPhi [rad]; N events",200,-0.2,0.2);
   hSPDTrackletsDePhi->Sumw2();
-  Add2ESDsList(hSPDTrackletsDePhi, 18); 
+  Add2ESDsList(hSPDTrackletsDePhi, 19); 
     
   TH1F* hSPDTrackletsPhi = 
     new TH1F("hSPDTrackletsPhi","Phi SPD Tracklets; Phi [rad]; N events",1000,0.,2*TMath::Pi());
   hSPDTrackletsPhi->Sumw2();
-  Add2ESDsList(hSPDTrackletsPhi, 19); 
+  Add2ESDsList(hSPDTrackletsPhi, 20); 
     
+  TH1F* hSPDTrackletsDeTheta = 
+    new TH1F("hSPDTrackletsDeTheta","DeltaTheta SPD Tracklets; DeltaTheta [rad]; N events",200,-0.2,0.2);
+  hSPDTrackletsDeTheta->Sumw2();
+  Add2ESDsList(hSPDTrackletsDeTheta, 21); 
+
   TH1F* hSPDTrackletsTheta = 
     new TH1F("hSPDTrackletsTheta","Theta SPD Tracklets; Theta [rad]; N events",500,0.,TMath::Pi());
   hSPDTrackletsTheta->Sumw2();
-  Add2ESDsList(hSPDTrackletsTheta, 20); 
+  Add2ESDsList(hSPDTrackletsTheta, 22); 
 
   // map of layers skipped by tracking (set in AliITSRecoParam)
   TH1F *hESDSkippedLayers = 
@@ -520,7 +545,7 @@ void AliITSQADataMakerRec::InitESDs()
             6, -0.5, 5.5);
   hESDSkippedLayers->Sumw2();
   hESDSkippedLayers->SetMinimum(0);
-  Add2ESDsList(hESDSkippedLayers, 21, expertHistogram);
+  Add2ESDsList(hESDSkippedLayers, 23, expertHistogram);
 
 
   return;
@@ -571,7 +596,7 @@ void AliITSQADataMakerRec::MakeESDs(AliESDEvent *esd)
        }
       }
       track->GetITSModuleIndexInfo(layer,idet,status,xloc,zloc);
-      if(status==3) GetESDsData(21)->SetBinContent(layer,1);
+      if(status==3) GetESDsData(23)->SetBinContent(layer,1);
     }     
 
   } // end loop on tracks
@@ -613,15 +638,18 @@ void AliITSQADataMakerRec::MakeESDs(AliESDEvent *esd)
   Short_t nFiredChips1 = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetNumberOfFiredChips(1);
   GetESDsData(16)->Fill(nFiredChips0,mult);
   GetESDsData(17)->Fill(nFiredChips1,mult);
+  GetESDsData(18)->Fill(nFiredChips0,nFiredChips1);
 
   // Loop over tracklets
   for (Int_t itr=0; itr<mult; ++itr) {
-    Float_t dePhiTr = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetDeltaPhi(itr);
+    Float_t dePhiTr   = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetDeltaPhi(itr);
+    Float_t deThetaTr = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetDeltaTheta(itr);
     Float_t phiTr   = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetPhi(itr);
     Float_t thetaTr = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetTheta(itr);
-    GetESDsData(18)->Fill(dePhiTr);
-    GetESDsData(19)->Fill(phiTr);
-    GetESDsData(20)->Fill(thetaTr);
+    GetESDsData(19)->Fill(dePhiTr);
+    GetESDsData(20)->Fill(phiTr);
+    GetESDsData(21)->Fill(deThetaTr);
+    GetESDsData(22)->Fill(thetaTr);
   } // end loop on tracklets
 
   return;
@@ -657,9 +685,9 @@ Int_t AliITSQADataMakerRec::GetDetTaskOffset(Int_t subdet,AliQAv1::TASKINDEX_t t
 
 //____________________________________________________________________
 
-Bool_t AliITSQADataMakerRec::IsEqual(Double_t a1,Double_t a2)
+Bool_t AliITSQADataMakerRec::AreEqual(Double_t a1,Double_t a2)
 {
-  const Double_t kEpsilon= 0.000000001;
+  const Double_t kEpsilon= 1.e-14;
   return TMath::Abs(a1-a2)<=kEpsilon*TMath::Abs(a1);      
 }