Update in the Comparison tasks
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Feb 2009 17:45:44 +0000 (17:45 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Feb 2009 17:45:44 +0000 (17:45 +0000)
(Jacek)

PWG1/AliComparisonDCA.cxx
PWG1/AliComparisonDCA.h
PWG1/AliComparisonDEdx.cxx
PWG1/AliComparisonDEdx.h
PWG1/AliComparisonEff.cxx
PWG1/AliComparisonEff.h
PWG1/AliComparisonRes.cxx
PWG1/AliComparisonRes.h

index ee0458f..a562039 100644 (file)
@@ -16,7 +16,8 @@
   gROOT->LoadMacro("$ALICE_ROOT/PWG1/Macros/LoadMyLibs.C");
   LoadMyLibs();
   TFile f("Output.root");
-  AliComparisonDCA * compObj = (AliComparisonDCA*)f.Get("AliComparisonDCA");
+  //AliComparisonDCA * compObj = (AliComparisonDCA*)f.Get("AliComparisonDCA");
+  AliComparisonDCA * compObj = (AliComparisonDCA*)cOutput->FindObject("AliComparisonDCA");
 
   // Analyse comparison data
   compObj->Analyse();
@@ -35,7 +36,6 @@
 #include <iostream>
 
 #include "TFile.h"
-#include "TCint.h"
 #include "TH3F.h"
 #include "TH2F.h"
 #include "TF1.h"
@@ -68,17 +68,15 @@ ClassImp(AliComparisonDCA)
 
 //_____________________________________________________________________________
 AliComparisonDCA::AliComparisonDCA():
-//  TNamed("AliComparisonDCA","AliComparisonDCA"),
   AliComparisonObject("AliComparisonDCA"),
 
   // DCA histograms
-  fD0TanSPtB1(0),
-  fD1TanSPtB1(0),
-  fD0TanSPtL1(0),
-  fD1TanSPtL1(0),
-  fD0TanSPtInTPC(0),
-  fD1TanSPtInTPC(0),
-  fVertex(0),
+  fD0TanSPtTPCITS(0),
+  fD1TanSPtTPCITS(0),
+  fD0TanSPt(0),
+  fD1TanSPt(0),
+  fD0TanSPtTPC(0),
+  fD1TanSPtTPC(0),
 
   // Cuts 
   fCutsRC(0), 
@@ -94,13 +92,12 @@ AliComparisonDCA::AliComparisonDCA():
 AliComparisonDCA::~AliComparisonDCA()
 {
   //
-  if(fD0TanSPtB1) delete fD0TanSPtB1; fD0TanSPtB1=0;
-  if(fD1TanSPtB1) delete fD1TanSPtB1; fD1TanSPtB1=0;
-  if(fD0TanSPtL1) delete fD0TanSPtL1; fD0TanSPtL1=0;
-  if(fD1TanSPtL1) delete fD1TanSPtL1; fD1TanSPtL1=0;
-  if(fD0TanSPtInTPC) delete fD0TanSPtInTPC; fD0TanSPtInTPC=0;
-  if(fD1TanSPtInTPC) delete fD1TanSPtInTPC; fD1TanSPtInTPC=0;
-  if(fVertex) delete fVertex; fVertex=0;
+  if(fD0TanSPtTPCITS) delete fD0TanSPtTPCITS; fD0TanSPtTPCITS=0;
+  if(fD1TanSPtTPCITS) delete fD1TanSPtTPCITS; fD1TanSPtTPCITS=0;
+  if(fD0TanSPt) delete fD0TanSPt; fD0TanSPt=0;
+  if(fD1TanSPt) delete fD1TanSPt; fD1TanSPt=0;
+  if(fD0TanSPtTPC) delete fD0TanSPtTPC; fD0TanSPtTPC=0;
+  if(fD1TanSPtTPC) delete fD1TanSPtTPC; fD1TanSPtTPC=0;
   if(fAnalysisFolder) delete fAnalysisFolder; fAnalysisFolder=0;
 
 }
@@ -109,35 +106,35 @@ AliComparisonDCA::~AliComparisonDCA()
 void AliComparisonDCA::Init()
 {
   // DCA histograms
-  fD0TanSPtB1 = new TH3F("DCAyTanSPtB1","DCAyTanSPt",40,-2,2, 10,0.3,3, 100,-1,1);
-  fD0TanSPtB1->SetXTitle("tan(#theta)");
-  fD0TanSPtB1->SetYTitle("#sqrt{p_{t}(GeV/c)}");
-  fD0TanSPtB1->SetZTitle("DCA_{xy}");
-
-  fD1TanSPtB1 = new TH3F("DCAzTanSPtB1","DCAzTanSPt",40,-2,2, 10,0.3,3, 100,-1,1);
-  fD1TanSPtB1->SetXTitle("tan(#theta)");
-  fD1TanSPtB1->SetYTitle("#sqrt(p_{t}(GeV/c))");
-  fD1TanSPtB1->SetZTitle("DCA_{z}");
-
-  fD0TanSPtL1 = new TH3F("DCAyTanSPtL1","DCAyTanSPt",40,-2,2, 10,0.3,3, 100,-1,1);
-  fD0TanSPtL1->SetXTitle("tan(#theta)");
-  fD0TanSPtL1->SetYTitle("#sqrt{p_{t}(GeV/c)}");
-  fD0TanSPtL1->SetZTitle("DCA_{xy}");
-
-  fD1TanSPtL1 = new TH3F("DCAzTanSPtL1","DCAzTanSPt",40,-2,2, 10,0.3,3, 100, -1,1);
-  fD1TanSPtL1->SetXTitle("tan(#theta)");
-  fD1TanSPtL1->SetYTitle("#sqrt{p_{t}(GeV/c)}");
-  fD1TanSPtL1->SetZTitle("DCA_{z}");
-
-  fD0TanSPtInTPC = new TH3F("DCAyTanSPtInTPC","DCAyTanSPt",40,-2,2, 10,0.3,3, 100,-1,1);
-  fD0TanSPtInTPC->SetXTitle("tan(#theta)");
-  fD0TanSPtInTPC->SetYTitle("#sqrt{p_{t}(GeV/c)}");
-  fD0TanSPtInTPC->SetZTitle("DCA_{xy}");
-
-  fD1TanSPtInTPC = new TH3F("DCAzTanSPtInTPC","DCAzTanSPt",40,-2,2, 10,0.3,3, 100, -1,1);
-  fD1TanSPtInTPC->SetXTitle("tan(#theta)");
-  fD1TanSPtInTPC->SetYTitle("#sqrt{p_{t}(GeV/c)}");
-  fD1TanSPtInTPC->SetZTitle("DCA_{z}");
+  fD0TanSPtTPCITS = new TH3F("DCAyTanSPtTPCITS","DCAyTanSPt",40,-2,2, 10,0.3,3, 100,-1,1);
+  fD0TanSPtTPCITS->SetXTitle("tan(#theta)");
+  fD0TanSPtTPCITS->SetYTitle("#sqrt{p_{t}(GeV)}");
+  fD0TanSPtTPCITS->SetZTitle("DCA_{xy}");
+
+  fD1TanSPtTPCITS = new TH3F("DCAzTanSPtTPCITS","DCAzTanSPt",40,-2,2, 10,0.3,3, 100,-1,1);
+  fD1TanSPtTPCITS->SetXTitle("tan(#theta)");
+  fD1TanSPtTPCITS->SetYTitle("#sqrt(p_{t}(GeV))");
+  fD1TanSPtTPCITS->SetZTitle("DCA_{z}");
+
+  fD0TanSPt = new TH3F("DCAyTanSPt","DCAyTanSPt",40,-2,2, 10,0.3,3, 100,-1,1);
+  fD0TanSPt->SetXTitle("tan(#theta)");
+  fD0TanSPt->SetYTitle("#sqrt{p_{t}(GeV)}");
+  fD0TanSPt->SetZTitle("DCA_{xy}");
+
+  fD1TanSPt = new TH3F("DCAzTanSPt","DCAzTanSPt",40,-2,2, 10,0.3,3, 100, -1,1);
+  fD1TanSPt->SetXTitle("tan(#theta)");
+  fD1TanSPt->SetYTitle("#sqrt{p_{t}(GeV)}");
+  fD1TanSPt->SetZTitle("DCA_{z}");
+
+  fD0TanSPtTPC = new TH3F("DCAyTanSPtTPC","DCAyTanSPt",40,-2,2, 10,0.3,3, 100,-1,1);
+  fD0TanSPtTPC->SetXTitle("tan(#theta)");
+  fD0TanSPtTPC->SetYTitle("#sqrt{p_{t}(GeV)}");
+  fD0TanSPtTPC->SetZTitle("DCA_{xy}");
+
+  fD1TanSPtTPC = new TH3F("DCAzTanSPtTPC","DCAzTanSPt",40,-2,2, 10,0.3,3, 100, -1,1);
+  fD1TanSPtTPC->SetXTitle("tan(#theta)");
+  fD1TanSPtTPC->SetYTitle("#sqrt{p_{t}(GeV)}");
+  fD1TanSPtTPC->SetZTitle("DCA_{z}");
 
   // init cuts
   if(!fCutsMC) 
@@ -147,12 +144,6 @@ void AliComparisonDCA::Init()
  
   // init folder
   fAnalysisFolder = CreateFolder("folderDCA","Analysis DCA Folder");
-
-  // vertex (0,0,0)
-  fVertex = new AliESDVertex();
-  fVertex->SetXv(0.0);
-  fVertex->SetYv(0.0);
-  fVertex->SetZv(0.0);
 }
 
 //_____________________________________________________________________________
@@ -185,35 +176,36 @@ void AliComparisonDCA::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
   if (!infoRC->GetESDtrack()->GetConstrainedParam()) return;
 
   // calculate and set prim. vertex
-  fVertex->SetXv( infoMC->GetParticle().Vx() - dv[0] );
-  fVertex->SetYv( infoMC->GetParticle().Vy() - dv[1] );
-  fVertex->SetZv( infoMC->GetParticle().Vz() - dv[2] );
+  AliESDVertex vertexMC;
+  vertexMC.SetXv( infoMC->GetParticle().Vx() - dv[0] );
+  vertexMC.SetYv( infoMC->GetParticle().Vy() - dv[1] );
+  vertexMC.SetZv( infoMC->GetParticle().Vz() - dv[2] );
 
   // calculate track parameters at vertex
   if (infoRC->GetESDtrack()->GetTPCInnerParam())
   {
     if ((track = new AliExternalTrackParam(*infoRC->GetESDtrack()->GetTPCInnerParam())) != 0 )
     {
-      Bool_t bDCAStatus = track->PropagateToDCA(fVertex,field,kMaxD,dca,cov);
+      Bool_t bDCAStatus = track->PropagateToDCA(&vertexMC,field,kMaxD,dca,cov);
 
       if(bDCAStatus) {
-        fD0TanSPtInTPC->Fill(tantheta,spt,dca[0]);
-        fD1TanSPtInTPC->Fill(tantheta,spt,dca[1]);
+        fD0TanSPtTPC->Fill(tantheta,spt,dca[0]);
+        fD1TanSPtTPC->Fill(tantheta,spt,dca[1]);
          }
 
          delete track;
     }
   }
   
- // ITS + TPC
  infoRC->GetESDtrack()->GetImpactParameters(dca1,cov1);
 
- if(infoRC->GetESDtrack()->GetITSclusters(clusterITS)==0){
-    fD0TanSPtB1->Fill(tantheta,spt,dca1[0]);
-    fD1TanSPtB1->Fill(tantheta,spt,dca1[1]);
+ // ITS + TPC
+ if(infoRC->GetESDtrack()->GetITSclusters(clusterITS)>fCutsRC->GetMinNClustersITS()){
+    fD0TanSPtTPCITS->Fill(tantheta,spt,dca1[0]);
+    fD1TanSPtTPCITS->Fill(tantheta,spt,dca1[1]);
   }
-    fD0TanSPtL1->Fill(tantheta,spt,dca1[0]);
-    fD1TanSPtL1->Fill(tantheta,spt,dca1[1]);
+    fD0TanSPt->Fill(tantheta,spt,dca1[0]);
+    fD1TanSPt->Fill(tantheta,spt,dca1[1]);
 }
 
 //_____________________________________________________________________________
@@ -238,12 +230,12 @@ Long64_t AliComparisonDCA::Merge(TCollection* list)
     if (entry == 0) continue; 
     
 
-    fD0TanSPtB1->Add(entry->fD0TanSPtB1);
-    fD1TanSPtB1->Add(entry->fD1TanSPtB1);
-    fD0TanSPtL1->Add(entry->fD0TanSPtL1);
-    fD1TanSPtL1->Add(entry->fD1TanSPtL1);
-    fD0TanSPtInTPC->Add(entry->fD0TanSPtInTPC);
-    fD1TanSPtInTPC->Add(entry->fD1TanSPtInTPC);
+    fD0TanSPtTPCITS->Add(entry->fD0TanSPtTPCITS);
+    fD1TanSPtTPCITS->Add(entry->fD1TanSPtTPCITS);
+    fD0TanSPt->Add(entry->fD0TanSPt);
+    fD1TanSPt->Add(entry->fD1TanSPt);
+    fD0TanSPtTPC->Add(entry->fD0TanSPtTPC);
+    fD1TanSPtTPC->Add(entry->fD1TanSPtTPC);
 
     count++;
   }
