4 void PlotITSTrackingRes(TString filename="ITS.Performance.root",
6 Bool_t useAbsPdg=kTRUE,
10 Bool_t askITSrefit=kTRUE,
14 // Plot ITS tracking resolutions from ITS.Performance.root
20 if(gSystem->AccessPathName(filename.Data())) {
21 printf("file not found!\n");
24 TFile *file= TFile::Open(filename.Data());
25 cout<<"Opening file "<<filename.Data()<<endl;
27 TList *list = (TList*)file->Get("cOutputITS");
28 TDirectoryFile *dir=0;
30 dir=(TDirectoryFile*)file->GetDirectory("ITS_Performance");
31 if(dir) list = (TList*)dir->Get("cOutputITS");
35 TNtuple *ntTracks = (TNtuple*)list->FindObject("fNtupleESDTracks");
38 //Getting and Addressing NTuples
40 Float_t pt,ptmes,eta,phi,pdg,d0True,d0TV,d0zTV,sigmad0zTV,d0All,d0Oth,sigmad0Oth,ITSflag,sigmad0TV,sigmad0All;
42 ntTracks->SetBranchAddress("pt",&ptmes);
43 ntTracks->SetBranchAddress("ptMC",&pt);
44 ntTracks->SetBranchAddress("eta",&eta);
45 ntTracks->SetBranchAddress("phi",&phi);
46 ntTracks->SetBranchAddress("pdgMC",&pdg);
47 ntTracks->SetBranchAddress("d0MC",&d0True);
48 ntTracks->SetBranchAddress("d0MCv",&d0TV);
49 ntTracks->SetBranchAddress("z0MCv",&d0zTV);
50 ntTracks->SetBranchAddress("sigmad0MCv",&sigmad0TV);
51 ntTracks->SetBranchAddress("sigmaz0MCv",&sigmad0zTV);
52 ntTracks->SetBranchAddress("d0",&d0All);
53 ntTracks->SetBranchAddress("sigmad0",&sigmad0All);
54 ntTracks->SetBranchAddress("ITSflag",&ITSflag);
57 //make STANDARD Pt BINNING
59 const Int_t nPtBins=10;
60 Double_t ptbinning[2*nPtBins];
61 const Int_t numint=10;
62 Double_t ptmin[numint],lenghtbin[numint],stepbin[numint],interval[numint],steplenght;
63 Int_t nbinning[numint];
66 for(Int_t i=0;i<nPtBins;i++) nbinning[i]=1;
101 const Int_t dipnbin=10;
102 const Double_t lenghtbindip=0.1;//0.03;
103 const Double_t stepbindip=0.0;
104 const Double_t dipinterval=200;
107 // Double_t radice=TMath::Sqrt(2.)/2.; // |eta|<0.9
108 Double_t radice=0.; // all eta
110 Int_t ntracks,entries,ntotaltracks=0,nfaketr=0;
111 Double_t bin,sinteta,rms;
112 Double_t ptbin[nPtBins],dipbin[dipnbin],multptbin[nPtBins],multdipbin[dipnbin],ex[nPtBins],exdip[dipnbin];
113 Double_t sigmaResolutionTV[dipnbin][nPtBins],sigmaResolutionPtTV[nPtBins],errsigmResPtTV[nPtBins],meanResolutionPtTV[nPtBins],errmeanResPtTV[nPtBins],sigmaResolutionDipTV[dipnbin],errsigmResDipTV[dipnbin];
114 Double_t binpt,bindip,sigmaResolutionOV[dipnbin][nPtBins],sigmaResolutionPtOV[nPtBins],errsigmResPtOV[nPtBins],sigmaResolutionDipOV[dipnbin],errsigmResDipOV[dipnbin];
115 Double_t sigmaResolutionRV[dipnbin][nPtBins],sigmaResolutionPtRV[nPtBins],errsigmResPtRV[nPtBins],sigmaResolutionDipRV[dipnbin],errsigmResDipRV[dipnbin];
116 Double_t mediumsigmad0rphiPtTV[nPtBins],errmediumsigmad0rphiPtTV[nPtBins],mediumsigmad0rphiPtRV[nPtBins],errmediumsigmad0rphiPtRV[nPtBins],mediumsigmad0rphiPtOV[nPtBins],errmediumsigmad0rphiPtOV[nPtBins];
117 Double_t sigmaPullPtTV[nPtBins],errsigmPullPtTV[nPtBins],sigmaPullPtRV[nPtBins],errsigmPullPtRV[nPtBins],sigmaPullPtOV[nPtBins],errsigmPullPtOV[nPtBins];
118 Double_t sigmad0zResPtTV[nPtBins],errsigmd0zResPtTV[nPtBins];
119 // Double_t sigmad0zResPtRV[nPtBins],errsigmd0zResPtRV[nPtBins],sigmad0zResPtOV[nPtBins],errsigmd0zResPtOV[nPtBins];
120 Double_t sigmad0zPullPtTV[nPtBins],errsigmd0zPullPtTV[nPtBins];
121 Double_t sigmaPtResTV[nPtBins],errsigmPtResTV[nPtBins],meanPtResTV[nPtBins],errmeanPtResTV[nPtBins],sigmaCurvResTV[nPtBins],errsigmCurvResTV[nPtBins];
122 // Double_t sigmad0zPullPtRV[nPtBins],errsigmd0zPullPtRV[nPtBins],sigmad0zPullPtOV[nPtBins],errsigmd0zPullPtOV[nPtBins];
126 Float_t hptbin[nPtBins+1],hdipbin[dipnbin+1];
128 TF1 *gauss = new TF1("gauss","gaus",-10,10);
137 TGraphErrors *grPullTV;
138 TGraphErrors *grPullOV;
139 TGraphErrors *grPullRV;
141 TGraphErrors *grsigmad0rphiTV;
142 TGraphErrors *grsigmad0rphiRV;
143 TGraphErrors *grsigmad0rphiOV;
145 TGraphErrors *grd0zResTV;
146 //TGraphErrors *grd0zRes0OV;
147 //TGraphErrors *grd0zRes0RV;
149 TGraphErrors *grd0zPullTV;
150 //TGraphErrors *grd0zPull0OV;
151 //TGraphErrors *grd0zPull0RV;
152 TGraphErrors *grPtResTV;
153 TGraphErrors *grPtResMeanTV;
154 TGraphErrors *grCurvResTV;
156 TString numerobin,numerobin2,numerobinSigma,numerobinSigma2,numerobinPull,numerobinPull2,numerobind0zRes,numerobind0zPull,numerobind0zRes2,numerobind0zPull2,numerobinCurvRes,numerobinCurvRes2,numerobinPtRes,numerobinPtRes2,numerobin3,titlegraph1,titlegraph2,str=" ";
160 //DECLARING AND CONSTRUCTING HISTOGRAMS
162 TH1F **hFitResolutionTV=new TH1F*[dipnbin*nPtBins];
163 TH1F **hFitResolutionOV=new TH1F*[dipnbin*nPtBins];
164 TH1F **hFitResolutionRV=new TH1F*[dipnbin*nPtBins];
166 TH1F **hFitResolutionPtTV=new TH1F*[nPtBins];
167 TH1F **hFitResolutionPtRV=new TH1F*[nPtBins];
168 TH1F **hFitResolutionPtOV=new TH1F*[nPtBins];
170 TH1F **hFitsigmad0rphiPtTV=new TH1F*[nPtBins];
171 TH1F **hFitsigmad0rphiPtRV=new TH1F*[nPtBins];
172 TH1F **hFitsigmad0rphiPtOV=new TH1F*[nPtBins];
174 TH1F **hFitPullPtTV=new TH1F*[nPtBins];
175 TH1F **hFitPullPtRV=new TH1F*[nPtBins];
176 TH1F **hFitPullPtOV=new TH1F*[nPtBins];
178 TH1F **hFitd0zResPtTV=new TH1F*[nPtBins];
179 // TH1F **hFitd0zResPtRV=new TH1F*[nPtBins];
180 //TH1F **hFitd0zResPtOV=new TH1F*[nPtBins];
182 TH1F **hFitd0zPullPtTV=new TH1F*[nPtBins];
183 //TH1F **hFitd0zPullPtRV=new TH1F*[nPtBins];
184 //TH1F **hFitd0zPullPtOV=new TH1F*[nPtBins];
186 TH1F **hFitResolutionDipTV=new TH1F*[dipnbin];
187 TH1F **hFitResolutionDipRV=new TH1F*[dipnbin];
188 TH1F **hFitResolutionDipOV=new TH1F*[dipnbin];
190 TH1F **hFitPtResTV=new TH1F*[nPtBins];
191 TH1F **hFitCurvResTV=new TH1F*[nPtBins];
193 TH2F *hFitResPtDipTV;
194 TH2F *hFitResPtDipRV;
195 TH2F *hFitResPtDipOV;
200 for(Int_t v=0;v<dipnbin;v++) {
202 for (Int_t nint=0;nint<numint;nint++) {
203 for (Int_t k=0;k<nbinning[nint];k++) {
204 numerobin ="TranvDipResolution";
206 numerobin.Append("_");
207 numerobin+=(k+incycle);
208 numerobin.Append("bin");
210 numerobin2=numerobin;
211 numerobin.Append("TV");
212 hFitResolutionTV[v*nPtBins+k+incycle]=new TH1F(numerobin,numerobin,3*100,-2*interval[nint],2*interval[nint]);
213 // numerobin.Replace(24,25,"RV");
214 // cout<<numerobin<<endl;
216 numerobin=numerobin2;
217 numerobin2.Append("RV");
218 hFitResolutionRV[v*nPtBins+k+incycle]=new TH1F(numerobin2,numerobin2,3*100,-2*interval[nint],2*interval[nint]);
219 // cout<<numerobin2<<endl;
221 numerobin.Append("OV");
222 hFitResolutionOV[v*nPtBins+k+incycle]=new TH1F(numerobin,numerobin,3*100,-2*interval[nint],2*interval[nint]);
223 // cout<<numerobin<<endl;
225 // cout<<(v*nPtBins+k+incycle)<<endl;
227 incycle+=nbinning[nint];
231 for(Int_t v=0;v<dipnbin;v++) {
232 numerobin="DipResolution";
234 numerobin.Append("bin");
236 numerobin2=numerobin;
237 numerobin.Append("TV");
238 hFitResolutionDipTV[v]=new TH1F(numerobin,numerobin,3*100,-3*dipinterval,3*dipinterval);
240 numerobin=numerobin2;
241 numerobin2.Append("RV");
242 hFitResolutionDipRV[v]=new TH1F(numerobin2,numerobin2,3*100,-3*dipinterval,3*dipinterval);
244 numerobin.Append("OV");
245 hFitResolutionDipOV[v]=new TH1F(numerobin,numerobin,3*100,-3*dipinterval,3*dipinterval);
253 for (Int_t nint=0;nint<numint;nint++) {
254 for(Int_t k=0;k<nbinning[nint];k++) {
255 numerobin = "d0PtResolution";
256 numerobinSigma="d0rphiPtsigma";
257 numerobinPull="d0PtPull";
258 numerobind0zRes="d0zPtResolution";
259 numerobind0zPull="d0zPtPull";
260 numerobinPtRes="PtResolution";
261 numerobinCurvRes="CurvRes";
264 numerobin+=k+incycle;
265 numerobinSigma+=k+incycle;
266 numerobinPull+=k+incycle;
267 numerobind0zRes+=k+incycle;
268 numerobind0zPull+=k+incycle;
269 numerobinPtRes+=k+incycle;
270 numerobinCurvRes+=k+incycle;
272 numerobin.Append("bin");
273 numerobinSigma.Append("bin");
274 numerobinPull.Append("bin");
275 numerobind0zRes.Append("bin");
276 numerobind0zPull.Append("bin");
277 numerobinPtRes.Append("bin");
278 numerobinCurvRes.Append("bin");
281 numerobin2=numerobin;
282 numerobinSigma2=numerobinSigma;
283 numerobinPull2=numerobinPull;
284 numerobind0zRes2=numerobind0zRes;
285 numerobind0zPull2=numerobind0zPull;
286 numerobinPtRes2=numerobinPtRes;
287 numerobinCurvRes2=numerobinCurvRes;
289 numerobin.Append("TV");
290 hFitResolutionPtTV[k+incycle]=new TH1F(numerobin,numerobin,100,-2*interval[nint],2*interval[nint]);
291 hFitsigmad0rphiPtTV[k+incycle]=new TH1F(numerobinSigma,numerobinSigma,3*100,0.,4*interval[nint]);
292 numerobinPull.Append("TV");
293 hFitPullPtTV[k+incycle]=new TH1F(numerobinPull,numerobinPull,100,-4.,4.);
294 numerobind0zRes.Append("TV");
295 hFitd0zResPtTV[k+incycle]=new TH1F(numerobind0zRes,numerobind0zRes,3*100,-3*interval[nint],3*interval[nint]);
296 numerobind0zPull.Append("TV");
297 hFitd0zPullPtTV[k+incycle]=new TH1F(numerobind0zPull,numerobind0zPull,100,-4.,4.);
298 numerobinPtRes.Append("TV");
299 hFitPtResTV[k+incycle]=new TH1F(numerobinPtRes,numerobinPtRes,300,-1.,1.);
300 numerobinCurvRes.Append("TV");
301 hFitCurvResTV[k+incycle]=new TH1F(numerobinCurvRes,numerobinCurvRes,300,-1.,1.);
303 numerobin=numerobin2;
304 numerobinSigma=numerobinSigma2;
305 numerobin.Append("RV");
306 numerobinSigma.Append("RV");
307 hFitResolutionPtRV[k+incycle]=new TH1F(numerobin,numerobin,3*100,-2*interval[nint],2*interval[nint]);
308 hFitsigmad0rphiPtRV[k+incycle]=new TH1F(numerobinSigma,numerobinSigma,3*100,0.,4*interval[nint]);
309 numerobinPull=numerobinPull2;
310 numerobinPull.Append("RV");
311 hFitPullPtRV[k+incycle]=new TH1F(numerobinPull,numerobinPull,100,-4,4);
313 /* numerobind0zRes=numerobind0zRes2;
314 numerobind0zRes.Append("RV");
315 hFitd0zResPtRV[k+incycle]=new TH1F(numerobind0zRes,numerobind0zRes,3*100,-3*interval[nint],3*interval[nint]);
316 numerobind0zPull=numerobind0zPull2;
317 numerobind0zPull.Append("RV");
318 hFitd0zPullPtRV[k+incycle]=new TH1F(numerobind0zPull,numerobind0zPull,100,-4,4);
321 numerobin=numerobin2;
322 numerobin.Append("OV");
323 hFitResolutionPtOV[k+incycle]=new TH1F(numerobin,numerobin,3*100,-2*interval[nint],2*interval[nint]);
325 numerobinSigma=numerobinSigma2;
326 numerobinSigma.Append("OV");
327 hFitsigmad0rphiPtOV[k+incycle]=new TH1F(numerobinSigma,numerobinSigma,3*100,0.,4.*interval[nint]);
328 numerobinPull=numerobinPull2;
329 numerobinPull.Append("OV");
330 hFitPullPtOV[k+incycle]=new TH1F(numerobinPull,numerobinPull,100,-4,4);
332 /* numerobind0zRes=numerobind0zRes2;
333 numerobind0zRes.Append("OV");
334 hFitd0zResPtOV[k+incycle]=new TH1F(numerobind0zRes,numerobind0zRes,3*100,-3*interval[nint],3*interval[nint]);
335 numerobind0zPull=numerobind0zPull2;
336 numerobind0zPull.Append("OV");
337 hFitd0zPullPtOV[k+incycle]=new TH1F(numerobind0zPull,numerobind0zPull,100,-4,4);
341 multptbin[k+incycle]=0;
343 // hptbin[(k+incycle)+1]=0;
344 //hptbin[(k+incycle)]=0;
346 incycle+=nbinning[nint];
349 // binpt=lenghtbin+stepbin;
351 bindip=lenghtbindip+stepbindip;
358 // ------------ Loop on Tracks ----------
359 ntracks=ntTracks->GetEntries();
360 cout<<"Number of Tracks: "<<ntracks<<endl;
361 for (Int_t j=0;j<ntracks;j++) {
362 if(j%5000==0) printf("Reading track %d\n",j);
363 ntTracks->GetEvent(j);
374 if(TMath::Abs(eta)>0.9) continue;
375 //if(TMath::Abs(eta)<0.9 || TMath::Abs(eta)>1.4) continue;
376 Float_t theta = 2.*TMath::ATan(TMath::Exp(-eta));
377 //if(TMath::Abs(TMath::Abs(phi)-0.5*TMath::Pi())>0.5 || TMath::Abs(theta-0.5*TMath::Pi())>0.5) continue;
378 Bool_t isFake=kFALSE;
379 if(ITSflag<0) isFake=kTRUE;
380 //printf(" %d\n",ITSflag);
381 ITSflag=TMath::Abs(ITSflag);
382 //printf("%d\n",ITSflag);
383 Int_t ITSflagorig=ITSflag;
384 Int_t nTPCcls = (Int_t)(ITSflag/100000);
385 ITSflag -= nTPCcls*100000;
386 Int_t nITSclspart = (Int_t)(ITSflag/10000);
387 ITSflag -= nITSclspart*10000;
388 //printf("%d\n",ITSflag);
389 Int_t nITSclsassign = (Int_t)(ITSflag/1000);
390 ITSflag -= nITSclsassign*1000;
391 //printf("%d\n",ITSflag);
392 //printf("%d\n",ITSflag);
393 Int_t nITSsel=ITSnCluster(ITSflag);
395 //cout<<nITSsel<<" "<<nITSclsassign<<endl;
397 if(nTPCcls<=minTPCcls) continue;
399 if(useAbsPdg) pdg=TMath::Abs(pdg);
400 if(pdg!=pdgcode) continue;
404 if(TMath::Abs(nITSclsassign)<minITSpoints) continue;
406 if(askITSrefit && sigmad0TV<0.) continue;
408 if(TMath::Abs(d0True)>0.5) continue;//skipping secondaries tracks if asked
409 //consider only "part" (if "all" is set to 1 all particles are considered)
411 if(isFake) nfaketr++;
412 if(nofakes && isFake) continue; // reject fakes
415 //hPtResolutionOV->Fill(pt-ptmes);
416 //hPtResolutionRV->Fill(ptRV-ptmesRV);
417 //hPzResolutionOV->Fill(pz-pzmes);
418 //hPzResolutionRV->Fill(pzRV-pzmesRV);
420 sinteta=TMath::Sin(2*TMath::ATan(TMath::Exp(-eta)));
422 for(Int_t v=0;v<dipnbin;v++) {
423 if (v*bindip+radice<sinteta&&sinteta<=v*bindip+radice+lenghtbindip) { //printf("Prova2 %d \n",v);
425 for (Int_t k=0;k<nPtBins;k=k+1) {
427 hFitResolutionDipTV[v]->Fill(d0TV-d0True);
430 hFitResolutionDipRV[v]->Fill(d0All-d0True);
432 //if(sigmad0Oth>0.) {
433 // hFitResolutionDipOV[v]->Fill(d0Oth-d0True);
436 //Transverse Momentum bin
437 if(ptbinning[(1+kbox)*k]<pt&&pt<=ptbinning[(1+kbox)*k+1]) { //printf("Prova3 %d \n",k/2)
438 if(ptmes!=0.&&pt!=0.) {
439 hFitPtResTV[k]->Fill(ptmes/pt-1.);
440 hFitCurvResTV[k]->Fill(1/ptmes-1/pt);
442 hFitResolutionTV[v*nPtBins+k]->Fill(d0TV-d0True);
443 hFitResolutionPtTV[k]->Fill(d0TV-d0True);
444 //to calculate resolution on d0z we should have d0zTrue but we haven't. So we ask for the track being primary and then d0zTV is equal to the residual
445 if(TMath::Abs(d0True)<0.1) {
446 hFitd0zResPtTV[k]->Fill(d0zTV);
447 if(sigmad0zTV>0)hFitd0zPullPtTV[k]->Fill(d0zTV/sigmad0zTV);
450 hFitPullPtTV[k]->Fill((d0TV-d0True)/sigmad0TV);
451 hFitsigmad0rphiPtTV[k]->Fill(sigmad0TV);
454 hFitResolutionRV[v*nPtBins+k]->Fill(d0All-d0True);
455 hFitResolutionPtRV[k]->Fill(d0All-d0True);
457 hFitPullPtRV[k]->Fill((d0All-d0True)/sigmad0All);
458 hFitsigmad0rphiPtRV[k]->Fill(sigmad0All);
461 /*if(sigmad0Oth>=0.) {
462 hFitResolutionOV[v*nPtBins+k]->Fill(d0Oth-d0True);
463 hFitResolutionPtOV[k]->Fill(d0Oth-d0True);
465 hFitPullPtOV[k]->Fill((d0Oth-d0True)/sigmad0Oth);
466 hFitsigmad0rphiPtOV[k]->Fill(sigmad0Oth);
480 printf("Loop on ntuple finished \n");
483 for (Int_t k=0;k<nPtBins;k++) {
484 for (Int_t j=0;j<dipnbin;j++) {
485 hFitResolutionPtTV[k]->Add(hFitResolutionTV[j*nPtBins+k],1.);
486 hFitResolutionPtRV[k]->Add(hFitResolutionRV[j*nPtBins+k],1.);
487 hFitResolutionPtOV[k]->Add(hFitResolutionOV[j*nPtBins+k],1.);
489 hFitResolutionDipTV[j]->Add(hFitResolutionTV[j*nPtBins+k],1.);
490 hFitResolutionDipRV[j]->Add(hFitResolutionRV[j*nPtBins+k],1.);
491 hFitResolutionDipOV[j]->Add(hFitResolutionOV[j*nPtBins+k],1.);
496 gauss->SetRange(-dipinterval,dipinterval);
498 // pt and dip angle binning array for TGraphs: it reproduces the mean pt and angle of the intervals
499 for (Int_t v=0;v<dipnbin;v++) {
500 if (multdipbin[v]!=0) {
502 dipbin[v]=(dipbin[v]/multdipbin[v]);
504 hFitResolutionDipTV[v]->Fit("gauss","N,R");
505 sigmaResolutionDipTV[v]=gauss->GetParameter(2);
506 errsigmResDipTV[v]=gauss->GetParError(2);
508 hFitResolutionDipRV[v]->Fit("gauss","N,R");
509 sigmaResolutionDipRV[v]=gauss->GetParameter(2);
510 errsigmResDipRV[v]=gauss->GetParError(2);
512 hFitResolutionDipOV[v]->Fit("gauss","N,R");
513 sigmaResolutionDipOV[v]=gauss->GetParameter(2);
514 errsigmResDipOV[v]=gauss->GetParError(2);
516 hdipbin[v]=(Float_t)radice+v*bindip;
518 dipbin[v]=radice+v*bindip+lenghtbindip/2.;
521 sigmaResolutionDipTV[v]=0;
522 errsigmResDipTV[v]=0;
523 sigmaResolutionDipRV[v]=0;
524 errsigmResDipRV[v]=0;
525 sigmaResolutionDipOV[v]=0;
526 errsigmResDipTV[v]=0;
528 hdipbin[v]=(Float_t)radice+v*bindip;
532 hdipbin[dipnbin]=(Float_t)hdipbin[dipnbin-1]+bindip;
534 for (Int_t j=0;j<nPtBins;j++) {
535 if (multptbin[j]!=0) {
536 ptbin[j]=ptbin[j]/multptbin[j];
538 ptbin[j]=(ptbinning[j]+ptbinning[j+1])/2.;
540 hptbin[j]=(Float_t)ptbinning[j];
542 hptbin[nPtBins]=ptbinning[nPtBins];
546 for (Int_t nint=0;nint<numint;nint++) {
547 gauss->SetRange(-interval[nint],interval[nint]);
548 for (Int_t k=0;k<nbinning[nint];k++) {
550 rms=hFitPtResTV[k+incycle]->GetRMS();
551 gauss->SetRange(-3*rms,3*rms);
552 hFitPtResTV[k+incycle]->Fit("gauss","N,R");
553 sigmaPtResTV[k+incycle]=gauss->GetParameter(2);
554 errsigmPtResTV[k+incycle]=gauss->GetParError(2);
555 meanPtResTV[k+incycle]=gauss->GetParameter(1);
556 errmeanPtResTV[k+incycle]=gauss->GetParError(1);
558 rms=hFitCurvResTV[k+incycle]->GetRMS();
559 gauss->SetRange(-3*rms,3*rms);
560 hFitCurvResTV[k+incycle]->Fit("gauss","N,R");
561 sigmaCurvResTV[k+incycle]=gauss->GetParameter(2);
562 errsigmCurvResTV[k+incycle]=gauss->GetParError(2);
564 rms=hFitResolutionPtTV[k+incycle]->GetRMS();
565 gauss->SetRange(-3*rms,3*rms);
566 hFitResolutionPtTV[k+incycle]->Fit("gauss","N,R");
567 sigmaResolutionPtTV[k+incycle]=gauss->GetParameter(2);
568 errsigmResPtTV[k+incycle]=gauss->GetParError(2);
569 meanResolutionPtTV[k+incycle]=gauss->GetParameter(1);
570 errmeanResPtTV[k+incycle]=gauss->GetParError(1);
572 rms=hFitResolutionPtRV[k+incycle]->GetRMS();
573 gauss->SetRange(-3*rms,3*rms);
574 hFitResolutionPtRV[k+incycle]->Fit("gauss","N,R");
575 sigmaResolutionPtRV[k+incycle]=gauss->GetParameter(2);
576 errsigmResPtRV[k+incycle]=gauss->GetParError(2);
578 rms=hFitResolutionPtOV[k+incycle]->GetRMS();
579 gauss->SetRange(-3*rms,3*rms);
580 hFitResolutionPtOV[k+incycle]->Fit("gauss","N,R");
581 sigmaResolutionPtOV[k+incycle]=gauss->GetParameter(2);
582 errsigmResPtOV[k+incycle]=gauss->GetParError(2);
585 rms=hFitsigmad0rphiPtTV[k+incycle]->GetRMS();
586 gauss->SetRange(-3*rms,3*rms);
587 hFitsigmad0rphiPtTV[k+incycle]->Fit("gauss","N,R");
588 mediumsigmad0rphiPtTV[k+incycle]=gauss->GetParameter(2);
589 errmediumsigmad0rphiPtTV[k+incycle]=gauss->GetParError(2);*/
590 mediumsigmad0rphiPtTV[k+incycle]=hFitsigmad0rphiPtTV[k+incycle]->GetMean();
591 errmediumsigmad0rphiPtTV[k+incycle]=0;
594 rms=hFitsigmad0rphiPtRV[k+incycle]->GetRMS();
595 gauss->SetRange(-3*rms,3*rms);
596 hFitsigmad0rphiPtRV[k+incycle]->Fit("gauss","N,R");
597 mediumsigmad0rphiPtRV[k+incycle]=gauss->GetParameter(2);
598 errmediumsigmad0rphiPtRV[k+incycle]=gauss->GetParError(2);*/
599 mediumsigmad0rphiPtRV[k+incycle]=hFitsigmad0rphiPtRV[k+incycle]->GetMean();
600 errmediumsigmad0rphiPtRV[k+incycle]=0;
603 rms=hFitsigmad0rphiPtOV[k+incycle]->GetRMS();
604 gauss->SetRange(-3*rms,3*rms);
605 hFitsigmad0rphiPtOV[k+incycle]->Fit("gauss","N,R");
606 mediumsigmad0rphiPtOV[k+incycle]=gauss->GetParameter(2);
607 errmediumsigmad0rphiPtOV[k+incycle]=gauss->GetParError(2);*/
608 mediumsigmad0rphiPtOV[k+incycle]=hFitsigmad0rphiPtOV[k+incycle]->GetMean();
609 errmediumsigmad0rphiPtOV[k+incycle]=0;
611 rms=hFitPullPtTV[k+incycle]->GetRMS();
612 gauss->SetRange(-3*rms,3*rms);
613 hFitPullPtTV[k+incycle]->Fit("gauss","N,R");
614 sigmaPullPtTV[k+incycle]=gauss->GetParameter(2);
615 errsigmPullPtTV[k+incycle]=gauss->GetParError(2);
617 rms=hFitPullPtRV[k+incycle]->GetRMS();
618 gauss->SetRange(-3*rms,3*rms);
619 hFitPullPtRV[k+incycle]->Fit("gauss","N,R");
620 sigmaPullPtRV[k+incycle]=gauss->GetParameter(2);
621 errsigmPullPtRV[k+incycle]=gauss->GetParError(2);
623 rms=hFitPullPtOV[k+incycle]->GetRMS();
624 gauss->SetRange(-3*rms,3*rms);
625 hFitPullPtOV[k+incycle]->Fit("gauss","N,R");
626 sigmaPullPtOV[k+incycle]=gauss->GetParameter(2);
627 errsigmPullPtOV[k+incycle]=gauss->GetParError(2);
629 rms=hFitd0zResPtTV[k+incycle]->GetRMS();
630 gauss->SetRange(-3*rms,3*rms);
631 hFitd0zResPtTV[k+incycle]->Fit("gauss","N,R");
632 sigmad0zResPtTV[k+incycle]=gauss->GetParameter(2);
633 errsigmd0zResPtTV[k+incycle]=gauss->GetParError(2);
635 rms=hFitd0zPullPtTV[k+incycle]->GetRMS();
636 gauss->SetRange(-3*rms,3*rms);
637 hFitd0zPullPtTV[k+incycle]->Fit("gauss","N,R");
638 sigmad0zPullPtTV[k+incycle]=gauss->GetParameter(2);
639 errsigmd0zPullPtTV[k+incycle]=gauss->GetParError(2);
641 incycle+=nbinning[nint];
644 // hptbin[nPtBins]=hptbin[nPtBins-1]+lenghtbin;
647 hFitResPtDipTV=new TH2F("hFitResPtDipTV","The 3D histogram for Resolution in Pt*sin#theta space",nPtBins,hptbin,dipnbin,hdipbin);
648 hFitResPtDipRV=new TH2F("hFitResPtDipRV","The 3D histogram for Resolution in Pt*sin#theta space",nPtBins,hptbin,dipnbin,hdipbin);
649 hFitResPtDipOV=new TH2F("hFitResPtDipOV","The 3D histogram for Resolution in Pt*sin#theta space",nPtBins,hptbin,dipnbin,hdipbin);
652 for (Int_t v=0;v<dipnbin;v++) {
654 for (Int_t nint=0;nint<numint;nint++) {
655 gauss->SetRange(-interval[nint],interval[nint]);
656 for (Int_t k=0;k<nbinning[nint];k++) {
657 //gauss->SetRange(-interval,interval);
658 if(hFitResolutionOV[v*nPtBins+k+incycle]->GetEntries()>1.) {
659 // cout<<"v "<<v<<"ptbin"<<k+incycle<<endl;
660 cout<<hFitResolutionTV[v*nPtBins+k+incycle]->GetEntries()<<endl;
661 hFitResolutionTV[v*nPtBins+k+incycle]->Fit("gauss","N,R");
662 sigmaResolutionTV[v][k+incycle]=gauss->GetParameter(2);
663 hFitResPtDipTV->SetBinContent((k+incycle+1),v+1,sigmaResolutionTV[v][k+incycle]);
665 hFitResolutionRV[v*nPtBins+k+incycle]->Fit("gauss","N,R");
666 sigmaResolutionRV[v][k+incycle]=gauss->GetParameter(2);
667 hFitResPtDipRV->SetBinContent((k+incycle+1),v+1,sigmaResolutionRV[v][k+incycle]);
669 hFitResolutionOV[v*nPtBins+k+incycle]->Fit("gauss","N,R");
670 sigmaResolutionOV[v][k+incycle]=gauss->GetParameter(2);
671 hFitResPtDipOV->SetBinContent((k+incycle+1),v+1,sigmaResolutionOV[v][k+incycle]);
673 sigmaResolutionTV[v][k+incycle]=0;
674 sigmaResolutionRV[v][k+incycle]=0;
675 sigmaResolutionOV[v][k+incycle]=0;
676 hFitResPtDipTV->SetBinContent((k+incycle+1),v+1,sigmaResolutionTV[v][k+incycle]);
677 hFitResPtDipRV->SetBinContent((k+incycle+1),v+1,sigmaResolutionRV[v][k+incycle]);
678 hFitResPtDipOV->SetBinContent((k+incycle+1),v+1,sigmaResolutionOV[v][k+incycle]);
681 incycle+=nbinning[nint];
685 printf("########### Number of good tracks: %d ###########\n",np);
686 printf("########### Number of fake tracks: %d ###########\n",nfaketr);
689 //-------DRAWING TGRAPH--------
691 const int cWidth = 1400;
692 const int cHeight = 800;
694 TCanvas* c0 = new TCanvas("c0","c0",cWidth,cHeight);
697 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
698 gr0TV = new TGraphErrors(nPtBins,ptbin,sigmaResolutionPtTV,ex,errsigmResPtTV);
699 gr0TV->SetName("mygraphd0TV");
700 gr0TV->SetLineColor(1);
701 gr0TV->SetLineWidth(1);
702 gr0TV->SetMarkerColor(gMarkerColor);
703 gr0TV->SetMarkerStyle(21);
704 gr0TV->SetMarkerSize(1);
705 titlegraph1="d_{0}(r#phi) Resolution (MC vertex)";
706 gr0TV->SetTitle(titlegraph1);
707 gr0TV->GetXaxis()->SetTitle("p_{t} [GeV/c] ");
708 gr0TV->GetYaxis()->SetTitle("#sigma [#mu m]");
709 gr0TV->GetXaxis()->SetTitleSize(0.05);
710 gr0TV->GetYaxis()->SetTitleSize(0.05);
711 gr0TV->GetXaxis()->SetLabelSize(0.05);
712 gr0TV->GetYaxis()->SetLabelSize(0.05);
716 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
717 TGraphErrors *gr0meanTV = new TGraphErrors(nPtBins,ptbin,meanResolutionPtTV,ex,errmeanResPtTV);
718 gr0meanTV->SetName("mygraphmeand0TV");
719 gr0meanTV->SetLineColor(1);
720 gr0meanTV->SetLineWidth(1);
721 gr0meanTV->SetMarkerColor(gMarkerColor);
722 gr0meanTV->SetMarkerStyle(21);
723 gr0meanTV->SetMarkerSize(1);
724 titlegraph1="Mean of d_{0}(r#phi) residuals (MC vertex)";
725 gr0meanTV->SetTitle(titlegraph1);
726 gr0meanTV->GetXaxis()->SetTitle("p_{t} [GeV/c] ");
727 gr0meanTV->GetYaxis()->SetTitle("mean of residuals [#mu m]");
728 gr0meanTV->GetXaxis()->SetTitleSize(0.05);
729 gr0meanTV->GetYaxis()->SetTitleSize(0.05);
730 gr0meanTV->GetXaxis()->SetLabelSize(0.05);
731 gr0meanTV->GetYaxis()->SetLabelSize(0.05);
732 gr0meanTV->Draw("AP");
735 TCanvas* c1 = new TCanvas("c1","Resolution analysis dip Angle",cWidth,cHeight);
738 gr1TV = new TGraphErrors(dipnbin,dipbin,sigmaResolutionDipTV,exdip,errsigmResDipTV);
739 gr1TV->SetName("mygraph1TV");
740 gr1TV->SetLineColor(1);
741 gr1TV->SetLineWidth(1);
742 gr1TV->SetMarkerColor(gMarkerColor);
743 gr1TV->SetMarkerStyle(21);
744 gr1TV->SetMarkerSize(1);
745 titlegraph1="d_{0}(z) Resolution for ";
746 titlegraph1.Append(partforgraph);
747 titlegraph1.Append(" using True Vertex");
748 gr1TV->SetTitle(titlegraph1);
749 gr1TV->GetXaxis()->SetTitle("sin#theta ");
750 gr1TV->GetYaxis()->SetTitle("#sigma [#mu m]");
751 gr1TV->GetXaxis()->SetTitleSize(0.05);
752 gr1TV->GetYaxis()->SetTitleSize(0.05);
753 gr1TV->GetXaxis()->SetLabelSize(0.05);
754 gr1TV->GetYaxis()->SetLabelSize(0.05);
755 gr1TV->GetXaxis()->SetRangeUser(0.7,1);
756 gr1TV->GetYaxis()->SetRangeUser(0,100);
762 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
763 gr1RV = new TGraphErrors(dipnbin,dipbin,sigmaResolutionDipRV,exdip,errsigmResDipRV);
764 gr1RV->SetName("mygraph1RV");
765 gr1RV->SetLineColor(1);
766 gr1RV->SetLineWidth(1);
767 gr1RV->SetMarkerColor(gMarkerColor);
768 gr1RV->SetMarkerStyle(21);
769 gr1RV->SetMarkerSize(1);
770 titlegraph1="d_{0}(z) Resolution for ";
771 titlegraph1.Append(partforgraph);
772 titlegraph1.Append(" using Reconstructed Vertex");
773 gr1RV->SetTitle(titlegraph1);
774 gr1RV->GetXaxis()->SetTitle("sin#theta ");
775 gr1RV->GetYaxis()->SetTitle("#sigma [#mu m]");
776 gr1RV->GetXaxis()->SetTitleSize(0.05);
777 gr1RV->GetYaxis()->SetTitleSize(0.05);
778 gr1RV->GetXaxis()->SetLabelSize(0.05);
779 gr1RV->GetYaxis()->SetLabelSize(0.05);
780 gr1RV->GetXaxis()->SetRangeUser(0.7,1);
781 gr1RV->GetYaxis()->SetRangeUser(0,100);
789 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
790 gr1OV = new TGraphErrors(dipnbin,dipbin,sigmaResolutionDipOV,exdip,errsigmResDipOV);
791 gr1OV->SetName("mygraph1OV");
792 gr1OV->SetLineColor(1);
793 gr1OV->SetLineWidth(1);
794 gr1OV->SetMarkerColor(gMarkerColor);
795 gr1OV->SetMarkerStyle(21);
796 gr1OV->SetMarkerSize(1);
797 titlegraph1="d_{0}(z) Resolution for ";
798 titlegraph1.Append(partforgraph);
799 titlegraph1.Append(" using Vertex on the Fly");
800 gr1OV->SetTitle(titlegraph1);
801 gr1OV->GetXaxis()->SetTitle("sin#theta ");
802 gr1OV->GetYaxis()->SetTitle("#sigma [#mu m]");
803 gr1OV->GetXaxis()->SetTitleSize(0.05);
804 gr1OV->GetYaxis()->SetTitleSize(0.05);
805 gr1OV->GetXaxis()->SetLabelSize(0.05);
806 gr1OV->GetYaxis()->SetLabelSize(0.05);
807 gr1OV->GetXaxis()->SetRangeUser(0.7,1);
808 gr1OV->GetYaxis()->SetRangeUser(0,100);
813 TCanvas* c2 = new TCanvas("c2","c2",cWidth,cHeight);
816 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
817 grPullTV = new TGraphErrors(nPtBins,ptbin,sigmaPullPtTV,ex,errsigmPullPtTV);
818 grPullTV->SetName("mygraphPullTV");
819 grPullTV->SetMinimum(0);
820 grPullTV->SetMaximum(1.5);
821 grPullTV->SetLineColor(1);
822 grPullTV->SetLineWidth(1);
823 grPullTV->SetMarkerColor(gMarkerColor);
824 grPullTV->SetMarkerStyle(21);
825 grPullTV->SetMarkerSize(1);
826 titlegraph1="d_{0}(r#phi) Pull (MC vertex)";
827 grPullTV->SetTitle(titlegraph1);
828 grPullTV->GetXaxis()->SetTitle("p_{t} [GeV/c] ");
829 grPullTV->GetYaxis()->SetTitle("");
830 grPullTV->GetXaxis()->SetTitleSize(0.05);
831 grPullTV->GetYaxis()->SetTitleSize(0.05);
832 grPullTV->GetXaxis()->SetLabelSize(0.05);
833 grPullTV->GetYaxis()->SetLabelSize(0.05);
834 grPullTV->Draw("AP");
836 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
837 grPullTV->Draw("AP");
840 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
841 grPullRV = new TGraphErrors(nPtBins,ptbin,sigmaPullPtRV,ex,errsigmPullPtRV);
842 grPullRV->SetName("mygraphPullRV");
843 grPullRV->SetMinimum(0);
844 grPullRV->SetMaximum(1.2);
845 grPullRV->SetLineColor(1);
846 grPullRV->SetLineWidth(1);
847 grPullRV->SetMarkerColor(gMarkerColor);
848 grPullRV->SetMarkerStyle(21);
849 grPullRV->SetMarkerSize(1);
850 titlegraph1="d_{0}(r#phi) Pull for using Reconstructed Vertex";
851 grPullRV->SetTitle(titlegraph1);
852 grPullRV->GetXaxis()->SetTitle("p_{t} [GeV/c] ");
853 grPullRV->GetYaxis()->SetTitle("");
854 grPullRV->GetXaxis()->SetTitleSize(0.05);
855 grPullRV->GetYaxis()->SetTitleSize(0.05);
856 grPullRV->GetXaxis()->SetLabelSize(0.05);
857 grPullRV->GetYaxis()->SetLabelSize(0.05);
858 grPullRV->Draw("AP");
861 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
862 grPullOV = new TGraphErrors(nPtBins,ptbin,sigmaPullPtOV,ex,errsigmPullPtOV);
863 grPullOV->SetName("mygraphPullOV");
864 grPullOV->SetMinimum(0);
865 grPullOV->SetMaximum(1.2);
866 grPullOV->SetLineColor(1);
867 grPullOV->SetLineWidth(1);
868 grPullOV->SetMarkerColor(gMarkerColor);
869 grPullOV->SetMarkerStyle(21);
870 grPullOV->SetMarkerSize(1);
871 titlegraph1="d_{0}(r#phi) Pull using Vertex on the Fly";
872 grPullOV->SetTitle(titlegraph1);
873 grPullOV->GetXaxis()->SetTitle("p_{t} [GeV/c] ");
874 grPullOV->GetYaxis()->SetTitle("");
875 grPullOV->GetXaxis()->SetTitleSize(0.05);
876 grPullOV->GetYaxis()->SetTitleSize(0.05);
877 grPullOV->GetXaxis()->SetLabelSize(0.05);
878 grPullOV->GetYaxis()->SetLabelSize(0.05);
879 grPullOV->Draw("AP");
882 TCanvas* c3 = new TCanvas("c3","c3",cWidth,cHeight);
885 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
886 grd0zResTV = new TGraphErrors(nPtBins,ptbin,sigmad0zResPtTV,ex,errsigmd0zResPtTV);
887 grd0zResTV->SetName("mygraphd0zResTV");
888 grd0zResTV->SetLineColor(1);
889 grd0zResTV->SetLineWidth(1);
890 grd0zResTV->SetMarkerColor(gMarkerColor);
891 grd0zResTV->SetMarkerStyle(21);
892 grd0zResTV->SetMarkerSize(1);
893 titlegraph1="d_{0}(z) Resolution (MC vertex)";
894 grd0zResTV->SetTitle(titlegraph1);
895 grd0zResTV->GetXaxis()->SetTitle("p_{t} [GeV/c] ");
896 grd0zResTV->GetYaxis()->SetTitle("#sigma [#mu m]");
897 grd0zResTV->GetXaxis()->SetTitleSize(0.05);
898 grd0zResTV->GetYaxis()->SetTitleSize(0.05);
899 grd0zResTV->GetXaxis()->SetLabelSize(0.05);
900 grd0zResTV->GetYaxis()->SetLabelSize(0.05);
901 grd0zResTV->Draw("AP");
903 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
904 grd0zPullTV = new TGraphErrors(nPtBins,ptbin,sigmad0zPullPtTV,ex,errsigmd0zPullPtTV);
905 grd0zPullTV->SetName("mygraphd0zPullTV");
906 grd0zPullTV->SetMinimum(0);
907 grd0zPullTV->SetMaximum(1.5);
908 grd0zPullTV->SetLineColor(1);
909 grd0zPullTV->SetLineWidth(1);
910 grd0zPullTV->SetMarkerColor(gMarkerColor);
911 grd0zPullTV->SetMarkerStyle(21);
912 grd0zPullTV->SetMarkerSize(1);
913 titlegraph1="d_{0}(z) Pull (MC vertex)";
914 grd0zPullTV->SetTitle(titlegraph1);
915 grd0zPullTV->GetXaxis()->SetTitle("p_{t} [GeV/c] ");
916 grd0zPullTV->GetYaxis()->SetTitle("");
917 grd0zPullTV->GetXaxis()->SetTitleSize(0.05);
918 grd0zPullTV->GetYaxis()->SetTitleSize(0.05);
919 grd0zPullTV->GetXaxis()->SetLabelSize(0.05);
920 grd0zPullTV->GetYaxis()->SetLabelSize(0.05);
921 grd0zPullTV->Draw("AP");
923 TCanvas* c4 = new TCanvas("c4","c4",cWidth,cHeight);
926 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
927 grPtResTV = new TGraphErrors(nPtBins,ptbin,sigmaPtResTV,ex,errsigmPtResTV);
928 grPtResTV->SetName("mygraphPtResTV");
929 grPtResTV->SetLineColor(1);
930 grPtResTV->SetLineWidth(1);
931 grPtResTV->SetMarkerColor(gMarkerColor);
932 grPtResTV->SetMarkerStyle(21);
933 grPtResTV->SetMarkerSize(1);
934 titlegraph1="p_{t}mes/p_{t}true - 1 ";
935 grPtResTV->SetTitle(titlegraph1);
936 grPtResTV->GetXaxis()->SetTitle("p_{t} [GeV/c] ");
937 grPtResTV->GetYaxis()->SetTitle("#sigma(p_{t}mes/p_{t}true- 1 ) ");
938 grPtResTV->GetXaxis()->SetTitleSize(0.05);
939 grPtResTV->GetYaxis()->SetTitleSize(0.05);
940 grPtResTV->GetXaxis()->SetLabelSize(0.05);
941 grPtResTV->GetYaxis()->SetLabelSize(0.05);
942 grPtResTV->GetYaxis()->SetRangeUser(0,0.025);
943 grPtResTV->Draw("AP");
945 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
946 grPtResMeanTV = new TGraphErrors(nPtBins,ptbin,meanPtResTV,ex,errmeanPtResTV);
947 grPtResMeanTV->SetName("mygraphPtResMeanTV");
948 grPtResMeanTV->SetLineColor(1);
949 grPtResMeanTV->SetLineWidth(1);
950 grPtResMeanTV->SetMarkerColor(gMarkerColor);
951 grPtResMeanTV->SetMarkerStyle(21);
952 grPtResMeanTV->SetMarkerSize(1);
953 titlegraph1="p_{t}mes/p_{t}true - 1 ";
954 grPtResMeanTV->SetTitle(titlegraph1);
955 grPtResMeanTV->GetXaxis()->SetTitle("p_{t} [GeV/c] ");
956 grPtResMeanTV->GetYaxis()->SetTitle("mean(p_{t}mes/p_{t}true - 1) ");
957 grPtResMeanTV->GetXaxis()->SetTitleSize(0.05);
958 grPtResMeanTV->GetYaxis()->SetTitleSize(0.05);
959 grPtResMeanTV->GetXaxis()->SetLabelSize(0.05);
960 grPtResMeanTV->GetYaxis()->SetLabelSize(0.05);
961 grPtResMeanTV->GetYaxis()->SetRangeUser(0,0.025);
962 grPtResMeanTV->Draw("AP");
964 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
965 grCurvResTV = new TGraphErrors(nPtBins,ptbin,sigmaCurvResTV,ex,errsigmCurvResTV);
966 grCurvResTV->SetName("mygraphCurvResTV");
967 grCurvResTV->SetLineColor(1);
968 grCurvResTV->SetLineWidth(1);
969 grCurvResTV->SetMarkerColor(gMarkerColor);
970 grCurvResTV->SetMarkerStyle(21);
971 grCurvResTV->SetMarkerSize(1);
972 titlegraph1="1/p_{t} Resolution ";
973 grCurvResTV->SetTitle(titlegraph1);
974 grCurvResTV->GetXaxis()->SetTitle("p_{t} [GeV/c] ");
975 grCurvResTV->GetYaxis()->SetTitle("#sigma(1/p_{t}) [1/(GeV/c)]");
976 grCurvResTV->GetXaxis()->SetTitleSize(0.05);
977 grCurvResTV->GetYaxis()->SetTitleSize(0.05);
978 grCurvResTV->GetXaxis()->SetLabelSize(0.05);
979 grCurvResTV->GetYaxis()->SetLabelSize(0.05);
980 grCurvResTV->Draw("AP");
984 TCanvas* c5 = new TCanvas("c5","Resolution analysis 2",cWidth,cHeight);
987 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
988 grsigmad0rphiTV = new TGraphErrors(nPtBins,ptbin,mediumsigmad0rphiPtTV,ex,errmediumsigmad0rphiPtTV);
989 grsigmad0rphiTV->SetName("mygraphsigmad0rphiTV");
990 grsigmad0rphiTV->SetLineColor(1);
991 grsigmad0rphiTV->SetLineWidth(1);
992 grsigmad0rphiTV->SetMarkerColor(gMarkerColor);
993 grsigmad0rphiTV->SetMarkerStyle(21);
994 grsigmad0rphiTV->SetMarkerSize(1);
995 titlegraph1="d_{0}(r#phi) Resolution Estimated from Cov. Matr (RelateToVtx) for ";
996 titlegraph1.Append(" using TV");
997 grsigmad0rphiTV->SetTitle(titlegraph1);
998 grsigmad0rphiTV->GetXaxis()->SetTitle("p_{t} [GeV/c] ");
999 grsigmad0rphiTV->GetYaxis()->SetTitle("#sigma [#mu m]");
1000 grsigmad0rphiTV->GetXaxis()->SetTitleSize(0.05);
1001 grsigmad0rphiTV->GetYaxis()->SetTitleSize(0.05);
1002 grsigmad0rphiTV->GetXaxis()->SetLabelSize(0.05);
1003 grsigmad0rphiTV->GetYaxis()->SetLabelSize(0.05);
1004 grsigmad0rphiTV->Draw("AP");
1006 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
1007 grsigmad0rphiRV = new TGraphErrors(nPtBins,ptbin,mediumsigmad0rphiPtRV,ex,errmediumsigmad0rphiPtRV);
1008 grsigmad0rphiRV->SetName("mygraphsigmad0rphiRV");
1009 grsigmad0rphiRV->SetLineColor(1);
1010 grsigmad0rphiRV->SetLineWidth(1);
1011 grsigmad0rphiRV->SetMarkerColor(gMarkerColor);
1012 grsigmad0rphiRV->SetMarkerStyle(21);
1013 grsigmad0rphiRV->SetMarkerSize(1);
1014 titlegraph1="d_{0}(r#phi) Resolution Estimated from Cov. Matr (RelateToVtx) for ";
1015 titlegraph1.Append(" using RVtx");
1016 grsigmad0rphiRV->SetTitle(titlegraph1);
1017 grsigmad0rphiRV->GetXaxis()->SetTitle("p_{t} [GeV/c] ");
1018 grsigmad0rphiRV->GetYaxis()->SetTitle("#sigma [#mu m]");
1019 grsigmad0rphiRV->GetXaxis()->SetTitleSize(0.05);
1020 grsigmad0rphiRV->GetYaxis()->SetTitleSize(0.05);
1021 grsigmad0rphiRV->GetXaxis()->SetLabelSize(0.05);
1022 grsigmad0rphiRV->GetYaxis()->SetLabelSize(0.05);
1023 grsigmad0rphiRV->Draw("AP");
1025 gPad->SetLogx(); gPad->SetGridx(); gPad->SetGridy();
1026 grsigmad0rphiOV = new TGraphErrors(nPtBins,ptbin,mediumsigmad0rphiPtOV,ex,errmediumsigmad0rphiPtOV);
1027 grsigmad0rphiOV->SetName("mygraphsigmad0rphiOV");
1028 grsigmad0rphiOV->SetLineColor(1);
1029 grsigmad0rphiOV->SetLineWidth(1);
1030 grsigmad0rphiOV->SetMarkerColor(gMarkerColor);
1031 grsigmad0rphiOV->SetMarkerStyle(21);
1032 grsigmad0rphiOV->SetMarkerSize(1);
1033 titlegraph1="d_{0}(r#phi) Resolution Estimated from Cov. Matr (RelateToVtx) for ";
1034 titlegraph1.Append(" using VtxOth");
1035 grsigmad0rphiOV->SetTitle(titlegraph1);
1036 grsigmad0rphiOV->GetXaxis()->SetTitle("p_{t} [GeV/c] ");
1037 grsigmad0rphiOV->GetYaxis()->SetTitle("#sigma [#mu m]");
1038 grsigmad0rphiOV->GetXaxis()->SetTitleSize(0.05);
1039 grsigmad0rphiOV->GetYaxis()->SetTitleSize(0.05);
1040 grsigmad0rphiOV->GetXaxis()->SetLabelSize(0.05);
1041 grsigmad0rphiOV->GetYaxis()->SetLabelSize(0.05);
1042 grsigmad0rphiOV->Draw("AP");
1048 //---------CLOSE EVRYTHING AND SAVE------------
1049 TFile *outfile = new TFile("ResolutionsAnalysis.root","recreate");
1051 for (Int_t i=0;i<nPtBins;i++) {
1052 hFitResolutionPtTV[i]->Write();
1053 hFitResolutionPtRV[i]->Write();
1054 hFitResolutionPtOV[i]->Write();
1055 delete hFitResolutionPtTV[i];//=0;
1056 delete hFitResolutionPtRV[i];//=0;
1057 delete hFitResolutionPtOV[i];
1058 hFitsigmad0rphiPtTV[i]->Write();
1059 hFitsigmad0rphiPtRV[i]->Write();
1060 hFitsigmad0rphiPtOV[i]->Write();
1061 delete hFitsigmad0rphiPtTV[i];//=0;
1062 delete hFitsigmad0rphiPtRV[i];//=0;
1063 delete hFitsigmad0rphiPtOV[i];
1064 hFitPullPtTV[i]->Write();
1065 hFitPullPtRV[i]->Write();
1066 hFitPullPtOV[i]->Write();
1067 delete hFitPullPtTV[i];//=0;
1068 delete hFitPullPtRV[i];//=0;
1069 delete hFitPullPtOV[i];
1070 hFitd0zResPtTV[i]->Write();
1071 hFitd0zPullPtTV[i]->Write();
1072 delete hFitd0zResPtTV[i];//=0;
1073 delete hFitd0zPullPtTV[i];//=0;
1074 hFitPtResTV[i]->Write();
1075 hFitCurvResTV[i]->Write();
1076 delete hFitPtResTV[i];//=0;
1077 delete hFitCurvResTV[i];//=0;
1078 for(Int_t j=0;j<dipnbin;j++) {
1079 hFitResolutionTV[j*nPtBins+i]->Write();
1080 hFitResolutionRV[j*nPtBins+i]->Write();
1081 hFitResolutionOV[j*nPtBins+i]->Write();
1082 delete hFitResolutionTV[j*nPtBins+i];//=0;
1083 delete hFitResolutionRV[j*nPtBins+i];//=0;
1084 delete hFitResolutionOV[j*nPtBins+i];
1087 for (Int_t i=0;i<dipnbin;i++) {
1088 hFitResolutionDipTV[i]->Write();
1089 hFitResolutionDipRV[i]->Write();
1090 hFitResolutionDipOV[i]->Write();
1091 delete hFitResolutionDipTV[i];//=0;
1092 delete hFitResolutionDipRV[i];//=0;
1093 delete hFitResolutionDipOV[i];//=0;
1096 // delete hFitResolutionPtTV;
1097 hFitResPtDipTV->Write();
1098 hFitResPtDipRV->Write();
1099 hFitResPtDipOV->Write();
1100 delete hFitResPtDipOV;
1101 delete hFitResPtDipTV;
1102 delete hFitResPtDipRV;
1112 //grsigmad0rphiTV->Write();
1113 //grsigmad0rphiRV->Write();
1114 //grsigmad0rphiOV->Write();
1116 grd0zResTV->Write();
1117 grd0zPullTV->Write();
1119 grPtResMeanTV->Write();
1120 grCurvResTV->Write();
1125 //grPullOV->Write();
1131 //-----------------------------------------------------------------------------
1132 Int_t ITSnCluster(Int_t ITSf) {
1134 Int_t nTPCclusters = (Int_t)(ITSf/1000);
1135 ITSf -= nTPCclusters*1000;
1136 Int_t sign,aITSf,n0,n3,aux,ITSsel;//be careful!:working with integer!
1139 aITSf=TMath::Abs(ITSf);
1141 else if (aITSf==ITSf)sign=1;
1142 else if(aITSf==-ITSf)sign=-1;
1144 if (aITSf/100<1)n0++;
1146 aux=(aITSf-(aITSf/100)*100);
1149 aux=(aux-(aux/10)*10);
1155 printf("Wrong ITSflag assignment! \n");
1160 //-----------------------------------------------------------------------------
1161 Bool_t kITSrefit(Double_t sigmd0TV) {
1162 //return TRUE if track was kITSrefit, FALSE otherwise (see AliTrackProperties.C)
1163 Bool_t kITSref=kTRUE;
1164 if (sigmd0TV<0.)kITSref=kFALSE;
1167 //-----------------------------------------------------------------------------
1168 void PlotResolutions() {
1170 TCanvas *c1a = new TCanvas("c1a","d0 resolution",0,0,800,800);
1174 TCanvas *c1b = new TCanvas("c1b","d0 mean",0,0,800,800);
1178 TCanvas *c1c = new TCanvas("c1c","d0 pull",0,0,800,800);
1183 TCanvas *c2a = new TCanvas("c2a","z0 resolution",0,0,800,800);
1187 TCanvas *c2c = new TCanvas("c2c","z0 pull",0,0,800,800);
1192 TCanvas *c3a = new TCanvas("c3a","pt resolution",0,0,800,800);
1196 TCanvas *c3b = new TCanvas("c3b","pt mean",0,0,800,800);
1201 TCanvas *c4 = new TCanvas("c4","d0 residuals",0,0,800,800);
1213 TCanvas *c5 = new TCanvas("c5","pt residuals",0,0,800,800);
1226 TLegend *leg1=new TLegend(0.5,0.5,0.9,0.9);
1227 leg1->SetFillStyle(0);
1228 leg1->SetBorderSize(0);
1229 TLegend *leg2=new TLegend(0.5,0.5,0.9,0.9);
1230 leg2->SetFillStyle(0);
1231 leg2->SetBorderSize(0);
1232 TGraph *mark20=new TGraph();
1233 mark20->SetMarkerColor(4);
1234 mark20->SetLineColor(4);
1235 mark20->SetMarkerStyle(20);
1236 leg1->AddEntry(mark20,"pions","p");
1237 leg2->AddEntry(mark20,"pions","l");
1238 TGraph *mark21=new TGraph();
1239 mark21->SetMarkerColor(2);
1240 mark21->SetLineColor(2);
1241 mark21->SetMarkerStyle(21);
1242 leg1->AddEntry(mark21,"electrons","p");
1243 leg2->AddEntry(mark21,"electrons","l");
1244 TGraph *mark25=new TGraph();
1245 mark25->SetMarkerColor(1);
1246 mark25->SetLineColor(1);
1247 mark25->SetMarkerStyle(25);
1248 leg1->AddEntry(mark25,"electrons (no brem)","p");
1249 leg2->AddEntry(mark25,"electrons (no brem)","l");
1250 TGraph *mark22=new TGraph();
1251 mark22->SetMarkerColor(6);
1252 mark22->SetLineColor(6);
1253 mark22->SetMarkerStyle(22);
1254 leg1->AddEntry(mark22,"kaons","p");
1255 leg2->AddEntry(mark22,"kaons","l");
1256 TGraph *mark23=new TGraph();
1257 mark23->SetMarkerColor(8);
1258 mark23->SetLineColor(8);
1259 mark23->SetMarkerStyle(23);
1260 leg1->AddEntry(mark23,"protons","p");
1261 leg2->AddEntry(mark23,"protons","l");
1264 TFile *f1=new TFile("boxPiv416Release_zero/ResolutionsAnalysis_Pi.root");
1266 mygraphd0TV->Draw("a,p");
1267 mygraphd0TV->SetMarkerColor(4);
1268 mygraphd0TV->SetMarkerStyle(20);
1271 mygraphmeand0TV->Draw("a,p");
1272 mygraphmeand0TV->SetMarkerColor(4);
1273 mygraphmeand0TV->SetMarkerStyle(20);
1276 mygraphPullTV->Draw("a,p");
1277 mygraphPullTV->SetMarkerColor(4);
1278 mygraphPullTV->SetMarkerStyle(20);
1281 mygraphd0zResTV->Draw("a,p");
1282 mygraphd0zResTV->SetMarkerColor(4);
1283 mygraphd0zResTV->SetMarkerStyle(20);
1286 mygraphd0zPullTV->Draw("a,p");
1287 mygraphd0zPullTV->SetMarkerColor(4);
1288 mygraphd0zPullTV->SetMarkerStyle(20);
1291 mygraphPtResTV->Draw("a,p");
1292 mygraphPtResTV->SetMarkerColor(4);
1293 mygraphPtResTV->SetMarkerStyle(20);
1296 mygraphPtResMeanTV->Draw("a,p");
1297 mygraphPtResMeanTV->SetMarkerColor(4);
1298 mygraphPtResMeanTV->SetMarkerStyle(20);
1301 d0PtResolution0binTV->Draw();
1302 d0PtResolution0binTV->SetLineColor(4);
1304 d0PtResolution1binTV->Draw();
1305 d0PtResolution1binTV->SetLineColor(4);
1307 d0PtResolution2binTV->Draw();
1308 d0PtResolution2binTV->SetLineColor(4);
1310 d0PtResolution3binTV->Draw();
1311 d0PtResolution3binTV->SetLineColor(4);
1313 d0PtResolution4binTV->Draw();
1314 d0PtResolution4binTV->SetLineColor(4);
1316 d0PtResolution5binTV->Draw();
1317 d0PtResolution5binTV->SetLineColor(4);
1319 d0PtResolution6binTV->Draw();
1320 d0PtResolution6binTV->SetLineColor(4);
1322 d0PtResolution7binTV->Draw();
1323 d0PtResolution7binTV->SetLineColor(4);
1325 d0PtResolution8binTV->Draw();
1326 d0PtResolution8binTV->SetLineColor(4);
1329 PtResolution0binTV->Draw();
1330 PtResolution0binTV->SetLineColor(4);
1332 PtResolution1binTV->Draw();
1333 PtResolution1binTV->SetLineColor(4);
1335 PtResolution2binTV->Draw();
1336 PtResolution2binTV->SetLineColor(4);
1338 PtResolution3binTV->Draw();
1339 PtResolution3binTV->SetLineColor(4);
1341 PtResolution4binTV->Draw();
1342 PtResolution4binTV->SetLineColor(4);
1344 PtResolution5binTV->Draw();
1345 PtResolution5binTV->SetLineColor(4);
1347 PtResolution6binTV->Draw();
1348 PtResolution6binTV->SetLineColor(4);
1350 PtResolution7binTV->Draw();
1351 PtResolution7binTV->SetLineColor(4);
1353 PtResolution8binTV->Draw();
1354 PtResolution8binTV->SetLineColor(4);
1360 TFile *f3=new TFile("boxKav416Release_zero/ResolutionsAnalysis_Ka.root");
1362 mygraphd0TV->Draw("p");
1363 mygraphd0TV->SetMarkerColor(6);
1364 mygraphd0TV->SetMarkerStyle(22);
1366 mygraphmeand0TV->Draw("p");
1367 mygraphmeand0TV->SetMarkerColor(6);
1368 mygraphmeand0TV->SetMarkerStyle(22);
1370 mygraphPullTV->Draw("p");
1371 mygraphPullTV->SetMarkerColor(6);
1372 mygraphPullTV->SetMarkerStyle(22);
1374 mygraphd0zResTV->Draw("p");
1375 mygraphd0zResTV->SetMarkerColor(6);
1376 mygraphd0zResTV->SetMarkerStyle(22);
1378 mygraphd0zPullTV->Draw("p");
1379 mygraphd0zPullTV->SetMarkerColor(6);
1380 mygraphd0zPullTV->SetMarkerStyle(22);
1382 mygraphPtResTV->Draw("p");
1383 mygraphPtResTV->SetMarkerColor(6);
1384 mygraphPtResTV->SetMarkerStyle(22);
1386 mygraphPtResMeanTV->Draw("p");
1387 mygraphPtResMeanTV->SetMarkerColor(6);
1388 mygraphPtResMeanTV->SetMarkerStyle(22);
1390 d0PtResolution0binTV->Draw("same");
1391 d0PtResolution0binTV->SetLineColor(6);
1393 d0PtResolution1binTV->Draw("same");
1394 d0PtResolution1binTV->SetLineColor(6);
1396 d0PtResolution2binTV->Draw("same");
1397 d0PtResolution2binTV->SetLineColor(6);
1399 d0PtResolution3binTV->Draw("same");
1400 d0PtResolution3binTV->SetLineColor(6);
1402 d0PtResolution4binTV->Draw("same");
1403 d0PtResolution4binTV->SetLineColor(6);
1405 d0PtResolution5binTV->Draw("same");
1406 d0PtResolution5binTV->SetLineColor(6);
1408 d0PtResolution6binTV->Draw("same");
1409 d0PtResolution6binTV->SetLineColor(6);
1411 d0PtResolution7binTV->Draw("same");
1412 d0PtResolution7binTV->SetLineColor(6);
1414 d0PtResolution8binTV->Draw("same");
1415 d0PtResolution8binTV->SetLineColor(6);
1417 PtResolution0binTV->Draw("same");
1418 PtResolution0binTV->SetLineColor(6);
1420 PtResolution1binTV->Draw("same");
1421 PtResolution1binTV->SetLineColor(6);
1423 PtResolution2binTV->Draw("same");
1424 PtResolution2binTV->SetLineColor(6);
1426 PtResolution3binTV->Draw("same");
1427 PtResolution3binTV->SetLineColor(6);
1429 PtResolution4binTV->Draw("same");
1430 PtResolution4binTV->SetLineColor(6);
1432 PtResolution5binTV->Draw("same");
1433 PtResolution5binTV->SetLineColor(6);
1435 PtResolution6binTV->Draw("same");
1436 PtResolution6binTV->SetLineColor(6);
1438 PtResolution7binTV->Draw("same");
1439 PtResolution7binTV->SetLineColor(6);
1441 PtResolution8binTV->Draw("same");
1442 PtResolution8binTV->SetLineColor(6);
1446 TFile *f4=new TFile("boxPrv416Release_zero/ResolutionsAnalysis_Pr.root");
1448 mygraphd0TV->Draw("p");
1449 mygraphd0TV->SetMarkerColor(8);
1450 mygraphd0TV->SetMarkerStyle(23);
1452 mygraphmeand0TV->Draw("p");
1453 mygraphmeand0TV->SetMarkerColor(8);
1454 mygraphmeand0TV->SetMarkerStyle(23);
1456 mygraphPullTV->Draw("p");
1457 mygraphPullTV->SetMarkerColor(8);
1458 mygraphPullTV->SetMarkerStyle(23);
1460 mygraphd0zResTV->Draw("p");
1461 mygraphd0zResTV->SetMarkerColor(8);
1462 mygraphd0zResTV->SetMarkerStyle(23);
1464 mygraphd0zPullTV->Draw("p");
1465 mygraphd0zPullTV->SetMarkerColor(8);
1466 mygraphd0zPullTV->SetMarkerStyle(23);
1468 mygraphPtResTV->Draw("p");
1469 mygraphPtResTV->SetMarkerColor(8);
1470 mygraphPtResTV->SetMarkerStyle(23);
1472 mygraphPtResMeanTV->Draw("p");
1473 mygraphPtResMeanTV->SetMarkerColor(8);
1474 mygraphPtResMeanTV->SetMarkerStyle(23);
1476 d0PtResolution0binTV->Draw("same");
1477 d0PtResolution0binTV->SetLineColor(8);
1479 d0PtResolution1binTV->Draw("same");
1480 d0PtResolution1binTV->SetLineColor(8);
1482 d0PtResolution2binTV->Draw("same");
1483 d0PtResolution2binTV->SetLineColor(8);
1485 d0PtResolution3binTV->Draw("same");
1486 d0PtResolution3binTV->SetLineColor(8);
1488 d0PtResolution4binTV->Draw("same");
1489 d0PtResolution4binTV->SetLineColor(8);
1491 d0PtResolution5binTV->Draw("same");
1492 d0PtResolution5binTV->SetLineColor(8);
1494 d0PtResolution6binTV->Draw("same");
1495 d0PtResolution6binTV->SetLineColor(8);
1497 d0PtResolution7binTV->Draw("same");
1498 d0PtResolution7binTV->SetLineColor(8);
1500 d0PtResolution8binTV->Draw("same");
1501 d0PtResolution8binTV->SetLineColor(8);
1503 PtResolution0binTV->Draw("same");
1504 PtResolution0binTV->SetLineColor(8);
1506 PtResolution1binTV->Draw("same");
1507 PtResolution1binTV->SetLineColor(8);
1509 PtResolution2binTV->Draw("same");
1510 PtResolution2binTV->SetLineColor(8);
1512 PtResolution3binTV->Draw("same");
1513 PtResolution3binTV->SetLineColor(8);
1515 PtResolution4binTV->Draw("same");
1516 PtResolution4binTV->SetLineColor(8);
1518 PtResolution5binTV->Draw("same");
1519 PtResolution5binTV->SetLineColor(8);
1521 PtResolution6binTV->Draw("same");
1522 PtResolution6binTV->SetLineColor(8);
1524 PtResolution7binTV->Draw("same");
1525 PtResolution7binTV->SetLineColor(8);
1527 PtResolution8binTV->Draw("same");
1528 PtResolution8binTV->SetLineColor(8);
1532 TFile *f2=new TFile("boxElv416Release_zero/ResolutionsAnalysis_El.root");
1534 mygraphd0TV->Draw("p");
1535 mygraphd0TV->SetMarkerColor(2);
1536 mygraphd0TV->SetMarkerStyle(21);
1538 mygraphmeand0TV->Draw("p");
1539 mygraphmeand0TV->SetMarkerColor(2);
1540 mygraphmeand0TV->SetMarkerStyle(21);
1542 mygraphPullTV->Draw("p");
1543 mygraphPullTV->SetMarkerColor(2);
1544 mygraphPullTV->SetMarkerStyle(21);
1546 mygraphd0zResTV->Draw("p");
1547 mygraphd0zResTV->SetMarkerColor(2);
1548 mygraphd0zResTV->SetMarkerStyle(21);
1550 mygraphd0zPullTV->Draw("p");
1551 mygraphd0zPullTV->SetMarkerColor(2);
1552 mygraphd0zPullTV->SetMarkerStyle(21);
1554 mygraphPtResTV->Draw("p");
1555 mygraphPtResTV->SetMarkerColor(2);
1556 mygraphPtResTV->SetMarkerStyle(21);
1558 mygraphPtResMeanTV->Draw("p");
1559 mygraphPtResMeanTV->SetMarkerColor(2);
1560 mygraphPtResMeanTV->SetMarkerStyle(21);
1562 d0PtResolution0binTV->Draw("same");
1563 d0PtResolution0binTV->SetLineColor(2);
1565 d0PtResolution1binTV->Draw("same");
1566 d0PtResolution1binTV->SetLineColor(2);
1568 d0PtResolution2binTV->Draw("same");
1569 d0PtResolution2binTV->SetLineColor(2);
1571 d0PtResolution3binTV->Draw("same");
1572 d0PtResolution3binTV->SetLineColor(2);
1574 d0PtResolution4binTV->Draw("same");
1575 d0PtResolution4binTV->SetLineColor(2);
1577 d0PtResolution5binTV->Draw("same");
1578 d0PtResolution5binTV->SetLineColor(2);
1580 d0PtResolution6binTV->Draw("same");
1581 d0PtResolution6binTV->SetLineColor(2);
1583 d0PtResolution7binTV->Draw("same");
1584 d0PtResolution7binTV->SetLineColor(2);
1586 d0PtResolution8binTV->Draw("same");
1587 d0PtResolution8binTV->SetLineColor(2);
1589 PtResolution0binTV->Draw("same");
1590 PtResolution0binTV->SetLineColor(2);
1592 PtResolution1binTV->Draw("same");
1593 PtResolution1binTV->SetLineColor(2);
1595 PtResolution2binTV->Draw("same");
1596 PtResolution2binTV->SetLineColor(2);
1598 PtResolution3binTV->Draw("same");
1599 PtResolution3binTV->SetLineColor(2);
1601 PtResolution4binTV->Draw("same");
1602 PtResolution4binTV->SetLineColor(2);
1604 PtResolution5binTV->Draw("same");
1605 PtResolution5binTV->SetLineColor(2);
1607 PtResolution6binTV->Draw("same");
1608 PtResolution6binTV->SetLineColor(2);
1610 PtResolution7binTV->Draw("same");
1611 PtResolution7binTV->SetLineColor(2);
1613 PtResolution8binTV->Draw("same");
1614 PtResolution8binTV->SetLineColor(2);
1616 // electrons, no bremsstrahlung
1617 TFile *f2=new TFile("boxElv416Release_zero/ResolutionsAnalysis_ElNoBrem.root");
1619 mygraphd0TV->Draw("p");
1620 mygraphd0TV->SetMarkerColor(1);
1621 mygraphd0TV->SetMarkerStyle(25);
1623 mygraphmeand0TV->Draw("p");
1624 mygraphmeand0TV->SetMarkerColor(1);
1625 mygraphmeand0TV->SetMarkerStyle(25);
1627 mygraphPullTV->Draw("p");
1628 mygraphPullTV->SetMarkerColor(1);
1629 mygraphPullTV->SetMarkerStyle(25);
1631 mygraphd0zResTV->Draw("p");
1632 mygraphd0zResTV->SetMarkerColor(1);
1633 mygraphd0zResTV->SetMarkerStyle(25);
1635 mygraphd0zPullTV->Draw("p");
1636 mygraphd0zPullTV->SetMarkerColor(1);
1637 mygraphd0zPullTV->SetMarkerStyle(25);
1639 mygraphPtResTV->Draw("p");
1640 mygraphPtResTV->SetMarkerColor(1);
1641 mygraphPtResTV->SetMarkerStyle(25);
1643 mygraphPtResMeanTV->Draw("p");
1644 mygraphPtResMeanTV->SetMarkerColor(1);
1645 mygraphPtResMeanTV->SetMarkerStyle(25);
1647 d0PtResolution0binTV->Draw("same");
1648 d0PtResolution0binTV->SetLineColor(1);
1650 d0PtResolution1binTV->Draw("same");
1651 d0PtResolution1binTV->SetLineColor(1);
1653 d0PtResolution2binTV->Draw("same");
1654 d0PtResolution2binTV->SetLineColor(1);
1656 d0PtResolution3binTV->Draw("same");
1657 d0PtResolution3binTV->SetLineColor(1);
1659 d0PtResolution4binTV->Draw("same");
1660 d0PtResolution4binTV->SetLineColor(1);
1662 d0PtResolution5binTV->Draw("same");
1663 d0PtResolution5binTV->SetLineColor(1);
1665 d0PtResolution6binTV->Draw("same");
1666 d0PtResolution6binTV->SetLineColor(1);
1668 d0PtResolution7binTV->Draw("same");
1669 d0PtResolution7binTV->SetLineColor(1);
1671 d0PtResolution8binTV->Draw("same");
1672 d0PtResolution8binTV->SetLineColor(1);
1674 PtResolution0binTV->Draw("same");
1675 PtResolution0binTV->SetLineColor(1);
1677 PtResolution1binTV->Draw("same");
1678 PtResolution1binTV->SetLineColor(1);
1680 PtResolution2binTV->Draw("same");
1681 PtResolution2binTV->SetLineColor(1);
1683 PtResolution3binTV->Draw("same");
1684 PtResolution3binTV->SetLineColor(1);
1686 PtResolution4binTV->Draw("same");
1687 PtResolution4binTV->SetLineColor(1);
1689 PtResolution5binTV->Draw("same");
1690 PtResolution5binTV->SetLineColor(1);
1692 PtResolution6binTV->Draw("same");
1693 PtResolution6binTV->SetLineColor(1);
1695 PtResolution7binTV->Draw("same");
1696 PtResolution7binTV->SetLineColor(1);
1698 PtResolution8binTV->Draw("same");
1699 PtResolution8binTV->SetLineColor(1);