]>
Commit | Line | Data |
---|---|---|
70cf117a | 1 | ////////////////////////////////////////////////////////// |
2 | ||
3 | #ifndef AliHighPtTreeAnalysis_h | |
4 | #define AliHighPtTreeAnalysis_h | |
5 | ||
6 | #include <inttypes.h> | |
7 | #include <iostream> | |
8 | #include <fstream> | |
9 | #include <TROOT.h> | |
10 | #include <TChain.h> | |
11 | #include <TFile.h> | |
12 | #include <TPaveStats.h> | |
13 | #include <TVectorT.h> | |
14 | #include <TH1.h> | |
15 | #include <TH2.h> | |
16 | #include <TF1.h> | |
17 | #include <TH3.h> | |
18 | #include <TGraphErrors.h> | |
19 | #include <TObjString.h> | |
20 | #include <TObject.h> | |
21 | #include "AliESDVertex.h" | |
22 | #include <TNamed.h> | |
23 | #include "AliVertex.h" | |
24 | #include "AliESDtrack.h" | |
25 | #include "AliESDv0.h" | |
26 | #include "AliExternalTrackParam.h" | |
27 | #include <TBits.h> | |
28 | #include <TParticle.h> | |
29 | #include <TStyle.h> | |
30 | #include <TLegend.h> | |
31 | #include <TTreeStream.h> | |
32 | #include "TString.h" | |
33 | #include "TSystem.h" | |
34 | #include "TMinuit.h" | |
35 | #include "TCanvas.h" | |
36 | ||
37 | ||
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; | |
46 | ||
47 | class AliHighPtTreeAnalysis { | |
48 | public : | |
49 | ||
50 | ||
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); | |
59 | virtual void Loop(); | |
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(); | |
80 | ||
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(); | |
88 | ||
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; } | |
95 | ||
96 | private: | |
97 | ||
98 | TTree *fChain; //!pointer to the analyzed TTree or TChain | |
99 | TTree *fV0Chain; | |
100 | ||
101 | TTree *OutTree; | |
102 | ||
103 | Bool_t fApplyCorrections; | |
104 | Bool_t fMakePlots; | |
105 | Bool_t fV0s; | |
70cf117a | 106 | Bool_t fMakeFitPerfomancePlots; |
107 | ||
108 | Double_t *fCorrectionAside; | |
109 | Double_t *fCorrectionCside; | |
110 | Double_t *fCorrectionAsideTPCInner; | |
111 | Double_t *fCorrectionCsideTPCInner; | |
112 | Double_t *fCorrectionAsideTPCInnerC; | |
113 | Double_t *fCorrectionCsideTPCInnerC; | |
114 | ||
115 | Int_t fNtracks_TPCLowPt; | |
116 | Int_t fNtracks_TPCHighPt; | |
117 | Int_t fNtracks_TPCITSLowPt; | |
118 | Int_t fNtracks_TPCITSHighPt; | |
119 | ||
120 | TString *fPeriodName; | |
121 | Bool_t fPeriod; | |
122 | Bool_t hasMC; | |
123 | Double_t pTcut; | |
124 | Int_t fBfield; | |
125 | // Declaration of leaf types | |
126 | TObjString *fileName; | |
127 | Double_t runNumber; | |
128 | Int_t runNumberInt; | |
129 | Int_t mult; | |
130 | TObjString *triggerClass; | |
131 | Double_t Bz; | |
132 | Int_t BzInt; | |
133 | AliESDVertex *vtxESD; | |
134 | AliESDtrack *esdTrack; | |
135 | TParticle *particle; | |
136 | AliExternalTrackParam *extTPCInnerC; | |
137 | AliExternalTrackParam *extInnerParamC; | |
138 | AliExternalTrackParam *extInnerParam; | |
139 | AliExternalTrackParam *extInnerParamRef; | |
140 | Double_t chi2TPCInnerC; | |
141 | Double_t chi2InnerC; | |
142 | ||
143 | // Declaration of V0 data members | |
144 | AliESDv0 *v0; | |
145 | AliESDtrack *v0track0; | |
146 | AliESDtrack *v0track1; | |
147 | ||
148 | ||
149 | // Histos | |
150 | ||
151 | TH3D *hPulldcaRTPConly_vs_eta_1pT; TH3D *hPulldcaRcomb_vs_eta_1pT; | |
152 | TH3D *hResdcaRTPConly_vs_eta_1pT; TH3D *hResdcaRcomb_vs_eta_1pT; | |
153 | ||
154 | TH3D *hphiPull_vs_eta_1pT; | |
155 | TH3D *hphiRes_vs_eta_1pT; | |
156 | ||
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; | |
169 | TH3D *heta_phi_pT; | |
170 | TH3D *hphi_vs_eta_pT_cutTPC; TH3D *hphi_vs_eta_pT_cutTPCITS; | |
171 | ||
172 | ||
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. | |
179 | ||
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 | |
186 | ||
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; | |
198 | // MC info | |
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; | |
205 | ||
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; | |
212 | ||
b2ad6501 | 213 | ClassDef(AliHighPtTreeAnalysis, 2); // example of analysis |
70cf117a | 214 | }; |
215 | ||
216 | #endif |