Proper usage of include (Andrei)
authorpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Dec 2008 11:20:04 +0000 (11:20 +0000)
committerpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Dec 2008 11:20:04 +0000 (11:20 +0000)
PWG2/AliAnalysisTaskProtons.cxx
PWG2/AliAnalysisTaskProtonsQA.cxx
PWG2/drawProtonQAResults.C

index 9ccf81e..55a2ed1 100644 (file)
@@ -20,7 +20,7 @@
 #include "AliStack.h"
 #include "AliCFContainer.h"
 
-#include "PWG2spectra/SPECTRA/AliProtonAnalysis.h"
+#include "AliProtonAnalysis.h"
 #include "AliAnalysisTaskProtons.h"
 
 // Analysis task creating a the 2d y-p_t spectrum of p and antip
index a5f4359..18034be 100644 (file)
@@ -17,7 +17,7 @@
 #include "AliMCEvent.h"
 #include "AliStack.h"
 
-#include "PWG2spectra/SPECTRA/AliProtonQAAnalysis.h"
+#include "AliProtonQAAnalysis.h"
 #include "AliAnalysisTaskProtonsQA.h"
 
 // Analysis task used for the QA of the (anti)proton analysis
@@ -87,13 +87,14 @@ void AliAnalysisTaskProtonsQA::CreateOutputObjects() {
   //proton analysis object
   fAnalysis = new AliProtonQAAnalysis();
   fAnalysis->SetRunMCAnalysis();
-  fAnalysis->SetRunEfficiencyAnalysis(kFALSE,kFALSE); //kTRUE,kTRUE for eta-pT efficiencies and if the cuts should be used in the reco and pid efficiencies
+  fAnalysis->SetRunEfficiencyAnalysis(kTRUE,kTRUE); //kTRUE,kTRUE for eta-pT efficiencies and if the cuts should be used in the reco and pid efficiencies
   //fAnalysis->SetMCProcessId(13);//4: weak decay - 13: hadronic interaction
   //fAnalysis->SetMotherParticlePDGCode(3122);//3122: Lambda
 
   //Use of TPConly tracks
   /*fAnalysis->SetQAYPtBins(10, -0.5, 0.5, 12, 0.5, 0.9); //TPC only
   fAnalysis->UseTPCOnly();
+  fAnalysis->SetTPCpid();
   fAnalysis->SetMinTPCClusters(100);
   fAnalysis->SetMaxChi2PerTPCCluster(2.2);
   fAnalysis->SetMaxCov11(0.5);
@@ -103,12 +104,12 @@ void AliAnalysisTaskProtonsQA::CreateOutputObjects() {
   fAnalysis->SetMaxCov55(0.5);
   //fAnalysis->SetMaxSigmaToVertexTPC(2.0);
   fAnalysis->SetMaxDCAXYTPC(1.5);
-  fAnalysis->SetMaxDCAZTPC(1.5);
-  fAnalysis->SetTPCpid();*/
+  fAnalysis->SetMaxDCAZTPC(1.5);*/
 
   //Use of HybridTPC tracks
-  fAnalysis->SetQAYPtBins(10, -0.5, 0.5, 12, 0.5, 0.9); //HybridTPC
+  fAnalysis->SetQAYPtBins(20, -1.0, 1.0, 26, 0.2, 1.5); //HybridTPC
   fAnalysis->UseHybridTPC();
+  fAnalysis->SetTPCpid();
   fAnalysis->SetMinTPCClusters(110);
   fAnalysis->SetMaxChi2PerTPCCluster(2.2);
   fAnalysis->SetMaxCov11(0.5);
@@ -116,16 +117,15 @@ void AliAnalysisTaskProtonsQA::CreateOutputObjects() {
   fAnalysis->SetMaxCov33(0.5);
   fAnalysis->SetMaxCov44(0.5);
   fAnalysis->SetMaxCov55(0.5);
-  fAnalysis->SetMaxSigmaToVertex(3.0);
-  fAnalysis->SetMaxDCAXY(1.5);
-  fAnalysis->SetMaxDCAZ(1.5);
-  fAnalysis->SetTPCpid();
-  fAnalysis->SetPointOnITSLayer1();
-  fAnalysis->SetPointOnITSLayer2();
-  //fAnalysis->SetPointOnITSLayer3();
-  //fAnalysis->SetPointOnITSLayer4();
-  //fAnalysis->SetPointOnITSLayer5();
+  fAnalysis->SetMaxSigmaToVertex(2.0);
+  //fAnalysis->SetMaxDCAXY(1.5);
+  //fAnalysis->SetMaxDCAZ(1.5);
   //fAnalysis->SetPointOnITSLayer6();
+  //fAnalysis->SetPointOnITSLayer5();
+  //fAnalysis->SetPointOnITSLayer4();
+  //fAnalysis->SetPointOnITSLayer3();
+  fAnalysis->SetPointOnITSLayer2();
+  fAnalysis->SetPointOnITSLayer1();
   fAnalysis->SetMinITSClusters(5);
 
   //Combined tracking
index ca91b7c..8951bfe 100644 (file)
@@ -452,6 +452,7 @@ void DrawComposition(TH3F *gHistYPtPDGProtons,
   c12->SetFillColor(10); c12->GetFrame()->SetFillColor(10); c12->Divide(2,1);
   c12->SetHighLightColor(10); c12->cd(1)->SetBottomMargin(0.15);
   c12->cd(1)->SetGridx(); c12->cd(1)->SetGridy();
+  hEmptyY->SetTitle("Protons");
   hEmptyY->DrawCopy();
   for(Int_t iParticle = 0; iParticle < 10; iParticle++) {
     //if((iParticle == 0)||(iParticle == 2)||(iParticle == 5)||(iParticle == 6)||(iParticle == 8))
@@ -469,6 +470,7 @@ void DrawComposition(TH3F *gHistYPtPDGProtons,
 
   c12->SetHighLightColor(10); c12->cd(2)->SetBottomMargin(0.15);
   c12->cd(2)->SetGridx(); c12->cd(2)->SetGridy();
+  hEmptyY->SetTitle("Antiprotons");
   hEmptyY->DrawCopy();
   for(Int_t iParticle = 0; iParticle < 10; iParticle++) {
     if((iParticle == 0)||(iParticle == 6)||(iParticle == 8))
@@ -490,20 +492,26 @@ void DrawComposition(TH3F *gHistYPtPDGProtons,
   hEmptyPt->GetXaxis()->SetTitle("P_{T} [GeV/c]");
 
   TCanvas *c13 = new TCanvas("c13",
-                           "Composition of accepted secondaries vs pT",
-                           600,600,700,400);
+                            "Composition of accepted secondaries vs pT",
+                            600,600,700,400);
   c13->SetFillColor(10); c13->GetFrame()->SetFillColor(10); c13->Divide(2,1);
   c13->SetHighLightColor(10); c13->cd(1)->SetBottomMargin(0.15);
   c13->cd(1)->SetGridx(); c13->cd(1)->SetGridy();
+  hEmptyPt->GetXaxis()->SetRangeUser(gParticleProtonPt[0]->GetXaxis()->GetXmin()-0.2,gParticleProtonPt[0]->GetXaxis()->GetXmax()+0.2);
+  hEmptyPt->SetTitle("Protons");
   hEmptyPt->DrawCopy();
   for(Int_t iParticle = 0; iParticle < 10; iParticle++) {
     if(iParticle < 5) {
-      DrawMarker(0.2, 115-5*iParticle, 20+iParticle, 1.2, 1);
-      t1->DrawLatex(0.3,113-5*iParticle,fParticleName[iParticle]);
+      DrawMarker(gParticleProtonPt[0]->GetXaxis()->GetXmin()+0.1, 
+                115-5*iParticle, 20+iParticle, 1.2, 1);
+      t1->DrawLatex(gParticleProtonPt[0]->GetXaxis()->GetXmin()+0.2,
+                   113-5*iParticle,fParticleName[iParticle]);
     }
     else {
-      DrawMarker(2.2, 115-5*(iParticle-5), 20+iParticle, 1.2, 1);
-      t1->DrawLatex(2.3,113-5*(iParticle-5),fParticleName[iParticle]);
+      DrawMarker(gParticleProtonPt[0]->GetXaxis()->GetXmax()*0.5, 
+                115-5*(iParticle-5), 20+iParticle, 1.2, 1);
+      t1->DrawLatex(gParticleProtonPt[0]->GetXaxis()->GetXmax()*0.5+0.1,
+                   113-5*(iParticle-5),fParticleName[iParticle]);
     }
     if((iParticle == 0)||(iParticle == 2)||(iParticle == 6)||(iParticle == 8))
       gParticleProtonPt[iParticle]->Draw("P");
@@ -511,15 +519,20 @@ void DrawComposition(TH3F *gHistYPtPDGProtons,
 
   c13->SetHighLightColor(10); c13->cd(2)->SetBottomMargin(0.15);
   c13->cd(2)->SetGridx(); c13->cd(2)->SetGridy();
+  hEmptyPt->SetTitle("Antiprotons");
   hEmptyPt->DrawCopy();
   for(Int_t iParticle = 0; iParticle < 10; iParticle++) {
     if(iParticle < 5) {
-      DrawMarker(0.2, 115-5*iParticle, 20+iParticle, 1.2, 1);
-      t1->DrawLatex(0.3,113-5*iParticle,fParticleName[iParticle]);
+      DrawMarker(gParticleProtonPt[0]->GetXaxis()->GetXmin()+0.1, 
+                115-5*iParticle, 20+iParticle, 1.2, 1);
+      t1->DrawLatex(gParticleProtonPt[0]->GetXaxis()->GetXmin()+0.2,
+                   113-5*iParticle,fParticleName[iParticle]);
     }
     else {
-      DrawMarker(2.2, 115-5*(iParticle-5), 20+iParticle, 1.2, 1);
-      t1->DrawLatex(2.3,113-5*(iParticle-5),fParticleName[iParticle]);
+      DrawMarker(gParticleProtonPt[0]->GetXaxis()->GetXmax()*0.5, 
+                115-5*(iParticle-5), 20+iParticle, 1.2, 1);
+      t1->DrawLatex(gParticleProtonPt[0]->GetXaxis()->GetXmax()*0.5+0.1,
+                   113-5*(iParticle-5),fParticleName[iParticle]);
     }
     if((iParticle == 0)||(iParticle == 6)||(iParticle == 8))
       gParticleAntiProtonPt[iParticle]->Draw("P");
@@ -638,7 +651,7 @@ void DrawContamination(TList *inputList) {
   DrawMarker(0, 55, kFullCircle, 1.2, 1);
   t1->DrawLatex(0.1,53,"Primaries");
   DrawMarker(0, 45, kOpenCircle, 1.2, 1);
-  t1->DrawLatex(0.1,43,"Secondaries");
+  t1->DrawLatex(0.1,41,"Secondaries");
 
   c7->SaveAs("Contamination-Protons-Rapidity.gif");
 
@@ -716,14 +729,15 @@ void DrawContamination(TList *inputList) {
   c8->cd(1)->SetLeftMargin(0.15); 
   c8->cd(1)->SetGridx(); c8->cd(1)->SetGridy();
   hEmptyPt->SetTitle("Protons");
+  hEmptyPt->GetXaxis()->SetRangeUser(gPtPrimaryProtonsPercentage->GetXaxis()->GetXmin()-0.2,gPtPrimaryProtonsPercentage->GetXaxis()->GetXmax()+0.2);
   hEmptyPt->DrawCopy();
   gPtPrimaryProtonsPercentage->DrawCopy("ESAME");
   gPtSecondaryProtonsPercentage->DrawCopy("ESAME");
 
-  DrawMarker(2.0, 55, kFullCircle, 1.2, 1);
-  t1->DrawLatex(2.1,53,"Primaries");
-  DrawMarker(2.0, 45, kOpenCircle, 1.2, 1);
-  t1->DrawLatex(2.1,43,"Secondaries");
+  DrawMarker(0.5, 55, kFullCircle, 1.2, 1);
+  t1->DrawLatex(0.6,53,"Primaries");
+  DrawMarker(0.5, 45, kOpenCircle, 1.2, 1);
+  t1->DrawLatex(0.6,41,"Secondaries");
 
   c8->cd(2)->SetBottomMargin(0.15); 
   c8->cd(2)->SetLeftMargin(0.15);