Adding the QA plot for the pid efficiency/contamination vs the number of TPC points...
authorpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 13 Apr 2009 08:27:57 +0000 (08:27 +0000)
committerpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 13 Apr 2009 08:27:57 +0000 (08:27 +0000)
PWG2/SPECTRA/AliProtonQAAnalysis.cxx
PWG2/SPECTRA/macros/configProtonAnalysis.C
PWG2/SPECTRA/macros/drawProtonQAResults.C
PWG2/SPECTRA/macros/runProtonAnalysisQA.C

index 9bb6687..33e60cd 100644 (file)
@@ -1157,10 +1157,11 @@ void AliProtonQAAnalysis::InitEfficiencyAnalysis() {
   
   
   //ESD reconstructed tracks that were initially protons for the PID efficiency
-  TH2D *gHistESDInitYPtProtons = new TH2D("gHistESDInitYPtProtons",
-                                         ";;P_{T} [GeV/c]",
+  TH3D *gHistESDInitYPtProtons = new TH3D("gHistESDInitYPtProtons",
+                                         ";;P_{T} [GeV/c];N_{points}",
                                          fNBinsY,fMinY,fMaxY,
-                                         fNBinsPt,fMinPt,fMaxPt);
+                                         fNBinsPt,fMinPt,fMaxPt,
+                                         100,0,200);
   if(fProtonAnalysisBase->GetEtaMode()) 
     gHistESDInitYPtProtons->GetXaxis()->SetTitle("#eta");
   else 
@@ -1170,10 +1171,11 @@ void AliProtonQAAnalysis::InitEfficiencyAnalysis() {
   fEfficiencyList->Add(gHistESDInitYPtProtons);
   
   //ESD reconstructed tracks that were initially protons and were identified as protons for the PID efficiency
-  TH2D *gHistESDIdYPtProtons = new TH2D("gHistESDIdYPtProtons",
-                                       ";;P_{T} [GeV/c]",
+  TH3D *gHistESDIdYPtProtons = new TH3D("gHistESDIdYPtProtons",
+                                       ";;P_{T} [GeV/c];N_{points}",
                                        fNBinsY,fMinY,fMaxY,
-                                       fNBinsPt,fMinPt,fMaxPt);
+                                       fNBinsPt,fMinPt,fMaxPt,
+                                       100,0,200);
   if(fProtonAnalysisBase->GetEtaMode()) 
     gHistESDIdYPtProtons->GetXaxis()->SetTitle("#eta");
   else 
@@ -1183,10 +1185,11 @@ void AliProtonQAAnalysis::InitEfficiencyAnalysis() {
   fEfficiencyList->Add(gHistESDIdYPtProtons);
  
   //ESD reconstructed tracks that were identified as protons for the PID contamination
-  TH2D *gHistESDRecIdYPtProtons = new TH2D("gHistESDRecIdYPtProtons",
-                                          ";;P_{T} [GeV/c]",
+  TH3D *gHistESDRecIdYPtProtons = new TH3D("gHistESDRecIdYPtProtons",
+                                          ";;P_{T} [GeV/c];N_{points}",
                                           fNBinsY,fMinY,fMaxY,
-                                          fNBinsPt,fMinPt,fMaxPt);
+                                          fNBinsPt,fMinPt,fMaxPt,
+                                          100,0,200);
   if(fProtonAnalysisBase->GetEtaMode()) 
     gHistESDRecIdYPtProtons->GetXaxis()->SetTitle("#eta");
   else 
@@ -1196,10 +1199,11 @@ void AliProtonQAAnalysis::InitEfficiencyAnalysis() {
   fEfficiencyList->Add(gHistESDRecIdYPtProtons);
 
   //ESD reconstructed tracks that were identified as protons but were initially not protons for the PID contamination
-  TH2D *gHistESDContamYPtProtons = new TH2D("gHistESDContamYPtProtons",
-                                           ";;P_{T} [GeV/c]",
+  TH3D *gHistESDContamYPtProtons = new TH3D("gHistESDContamYPtProtons",
+                                           ";;P_{T} [GeV/c];N_{points}",
                                            fNBinsY,fMinY,fMaxY,
-                                           fNBinsPt,fMinPt,fMaxPt);
+                                           fNBinsPt,fMinPt,fMaxPt,
+                                           100,0,200);
   if(fProtonAnalysisBase->GetEtaMode()) 
     gHistESDContamYPtProtons->GetXaxis()->SetTitle("#eta");
   else 
@@ -3232,25 +3236,27 @@ void AliProtonQAAnalysis::RunPIDEfficiencyAnalysis(AliStack *const stack,
     if(!particle) continue;
     Int_t pdgcode = particle->GetPdgCode();
     
+    Int_t nTPCpoints = track->GetTPCsignalN();
+
     //pid
     if(fProtonAnalysisBase->IsProton(track)) {
       if(fProtonAnalysisBase->GetEtaMode())
-       ((TH2D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
-                                                 particle->Pt());
-      else ((TH2D *)(fEfficiencyList->At(14)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt());
+       ((TH3D *)(fEfficiencyList->At(14)))->Fill(particle->Eta(),
+                                                 particle->Pt(),nTPCpoints);
+      else ((TH3D *)(fEfficiencyList->At(14)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt(),nTPCpoints);
       if(TMath::Abs(pdgcode) == 2212) {
        if(fProtonAnalysisBase->GetEtaMode())
-         ((TH2D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
-                                                   particle->Pt());
+         ((TH3D *)(fEfficiencyList->At(13)))->Fill(particle->Eta(),
+                                                   particle->Pt(),nTPCpoints);
        else
-         ((TH2D *)(fEfficiencyList->At(13)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt());
+         ((TH3D *)(fEfficiencyList->At(13)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt(),nTPCpoints);
       }//properly identified as proton
       else {
        if(fProtonAnalysisBase->GetEtaMode())
-         ((TH2D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
-                                                   particle->Pt());
+         ((TH3D *)(fEfficiencyList->At(15)))->Fill(particle->Eta(),
+                                                   particle->Pt(),nTPCpoints);
        else
-         ((TH2D *)(fEfficiencyList->At(15)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt());
+         ((TH3D *)(fEfficiencyList->At(15)))->Fill(fProtonAnalysisBase->Rapidity(particle->Px(),particle->Py(),particle->Pz()),particle->Pt(),nTPCpoints);
       }//contamination
     }//identified as proton
   }//ESD track loop
index 21c74a0..0eb3b74 100644 (file)
@@ -51,18 +51,19 @@ AliProtonAnalysisBase *GetProtonAnalysisBaseObject(const char* analysisLevel = "
   baseAnalysis->SetAnalysisLevel(analysisLevel);
   if(analysisLevel == "ESD") {  
     baseAnalysis->SetTriggerMode(AliProtonAnalysisBase::kMB2);
+    baseAnalysis->SetMinTPCClusters(110);
+    baseAnalysis->SetMaxChi2PerTPCCluster(2.2);
+    baseAnalysis->SetMaxCov11(0.5);
+    baseAnalysis->SetMaxCov22(0.5);
+    baseAnalysis->SetMaxCov33(0.5);
+    baseAnalysis->SetMaxCov44(0.5);
+    baseAnalysis->SetMaxCov55(0.5);
+    baseAnalysis->SetMinTPCdEdxPoints(80);
     switch(esdAnalysisType) {
     case "TPC":
       baseAnalysis->SetAnalysisMode(AliProtonAnalysisBase::kTPC);
       baseAnalysis->SetPhaseSpace(10, -0.5, 0.5, 16, 0.5, 0.9);
       baseAnalysis->SetTPCpid();
-      baseAnalysis->SetMinTPCClusters(100);
-      baseAnalysis->SetMaxChi2PerTPCCluster(2.2);
-      baseAnalysis->SetMaxCov11(0.5);
-      baseAnalysis->SetMaxCov22(0.5);
-      baseAnalysis->SetMaxCov33(0.5);
-      baseAnalysis->SetMaxCov44(0.5);
-      baseAnalysis->SetMaxCov55(0.5);
       baseAnalysis->SetMaxSigmaToVertexTPC(2.0);
       //baseAnalysis->SetMaxDCAXYTPC(1.5);
       //baseAnalysis->SetMaxDCAZTPC(1.5);
@@ -71,13 +72,6 @@ AliProtonAnalysisBase *GetProtonAnalysisBaseObject(const char* analysisLevel = "
       baseAnalysis->SetAnalysisMode(AliProtonAnalysisBase::kHybrid);
       baseAnalysis->SetPhaseSpace(10, -0.5, 0.5, 16, 0.5, 0.9);
       baseAnalysis->SetTPCpid();
-      baseAnalysis->SetMinTPCClusters(110);
-      baseAnalysis->SetMaxChi2PerTPCCluster(2.2);
-      baseAnalysis->SetMaxCov11(0.5);
-      baseAnalysis->SetMaxCov22(0.5);
-      baseAnalysis->SetMaxCov33(0.5);
-      baseAnalysis->SetMaxCov44(0.5);
-      baseAnalysis->SetMaxCov55(0.5);
       baseAnalysis->SetMaxSigmaToVertex(2.0);
       /*baseAnalysis->SetMaxDCAXY(1.5);
        baseAnalysis->SetMaxDCAZ(1.5);*/
@@ -87,18 +81,11 @@ AliProtonAnalysisBase *GetProtonAnalysisBaseObject(const char* analysisLevel = "
       //baseAnalysis->SetPointOnITSLayer3();
       baseAnalysis->SetPointOnITSLayer2();
       baseAnalysis->SetPointOnITSLayer1();
-      baseAnalysis->SetMinITSClusters(5);
+      baseAnalysis->SetMinITSClusters(4);
       break;
     case "Global":
       baseAnalysis->SetAnalysisMode(AliProtonAnalysisBase::kGlobal);
       baseAnalysis->SetPhaseSpace(20, -1.0, 1.0, 48, 0.3, 1.5);
-      baseAnalysis->SetMinTPCClusters(110);
-      baseAnalysis->SetMaxChi2PerTPCCluster(2.2);
-      baseAnalysis->SetMaxCov11(0.5);
-      baseAnalysis->SetMaxCov22(0.5);
-      baseAnalysis->SetMaxCov33(0.5);
-      baseAnalysis->SetMaxCov44(0.5);
-      baseAnalysis->SetMaxCov55(0.5);
       baseAnalysis->SetMaxSigmaToVertex(2.0);
       //baseAnalysis->SetMaxDCAXY(2.0);
       //baseAnalysis->SetMaxDCAZ(2.0);
index e574c78..64a45c7 100644 (file)
@@ -1708,28 +1708,32 @@ void drawEfficiency(TList *list,
   //______________//
   //PID efficiency//
   //______________//
-  TH2D *gHistESDInitYPtProtons = (TH2D *)list->At(12);
-  TH2D *gHistESDIdYPtProtons = (TH2D *)list->At(13);
-  TH2D *gHistESDRecIdYPtProtons = (TH2D *)list->At(14);
-  TH2D *gHistESDContamYPtProtons = (TH2D *)list->At(15);
+  TH3D *gHistESDInitYPtProtons = (TH3D *)list->At(12);
+  TH3D *gHistESDIdYPtProtons = (TH3D *)list->At(13);
+  TH3D *gHistESDRecIdYPtProtons = (TH3D *)list->At(14);
+  TH3D *gHistESDContamYPtProtons = (TH3D *)list->At(15);
 
   TCanvas *c16 = new TCanvas("c16",
                             "(Anti)Proton PID efficiency vs y and pT",
                             750,750,700,400);
-  c16->SetHighLightColor(10); c16->Divide(2,1);
+  c16->SetHighLightColor(10); c16->Divide(3,1);
 
   //rapidity dependence
   //protons pid efficiency
-  TH1D *gYESDIdProtons = (TH1D *)gHistESDIdYPtProtons->ProjectionX("gYESDIdProtons",0,gHistESDIdYPtProtons->GetXaxis()->GetNbins(),"e");
-  TH1D *gYESDInitProtons = (TH1D *)gHistESDInitYPtProtons->ProjectionX("gYESDInitProtons",0,gHistESDInitYPtProtons->GetXaxis()->GetNbins(),"e");
+  //TH1D *gYESDIdProtons = (TH1D *)gHistESDIdYPtProtons->ProjectionX("gYESDIdProtons",0,gHistESDIdYPtProtons->GetXaxis()->GetNbins(),"e");
+  //TH1D *gYESDInitProtons = (TH1D *)gHistESDInitYPtProtons->ProjectionX("gYESDInitProtons",0,gHistESDInitYPtProtons->GetXaxis()->GetNbins(),"e");
+  TH1D *gYESDIdProtons = (TH1D *)gHistESDIdYPtProtons->Project3D("x");
+  TH1D *gYESDInitProtons = (TH1D *)gHistESDInitYPtProtons->Project3D("x");
   gYESDIdProtons->Divide(gYESDInitProtons);
   SetError(gYESDIdProtons,gYESDInitProtons);
   gYESDIdProtons->Scale(100.);
   gYESDIdProtons->SetMarkerStyle(kFullCircle);
 
   //protons pid contamination
-  TH1D *gYESDContamProtons = (TH1D *)gHistESDContamYPtProtons->ProjectionX("gYESDContamProtons",0,gHistESDContamYPtProtons->GetXaxis()->GetNbins(),"e");
-  TH1D *gYESDRecIdProtons = (TH1D *)gHistESDRecIdYPtProtons->ProjectionX("gYESDRecIdProtons",0,gHistESDRecIdYPtProtons->GetXaxis()->GetNbins(),"e");
+  //TH1D *gYESDContamProtons = (TH1D *)gHistESDContamYPtProtons->ProjectionX("gYESDContamProtons",0,gHistESDContamYPtProtons->GetXaxis()->GetNbins(),"e");
+  //TH1D *gYESDRecIdProtons = (TH1D *)gHistESDRecIdYPtProtons->ProjectionX("gYESDRecIdProtons",0,gHistESDRecIdYPtProtons->GetXaxis()->GetNbins(),"e");
+  TH1D *gYESDContamProtons = (TH1D *)gHistESDContamYPtProtons->Project3D("x");
+  TH1D *gYESDRecIdProtons = (TH1D *)gHistESDRecIdYPtProtons->Project3D("x");
   gYESDContamProtons->Divide(gYESDRecIdProtons);
   SetError(gYESDContamProtons,gYESDRecIdProtons);
   gYESDContamProtons->Scale(100.);
@@ -1746,16 +1750,20 @@ void drawEfficiency(TList *list,
 
   //pT dependence
   //protons pid efficiency
-  TH1D *gPtESDIdProtons = (TH1D *)gHistESDIdYPtProtons->ProjectionY("gPtESDIdProtons",0,gHistESDIdYPtProtons->GetYaxis()->GetNbins(),"e");
-  TH1D *gPtESDInitProtons = (TH1D *)gHistESDInitYPtProtons->ProjectionY("gPtESDInitProtons",0,gHistESDInitYPtProtons->GetYaxis()->GetNbins(),"e");
+  //TH1D *gPtESDIdProtons = (TH1D *)gHistESDIdYPtProtons->ProjectionY("gPtESDIdProtons",0,gHistESDIdYPtProtons->GetYaxis()->GetNbins(),"e");
+  //TH1D *gPtESDInitProtons = (TH1D *)gHistESDInitYPtProtons->ProjectionY("gPtESDInitProtons",0,gHistESDInitYPtProtons->GetYaxis()->GetNbins(),"e");
+  TH1D *gPtESDIdProtons = (TH1D *)gHistESDIdYPtProtons->Project3D("y");
+  TH1D *gPtESDInitProtons = (TH1D *)gHistESDInitYPtProtons->Project3D("y");
   gPtESDIdProtons->Divide(gPtESDInitProtons);
   SetError(gPtESDIdProtons,gPtESDInitProtons);
   gPtESDIdProtons->Scale(100.);
   gPtESDIdProtons->SetMarkerStyle(kFullCircle);
 
   //protons pid contamination
-  TH1D *gPtESDContamProtons = (TH1D *)gHistESDContamYPtProtons->ProjectionY("gPtESDContamProtons",0,gHistESDContamYPtProtons->GetYaxis()->GetNbins(),"e");
-  TH1D *gPtESDRecIdProtons = (TH1D *)gHistESDRecIdYPtProtons->ProjectionY("gPtESDRecIdProtons",0,gHistESDRecIdYPtProtons->GetYaxis()->GetNbins(),"e");
+  //TH1D *gPtESDContamProtons = (TH1D *)gHistESDContamYPtProtons->ProjectionY("gPtESDContamProtons",0,gHistESDContamYPtProtons->GetYaxis()->GetNbins(),"e");
+  //TH1D *gPtESDRecIdProtons = (TH1D *)gHistESDRecIdYPtProtons->ProjectionY("gPtESDRecIdProtons",0,gHistESDRecIdYPtProtons->GetYaxis()->GetNbins(),"e");
+  TH1D *gPtESDContamProtons = (TH1D *)gHistESDContamYPtProtons->Project3D("y");
+  TH1D *gPtESDRecIdProtons = (TH1D *)gHistESDRecIdYPtProtons->Project3D("y");
   gPtESDContamProtons->Divide(gPtESDRecIdProtons);
   SetError(gPtESDContamProtons,gPtESDRecIdProtons);
   gPtESDContamProtons->Scale(100.);
@@ -1765,11 +1773,37 @@ void drawEfficiency(TList *list,
   c16->cd(2)->SetLeftMargin(0.15); 
   c16->cd(2)->SetGridx(); c16->cd(2)->SetGridy();
   hEmpty->GetXaxis()->SetRangeUser(0.0,1.2);
-  hEmpty->GetXaxis()->SetTitle("P_{T} [GeV/c]");
+  hEmpty->GetXaxis()->SetTitle(gPtESDContamProtons->GetXaxis()->GetTitle());
   hEmpty->DrawCopy();
   gPtESDIdProtons->DrawCopy("ESAME");
   gPtESDContamProtons->DrawCopy("ESAME");
 
+  //N_points dependence
+  //protons pid efficiency
+  TH1D *gNPointsESDIdProtons = (TH1D *)gHistESDIdYPtProtons->Project3D("y");
+  TH1D *gNPointsESDInitProtons = (TH1D *)gHistESDInitYPtProtons->Project3D("y");
+  gNPointsESDIdProtons->Divide(gNPointsESDInitProtons);
+  SetError(gNPointsESDIdProtons,gNPointsESDInitProtons);
+  gNPointsESDIdProtons->Scale(100.);
+  gNPointsESDIdProtons->SetMarkerStyle(kFullCircle);
+
+  //protons pid contamination
+  TH1D *gNPointsESDContamProtons = (TH1D *)gHistESDContamYPtProtons->Project3D("z");
+  TH1D *gNPointsESDRecIdProtons = (TH1D *)gHistESDRecIdYPtProtons->Project3D("z");
+  gNPointsESDContamProtons->Divide(gNPointsESDRecIdProtons);
+  SetError(gNPointsESDContamProtons,gNPointsESDRecIdProtons);
+  gNPointsESDContamProtons->Scale(100.);
+  gNPointsESDContamProtons->SetMarkerStyle(kOpenCircle);
+
+  c16->cd(3)->SetBottomMargin(0.15); 
+  c16->cd(3)->SetLeftMargin(0.15); 
+  c16->cd(3)->SetGridx(); c16->cd(2)->SetGridy();
+  hEmpty->GetXaxis()->SetRangeUser(0.0,1.2);
+  hEmpty->GetXaxis()->SetTitle(gNPointsESDContamProtons->GetXaxis()->GetTitle());
+  hEmpty->DrawCopy();
+  gNPointsESDIdProtons->DrawCopy("ESAME");
+  gNPointsESDContamProtons->DrawCopy("ESAME");
+
   c16->SaveAs("PIDEfficiency-Protons.gif");
 
   TString outputFileName = "Reconstruction-PID-Efficiency.";
@@ -1791,6 +1825,8 @@ void drawEfficiency(TList *list,
   gYESDContamProtons->Write();
   gPtESDIdProtons->Write();
   gPtESDContamProtons->Write();
+  gNPointsESDIdProtons->Write();
+  gNPointsESDContamProtons->Write();
   fout->Close();
 }
 
index 07d3abb..376ca6e 100644 (file)
@@ -26,9 +26,9 @@ void runProtonAnalysisQA(const char* esdAnalysisType = "Hybrid",
           esdAnalysisType,
           pidMode,
           "/home/pchrist/ALICE/Baryons/QA/Local");
-  //runProof(200000,"/COMMON/COMMON/LHC08c11_10TeV_0.5T",esdAnalysisType);
-  //runInteractive("wn.xml",esdAnalysisType);
-  //runBatch("wn.xml",esdAnalysisType);
+  //runProof("ESD",esdAnalysisType,pidMode,200000,"/COMMON/COMMON/LHC08c11_10TeV_0.5T");
+  //runInteractive("ESD",esdAnalysisType,pidMode,"wn.xml");
+  //runBatch("ESD",esdAnalysisType,pidMode,"wn.xml");
 
   timer.Stop();
   timer.Print();