]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Modifications to run the QA code and to display the results properly.
authorpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 Apr 2009 10:53:24 +0000 (10:53 +0000)
committerpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 Apr 2009 10:53:24 +0000 (10:53 +0000)
PWG2/SPECTRA/AliProtonAnalysisBase.cxx
PWG2/SPECTRA/AliProtonQAAnalysis.cxx
PWG2/SPECTRA/macros/configProtonAnalysis.C
PWG2/SPECTRA/macros/drawProtonQAResults.C
PWG2/SPECTRA/macros/runProtonAnalysisQA.C

index 1b533a8bb7df5cd126764b73996b0b1b6f55772b..d73433125305ed2d93c6d45c9a4f8acb94b741a7 100644 (file)
@@ -688,6 +688,10 @@ TCanvas *AliProtonAnalysisBase::GetListOfCuts() {
   if(fMaxChi2PerTPCClusterFlag) listOfCuts += fMaxChi2PerTPCCluster;
   else listOfCuts += "Not used";
   l.DrawLatex(0.1,0.5,listOfCuts.Data());
+  listOfCuts = "Minimum number of TPC points for the dE/dx: ";
+  if(fMinTPCdEdxPointsFlag) listOfCuts += fMinTPCdEdxPoints;
+  else listOfCuts += "Not used";
+  l.DrawLatex(0.1,0.3,listOfCuts.Data());
 
   c->cd(4)->SetFillColor(4);
   l.DrawLatex(0.3,0.9,"Tracking related cuts");
index 0017578ba6c055ab798db5fe7993529e924b1b36..3563e7339bfaaab7251c1119f4fdc9434bb7b1bb 100644 (file)
@@ -298,55 +298,55 @@ void AliProtonQAAnalysis::FillQA(AliStack *const stack,
        else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
          ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(19)))->Fill(0);
       }//TPC pid
+      if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
+       if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
+         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(20)))->Fill(track->GetTPCsignalN());
+       }
+       if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
+         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(20)))->Fill(track->GetTPCsignalN());
+      }//number of TPC points for the dE/dx
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
        if(!track->HasPointOnITSLayer(0)) {
-         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(20)))->Fill(0);
+         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(21)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(0))
-         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(20)))->Fill(0);
+         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(21)))->Fill(0);
       }//point on SPD1
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
        if(!track->HasPointOnITSLayer(1)) {
-         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(21)))->Fill(0);
+         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(22)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(1))
-         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(21)))->Fill(0);
+         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(22)))->Fill(0);
       }//point on SPD2
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
        if(!track->HasPointOnITSLayer(2)) {
-         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(22)))->Fill(0);
+         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(23)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(2))
-         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(22)))->Fill(0);
+         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(23)))->Fill(0);
       }//point on SDD1
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
        if(!track->HasPointOnITSLayer(3)) {
-         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(23)))->Fill(0);
+         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(24)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(3))
-         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(23)))->Fill(0);
+         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(24)))->Fill(0);
       }//point on SDD2
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
        if(!track->HasPointOnITSLayer(4)) {
-         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(24)))->Fill(0);
+         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(25)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(4))
-         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(24)))->Fill(0);
+         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(25)))->Fill(0);
       }//point on SSD1
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
        if(!track->HasPointOnITSLayer(5)) {
-         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(25)))->Fill(0);
+         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(26)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(5))
-         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(25)))->Fill(0);
+         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(26)))->Fill(0);
       }//point on SSD2
-      if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
-       if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
-         ((TH1F *)(fQAPrimaryProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
-       }
-       if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
-         ((TH1F *)(fQAPrimaryProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
-      }//number of TPC points for the dE/dx
     }//primary particle cut
 
     //Secondaries
@@ -496,55 +496,55 @@ void AliProtonQAAnalysis::FillQA(AliStack *const stack,
        else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
          ((TH1F *)(fQASecondaryProtonsAcceptedList->At(19)))->Fill(0);
       }//TPC pid
+      if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
+       if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
+         ((TH1F *)(fQASecondaryProtonsRejectedList->At(20)))->Fill(track->GetTPCsignalN());
+       }
+       if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
+         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(20)))->Fill(track->GetTPCsignalN());
+      }//number of TPC points for the dE/dx
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
        if(!track->HasPointOnITSLayer(0)) {
-         ((TH1F *)(fQASecondaryProtonsRejectedList->At(20)))->Fill(0);
+         ((TH1F *)(fQASecondaryProtonsRejectedList->At(21)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(0))
-         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(20)))->Fill(0);
+         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(21)))->Fill(0);
       }//point on SPD1
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
        if(!track->HasPointOnITSLayer(1)) {
-         ((TH1F *)(fQASecondaryProtonsRejectedList->At(21)))->Fill(0);
+         ((TH1F *)(fQASecondaryProtonsRejectedList->At(22)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(1))
-         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(21)))->Fill(0);
+         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(22)))->Fill(0);
       }//point on SPD2
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
        if(!track->HasPointOnITSLayer(2)) {
-         ((TH1F *)(fQASecondaryProtonsRejectedList->At(22)))->Fill(0);
+         ((TH1F *)(fQASecondaryProtonsRejectedList->At(23)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(2))
-         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(22)))->Fill(0);
+         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(23)))->Fill(0);
       }//point on SDD1
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
        if(!track->HasPointOnITSLayer(3)) {
-         ((TH1F *)(fQASecondaryProtonsRejectedList->At(23)))->Fill(0);
+         ((TH1F *)(fQASecondaryProtonsRejectedList->At(24)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(3))
-         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(23)))->Fill(0);
+         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(24)))->Fill(0);
       }//point on SDD2
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
        if(!track->HasPointOnITSLayer(4)) {
-         ((TH1F *)(fQASecondaryProtonsRejectedList->At(24)))->Fill(0);
+         ((TH1F *)(fQASecondaryProtonsRejectedList->At(25)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(4))
-         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(24)))->Fill(0);
+         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(25)))->Fill(0);
       }//point on SSD1
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
        if(!track->HasPointOnITSLayer(5)) {
-         ((TH1F *)(fQASecondaryProtonsRejectedList->At(25)))->Fill(0);
+         ((TH1F *)(fQASecondaryProtonsRejectedList->At(26)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(5))
-         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(25)))->Fill(0);
+         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(26)))->Fill(0);
       }//point on SSD2
-      if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
-       if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
-         ((TH1F *)(fQASecondaryProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
-       }
-       if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
-         ((TH1F *)(fQASecondaryProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
-      }//number of TPC points for the dE/dx
     }//secondary particle cut
   }//protons
 
@@ -696,55 +696,55 @@ void AliProtonQAAnalysis::FillQA(AliStack *const stack,
        else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
          ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(19)))->Fill(0);
       }//TPC pid
+      if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
+       if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
+         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(20)))->Fill(track->GetTPCsignalN());
+       }
+       if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
+         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(20)))->Fill(track->GetTPCsignalN());
+      }//number of TPC points for the dE/dx
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
        if(!track->HasPointOnITSLayer(0)) {
-         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(20)))->Fill(0);
+         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(21)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(0))
-         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(20)))->Fill(0);
+         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(21)))->Fill(0);
       }//point on SPD1
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
        if(!track->HasPointOnITSLayer(1)) {
-         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(21)))->Fill(0);
+         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(22)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(1))
-         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(21)))->Fill(0);
+         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(22)))->Fill(0);
       }//point on SPD2
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
        if(!track->HasPointOnITSLayer(2)) {
-         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(22)))->Fill(0);
+         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(23)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(2))
-         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(22)))->Fill(0);
+         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(23)))->Fill(0);
       }//point on SDD1
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
        if(!track->HasPointOnITSLayer(3)) {
-         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(23)))->Fill(0);
+         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(24)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(3))
-         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(23)))->Fill(0);
+         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(24)))->Fill(0);
       }//point on SDD2
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
        if(!track->HasPointOnITSLayer(4)) {
-         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(24)))->Fill(0);
+         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(25)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(4))
-         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(24)))->Fill(0);
+         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(25)))->Fill(0);
       }//point on SSD1
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
        if(!track->HasPointOnITSLayer(5)) {
-         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(25)))->Fill(0);
+         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(26)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(5))
-         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(25)))->Fill(0);
+         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(26)))->Fill(0);
       }//point on SSD2
