1 //////////////////////////////////////////////////////////
3 #ifndef AliHighPtTreeAnalysis_h
4 #define AliHighPtTreeAnalysis_h
12 #include <TPaveStats.h>
18 #include <TGraphErrors.h>
19 #include <TObjString.h>
21 #include "AliESDVertex.h"
23 #include "AliVertex.h"
24 #include "AliESDtrack.h"
26 #include "AliExternalTrackParam.h"
28 #include <TParticle.h>
31 #include <TTreeStream.h>
38 // Fixed size dimensions of array or collections stored in the TTree if any.
39 const Int_t kMaxfileName = 1;
40 const Int_t kMaxvtxESD = 1;
41 const Int_t kMaxesdTrack = 1;
42 const Int_t kMaxextTPCInnerC = 1;
43 const Int_t kMaxextInnerParamC = 1;
44 const Int_t kMaxextInnerParam = 1;
45 const Int_t kMaxextInnerParamRef = 1;
47 class AliHighPtTreeAnalysis {
51 AliHighPtTreeAnalysis( );
52 AliHighPtTreeAnalysis( TString file );
53 virtual ~AliHighPtTreeAnalysis();
54 virtual Int_t GetEntry(Long64_t entry);
55 virtual Long64_t LoadTree(Long64_t entry);
56 virtual Long64_t LoadV0Tree(Long64_t entry);
57 virtual void Init(TTree *tree);
58 virtual void InitV0tree(TTree *tree);
60 virtual Bool_t BaseCut(); // returns true if track passes baseCut
61 virtual void BookHistos();
62 virtual void FillHistos();
63 virtual void Terminate();
64 virtual TGraphErrors* Calc2DProfileContent(TH3D *h1, const char *projAxisName);
65 virtual void MakeDCArPullFits();
66 virtual void MakeDCArResFits();
67 virtual void MakePhiFits();
68 virtual void Make1pTresCovFits();
69 virtual void MakeTPCITSMatchingEff();
70 virtual void MakeK0trends();
71 virtual Double_t qoverptCorr(Double_t trEta, Double_t trPhi, Int_t type);
72 virtual Bool_t ConnectGenericHistos( const char *genericHistoFile );
73 virtual void RunPeriod();
74 virtual void SetApplyCorrections( const char *correctionFile );
75 virtual void MakePowerFit(Int_t entries); // make power fit
76 virtual Bool_t GetK0TrendFitFunction(TF1 *fLinearFitK0sShift, TF1 *fLinearFitK0sSigma, Int_t Type, Int_t Charge);
77 virtual void MakedcaRTrends();
78 virtual void MakeDeltaPhiTrends();
79 virtual void MakeEfficiencyTrends();
81 virtual void Plot1D(TH3D *h1, const char *projAxisName, Int_t histoType, Int_t logX, const char *xaxisName, const char *plotName);
82 virtual void Plot2D(TH3D *h1, const char *projAxisName, Int_t histoType, Int_t logX, const char *xaxisName, const char *plotName);
83 virtual void Plot2DK0s(TH3D *h1, const char *projAxisName, Int_t histoType, Int_t logX, const char *xaxisName, const char *plotName);
84 virtual void Plot1PtRes(TH3D *h1, const char *projAxisName, Int_t histoType, Int_t logX, const char *xaxisName, const char *plotName);
85 virtual void PlotEff(TH3D *hTPCITS, TH3D *hTPC, const char *projAxisName, Int_t histoType, Int_t logX, const char *xaxisName ,const char *plotName);
86 virtual void SetHistoProperties(TH1D *hist, Int_t marker, Int_t color, Double_t yMin, Double_t yMax);
87 virtual void MakeAllPlots();
89 virtual void SetMakePlots(Bool_t makeAllPlots);
90 virtual void SetHighPtTree(TTree *HighPtTree) { Init(HighPtTree); };
91 virtual void SetV0Tree(TTree *V0Tree) { InitV0tree(V0Tree); fV0s = kTRUE; };
92 virtual void SetRunV0s(Bool_t bV0s ) { fV0s = bV0s; };
93 virtual void SetPeriodName( const char *ch ) { fPeriodName = new TString( ch ); };
94 virtual void SetMakeFitPerfomancePlots( Bool_t bFPP ) { fMakeFitPerfomancePlots = bFPP; }
98 TTree *fChain; //!pointer to the analyzed TTree or TChain
103 Bool_t fApplyCorrections;
106 Bool_t fMakeFitPerfomancePlots;
108 Double_t *fCorrectionAside;
109 Double_t *fCorrectionCside;
110 Double_t *fCorrectionAsideTPCInner;
111 Double_t *fCorrectionCsideTPCInner;
112 Double_t *fCorrectionAsideTPCInnerC;
113 Double_t *fCorrectionCsideTPCInnerC;
115 Int_t fNtracks_TPCLowPt;
116 Int_t fNtracks_TPCHighPt;
117 Int_t fNtracks_TPCITSLowPt;
118 Int_t fNtracks_TPCITSHighPt;
120 TString *fPeriodName;
125 // Declaration of leaf types
126 TObjString *fileName;
130 TObjString *triggerClass;
133 AliESDVertex *vtxESD;
134 AliESDtrack *esdTrack;
136 AliExternalTrackParam *extTPCInnerC;
137 AliExternalTrackParam *extInnerParamC;
138 AliExternalTrackParam *extInnerParam;
139 AliExternalTrackParam *extInnerParamRef;
140 Double_t chi2TPCInnerC;
143 // Declaration of V0 data members
145 AliESDtrack *v0track0;
146 AliESDtrack *v0track1;
151 TH3D *hPulldcaRTPConly_vs_eta_1pT; TH3D *hPulldcaRcomb_vs_eta_1pT;
152 TH3D *hResdcaRTPConly_vs_eta_1pT; TH3D *hResdcaRcomb_vs_eta_1pT;
154 TH3D *hphiPull_vs_eta_1pT;
155 TH3D *hphiRes_vs_eta_1pT;
157 TH3D *hPulldcaR_vs_eta_pT_Aside; TH3D *hPulldcaR_vs_eta_pT_Cside;
158 TH3D *hPulldcaRTPCInner_vs_eta_pT_Aside; TH3D *hPulldcaRTPCInner_vs_eta_pT_Cside;
159 TH3D *hResdcaR_vs_eta_pT_Aside; TH3D *hResdcaR_vs_eta_pT_Cside;
160 TH3D *hResdcaRTPCInner_vs_eta_pT_Aside; TH3D *hResdcaRTPCInner_vs_eta_pT_Cside;
161 TH3D *hphiPull_vs_eta_pT_Aside; TH3D *hphiPull_vs_eta_pT_Cside;
162 TH3D *hphiRes_vs_eta_pT_Aside; TH3D *hphiRes_vs_eta_pT_Cside;
163 TH3D *hPulldcaR_vs_phi_pT_Aside; TH3D *hPulldcaR_vs_phi_pT_Cside;
164 TH3D *hPulldcaRTPCInner_vs_phi_pT_Aside; TH3D *hPulldcaRTPCInner_vs_phi_pT_Cside;
165 TH3D *hResdcaR_vs_phi_pT_Aside; TH3D *hResdcaR_vs_phi_pT_Cside;
166 TH3D *hResdcaRTPCInner_vs_phi_pT_Aside; TH3D *hResdcaRTPCInner_vs_phi_pT_Cside;
167 TH3D *hphiPull_vs_phi_pT_Aside; TH3D *hphiPull_vs_phi_pT_Cside;
168 TH3D *hphiRes_vs_phi_pT_Aside; TH3D *hphiRes_vs_phi_pT_Cside;
170 TH3D *hphi_vs_eta_pT_cutTPC; TH3D *hphi_vs_eta_pT_cutTPCITS;
173 // histogram for 1/pt shift calculation
174 TH3F *h1pt_vs_eta_phi;
175 TH3D *h1ptRes_vs_phi_pT_Aside; TH3D *h1ptRes_vs_phi_pT_Cside; // 1/pT resolution from cov. matrix
176 TH3D *h1ptRes_vs_mult_pT_Aside; TH3D *h1ptRes_vs_mult_pT_Cside; // 1/pT resolution from cov. matrix vs mult.
177 TH3D *h1ptSigma_vs_phi_pT_Aside; TH3D *h1ptSigma_vs_phi_pT_Cside; // sigma 1/pT from cov. matrix
178 TH3D *h1ptSigma_vs_mult_pT_Aside; TH3D *h1ptSigma_vs_mult_pT_Cside; // sigma 1/pT from cov. matrix vs mult.
180 // histogram for 1/pt shift calculation for TPCInnerC
181 TH3F *h1ptTPCInnerC_vs_eta_phi;
182 TH3D *h1ptResTPCInnerC_vs_phi_pT_Aside; TH3D *h1ptResTPCInnerC_vs_phi_pT_Cside; // 1/pT resolution from cov. matrix TPCInnerC
183 TH3D *h1ptResTPCInnerC_vs_mult_pT_Aside; TH3D *h1ptResTPCInnerC_vs_mult_pT_Cside; // 1/pT resolution from cov. matrix vs mult. TPCInnerC
184 TH3D *h1ptSigmaTPCInnerC_vs_phi_pT_Aside; TH3D *h1ptSigmaTPCInnerC_vs_phi_pT_Cside; // 1/pT sigma from cov. matrix TPCInnerC
185 TH3D *h1ptSigmaTPCInnerC_vs_mult_pT_Aside; TH3D *h1ptSigmaTPCInnerC_vs_mult_pT_Cside; // 1/pT sigma from cov. matrix vs mult. TPCInnerC
187 // histogram for 1/pt shift calculation for TPCInner
188 TH3F *h1ptTPCInner_vs_eta_phi;
189 TH3D *h1ptResTPCInner_vs_phi_pT_Aside; TH3D *h1ptResTPCInner_vs_phi_pT_Cside; // 1/pT resolution from cov. matrix TPCInner
190 TH3D *h1ptResTPCInner_vs_mult_pT_Aside; TH3D *h1ptResTPCInner_vs_mult_pT_Cside; // 1/pT resolution from cov. matrix vs mult. TPCInner
191 TH3D *h1ptSigmaTPCInner_vs_phi_pT_Aside; TH3D *h1ptSigmaTPCInner_vs_phi_pT_Cside; // 1/pT sigma from cov. matrix TPCInner
192 TH3D *h1ptSigmaTPCInner_vs_mult_pT_Aside; TH3D *h1ptSigmaTPCInner_vs_mult_pT_Cside; // 1/pT sigma from cov. matrix vs mult. TPCInner
193 // Histogramm for V0s
194 TH3D *hK0sPull_vs_alpha_1pT_pos;
195 TH3D *hK0sRes_vs_alpha_1pT_pos;
196 TH3D *hK0sPull_vs_alpha_1pT_neg;
197 TH3D *hK0sRes_vs_alpha_1pT_neg;
199 TH3D *hptPull_vs_eta_pT;
200 TH3D *hptRes_vs_eta_pT;
201 TH3D *hptPullTPCInnerC_vs_eta_pT;
202 TH3D *hptResTPCInnerC_vs_eta_pT;
203 TH3D *hptPullTPCInner_vs_eta_pT;
204 TH3D *hptResTPCInner_vs_eta_pT;
206 TH3D *hptPull_vs_phi_pT;
207 TH3D *hptRes_vs_phi_pT;
208 TH3D *hptPullTPCInnerC_vs_phi_pT;
209 TH3D *hptResTPCInnerC_vs_phi_pT;
210 TH3D *hptPullTPCInner_vs_phi_pT;
211 TH3D *hptResTPCInner_vs_phi_pT;
213 ClassDef(AliHighPtTreeAnalysis, 2); // example of analysis