New output added from analyze function (Jacek)
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 May 2008 14:18:58 +0000 (14:18 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 May 2008 14:18:58 +0000 (14:18 +0000)
PWG1/AliComparisonDCA.cxx
PWG1/AliComparisonDEdx.cxx
PWG1/AliComparisonRes.cxx
PWG1/AliComparisonRes.h

index b84ab52..ee0458f 100644 (file)
@@ -165,6 +165,7 @@ void AliComparisonDCA::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
 
   Int_t clusterITS[200];
   Double_t dca[2], cov[3]; // dca_xy, dca_z, sigma_xy, sigma_xy_z, sigma_z
+  Float_t dca1[2], cov1[3]; // dca_xy, dca_z, sigma_xy, sigma_xy_z, sigma_z
 
   Float_t mcpt = infoMC->GetParticle().Pt();
   Float_t tantheta = TMath::Tan(infoMC->GetParticle().Theta()-TMath::Pi()*0.5);
@@ -203,13 +204,16 @@ void AliComparisonDCA::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
          delete track;
     }
   }
+  
+ // ITS + TPC
+ infoRC->GetESDtrack()->GetImpactParameters(dca1,cov1);
 
  if(infoRC->GetESDtrack()->GetITSclusters(clusterITS)==0){
-    fD0TanSPtB1->Fill(tantheta,spt,dca[0]);
-    fD1TanSPtB1->Fill(tantheta,spt,dca[1]);
+    fD0TanSPtB1->Fill(tantheta,spt,dca1[0]);
+    fD1TanSPtB1->Fill(tantheta,spt,dca1[1]);
   }
-    fD0TanSPtL1->Fill(tantheta,spt,dca[0]);
-    fD1TanSPtL1->Fill(tantheta,spt,dca[1]);
+    fD0TanSPtL1->Fill(tantheta,spt,dca1[0]);
+    fD1TanSPtL1->Fill(tantheta,spt,dca1[1]);
 }
 
 //_____________________________________________________________________________
@@ -263,37 +267,102 @@ void AliComparisonDCA::Analyse()
   
   TH1::AddDirectory(kFALSE);
 
-  TGraph2D *gr=0;
-  TGraph * gr0=0;
+  TGraph * gr[4]= { 0,0,0,0 };
+  TGraph2D *gr2[4]= { 0,0,0,0};
   AliComparisonDCA * comp=this;
   TObjArray *aFolderObj = new TObjArray;
 
   // write results in the folder 
   // Canvas to draw analysed histograms
   TCanvas * c = new TCanvas("canDCA","DCA resolution");
-  c->Divide(1,2);
-  c->cd(1);
+  c->Divide(2,4);
   //
   // DCA resolution
   //
-  gr0 = AliMathBase::MakeStat1D(comp->fD0TanSPtB1,2,5);
-  gr0->GetXaxis()->SetTitle("Tan(#theta)");
-  gr0->GetYaxis()->SetTitle("#sigmaDCA (cm)");
-  gr0->SetName("DCAResolTan");
-  gr0->Draw("Al*");
-
-  //if(folder) folder->Add(gr0->GetHistogram());
-  aFolderObj->Add(gr0);
-  //
+  c->cd(1);
+  gr[0] = AliMathBase::MakeStat1D(comp->fD0TanSPtB1,2,5);
+  gr[0]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr[0]->GetYaxis()->SetTitle("#sigmaDCA_xy (cm)");
+  gr[0]->SetName("DCAXYResolTan");
+  gr[0]->Draw("Al*");
+
+  aFolderObj->Add(gr[0]);
+
   c->cd(2);