-      if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
-       if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
-         ((TH1F *)(fQAPrimaryAntiProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
-       }
-       if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
-         ((TH1F *)(fQAPrimaryAntiProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
-      }//number of TPC points for the dE/dx
     }//primary particle cut
 
     //Secondaries
@@ -892,55 +892,55 @@ void AliProtonQAAnalysis::FillQA(AliStack *const stack,
        else if((track->GetStatus() & AliESDtrack::kTPCpid) != 0)
          ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(19)))->Fill(0);
       }//TPC pid
+      if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
+       if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
+         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(20)))->Fill(track->GetTPCsignalN());
+       }
+       if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
+         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(20)))->Fill(track->GetTPCsignalN());
+      }//number of TPC points for the dE/dx
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer1()) {
        if(!track->HasPointOnITSLayer(0)) {
-         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(20)))->Fill(0);
+         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(21)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(0))
-         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(20)))->Fill(0);
+         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(21)))->Fill(0);
       }//point on SPD1
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer2()) {
        if(!track->HasPointOnITSLayer(1)) {
-         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(21)))->Fill(0);
+         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(22)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(1))
-         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(21)))->Fill(0);
+         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(22)))->Fill(0);
       }//point on SPD2
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer3()) {
        if(!track->HasPointOnITSLayer(2)) {
-         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(22)))->Fill(0);
+         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(23)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(2))
-         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(22)))->Fill(0);
+         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(23)))->Fill(0);
       }//point on SDD1
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer4()) {
        if(!track->HasPointOnITSLayer(3)) {
-         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(23)))->Fill(0);
+         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(24)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(3))
-         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(23)))->Fill(0);
+         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(24)))->Fill(0);
       }//point on SDD2
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer5()) {
        if(!track->HasPointOnITSLayer(4)) {
-         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(24)))->Fill(0);
+         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(25)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(4))
-         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(24)))->Fill(0);
+         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(25)))->Fill(0);
       }//point on SSD1
       if(fProtonAnalysisBase->IsUsedPointOnITSLayer6()) {
        if(!track->HasPointOnITSLayer(5)) {
-         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(25)))->Fill(0);
+         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(26)))->Fill(0);
        }
        else if(track->HasPointOnITSLayer(5))
-         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(25)))->Fill(0);
+         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(26)))->Fill(0);
       }//point on SSD2
-      if(fProtonAnalysisBase->IsUsedMinTPCdEdxPoints()) {
-       if(track->GetTPCsignalN() < fProtonAnalysisBase->GetMinTPCdEdxPoints()) {
-         ((TH1F *)(fQASecondaryAntiProtonsRejectedList->At(26)))->Fill(track->GetTPCsignalN());
-       }
-       if(track->GetTPCsignalN() >= fProtonAnalysisBase->GetMinTPCdEdxPoints())
-         ((TH1F *)(fQASecondaryAntiProtonsAcceptedList->At(26)))->Fill(track->GetTPCsignalN());
-      }//number of TPC points for the dE/dx
     }//secondary particle cut
   }//antiprotons
 }