@@ -267,8 +259,8 @@ void AliComparisonDCA::Analyse()
   
   TH1::AddDirectory(kFALSE);
 
-  TGraph * gr[4]= { 0,0,0,0 };
-  TGraph2D *gr2[4]= { 0,0,0,0};
+  TGraph * gr[8]= { 0,0,0,0,0,0,0,0 };
+  TGraph2D *gr2[8]= { 0,0,0,0,0,0,0,0};
   AliComparisonDCA * comp=this;
   TObjArray *aFolderObj = new TObjArray;
 
@@ -280,90 +272,191 @@ void AliComparisonDCA::Analyse()
   // DCA resolution
   //
   c->cd(1);
-  gr[0] = AliMathBase::MakeStat1D(comp->fD0TanSPtB1,2,5);
+  gr[0] = AliMathBase::MakeStat1D(comp->fD0TanSPtTPC,2,5);
   gr[0]->GetXaxis()->SetTitle("Tan(#theta)");
   gr[0]->GetYaxis()->SetTitle("#sigmaDCA_xy (cm)");
-  gr[0]->SetName("DCAXYResolTan");
+  gr[0]->SetName("DCAXYResolTanTPC");
+  gr[0]->SetTitle("resol. DCA_xy (TPC only)");
   gr[0]->Draw("Al*");
 
   aFolderObj->Add(gr[0]);
 
   c->cd(2);
-  gr[1] = AliMathBase::MakeStat1D(comp->fD1TanSPtB1,2,5);
+  gr[1] = AliMathBase::MakeStat1D(comp->fD1TanSPtTPC,2,5);
   gr[1]->GetXaxis()->SetTitle("Tan(#theta)");
   gr[1]->GetYaxis()->SetTitle("#sigmaDCA_z (cm)");
-  gr[1]->SetName("DCAZResolTan");
+  gr[1]->SetName("DCAZResolTanTPC");
+  gr[1]->SetTitle("resol. DCA_z (TPC only)");
   gr[1]->Draw("Al*");
 
   aFolderObj->Add(gr[1]);
 
-  //
-  // DCA mean value
-  //
   c->cd(3);
-  gr[2] = AliMathBase::MakeStat1D(comp->fD0TanSPtB1,2,4);
+  gr[2] = AliMathBase::MakeStat1D(comp->fD0TanSPtTPCITS,2,5);
   gr[2]->GetXaxis()->SetTitle("Tan(#theta)");
-  gr[2]->GetYaxis()->SetTitle("mean DCA_xy (cm)");
-  gr[2]->SetName("DCAXYMeanTan");
+  gr[2]->GetYaxis()->SetTitle("#sigmaDCA_xy (cm)");
+  gr[2]->SetName("DCAXYResolTanTPCITS");
+  gr[2]->SetTitle("resol. DCA_xy (TPC+ITS)");
   gr[2]->Draw("Al*");
 
   aFolderObj->Add(gr[2]);
 
   c->cd(4);
-  gr[3] = AliMathBase::MakeStat1D(comp->fD1TanSPtB1,2,4);
+  gr[3] = AliMathBase::MakeStat1D(comp->fD1TanSPtTPCITS,2,5);
   gr[3]->GetXaxis()->SetTitle("Tan(#theta)");
-  gr[3]->GetYaxis()->SetTitle("mean DCA_z (cm)");
-  gr[3]->SetName("DCAZMeanTan");
+  gr[3]->GetYaxis()->SetTitle("#sigmaDCA_z (cm)");
+  gr[3]->SetName("DCAZResolTanTPCITS");
+  gr[3]->SetTitle("resol. DCA_z (TPC+ITS)");
   gr[3]->Draw("Al*");
 
   aFolderObj->Add(gr[3]);
 
-  // 2D DCA resolution 
+  //
+  // DCA mean value
+  //
   c->cd(5);
-  gr2[0] = AliMathBase::MakeStat2D(comp->fD0TanSPtB1,4,2,5); 
+  gr[4] = AliMathBase::MakeStat1D(comp->fD0TanSPtTPC,2,4);
+  gr[4]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr[4]->GetYaxis()->SetTitle("mean DCA_xy (cm)");
+  gr[4]->SetName("DCAXYMeanTanTPC");
+  gr[4]->SetTitle("mean DCA_xy (TPC only)");
+  gr[4]->Draw("Al*");
+
+  aFolderObj->Add(gr[4]);
+
+  c->cd(6);
+  gr[5] = AliMathBase::MakeStat1D(comp->fD1TanSPtTPC,2,4);
+  gr[5]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr[5]->GetYaxis()->SetTitle("mean DCA_z (cm)");
+  gr[5]->SetName("DCAZMeanTanTPC");
+  gr[5]->SetTitle("mean DCA_z (TPC only)");
+  gr[5]->Draw("Al*");
+
+  aFolderObj->Add(gr[5]);
+
+  c->cd(7);
+  gr[6] = AliMathBase::MakeStat1D(comp->fD0TanSPtTPCITS,2,4);
+  gr[6]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr[6]->GetYaxis()->SetTitle("mean DCA_xy (cm)");
+  gr[6]->SetName("DCAXYMeanTanTPCITS");
+  gr[6]->SetTitle("mean DCA_xy (TPC+ITS)");
+  gr[6]->Draw("Al*");
+
+  aFolderObj->Add(gr[6]);
+
+  c->cd(8);
+  gr[7] = AliMathBase::MakeStat1D(comp->fD1TanSPtTPCITS,2,4);
+  gr[7]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr[7]->GetYaxis()->SetTitle("mean DCA_z (cm)");
+  gr[7]->SetName("DCAZMeanTanTPCITS");
+  gr[7]->SetTitle("mean DCA_z (TPC+ITS)");
+  gr[7]->Draw("Al*");
+
+  aFolderObj->Add(gr[7]);
+
+  // 2D DCA resolution 
+  TCanvas * c1 = new TCanvas("canDCA1","2D DCA resolution");
+  c1->Divide(2,4);
+
+  // TPC only
+  c1->cd(1);
+  gr2[0] = AliMathBase::MakeStat2D(comp->fD0TanSPtTPC,4,2,5); 
   gr2[0]->GetXaxis()->SetTitle("Tan(#theta)");
-  gr2[0]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV/c)}");
+  gr2[0]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV)}");
   gr2[0]->GetZaxis()->SetTitle("#sigmaDCA_xy (cm)");
-  gr2[0]->SetName("DCAXYResolSPTTan");
+  gr2[0]->SetName("DCAXYResolSPTTanTPC");
+  gr2[0]->SetTitle("#sigma DCA_xy (TPC only)");
   gr2[0]->GetHistogram()->Draw("colz");
 
-  gr2[0]->GetHistogram()->SetName("DCAXYResolSPTTan");
+  gr2[0]->GetHistogram()->SetName("DCAXYResolSPTTanTPC");
   aFolderObj->Add(gr2[0]->GetHistogram());
 
-  c->cd(6);
-  gr2[1] = AliMathBase::MakeStat2D(comp->fD1TanSPtB1,4,2,5); 
+  c1->cd(2);
+  gr2[1] = AliMathBase::MakeStat2D(comp->fD1TanSPtTPC,4,2,5); 
   gr2[1]->GetXaxis()->SetTitle("Tan(#theta)");
-  gr2[1]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV/c)}");
+  gr2[1]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV)}");
   gr2[1]->GetZaxis()->SetTitle("#sigmaDCA_z (cm)");
-  gr2[1]->SetName("DCAZResolSPTTan");
+  gr2[1]->SetName("DCAZResolSPTTanTPC");
+  gr2[1]->SetTitle("#sigma DCA_z (TPC only)");
   gr2[1]->GetHistogram()->Draw("colz");
 
-  gr2[1]->GetHistogram()->SetName("DCAZResolSPTTan");
+  gr2[1]->GetHistogram()->SetName("DCAZResolSPTTanTPC");
   aFolderObj->Add(gr2[1]->GetHistogram());
 
-  // 2D DCA mean value  
-  c->cd(7);
-  gr2[2] = AliMathBase::MakeStat2D(comp->fD0TanSPtB1,4,2,4); 
+  // TPC+ITS
+  c1->cd(3);
+  gr2[2] = AliMathBase::MakeStat2D(comp->fD0TanSPtTPCITS,4,2,5); 
   gr2[2]->GetXaxis()->SetTitle("Tan(#theta)");
