1 /// \file TestAnalisys.C
6 /// AddChains(868); // AddChains(runNumber);
7 /// Select(); // make default selection of data
8 /// MakePictures("pic868");
20 #include "TProfile2D.h"
26 #include "TParticle.h"
28 #include "TEventList.h"
30 #include "AliTrackReference.h"
31 #include "AliTPCParam.h"
32 #include "AliDetector.h"
34 #include "AliGenInfo.h"
41 void Select(); // make default selection
42 void SelectLaser(); // make default selection for laser tracks
44 void AddChains(Int_t run); // add all the trees with selected run number to the chain
45 void MakePictures(char *dirname); // make default pictures
47 void PRFYZ(TCut cut0, TCut cut1, char * description);
48 void PRFZZ(TCut cut0, TCut cut1, char * description);
49 void P5Z(TCut cut0, TCut cut1, char * description);
50 void P3Z(TCut cut0, TCut cut1, char * description);
51 void ResYZ(TCut cut0, TCut cut1, char * description);
52 void SysYX(TCut cut0, char * description);
53 void SysZX(TCut cut0, char * description);
55 TProfile * ProfileMaxRow(TCut cut0, char *name, Int_t max);
56 TProfile * ProfileMaxPhi(TCut cut0, char *name, Int_t max);
57 TProfile * ProfileMaxZ(TCut cut0, char *name, Int_t max);
58 TProfile * ProfileQRow(TCut cut0, char *name, Int_t max);
59 TProfile * ProfileQPhi(TCut cut0, char *name, Int_t max);
60 TProfile * ProfileQZ(TCut cut0, char *name, Int_t max);
61 TCanvas * NoiseSector(TCut cut0, char * description, Int_t maxrow, Int_t maxpad);
66 TChain chaincl("Tracks","Tracks"); // tpc tracks and clusters
67 TChain chaincl2("Tracks","Tracks"); // tpc tracks and clusters
68 TChain chainSignal("SignalB","SignalB"); // signals over threshold 50
70 TChain chainFit("Fit","Fit"); // fitted signals with fit parameters
71 TChain chainPed("Fit","Fit"); // fitted pedestal with noise
72 TString runDesc="Run "; // run descriptor
74 AliComparisonDraw comp;
75 AliComparisonDraw compCl;
76 AliComparisonDraw compF;
77 AliComparisonDraw compP;
80 // selection of data for analysis
82 TEventList * listTracks = new TEventList("listTracks","listTracks");
83 TEventList * listFitS = new TEventList("listFitS","listFitS");
84 TEventList * listFitPed = new TEventList("listFitPed","listFitPed");
89 void MakePictures(char *dirname){
92 gROOT->SetStyle("Plain");
93 gStyle->SetFillColor(10);
94 gStyle->SetPadColor(10);
95 gStyle->SetCanvasColor(10);
96 gStyle->SetStatColor(10);
98 gStyle->SetPalette(1,0);
99 gStyle->SetNumberContours(50);
101 const Int_t kMinCl = 200;
103 sprintf(chshell,"mkdir %s", dirname);
104 gSystem->Exec(chshell);
105 sprintf(chshell,"cd %s", dirname);
106 gSystem->Exec(chshell);
110 TCanvas c(dirname,dirname);
111 for (Int_t isector=0; isector<36; isector++){
116 sprintf(chshell,"Cl.fX>0&&Cl.fDetector==%d",isector);
117 Int_t ncl = comp.fTree->Draw("Cl.fY",chshell);
118 if (ncl<kMinCl) continue;
119 printf("MakePictures sector %d\n",isector);
127 sprintf(chdesc,"%s Sector %d IROC",runDesc.Data(), isector);
128 sprintf(chcut1,"Cl.fDetector==%d", isector);
129 prof = ProfileQRow(chcut1, chdesc, 70);
130 sprintf(chshell,"%s/qrow_sec%dIROC.eps", dirname,isector);
134 prof = ProfileMaxRow(chcut1, chdesc, 70);
135 sprintf(chshell,"%s/maxrow_sec%dIROC.eps", dirname,isector);
140 sprintf(chdesc,"%s Sector %d OROC",runDesc.Data(), isector);
141 sprintf(chcut1,"Cl.fDetector==%d", isector+36);
142 prof = ProfileQRow(chcut1, chdesc, 100);
143 sprintf(chshell,"%s/qrow_sec%dOROC.eps", dirname,isector);
147 prof = ProfileMaxRow(chcut1, chdesc, 100);
148 sprintf(chshell,"%s/maxrow_sec%dOROC.eps", dirname,isector);
155 sprintf(chdesc,"%s Sector %d IROC",runDesc.Data(), isector);
156 sprintf(chcut1,"Cl.fDetector==%d", isector);
157 prof = ProfileMaxPhi(chcut1, chdesc,20);
158 sprintf(chshell,"%s/qphi_sec%dIROC.eps", dirname,isector);
163 sprintf(chdesc,"%s Sector %d OROC",runDesc.Data(), isector);
164 sprintf(chcut1,"Cl.fDetector==%d", isector+36);
165 prof = ProfileMaxPhi(chcut1, chdesc,20);
166 sprintf(chshell,"%s/qphi_sec%dOROC.eps", dirname,isector);
174 sprintf(chdesc,"%s Sector %d IROC",runDesc.Data(), isector);
175 sprintf(chcut1,"Cl.fDetector==%d", isector);
176 prof = ProfileQZ(chcut1, chdesc,20);
177 sprintf(chshell,"%s/qz_sec%dIROC.eps", dirname,isector);
183 sprintf(chdesc,"%s Sector %d OROC",runDesc.Data(), isector);
184 sprintf(chcut1,"Cl.fDetector==%d", isector+36);
185 prof = ProfileQZ(chcut1, chdesc,20);
186 sprintf(chshell,"%s/qz_sec%dOROC.eps", dirname,isector);
193 sprintf(chdesc,"%s Sector %d IROC",runDesc.Data(), isector);
194 sprintf(chcut1,"Sector==%d", isector);
195 TCanvas *cnoise = NoiseSector(chcut1, chdesc,70,70);
196 sprintf(chshell,"%s/noise_sec%dIROC.eps", dirname,isector);
197 cnoise->Print(chshell);
198 sprintf(chdesc,"%s Sector %d OROC",runDesc.Data(), isector);
199 sprintf(chcut1,"Sector==%d", isector+36);
200 cnoise = NoiseSector(chcut1, chdesc,70,70);
201 sprintf(chshell,"%s/noise_sec%dOROC.eps", dirname,isector);
202 cnoise->Print(chshell);
207 sprintf(chdesc,"%s Sector %d",runDesc.Data(), isector);
208 sprintf(chcut1,"Cl.fDetector==%d||Cl.fDetector==%d", isector, isector+36);
209 SysYX(chcut1,chdesc);
210 sprintf(chshell,"%s/deltayx_sec%d.eps", dirname,isector);
213 SysZX(chcut1,chdesc);
214 sprintf(chshell,"%s/deltazx_sec%d.eps", dirname,isector);
220 if (ncl<500) continue; //not enough statistic
222 sprintf(chdesc,"%s Sector %d",runDesc.Data(), isector);
223 sprintf(chcut1,"Cl.fDetector==%d", isector);
224 sprintf(chcut2,"Cl.fDetector==%d", isector+36);
226 PRFYZ(chcut1, chcut2,chdesc);
227 sprintf(chshell,"%s/prfyz_sec%d.eps", dirname,isector);
229 sprintf(chcut1,"Sector==%d", isector);
230 sprintf(chcut2,"Sector==%d", isector+36);
231 PRFZZ(chcut1, chcut2,chdesc);
232 sprintf(chshell,"%s/prfzz_sec%d.eps", dirname,isector);
237 sprintf(chdesc,"%s Sector %d",runDesc.Data(), isector);
238 sprintf(chcut1,"Cl.fDetector==%d", isector);
239 sprintf(chcut2,"Cl.fDetector==%d", isector+36);
241 ResYZ(chcut1, chcut2,chdesc);
242 sprintf(chshell,"%s/resyz_sec%d.eps", dirname,isector);
253 void AddChains(Int_t run){
254 /// add files to the chains + check consistency
266 sprintf(strcl,"ls *%d*/TPCtracks.root > files.txt", run);
267 gSystem->Exec(strcl);
268 in0.open("files.txt");
270 if (sfile.Length()==0) break;
271 printf("%s\n",sfile.Data());
272 TFile f(sfile.Data());
273 TTree * tree = (TTree*)f.Get("Tracks");
276 chaincl.Add(sfile.Data());
281 sprintf(strcl,"ls *%d*/FitSignal.root > files.txt", run);
282 gSystem->Exec(strcl);
283 in1.open("files.txt");
285 if (sfile.Length()==0) break;
286 printf("%s\n",sfile.Data());
287 TFile f(sfile.Data());
288 TTree * tree =(TTree*)f.Get("Fit");
291 chainFit.Add(sfile.Data());
296 sprintf(strcl,"ls *%d*/TPCsignal.root > files.txt", run);
297 gSystem->Exec(strcl);
298 in2.open("files.txt");
300 if (sfile.Length()==0) break;
301 printf("%s\n",sfile.Data());
302 TFile f(sfile.Data());
303 TTree * tree =(TTree*)f.Get("Fit");
306 chainPed.Add(sfile.Data());
308 // chainPed.Add(sfile.Data());
312 sprintf(strcl,"ls *%d*/TPCsignal.root > files.txt", run);
313 gSystem->Exec(strcl);
314 in4.open("files.txt");
316 if (sfile.Length()==0) break;
317 printf("%s\n",sfile.Data());
318 TFile f(sfile.Data());
319 TTree * tree =(TTree*)f.Get("SignalB");
322 chainSignal.Add(sfile.Data());
324 // chainPed.Add(sfile.Data());
329 printf("\n IMPORT REC points");
330 sprintf(strcl,"ls *%d*/*RecPoints* > files.txt", run);
331 gSystem->Exec(strcl);
332 in3.open("files.txt");
334 if (sfile.Length()==0) break;
335 printf("%s\n",sfile.Data());
336 TFile fcl(sfile.Data());
338 sprintf(tname,"%s/%s/TreeR",sfile.Data(),fcl.GetListOfKeys()->At(0)->GetName());
340 // chainPed.Add(sfile.Data());
343 comp.fTree = &chaincl;
344 compF.fTree = &chainFit;
345 compP.fTree = &chainPed;
349 /// base cut on the tracks
351 comp.fTree->Draw(">>listTracks","Etrack.fTPCncls>30&&abs(Etrack.fIp.fP[4])<1");
352 comp.fTree->SetEventList(listTracks);
354 compF.fTree->Draw(">>listFitS","p2>0&&p2<5&&p1<900&&p0<10000&&p4<1&&p4>0&&p5<p3&&chi2<150");
355 compF.fTree->SetEventList(listFitS);
359 /// base cut on the tracks
361 comp.fTree->Draw(">>listTracks","Etrack.fTPCncls>20&&abs(Etrack.fIp.fP[4])<1&&abs(Etrack.fIp.fP[3])<0.01");
362 comp.fTree->SetEventList(listTracks);
364 compF.fTree->Draw(">>listFitS","p2>0&&p2<5&&p1<900&&p0<10000&&p4<1&&p4>0&&p5<p3&&chi2<150");
365 compF.fTree->SetEventList(listFitS);
367 // make default aliases
370 comp.fTree->SetAlias("lz0","abs(Etrack.fIp.fP[1]-20)<5");
371 comp.fTree->SetAlias("lz1","abs(Etrack.fIp.fP[1]-70)<20");
372 comp.fTree->SetAlias("lz2","abs(Etrack.fIp.fP[1]-150)<20");
373 comp.fTree->SetAlias("lz3","abs(Etrack.fIp.fP[1]-210)<20");
379 void PRFYZ(TCut cut0, TCut cut1, char * description){
380 /// plot Pad response function as funtion of drift z
382 TF1 * f1 = new TF1("fdiff","sqrt([0]*[0]+(250-x)*[1]*[1])");
383 f1->SetParameter(1,0.2);
384 f1->SetParameter(0,0.2);
385 comp.DrawXY("abs(Cl.fZ)","sqrt(Cl.fSigmaY2)","abs(Track.fTrackPoints.GetAngleY())<0.05","Track.fTrackPoints.fTX>0"+cut0,5,10,240,-0,1);
386 TH1F * prfInnerY = (TH1F*)comp.fMean->Clone();
388 comp.DrawXY("abs(Cl.fZ)","sqrt(Cl.fSigmaY2)","abs(Track.fTrackPoints.GetAngleY())<0.05","Track.fTrackPoints.fTX>0"+cut1,5,10,240,-0,1);
389 TH1F * prfOuterY = (TH1F*)comp.fMean->Clone();
392 prfOuterY->SetMinimum(0);
393 prfOuterY->SetMarkerStyle(23);
394 prfInnerY->SetMarkerStyle(24);
395 prfOuterY->SetXTitle("Z position (cm)");
396 prfOuterY->SetYTitle("PRF width (cm)");
400 sprintf(chouter,"Outer sector : p_{0} = %f p_{1} = %f",f1->GetParameter(0),f1->GetParameter(1));
402 sprintf(chinner,"Inner sector : p_{0} = %f p_{1} = %f",f1->GetParameter(0),f1->GetParameter(1));
404 prfInnerY->Draw("same");
405 TString desc = description;
406 TLegend *legend = new TLegend(0.25,0.12,0.85,0.35, desc+"\nTPC cluster shape Fit: #sigma = #sqrt{p_{0}^{2}+(z_{d}-z)p_{1}^{2}}");
407 legend->SetBorderSize(1);
408 legend->AddEntry(prfOuterY,chouter);
409 legend->AddEntry(prfInnerY,chinner);
415 void PRFZZ(TCut cut0, TCut cut1, char * description){
416 TF1 * f1 = new TF1("fdiff","sqrt([0]*[0]+x*[1]*[1])");
417 f1->SetParameter(1,0.2);
418 f1->SetParameter(0,0.2);
419 compF.DrawXY("p1*0.285","p2*0.285","p2>0",cut0,8,20,250,-0,2);
420 TH1F * prfInnerY = (TH1F*)compF.fMean->Clone();
421 compF.DrawXY("p1*0.285","p2*0.285","p2>0",cut1,8,20,250,-0,2);
422 TH1F * prfOuterY = (TH1F*)compF.fMean->Clone();
425 prfOuterY->SetMinimum(0);
426 prfOuterY->SetMarkerStyle(23);
427 prfInnerY->SetMarkerStyle(24);
428 prfOuterY->SetXTitle("Drift length(cm)");
429 prfOuterY->SetYTitle("Z Sigma (cm)");
433 sprintf(chouter,"Outer sector : p_{0} = %f p_{1} = %f",f1->GetParameter(0),f1->GetParameter(1));
435 sprintf(chinner,"Inner sector : p_{0} = %f p_{1} = %f",f1->GetParameter(0),f1->GetParameter(1));
437 prfInnerY->Draw("same");
438 TString desc = description;
439 TLegend *legend = new TLegend(0.25,0.12,0.85,0.35, desc+"TPC signal shape Fit: #sigma = #sqrt{p_{0}^{2}+(z)p_{1}^{2}}");
440 legend->SetBorderSize(1);
441 legend->AddEntry(prfOuterY,chouter);
442 legend->AddEntry(prfInnerY,chinner);
447 void ResYZ(TCut cut0, TCut cut1, char * description){
448 /// resolution in y coordinate as function of z
450 TF1 * f1 = new TF1("fdiff","sqrt([0]*[0]+(250-x)*[1]*[1])");
451 f1->SetParameter(1,0.2);
452 f1->SetParameter(0,0.2);
453 comp.DrawXY("abs(Cl.fZ)","Track.fTrackPoints.GetY()-Cl.GetY()","abs(Track.fTrackPoints.GetAngleY())<0.05","Track.fTrackPoints.fTX>0"+cut0,5,10,240,-0.5,0.5);
454 TH1F * prfInnerY = (TH1F*)comp.fRes->Clone();
456 comp.DrawXY("abs(Cl.fZ)","Track.fTrackPoints.GetY()-Cl.GetY()","abs(Track.fTrackPoints.GetAngleY())<0.05","Track.fTrackPoints.fTX>0"+cut1,5,10,240,-0.5,0.5);
457 TH1F * prfOuterY = (TH1F*)comp.fRes->Clone();
460 prfOuterY->SetMinimum(0);
461 prfOuterY->SetMaximum(0.15);
462 prfOuterY->SetMarkerStyle(23);
463 prfInnerY->SetMarkerStyle(24);
464 prfOuterY->SetXTitle("Z position (cm)");
465 prfOuterY->SetYTitle("Y resolution (cm)");
469 sprintf(chouter,"Outer sector : p_{0} = %f p_{1} = %f",f1->GetParameter(0),f1->GetParameter(1));
471 sprintf(chinner,"Inner sector : p_{0} = %f p_{1} = %f",f1->GetParameter(0),f1->GetParameter(1));
473 prfInnerY->Draw("same");
474 TString desc = description;
475 TLegend *legend = new TLegend(0.25,0.12,0.85,0.35, desc+"TPC cluster resolution: #sigma = #sqrt{p_{0}^{2}+(z_{d}-z)p_{1}^{2}}");
476 legend->SetBorderSize(1);
477 legend->AddEntry(prfOuterY,chouter);
478 legend->AddEntry(prfInnerY,chinner);
482 void SysYX(TCut cut0, char * description){
485 TProfile * profA = new TProfile("profY","profY",70,89,250);
486 comp.fTree->Draw("Cl.fY-Track.fTrackPoints.GetY():Track.fTrackPoints.GetX()>>profY","abs(Cl.fY-Track.fTrackPoints.GetY())<1&&Track.fTrackPoints.fTX>10"+cut0,"prof");
487 profA->SetXTitle("Local X (cm)");
488 profA->SetYTitle("Mean #Delta Y (cm)");
489 TLegend *legend = new TLegend(0.55,0.25,0.85,0.30, description);
493 void SysZX(TCut cut0, char * description){
496 TProfile * profA = new TProfile("profZ","profZ",70,89,250);
497 comp.fTree->Draw("abs(Cl.fZ)-abs(Track.fTrackPoints.GetZ()):Track.fTrackPoints.GetX()>>profZ","abs(abs(Cl.fZ)-abs(Track.fTrackPoints.GetZ()))<1&&Track.fTrackPoints.fTX>10"+cut0,"prof");
498 profA->SetXTitle("Local X (cm)");
499 profA->SetYTitle("Mean #Delta Z (cm)");
500 TLegend *legend = new TLegend(0.55,0.25,0.85,0.30, description);
504 TProfile * ProfileMaxRow(TCut cut0, char *name, Int_t max){
505 /// make profile histrogram of amplitudes
507 TProfile *profA = new TProfile(name,name,max,0,max-1);
509 sprintf(expr,"Cl.fMax:Cl.fRow>>%s",name);
510 comp.fTree->Draw(expr,"abs(Cl.fZ)>0&&Cl.fMax<500"+cut0,"prof");
511 profA->SetXTitle("Pad Row");
512 profA->SetYTitle("Amplitude at maxima (ADC)");
516 TProfile * ProfileMaxPhi(TCut cut0, char *name, Int_t max){
517 /// make profile histrogram of amplitudes
519 TProfile *profA = new TProfile(name,name,max,-0.14,0.14);
521 sprintf(expr,"Cl.fMax:Cl.fY/Cl.fX>>%s",name);
522 comp.fTree->Draw(expr,"abs(Cl.fZ)>0&&Cl.fMax<500"+cut0,"prof");
523 profA->SetXTitle("Local #phi(rad)");
524 profA->SetYTitle("Amplitude at maxima (ADC)");
528 TProfile * ProfileQRow(TCut cut0, char *name, Int_t max){
529 /// make profile histrogram of amplitudes
531 TProfile *profA = new TProfile(name,name,max,0,max-1);
533 sprintf(expr,"Cl.fQ:Cl.fRow>>%s",name);
534 comp.fTree->Draw(expr,"abs(Cl.fZ)>0&&Cl.fMax<500"+cut0,"prof");
535 profA->SetXTitle("Pad Row");
536 profA->SetYTitle("Total charge(ADC)");
540 TProfile * ProfileQPhi(TCut cut0, char *name, Int_t max){
541 /// make profile histrogram of amplitudes
543 TProfile *profA = new TProfile(name,name,max,-0.14,0.14);
545 sprintf(expr,"Cl.fQ:Cl.fY/Cl.fX>>%s",name);
546 comp.fTree->Draw(expr,"abs(Cl.fZ)>0&&Cl.fMax<500"+cut0,"prof");
547 profA->SetXTitle("Local #phi(rad)");
548 profA->SetYTitle("Total charge (ADC)");
552 TProfile * ProfileQZ(TCut cut0, char *name, Int_t max){
553 /// make profile histrogram of amplitudes
555 TF1 * fline = new TF1("fline","[0]+[1]*[0]*(250-x)");
556 TF1 * f1 = new TF1("f1","[0]*exp(-[1]*(250-x))");
557 TProfile *profA = new TProfile(name,name,max,0,250);
559 sprintf(expr,"Cl.fQ:abs(Cl.fZ)>>%s",name);
560 comp.fTree->Draw(expr,"abs(Cl.fZ)>0&&Cl.fMax<500"+cut0,"prof");
561 profA->SetXTitle("Z position (cm)");
562 profA->SetYTitle("Amplitude (ADC)");
565 f1->SetParameter(0,fline->GetParameter(0));
566 f1->SetParameter(1,fline->GetParameter(1));
568 sprintf(chc,"Exponential fit params: p_{0} = %f p_{1} = %f",f1->GetParameter(0),f1->GetParameter(1));
570 TLegend *legend = new TLegend(0.25,0.12,0.85,0.25, chc);
575 TProfile * ProfileMaxZ(TCut cut0, char *name, Int_t max){
576 /// make profile histrogram of amplitudes
578 TF1 * f1 = new TF1("f1","[0]+[1]*[0]*(250-x)");
579 TProfile *profA = new TProfile(name,name,max,0,250);
581 sprintf(expr,"Cl.fMax:abs(Cl.fZ)>>%s",name);
582 comp.fTree->Draw(expr,"abs(Cl.fZ)>0&&Cl.fMax<500"+cut0,"prof");
583 profA->SetXTitle("Z position (cm)");
584 profA->SetYTitle("Amplitude at maxima (ADC)");
587 sprintf(chc,"p_{0} = %f p_{1} = %f",f1->GetParameter(0),f1->GetParameter(1));
588 TLegend *legend = new TLegend(0.25,0.12,0.85,0.35, chc);
594 void P3Z(TCut cut0, TCut cut1, char * description){
595 /// first exponenent as function of z drift
597 TF1 * f1 = new TF1("fdiff","[0]+[1]/[0]*x");
598 f1->SetParameter(1,0.2);
599 f1->SetParameter(0,0.2);
600 compF.DrawXY("p1*0.285","p3","Max>250",cut0,5,20,250,-0,2);
601 TH1F * prfInnerY = (TH1F*)compF.fMean->Clone();
602 compF.DrawXY("p1*0.285","p3","Max>250",cut1,5,20,250,-0,2);
603 TH1F * prfOuterY = (TH1F*)compF.fMean->Clone();
606 prfOuterY->SetMinimum(0);
607 prfOuterY->SetMaximum(1);
608 prfOuterY->SetMarkerStyle(23);
609 prfInnerY->SetMarkerStyle(24);
610 prfOuterY->SetXTitle("Drift length (cm)");
611 prfOuterY->SetYTitle("Lambda 0 (Time Bin)");
615 sprintf(chouter,"Outer sector : p_{0} = %f p_{1} = %f",f1->GetParameter(0),f1->GetParameter(1));
617 sprintf(chinner,"Inner sector : p_{0} = %f p_{1} = %f",f1->GetParameter(0),f1->GetParameter(1));
619 prfInnerY->Draw("same");
620 TString desc = description;
621 TLegend *legend = new TLegend(0.25,0.12,0.85,0.35, desc+"TPC cluster shape fit Parameter Lambda0 - P3:");
622 legend->SetBorderSize(1);
623 legend->AddEntry(prfOuterY,chouter);
624 legend->AddEntry(prfInnerY,chinner);
629 void P5Z(TCut cut0, TCut cut1, char * description){
630 /// second exponenent as function of z drift
632 TF1 * f1 = new TF1("fdiff","[0]+[1]/[0]*x");
633 f1->SetParameter(1,0.2);
634 f1->SetParameter(0,0.2);
635 compF.DrawXY("p1*0.285","p5","Max>250",cut0,5,20,250,-0,0.2);
636 TH1F * prfInnerY = (TH1F*)compF.fMean->Clone();
637 compF.DrawXY("p1*0.285","p5","Max>250",cut1,5,20,250,-0,0.2);
638 TH1F * prfOuterY = (TH1F*)compF.fMean->Clone();
641 prfOuterY->SetMinimum(0);
642 prfOuterY->SetMaximum(0.15);
643 prfOuterY->SetMarkerStyle(23);
644 prfInnerY->SetMarkerStyle(24);
645 prfOuterY->SetXTitle("Drift length (Time Bin)");
646 prfOuterY->SetYTitle("Lambda1 (Time bin)");
650 sprintf(chouter,"Outer sector : p_{0} = %f p_{1} = %f",f1->GetParameter(0),f1->GetParameter(1));
652 sprintf(chinner,"Inner sector : p_{0} = %f p_{1} = %f",f1->GetParameter(0),f1->GetParameter(1));
654 prfInnerY->Draw("same");
655 TString desc = description;
656 TLegend *legend = new TLegend(0.25,0.12,0.85,0.35, desc+"TPC cluster shape fit Parameter Lambda1 - P5");
657 legend->SetBorderSize(1);
658 legend->AddEntry(prfOuterY,chouter);
659 legend->AddEntry(prfInnerY,chinner);
663 TCanvas * NoiseSector(TCut cut0, char * description, Int_t maxrow, Int_t maxpad){
664 /// draw plots of the noise
666 TCanvas * c = new TCanvas;
670 compP.fTree->Draw("GSigma","GSigma<5"+cut0);
672 Float_t rand = gRandom->Rndm();
674 sprintf(name,"prof%f",rand);
675 TProfile2D * prof= new TProfile2D(name,name,maxrow, 0, maxrow-1, 2*maxpad,-maxpad,maxpad);
677 sprintf(expr,"GSigma:RPad:Row>>%s",name);
678 prof->SetXTitle("Pad row");
679 prof->SetYTitle("Pad number");
680 compP.fTree->Draw(expr,cut0,"profcolz");
682 TString desc = description;
683 TLegend *legend = new TLegend(0.25,0.30,0.85,0.85, desc+"Noise map");