@@ -1423,6 +1423,89 @@ void AliProtonQAAnalysis::InitCutLists() {
   gHistEtaPhiNClustersSecondaryAntiProtonsPass->SetStats(kTRUE);
   gHistEtaPhiNClustersSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
   fAcceptedCutList->Add(gHistEtaPhiNClustersSecondaryAntiProtonsPass);//eta-phi of secondary accepted ESD antiprotons
+  //eta-phi-chi^2 per TPC cluster
+  TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass = new TH3D("gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass",
+                                                                 "Accepted primary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                 fNBinsY,fMinY,fMaxY,
+                                                                 100,0,360,
+                                                                 100,0,4);
+  gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass->SetStats(kTRUE);
+  gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
+  fAcceptedCutList->Add(gHistEtaPhiChi2PerTPCClusterPrimaryProtonsPass);//eta-phi of primary accepted ESD protons
+  TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass = new TH3D("gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass",
+                                                                     "Accepted primary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                     fNBinsY,fMinY,fMaxY,
+                                                                     100,0,360,
+                                                                     100,0,4);
+  gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass->SetStats(kTRUE);
+  gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
+  fAcceptedCutList->Add(gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsPass);//eta-phi of primary accepted ESD antiprotons
+  TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass = new TH3D("gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass",
+                                                                   "Accepted secondary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                   fNBinsY,fMinY,fMaxY,
+                                                                   100,0,360,
+                                                                   100,0,4);
+  gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass->SetStats(kTRUE);
+  gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
+  fAcceptedCutList->Add(gHistEtaPhiChi2PerTPCClusterSecondaryProtonsPass);//eta-phi of secondary accepted ESD protons
+  TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass = new TH3D("gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass",
+                                                                       "Accepted secondary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                       fNBinsY,fMinY,fMaxY,
+                                                                       100,0,360,
+                                                                       100,0,4);
+  gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass->SetStats(kTRUE);
+  gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
+  fAcceptedCutList->Add(gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsPass);//eta-phi of secondary accepted ESD antiprotons
+  //eta-phi-number of TPC points for the dE/dx
+  TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass = new TH3D("gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass",
+                                                                 "Accepted primary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                 fNBinsY,fMinY,fMaxY,
+                                                                 100,0,360,
+                                                                 100,0,200);
+  gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass->SetStats(kTRUE);
+  gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass->GetXaxis()->SetTitleColor(1);
+  fAcceptedCutList->Add(gHistEtaPhiTPCdEdxNPointsPrimaryProtonsPass);//eta-phi of primary accepted ESD protons
+  TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass = new TH3D("gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass",
+                                                                     "Accepted primary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                     fNBinsY,fMinY,fMaxY,
+                                                                     100,0,360,
+                                                                     100,0,200);
+  gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass->SetStats(kTRUE);
+  gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
+  fAcceptedCutList->Add(gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsPass);//eta-phi of primary accepted ESD antiprotons
+  TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass = new TH3D("gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass",
+                                                                   "Accepted secondary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                   fNBinsY,fMinY,fMaxY,
+                                                                   100,0,360,
+                                                                   100,0,200);
+  gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass->SetStats(kTRUE);
+  gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass->GetXaxis()->SetTitleColor(1);
+  fAcceptedCutList->Add(gHistEtaPhiTPCdEdxNPointsSecondaryProtonsPass);//eta-phi of secondary accepted ESD protons
+  TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass = new TH3D("gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass",
+                                                                       "Accepted secondary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                       fNBinsY,fMinY,fMaxY,
+                                                                       100,0,360,
+                                                                       100,0,200);
+  gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass->SetStats(kTRUE);
+  gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass->GetXaxis()->SetTitleColor(1);
+  fAcceptedCutList->Add(gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsPass);//eta-phi of secondary accepted ESD antiprotons
+
+  TH1F *gPrimaryProtonsNPointsTPCdEdx = new TH1F("gPrimaryProtonsNPointsTPCdEdx",
+                                             ";N_{points} (TPC-dE/dx);Entries",
+                                             100,0,200);
+  fAcceptedCutList->Add(gPrimaryProtonsNPointsTPCdEdx);
+  TH1F *gPrimaryAntiProtonsNPointsTPCdEdx = new TH1F("gPrimaryAntiProtonsNPointsTPCdEdx",
+                                                 ";N_{points} (TPC-dE/dx);Entries",
+                                                 100,0,200);
+  fAcceptedCutList->Add(gPrimaryAntiProtonsNPointsTPCdEdx);
+  TH1F *gSecondaryProtonsNPointsTPCdEdx = new TH1F("gSecondaryProtonsNPointsTPCdEdx",
+                                               ";N_{points} (TPC-dE/dx);Entries",
+                                               100,0,200);
+  fAcceptedCutList->Add(gSecondaryProtonsNPointsTPCdEdx);
+  TH1F *gSecondaryAntiProtonsNPointsTPCdEdx = new TH1F("gSecondaryAntiProtonsNPointsTPCdEdx",
+                                                   ";N_{points} (TPC-dE/dx);Entries",
+                                                   100,0,200);
+  fAcceptedCutList->Add(gSecondaryAntiProtonsNPointsTPCdEdx);
   
   //Rejected cut list
   fRejectedCutList = new TList();
@@ -1459,7 +1542,72 @@ void AliProtonQAAnalysis::InitCutLists() {
   gHistEtaPhiNClustersSecondaryAntiProtonsReject->SetStats(kTRUE);
   gHistEtaPhiNClustersSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
   fRejectedCutList->Add(gHistEtaPhiNClustersSecondaryAntiProtonsReject);//eta-phi of secondary rejected ESD antiprotons
-
+  //eta-phi-chi^2 per TPC cluster
+  TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject = new TH3D("gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject",
+                                                                 "Rejected primary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                 fNBinsY,fMinY,fMaxY,
+                                                                 100,0,360,
+                                                                 100,0,4);
+  gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject->SetStats(kTRUE);
+  gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
+  fRejectedCutList->Add(gHistEtaPhiChi2PerTPCClusterPrimaryProtonsReject);//eta-phi of primary rejected ESD protons
+  TH3D *gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject = new TH3D("gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject",
+                                                                     "Rejected primary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                     fNBinsY,fMinY,fMaxY,
+                                                                     100,0,360,
+                                                                     100,0,4);
+  gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject->SetStats(kTRUE);
+  gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
+  fRejectedCutList->Add(gHistEtaPhiChi2PerTPCClusterPrimaryAntiProtonsReject);//eta-phi of primary rejected ESD antiprotons
+  TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject = new TH3D("gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject",
+                                                                   "Rejected secondary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                   fNBinsY,fMinY,fMaxY,
+                                                                   100,0,360,
+                                                                   100,0,4);
+  gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject->SetStats(kTRUE);
+  gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
+  fRejectedCutList->Add(gHistEtaPhiChi2PerTPCClusterSecondaryProtonsReject);//eta-phi of secondary rejected ESD protons
+  TH3D *gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject = new TH3D("gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject",
+                                                                       "Rejected secondary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                       fNBinsY,fMinY,fMaxY,
+                                                                       100,0,360,
+                                                                       100,0,4);
+  gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject->SetStats(kTRUE);
+  gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
+  fRejectedCutList->Add(gHistEtaPhiChi2PerTPCClusterSecondaryAntiProtonsReject);//eta-phi of secondary rejected ESD antiprotons
+  //eta-phi-number of TPC points for the dE/dx
+  TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject = new TH3D("gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject",
+                                                                 "Rejected primary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                 fNBinsY,fMinY,fMaxY,
+                                                                 100,0,360,
+                                                                 100,0,200);
+  gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject->SetStats(kTRUE);
+  gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject->GetXaxis()->SetTitleColor(1);
+  fRejectedCutList->Add(gHistEtaPhiTPCdEdxNPointsPrimaryProtonsReject);//eta-phi of primary rejected ESD protons
+  TH3D *gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject = new TH3D("gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject",
+                                                                     "Rejected primary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                     fNBinsY,fMinY,fMaxY,
+                                                                     100,0,360,
+                                                                     100,0,200);
+  gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject->SetStats(kTRUE);
+  gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
+  fRejectedCutList->Add(gHistEtaPhiTPCdEdxNPointsPrimaryAntiProtonsReject);//eta-phi of primary rejected ESD antiprotons
+  TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject = new TH3D("gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject",
+                                                                   "Rejected secondary protons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                   fNBinsY,fMinY,fMaxY,
+                                                                   100,0,360,
+                                                                   100,0,200);
+  gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject->SetStats(kTRUE);
+  gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject->GetXaxis()->SetTitleColor(1);
+  fRejectedCutList->Add(gHistEtaPhiTPCdEdxNPointsSecondaryProtonsReject);//eta-phi of secondary rejected ESD protons
+  TH3D *gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject = new TH3D("gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject",
+                                                                       "Rejected secondary antiprotons;#eta;#phi;#chi^{2}/N_{clusters}(TPC)",
+                                                                       fNBinsY,fMinY,fMaxY,
+                                                                       100,0,360,
+                                                                       100,0,200);
+  gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject->SetStats(kTRUE);
+  gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject->GetXaxis()->SetTitleColor(1);
+  fRejectedCutList->Add(gHistEtaPhiTPCdEdxNPointsSecondaryAntiProtonsReject);//eta-phi of secondary rejected ESD antiprotons
 
   //DCA list
   fAcceptedDCAList = new TList();
@@ -2669,7 +2817,7 @@ void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliMCEvent *const mcEvent,
   Int_t nMCParticles = mcEvent->GetNumberOfTracks();
   Int_t nMCLabelCounter = 0;
   TArrayI labelMCArray(nMCParticles);
-  
+
   for (Int_t iTracks = 0; iTracks < mcEvent->GetNumberOfTracks(); iTracks++) {
     AliMCParticle *mcTrack = mcEvent->GetTrack(iTracks);
     if (!mcTrack) {
@@ -2701,6 +2849,7 @@ void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliMCEvent *const mcEvent,
     //findable tracks
     if (labelTPC) {
       TParticle* particle = mcTrack->Particle();
+      if(!particle) continue;
       Int_t pdgcode = particle->GetPdgCode();
       if(TMath::Abs(pdgcode) != 2212) continue;
       
@@ -2714,8 +2863,8 @@ void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliMCEvent *const mcEvent,
                                                     particle->Pt());
          else
            ((TH2D *)(fEfficiencyList->At(0)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
-                                                             particle->Py(),
-                                                             particle->Pz()),
+                                                                                  particle->Py(),
+                                                                                  particle->Pz()),
                                                     particle->Pt());
        }//protons
        if(pdgcode == -2212) {
@@ -2724,8 +2873,8 @@ void AliProtonQAAnalysis::RunEfficiencyAnalysis(AliMCEvent *const mcEvent,
                                                     particle->Pt());
          else
            ((TH2D *)(fEfficiencyList->At(1)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),
-                                                             particle->Py(),
-                                                             particle->Pz()),
+                                                                                  particle->Py(),
+                                                                                  particle->Pz()),
                                                     particle->Pt());
        }//antiprotons
       }//primaries
@@ -3719,7 +3868,8 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
     Double_t chi2ConstrainVertex = TMath::Log(track->GetConstrainedChi2());    
     Double_t extCov[15];
     track->GetExternalCovariance(extCov);
-    
+    Int_t npointsTPCdEdx = track->GetTPCsignalN();
+
     //TPC only
     if((fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kTPC)||(fProtonAnalysisBase->GetAnalysisMode()==AliProtonAnalysisBase::kHybrid)) {
       AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)track->GetTPCInnerParam();
@@ -3755,6 +3905,13 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fAcceptedCutList->At(44)))->Fill(tpcTrack->Eta(),
                                                         tpcTrack->Phi()*180./TMath::Pi(),
                                                         nClustersTPC);
+             ((TH3D *)(fAcceptedCutList->At(48)))->Fill(tpcTrack->Eta(),
+                                                        tpcTrack->Phi()*180./TMath::Pi(),
+                                                        chi2PerClusterTPC);
+             ((TH3D *)(fAcceptedCutList->At(52)))->Fill(tpcTrack->Eta(),
+                                                        tpcTrack->Phi()*180./TMath::Pi(),
+                                                        npointsTPCdEdx);
+             ((TH1D *)(fAcceptedCutList->At(56)))->Fill(npointsTPCdEdx);
              
              ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
              ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
