1 // The class definition in esdClus.h has been generated automatically
2 // by the ROOT utility TTree::MakeSelector(). This class is derived
3 // from the ROOT class TSelector. For more information on the TSelector
4 // framework see $ROOTSYS/README/README.SELECTOR or the ROOT User Manual.
6 // The following methods are defined in this file:
7 // Begin(): called everytime a loop on the tree starts,
8 // a convenient place to create your histograms.
9 // SlaveBegin(): called after Begin(), when on PROOF called only on the
11 // Process(): called for each event, in this function you decide what
12 // to read and fill your histograms.
13 // SlaveTerminate: called at the end of the loop on the tree, when on PROOF
14 // called only on the slave servers.
15 // Terminate(): called at the end of the loop on the tree,
16 // a convenient place to draw/fit your histograms.
21 // Comapre the MC information with the reconstructed
31 #include "TTimeStamp.h"
38 #include "AliTracker.h"
41 #include "AliESDEvent.h" // new container
43 #include "AliESDtrack.h"
44 #include "AliESDfriend.h"
45 #include "AliESDfriendTrack.h"
46 #include "AliTPCseed.h"
47 #include "AliTPCclusterMI.h"
49 #include "AliComparisonDraw.h"
52 ClassImp(AliComparisonDraw)
56 AliComparisonDraw::AliComparisonDraw():
64 void AliComparisonDraw::InitHisto(){
68 fPtResolLPT = new TH2F("Pt resol","pt resol",10, 0.1,3,200,-0.2,0.2);
69 fPtResolHPT = new TH2F("Pt resol","pt resol",10, 2,100,200,-0.3,0.3);
71 fPtPoolLPT = new TH2F("Pt pool","pt pool",10, 0.1,3,200,-6,6);
72 fPtPoolHPT = new TH2F("Pt pool","pt pool",10, 2,100,200,-6,6);
75 void AliComparisonDraw::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC){
79 Float_t mcpt = infoMC->GetParticle().Pt();
83 if (infoRC->GetStatus(1)==0) return;
84 if (!infoRC->GetESDtrack()) return; //buggy line
87 if (infoRC->GetESDtrack()->GetTPCNcls()<10) return;
89 // printf("Pt\t%f\t%f\n",mcpt, infoRC->GetESDtrack()->Pt());
91 Float_t deltaPt= (mcpt-infoRC->GetESDtrack()->Pt())/mcpt;
92 Float_t poolPt= (1/mcpt-infoRC->GetESDtrack()->OneOverPt())/
93 TMath::Sqrt(infoRC->GetESDtrack()->GetSigma1Pt2());
94 fPtResolLPT->Fill(mcpt,deltaPt);
95 fPtResolHPT->Fill(mcpt,deltaPt);
96 fPtPoolLPT->Fill(mcpt,poolPt);
97 fPtPoolHPT->Fill(mcpt,poolPt);