-  gr = AliMathBase::MakeStat2D(comp->fD0TanSPtB1,4,2,5); 
-  gr->GetXaxis()->SetTitle("Tan(#theta)");
-  gr->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV/c)}");
-  gr->GetYaxis()->SetTitle("#sigmaDCA (cm)");
-  gr->SetName("DCAResolSPTTan");
-  gr->GetHistogram()->Draw("colz");
-
-  aFolderObj->Add(gr->GetHistogram());
+  gr[1] = AliMathBase::MakeStat1D(comp->fD1TanSPtB1,2,5);
+  gr[1]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr[1]->GetYaxis()->SetTitle("#sigmaDCA_z (cm)");
+  gr[1]->SetName("DCAZResolTan");
+  gr[1]->Draw("Al*");
+
+  aFolderObj->Add(gr[1]);
+
+  //
+  // DCA mean value
+  //
+  c->cd(3);
+  gr[2] = AliMathBase::MakeStat1D(comp->fD0TanSPtB1,2,4);
+  gr[2]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr[2]->GetYaxis()->SetTitle("mean DCA_xy (cm)");
+  gr[2]->SetName("DCAXYMeanTan");
+  gr[2]->Draw("Al*");
+
+  aFolderObj->Add(gr[2]);
+
+  c->cd(4);
+  gr[3] = AliMathBase::MakeStat1D(comp->fD1TanSPtB1,2,4);
+  gr[3]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr[3]->GetYaxis()->SetTitle("mean DCA_z (cm)");
+  gr[3]->SetName("DCAZMeanTan");
+  gr[3]->Draw("Al*");
+
+  aFolderObj->Add(gr[3]);
+
+  // 2D DCA resolution 
+  c->cd(5);
+  gr2[0] = AliMathBase::MakeStat2D(comp->fD0TanSPtB1,4,2,5); 
+  gr2[0]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr2[0]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV/c)}");
+  gr2[0]->GetZaxis()->SetTitle("#sigmaDCA_xy (cm)");
+  gr2[0]->SetName("DCAXYResolSPTTan");
+  gr2[0]->GetHistogram()->Draw("colz");
+
+  gr2[0]->GetHistogram()->SetName("DCAXYResolSPTTan");
+  aFolderObj->Add(gr2[0]->GetHistogram());
+
+  c->cd(6);
+  gr2[1] = AliMathBase::MakeStat2D(comp->fD1TanSPtB1,4,2,5); 
+  gr2[1]->GetXaxis()->SetTitle("Tan(#theta)");
+  gr2[1]->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV/c)}");
+  gr2[1]->GetZaxis()->SetTitle("#sigmaDCA_z (cm)");
+  gr2[1]->SetName("DCAZResolSPTTan");
+  gr2[1]->GetHistogram()->Draw("colz");
+
+  gr2[1]->GetHistogram()->SetName("DCAZResolSPTTan");
+  aFolderObj->Add(gr2[1]->GetHistogram());
+
+  // 2D DCA mean value  
+  c->cd(7);
+  gr2[2] = AliMathBase::MakeStat2D(comp->fD0TanSPtB1,4,2,4); 
+  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]->GetHistogram()->Draw("colz");
+
+  gr2[2]->GetHistogram()->SetName("DCAXYMeanSPTTan");
+  aFolderObj->Add(gr2[2]->GetHistogram());
+
+  c->cd(8);
+  gr2[3] = AliMathBase::MakeStat2D(comp->fD1TanSPtB1,4,2,4); 
+  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]->GetHistogram()->Draw("colz");
+
+  gr2[3]->GetHistogram()->SetName("DCAZMeanSPTTan");
+  aFolderObj->Add(gr2[3]->GetHistogram());
 
   // export objects to analysis folder
   fAnalysisFolder = ExportToFolder(aFolderObj);
index 839bdd9..e0bd632 100644 (file)
@@ -292,6 +292,7 @@ void AliComparisonDEdx::Analyse()
   gr->SetName("TPCdEdxMeanTanPt_1");
   gr->GetHistogram()->Draw("colz"); 
 
+  gr->GetHistogram()->SetName("TPCdEdxMeanTanPt_1");
   aFolderObj->Add(gr->GetHistogram());
   //
   gr = AliMathBase::MakeStat2D(comp->fTPCSignalNormTanSPt,3,1,5);
@@ -301,6 +302,7 @@ void AliComparisonDEdx::Analyse()
   gr->SetName("TPCdEdxMeanTanPt_2");
   gr->GetHistogram()->Draw("colz"); 
 
+  gr->GetHistogram()->SetName("TPCdEdxMeanTanPt_2");
   aFolderObj->Add(gr->GetHistogram());
 
   // export objects to analysis folder
index d56fd9a..a06ac80 100644 (file)
@@ -76,6 +76,11 @@ AliComparisonRes::AliComparisonRes():
   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
+
   //
   // Resolution constrained param
   //
@@ -141,6 +146,11 @@ AliComparisonRes::~AliComparisonRes(){
   if(fPtPullLPT)  delete  fPtPullLPT;  fPtPullLPT=0;    
   if(fPtPullHPT)  delete  fPtPullHPT;  fPtPullHPT=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;   
+
   // Resolution histograms (constrained param)
   if(fCPhiResolTan) delete fCPhiResolTan; fCPhiResolTan=0;
   if(fCTanResolTan) delete fCTanResolTan; fCTanResolTan=0;
@@ -222,6 +232,22 @@ void AliComparisonRes::Init(){
   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
@@ -329,11 +355,12 @@ void AliComparisonRes::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
   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, deltaTan, delta1Pt2, deltaY1Pt, deltaZ1Pt, deltaPhi1Pt, deltaTheta1Pt; 
+  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 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);
 
   // distance to Prim. vertex 
   const Double_t* dv = infoMC->GetVDist(); 
@@ -355,9 +382,11 @@ void AliComparisonRes::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
   pullPt= (1/mcpt-infoRC->GetESDtrack()->OneOverPt())/TMath::Sqrt(infoRC->GetESDtrack()->GetSigma1Pt2());  
   deltaPhi = TMath::ATan2(infoRC->GetESDtrack()->Py(),infoRC->GetESDtrack()->Px())-
                      TMath::ATan2(infoMC->GetParticle().Py(),infoMC->GetParticle().Px());
+  pullPhi = deltaPhi/TMath::Sqrt(infoRC->GetESDtrack()->GetSigmaSnp2()); 
 
   deltaTan = TMath::ATan2(infoRC->GetESDtrack()->Pz(),infoRC->GetESDtrack()->Pt())-
                      TMath::ATan2(infoMC->GetParticle().Pz(),infoMC->GetParticle().Pt());
+  pullTan = deltaPhi/TMath::Sqrt(infoRC->GetESDtrack()->GetSigmaSnp2());
 
   delta1Pt2 = (1/mcpt-infoRC->GetESDtrack()->OneOverPt())/TMath::Power(1+1/mcpt,2);       
   deltaY1Pt = (infoMC->GetParticle().Vy()-infoRC->GetESDtrack()->GetY()) / (0.2+1/mcpt);
@@ -415,6 +444,12 @@ void AliComparisonRes::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
   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);