@@ -3785,6 +3942,13 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fAcceptedCutList->At(45)))->Fill(tpcTrack->Eta(),
                                                         tpcTrack->Phi()*180./TMath::Pi(),
                                                         nClustersTPC);
+             ((TH3D *)(fAcceptedCutList->At(49)))->Fill(tpcTrack->Eta(),
+                                                        tpcTrack->Phi()*180./TMath::Pi(),
+                                                        chi2PerClusterTPC);
+             ((TH3D *)(fAcceptedCutList->At(53)))->Fill(tpcTrack->Eta(),
+                                                        tpcTrack->Phi()*180./TMath::Pi(),
+                                                        npointsTPCdEdx);
+             ((TH1D *)(fAcceptedCutList->At(57)))->Fill(npointsTPCdEdx);
              
              ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
              ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
@@ -3830,7 +3994,14 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fAcceptedCutList->At(46)))->Fill(tpcTrack->Eta(),
                                                         tpcTrack->Phi()*180./TMath::Pi(),
                                                         nClustersTPC);
-             
+             ((TH3D *)(fAcceptedCutList->At(50)))->Fill(tpcTrack->Eta(),
+                                                        tpcTrack->Phi()*180./TMath::Pi(),
+                                                        chi2PerClusterTPC);
+             ((TH3D *)(fAcceptedCutList->At(54)))->Fill(tpcTrack->Eta(),
+                                                        tpcTrack->Phi()*180./TMath::Pi(),
+                                                        npointsTPCdEdx);
+             ((TH1D *)(fAcceptedCutList->At(58)))->Fill(npointsTPCdEdx);
+
              ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
              ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
              ((TH1F *)(fAcceptedDCAList->At(10)))->Fill(nSigmaToVertex);
@@ -3869,7 +4040,14 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fAcceptedCutList->At(47)))->Fill(tpcTrack->Eta(),
                                                         tpcTrack->Phi()*180./TMath::Pi(),
                                                         nClustersTPC);
-             
+             ((TH3D *)(fAcceptedCutList->At(51)))->Fill(tpcTrack->Eta(),
+                                                        tpcTrack->Phi()*180./TMath::Pi(),
+                                                        chi2PerClusterTPC);
+             ((TH3D *)(fAcceptedCutList->At(55)))->Fill(tpcTrack->Eta(),
+                                                        tpcTrack->Phi()*180./TMath::Pi(),
+                                                        npointsTPCdEdx);
+             ((TH1F *)(fAcceptedCutList->At(59)))->Fill(npointsTPCdEdx);
+
              ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
              ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
              ((TH1F *)(fAcceptedDCAList->At(11)))->Fill(nSigmaToVertex);
@@ -3898,6 +4076,13 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fRejectedCutList->At(0)))->Fill(tpcTrack->Eta(),
                                                        tpcTrack->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
+             ((TH3D *)(fRejectedCutList->At(4)))->Fill(tpcTrack->Eta(),
+                                                       tpcTrack->Phi()*180./TMath::Pi(),
+                                                       chi2PerClusterTPC);
+             ((TH3D *)(fRejectedCutList->At(8)))->Fill(tpcTrack->Eta(),
+                                                       tpcTrack->Phi()*180./TMath::Pi(),
+                                                       npointsTPCdEdx);
+
              if(fProtonAnalysisBase->GetEtaMode())
                ((TH2D *)(fQA2DList->At(1)))->Fill(tpcTrack->Eta(),gPt);
              else
@@ -3910,6 +4095,12 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fRejectedCutList->At(1)))->Fill(tpcTrack->Eta(),
                                                        tpcTrack->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
+             ((TH3D *)(fRejectedCutList->At(5)))->Fill(tpcTrack->Eta(),
+                                                       tpcTrack->Phi()*180./TMath::Pi(),
+                                                       chi2PerClusterTPC);
+             ((TH3D *)(fRejectedCutList->At(9)))->Fill(tpcTrack->Eta(),
+                                                       tpcTrack->Phi()*180./TMath::Pi(),
+                                                       npointsTPCdEdx);
              if(fProtonAnalysisBase->GetEtaMode())
                ((TH2D *)(fQA2DList->At(5)))->Fill(tpcTrack->Eta(),gPt);
              else
@@ -3924,6 +4115,12 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fRejectedCutList->At(2)))->Fill(tpcTrack->Eta(),
                                                        tpcTrack->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
+             ((TH3D *)(fRejectedCutList->At(6)))->Fill(tpcTrack->Eta(),
+                                                       tpcTrack->Phi()*180./TMath::Pi(),
+                                                       chi2PerClusterTPC);
+             ((TH3D *)(fRejectedCutList->At(10)))->Fill(tpcTrack->Eta(),
+                                                        tpcTrack->Phi()*180./TMath::Pi(),
+                                                        npointsTPCdEdx);
              if(fProtonAnalysisBase->GetEtaMode())
                ((TH2D *)(fQA2DList->At(3)))->Fill(tpcTrack->Eta(),gPt);
              else
@@ -3936,6 +4133,13 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fRejectedCutList->At(3)))->Fill(tpcTrack->Eta(),
                                                        tpcTrack->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
+             ((TH3D *)(fRejectedCutList->At(7)))->Fill(tpcTrack->Eta(),
+                                                       tpcTrack->Phi()*180./TMath::Pi(),
+                                                       chi2PerClusterTPC);
+             ((TH3D *)(fRejectedCutList->At(11)))->Fill(tpcTrack->Eta(),
+                                                        tpcTrack->Phi()*180./TMath::Pi(),
+                                                        npointsTPCdEdx);
+
              if(fProtonAnalysisBase->GetEtaMode())
                ((TH2D *)(fQA2DList->At(7)))->Fill(tpcTrack->Eta(),gPt);
              else
@@ -3979,6 +4183,13 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fAcceptedCutList->At(44)))->Fill(track->Eta(),
                                                         track->Phi()*180./TMath::Pi(),
                                                         nClustersTPC);
+             ((TH3D *)(fAcceptedCutList->At(48)))->Fill(track->Eta(),
+                                                        track->Phi()*180./TMath::Pi(),
+                                                        chi2PerClusterTPC);
+             ((TH3D *)(fAcceptedCutList->At(52)))->Fill(track->Eta(),
+                                                        track->Phi()*180./TMath::Pi(),
+                                                        npointsTPCdEdx);
+             ((TH1F *)(fAcceptedCutList->At(56)))->Fill(npointsTPCdEdx);
              
              ((TH1F *)(fAcceptedDCAList->At(0)))->Fill(TMath::Abs(dcaXY));
              ((TH1F *)(fAcceptedDCAList->At(4)))->Fill(TMath::Abs(dcaZ));
@@ -4009,6 +4220,13 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fAcceptedCutList->At(45)))->Fill(track->Eta(),
                                                         track->Phi()*180./TMath::Pi(),
                                                         nClustersTPC);
+             ((TH3D *)(fAcceptedCutList->At(49)))->Fill(track->Eta(),
+                                                        track->Phi()*180./TMath::Pi(),
+                                                        chi2PerClusterTPC);
+             ((TH3D *)(fAcceptedCutList->At(53)))->Fill(track->Eta(),
+                                                        track->Phi()*180./TMath::Pi(),
+                                                        npointsTPCdEdx);
+             ((TH1F *)(fAcceptedCutList->At(57)))->Fill(npointsTPCdEdx);
              
              ((TH1F *)(fAcceptedDCAList->At(1)))->Fill(TMath::Abs(dcaXY));
              ((TH1F *)(fAcceptedDCAList->At(5)))->Fill(TMath::Abs(dcaZ));
@@ -4054,6 +4272,13 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fAcceptedCutList->At(46)))->Fill(track->Eta(),
                                                         track->Phi()*180./TMath::Pi(),
                                                         nClustersTPC);