-  gr2[2]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV/c)}");
-  gr2[2]->GetZaxis()->SetTitle("mean DCA_xy (cm)");
-  gr2[2]->SetName("DCAXYMeanSPTTan");
+  gr2[2]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV)}");
+  gr2[2]->GetZaxis()->SetTitle("#sigmaDCA_xy (cm)");
+  gr2[2]->SetName("DCAXYResolSPTTanTPCITS");
+  gr2[2]->SetTitle("#sigma DCA_xy (TPC+ITS)");
   gr2[2]->GetHistogram()->Draw("colz");
 
-  gr2[2]->GetHistogram()->SetName("DCAXYMeanSPTTan");
+  gr2[2]->GetHistogram()->SetName("DCAXYResolSPTTanTPCITS");
   aFolderObj->Add(gr2[2]->GetHistogram());
 
-  c->cd(8);
-  gr2[3] = AliMathBase::MakeStat2D(comp->fD1TanSPtB1,4,2,4); 
+  c1->cd(4);
+  gr2[3] = AliMathBase::MakeStat2D(comp->fD1TanSPtTPCITS,4,2,5); 
   gr2[3]->GetXaxis()->SetTitle("Tan(#theta)");
-  gr2[3]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV/c)}");
-  gr2[3]->GetZaxis()->SetTitle("mean DCA_z (cm)");
-  gr2[3]->SetName("DCAZMeanSPTTan");
+  gr2[3]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV)}");
+  gr2[3]->GetZaxis()->SetTitle("#sigmaDCA_z (cm)");
+  gr2[3]->SetName("DCAZResolSPTTanTPCITS");
+  gr2[3]->SetTitle("#sigma DCA_z (TPC+ITS)");
   gr2[3]->GetHistogram()->Draw("colz");
 
-  gr2[3]->GetHistogram()->SetName("DCAZMeanSPTTan");
+  gr2[3]->GetHistogram()->SetName("DCAZResolSPTTanTPCITS");
   aFolderObj->Add(gr2[3]->GetHistogram());
 
+  // 2D DCA mean value  
+  c1->cd(5);
+  gr2[4] = AliMathBase::MakeStat2D(comp->fD0TanSPtTPC,4,2,4); 
+  gr2[4]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr2[4]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV)}");
+  gr2[4]->GetZaxis()->SetTitle("mean DCA_xy (cm)");
+  gr2[4]->SetName("DCAXYMeanSPTTanTPC");
+  gr2[4]->SetTitle("mean DCA_xy (TPC only)");
+  gr2[4]->GetHistogram()->Draw("colz");
+
+  gr2[4]->GetHistogram()->SetName("DCAXYMeanSPTTanTPC");
+  aFolderObj->Add(gr2[4]->GetHistogram());
+
+  c1->cd(6);
+  gr2[5] = AliMathBase::MakeStat2D(comp->fD1TanSPtTPC,4,2,4); 
+  gr2[5]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr2[5]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV)}");
+  gr2[5]->GetZaxis()->SetTitle("mean DCA_z (cm)");
+  gr2[5]->SetName("DCAZMeanSPTTanTPC");
+  gr2[5]->SetTitle("mean DCA_z (TPC only)");
+  gr2[5]->GetHistogram()->Draw("colz");
+
+  gr2[5]->GetHistogram()->SetName("DCAZMeanSPTTanTPC");
+  aFolderObj->Add(gr2[5]->GetHistogram());
+
+  c1->cd(7);
+  gr2[6] = AliMathBase::MakeStat2D(comp->fD0TanSPtTPCITS,4,2,4); 
+  gr2[6]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr2[6]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV)}");
+  gr2[6]->GetZaxis()->SetTitle("mean DCA_xy (cm)");
+  gr2[6]->SetName("DCAXYMeanSPTTanTPCITS");
+  gr2[6]->SetTitle("mean DCA_xy (TPC+ITS)");
+  gr2[6]->GetHistogram()->Draw("colz");
+
+  gr2[6]->GetHistogram()->SetName("DCAXYMeanSPTTanTPCITS");
+  aFolderObj->Add(gr2[6]->GetHistogram());
+
+  c1->cd(8);
+  gr2[7] = AliMathBase::MakeStat2D(comp->fD1TanSPtTPCITS,4,2,4); 
+  gr2[7]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr2[7]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV)}");
+  gr2[7]->GetZaxis()->SetTitle("mean DCA_z (cm)");
+  gr2[7]->SetName("DCAZMeanSPTTanTPCITS");
+  gr2[7]->SetTitle("mean DCA_z (TPC+ITS)");
+  gr2[7]->GetHistogram()->Draw("colz");
+
+  gr2[7]->GetHistogram()->SetName("DCAZMeanSPTTanTPCITS");
+  aFolderObj->Add(gr2[7]->GetHistogram());
+
   // export objects to analysis folder
   fAnalysisFolder = ExportToFolder(aFolderObj);
 
index 95e9521..db34a0f 100644 (file)
@@ -65,16 +65,22 @@ public :
   AliRecInfoCuts*  GetAliRecInfoCuts() const {return fCutsRC;}
   AliMCInfoCuts*   GetAliMCInfoCuts()  const {return fCutsMC;}
 
+  // getters
+  TH3F  *GetD0TanSPtTPCITS() {return fD0TanSPtTPCITS;}
+  TH3F  *GetD1TanSPtTPCITS() {return fD1TanSPtTPCITS;}
+  TH3F  *GetD0TanSPt() {return fD0TanSPt;}
+  TH3F  *GetD1TanSPt() {return fD1TanSPt;}
+  TH3F  *GetD0TanSPtTPC() {return fD0TanSPtTPC;}
+  TH3F  *GetD1TanSPtTPC() {return fD1TanSPtTPC;}
+
 private:
   // DCA resolution
-  TH3F  *fD0TanSPtB1;     //-> distance to vertex y (no ITS clusters) 
-  TH3F  *fD1TanSPtB1;     //-> distance to vertex z (no ITS clusters) 
-  TH3F  *fD0TanSPtL1;     //-> distance to vertex y  
-  TH3F  *fD1TanSPtL1;     //-> distance to vertex z 
-  TH3F  *fD0TanSPtInTPC;  //-> distance to vertex y (Inner TPC track parameters) 
-  TH3F  *fD1TanSPtInTPC;  //-> distance to vertex z (Inner TPC track parameters)
-
-  AliESDVertex *fVertex;  //! 
+  TH3F  *fD0TanSPtTPCITS; //-> distance to vertex y (TPC+ITS clusters) 
+  TH3F  *fD1TanSPtTPCITS; //-> distance to vertex z (TPC+ITS clusters) 
+  TH3F  *fD0TanSPt;     //-> distance to vertex y  
+  TH3F  *fD1TanSPt;     //-> distance to vertex z 
+  TH3F  *fD0TanSPtTPC;  //-> distance to vertex y (only TPC track parameters) 
+  TH3F  *fD1TanSPtTPC;  //-> distance to vertex z (only TPC track parameters)
 
   // Global cuts objects
   AliRecInfoCuts*  fCutsRC; // selection cuts for reconstructed tracks
index effcda2..175079f 100644 (file)
@@ -16,7 +16,8 @@
   gROOT->LoadMacro("$ALICE_ROOT/PWG1/Macros/LoadMyLibs.C");
   LoadMyLibs();
   TFile f("Output.root");
-  AliComparisonDEdx * compObj = (AliComparisonDEdx*)f.Get("AliComparisonDEdx");
+  //AliComparisonDEdx * compObj = (AliComparisonDEdx*)f.Get("AliComparisonDEdx");
+  AliComparisonDEdx * compObj = (AliComparisonDEdx*)cOutput->FindObject("AliComparisonDEdx");
 
   // Analyse comparison data
   compObj->Analyse();
index 5d5f8dd..1b40d8b 100644 (file)
@@ -74,6 +74,17 @@ public :
 
   static TH1F*     MakeResol(TH2F * his, Int_t integ, Bool_t type); 
 
+  //
+  // TPC dE/dx 
+  TH2F* GetTPCSignalNormTan() {return fTPCSignalNormTan;}
+  TH2F* GetTPCSignalNormSPhi() {return fTPCSignalNormSPhi;}
+  TH2F* GetTPCSignalNormTPhi() {return fTPCSignalNormTPhi;}
+  //
+  TH3F* GetTPCSignalNormTanSPhi() {return fTPCSignalNormTanSPhi;}
+  TH3F* GetTPCSignalNormTanTPhi() {return fTPCSignalNormTanTPhi;}
+  TH3F* GetTPCSignalNormTanSPt() {return fTPCSignalNormTanSPt;}
+  
+
 private:
 
   // TPC dE/dx 
index 9cce74d..e769ed6 100644 (file)
@@ -16,7 +16,8 @@
   gROOT->LoadMacro("$ALICE_ROOT/PWG1/Macros/LoadMyLibs.C");\r
   LoadMyLibs();\r
   TFile f("Output.root");\r
-  AliComparisonEff * compObj = (AliComparisonEff*)f.Get("AliComparisonEff");\r
+  //AliComparisonEff * compObj = (AliComparisonEff*)f.Get("AliComparisonEff");\r
+  AliComparisonEff * compObj = (AliComparisonEff*)cOutput->FindObject("AliComparisonEff");\r
 \r
   // Analyse comparison data\r
   compObj->Analyse();\r
@@ -104,6 +105,9 @@ AliComparisonEff::AliComparisonEff():
   fEffTPCPtTan(0),\r
   fEffTPCPtTanMC(0),\r
   fEffTPCPtTanF(0),\r
+  // TPC+ITS\r
+  fEffTPCITSPt(0),\r
+  fEffTPCITSTan(0),\r
 \r
   // Cuts \r
   fCutsRC(0), \r