+
 }
 
 //_____________________________________________________________________________
@@ -554,7 +589,6 @@ void AliComparisonRes::Analyse(){
   TH1::AddDirectory(kFALSE);
 
   AliComparisonRes * comp=this;
-  //TFolder *folder = comp->GetAnalysisFolder();
   TH1F *hiss=0;
   TObjArray *aFolderObj = new TObjArray;
 
@@ -572,7 +606,25 @@ void AliComparisonRes::Analyse(){
   aFolderObj->Add(hiss);
 
   //
-  hiss = comp->MakeResol(comp->fCPhiResolTan,1,0);
+  hiss = comp->MakeResol(comp->fPtResolLPT,1,0);
+  hiss->SetXTitle("p_{t} (GeV)");
+  hiss->SetYTitle("#sigmap_{t}/p_{t}");
+  hiss->Draw(); 
+  hiss->SetName("PtResolPt");
+  
+  aFolderObj->Add(hiss);
+
+  //
+  hiss = comp->MakeResol(comp->fPtResolLPT,1,1);
+  hiss->SetXTitle("p_{t} (GeV)");
+  hiss->SetYTitle("mean #Deltap_{t}/p_{t}");
+  hiss->Draw(); 
+  hiss->SetName("PtMeanPt");
+  
+  aFolderObj->Add(hiss);
+
+  //
+  hiss = comp->MakeResol(comp->fPhiResolTan,1,0);
   hiss->SetXTitle("Tan(#theta)");
   hiss->SetYTitle("#sigma#phi (rad)");
   hiss->Draw();
@@ -580,12 +632,46 @@ void AliComparisonRes::Analyse(){
   
   aFolderObj->Add(hiss);
   //
-  hiss = comp->MakeResol(comp->fCTanResolTan,1,0);
+  hiss = comp->MakeResol(comp->fTanResolTan,1,0);
   hiss->SetXTitle("Tan(#theta)");
   hiss->SetYTitle("#sigma#theta (rad)");
   hiss->Draw();
   hiss->SetName("ThetaResolTan");
   
+  aFolderObj->Add(hiss);
+
+  //
+  hiss = comp->MakeResol(comp->fPhiResolTan,1,1);
+  hiss->SetXTitle("Tan(#theta)");
+  hiss->SetYTitle("mean #Delta#phi (rad)");
+  hiss->Draw();
+  hiss->SetName("PhiMeanTan");
+  
+  aFolderObj->Add(hiss);
+  //
+  hiss = comp->MakeResol(comp->fTanResolTan,1,1);
+  hiss->SetXTitle("Tan(#theta)");
+  hiss->SetYTitle("mean #Delta#theta (rad)");
+  hiss->Draw();
+  hiss->SetName("ThetaMeanTan");
+  
+  aFolderObj->Add(hiss);
+
+  //
+  hiss = comp->MakeResol(comp->fCPhiResolTan,1,0);
+  hiss->SetXTitle("Tan(#theta)");
+  hiss->SetYTitle("#sigma#phi (rad)");
+  hiss->Draw();
+  hiss->SetName("CPhiResolTan");
+  
+  aFolderObj->Add(hiss);
+  //
+  hiss = comp->MakeResol(comp->fCTanResolTan,1,0);
+  hiss->SetXTitle("Tan(#theta)");
+  hiss->SetYTitle("#sigma#theta (rad)");
+  hiss->Draw();
+  hiss->SetName("CThetaResolTan");
+  
   aFolderObj->Add(hiss);
   //
   hiss = comp->MakeResol(comp->fCPtPullTan,1,0);
@@ -824,6 +910,10 @@ Long64_t AliComparisonRes::Merge(TCollection* list)
   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);
 
   // Histograms for 1/pt parameterisation
   f1Pt2ResolS1PtTPC->Add(entry->f1Pt2ResolS1PtTPC);
index bd46c2d..0ea5773 100644 (file)
@@ -71,10 +71,14 @@ 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 *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
 
   //
   // Resolution constrained param