+             ((TH3D *)(fAcceptedCutList->At(50)))->Fill(track->Eta(),
+                                                        track->Phi()*180./TMath::Pi(),
+                                                        chi2PerClusterTPC);
+             ((TH3D *)(fAcceptedCutList->At(54)))->Fill(track->Eta(),
+                                                        track->Phi()*180./TMath::Pi(),
+                                                        npointsTPCdEdx);
+             ((TH1F *)(fAcceptedCutList->At(58)))->Fill(npointsTPCdEdx);
              
              ((TH1F *)(fAcceptedDCAList->At(2)))->Fill(TMath::Abs(dcaXY));
              ((TH1F *)(fAcceptedDCAList->At(6)))->Fill(TMath::Abs(dcaZ));
@@ -4093,6 +4318,13 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fAcceptedCutList->At(47)))->Fill(track->Eta(),
                                                         track->Phi()*180./TMath::Pi(),
                                                         nClustersTPC);
+             ((TH3D *)(fAcceptedCutList->At(51)))->Fill(track->Eta(),
+                                                        track->Phi()*180./TMath::Pi(),
+                                                        chi2PerClusterTPC);
+             ((TH3D *)(fAcceptedCutList->At(55)))->Fill(track->Eta(),
+                                                        track->Phi()*180./TMath::Pi(),
+                                                        npointsTPCdEdx);
+             ((TH1F *)(fAcceptedCutList->At(59)))->Fill(npointsTPCdEdx);
              
              ((TH1F *)(fAcceptedDCAList->At(3)))->Fill(TMath::Abs(dcaXY));
              ((TH1F *)(fAcceptedDCAList->At(7)))->Fill(TMath::Abs(dcaZ));