@@ -177,6 +181,9 @@ AliComparisonEff::~AliComparisonEff(){
   if(fEffTPCPtTanMC) delete  fEffTPCPtTanMC; fEffTPCPtTanMC=0;\r
   if(fEffTPCPtTanF)  delete  fEffTPCPtTanF;  fEffTPCPtTanF=0;\r
 \r
+  if(fEffTPCITSPt)   delete  fEffTPCITSPt;   fEffTPCITSPt=0;\r
+  if(fEffTPCITSTan)   delete  fEffTPCITSTan;   fEffTPCITSTan=0;\r
+\r
   for(Int_t i=0; i<4; ++i)\r
   {\r
     if(fTPCPtDCASigmaIdeal[i]) delete  fTPCPtDCASigmaIdeal[i];  fTPCPtDCASigmaIdeal[i]=0;\r
@@ -223,6 +230,12 @@ void AliComparisonEff::Init(){
   fEffTPCPt->SetXTitle("p_{t}");\r
   fEffTPCPt->SetYTitle("TPC Efficiency");\r
 \r
+// Efficiency as function of pt (TPC+ITS)\r
+  fEffTPCITSPt = new TProfile("Eff_pt_TPCITS","Eff_Pt_TPCITS",50,0.1,3);           \r
+  fEffTPCITSPt->SetXTitle("p_{t}");\r
+  fEffTPCITSPt->SetYTitle("TPCITS Efficiency");\r
+\r
+\r
   fEffTPCPtMC = new TProfile("MC_Eff_pt","MC_Eff_Pt",50,0.1,3);   \r
   fEffTPCPtMC->SetXTitle("p_{t}");\r
   fEffTPCPtMC->SetYTitle("MC TPC Efficiency");\r
@@ -275,6 +288,12 @@ void AliComparisonEff::Init(){
   fEffTPCTan->SetXTitle("tan(#theta)");\r
   fEffTPCTan->SetYTitle("TPC Efficiency");\r
 \r
+// Efficiency as function of tan(theta) (TPC+ITS)\r
+  fEffTPCITSTan = new TProfile("Eff_tan_TPCITS","Eff_tan_TPCITS",50,-2.5,2.5);         \r
+  fEffTPCITSTan->SetXTitle("tan(#theta)");\r
+  fEffTPCITSTan->SetYTitle("TPCITS Efficiency");\r
+\r
+\r
   fEffTPCTanMC = new TProfile("MC_Eff_tan","MC_Eff_tan",50,-2.5,2.5); \r
   fEffTPCTanMC->SetXTitle("tan(#theta)");\r
   fEffTPCTanMC->SetYTitle("MC TPC Efficiency");\r
@@ -347,16 +366,17 @@ void AliComparisonEff::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
   AliExternalTrackParam *track = 0;\r
   Double_t field      = AliTracker::GetBz(); // nominal Bz field [kG]\r
   Double_t kMaxD      = 123456.0; // max distance\r
+  Int_t clusterITS[200];\r
 \r
   // systematics\r
   const Double_t kSigma2Full_xy  = 0.25; // ExB full systematics  [cm]\r
   const Double_t kSigma2Full_z  =  5.0;  // drift velocity (goofie) [cm] \r
 \r
   const Double_t kSigma2Day0_xy  = 0.02; //  ExB  [cm]\r
-  const Double_t kSigma2Day0_z  =  0.1;  //   drift velocity (goofie) [cm]  \r
+  const Double_t kSigma2Day0_z  =  0.1;  //  drift velocity (goofie) [cm]  \r
 \r
   //  \r
-  Double_t     DCASigmaIdeal=0;\r
+  Double_t  DCASigmaIdeal=0;\r
   Double_t  DCASigmaFull=0;\r
   Double_t  DCASigmaDay0=0;\r
 \r
@@ -536,6 +556,8 @@ void AliComparisonEff::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
     if (infoMC->GetRowsWithDigits()>fCutsMC->GetMinRowsWithDigits()){\r
       fEffTPCPtF->Fill(mcpt, infoRC->GetStatus(1)==3);\r
     }\r
+  \r
+    fEffTPCITSPt->Fill(mcpt, infoRC->GetStatus(1)==3 && (infoRC->GetESDtrack()->GetITSclusters(clusterITS)>fCutsRC->GetMinNClustersITS()));\r
 \r
     // protons\r
     if(TMath::Abs(infoMC->GetParticle().GetPdgCode())==fCutsMC->GetProt()) { \r
@@ -565,7 +587,7 @@ void AliComparisonEff::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
        if(infoMC->GetRowsWithDigits()>fCutsMC->GetMinRowsWithDigits()) {\r
          fEffTPCPtF_K->Fill(mcpt, infoRC->GetStatus(1)==3);\r
        }\r
-       }\r
+    }\r
   }\r
 \r
   // theta\r
@@ -575,6 +597,8 @@ void AliComparisonEff::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
     if (infoMC->GetRowsWithDigits()>fCutsMC->GetMinRowsWithDigits()){\r
       fEffTPCTanF->Fill(tantheta, infoRC->GetStatus(1)==3);\r
     }\r
+\r
+    fEffTPCITSTan->Fill(tantheta, infoRC->GetStatus(1)==3 && (infoRC->GetESDtrack()->GetITSclusters(clusterITS)>fCutsRC->GetMinNClustersITS()));\r
   }\r
 \r
   // pt-theta\r
@@ -643,6 +667,9 @@ Long64_t AliComparisonEff::Merge(TCollection* list)
        fEffTPCPtTanMC->Add(entry->fEffTPCPtTanMC);\r
        fEffTPCPtTanF->Add(entry->fEffTPCPtTanF);\r
     \r
+    fEffTPCITSPt->Add(entry->fEffTPCITSPt);\r
+    fEffTPCITSTan->Add(entry->fEffTPCITSTan);\r
+\r
     for(Int_t i=0; i<4; ++i)\r
     {\r
       fTPCPtDCASigmaIdeal[i]->Add(entry->fTPCPtDCASigmaIdeal[i]);\r
index f534222..a0244a3 100644 (file)
@@ -69,7 +69,55 @@ public :
   AliRecInfoCuts*  GetAliRecInfoCuts() const {return fCutsRC;} 
   AliMCInfoCuts*   GetAliMCInfoCuts()  const {return fCutsMC;}
 
-   
+  TH1F *GetMCPt() {return fMCPt;}
+  TH1F *GetMCRecPt() {return fMCRecPt;}
+  TH1F *GetMCRecPrimPt() {return fMCRecPrimPt;}
+  TH1F *GetMCRecSecPt() {return fMCRecSecPt;}
+  
+  TProfile* GetEffTPCPt() {return fEffTPCPt;}
+  TProfile* GetEffTPCITSPt() {return fEffTPCITSPt;}
+  TProfile* GetEffTPCPtMC() {return fEffTPCPtMC;}
+  TProfile* GetEffTPCPtF() {return fEffTPCPtF;}
+
+  TProfile* GetEffTPCPt_P() {return fEffTPCPt_P;}
+  TProfile* GetEffTPCPtMC_P() {return fEffTPCPtMC_P;}
+  TProfile* GetEffTPCPtF_P() {return fEffTPCPtF_P;}
+
+  TProfile* GetEffTPCPt_Pi() {return fEffTPCPt_Pi;}
+  TProfile* GetEffTPCPtMC_Pi() {return fEffTPCPtMC_Pi;}
+  TProfile* GetEffTPCPtF_Pi() {return fEffTPCPtF_Pi;}
+
+  TProfile* GetEffTPCPt_K() {return fEffTPCPt_K;}
+  TProfile* GetEffTPCPtMC_K() {return fEffTPCPtMC_K;}
+  TProfile* GetEffTPCPtF_K() {return fEffTPCPtF_K;}
+
+  //
+  TProfile* GetEffTPCTan() {return fEffTPCTan;}
+  TProfile* GetEffTPCITSTan() {return fEffTPCITSTan;}
+  TProfile* GetEffTPCTanMC() {return fEffTPCTanMC;}
+  TProfile* GetEffTPCTanF() {return fEffTPCTanF;}
+  //
+  TProfile2D* GetEffTPCPtTan() {return fEffTPCPtTan;}
+  TProfile2D* GetEffTPCPtTanMC() {return fEffTPCPtTanMC;}
+  TProfile2D* GetEffTPCPtTanF() {return fEffTPCPtTanF;}
+  
+  // idx - 0 (isPrim), idx - 1 (isPrim && infoRC->GetStatus(1)==3)
+  // idx - 2 (infoRC->GetStatus(1)==3),  idx - 3 (infoRC->GetStatus(1)==3 && !isPrim )
+  //
+  TH2F* GetTPCPtDCASigmaIdeal(Int_t i) {if(i<4) return fTPCPtDCASigmaIdeal[i]; else return 0;}
+  TH2F* GetTPCPtDCASigmaFull(Int_t i) {if(i<4) return fTPCPtDCASigmaFull[i] ; else return 0;}
+  TH2F* GetTPCPtDCASigmaDay0(Int_t i) {if(i<4) return fTPCPtDCASigmaFull[i] ; else  return 0;}
+
+  TH2F* GetTPCPtDCAXY(Int_t i) {if(i<4) return fTPCPtDCAXY[i] ; else return 0;}
+  TH2F* GetTPCPtDCAZ(Int_t i) {if(i<4) return fTPCPtDCAZ[i] ; else return 0;}
+
+  // Pid = 0 - electrons,  1 - muons, 2 - kaons, 3 - pions, 4 - protons   
+  //
+  TH3F* GetTPCPtDCASigmaIdealPid(Int_t i) {if(i<4) return fTPCPtDCASigmaIdealPid[i]; else return 0;}
+  TH3F* GetTPCPtDCASigmaFullPid(Int_t i) {if(i<4) return fTPCPtDCASigmaFullPid[i]; else return 0;}
+  TH3F* GetTPCPtDCASigmaDay0Pid(Int_t i) {if(i<4) return fTPCPtDCASigmaDay0Pid[i]; else return 0;}
+  TH3F* GetTPCPtDCAXYPid(Int_t i) {if(i<4) return fTPCPtDCAXYPid[i]; else return 0;}
+  TH3F* GetTPCPtDCAZPid(Int_t i) {if(i<4) return fTPCPtDCAZPid[i]; else return 0;}
 
 private:
 
@@ -122,6 +170,10 @@ private:
   TH3F* fTPCPtDCAXYPid[4];     //->TPC efficiency vs Pt vs DCA_XY (tan+-1)
   TH3F* fTPCPtDCAZPid[4];      //->TPC efficiency vs Pt vs DCA_Z (tan+-1)
 
+  // TPC +ITS
+  TProfile* fEffTPCITSPt;      //->TPCITS efficiency as function of Pt (tan+-1)
+  TProfile* fEffTPCITSTan;      //->TPCITS efficiency as function of Tan (pt>0.15)
+
   // Global cuts objects
   AliRecInfoCuts* fCutsRC;     // selection cuts for reconstructed tracks
   AliMCInfoCuts*  fCutsMC;     // selection cuts for MC tracks
index a06ac80..ff9f2f1 100644 (file)
@@ -17,8 +17,9 @@
   LoadMyLibs();
 
   TFile f("Output.root");
-  AliComparisonRes * compObj = (AliComparisonRes*)f.Get("AliComparisonRes");
-
+  //AliComparisonRes * compObj = (AliComparisonRes*)f.Get("AliComparisonRes");
+  AliComparisonRes * compObj = (AliComparisonRes*)cOutput->FindObject("AliComparisonRes");
   // analyse comparison data
   compObj->Analyse();
 
@@ -71,15 +72,31 @@ ClassImp(AliComparisonRes)
 AliComparisonRes::AliComparisonRes():
   AliComparisonObject("AliComparisonRes"),
 
+  // Vertices
+  fMCVertex(0),  //-> MC primary vertex
+  fRecVertex(0), //-> Reconstructed primary vertex
+
+  // global observables
+  fPhiTanPtTPC(0),
+  fPhiTanPtTPCITS(0),
+
   // Resolution 
-  fPtResolLPT(0),        // pt resolution - low pt
-  fPtResolHPT(0),        // pt resolution - high pt 
-  fPtPullLPT(0),         // pt resolution - low pt
-  fPtPullHPT(0),         // pt resolution - high pt 
-  fPhiResolTan(0),       //-> angular resolution 
-  fTanResolTan(0),       //-> angular resolution
-  fPhiPullTan(0),        //-> angular resolution
-  fTanPullTan(0),        //-> angular resolution
+
+  // TPC only
+  fPtResolTPC(0),
+  fPtPullTPC(0),
+  fPhiResolTanTPC(0),
+  fTanResolTanTPC(0),
+  fPhiPullTanTPC(0),
+  fTanPullTanTPC(0),
+
+  // TPC+ITS
+  fPtResolTPCITS(0),
+  fPtPullTPCITS(0),
+  fPhiResolTanTPCITS(0),
+  fTanResolTanTPCITS(0),
+  fPhiPullTanTPCITS(0),
+  fTanPullTanTPCITS(0),
 
   //
   // Resolution constrained param
@@ -118,9 +135,6 @@ AliComparisonRes::AliComparisonRes():
   fCThetaResolS1PtTPC(0),
   fCThetaResolS1PtTPCITS(0),
 
-  // vertex
-  fVertex(0),
   // Cuts 
   fCutsRC(0),  
   fCutsMC(0),  
@@ -129,28 +143,35 @@ AliComparisonRes::AliComparisonRes():
   fAnalysisFolder(0)
 {
   Init();
-  
-  // vertex (0,0,0)
-  fVertex = new AliESDVertex();
-  fVertex->SetXv(0.0);
-  fVertex->SetYv(0.0);
-  fVertex->SetZv(0.0);
 }
 
 //_____________________________________________________________________________
 AliComparisonRes::~AliComparisonRes(){
   
-  // Resolution histograms
-  if(fPtResolLPT) delete  fPtResolLPT; fPtResolLPT=0;     
-  if(fPtResolHPT) delete  fPtResolHPT; fPtResolHPT=0;    
-  if(fPtPullLPT)  delete  fPtPullLPT;  fPtPullLPT=0;    
-  if(fPtPullHPT)  delete  fPtPullHPT;  fPtPullHPT=0;   
+  // Vertices
+  if(fMCVertex) delete fMCVertex; fMCVertex=0;     
+  if(fRecVertex) delete fRecVertex; fRecVertex=0;     
 
-  if(fPhiResolTan)  delete  fPhiResolTan; fPhiResolTan=0;   
-  if(fTanResolTan)  delete  fTanResolTan; fTanResolTan=0;   
-  if(fPhiPullTan)  delete  fPhiPullTan; fPhiPullTan=0;   
-  if(fTanPullTan)  delete  fTanPullTan; fTanPullTan=0;   
+  // Global observables
+  //
+  if(fPhiTanPtTPC) delete fPhiTanPtTPC; fPhiTanPtTPC=0;     
+  if(fPhiTanPtTPCITS) delete fPhiTanPtTPCITS; fPhiTanPtTPCITS=0;     
 
+  // Resolution histograms
+  if(fPtResolTPC) delete fPtResolTPC; fPtResolTPC=0;     
+  if(fPtPullTPC) delete fPtPullTPC; fPtPullTPC=0;     
+  if(fPhiResolTanTPC) delete fPhiResolTanTPC; fPhiResolTanTPC=0;     
+  if(fTanResolTanTPC) delete fTanResolTanTPC; fTanResolTanTPC=0;     
+  if(fPhiPullTanTPC) delete fPhiPullTanTPC; fPhiPullTanTPC=0;     
+  if(fTanPullTanTPC) delete fTanPullTanTPC; fTanPullTanTPC=0;     
+
+  if(fPtResolTPCITS) delete fPtResolTPCITS; fPtResolTPCITS=0;     
+  if(fPtPullTPCITS) delete fPtPullTPCITS; fPtPullTPCITS=0;     
+  if(fPhiResolTanTPCITS) delete fPhiResolTanTPCITS; fPhiResolTanTPCITS=0;     
+  if(fTanResolTanTPCITS) delete fTanResolTanTPCITS; fTanResolTanTPCITS=0;     
+  if(fPhiPullTanTPCITS) delete fPhiPullTanTPCITS; fPhiPullTanTPCITS=0;     
+  if(fTanPullTanTPCITS) delete fTanPullTanTPCITS; fTanPullTanTPCITS=0;     
+  
   // Resolution histograms (constrained param)
   if(fCPhiResolTan) delete fCPhiResolTan; fCPhiResolTan=0;
   if(fCTanResolTan) delete fCTanResolTan; fCTanResolTan=0;
@@ -184,22 +205,91 @@ AliComparisonRes::~AliComparisonRes(){
   if(fCThetaResolS1PtTPC) delete fCThetaResolS1PtTPC; fCThetaResolS1PtTPC=0;
   if(fCThetaResolS1PtTPCITS) delete fCThetaResolS1PtTPCITS; fCThetaResolS1PtTPCITS=0;
 
-  if(fVertex) delete fVertex; fVertex=0;
-
   if(fAnalysisFolder) delete fAnalysisFolder; fAnalysisFolder=0;
 }
 
 //_____________________________________________________________________________
 void AliComparisonRes::Init(){
 
-  // Init histograms
+  // Control histograms
+  fMCVertex = new TH3F("MCVertex","MC vertex Xv:Yv:Zv",100,-0.05,0.05,100,-0.05,0.05,100,-10,10);
+  fMCVertex->SetXTitle("Xv [cm]");
+  fMCVertex->SetYTitle("Yv [cm]");
+  fMCVertex->SetZTitle("Zv [cm]");
+
+  fRecVertex = new TH3F("RecVertex","Rec prim. vertex Xv:Yv:Zv",100,-0.01,0.01,100,-0.01,0.01,100,-0.5,0.5);
+  fRecVertex->SetXTitle("Xv [cm]");
+  fRecVertex->SetYTitle("Yv [cm]");
+  fRecVertex->SetZTitle("Zv [cm]");
+
+  //
+  fPhiTanPtTPC = new TH3F("PhiTanPtTPC","phi vs tan#theta vs pt - TPC only",200,-3.5,3.5,50,-2,2,100,0.1,3.0);
+  fPhiTanPtTPC->SetXTitle("#phi [rad]");
+  fPhiTanPtTPC->SetYTitle("tan#theta");
+  fPhiTanPtTPC->SetZTitle("p_{t} [GeV]");
+
+  fPhiTanPtTPCITS = new TH3F("PhiTanPtTPCITS","phi vs tan#theta vs pt - TPC+ITS",200,-3.5,3.5,50,-2,2,100,0.1,3.0);
+  fPhiTanPtTPCITS->SetXTitle("#phi [rad]");
+  fPhiTanPtTPCITS->SetYTitle("tan#theta");
+  fPhiTanPtTPCITS->SetZTitle("p_{t} [GeV]");
+
+  //
+  fPtResolTPC = new TH2F("PtResolTPC","pt resol",10, 0.1,3,200,-0.2,0.2);
+  fPtResolTPC->SetXTitle("p_{t} [GeV]");
+  fPtResolTPC->SetYTitle("#Deltap_{t}/p_{t}");
+
+  fPtPullTPC = new TH2F("fPtPullTPC","pt pull",10, 0.1,3,200,-6,6);
+  fPtPullTPC->SetXTitle("p_{t} [GeV]");
+  fPtPullTPC->SetYTitle("#Deltap_{t}/#Sigma");
+
+  fPhiResolTanTPC = new TH2F("PhiResolTanTPC","PhiResolTanTPC",50, -2,2,200,-0.025,0.025);   
+  fPhiResolTanTPC->SetXTitle("tan(#theta)");
+  fPhiResolTanTPC->SetYTitle("#Delta#phi [rad]");
+
+  fTanResolTanTPC = new TH2F("TanResolTanTPC","TanResolTanTPC",50, -2,2,200,-0.025,0.025);
+  fTanResolTanTPC->SetXTitle("tan(#theta)");
+  fTanResolTanTPC->SetYTitle("#Delta#theta [rad]");
+
+  fPhiPullTanTPC = new TH2F("PhiPullTanTPC","PhiPullTanTPC",50, -2,2,200,-5,5);   
+  fPhiPullTanTPC->SetXTitle("Tan(#theta)");
+  fPhiPullTanTPC->SetYTitle("#Delta#phi/#Sigma");
+
+  fTanPullTanTPC = new TH2F("TanPullTanTPC","TanPullTanTPC",50, -2,2,200,-5,5);
+  fTanPullTanTPC->SetXTitle("Tan(#theta)");
+  fTanPullTanTPC->SetYTitle("#Delta#theta/#Sigma");
+
+  fPtResolTPCITS = new TH2F("PtResolTPCITS","pt resol",10, 0.1,3,200,-0.2,0.2);
+  fPtResolTPCITS->SetXTitle("p_{t} [GeV]");
+  fPtResolTPCITS->SetYTitle("#Deltap_{t}/p_{t}");
+
+  fPtPullTPCITS = new TH2F("fPtPullTPCITS","pt pull",10, 0.1,3,200,-6,6);
+  fPtPullTPCITS->SetXTitle("p_{t} [GeV]");
+  fPtPullTPCITS->SetYTitle("#Deltap_{t}/#Sigma");
+
+  fPhiResolTanTPCITS = new TH2F("PhiResolTanTPCITS","PhiResolTanTPCITS",50, -2,2,200,-0.025,0.025);   
+  fPhiResolTanTPCITS->SetXTitle("tan(#theta)");
+  fPhiResolTanTPCITS->SetYTitle("#Delta#phi [rad]");
+
+  fTanResolTanTPCITS = new TH2F("TanResolTanTPCITS","TanResolTanTPCITS",50, -2,2,200,-0.025,0.025);
+  fTanResolTanTPCITS->SetXTitle("tan(#theta)");
+  fTanResolTanTPCITS->SetYTitle("#Delta#theta [rad]");
+
+  fPhiPullTanTPCITS = new TH2F("PhiPullTanTPCITS","PhiPullTanTPCITS",50, -2,2,200,-5,5);   
+  fPhiPullTanTPCITS->SetXTitle("Tan(#theta)");
+  fPhiPullTanTPCITS->SetYTitle("#Delta#phi/#Sigma");
+
+  fTanPullTanTPCITS = new TH2F("TanPullTanTPCITS","TanPullTanTPCITS",50, -2,2,200,-5,5);
+  fTanPullTanTPCITS->SetXTitle("Tan(#theta)");
+  fTanPullTanTPCITS->SetYTitle("#Delta#theta/#Sigma");
+
+  // Resolution constrained param
   fCPhiResolTan = new TH2F("CPhiResolTan","CPhiResolTan",50, -2,2,200,-0.025,0.025);   
   fCPhiResolTan->SetXTitle("tan(#theta)");
-  fCPhiResolTan->SetYTitle("#Delta#phi");
+  fCPhiResolTan->SetYTitle("#Delta#phi [rad]");
 
   fCTanResolTan = new TH2F("CTanResolTan","CTanResolTan",50, -2,2,200,-0.025,0.025);
   fCTanResolTan->SetXTitle("tan(#theta)");
-  fCTanResolTan->SetYTitle("#Delta#theta");
+  fCTanResolTan->SetYTitle("#Delta#theta [rad]");
 
   fCPtResolTan=new TH2F("CPtResol","CPtResol",50, -2,2,200,-0.2,0.2);    
   fCPtResolTan->SetXTitle("Tan(#theta)");
@@ -216,39 +306,7 @@ void AliComparisonRes::Init(){
   fCPtPullTan=new TH2F("CPtPull","CPtPull",50, -2,2,200,-5,5);    
   fCPtPullTan->SetXTitle("Tan(#theta)");
   fCPtPullTan->SetYTitle("(1/mcp_{t}-1/p_{t})/#Sigma");
-
-  fPtResolLPT = new TH2F("Pt_resol_lpt","pt resol",10, 0.1,3,200,-0.2,0.2);
-  fPtResolLPT->SetXTitle("p_{t}");
-  fPtResolLPT->SetYTitle("#Deltap_{t}/p_{t}");
-
-  fPtResolHPT = new TH2F("Pt_resol_hpt","pt resol",10, 2,100,200,-0.3,0.3);  
-  fPtResolHPT->SetXTitle("p_{t}");
-  fPtResolHPT->SetYTitle("#Deltap_{t}/p_{t}");
-
-  fPtPullLPT = new TH2F("Pt_pull_lpt","pt pull",10, 0.1,3,200,-6,6);
-  fPtPullLPT->SetXTitle("p_{t}");
-  fPtPullLPT->SetYTitle("#Deltap_{t}/#Sigma");
-
-  fPtPullHPT = new TH2F("Pt_pull_hpt","pt pull",10,2,100,200,-6,6);  
-  fPtPullHPT->SetXTitle("p_{t}");
-  fPtPullHPT->SetYTitle("#Deltap_{t}/#Sigma");
   
-  fPhiResolTan = new TH2F("PhiResolTan","PhiResolTan",50, -2,2,200,-0.025,0.025);   
-  fPhiResolTan->SetXTitle("tan(#theta)");
-  fPhiResolTan->SetYTitle("#Delta#phi");
-
-  fTanResolTan = new TH2F("TanResolTan","TanResolTan",50, -2,2,200,-0.025,0.025);
-  fTanResolTan->SetXTitle("tan(#theta)");
-  fTanResolTan->SetYTitle("#Delta#theta");
-
-  fPhiPullTan = new TH2F("PhiPullTan","PhiPullTan",50, -2,2,200,-5,5);   
-  fPhiPullTan->SetXTitle("Tan(#theta)");
-  fPhiPullTan->SetYTitle("#Delta#phi/#Sigma");
-
-  fTanPullTan = new TH2F("TanPullTan","TanPullTan",50, -2,2,200,-5,5);
-  fTanPullTan->SetXTitle("Tan(#theta)");
-  fTanPullTan->SetYTitle("#Delta#theta/#Sigma");
-
   //
   // Parametrisation histograms
   // 
@@ -351,16 +409,18 @@ void AliComparisonRes::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
   AliExternalTrackParam *track = 0;
   Double_t field      = AliTracker::GetBz(); // nominal Bz field [kG]
   Double_t kMaxD      = 123456.0; // max distance
+  AliESDVertex vertexMC;  // MC primary vertex
 
   Int_t clusterITS[200];
   Double_t dca[2], cov[3]; // dca_xy, dca_z, sigma_xy, sigma_xy_z, sigma_z
 
   Float_t deltaPt, pullPt, deltaPhi,pullPhi, deltaTan, pullTan, delta1Pt2, deltaY1Pt, deltaZ1Pt, deltaPhi1Pt, deltaTheta1Pt; 
-  Float_t deltaPtTPC, pullPtTPC, deltaPhiTPC, deltaTanTPC, delta1Pt2TPC, deltaY1PtTPC, deltaZ1PtTPC, deltaPhi1PtTPC, deltaTheta1PtTPC; 
+  Float_t deltaPtTPC, pullPtTPC, deltaPhiTPC, pullPhiTPC, deltaTanTPC, pullTanTPC, delta1Pt2TPC, deltaY1PtTPC, deltaZ1PtTPC, deltaPhi1PtTPC, deltaTheta1PtTPC; 
 
   Float_t mcpt = infoMC->GetParticle().Pt();
   Float_t s1mcpt = TMath::Sqrt(1./infoMC->GetParticle().Pt());
   Float_t tantheta = TMath::Tan(infoMC->GetParticle().Theta()-TMath::Pi()*0.5);
+  Float_t eta =  infoMC->GetParticle().Eta();
 
   // distance to Prim. vertex 
   const Double_t* dv = infoMC->GetVDist(); 
@@ -374,9 +434,17 @@ void AliComparisonRes::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
   if (infoRC->GetESDtrack()->GetTPCNcls()<fCutsRC->GetMinNClustersTPC()) return;
 
   // calculate and set prim. vertex
-  fVertex->SetXv( infoMC->GetParticle().Vx() - dv[0] );
-  fVertex->SetYv( infoMC->GetParticle().Vy() - dv[1] );
-  fVertex->SetZv( infoMC->GetParticle().Vz() - dv[2] );
+  vertexMC.SetXv( infoMC->GetParticle().Vx() - dv[0] );
+  vertexMC.SetYv( infoMC->GetParticle().Vy() - dv[1] );
+  vertexMC.SetZv( infoMC->GetParticle().Vz() - dv[2] );
+
+  // Fill MC vertex histo
+  fMCVertex->Fill(vertexMC.GetXv(),vertexMC.GetYv(),vertexMC.GetZv());
+
+   
+  // Fill Rec vertex histo
+  //fRecVertex->Fill(infoRC->GetESDvertex()->GetXv(),infoRC->GetESDvertex()->GetYv(),infoRC->GetESDvertex()->GetZv());
+  //printf("Rec vertex xv %f, yv %f, zv %f \n",infoRC->GetESDvertex()->GetXv(),infoRC->GetESDvertex()->GetYv(),infoRC->GetESDvertex()->GetZv());
 
   deltaPt= (mcpt-infoRC->GetESDtrack()->Pt())/mcpt;  
   pullPt= (1/mcpt-infoRC->GetESDtrack()->OneOverPt())/TMath::Sqrt(infoRC->GetESDtrack()->GetSigma1Pt2());  
@@ -386,7 +454,7 @@ void AliComparisonRes::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
 
   deltaTan = TMath::ATan2(infoRC->GetESDtrack()->Pz(),infoRC->GetESDtrack()->Pt())-
                      TMath::ATan2(infoMC->GetParticle().Pz(),infoMC->GetParticle().Pt());
-  pullTan = deltaPhi/TMath::Sqrt(infoRC->GetESDtrack()->GetSigmaSnp2());
+  pullTan = deltaTan/TMath::Sqrt(infoRC->GetESDtrack()->GetSigmaTgl2());
 
   delta1Pt2 = (1/mcpt-infoRC->GetESDtrack()->OneOverPt())/TMath::Power(1+1/mcpt,2);       
   deltaY1Pt = (infoMC->GetParticle().Vy()-infoRC->GetESDtrack()->GetY()) / (0.2+1/mcpt);
@@ -400,18 +468,21 @@ void AliComparisonRes::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
   {
     if ((track = new AliExternalTrackParam(*infoRC->GetESDtrack()->GetTPCInnerParam())) != 0 )
     {
-      Bool_t bDCAStatus = track->PropagateToDCA(fVertex,field,kMaxD,dca,cov);
+      Bool_t bDCAStatus = track->PropagateToDCA(&vertexMC,field,kMaxD,dca,cov);
 
       // Fill parametrisation histograms (only TPC track)
       if(bDCAStatus) 
          {
+                 
                        deltaPtTPC= (mcpt-innerTPC->Pt())/mcpt;  
                        pullPtTPC= (1/mcpt-innerTPC->OneOverPt())/TMath::Sqrt(innerTPC->GetSigma1Pt2());  
                        deltaPhiTPC = TMath::ATan2(innerTPC->Py(),innerTPC->Px())-
                                                                TMath::ATan2(infoMC->GetParticle().Py(),infoMC->GetParticle().Px());
+                        pullPhiTPC = deltaPhiTPC/TMath::Sqrt(innerTPC->GetSigmaSnp2()); 
 
                        deltaTanTPC = TMath::ATan2(innerTPC->Pz(),innerTPC->Pt())-
                                                                TMath::ATan2(infoMC->GetParticle().Pz(),infoMC->GetParticle().Pt());
+                        pullTanTPC = deltaTanTPC/TMath::Sqrt(infoRC->GetESDtrack()->GetSigmaTgl2());
 
                        delta1Pt2TPC = (1/mcpt-innerTPC->OneOverPt())/TMath::Power(1+1/mcpt,2);       
                        deltaY1PtTPC= (infoMC->GetParticle().Vy()-innerTPC->GetY()) / (0.2+1/mcpt);
@@ -419,37 +490,48 @@ void AliComparisonRes::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
                        deltaPhi1PtTPC = deltaPhiTPC   / (0.1+1/mcpt);
                        deltaTheta1PtTPC = deltaTanTPC / (0.1+1/mcpt);
 
+               fPhiTanPtTPC->Fill(TMath::ATan2(innerTPC->Py(),innerTPC->Px()), 
+                                          TMath::ATan2(innerTPC->Pz(),innerTPC->Pt()),
+                                                          innerTPC->Pt()); 
+
                        f1Pt2ResolS1PtTPC->Fill(s1mcpt,delta1Pt2TPC);
                        fYResolS1PtTPC->Fill(s1mcpt,deltaY1PtTPC);
                        fZResolS1PtTPC->Fill(s1mcpt,deltaZ1PtTPC);
                        fPhiResolS1PtTPC->Fill(s1mcpt,deltaPhi1PtTPC);
                        fThetaResolS1PtTPC->Fill(s1mcpt,deltaTheta1PtTPC);
+
+               fPtResolTPC->Fill(mcpt,deltaPtTPC);
+                   fPtPullTPC->Fill(mcpt,pullPtTPC);
+                   fPhiResolTanTPC->Fill(tantheta,deltaPhiTPC);
+                   fPhiPullTanTPC->Fill(tantheta,pullPhiTPC);
+                   fTanResolTanTPC->Fill(tantheta,deltaTanTPC);
+                   fTanPullTanTPC->Fill(tantheta,pullTanTPC);
          }
          delete track;
     }
   }
 
-  // TPC and ITS (nb. of clusters >2) in the system
-  if(infoRC->GetESDtrack()->GetITSclusters(clusterITS)>2) 
+  // TPC and ITS clusters in the system
+  if(infoRC->GetESDtrack()->GetITSclusters(clusterITS)>fCutsRC->GetMinNClustersITS()) 
   {
+         fPhiTanPtTPCITS->Fill(TMath::ATan2(infoRC->GetESDtrack()->Py(),infoRC->GetESDtrack()->Px()), 
+                               TMath::ATan2(infoRC->GetESDtrack()->Pz(),infoRC->GetESDtrack()->Pt()), 
+                               infoRC->GetESDtrack()->Pt()); 
+
       f1Pt2ResolS1PtTPCITS->Fill(s1mcpt,delta1Pt2);
       fYResolS1PtTPCITS->Fill(s1mcpt,deltaY1Pt);
       fZResolS1PtTPCITS->Fill(s1mcpt,deltaZ1Pt);
       fPhiResolS1PtTPCITS->Fill(s1mcpt,deltaPhi1Pt);
       fThetaResolS1PtTPCITS->Fill(s1mcpt,deltaTheta1Pt);
-  }
-
-  // Fill histograms
-  fPtResolLPT->Fill(mcpt,deltaPt);
-  fPtResolHPT->Fill(mcpt,deltaPt);
-  fPtPullLPT->Fill(mcpt,pullPt);
-  fPtPullHPT->Fill(mcpt,pullPt);  
 
-  fPhiResolTan->Fill(tantheta,deltaPhi);
-  fPhiPullTan->Fill(tantheta,pullPhi);
-  fTanResolTan->Fill(tantheta,deltaTan);
-  fTanPullTan->Fill(tantheta,pullTan);
+         fPtResolTPCITS->Fill(mcpt,deltaPt);
+         fPtPullTPCITS->Fill(mcpt,pullPt);
 
+         fPhiResolTanTPCITS->Fill(tantheta,deltaPhi);
+         fPhiPullTanTPCITS->Fill(tantheta,pullPhi);
+         fTanResolTanTPCITS->Fill(tantheta,deltaTan);
+         fTanPullTanTPCITS->Fill(tantheta,pullTan);
+  }
 }
 
 //_____________________________________________________________________________
@@ -460,6 +542,7 @@ void AliComparisonRes::ProcessConstrained(AliMCInfo* infoMC, AliESDRecInfo *info
   AliExternalTrackParam *track = 0;
   Double_t field      = AliTracker::GetBz(); // nominal Bz field [kG]
   Double_t kMaxD      = 123456.0; // max distance
+  AliESDVertex vertexMC;  // MC primary vertex
 
   Int_t clusterITS[200];
   Double_t dca[2], cov[3]; // dca_xy, dca_z, sigma_xy, sigma_xy_z, sigma_z
@@ -476,6 +559,7 @@ void AliComparisonRes::ProcessConstrained(AliMCInfo* infoMC, AliESDRecInfo *info
   Bool_t isPrim = TMath::Sqrt(dv[0]*dv[0] + dv[1]*dv[1])<fCutsMC->GetMaxR() && TMath::Abs(dv[2])<fCutsMC->GetMaxVz();
   
   // Check selection cuts
   if (fCutsMC->IsPdgParticle(TMath::Abs(infoMC->GetParticle().GetPdgCode())) == kFALSE) return; 
   if (!isPrim) return;
   if (infoRC->GetStatus(1)!=3) return;
@@ -484,9 +568,9 @@ void AliComparisonRes::ProcessConstrained(AliMCInfo* infoMC, AliESDRecInfo *info
   if (!infoRC->GetESDtrack()->GetConstrainedParam()) return;
 
 // calculate and set prim. vertex
-  fVertex->SetXv( infoMC->GetParticle().Vx() - dv[0] );
-  fVertex->SetYv( infoMC->GetParticle().Vy() - dv[1] );
-  fVertex->SetZv( infoMC->GetParticle().Vz() - dv[2] );
+  vertexMC.SetXv( infoMC->GetParticle().Vx() - dv[0] );
+  vertexMC.SetYv( infoMC->GetParticle().Vy() - dv[1] );
+  vertexMC.SetZv( infoMC->GetParticle().Vz() - dv[2] );
 
   // constrained parameters resolution
   const AliExternalTrackParam * cparam = infoRC->GetESDtrack()->GetConstrainedParam();
@@ -512,7 +596,7 @@ void AliComparisonRes::ProcessConstrained(AliMCInfo* infoMC, AliESDRecInfo *info
   {
     if ((track = new AliExternalTrackParam(*infoRC->GetESDtrack()->GetTPCInnerParam())) != 0 )
     {
-      Bool_t bDCAStatus = track->PropagateToDCA(fVertex,field,kMaxD,dca,cov);
+      Bool_t bDCAStatus = track->PropagateToDCA(&vertexMC,field,kMaxD,dca,cov);
 
       // Fill parametrisation histograms (only TPC track)
       if(bDCAStatus) 
@@ -541,23 +625,23 @@ void AliComparisonRes::ProcessConstrained(AliMCInfo* infoMC, AliESDRecInfo *info
     }
   }
 
- // TPC and ITS (nb. of clusters >2) in the system
-  if(infoRC->GetESDtrack()->GetITSclusters(clusterITS)>2) 
+ // TPC and ITS in the system
+  if(infoRC->GetESDtrack()->GetITSclusters(clusterITS)>fCutsRC->GetMinNClustersITS()) 
   {
       fC1Pt2ResolS1PtTPCITS->Fill(s1mcpt,delta1Pt2);
       fCYResolS1PtTPCITS->Fill(s1mcpt,deltaY1Pt);
       fCZResolS1PtTPCITS->Fill(s1mcpt,deltaZ1Pt);
       fCPhiResolS1PtTPCITS->Fill(s1mcpt,deltaPhi1Pt);
       fCThetaResolS1PtTPCITS->Fill(s1mcpt,deltaTheta1Pt);
-  }
 
-  // Fill histograms
-  fCPtResolTan->Fill(tantheta,deltaPt);
-  fCPtPullTan->Fill(tantheta,pullPt);
-  fCPhiResolTan->Fill(tantheta,deltaPhi);
-  fCPhiPullTan->Fill(tantheta,pullPhi);
-  fCTanResolTan->Fill(tantheta,deltaTan);
-  fCTanPullTan->Fill(tantheta,pullTan);
+         // Fill histograms
+         fCPtResolTan->Fill(tantheta,deltaPt);
+         fCPtPullTan->Fill(tantheta,pullPt);
+         fCPhiResolTan->Fill(tantheta,deltaPhi);
+         fCPhiPullTan->Fill(tantheta,pullPhi);
+         fCTanResolTan->Fill(tantheta,deltaTan);
+         fCTanPullTan->Fill(tantheta,pullTan);
+  }
 }
  
 //_____________________________________________________________________________
@@ -597,67 +681,124 @@ void AliComparisonRes::Analyse(){
   TCanvas * c = new TCanvas("Phi resol Tan","Phi resol Tan");
   c->cd();
   //
-  hiss = comp->MakeResol(comp->fCPtResolTan,1,0);
-  hiss->SetXTitle("Tan(#theta)");
+  hiss = comp->MakeResol(comp->fPtResolTPC,1,0);
+  hiss->SetXTitle("p_{t} (GeV)");
   hiss->SetYTitle("#sigmap_{t}/p_{t}");
   hiss->Draw(); 
-  hiss->SetName("CptResolTan");
+  hiss->SetName("PtResolPtTPC");
   
   aFolderObj->Add(hiss);
 
   //
-  hiss = comp->MakeResol(comp->fPtResolLPT,1,0);
+  hiss = comp->MakeResol(comp->fPtResolTPC,1,1);
   hiss->SetXTitle("p_{t} (GeV)");
+  hiss->SetYTitle("mean #Deltap_{t}/p_{t}");
+  hiss->Draw(); 
+  hiss->SetName("PtMeanPtTPC");
+  
+  aFolderObj->Add(hiss);
+
+  //
+  hiss = comp->MakeResol(comp->fPhiResolTanTPC,1,0);
+  hiss->SetXTitle("Tan(#theta)");
+  hiss->SetYTitle("#sigma#phi (rad)");
+  hiss->Draw();
+  hiss->SetName("PhiResolTanTPC");
+
+  aFolderObj->Add(hiss);
+
+  //
+  hiss = comp->MakeResol(comp->fPhiResolTanTPC,1,1);
+  hiss->SetXTitle("Tan(#theta)");
+  hiss->SetYTitle("mean #Delta#phi (rad)");
+  hiss->Draw();
+  hiss->SetName("PhiMeanTanTPC");
+  
+
+  aFolderObj->Add(hiss);
+  //
+  hiss = comp->MakeResol(comp->fTanResolTanTPC,1,0);
+  hiss->SetXTitle("Tan(#theta)");
+  hiss->SetYTitle("#sigma#theta (rad)");
+  hiss->Draw();
+  hiss->SetName("ThetaResolTanTPC");
+  
+  aFolderObj->Add(hiss);
+
+  //
+  hiss = comp->MakeResol(comp->fTanResolTanTPC,1,1);
+  hiss->SetXTitle("Tan(#theta)");
+  hiss->SetYTitle("mean #Delta#theta (rad)");
+  hiss->Draw();
+  hiss->SetName("ThetaMeanTanTPC");
+  
+  aFolderObj->Add(hiss);
+
+  //
+  //
+  hiss = comp->MakeResol(comp->fPtResolTPCITS,1,0);
+  hiss->SetXTitle("p_{t}");
   hiss->SetYTitle("#sigmap_{t}/p_{t}");
   hiss->Draw(); 
-  hiss->SetName("PtResolPt");
+  hiss->SetName("PtResolPtTPCITS");
   
   aFolderObj->Add(hiss);
 
   //
-  hiss = comp->MakeResol(comp->fPtResolLPT,1,1);
-  hiss->SetXTitle("p_{t} (GeV)");
+  hiss = comp->MakeResol(comp->fPtResolTPCITS,1,1);
+  hiss->SetXTitle("p_{t}");
   hiss->SetYTitle("mean #Deltap_{t}/p_{t}");
   hiss->Draw(); 
-  hiss->SetName("PtMeanPt");
+  hiss->SetName("PtMeanPtTPCITS");
   
   aFolderObj->Add(hiss);
 
   //
-  hiss = comp->MakeResol(comp->fPhiResolTan,1,0);
+  hiss = comp->MakeResol(comp->fPhiResolTanTPCITS,1,0);
   hiss->SetXTitle("Tan(#theta)");
   hiss->SetYTitle("#sigma#phi (rad)");
   hiss->Draw();
-  hiss->SetName("PhiResolTan");
+  hiss->SetName("PhiResolTanTPCITS");
   
   aFolderObj->Add(hiss);
+
   //
-  hiss = comp->MakeResol(comp->fTanResolTan,1,0);
+  hiss = comp->MakeResol(comp->fPhiResolTanTPCITS,1,1);
   hiss->SetXTitle("Tan(#theta)");
-  hiss->SetYTitle("#sigma#theta (rad)");
+  hiss->SetYTitle("mean #Delta#phi (rad)");
   hiss->Draw();
-  hiss->SetName("ThetaResolTan");
+  hiss->SetName("PhiMeanTanTPCITS");
   
   aFolderObj->Add(hiss);
 
   //
-  hiss = comp->MakeResol(comp->fPhiResolTan,1,1);
+  hiss = comp->MakeResol(comp->fTanResolTanTPCITS,1,0);
   hiss->SetXTitle("Tan(#theta)");
-  hiss->SetYTitle("mean #Delta#phi (rad)");
+  hiss->SetYTitle("#sigma#theta (rad)");
   hiss->Draw();
-  hiss->SetName("PhiMeanTan");
+  hiss->SetName("ThetaResolTanTPCITS");
   
   aFolderObj->Add(hiss);
+
   //
-  hiss = comp->MakeResol(comp->fTanResolTan,1,1);
+  hiss = comp->MakeResol(comp->fTanResolTanTPCITS,1,1);
   hiss->SetXTitle("Tan(#theta)");
   hiss->SetYTitle("mean #Delta#theta (rad)");
   hiss->Draw();
-  hiss->SetName("ThetaMeanTan");
+  hiss->SetName("ThetaMeanTanTPCITS");
   
   aFolderObj->Add(hiss);
 
   //
+  //
+  hiss = comp->MakeResol(comp->fCPtResolTan,1,0);
+  hiss->SetXTitle("Tan(#theta)");
+  hiss->SetYTitle("#sigmap_{t}/p_{t}");
+  hiss->Draw(); 
+  hiss->SetName("CptResolTan");
+  
+  aFolderObj->Add(hiss);
+
   hiss = comp->MakeResol(comp->fCPhiResolTan,1,0);
   hiss->SetXTitle("Tan(#theta)");
   hiss->SetYTitle("#sigma#phi (rad)");
@@ -905,15 +1046,26 @@ Long64_t AliComparisonRes::Merge(TCollection* list)
   {
   AliComparisonRes* entry = dynamic_cast<AliComparisonRes*>(obj);
   if (entry == 0) continue; 
-
-  fPtResolLPT->Add(entry->fPtResolLPT);
-  fPtResolHPT->Add(entry->fPtResolHPT);
-  fPtPullLPT->Add(entry->fPtPullLPT);
-  fPtPullHPT->Add(entry->fPtPullHPT);
-  fPhiResolTan->Add(entry->fPhiResolTan);
-  fTanResolTan->Add(entry->fTanResolTan);
-  fPhiPullTan->Add(entry->fPhiPullTan);
-  fTanPullTan->Add(entry->fTanPullTan);
+  
+  fMCVertex->Add(entry->fMCVertex);
+  fRecVertex->Add(entry->fRecVertex);
+
+  fPhiTanPtTPC->Add(entry->fPhiTanPtTPC);
+  fPhiTanPtTPCITS->Add(entry->fPhiTanPtTPCITS);
+
+  fPtResolTPC->Add(entry->fPtResolTPC);
+  fPtPullTPC->Add(entry->fPtPullTPC);
+  fPhiResolTanTPC->Add(entry->fPhiResolTanTPC);
+  fTanResolTanTPC->Add(entry->fTanResolTanTPC);
+  fPhiPullTanTPC->Add(entry->fPhiPullTanTPC);
+  fTanPullTanTPC->Add(entry->fTanPullTanTPC);
+
+  fPtResolTPCITS->Add(entry->fPtResolTPCITS);
+  fPtPullTPCITS->Add(entry->fPtPullTPCITS);
+  fPhiResolTanTPCITS->Add(entry->fPhiResolTanTPCITS);
+  fTanResolTanTPCITS->Add(entry->fTanResolTanTPCITS);
+  fPhiPullTanTPCITS->Add(entry->fPhiPullTanTPCITS);
+  fTanPullTanTPCITS->Add(entry->fTanPullTanTPCITS);
 
   // Histograms for 1/pt parameterisation
   f1Pt2ResolS1PtTPC->Add(entry->f1Pt2ResolS1PtTPC);
index 0ea5773..64f2f8f 100644 (file)
@@ -66,19 +66,90 @@ public :
 
   static TH1F*       MakeResol(TH2F * his, Int_t integ, Bool_t type); 
 
+  // getters
+  TH3F *GetMCVertex()  { return fMCVertex; }
+  TH3F *GetRecVertex() { return fRecVertex; } 
+
+  TH3F *GetPhiTanPtTPC() { return fPhiTanPtTPC; } 
+  TH3F *GetPhiTanPtTPCITS() { return fPhiTanPtTPCITS; } 
+
+  TH2F *GetPtResolTPC()     { return fPtResolTPC; } 
+  TH2F *GetPtPullTPC()      { return fPtPullTPC; } 
+  TH2F *GetPhiResolTanTPC() { return fPhiResolTanTPC; } 
+  TH2F *GetTanResolTanTPC() { return fTanResolTanTPC; } 
+  TH2F *GetPhiPullTanTPC()  { return fPhiPullTanTPC; } 
+  TH2F *GetTanPullTanTPC()  { return fTanPullTanTPC; } 
+
+  TH2F *GetPtResolTPCITS()     { return fPtResolTPCITS; } 
+  TH2F *GetPtPullTPCITS()      { return fPtPullTPCITS; } 
+  TH2F *GetPhiResolTanTPCITS() { return fPhiResolTanTPCITS; } 
+  TH2F *GetTanResolTanTPCITS() { return fTanResolTanTPCITS; } 
+  TH2F *GetPhiPullTanTPCITS()  { return fPhiPullTanTPCITS; } 
+  TH2F *GetTanPullTanTPCITS()  { return fTanPullTanTPCITS; } 
+
+  //
+  // Resolution constrained param
+  //
+  TH2F *GetCPhiResolTan() { return fCPhiResolTan; } 
+  TH2F *GetCTanResolTan() { return fCTanResolTan; } 
+  TH2F *GetCPtResolTan()  { return fCPtResolTan; } 
+  TH2F *GetCPhiPullTan()  { return fCPhiPullTan; } 
+  TH2F *GetCTanPullTan()  { return fCTanPullTan; } 
+  TH2F *GetCPtPullTan()   { return fCPtPullTan; } 
+
+  //
+  // Histograms for track resolution parameterisation
+  //
+  TH2F *Get1Pt2ResolS1PtTPC()    { return f1Pt2ResolS1PtTPC; } 
+  TH2F *Get1Pt2ResolS1PtTPCITS() { return f1Pt2ResolS1PtTPCITS; } 
+  TH2F *GetYResolS1PtTPC()       { return fYResolS1PtTPC; } 
+  TH2F *GetYResolS1PtTPCITS()    { return fYResolS1PtTPCITS; } 
+  TH2F *GetZResolS1PtTPC()       { return fZResolS1PtTPC; } 
+  TH2F *GetZResolS1PtTPCITS()    { return fZResolS1PtTPCITS; } 
+  TH2F *GetPhiResolS1PtTPC()     { return fPhiResolS1PtTPC; } 
+  TH2F *GetPhiResolS1PtTPCITS()  { return fPhiResolS1PtTPCITS; } 
+  TH2F *GetThetaResolS1PtTPC()   { return fThetaResolS1PtTPC; } 
+  TH2F *GetThetaResolS1PtTPCITS(){ return fThetaResolS1PtTPCITS; } 
+
+  // constrained
+  //
+  TH2F *GetC1Pt2ResolS1PtTPC()    { return fC1Pt2ResolS1PtTPC; } 
+  TH2F *GetC1Pt2ResolS1PtTPCITS() { return fC1Pt2ResolS1PtTPCITS; } 
+  TH2F *GetCYResolS1PtTPC()       { return fCYResolS1PtTPC; } 
+  TH2F *GetCYResolS1PtTPCITS()    { return fCYResolS1PtTPCITS; } 
+  TH2F *GetCZResolS1PtTPC()       { return fCZResolS1PtTPC; } 
+  TH2F *GetCZResolS1PtTPCITS()    { return fCZResolS1PtTPCITS; } 
+  TH2F *GetCPhiResolS1PtTPC()     { return fCPhiResolS1PtTPC; } 
+  TH2F *GetCPhiResolS1PtTPCITS()  { return fCPhiResolS1PtTPCITS; } 
+  TH2F *GetCThetaResolS1PtTPC()   { return fCThetaResolS1PtTPC; } 
+  TH2F *GetCThetaResolS1PtTPCITS(){ return fCThetaResolS1PtTPCITS; } 
 
 private:
   //
   // Control histograms
   //
-  TH2F *fPtResolLPT;        //-> pt resolution - low pt
-  TH2F *fPtResolHPT;        //-> pt resolution - high pt 
-  TH2F *fPtPullLPT;         //-> pt resolution - low pt
-  TH2F *fPtPullHPT;         //-> pt resolution - high pt 
-  TH2F *fPhiResolTan;       //-> angular resolution 
-  TH2F *fTanResolTan;       //-> angular resolution
-  TH2F *fPhiPullTan;        //-> angular resolution
-  TH2F *fTanPullTan;        //-> angular resolution
+
+  TH3F *fMCVertex;  //-> MC primary vertex 
+  TH3F *fRecVertex; //-> Reconstructed primary vertex
+
+  TH3F *fPhiTanPtTPC; //-> phi vs tantheta vs pt
+  TH3F *fPhiTanPtTPCITS; //-> phi vs tantheta vs pt
+
+  // TPC only
+  TH2F *fPtResolTPC;        //-> pt resolution
+  TH2F *fPtPullTPC;         //-> pt pull
+  TH2F *fPhiResolTanTPC;       //-> angular resolution 
+  TH2F *fTanResolTanTPC;       //-> angular resolution
+  TH2F *fPhiPullTanTPC;        //-> angular resolution
+  TH2F *fTanPullTanTPC;        //-> angular resolution
+
+  // TPC+ITS
+  TH2F *fPtResolTPCITS;        //-> pt resolution
+  TH2F *fPtPullTPCITS;         //-> pt pull
+  TH2F *fPhiResolTanTPCITS;       //-> angular resolution 
+  TH2F *fTanResolTanTPCITS;       //-> angular resolution
+  TH2F *fPhiPullTanTPCITS;        //-> angular resolution
+  TH2F *fTanPullTanTPCITS;        //-> angular resolution
 
   //
   // Resolution constrained param
@@ -117,8 +188,6 @@ private:
   TH2F* fCThetaResolS1PtTPC;     //-> (mctheta-theta)/(0.1+1/pt) vs sqrt(1/pt) (TPC)
   TH2F* fCThetaResolS1PtTPCITS;  //-> (mctheta-theta)/(0.1+1/pt) vs sqrt(1/pt) (TPC+ITS)
 
-  AliESDVertex *fVertex;  //! 
-
   // Global cuts objects
   AliRecInfoCuts*  fCutsRC;      // selection cuts for reconstructed tracks
   AliMCInfoCuts*  fCutsMC;       // selection cuts for MC tracks