Adding abstract class for comparison components
[u/mrichter/AliRoot.git] / PWG1 / AliComparisonRes.cxx
CommitLineData
96b3109a 1//------------------------------------------------------------------------------
2// Implementation of AliComparisonRes class. It keeps information from
3// comparison of reconstructed and MC particle tracks. In addtion,
4// it keeps selection cuts used during comparison. The comparison
5// information is stored in the ROOT histograms. Analysis of these
6// histograms can be done by using Analyse() class function. The result of
3baa4bfd 7// the analysis (histograms/graphs) are stored in the folder which is
8// a data member of AliComparisonRes.
9//
96b3109a 10// Author: J.Otwinowski 04/02/2008
11//------------------------------------------------------------------------------
12
13/*
3baa4bfd 14
15 // after running comparison task, read the file, and get component
96b3109a 16 gSystem->Load("libPWG1.so");
17 TFile f("Output.root");
3baa4bfd 18 AliComparisonRes * compObj = (AliComparisonRes*)f.Get("AliComparisonRes");
19
20 // analyse comparison data
21 compObj->Analyse();
22
23 // the output histograms/graphs will be stored in the folder "folderRes"
24 compObj->GetAnalysisFolder()->ls("*");
25
26 // user can save whole comparison object (or only folder with anlysed histograms)
27 // in the seperate output file (e.g.)
28 TFile fout("Analysed_Res.root","recreate");
29 compObj->Write(); // compObj->GetAnalysisFolder()->Write();
30 fout.Close();
96b3109a 31
96b3109a 32*/
33
34#include <iostream>
35
36#include "TFile.h"
37#include "TCint.h"
38#include "TH3F.h"
39#include "TH2F.h"
40#include "TF1.h"
41#include "TProfile.h"
42#include "TProfile2D.h"
43#include "TGraph2D.h"
44#include "TCanvas.h"
45#include "TGraph.h"
46
47#include "AliESDEvent.h"
48#include "AliESD.h"
49#include "AliESDfriend.h"
50#include "AliESDfriendTrack.h"
51#include "AliESDVertex.h"
52#include "AliRecInfoCuts.h"
53#include "AliMCInfoCuts.h"
54#include "AliLog.h"
55#include "AliTracker.h"
56
57#include "AliMathBase.h"
58#include "AliTreeDraw.h"
59
60#include "AliMCInfo.h"
61#include "AliESDRecInfo.h"
62#include "AliComparisonRes.h"
63
64using namespace std;
65
66ClassImp(AliComparisonRes)
67
68//_____________________________________________________________________________
69AliComparisonRes::AliComparisonRes():
3baa4bfd 70 AliComparisonObject("AliComparisonRes"),
96b3109a 71
72 // Resolution
73 fPtResolLPT(0), // pt resolution - low pt
74 fPtResolHPT(0), // pt resolution - high pt
75 fPtPullLPT(0), // pt resolution - low pt
76 fPtPullHPT(0), // pt resolution - high pt
77 //
78 // Resolution constrained param
79 //
80 fCPhiResolTan(0), // angular resolution - constrained
81 fCTanResolTan(0), // angular resolution - constrained
82 fCPtResolTan(0), // pt resolution - constrained
83 fCPhiPullTan(0), // angular resolution - constrained
84 fCTanPullTan(0), // angular resolution - constrained
85 fCPtPullTan(0), // pt resolution - constrained
86
87 //
88 // Parametrisation histograms
89 //
90
3baa4bfd 91 f1Pt2ResolS1PtTPC(0),
92 f1Pt2ResolS1PtTPCITS(0),
93 fYResolS1PtTPC(0),
94 fYResolS1PtTPCITS(0),
95 fZResolS1PtTPC(0),
96 fZResolS1PtTPCITS(0),
97 fPhiResolS1PtTPC(0),
98 fPhiResolS1PtTPCITS(0),
99 fThetaResolS1PtTPC(0),
100 fThetaResolS1PtTPCITS(0),
96b3109a 101
102 // constrained
3baa4bfd 103 fC1Pt2ResolS1PtTPC(0),
104 fC1Pt2ResolS1PtTPCITS(0),
105 fCYResolS1PtTPC(0),
106 fCYResolS1PtTPCITS(0),
107 fCZResolS1PtTPC(0),
108 fCZResolS1PtTPCITS(0),
109 fCPhiResolS1PtTPC(0),
110 fCPhiResolS1PtTPCITS(0),
111 fCThetaResolS1PtTPC(0),
112 fCThetaResolS1PtTPCITS(0),
96b3109a 113
114 // vertex
115 fVertex(0),
116
117 // Cuts
118 fCutsRC(0),
3baa4bfd 119 fCutsMC(0),
120
121 // histogram folder
122 fAnalysisFolder(0)
96b3109a 123{
3baa4bfd 124 Init();
96b3109a 125
126 // vertex (0,0,0)
127 fVertex = new AliESDVertex();
128 fVertex->SetXv(0.0);
129 fVertex->SetYv(0.0);
130 fVertex->SetZv(0.0);
131}
132
133//_____________________________________________________________________________
134AliComparisonRes::~AliComparisonRes(){
135
136 // Resolution histograms
137 if(fPtResolLPT) delete fPtResolLPT; fPtResolLPT=0;
138 if(fPtResolHPT) delete fPtResolHPT; fPtResolHPT=0;
139 if(fPtPullLPT) delete fPtPullLPT; fPtPullLPT=0;
140 if(fPtPullHPT) delete fPtPullHPT; fPtPullHPT=0;
141
142 // Resolution histograms (constrained param)
143 if(fCPhiResolTan) delete fCPhiResolTan; fCPhiResolTan=0;
144 if(fCTanResolTan) delete fCTanResolTan; fCTanResolTan=0;
145 if(fCPtResolTan) delete fCPtResolTan; fCPtResolTan=0;
146 if(fCPhiPullTan) delete fCPhiPullTan; fCPhiPullTan=0;
147 if(fCTanPullTan) delete fCTanPullTan; fCTanPullTan=0;
148 if(fCPtPullTan) delete fCPtPullTan; fCPtPullTan=0;
149
150 // Parametrisation histograms
151 //
3baa4bfd 152 if(f1Pt2ResolS1PtTPC) delete f1Pt2ResolS1PtTPC; f1Pt2ResolS1PtTPC=0;
153 if(f1Pt2ResolS1PtTPCITS) delete f1Pt2ResolS1PtTPCITS; f1Pt2ResolS1PtTPCITS=0;
154 if(fYResolS1PtTPC) delete fYResolS1PtTPC; fYResolS1PtTPC=0;
155 if(fYResolS1PtTPCITS) delete fYResolS1PtTPCITS; fYResolS1PtTPCITS=0;
156 if(fZResolS1PtTPC) delete fZResolS1PtTPC; fZResolS1PtTPC=0;
157 if(fZResolS1PtTPCITS) delete fZResolS1PtTPCITS; fZResolS1PtTPCITS=0;
158 if(fPhiResolS1PtTPC) delete fPhiResolS1PtTPC; fPhiResolS1PtTPC=0;
159 if(fPhiResolS1PtTPCITS) delete fPhiResolS1PtTPCITS; fPhiResolS1PtTPCITS=0;
160 if(fThetaResolS1PtTPC) delete fThetaResolS1PtTPC; fThetaResolS1PtTPC=0;
161 if(fThetaResolS1PtTPCITS) delete fThetaResolS1PtTPCITS; fThetaResolS1PtTPCITS=0;
96b3109a 162
163 // constrained
3baa4bfd 164 if(fC1Pt2ResolS1PtTPC) delete fC1Pt2ResolS1PtTPC; fC1Pt2ResolS1PtTPC=0;
165 if(fC1Pt2ResolS1PtTPCITS) delete fC1Pt2ResolS1PtTPCITS; fC1Pt2ResolS1PtTPCITS=0;
166 if(fCYResolS1PtTPC) delete fCYResolS1PtTPC; fCYResolS1PtTPC=0;
167 if(fCYResolS1PtTPCITS) delete fCYResolS1PtTPCITS; fCYResolS1PtTPCITS=0;
168 if(fCZResolS1PtTPC) delete fCZResolS1PtTPC; fCZResolS1PtTPC=0;
169 if(fCZResolS1PtTPCITS) delete fCZResolS1PtTPCITS; fCZResolS1PtTPCITS=0;
170 if(fCPhiResolS1PtTPC) delete fCPhiResolS1PtTPC; fCPhiResolS1PtTPC=0;
171 if(fCPhiResolS1PtTPCITS) delete fCPhiResolS1PtTPCITS; fCPhiResolS1PtTPCITS=0;
172 if(fCThetaResolS1PtTPC) delete fCThetaResolS1PtTPC; fCThetaResolS1PtTPC=0;
173 if(fCThetaResolS1PtTPCITS) delete fCThetaResolS1PtTPCITS; fCThetaResolS1PtTPCITS=0;
96b3109a 174
175 if(fVertex) delete fVertex; fVertex=0;
176
3baa4bfd 177 if(fAnalysisFolder) delete fAnalysisFolder; fAnalysisFolder=0;
96b3109a 178}
179
180//_____________________________________________________________________________
3baa4bfd 181void AliComparisonRes::Init(){
96b3109a 182
183 // Init histograms
184 fCPhiResolTan = new TH2F("CPhiResolTan","CPhiResolTan",50, -2,2,200,-0.025,0.025);
185 fCPhiResolTan->SetXTitle("tan(#theta)");
186 fCPhiResolTan->SetYTitle("#Delta#phi");
187
188 fCTanResolTan = new TH2F("CTanResolTan","CTanResolTan",50, -2,2,200,-0.025,0.025);
189 fCTanResolTan->SetXTitle("tan(#theta)");
190 fCTanResolTan->SetYTitle("#Delta#theta");
191
192 fCPtResolTan=new TH2F("CPtResol","CPtResol",50, -2,2,200,-0.2,0.2);
193 fCPtResolTan->SetXTitle("Tan(#theta)");
194 fCPtResolTan->SetYTitle("#Deltap_{t}/p_{t}");
195
196 fCPhiPullTan = new TH2F("CPhiPullTan","CPhiPullTan",50, -2,2,200,-5,5);
197 fCPhiPullTan->SetXTitle("Tan(#theta)");
198 fCPhiPullTan->SetYTitle("#Delta#phi/#Sigma");
199
200 fCTanPullTan = new TH2F("CTanPullTan","CTanPullTan",50, -2,2,200,-5,5);
201 fCTanPullTan->SetXTitle("Tan(#theta)");
202 fCTanPullTan->SetYTitle("#Delta#theta/#Sigma");
203
204 fCPtPullTan=new TH2F("CPtPull","CPtPull",50, -2,2,200,-5,5);
205 fCPtPullTan->SetXTitle("Tan(#theta)");
206 fCPtPullTan->SetYTitle("(1/mcp_{t}-1/p_{t})/#Sigma");
207
208 fPtResolLPT = new TH2F("Pt_resol_lpt","pt resol",10, 0.1,3,200,-0.2,0.2);
209 fPtResolLPT->SetXTitle("p_{t}");
210 fPtResolLPT->SetYTitle("#Deltap_{t}/p_{t}");
211
212 fPtResolHPT = new TH2F("Pt_resol_hpt","pt resol",10, 2,100,200,-0.3,0.3);
213 fPtResolHPT->SetXTitle("p_{t}");
214 fPtResolHPT->SetYTitle("#Deltap_{t}/p_{t}");
215
216 fPtPullLPT = new TH2F("Pt_pull_lpt","pt pull",10, 0.1,3,200,-6,6);
217 fPtPullLPT->SetXTitle("p_{t}");
218 fPtPullLPT->SetYTitle("#Deltap_{t}/#Sigma");
219
220 fPtPullHPT = new TH2F("Pt_pull_hpt","pt pull",10,2,100,200,-6,6);
221 fPtPullHPT->SetXTitle("p_{t}");
222 fPtPullHPT->SetYTitle("#Deltap_{t}/#Sigma");
223
224 //
225 // Parametrisation histograms
226 //
227
3baa4bfd 228 f1Pt2ResolS1PtTPC = new TH2F("f1Pt2ResolS1PtTPC","(1/mcpt-1/pt)/(1+1/mcpt)^2 vs sqrt(1/pt))",100,0,3,200,-0.010,0.010);
229 f1Pt2ResolS1PtTPC->SetXTitle("#sqrt{1/mcp_{t}}");
230 f1Pt2ResolS1PtTPC->SetYTitle("(1/mcp_{t}-1/p_{t})/(1+1/mcp_{t})^2)");
96b3109a 231
3baa4bfd 232 f1Pt2ResolS1PtTPCITS = new TH2F("f1Pt2ResolS1PtTPCITS","(1/mcpt-1/pt)/(1+1/mcpt)^2 vs sqrt(1/pt))",100,0,3,200,-0.010,0.010);
233 f1Pt2ResolS1PtTPCITS->SetXTitle("#sqrt{1/mcp_{t}}");
234 f1Pt2ResolS1PtTPCITS->SetYTitle("(1/mcp_{t}-1/p_{t})/(1+1/mcp_{t})^2)");
96b3109a 235
3baa4bfd 236 fYResolS1PtTPC = new TH2F("fYResolS1PtTPC","fYResolS1PtTPC",100, 0,3,200,-1.0,1.0);
237 fYResolS1PtTPC->SetXTitle("#sqrt{1/mcp_{t}}");
238 fYResolS1PtTPC->SetYTitle("#DeltaY");
96b3109a 239
3baa4bfd 240 fYResolS1PtTPCITS = new TH2F("fYResolS1PtTPCITS","fYResolS1PtTPCITS",100, 0,3,200,-0.05,0.05);
241 fYResolS1PtTPCITS->SetXTitle("#sqrt{1/mcp_{t}}");
242 fYResolS1PtTPCITS->SetYTitle("#DeltaY");
96b3109a 243
3baa4bfd 244 fZResolS1PtTPC = new TH2F("fZResolS1PtTPC","fZResolS1PtTPC",100, 0,3,200,-1.0,1.0);
245 fZResolS1PtTPC->SetXTitle("#sqrt{1/mcp_{t}}");
246 fZResolS1PtTPC->SetYTitle("#DeltaZ");
96b3109a 247
3baa4bfd 248 fZResolS1PtTPCITS = new TH2F("fZResolS1PtTPCITS","fZResolS1PtTPCITS",100, 0,3,200,-0.05,0.05);
249 fZResolS1PtTPCITS->SetXTitle("#sqrt{1/mcp_{t}}");
250 fZResolS1PtTPCITS->SetYTitle("#DeltaZ");
96b3109a 251
3baa4bfd 252 fPhiResolS1PtTPC = new TH2F("fPhiResolS1PtTPC","fPhiResolS1PtTPC",100, 0,3,200,-0.025,0.025);
253 fPhiResolS1PtTPC->SetXTitle("#sqrt{1/mcp_{t}}");
254 fPhiResolS1PtTPC->SetYTitle("#Delta#phi");
96b3109a 255
3baa4bfd 256 fPhiResolS1PtTPCITS = new TH2F("fPhiResolS1PtTPCITS","fPhiResolS1PtTPCITS",100, 0,3,200,-0.01,0.01);
257 fPhiResolS1PtTPCITS->SetXTitle("#sqrt{1/mcp_{t}}");
258 fPhiResolS1PtTPCITS->SetYTitle("#Delta#phi");
96b3109a 259
3baa4bfd 260 fThetaResolS1PtTPC = new TH2F("fThetaResolS1PtTPC","fThetaResolS1PtTPC",100, 0,3,200,-0.025,0.025);
261 fThetaResolS1PtTPC->SetXTitle("#sqrt{1/mcp_{t}}");
262 fThetaResolS1PtTPC->SetYTitle("#Delta#theta");
96b3109a 263
3baa4bfd 264 fThetaResolS1PtTPCITS = new TH2F("fThetaResolS1PtTPCITS","fThetaResolS1PtTPCITS",100, 0,3,200,-0.01,0.01);
265 fThetaResolS1PtTPCITS->SetXTitle("#sqrt{1/mcp_{t}}");
266 fThetaResolS1PtTPCITS->SetYTitle("#Delta#theta");
96b3109a 267
268 // constrained
3baa4bfd 269 fC1Pt2ResolS1PtTPC = new TH2F("fC1Pt2ResolS1PtTPC","(1/mcpt-1/pt)/(1+1/mcpt)^2 vs 1/pt)",100,0,3,200,-0.010,0.010);
270 fC1Pt2ResolS1PtTPC->SetXTitle("#sqrt{1/mcp_{t}}");
271 fC1Pt2ResolS1PtTPC->SetYTitle("(1/mcp_{t}-1/p_{t})/(1+1/mcp_{t})^2)");
96b3109a 272
3baa4bfd 273 fC1Pt2ResolS1PtTPCITS = new TH2F("fC1Pt2ResolS1PtTPCITS","(1/mcpt-1/pt)/(1+1/mcpt)^2 vs 1/pt)",100,0,3,200,-0.010,0.010);
274 fC1Pt2ResolS1PtTPCITS->SetXTitle("#sqrt{1/mcp_{t}}");
275 fC1Pt2ResolS1PtTPCITS->SetYTitle("(1/mcp_{t}-1/p_{t})/(1+1/mcp_{t})^2)");
96b3109a 276
3baa4bfd 277 fCYResolS1PtTPC = new TH2F("fCYResolS1PtTPC","fCYResolS1PtTPC",100, 0,3,200,-1.0,1.0);
278 fCYResolS1PtTPC->SetXTitle("#sqrt{1/mcp_{t}}");
279 fCYResolS1PtTPC->SetYTitle("#DeltaY");
96b3109a 280
3baa4bfd 281 fCYResolS1PtTPCITS = new TH2F("fCYResolS1PtTPCITS","fCYResolS1PtTPCITS",100, 0,3,200,-0.01,0.01);
282 fCYResolS1PtTPCITS->SetXTitle("#sqrt{1/mcp_{t}}");
283 fCYResolS1PtTPCITS->SetYTitle("#DeltaY");
96b3109a 284
3baa4bfd 285 fCZResolS1PtTPC = new TH2F("fCZResolS1PtTPC","fCZResolS1PtTPC",100, 0,3,200,-1.0,1.0);
286 fCZResolS1PtTPC->SetXTitle("#sqrt{1/mcp_{t}}");
287 fCZResolS1PtTPC->SetYTitle("#DeltaZ");
96b3109a 288
3baa4bfd 289 fCZResolS1PtTPCITS = new TH2F("fCZResolS1PtTPCITS","fCZResolS1PtTPCITS",100, 0,3,200,-0.025,0.025);
290 fCZResolS1PtTPCITS->SetXTitle("#sqrt{1/mcp_{t}}");
291 fCZResolS1PtTPCITS->SetYTitle("#DeltaZ");
96b3109a 292
3baa4bfd 293 fCPhiResolS1PtTPC = new TH2F("fCPhiResolS1PtTPC","fCPhiResolS1PtTPC",100, 0,3,200,-0.025,0.025);
294 fCPhiResolS1PtTPC->SetXTitle("#sqrt{1/mcp_{t}}");
295 fCPhiResolS1PtTPC->SetYTitle("#Delta#phi");
96b3109a 296
3baa4bfd 297 fCPhiResolS1PtTPCITS = new TH2F("fCPhiResolS1PtTPCITS","fCPhiResolS1PtTPCITS",100, 0,3,200,-0.003,0.003);
298 fCPhiResolS1PtTPCITS->SetXTitle("#sqrt{1/mcp_{t}}");
299 fCPhiResolS1PtTPCITS->SetYTitle("#Delta#phi");
96b3109a 300
3baa4bfd 301 fCThetaResolS1PtTPC = new TH2F("fCThetaResolS1PtTPC","fCThetaResolS1PtTPC",100, 0,3,200,-0.025,0.025);
302 fCThetaResolS1PtTPC->SetXTitle("#sqrt{1/mcp_{t}}");
303 fCThetaResolS1PtTPC->SetYTitle("#Delta#theta");
96b3109a 304
3baa4bfd 305 fCThetaResolS1PtTPCITS = new TH2F("fCThetaResolS1PtTPCITS","fCThetaResolS1PtTPCITS",100, 0,3,200,-0.005,0.005);
306 fCThetaResolS1PtTPCITS->SetXTitle("#sqrt{1/mcp_{t}}");
307 fCThetaResolS1PtTPCITS->SetYTitle("#Delta#theta");
96b3109a 308
96b3109a 309 // Init cuts
310 if(!fCutsMC)
311 AliDebug(AliLog::kError, "ERROR: Cannot find AliMCInfoCuts object");
312 if(!fCutsRC)
313 AliDebug(AliLog::kError, "ERROR: Cannot find AliRecInfoCuts object");
3baa4bfd 314
315 // init folder
316 fAnalysisFolder = CreateFolder("folderRes","Analysis Resolution Folder");
96b3109a 317}
318
319//_____________________________________________________________________________
320void AliComparisonRes::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
321{
322 // Fill resolution comparison information
323 AliExternalTrackParam *track = 0;
96b3109a 324 Double_t field = AliTracker::GetBz(); // nominal Bz field [kG]
325 Double_t kMaxD = 123456.0; // max distance
326
327 Int_t clusterITS[200];
328 Double_t dca[2], cov[3]; // dca_xy, dca_z, sigma_xy, sigma_xy_z, sigma_z
329
330 Float_t deltaPt, pullPt, deltaPhi, deltaTan, delta1Pt2, deltaY1Pt, deltaZ1Pt, deltaPhi1Pt, deltaTheta1Pt;
331 Float_t deltaPtTPC, pullPtTPC, deltaPhiTPC, deltaTanTPC, delta1Pt2TPC, deltaY1PtTPC, deltaZ1PtTPC, deltaPhi1PtTPC, deltaTheta1PtTPC;
332
333 Float_t mcpt = infoMC->GetParticle().Pt();
3baa4bfd 334 Float_t s1mcpt = TMath::Sqrt(1./infoMC->GetParticle().Pt());
96b3109a 335
336 // distance to Prim. vertex
337 const Double_t* dv = infoMC->GetVDist();
338 Bool_t isPrim = TMath::Sqrt(dv[0]*dv[0] + dv[1]*dv[1])<fCutsMC->GetMaxR() && TMath::Abs(dv[2])<fCutsMC->GetMaxVz();
339
340 // Check selection cuts
341 if (fCutsMC->IsPdgParticle(TMath::Abs(infoMC->GetParticle().GetPdgCode())) == kFALSE) return;
342 if (!isPrim) return;
96b3109a 343 if (infoRC->GetStatus(1)!=3) return; // TPC refit
344 if (!infoRC->GetESDtrack()) return;
345 if (infoRC->GetESDtrack()->GetTPCNcls()<fCutsRC->GetMinNClustersTPC()) return;
346
347 // calculate and set prim. vertex
348 fVertex->SetXv( infoMC->GetParticle().Vx() - dv[0] );
349 fVertex->SetYv( infoMC->GetParticle().Vy() - dv[1] );
350 fVertex->SetZv( infoMC->GetParticle().Vz() - dv[2] );
351
352 deltaPt= (mcpt-infoRC->GetESDtrack()->Pt())/mcpt;
353 pullPt= (1/mcpt-infoRC->GetESDtrack()->OneOverPt())/TMath::Sqrt(infoRC->GetESDtrack()->GetSigma1Pt2());
354 deltaPhi = TMath::ATan2(infoRC->GetESDtrack()->Py(),infoRC->GetESDtrack()->Px())-
355 TMath::ATan2(infoMC->GetParticle().Py(),infoMC->GetParticle().Px());
356
357 deltaTan = TMath::ATan2(infoRC->GetESDtrack()->Pz(),infoRC->GetESDtrack()->Pt())-
358 TMath::ATan2(infoMC->GetParticle().Pz(),infoMC->GetParticle().Pt());
359
360 delta1Pt2 = (1/mcpt-infoRC->GetESDtrack()->OneOverPt())/TMath::Power(1+1/mcpt,2);
361 deltaY1Pt = (infoMC->GetParticle().Vy()-infoRC->GetESDtrack()->GetY()) / (0.2+1/mcpt);
362 deltaZ1Pt = (infoMC->GetParticle().Vz()-infoRC->GetESDtrack()->GetZ()) / (0.2+1/mcpt);
363 deltaPhi1Pt = deltaPhi / (0.1+1/mcpt);
364 deltaTheta1Pt = deltaTan / (0.1+1/mcpt);
365
96b3109a 366 // calculate track parameters at vertex
367 const AliExternalTrackParam *innerTPC = 0;
368 if ((innerTPC = infoRC->GetESDtrack()->GetTPCInnerParam()) != 0)
369 {
370 if ((track = new AliExternalTrackParam(*infoRC->GetESDtrack()->GetTPCInnerParam())) != 0 )
371 {
96b3109a 372 Bool_t bDCAStatus = track->PropagateToDCA(fVertex,field,kMaxD,dca,cov);
373
374 // Fill parametrisation histograms (only TPC track)
3baa4bfd 375 if(bDCAStatus)
96b3109a 376 {
377 deltaPtTPC= (mcpt-innerTPC->Pt())/mcpt;
378 pullPtTPC= (1/mcpt-innerTPC->OneOverPt())/TMath::Sqrt(innerTPC->GetSigma1Pt2());
379 deltaPhiTPC = TMath::ATan2(innerTPC->Py(),innerTPC->Px())-
380 TMath::ATan2(infoMC->GetParticle().Py(),infoMC->GetParticle().Px());
381
382 deltaTanTPC = TMath::ATan2(innerTPC->Pz(),innerTPC->Pt())-
383 TMath::ATan2(infoMC->GetParticle().Pz(),infoMC->GetParticle().Pt());
384
385 delta1Pt2TPC = (1/mcpt-innerTPC->OneOverPt())/TMath::Power(1+1/mcpt,2);
386 deltaY1PtTPC= (infoMC->GetParticle().Vy()-innerTPC->GetY()) / (0.2+1/mcpt);
387 deltaZ1PtTPC = (infoMC->GetParticle().Vz()-innerTPC->GetZ()) / (0.2+1/mcpt);
388 deltaPhi1PtTPC = deltaPhiTPC / (0.1+1/mcpt);
389 deltaTheta1PtTPC = deltaTanTPC / (0.1+1/mcpt);
390
3baa4bfd 391 f1Pt2ResolS1PtTPC->Fill(s1mcpt,delta1Pt2TPC);
392 fYResolS1PtTPC->Fill(s1mcpt,deltaY1PtTPC);
393 fZResolS1PtTPC->Fill(s1mcpt,deltaZ1PtTPC);
394 fPhiResolS1PtTPC->Fill(s1mcpt,deltaPhi1PtTPC);
395 fThetaResolS1PtTPC->Fill(s1mcpt,deltaTheta1PtTPC);
96b3109a 396 }
397 delete track;
398 }
399 }
400
401 // TPC and ITS (nb. of clusters >2) in the system
402 if(infoRC->GetESDtrack()->GetITSclusters(clusterITS)>2)
403 {
3baa4bfd 404 f1Pt2ResolS1PtTPCITS->Fill(s1mcpt,delta1Pt2);
405 fYResolS1PtTPCITS->Fill(s1mcpt,deltaY1Pt);
406 fZResolS1PtTPCITS->Fill(s1mcpt,deltaZ1Pt);
407 fPhiResolS1PtTPCITS->Fill(s1mcpt,deltaPhi1Pt);
408 fThetaResolS1PtTPCITS->Fill(s1mcpt,deltaTheta1Pt);
96b3109a 409 }
410
411 // Fill histograms
412 fPtResolLPT->Fill(mcpt,deltaPt);
413 fPtResolHPT->Fill(mcpt,deltaPt);
414 fPtPullLPT->Fill(mcpt,pullPt);
415 fPtPullHPT->Fill(mcpt,pullPt);
416}
417
418//_____________________________________________________________________________
419void AliComparisonRes::ProcessConstrained(AliMCInfo* infoMC, AliESDRecInfo *infoRC)
420{
421 // Fill resolution comparison information (constarained parameters)
422 //
423 AliExternalTrackParam *track = 0;
96b3109a 424 Double_t field = AliTracker::GetBz(); // nominal Bz field [kG]
425 Double_t kMaxD = 123456.0; // max distance
426
427 Int_t clusterITS[200];
428 Double_t dca[2], cov[3]; // dca_xy, dca_z, sigma_xy, sigma_xy_z, sigma_z
429
430 Float_t deltaPt, pullPt, deltaPhi, pullPhi, deltaTan, pullTan, delta1Pt2, deltaY1Pt, deltaZ1Pt, deltaPhi1Pt, deltaTheta1Pt;
431 Float_t deltaPtTPC, pullPtTPC, deltaPhiTPC, deltaTanTPC, delta1Pt2TPC, deltaY1PtTPC, deltaZ1PtTPC, deltaPhi1PtTPC, deltaTheta1PtTPC;
432
433 Float_t mcpt = infoMC->GetParticle().Pt();
3baa4bfd 434 Float_t s1mcpt = TMath::Sqrt(1./infoMC->GetParticle().Pt());
96b3109a 435 Float_t tantheta = TMath::Tan(infoMC->GetParticle().Theta()-TMath::Pi()*0.5);
436
437 // distance to Prim. vertex
438 const Double_t* dv = infoMC->GetVDist();
439 Bool_t isPrim = TMath::Sqrt(dv[0]*dv[0] + dv[1]*dv[1])<fCutsMC->GetMaxR() && TMath::Abs(dv[2])<fCutsMC->GetMaxVz();
440
441 // Check selection cuts
442 if (fCutsMC->IsPdgParticle(TMath::Abs(infoMC->GetParticle().GetPdgCode())) == kFALSE) return;
443 if (!isPrim) return;
444 if (infoRC->GetStatus(1)!=3) return;
445 if (!infoRC->GetESDtrack()) return;
446 if (infoRC->GetESDtrack()->GetTPCNcls()<fCutsRC->GetMinNClustersTPC()) return;
447 if (!infoRC->GetESDtrack()->GetConstrainedParam()) return;
448
449// calculate and set prim. vertex
450 fVertex->SetXv( infoMC->GetParticle().Vx() - dv[0] );
451 fVertex->SetYv( infoMC->GetParticle().Vy() - dv[1] );
452 fVertex->SetZv( infoMC->GetParticle().Vz() - dv[2] );
453
454 // constrained parameters resolution
455 const AliExternalTrackParam * cparam = infoRC->GetESDtrack()->GetConstrainedParam();
456 deltaPt= (mcpt-cparam->Pt())/mcpt;
457 pullPt= (1/mcpt-cparam->OneOverPt())/TMath::Sqrt(cparam->GetSigma1Pt2());
458 deltaPhi = TMath::ATan2(cparam->Py(),cparam->Px())-
459 TMath::ATan2(infoMC->GetParticle().Py(),infoMC->GetParticle().Px());
460 pullPhi = deltaPhi/TMath::Sqrt(cparam->GetSigmaSnp2());
461 deltaTan = TMath::ATan2(cparam->Pz(),cparam->Pt())-TMath::ATan2(infoMC->GetParticle().Pz(),infoMC->GetParticle().Pt());
462 pullTan = deltaPhi/TMath::Sqrt(cparam->GetSigmaSnp2());
463
464
465 delta1Pt2 = (1/mcpt-cparam->OneOverPt())/TMath::Power(1+1/mcpt,2);
466
467 deltaY1Pt = (infoMC->GetParticle().Vy()-cparam->GetY()) / (0.2+1/mcpt);
468 deltaZ1Pt = (infoMC->GetParticle().Vz()-cparam->GetZ()) / (0.2+1/mcpt);
469 deltaPhi1Pt = deltaPhi / (0.1+1/mcpt);
470 deltaTheta1Pt = deltaTan / (0.1+1/mcpt);
471
472 // calculate track parameters at vertex
473 const AliExternalTrackParam *innerTPC = 0;
474 if ((innerTPC = infoRC->GetESDtrack()->GetTPCInnerParam()) != 0)
475 {
476 if ((track = new AliExternalTrackParam(*infoRC->GetESDtrack()->GetTPCInnerParam())) != 0 )
477 {
96b3109a 478 Bool_t bDCAStatus = track->PropagateToDCA(fVertex,field,kMaxD,dca,cov);
479
480 // Fill parametrisation histograms (only TPC track)
3baa4bfd 481 if(bDCAStatus)
96b3109a 482 {
483 deltaPtTPC= (mcpt-innerTPC->Pt())/mcpt;
484 pullPtTPC= (1/mcpt-innerTPC->OneOverPt())/TMath::Sqrt(innerTPC->GetSigma1Pt2());
485 deltaPhiTPC = TMath::ATan2(innerTPC->Py(),innerTPC->Px())-
486 TMath::ATan2(infoMC->GetParticle().Py(),infoMC->GetParticle().Px());
487
488 deltaTanTPC = TMath::ATan2(innerTPC->Pz(),innerTPC->Pt())-
489 TMath::ATan2(infoMC->GetParticle().Pz(),infoMC->GetParticle().Pt());
490
491 delta1Pt2TPC = (1/mcpt-innerTPC->OneOverPt())/TMath::Power(1+1/mcpt,2);
492 deltaY1PtTPC= (infoMC->GetParticle().Vy()-innerTPC->GetY()) / (0.2+1/mcpt);
493 deltaZ1PtTPC = (infoMC->GetParticle().Vz()-innerTPC->GetZ()) / (0.2+1/mcpt);
494 deltaPhi1PtTPC = deltaPhiTPC / (0.1+1/mcpt);
495 deltaTheta1PtTPC = deltaTanTPC / (0.1+1/mcpt);
496
3baa4bfd 497 fC1Pt2ResolS1PtTPC->Fill(s1mcpt,delta1Pt2TPC);
498 fCYResolS1PtTPC->Fill(s1mcpt,deltaY1PtTPC);
499 fCZResolS1PtTPC->Fill(s1mcpt,deltaZ1PtTPC);
500 fCPhiResolS1PtTPC->Fill(s1mcpt,deltaPhi1PtTPC);
501 fCThetaResolS1PtTPC->Fill(s1mcpt,deltaTheta1PtTPC);
96b3109a 502 }
503 delete track;
504 }
505 }
506
507 // TPC and ITS (nb. of clusters >2) in the system
508 if(infoRC->GetESDtrack()->GetITSclusters(clusterITS)>2)
509 {
3baa4bfd 510 fC1Pt2ResolS1PtTPCITS->Fill(s1mcpt,delta1Pt2);
511 fCYResolS1PtTPCITS->Fill(s1mcpt,deltaY1Pt);
512 fCZResolS1PtTPCITS->Fill(s1mcpt,deltaZ1Pt);
513 fCPhiResolS1PtTPCITS->Fill(s1mcpt,deltaPhi1Pt);
514 fCThetaResolS1PtTPCITS->Fill(s1mcpt,deltaTheta1Pt);
96b3109a 515 }
516
517 // Fill histograms
518 fCPtResolTan->Fill(tantheta,deltaPt);
519 fCPtPullTan->Fill(tantheta,pullPt);
520 fCPhiResolTan->Fill(tantheta,deltaPhi);
521 fCPhiPullTan->Fill(tantheta,pullPhi);
522 fCTanResolTan->Fill(tantheta,deltaTan);
523 fCTanPullTan->Fill(tantheta,pullTan);
524}
525
526//_____________________________________________________________________________
527void AliComparisonRes::Exec(AliMCInfo* infoMC, AliESDRecInfo *infoRC){
528
529 // Process comparison information
530 Process(infoMC,infoRC);
531 ProcessConstrained(infoMC,infoRC);
532}
533
534//_____________________________________________________________________________
535TH1F* AliComparisonRes::MakeResol(TH2F * his, Int_t integ, Bool_t type){
536 // Create resolution histograms
537
538 TH1F *hisr, *hism;
539 if (!gPad) new TCanvas;
540 hisr = AliTreeDraw::CreateResHistoI(his,&hism,integ);
541 if (type) return hism;
542 else
543 return hisr;
544}
545
546//_____________________________________________________________________________
547void AliComparisonRes::Analyse(){
3baa4bfd 548 // Analyse comparison information and store output histograms
549 // in the folder "folderRes"
550 //
551
552 TH1::AddDirectory(kFALSE);
553
96b3109a 554 AliComparisonRes * comp=this;
3baa4bfd 555 TFolder *folder = comp->GetAnalysisFolder();
96b3109a 556 TH1F *hiss=0;
557
3baa4bfd 558 // recreate folder every time
559 if(folder) delete folder;
560 folder = CreateFolder("folderRes","Analysis Res Folder");
561 folder->SetOwner();
562
563 // write results in the folder
96b3109a 564
565 TCanvas * c = new TCanvas("Phi resol Tan","Phi resol Tan");
566 c->cd();
567 //
568 hiss = comp->MakeResol(comp->fCPtResolTan,1,0);
569 hiss->SetXTitle("Tan(#theta)");
570 hiss->SetYTitle("#sigmap_{t}/p_{t}");
571 hiss->Draw();
3baa4bfd 572 hiss->SetName("CptResolTan");
573
574 if(folder) folder->Add(hiss);
575
96b3109a 576 //
577 hiss = comp->MakeResol(comp->fCPhiResolTan,1,0);
578 hiss->SetXTitle("Tan(#theta)");
579 hiss->SetYTitle("#sigma#phi (rad)");
580 hiss->Draw();
3baa4bfd 581 hiss->SetName("PhiResolTan");
582
583 if(folder) folder->Add(hiss);
96b3109a 584 //
585 hiss = comp->MakeResol(comp->fCTanResolTan,1,0);
586 hiss->SetXTitle("Tan(#theta)");
587 hiss->SetYTitle("#sigma#theta (rad)");
588 hiss->Draw();
3baa4bfd 589 hiss->SetName("ThetaResolTan");
590
591 if(folder) folder->Add(hiss);
96b3109a 592 //
593 hiss = comp->MakeResol(comp->fCPtPullTan,1,0);
594 hiss->SetXTitle("Tan(#theta)");
595 hiss->SetYTitle("1/mcp_{t}-1/p_{t}/#Sigma(1/p_{t})");
596 hiss->Draw();
3baa4bfd 597 hiss->SetName("CptPullTan");
598
599 if(folder) folder->Add(hiss);
96b3109a 600 //
3baa4bfd 601 hiss = comp->MakeResol(comp->fC1Pt2ResolS1PtTPC,1,0);
96b3109a 602 hiss->SetXTitle("1/mcp_{t}");
603 hiss->SetYTitle("1/mcp_{t}-1/p_{t}/(1+1/p_{t})^2");
604 hiss->Draw();
3baa4bfd 605 hiss->SetName("C1Pt2ResolS1PtTPC");
606
607 if(folder) folder->Add(hiss);
96b3109a 608
3baa4bfd 609 hiss = comp->MakeResol(comp->fC1Pt2ResolS1PtTPCITS,1,0);
96b3109a 610 hiss->SetXTitle("1/mcp_{t}");
611 hiss->SetYTitle("1/mcp_{t}-1/p_{t}/(1+1/p_{t})^2");
612 hiss->Draw();
3baa4bfd 613 hiss->SetName("C1Pt2ResolS1PtTPCITS");
614
615 if(folder) folder->Add(hiss);
96b3109a 616 //
3baa4bfd 617 hiss = comp->MakeResol(comp->fCYResolS1PtTPC,1,0);
96b3109a 618 hiss->SetXTitle("1/mcp_{t}");
619 hiss->SetYTitle("(mcy-y)/(0.2+1/mcp_{t})");
620 hiss->Draw();
3baa4bfd 621 hiss->SetName("CYResolS1PtTPC");
622
623 if(folder) folder->Add(hiss);
96b3109a 624
3baa4bfd 625 hiss = comp->MakeResol(comp->fCYResolS1PtTPCITS,1,0);
96b3109a 626 hiss->SetXTitle("1/mcp_{t}");
627 hiss->SetYTitle("(mcy-y)/(0.2+1/mcp_{t})");
628 hiss->Draw();
3baa4bfd 629 hiss->SetName("CYResolS1PtTPCITS");
630
631 if(folder) folder->Add(hiss);
96b3109a 632 //
3baa4bfd 633 hiss = comp->MakeResol(comp->fCZResolS1PtTPC,1,0);
96b3109a 634 hiss->SetXTitle("1/mcp_{t}");
635 hiss->SetYTitle("(mcz-z)/(0.2+1/mcp_{t})");
636 hiss->Draw();
3baa4bfd 637 hiss->SetName("CZResolS1PtTPC");
638
639 if(folder) folder->Add(hiss);
96b3109a 640
3baa4bfd 641 hiss = comp->MakeResol(comp->fCZResolS1PtTPCITS,1,0);
96b3109a 642 hiss->SetXTitle("1/mcp_{t}");
643 hiss->SetYTitle("(mcz-z)/(0.2+1/mcp_{t})");
644 hiss->Draw();
3baa4bfd 645 hiss->SetName("CZResolS1PtTPCITS");
646
647 if(folder) folder->Add(hiss);
96b3109a 648 //
3baa4bfd 649 hiss = comp->MakeResol(comp->fCPhiResolS1PtTPC,1,0);
96b3109a 650 hiss->SetXTitle("1/mcp_{t}");
651 hiss->SetYTitle("(mc#phi-#phi)/(0.1+1/mcp_{t})");
652 hiss->Draw();
3baa4bfd 653 hiss->SetName("CPhiResolS1PtTPC");
654
655 if(folder) folder->Add(hiss);
96b3109a 656
3baa4bfd 657 hiss = comp->MakeResol(comp->fCPhiResolS1PtTPCITS,1,0);
96b3109a 658 hiss->SetXTitle("1/mcp_{t}");
659 hiss->SetYTitle("(mc#phi-#phi)/(0.1+1/mcp_{t})");
660 hiss->Draw();
3baa4bfd 661 hiss->SetName("CPhiResolS1PtTPCITS");
662
663 if(folder) folder->Add(hiss);
96b3109a 664 //
3baa4bfd 665 hiss = comp->MakeResol(comp->fCThetaResolS1PtTPC,1,0);
96b3109a 666 hiss->SetXTitle("1/mcp_{t}");
667 hiss->SetYTitle("(mc#theta-#theta)/(0.1+1/mcp_{t})");
668 hiss->Draw();
3baa4bfd 669 hiss->SetName("CThetaResolS1PtTPC");
670
671 if(folder) folder->Add(hiss);
96b3109a 672
3baa4bfd 673 hiss = comp->MakeResol(comp->fCThetaResolS1PtTPCITS,1,0);
96b3109a 674 hiss->SetXTitle("1/mcp_{t}");
675 hiss->SetYTitle("(mc#theta-#theta)/(0.1+1/mcp_{t})");
676 hiss->Draw();
3baa4bfd 677 hiss->SetName("CThetaResolS1PtTPCITS");
678
679 if(folder) folder->Add(hiss);
96b3109a 680
681 //
3baa4bfd 682 hiss = comp->MakeResol(comp->f1Pt2ResolS1PtTPC,1,0);
96b3109a 683 hiss->SetXTitle("1/mcp_{t}");
684 hiss->SetYTitle("1/mcp_{t}-1/p_{t}/(1+1/p_{t})^2");
685 hiss->Draw();
3baa4bfd 686 hiss->SetName("OnePt2ResolS1PtTPC");
687
688 if(folder) folder->Add(hiss);
96b3109a 689
3baa4bfd 690 hiss = comp->MakeResol(comp->f1Pt2ResolS1PtTPCITS,1,0);
96b3109a 691 hiss->SetXTitle("1/mcp_{t}");
692 hiss->SetYTitle("1/mcp_{t}-1/p_{t}/(1+1/p_{t})^2");
693 hiss->Draw();
3baa4bfd 694 hiss->SetName("OnePt2ResolS1PtTPCITS");
695
696 if(folder) folder->Add(hiss);
96b3109a 697 //
3baa4bfd 698 hiss = comp->MakeResol(comp->fYResolS1PtTPC,1,0);
96b3109a 699 hiss->SetXTitle("1/mcp_{t}");
700 hiss->SetYTitle("(mcy-y)/(0.2+1/mcp_{t})");
701 hiss->Draw();
3baa4bfd 702 hiss->SetName("YResolS1PtTPC");
703
704 if(folder) folder->Add(hiss);
96b3109a 705
3baa4bfd 706 hiss = comp->MakeResol(comp->fYResolS1PtTPCITS,1,0);
96b3109a 707 hiss->SetXTitle("1/mcp_{t}");
708 hiss->SetYTitle("(mcy-y)/(0.2+1/mcp_{t})");
709 hiss->Draw();
3baa4bfd 710 hiss->SetName("YResolS1PtTPCITS");
711
712 if(folder) folder->Add(hiss);
96b3109a 713 //
3baa4bfd 714 hiss = comp->MakeResol(comp->fZResolS1PtTPC,1,0);
96b3109a 715 hiss->SetXTitle("1/mcp_{t}");
716 hiss->SetYTitle("(mcz-z)/(0.2+1/mcp_{t})");
717 hiss->Draw();
3baa4bfd 718 hiss->SetName("ZResolS1PtTPC");
719
720 if(folder) folder->Add(hiss);
96b3109a 721
3baa4bfd 722 hiss = comp->MakeResol(comp->fZResolS1PtTPCITS,1,0);
96b3109a 723 hiss->SetXTitle("1/mcp_{t}");
724 hiss->SetYTitle("(mcz-z)/(0.2+1/mcp_{t})");
725 hiss->Draw();
3baa4bfd 726 hiss->SetName("ZResolS1PtTPCITS");
727
728 if(folder) folder->Add(hiss);
96b3109a 729 //
3baa4bfd 730 hiss = comp->MakeResol(comp->fPhiResolS1PtTPC,1,0);
96b3109a 731 hiss->SetXTitle("1/mcp_{t}");
732 hiss->SetYTitle("(mc#phi-#phi)/(0.1+1/mcp_{t})");
733 hiss->Draw();
3baa4bfd 734 hiss->SetName("PhiResolS1PtTPC");
735
736 if(folder) folder->Add(hiss);
96b3109a 737
3baa4bfd 738 hiss = comp->MakeResol(comp->fPhiResolS1PtTPCITS,1,0);
96b3109a 739 hiss->SetXTitle("1/mcp_{t}");
740 hiss->SetYTitle("(mc#phi-#phi)/(0.1+1/mcp_{t})");
741 hiss->Draw();
3baa4bfd 742 hiss->SetName("PhiResolS1PtTPCITS");
743
744 if(folder) folder->Add(hiss);
96b3109a 745 //
3baa4bfd 746 hiss = comp->MakeResol(comp->fThetaResolS1PtTPC,1,0);
96b3109a 747 hiss->SetXTitle("1/mcp_{t}");
748 hiss->SetYTitle("(mc#theta-#theta)/(0.1+1/mcp_{t})");
749 hiss->Draw();
3baa4bfd 750 hiss->SetName("ThetaResolS1PtTPC");
751
752 if(folder) folder->Add(hiss);
96b3109a 753
3baa4bfd 754 hiss = comp->MakeResol(comp->fThetaResolS1PtTPCITS,1,0);
96b3109a 755 hiss->SetXTitle("1/mcp_{t}");
756 hiss->SetYTitle("(mc#theta-#theta)/(0.1+1/mcp_{t})");
757 hiss->Draw();
3baa4bfd 758 hiss->SetName("ThetaResolS1PtTPCITS");
759
760 if(folder) folder->Add(hiss);
96b3109a 761
3baa4bfd 762 // set pointer to fAnalysisFolder
763 fAnalysisFolder = folder;
96b3109a 764}
765
766//_____________________________________________________________________________
767Long64_t AliComparisonRes::Merge(TCollection* list)
768{
769 // Merge list of objects (needed by PROOF)
770
771 if (!list)
772 return 0;
773
774 if (list->IsEmpty())
775 return 1;
776
777 TIterator* iter = list->MakeIterator();
778 TObject* obj = 0;
779
780 // collection of generated histograms
781 Int_t count=0;
782 while((obj = iter->Next()) != 0)
783 {
784 AliComparisonRes* entry = dynamic_cast<AliComparisonRes*>(obj);
785 if (entry == 0) continue;
786
787 fPtResolLPT->Add(entry->fPtResolLPT);
788 fPtResolHPT->Add(entry->fPtResolHPT);
789 fPtPullLPT->Add(entry->fPtPullLPT);
790 fPtPullHPT->Add(entry->fPtPullHPT);
791
792 // Histograms for 1/pt parameterisation
3baa4bfd 793 f1Pt2ResolS1PtTPC->Add(entry->f1Pt2ResolS1PtTPC);
794 fYResolS1PtTPC->Add(entry->fYResolS1PtTPC);
795 fZResolS1PtTPC->Add(entry->fZResolS1PtTPC);
796 fPhiResolS1PtTPC->Add(entry->fPhiResolS1PtTPC);
797 fThetaResolS1PtTPC->Add(entry->fThetaResolS1PtTPC);
798
799 f1Pt2ResolS1PtTPCITS->Add(entry->f1Pt2ResolS1PtTPCITS);
800 fYResolS1PtTPCITS->Add(entry->fYResolS1PtTPCITS);
801 fZResolS1PtTPCITS->Add(entry->fZResolS1PtTPCITS);
802 fPhiResolS1PtTPCITS->Add(entry->fPhiResolS1PtTPCITS);
803 fThetaResolS1PtTPCITS->Add(entry->fThetaResolS1PtTPCITS);
96b3109a 804
805 // Resolution histograms (constrained param)
806 fCPhiResolTan->Add(entry->fCPhiResolTan);
807 fCTanResolTan->Add(entry->fCTanResolTan);
808 fCPtResolTan->Add(entry->fCPtResolTan);
809 fCPhiPullTan->Add(entry->fCPhiPullTan);
810 fCTanPullTan->Add(entry->fCTanPullTan);
811 fCPtPullTan->Add(entry->fCPtPullTan);
812
813 // Histograms for 1/pt parameterisation (constrained)
3baa4bfd 814 fC1Pt2ResolS1PtTPC->Add(entry->fC1Pt2ResolS1PtTPC);
815 fCYResolS1PtTPC->Add(entry->fCYResolS1PtTPC);
816 fCZResolS1PtTPC->Add(entry->fCZResolS1PtTPC);
817 fCPhiResolS1PtTPC->Add(entry->fCPhiResolS1PtTPC);
818 fCThetaResolS1PtTPC->Add(entry->fCThetaResolS1PtTPC);
819
820 fC1Pt2ResolS1PtTPCITS->Add(entry->fC1Pt2ResolS1PtTPCITS);
821 fCYResolS1PtTPCITS->Add(entry->fCYResolS1PtTPCITS);
822 fCZResolS1PtTPCITS->Add(entry->fCZResolS1PtTPCITS);
823 fCPhiResolS1PtTPCITS->Add(entry->fCPhiResolS1PtTPCITS);
824 fCThetaResolS1PtTPCITS->Add(entry->fCThetaResolS1PtTPCITS);
96b3109a 825
826 count++;
827 }
828
829return count;
830}
3baa4bfd 831
832//_____________________________________________________________________________
833TFolder* AliComparisonRes::CreateFolder(TString name,TString title) {
834// create folder for analysed histograms
835//
836TFolder *folder = 0;
837 folder = new TFolder(name.Data(),title.Data());
838
839 return folder;
840}