@@ -4122,6 +4354,12 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fRejectedCutList->At(0)))->Fill(track->Eta(),
                                                        track->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
+             ((TH3D *)(fRejectedCutList->At(4)))->Fill(track->Eta(),
+                                                       track->Phi()*180./TMath::Pi(),
+                                                       chi2PerClusterTPC);
+             ((TH3D *)(fRejectedCutList->At(8)))->Fill(track->Eta(),
+                                                       track->Phi()*180./TMath::Pi(),
+                                                       npointsTPCdEdx);
              if(fProtonAnalysisBase->GetEtaMode())
                ((TH2D *)(fQA2DList->At(1)))->Fill(track->Eta(),gPt);
              else
@@ -4134,6 +4372,13 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fRejectedCutList->At(1)))->Fill(track->Eta(),
                                                        track->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
+             ((TH3D *)(fRejectedCutList->At(5)))->Fill(track->Eta(),
+                                                       track->Phi()*180./TMath::Pi(),
+                                                       chi2PerClusterTPC);
+             ((TH3D *)(fRejectedCutList->At(9)))->Fill(track->Eta(),
+                                                       track->Phi()*180./TMath::Pi(),
+                                                       npointsTPCdEdx);
+                                               
              if(fProtonAnalysisBase->GetEtaMode())
                ((TH2D *)(fQA2DList->At(5)))->Fill(track->Eta(),gPt);
              else
@@ -4148,6 +4393,12 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fRejectedCutList->At(2)))->Fill(track->Eta(),
                                                        track->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
+             ((TH3D *)(fRejectedCutList->At(6)))->Fill(track->Eta(),
+                                                       track->Phi()*180./TMath::Pi(),
+                                                       chi2PerClusterTPC);
+             ((TH3D *)(fRejectedCutList->At(10)))->Fill(track->Eta(),
+                                                       track->Phi()*180./TMath::Pi(),
+                                                       npointsTPCdEdx);
              if(fProtonAnalysisBase->GetEtaMode())
                ((TH2D *)(fQA2DList->At(3)))->Fill(track->Eta(),gPt);
              else
@@ -4160,6 +4411,12 @@ void AliProtonQAAnalysis::RunQAAnalysis(AliStack *stack,
              ((TH3D *)(fRejectedCutList->At(3)))->Fill(track->Eta(),
                                                        track->Phi()*180./TMath::Pi(),
                                                        nClustersTPC);
+             ((TH3D *)(fRejectedCutList->At(7)))->Fill(track->Eta(),
+                                                       track->Phi()*180./TMath::Pi(),
+                                                       chi2PerClusterTPC);
+             ((TH3D *)(fRejectedCutList->At(11)))->Fill(track->Eta(),
+                                                       track->Phi()*180./TMath::Pi(),
+                                                       npointsTPCdEdx);
              if(fProtonAnalysisBase->GetEtaMode())
                ((TH2D *)(fQA2DList->At(7)))->Fill(track->Eta(),gPt);
              else
index 1e2193a9e5f09cb10dcd8ee38054946cb9dd41cd..21c74a09faaf8584ba0693d9ce8ce4135765a916 100644 (file)
@@ -26,10 +26,11 @@ AliProtonQAAnalysis *GetProtonQAAnalysisObject(const char* analysisLevel = "ESD"
   AliProtonAnalysisBase *baseAnalysis = GetProtonAnalysisBaseObject(analysisLevel,esdAnalysisType,pidMode);
 
   AliProtonQAAnalysis *analysis = new AliProtonQAAnalysis();
-  analysis->SetQAOn();
+  analysis->SetBaseAnalysis(baseAnalysis);
   analysis->SetRunMCAnalysis();
   //analysis->SetMCProcessId(4);//4: weak decay - 13: hadronic interaction
   //analysis->SetMotherParticlePDGCode(3122);//3122: Lambda
+  analysis->SetRunEfficiencyAnalysis(kFALSE);//use cuts in the eff. analysis
   analysis->SetQAYPtBins(baseAnalysis->GetNBinsX(),
                         baseAnalysis->GetMinX(),
                         baseAnalysis->GetMaxX(),
index 16f082650d9402e852eac6b5f24033dbf0540d70..e574c78b3416c566839cfef4c88ad7079df849ac 100644 (file)
@@ -84,6 +84,8 @@ void PrintHelpMenu() {
  Printf("\nFunction compareEfficiencies: Takes as arguments the filenames produced by the drawEfficiency (see before - usually the name is Reconstruction-PID-Efficiency.root) and three booleans indicating whether the points for primaries, secondaries from weak decays and secondaries from hadronic interactions will be shown. The two files correspond to two different tracking methods (e.g. TPC, Hybrid, Global). It displays:");
   Printf("\t 1. Reconstruction efficiencies for primary and secondary (anti)protons as a function of either eta or y. The secondaries are categorized by the MC process as originating from a weak decay or from a hadronic interaction.");
   Printf("\t 2. Reconstruction efficiencies for primary and secondary (anti)protons as a function of Pt. The secondaries are categorized by the MC process as originating from a weak decay or from a hadronic interaction.");
+
+  Printf("\nFunction drawCutParametersDistributions: Takes as an argument the third file created by the QA code (usually the name is Protons.QA.Histograms.<AnalysisMode>.root) and displays the distributions of accepted primaries (in blue) and secondaries (in orange) for the different cut parameters.");
   Printf("==================================================================\n\n\n");
 }
 
@@ -93,7 +95,7 @@ void drawCutStatistics(TList *list,
   //Function to display the statistics from the cuts
   //The histogram shows the influence of each cut on the primary
   //and secondary (anti)protons
-  const Int_t NQAHISTOSPERLIST = 26;
+  const Int_t NQAHISTOSPERLIST = 27;
 
   Double_t gEntriesQA2DList[12] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
   Double_t gEntriesQAPrimaryProtonsAcceptedList[NQAHISTOSPERLIST], gEntriesQAPrimaryProtonsRejectedList[NQAHISTOSPERLIST];
@@ -143,7 +145,7 @@ void drawCutStatistics(TList *list,
 
   //_______________________________________________________//
   //Create the histograms
-  const Int_t nx = 26;
+  const Int_t nx = 27;
   char *fCutName[nx] = {"Tracks","",
                        "ITS Clusters",
                        "#chi^{2}/N_{ITS-Clusters}",
@@ -164,7 +166,8 @@ void drawCutStatistics(TList *list,
                        "ITS refit",
                        "TPC refit",
                        "ESD pid",
-                       "TPC pid","",
+                       "TPC pid",
+                       "N_{points} (dE/dx)","",
                        "N_{Secondaries}/N_{total}","",""};
   char *fCutITSName[6] = {"SPD_{1}","SPD_{2}",
                          "SDD_{1}","SDD_{2}",
@@ -407,10 +410,10 @@ void drawCutStatistics(TList *list,
   hEmptyITS->DrawCopy();
 
   for(Int_t i = 1; i < 7; i++) {
-    hPrimaryProtonsITS->SetBinContent(i,GetPercentage(gEntriesQAPrimaryProtonsAcceptedList[19+i],
-                                                     gEntriesQAPrimaryProtonsRejectedList[19+i]));
-    hSecondaryProtonsITS->SetBinContent(i,GetPercentage(gEntriesQASecondaryProtonsAcceptedList[19+i],
-                                                       gEntriesQASecondaryProtonsRejectedList[19+i]));
+    hPrimaryProtonsITS->SetBinContent(i,GetPercentage(gEntriesQAPrimaryProtonsAcceptedList[20+i],
+                                                     gEntriesQAPrimaryProtonsRejectedList[20+i]));
+    hSecondaryProtonsITS->SetBinContent(i,GetPercentage(gEntriesQASecondaryProtonsAcceptedList[20+i],
+                                                       gEntriesQASecondaryProtonsRejectedList[20+i]));
   }
   hPrimaryProtonsITS->DrawCopy("EHISTSAME");
   hSecondaryProtonsITS->DrawCopy("EHISTSAME");
@@ -425,10 +428,10 @@ void drawCutStatistics(TList *list,
   hEmptyITS->SetTitle("Antiprotons");
   hEmptyITS->DrawCopy();
   for(Int_t i = 1; i < 7; i++) {
-    hPrimaryAntiProtonsITS->SetBinContent(i,GetPercentage(gEntriesQAPrimaryAntiProtonsAcceptedList[19+i],
-                                                         gEntriesQAPrimaryAntiProtonsRejectedList[19+i]));
-    hSecondaryAntiProtonsITS->SetBinContent(i,GetPercentage(gEntriesQASecondaryAntiProtonsAcceptedList[19+i],
-                                                           gEntriesQASecondaryAntiProtonsRejectedList[19+i]));
+    hPrimaryAntiProtonsITS->SetBinContent(i,GetPercentage(gEntriesQAPrimaryAntiProtonsAcceptedList[20+i],
+                                                         gEntriesQAPrimaryAntiProtonsRejectedList[20+i]));
+    hSecondaryAntiProtonsITS->SetBinContent(i,GetPercentage(gEntriesQASecondaryAntiProtonsAcceptedList[20+i],
+                                                           gEntriesQASecondaryAntiProtonsRejectedList[20+i]));
   }
   hPrimaryAntiProtonsITS->DrawCopy("EHISTSAME");
   hSecondaryAntiProtonsITS->DrawCopy("EHISTSAME");
@@ -986,8 +989,8 @@ void GetQAEntries(TList *inputList, Double_t *entries) {
   for(Int_t i = 0; i < inputList->GetEntries(); i++) {
     TH1F *gHist = (TH1F *)inputList->At(i);
     entries[i] = gHist->GetEntries();
-    //cout<<"Histogram: "<<gHist->GetName()<<
-    //" - Entries: "<<entries[i]<<endl;
+    cout<<"Position: "<<i+1<<" - Histogram: "<<gHist->GetName()<<
+      " - Entries: "<<entries[i]<<endl;
     gHist = 0;
   }
 }
@@ -2384,3 +2387,402 @@ void compareEfficiencies(const char *filenameTPC,
   c2->SaveAs("ReconstructionEfficiency-AntiProtons.gif");
 
 }
+
+//________________________________________________//
+void drawCutParametersDistributions(const char* filename = "Protons.QA.Histograms.root") {
+  //macro that takes as an input the third file 
+  //created by the proton QA analysis task 
+  //and draws the DCA distributions of protons 
+  //and antiprotons (both primary & secondaries)
+  const Int_t nEvents = 1;
+
+  TFile *f = TFile::Open(filename);
+
+  //cut list
+  TH1F *gCutListHistograms[100];
+  TList *listCut = (TList *)f->Get("acceptedCutList");
+  Int_t iCounter = 0;
+  cout<<"Cut list entries: "<<listCut->GetEntries()<<endl;
+  for(Int_t iEntry = 0; iEntry < listCut->GetEntries(); iEntry++) {
+    if(iCounter == 4) iCounter = 0;
+    iCounter += 1;
+    gCutListHistograms[iEntry] = (TH1F *)listCut->At(iEntry);
+    gCutListHistograms[iEntry]->Scale(1./nEvents);
+    if(iCounter < 3) {
+      gCutListHistograms[iEntry]->SetFillColor(4);
+      gCutListHistograms[iEntry]->SetMarkerColor(4);
+      gCutListHistograms[iEntry]->SetMarkerStyle(20);
+    }
+    else {
+      gCutListHistograms[iEntry]->SetFillColor(kOrange+1);
+      gCutListHistograms[iEntry]->SetMarkerColor(kOrange+1);
+      gCutListHistograms[iEntry]->SetMarkerStyle(29);
+    }
+    /*cout<<"Entry: "<<iEntry<<
+      " - Counter: "<<iCounter<<
+      " - Name: "<<gCutListHistograms[iEntry]->GetName()<<endl;*/
+  }
+
+  //DCA list
+  TH1F *gDCAListHistograms[20];
+  TList *listDCA = (TList *)f->Get("acceptedDCAList");
+  iCounter = 0;
+  cout<<"DCA list entries: "<<listDCA->GetEntries()<<endl;
+  for(Int_t iEntry = 0; iEntry < listDCA->GetEntries(); iEntry++) {
+    if(iCounter == 4) iCounter = 0;
+    iCounter += 1;
+    gDCAListHistograms[iEntry] = (TH1F *)listDCA->At(iEntry);
+    gDCAListHistograms[iEntry]->Scale(1./nEvents);
+    if(iCounter < 3) {
+      gDCAListHistograms[iEntry]->SetFillColor(4);
+      gDCAListHistograms[iEntry]->SetMarkerColor(4);
+      gDCAListHistograms[iEntry]->SetMarkerStyle(20);
+    }
+    else {
+      gDCAListHistograms[iEntry]->SetFillColor(kOrange+1);
+      gDCAListHistograms[iEntry]->SetMarkerColor(kOrange+1);
+      gDCAListHistograms[iEntry]->SetMarkerStyle(29);
+    }
+    /*cout<<"Entry: "<<iEntry<<
+      " - Counter: "<<iCounter<<
+      " - Name: "<<gDCAListHistograms[iEntry]->GetName()<<endl;*/
+  }
+
+  //_________________________________________________________//
+  TF1 *gDCA = new TF1("gDCA",
+                     "[0]*TMath::Power(1+TMath::Exp((x-[1])/[2]),-1)",
+                     0.1,100.0);
+  gDCA->SetParameter(0,1.74221e+07);
+  gDCA->SetParameter(1,-1.12221e+01);
+  gDCA->SetParameter(2,1.02726);
+  //_________________________________________________________//
+  TH2F *hEmpty = new TH2F("hEmpty","",300,-100,200,100,1e-01,1e+06);
+  hEmpty->GetYaxis()->SetTitle("Entries/Event");
+  hEmpty->GetYaxis()->SetNdivisions(10);
+  hEmpty->GetXaxis()->SetNdivisions(10);
+  hEmpty->SetStats(kFALSE);
+  //_________________________________________________________//
+
+  //Cut parameters
+  TCanvas *c1 = new TCanvas("c1","ITS Cluster map",0,0,650,350);
+  c1->SetFillColor(10); c1->GetFrame()->SetFillColor(10);
+  c1->SetHighLightColor(10); c1->Divide(2,1);
+  c1->cd(1)->SetBottomMargin(0.2); c1->cd(1)->SetLeftMargin(0.2);
+  c1->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("ITS layer");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,7.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[0]->Draw("ESAME");
+  gCutListHistograms[2]->Draw("ESAME");
+  c1->cd(2)->SetBottomMargin(0.2); c1->cd(2)->SetLeftMargin(0.2);
+  c1->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("ITS layer");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,7.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[1]->Draw("ESAME");
+  gCutListHistograms[3]->Draw("ESAME");
+  c1->SaveAs("ITSClusterMap.gif");
+
+  TCanvas *c2 = new TCanvas("c2","Number of ITS Clusters",50,50,650,350);
+  c2->SetFillColor(10); c2->GetFrame()->SetFillColor(10);
+  c2->SetHighLightColor(10); c2->Divide(2,1);
+  c2->cd(1)->SetBottomMargin(0.2); c2->cd(1)->SetLeftMargin(0.2);
+  c2->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("N_{clusters}(ITS)");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,7.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[4]->Draw("ESAME");
+  gCutListHistograms[6]->Draw("ESAME");
+  c2->cd(2)->SetBottomMargin(0.2); c2->cd(2)->SetLeftMargin(0.2);
+  c2->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("N_{clusters}(ITS)");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,7.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[5]->Draw("ESAME");
+  gCutListHistograms[7]->Draw("ESAME");
+  c2->SaveAs("NITSClusters.gif");
+
+  TCanvas *c3 = new TCanvas("c3","Chi2 per ITS cluster",100,100,650,350);
+  c3->SetFillColor(10); c3->GetFrame()->SetFillColor(10);
+  c3->SetHighLightColor(10); c3->Divide(2,1);
+  c3->cd(1)->SetBottomMargin(0.2); c3->cd(1)->SetLeftMargin(0.2);
+  c3->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#chi^{2}/N_{clusters}(ITS)");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,20.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[8]->Draw("ESAME");
+  gCutListHistograms[10]->Draw("ESAME");
+  c3->cd(2)->SetBottomMargin(0.2); c3->cd(2)->SetLeftMargin(0.2);
+  c3->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#chi^{2}/N_{clusters}(ITS)");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,20.0);
+  hEmpty->SetTitle("AntiPpotons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[9]->Draw("ESAME");
+  gCutListHistograms[11]->Draw("ESAME");
+  c3->SaveAs("Chi2PerITSCluster.gif");
+
+  TCanvas *c4 = new TCanvas("c4","Constrain chi2 - vertex",150,150,650,350);
+  c4->SetFillColor(10); c4->GetFrame()->SetFillColor(10);
+  c4->SetHighLightColor(10); c4->Divide(2,1);
+  c4->cd(1)->SetBottomMargin(0.2); c4->cd(1)->SetLeftMargin(0.2);
+  c4->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("log_{10}(#chi^{2}) (vertex)");
+  hEmpty->GetXaxis()->SetRangeUser(-10.0,10.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[12]->Draw("ESAME");
+  gCutListHistograms[14]->Draw("ESAME");
+  c4->cd(2)->SetBottomMargin(0.2); c4->cd(2)->SetLeftMargin(0.2);
+  c4->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("log_{10}(#chi^{2}) (vertex )");
+  hEmpty->GetXaxis()->SetRangeUser(-10.0,10.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[13]->Draw("ESAME");
+  gCutListHistograms[15]->Draw("ESAME");
+  c4->SaveAs("ConstrainChi2Vertex.gif");
+
+  TCanvas *c5 = new TCanvas("c5","Number of TPC Clusters",200,200,650,350);
+  c5->SetFillColor(10); c5->GetFrame()->SetFillColor(10);
+  c5->SetHighLightColor(10); c5->Divide(2,1);
+  c5->cd(1)->SetBottomMargin(0.2); c5->cd(1)->SetLeftMargin(0.2);
+  c5->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("N_{clusters}(TPC");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,200.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[16]->Draw("ESAME");
+  gCutListHistograms[18]->Draw("ESAME");
+  c5->cd(2)->SetBottomMargin(0.2); c5->cd(2)->SetLeftMargin(0.2);
+  c5->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("N_{clusters}(TPC");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,200.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[17]->Draw("ESAME");
+  gCutListHistograms[19]->Draw("ESAME");
+  c5->SaveAs("NTPCClusters.gif");
+
+  TCanvas *c6 = new TCanvas("c6","Chi2 per TPC cluster",250,250,650,350);
+  c6->SetFillColor(10); c6->GetFrame()->SetFillColor(10);
+  c6->SetHighLightColor(10); c6->Divide(2,1);
+  c6->cd(1)->SetBottomMargin(0.2); c6->cd(1)->SetLeftMargin(0.2);
+  c6->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#chi^{2}/N_{clusters}(TPC)");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,4.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[20]->Draw("ESAME");
+  gCutListHistograms[22]->Draw("ESAME");
+  c6->cd(2)->SetBottomMargin(0.2); c6->cd(2)->SetLeftMargin(0.2);
+  c6->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#chi^{2}/N_{clusters}(TPC)");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,4.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[21]->Draw("ESAME");
+  gCutListHistograms[23]->Draw("ESAME");
+  c6->SaveAs("Chi2PerTPCCluster.gif");
+
+  TCanvas *c7 = new TCanvas("c7","Covariance matrix 11",300,300,650,350);
+  c7->SetFillColor(10); c7->GetFrame()->SetFillColor(10);
+  c7->SetHighLightColor(10); c7->Divide(2,1);
+  c7->cd(1)->SetBottomMargin(0.2); c7->cd(1)->SetLeftMargin(0.2);
+  c7->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#sigma_{y} [cm]");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,4.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[24]->Draw("ESAME");
+  gCutListHistograms[26]->Draw("ESAME");
+  c7->cd(2)->SetBottomMargin(0.2); c7->cd(2)->SetLeftMargin(0.2);
+  c7->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#sigma_{y} [cm]");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,4.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[25]->Draw("ESAME");
+  gCutListHistograms[27]->Draw("ESAME");
+  c7->SaveAs("Cov11.gif");
+
+  TCanvas *c8 = new TCanvas("c8","Covariance matrix 22",350,350,650,350);
+  c8->SetFillColor(10); c8->GetFrame()->SetFillColor(10);
+  c8->SetHighLightColor(10); c8->Divide(2,1);
+  c8->cd(1)->SetBottomMargin(0.2); c8->cd(1)->SetLeftMargin(0.2);
+  c8->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#sigma_{z} [cm]");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,4.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[28]->Draw("ESAME");
+  gCutListHistograms[30]->Draw("ESAME");
+  c8->cd(2)->SetBottomMargin(0.2); c8->cd(2)->SetLeftMargin(0.2);
+  c8->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#sigma_{z} [cm]");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,4.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[29]->Draw("ESAME");
+  gCutListHistograms[31]->Draw("ESAME");
+  c8->SaveAs("Cov22.gif");
+
+  TCanvas *c9 = new TCanvas("c9","Covariance matrix 33",400,400,650,350);
+  c9->SetFillColor(10); c9->GetFrame()->SetFillColor(10);
+  c9->SetHighLightColor(10); c9->Divide(2,1);
+  c9->cd(1)->SetBottomMargin(0.2); c9->cd(1)->SetLeftMargin(0.2);
+  c9->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#sigma_{sin(#phi)}");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,4.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[32]->Draw("ESAME");
+  gCutListHistograms[34]->Draw("ESAME");
+  c9->cd(2)->SetBottomMargin(0.2); c9->cd(2)->SetLeftMargin(0.2);
+  c9->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#sigma_{sin(#phi)}");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,4.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[33]->Draw("ESAME");
+  gCutListHistograms[35]->Draw("ESAME");
+  c9->SaveAs("Cov33.gif");
+
+  TCanvas *c10 = new TCanvas("c10","Covariance matrix 44",450,450,650,350);
+  c10->SetFillColor(10); c10->GetFrame()->SetFillColor(10);
+  c10->SetHighLightColor(10); c10->Divide(2,1);
+  c10->cd(1)->SetBottomMargin(0.2); c10->cd(1)->SetLeftMargin(0.2);
+  c10->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#sigma_{tan(#lambda)}");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,4.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[36]->Draw("ESAME");
+  gCutListHistograms[38]->Draw("ESAME");
+  c10->cd(2)->SetBottomMargin(0.2); c10->cd(2)->SetLeftMargin(0.2);
+  c10->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#sigma_{tan(#lambda)}");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,4.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[37]->Draw("ESAME");
+  gCutListHistograms[39]->Draw("ESAME");
+  c10->SaveAs("Cov44.gif");
+
+  TCanvas *c11 = new TCanvas("c11","Covariance matrix 55",500,500,650,350);
+  c11->SetFillColor(10); c11->GetFrame()->SetFillColor(10);
+  c11->SetHighLightColor(10); c11->Divide(2,1);
+  c11->cd(1)->SetBottomMargin(0.2); c11->cd(1)->SetLeftMargin(0.2);
+  c11->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#sigma_{1/P_{T}} [GeV/c]^{-1}");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,4.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[40]->Draw("ESAME");
+  gCutListHistograms[42]->Draw("ESAME");
+  c11->cd(2)->SetBottomMargin(0.2); c11->cd(2)->SetLeftMargin(0.2);
+  c11->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("#sigma_{1/P_{T}} [GeV/c]^{-1}");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,4.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[41]->Draw("ESAME");
+  gCutListHistograms[43]->Draw("ESAME");
+  c11->SaveAs("Cov55.gif");
+
+  TCanvas *c12 = new TCanvas("c12","Number of TPC points (dE/dx)",550,550,650,350);
+  c12->SetFillColor(10); c12->GetFrame()->SetFillColor(10);
+  c12->SetHighLightColor(10); c12->Divide(2,1);
+  c12->cd(1)->SetBottomMargin(0.2); c12->cd(1)->SetLeftMargin(0.2);
+  c12->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("N_{points} (TPC-dE/dx");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,200.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[56]->Draw("ESAME");
+  gCutListHistograms[58]->Draw("ESAME");
+  c12->cd(2)->SetBottomMargin(0.2); c12->cd(2)->SetLeftMargin(0.2);
+  c12->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("N_{points} (TPC-dE/dx");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,200.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gCutListHistograms[57]->Draw("ESAME");
+  gCutListHistograms[59]->Draw("ESAME");
+  c12->SaveAs("Npoints-TPCdEdx.gif");
+
+
+  //DCA cut parameters  
+  TCanvas *c13 = new TCanvas("c13","DCA xy",600,600,650,350);
+  c13->SetFillColor(10); c13->GetFrame()->SetFillColor(10);
+  c13->SetHighLightColor(10); c13->Divide(2,1);
+  c13->cd(1)->SetBottomMargin(0.2); c13->cd(1)->SetLeftMargin(0.2);
+  c13->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("DCA_{xy} [cm]");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,20.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gDCAListHistograms[2]->Draw("ESAME");
+  //gDCAListHistograms[2]->Fit("gDCA","","esame",0.1,12);
+  gDCAListHistograms[0]->Draw("ESAME");
+  c13->cd(2)->SetBottomMargin(0.15); c13->cd(2)->SetLeftMargin(0.15);
+  c13->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("DCA_{xy} [cm]");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,20.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gDCAListHistograms[1]->Draw("ESAME");
+  gDCAListHistograms[3]->Draw("ESAME");
+  c13->SaveAs("DCAxy.gif");
+
+  TCanvas *c14 = new TCanvas("c14","DCA z",650,650,650,350);
+  c14->SetFillColor(10); c14->GetFrame()->SetFillColor(10);
+  c14->SetHighLightColor(10); c14->Divide(2,1);
+  c14->cd(1)->SetBottomMargin(0.2); c14->cd(1)->SetLeftMargin(0.2);
+  c14->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("DCA_{z} [cm]");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,20.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gDCAListHistograms[4]->Draw("ESAME");
+  gDCAListHistograms[6]->Draw("ESAME");
+  //gDCAListHistograms[6]->Fit("gDCA","","esame",0.1,12);
+  c14->cd(2)->SetBottomMargin(0.15); c14->cd(2)->SetLeftMargin(0.15);
+  c14->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("DCA_{z} [cm]");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,20.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gDCAListHistograms[5]->Draw("ESAME");
+  gDCAListHistograms[7]->Draw("ESAME");
+  c14->SaveAs("DCAz.gif");
+
+  TCanvas *c15 = new TCanvas("c15","Sigma to vertex",700,700,650,350);
+  c15->SetFillColor(10); c15->GetFrame()->SetFillColor(10);
+  c15->SetHighLightColor(10); c15->Divide(2,1);
+  c15->cd(1)->SetBottomMargin(0.2); c15->cd(1)->SetLeftMargin(0.2);
+  c15->cd(1)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("N_{#sigma}(Vertex)");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,7.0);
+  hEmpty->SetTitle("Protons");
+  hEmpty->DrawCopy();
+  gDCAListHistograms[8]->DrawCopy("ESAME");
+  gDCAListHistograms[10]->DrawCopy("ESAME");
+  c15->cd(2)->SetBottomMargin(0.15); c15->cd(2)->SetLeftMargin(0.15);
+  c15->cd(2)->SetLogy();
+  hEmpty->GetXaxis()->SetTitle("N_{#sigma}(Vertex)");
+  hEmpty->GetXaxis()->SetRangeUser(0.0,7.0);
+  hEmpty->SetTitle("Antiprotons");
+  hEmpty->DrawCopy();
+  gDCAListHistograms[9]->DrawCopy("ESAME");
+  gDCAListHistograms[11]->DrawCopy("ESAME");
+  c15->SaveAs("NSigmaToVertex.gif");
+
+
+  f->Close();
+}
index 16aac543f733a4e2e64da3ccf4230fe90f78d239..07d3abb4a086f2824340091c632eef4fa7ae1d2a 100644 (file)
@@ -1,4 +1,4 @@
-void runProtonAnalysisQA(const char* analysisType = "Hybrid",
+void runProtonAnalysisQA(const char* esdAnalysisType = "Hybrid",
                         const char* pidMode = "Bayesian") {
   //Macro to run the proton QA analysis tested for local, proof & GRID.
   //Local: Takes four arguments, the analysis mode, the type of the ESD 
@@ -26,9 +26,9 @@ void runProtonAnalysisQA(const char* analysisType = "Hybrid",
           esdAnalysisType,
           pidMode,
           "/home/pchrist/ALICE/Baryons/QA/Local");
-  //runProof(200000,"/COMMON/COMMON/LHC08c11_10TeV_0.5T",analysisType);
-  //runInteractive("wn.xml",analysisType);
-  runBatch("wn.xml",analysisType);
+  //runProof(200000,"/COMMON/COMMON/LHC08c11_10TeV_0.5T",esdAnalysisType);
+  //runInteractive("wn.xml",esdAnalysisType);
+  //runBatch("wn.xml",esdAnalysisType);
 
   timer.Stop();
   timer.Print();
@@ -38,7 +38,7 @@ void runProtonAnalysisQA(const char* analysisType = "Hybrid",
 void runLocal(const char* mode = "ESD",
              const char* analysisType = 0x0,
              const char* pidMode = 0x0,
-             const char* path = "/home/pchrist/ALICE/Alien/Tutorial/November2007/Tags") {
+             const char* path = 0x0) {
   TString outputFilename1 = "Protons.QA."; outputFilename1 += analysisType;
   outputFilename1 += ".root"; //main QA file
   TString outputFilename2 = "Protons.MC.QA."; outputFilename2 += analysisType;