1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 ///////////////////////////////////////////////////////////////////////////////
19 // TPC cluster error, shape and charge parameterization as function
20 // of drift length, and inclination angle //
22 // Following notation is used in following
23 // Int_t dim 0 - y direction
26 // Int_t type 0 - short pads
29 // Float_t z - drift length
31 // Float_t angle - tangent of inclination angle at given dimension
33 // Implemented parameterization
36 // 1. Resolution as function of drift length and inclination angle
37 // 1.a) GetError0(Int_t dim, Int_t type, Float_t z, Float_t angle)
38 // Simple error parameterization as derived from analytical formula
39 // only linear term in drift length and angle^2
40 // The formula is valid only with precission +-5%
41 // Separate parameterization for differnt pad geometry
43 // Parabolic term correction - better precision
45 // 1.c) GetError1 - JUST FOR Study
46 // Similar to GetError1
47 // The angular and diffusion effect is scaling with pad length
48 // common parameterization for different pad length
50 // 2. Error parameterization using charge
53 // adding 1/Q component to diffusion and angluar part
56 // adding 1/Q component to diffusion and angluar part
57 // 2.c) GetErrorQParScaled - Just for study
58 // One parameterization for all pad shapes
59 // Smaller precission as previous one
62 // Example how to retrieve the paramterization:
64 AliCDBManager::Instance()->SetRun(1)
65 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
66 AliTPCClusterParam * param = AliTPCcalibDB::Instance()->GetClusterParam();
70 AliTPCClusterParam::SetInstance(param);
71 TF1 f1("f1","AliTPCClusterParam::SGetError0Par(1,0,x,0)",0,250);
76 ///////////////////////////////////////////////////////////////////////////////
77 #include "AliTPCClusterParam.h"
82 #include <TLinearFitter.h>
84 #include <TProfile2D.h>
86 #include <TObjArray.h>
88 ClassImp(AliTPCClusterParam)
91 AliTPCClusterParam* AliTPCClusterParam::fgInstance = 0;
95 Example usage fitting parameterization:
96 TFile fres("resol.root"); //tree with resolution and shape
97 TTree * treeRes =(TTree*)fres.Get("Resol");
99 AliTPCClusterParam param;
100 param.SetInstance(¶m);
101 param.FitResol(treeRes);
102 param.FitRMS(treeRes);
103 TFile fparam("TPCClusterParam.root","recreate");
104 param.Write("Param");
107 TFile fparam("TPCClusterParam.root");
108 AliTPCClusterParam *param2 = (AliTPCClusterParam *) fparam.Get("Param");
109 param2->SetInstance(param2);
110 param2->Test(treeRes);
113 treeRes->Draw("(Resol-AliTPCClusterParam::SGetError0(Dim,Pad,Zm,AngleM))/Resol","Dim==0&&QMean<0")
120 //_ singleton implementation __________________________________________________
121 AliTPCClusterParam* AliTPCClusterParam::Instance()
124 // Singleton implementation
125 // Returns an instance of this class, it is created if neccessary
127 if (fgInstance == 0){
128 fgInstance = new AliTPCClusterParam();
134 AliTPCClusterParam::AliTPCClusterParam():
140 // Default constructor
144 AliTPCClusterParam::AliTPCClusterParam(const AliTPCClusterParam& param):
152 memcpy(this, ¶m,sizeof(AliTPCClusterParam));
153 if (param.fQNorm) fQNorm = (TObjArray*) param.fQNorm->Clone();
156 AliTPCClusterParam & AliTPCClusterParam::operator=(const AliTPCClusterParam& param){
158 // Assignment operator
160 if (this != ¶m) {
161 memcpy(this, ¶m,sizeof(AliTPCClusterParam));
162 if (param.fQNorm) fQNorm = (TObjArray*) param.fQNorm->Clone();
168 AliTPCClusterParam::~AliTPCClusterParam(){
172 if (fQNorm) fQNorm->Delete();
177 void AliTPCClusterParam::FitResol0(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error){
179 // Fit z - angular dependence of resolution
181 // Int_t dim=0, type=0;
183 sprintf(varVal,"Resol:AngleM:Zm");
185 sprintf(varErr,"Sigma:AngleS:Zs");
187 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean<0",dim,type);
189 Int_t entries = tree->Draw(varVal,varCut);
190 Float_t px[10000], py[10000], pz[10000];
191 Float_t ex[10000], ey[10000], ez[10000];
193 tree->Draw(varErr,varCut);
194 for (Int_t ipoint=0; ipoint<entries; ipoint++){
195 ex[ipoint]= tree->GetV3()[ipoint];
196 ey[ipoint]= tree->GetV2()[ipoint];
197 ez[ipoint]= tree->GetV1()[ipoint];
199 tree->Draw(varVal,varCut);
200 for (Int_t ipoint=0; ipoint<entries; ipoint++){
201 px[ipoint]= tree->GetV3()[ipoint];
202 py[ipoint]= tree->GetV2()[ipoint];
203 pz[ipoint]= tree->GetV1()[ipoint];
207 TLinearFitter fitter(3,"hyp2");
208 for (Int_t ipoint=0; ipoint<entries; ipoint++){
209 Float_t val = pz[ipoint]*pz[ipoint];
210 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
213 x[1] = py[ipoint]*py[ipoint];
214 fitter.AddPoint(x,val,err);
218 fitter.GetParameters(param);
219 param0[0] = param[0];
220 param0[1] = param[1];
221 param0[2] = param[2];
222 Float_t chi2 = fitter.GetChisquare()/entries;
224 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
225 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
226 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
230 void AliTPCClusterParam::FitResol0Par(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error){
232 // Fit z - angular dependence of resolution
234 // Int_t dim=0, type=0;
236 sprintf(varVal,"Resol:AngleM:Zm");
238 sprintf(varErr,"Sigma:AngleS:Zs");
240 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean<0",dim,type);
242 Int_t entries = tree->Draw(varVal,varCut);
243 Float_t px[10000], py[10000], pz[10000];
244 Float_t ex[10000], ey[10000], ez[10000];
246 tree->Draw(varErr,varCut);
247 for (Int_t ipoint=0; ipoint<entries; ipoint++){
248 ex[ipoint]= tree->GetV3()[ipoint];
249 ey[ipoint]= tree->GetV2()[ipoint];
250 ez[ipoint]= tree->GetV1()[ipoint];
252 tree->Draw(varVal,varCut);
253 for (Int_t ipoint=0; ipoint<entries; ipoint++){
254 px[ipoint]= tree->GetV3()[ipoint];
255 py[ipoint]= tree->GetV2()[ipoint];
256 pz[ipoint]= tree->GetV1()[ipoint];
260 TLinearFitter fitter(6,"hyp5");
261 for (Int_t ipoint=0; ipoint<entries; ipoint++){
262 Float_t val = pz[ipoint]*pz[ipoint];
263 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
266 x[1] = py[ipoint]*py[ipoint];
270 fitter.AddPoint(x,val,err);
274 fitter.GetParameters(param);
275 param0[0] = param[0];
276 param0[1] = param[1];
277 param0[2] = param[2];
278 param0[3] = param[3];
279 param0[4] = param[4];
280 param0[5] = param[5];
281 Float_t chi2 = fitter.GetChisquare()/entries;
283 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
284 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
285 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
286 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
287 error[4] = (fitter.GetParError(4)*TMath::Sqrt(chi2));
288 error[5] = (fitter.GetParError(5)*TMath::Sqrt(chi2));
295 void AliTPCClusterParam::FitResol1(TTree * tree, Int_t dim, Float_t *param0, Float_t *error){
297 // Fit z - angular dependence of resolution - pad length scaling
299 // Int_t dim=0, type=0;
301 sprintf(varVal,"Resol:AngleM*sqrt(Length):Zm/Length");
303 sprintf(varErr,"Sigma:AngleS:Zs");
305 sprintf(varCut,"Dim==%d&&QMean<0",dim);
307 Int_t entries = tree->Draw(varVal,varCut);
308 Float_t px[10000], py[10000], pz[10000];
309 Float_t ex[10000], ey[10000], ez[10000];
311 tree->Draw(varErr,varCut);
312 for (Int_t ipoint=0; ipoint<entries; ipoint++){
313 ex[ipoint]= tree->GetV3()[ipoint];
314 ey[ipoint]= tree->GetV2()[ipoint];
315 ez[ipoint]= tree->GetV1()[ipoint];
317 tree->Draw(varVal,varCut);
318 for (Int_t ipoint=0; ipoint<entries; ipoint++){
319 px[ipoint]= tree->GetV3()[ipoint];
320 py[ipoint]= tree->GetV2()[ipoint];
321 pz[ipoint]= tree->GetV1()[ipoint];
325 TLinearFitter fitter(3,"hyp2");
326 for (Int_t ipoint=0; ipoint<entries; ipoint++){
327 Float_t val = pz[ipoint]*pz[ipoint];
328 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
331 x[1] = py[ipoint]*py[ipoint];
332 fitter.AddPoint(x,val,err);
336 fitter.GetParameters(param);
337 param0[0] = param[0];
338 param0[1] = param[1];
339 param0[2] = param[2];
340 Float_t chi2 = fitter.GetChisquare()/entries;
342 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
343 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
344 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
347 void AliTPCClusterParam::FitResolQ(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error){
349 // Fit z - angular dependence of resolution - Q scaling
351 // Int_t dim=0, type=0;
353 sprintf(varVal,"Resol:AngleM/sqrt(QMean):Zm/QMean");
355 sprintf(varVal0,"Resol:AngleM:Zm");
358 sprintf(varErr,"Sigma:AngleS:Zs");
360 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean>0",dim,type);
362 Int_t entries = tree->Draw(varVal,varCut);
363 Float_t px[20000], py[20000], pz[20000], pu[20000], pt[20000];
364 Float_t ex[20000], ey[20000], ez[20000];
366 tree->Draw(varErr,varCut);
367 for (Int_t ipoint=0; ipoint<entries; ipoint++){
368 ex[ipoint]= tree->GetV3()[ipoint];
369 ey[ipoint]= tree->GetV2()[ipoint];
370 ez[ipoint]= tree->GetV1()[ipoint];
372 tree->Draw(varVal,varCut);
373 for (Int_t ipoint=0; ipoint<entries; ipoint++){
374 px[ipoint]= tree->GetV3()[ipoint];
375 py[ipoint]= tree->GetV2()[ipoint];
376 pz[ipoint]= tree->GetV1()[ipoint];
378 tree->Draw(varVal0,varCut);
379 for (Int_t ipoint=0; ipoint<entries; ipoint++){
380 pu[ipoint]= tree->GetV3()[ipoint];
381 pt[ipoint]= tree->GetV2()[ipoint];
385 TLinearFitter fitter(5,"hyp4");
386 for (Int_t ipoint=0; ipoint<entries; ipoint++){
387 Float_t val = pz[ipoint]*pz[ipoint];
388 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
391 x[1] = pt[ipoint]*pt[ipoint];
393 x[3] = py[ipoint]*py[ipoint];
394 fitter.AddPoint(x,val,err);
399 fitter.GetParameters(param);
400 param0[0] = param[0];
401 param0[1] = param[1];
402 param0[2] = param[2];
403 param0[3] = param[3];
404 param0[4] = param[4];
405 Float_t chi2 = fitter.GetChisquare()/entries;
407 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
408 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
409 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
410 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
411 error[4] = (fitter.GetParError(4)*TMath::Sqrt(chi2));
414 void AliTPCClusterParam::FitResolQPar(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error){
416 // Fit z - angular dependence of resolution - Q scaling - parabolic correction
418 // Int_t dim=0, type=0;
420 sprintf(varVal,"Resol:AngleM/sqrt(QMean):Zm/QMean");
422 sprintf(varVal0,"Resol:AngleM:Zm");
425 sprintf(varErr,"Sigma:AngleS:Zs");
427 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean>0",dim,type);
429 Int_t entries = tree->Draw(varVal,varCut);
430 Float_t px[20000], py[20000], pz[20000], pu[20000], pt[20000];
431 Float_t ex[20000], ey[20000], ez[20000];
433 tree->Draw(varErr,varCut);
434 for (Int_t ipoint=0; ipoint<entries; ipoint++){
435 ex[ipoint]= tree->GetV3()[ipoint];
436 ey[ipoint]= tree->GetV2()[ipoint];
437 ez[ipoint]= tree->GetV1()[ipoint];
439 tree->Draw(varVal,varCut);
440 for (Int_t ipoint=0; ipoint<entries; ipoint++){
441 px[ipoint]= tree->GetV3()[ipoint];
442 py[ipoint]= tree->GetV2()[ipoint];
443 pz[ipoint]= tree->GetV1()[ipoint];
445 tree->Draw(varVal0,varCut);
446 for (Int_t ipoint=0; ipoint<entries; ipoint++){
447 pu[ipoint]= tree->GetV3()[ipoint];
448 pt[ipoint]= tree->GetV2()[ipoint];
452 TLinearFitter fitter(8,"hyp7");
453 for (Int_t ipoint=0; ipoint<entries; ipoint++){
454 Float_t val = pz[ipoint]*pz[ipoint];
455 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
458 x[1] = pt[ipoint]*pt[ipoint];
463 x[6] = py[ipoint]*py[ipoint];
465 fitter.AddPoint(x,val,err);
470 fitter.GetParameters(param);
471 param0[0] = param[0];
472 param0[1] = param[1];
473 param0[2] = param[2];
474 param0[3] = param[3];
475 param0[4] = param[4];
476 param0[5] = param[5];
477 param0[6] = param[6];
478 param0[7] = param[7];
480 Float_t chi2 = fitter.GetChisquare()/entries;
482 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
483 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
484 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
485 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
486 error[4] = (fitter.GetParError(4)*TMath::Sqrt(chi2));
487 error[5] = (fitter.GetParError(5)*TMath::Sqrt(chi2));
488 error[6] = (fitter.GetParError(6)*TMath::Sqrt(chi2));
489 error[7] = (fitter.GetParError(7)*TMath::Sqrt(chi2));
494 void AliTPCClusterParam::FitRMS0(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error){
496 // Fit z - angular dependence of resolution
498 // Int_t dim=0, type=0;
500 sprintf(varVal,"RMSm:AngleM:Zm");
502 sprintf(varErr,"sqrt((1./(100.*sqrt(12.))^2)+RMSe0^2):AngleS:Zs");
504 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean<0",dim,type);
506 Int_t entries = tree->Draw(varVal,varCut);
507 Float_t px[10000], py[10000], pz[10000];
508 Float_t ex[10000], ey[10000], ez[10000];
510 tree->Draw(varErr,varCut);
511 for (Int_t ipoint=0; ipoint<entries; ipoint++){
512 ex[ipoint]= tree->GetV3()[ipoint];
513 ey[ipoint]= tree->GetV2()[ipoint];
514 ez[ipoint]= tree->GetV1()[ipoint];
516 tree->Draw(varVal,varCut);
517 for (Int_t ipoint=0; ipoint<entries; ipoint++){
518 px[ipoint]= tree->GetV3()[ipoint];
519 py[ipoint]= tree->GetV2()[ipoint];
520 pz[ipoint]= tree->GetV1()[ipoint];
524 TLinearFitter fitter(3,"hyp2");
525 for (Int_t ipoint=0; ipoint<entries; ipoint++){
526 Float_t val = pz[ipoint]*pz[ipoint];
527 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
530 x[1] = py[ipoint]*py[ipoint];
531 fitter.AddPoint(x,val,err);
535 fitter.GetParameters(param);
536 param0[0] = param[0];
537 param0[1] = param[1];
538 param0[2] = param[2];
539 Float_t chi2 = fitter.GetChisquare()/entries;
541 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
542 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
543 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
546 void AliTPCClusterParam::FitRMS1(TTree * tree, Int_t dim, Float_t *param0, Float_t *error){
548 // Fit z - angular dependence of resolution - pad length scaling
550 // Int_t dim=0, type=0;
552 sprintf(varVal,"RMSm:AngleM*Length:Zm");
554 sprintf(varErr,"sqrt((1./(100.*sqrt(12.))^2)+RMSe0^2):AngleS:Pad");
556 sprintf(varCut,"Dim==%d&&QMean<0",dim);
558 Int_t entries = tree->Draw(varVal,varCut);
559 Float_t px[10000], py[10000], pz[10000];
560 Float_t type[10000], ey[10000], ez[10000];
562 tree->Draw(varErr,varCut);
563 for (Int_t ipoint=0; ipoint<entries; ipoint++){
564 type[ipoint] = tree->GetV3()[ipoint];
565 ey[ipoint] = tree->GetV2()[ipoint];
566 ez[ipoint] = tree->GetV1()[ipoint];
568 tree->Draw(varVal,varCut);
569 for (Int_t ipoint=0; ipoint<entries; ipoint++){
570 px[ipoint]= tree->GetV3()[ipoint];
571 py[ipoint]= tree->GetV2()[ipoint];
572 pz[ipoint]= tree->GetV1()[ipoint];
576 TLinearFitter fitter(4,"hyp3");
577 for (Int_t ipoint=0; ipoint<entries; ipoint++){
578 Float_t val = pz[ipoint]*pz[ipoint];
579 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
581 x[0] = (type[ipoint]<0.5)? 0.:1.;
583 x[2] = py[ipoint]*py[ipoint];
584 fitter.AddPoint(x,val,err);
588 fitter.GetParameters(param);
589 param0[0] = param[0];
590 param0[1] = param[0]+param[1];
591 param0[2] = param[2];
592 param0[3] = param[3];
593 Float_t chi2 = fitter.GetChisquare()/entries;
595 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
596 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
597 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
598 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
601 void AliTPCClusterParam::FitRMSQ(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error){
603 // Fit z - angular dependence of resolution - Q scaling
605 // Int_t dim=0, type=0;
607 sprintf(varVal,"RMSm:AngleM/sqrt(QMean):Zm/QMean");
609 sprintf(varVal0,"RMSm:AngleM:Zm");
612 sprintf(varErr,"sqrt((1./(100.*sqrt(12.))^2)+RMSe0^2):AngleS:Zs");
614 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean>0",dim,type);
616 Int_t entries = tree->Draw(varVal,varCut);
617 Float_t px[20000], py[20000], pz[20000], pu[20000], pt[20000];
618 Float_t ex[20000], ey[20000], ez[20000];
620 tree->Draw(varErr,varCut);
621 for (Int_t ipoint=0; ipoint<entries; ipoint++){
622 ex[ipoint]= tree->GetV3()[ipoint];
623 ey[ipoint]= tree->GetV2()[ipoint];
624 ez[ipoint]= tree->GetV1()[ipoint];
626 tree->Draw(varVal,varCut);
627 for (Int_t ipoint=0; ipoint<entries; ipoint++){
628 px[ipoint]= tree->GetV3()[ipoint];
629 py[ipoint]= tree->GetV2()[ipoint];
630 pz[ipoint]= tree->GetV1()[ipoint];
632 tree->Draw(varVal0,varCut);
633 for (Int_t ipoint=0; ipoint<entries; ipoint++){
634 pu[ipoint]= tree->GetV3()[ipoint];
635 pt[ipoint]= tree->GetV2()[ipoint];
639 TLinearFitter fitter(5,"hyp4");
640 for (Int_t ipoint=0; ipoint<entries; ipoint++){
641 Float_t val = pz[ipoint]*pz[ipoint];
642 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
645 x[1] = pt[ipoint]*pt[ipoint];
647 x[3] = py[ipoint]*py[ipoint];
648 fitter.AddPoint(x,val,err);
653 fitter.GetParameters(param);
654 param0[0] = param[0];
655 param0[1] = param[1];
656 param0[2] = param[2];
657 param0[3] = param[3];
658 param0[4] = param[4];
659 Float_t chi2 = fitter.GetChisquare()/entries;
661 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
662 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
663 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
664 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
665 error[4] = (fitter.GetParError(4)*TMath::Sqrt(chi2));
669 void AliTPCClusterParam::FitRMSSigma(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t */*error*/){
671 // Fit z - angular dependence of resolution - Q scaling
673 // Int_t dim=0, type=0;
675 sprintf(varVal,"RMSs:RMSm");
678 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean<0",dim,type);
680 Int_t entries = tree->Draw(varVal,varCut);
681 Float_t px[20000], py[20000];
683 tree->Draw(varVal,varCut);
684 for (Int_t ipoint=0; ipoint<entries; ipoint++){
685 px[ipoint]= tree->GetV2()[ipoint];
686 py[ipoint]= tree->GetV1()[ipoint];
688 TLinearFitter fitter(2,"pol1");
689 for (Int_t ipoint=0; ipoint<entries; ipoint++){
690 Float_t val = py[ipoint];
691 Float_t err = fRatio*px[ipoint];
694 fitter.AddPoint(x,val,err);
697 param0[0]= fitter.GetParameter(0);
698 param0[1]= fitter.GetParameter(1);
703 Float_t AliTPCClusterParam::GetError0(Int_t dim, Int_t type, Float_t z, Float_t angle){
708 value += fParamS0[dim][type][0];
709 value += fParamS0[dim][type][1]*z;
710 value += fParamS0[dim][type][2]*angle*angle;
711 value = TMath::Sqrt(TMath::Abs(value));
716 Float_t AliTPCClusterParam::GetError0Par(Int_t dim, Int_t type, Float_t z, Float_t angle){
721 value += fParamS0Par[dim][type][0];
722 value += fParamS0Par[dim][type][1]*z;
723 value += fParamS0Par[dim][type][2]*angle*angle;
724 value += fParamS0Par[dim][type][3]*z*z;
725 value += fParamS0Par[dim][type][4]*angle*angle*angle*angle;
726 value += fParamS0Par[dim][type][5]*z*angle*angle;
727 value = TMath::Sqrt(TMath::Abs(value));
733 Float_t AliTPCClusterParam::GetError1(Int_t dim, Int_t type, Float_t z, Float_t angle){
739 if (type==1) length=1;
740 if (type==2) length=1.5;
741 value += fParamS1[dim][0];
742 value += fParamS1[dim][1]*z/length;
743 value += fParamS1[dim][2]*angle*angle*length;
744 value = TMath::Sqrt(TMath::Abs(value));
748 Float_t AliTPCClusterParam::GetErrorQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
753 value += fParamSQ[dim][type][0];
754 value += fParamSQ[dim][type][1]*z;
755 value += fParamSQ[dim][type][2]*angle*angle;
756 value += fParamSQ[dim][type][3]*z/Qmean;
757 value += fParamSQ[dim][type][4]*angle*angle/Qmean;
758 value = TMath::Sqrt(TMath::Abs(value));
764 Float_t AliTPCClusterParam::GetErrorQPar(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
769 value += fParamSQPar[dim][type][0];
770 value += fParamSQPar[dim][type][1]*z;
771 value += fParamSQPar[dim][type][2]*angle*angle;
772 value += fParamSQPar[dim][type][3]*z*z;
773 value += fParamSQPar[dim][type][4]*angle*angle*angle*angle;
774 value += fParamSQPar[dim][type][5]*z*angle*angle;
775 value += fParamSQPar[dim][type][6]*z/Qmean;
776 value += fParamSQPar[dim][type][7]*angle*angle/Qmean;
777 value = TMath::Sqrt(TMath::Abs(value));
783 Float_t AliTPCClusterParam::GetErrorQParScaled(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
788 value += fParamSQPar[dim][type][0];
789 value += fParamSQPar[dim][type][1]*z;
790 value += fParamSQPar[dim][type][2]*angle*angle;
791 value += fParamSQPar[dim][type][3]*z*z;
792 value += fParamSQPar[dim][type][4]*angle*angle*angle*angle;
793 value += fParamSQPar[dim][type][5]*z*angle*angle;
794 value += fParamSQPar[dim][type][6]*z/Qmean;
795 value += fParamSQPar[dim][type][7]*angle*angle/Qmean;
796 Float_t valueMean = GetError0Par(dim,type,z,angle);
797 value -= 0.35*0.35*valueMean*valueMean;
798 value = TMath::Sqrt(TMath::Abs(value));
804 Float_t AliTPCClusterParam::GetRMS0(Int_t dim, Int_t type, Float_t z, Float_t angle){
806 // calculate mean RMS of cluster - z,angle - parameters for each pad and dimension separatelly
809 value += fParamRMS0[dim][type][0];
810 value += fParamRMS0[dim][type][1]*z;
811 value += fParamRMS0[dim][type][2]*angle*angle;
812 value = TMath::Sqrt(TMath::Abs(value));
816 Float_t AliTPCClusterParam::GetRMS1(Int_t dim, Int_t type, Float_t z, Float_t angle){
818 // calculate mean RMS of cluster - z,angle - pad length scalling
822 if (type==1) length=1;
823 if (type==2) length=1.5;
825 value += fParamRMS1[dim][0];
827 value += fParamRMS1[dim][1];
829 value += fParamRMS1[dim][2]*z;
830 value += fParamRMS1[dim][3]*angle*angle*length*length;
831 value = TMath::Sqrt(TMath::Abs(value));
835 Float_t AliTPCClusterParam::GetRMSQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
837 // calculate mean RMS of cluster - z,angle, Q dependence
840 value += fParamRMSQ[dim][type][0];
841 value += fParamRMSQ[dim][type][1]*z;
842 value += fParamRMSQ[dim][type][2]*angle*angle;
843 value += fParamRMSQ[dim][type][3]*z/Qmean;
844 value += fParamRMSQ[dim][type][4]*angle*angle/Qmean;
845 value = TMath::Sqrt(TMath::Abs(value));
849 Float_t AliTPCClusterParam::GetRMSSigma(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
851 // calculates RMS of signal shape fluctuation
853 Float_t mean = GetRMSQ(dim,type,z,angle,Qmean);
854 Float_t value = fRMSSigmaFit[dim][type][0];
855 value+= fRMSSigmaFit[dim][type][1]*mean;
859 Float_t AliTPCClusterParam::GetShapeFactor(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean, Float_t rmsL, Float_t rmsM){
861 // calculates vallue - sigma distortion contribution
865 Float_t rmsMeanQ = GetRMSQ(dim,type,z,angle,Qmean);
866 if (rmsL<rmsMeanQ) return value;
868 Float_t rmsSigma = GetRMSSigma(dim,type,z,angle,Qmean);
870 if ((rmsM-rmsMeanQ)>2.0*(rmsSigma+fErrorRMSSys[dim])){
871 //1.5 sigma cut on mean
872 value+= rmsL*rmsL+2*rmsM*rmsM-3*rmsMeanQ*rmsMeanQ;
874 if ((rmsL-rmsMeanQ)>3.*(rmsSigma+fErrorRMSSys[dim])){
875 //3 sigma cut on local
876 value+= rmsL*rmsL-rmsMeanQ*rmsMeanQ;
879 return TMath::Sqrt(TMath::Abs(value));
884 void AliTPCClusterParam::FitData(TTree * tree){
886 // make fits for error param and shape param
893 void AliTPCClusterParam::FitResol(TTree * tree){
896 for (Int_t idir=0;idir<2; idir++){
897 for (Int_t itype=0; itype<3; itype++){
901 FitResol0(tree, idir, itype,param0,error0);
902 printf("\nResol\t%d\t%d\tchi2=%f\n",idir,itype,param0[3]);
903 printf("%f\t%f\t%f\n", param0[0],param0[1],param0[2]);
904 printf("%f\t%f\t%f\n", error0[0],error0[1],error0[2]);
905 for (Int_t ipar=0;ipar<4; ipar++){
906 fParamS0[idir][itype][ipar] = param0[ipar];
907 fErrorS0[idir][itype][ipar] = param0[ipar];
909 // error param with parabolic correction
910 FitResol0Par(tree, idir, itype,param0,error0);
911 printf("\nResolPar\t%d\t%d\tchi2=%f\n",idir,itype,param0[6]);
912 printf("%f\t%f\t%f\t%f\t%f\t%f\n", param0[0],param0[1],param0[2],param0[3],param0[4],param0[5]);
913 printf("%f\t%f\t%f\t%f\t%f\t%f\n", error0[0],error0[1],error0[2],error0[3],error0[4],error0[5]);
914 for (Int_t ipar=0;ipar<7; ipar++){
915 fParamS0Par[idir][itype][ipar] = param0[ipar];
916 fErrorS0Par[idir][itype][ipar] = param0[ipar];
919 FitResolQ(tree, idir, itype,param0,error0);
920 printf("\nResolQ\t%d\t%d\tchi2=%f\n",idir,itype,param0[5]);
921 printf("%f\t%f\t%f\t%f\t%f\n", param0[0],param0[1],param0[2],param0[3],param0[4]);
922 printf("%f\t%f\t%f\t%f\t%f\n", error0[0],error0[1],error0[2],error0[3],error0[4]);
923 for (Int_t ipar=0;ipar<6; ipar++){
924 fParamSQ[idir][itype][ipar] = param0[ipar];
925 fErrorSQ[idir][itype][ipar] = param0[ipar];
928 FitResolQPar(tree, idir, itype,param0,error0);
929 printf("\nResolQ\t%d\t%d\tchi2=%f\n",idir,itype,param0[8]);
930 printf("%f\t%f\t%f\t%f\t%f\t%f\t%f\t%f\n", param0[0],param0[1],param0[2],param0[3],param0[4],param0[5],param0[6],param0[7]);
931 printf("%f\t%f\t%f\t%f\t%f\t%f\t%f\t%f\n", error0[0],error0[1],error0[2],error0[3],error0[4],error0[5],error0[6],error0[7]);
932 for (Int_t ipar=0;ipar<9; ipar++){
933 fParamSQPar[idir][itype][ipar] = param0[ipar];
934 fErrorSQPar[idir][itype][ipar] = param0[ipar];
939 printf("Resol z-scaled\n");
940 for (Int_t idir=0;idir<2; idir++){
943 FitResol1(tree, idir,param0,error0);
944 printf("\nResol\t%d\tchi2=%f\n",idir,param0[3]);
945 printf("%f\t%f\t%f\n", param0[0],param0[1],param0[2]);
946 printf("%f\t%f\t%f\n", error0[0],error0[1],error0[2]);
947 for (Int_t ipar=0;ipar<4; ipar++){
948 fParamS1[idir][ipar] = param0[ipar];
949 fErrorS1[idir][ipar] = param0[ipar];
953 for (Int_t idir=0;idir<2; idir++){
954 printf("\nDirection %d\n",idir);
955 printf("%d\t%f\t%f\t%f\n", -1,fParamS1[idir][0],fParamS1[idir][1],fParamS1[idir][2]);
956 for (Int_t itype=0; itype<3; itype++){
958 if (itype==1) length=1;
959 if (itype==2) length=1.5;
960 printf("%d\t%f\t%f\t%f\n", itype,fParamS0[idir][itype][0],fParamS0[idir][itype][1]*TMath::Sqrt(length),fParamS0[idir][itype][2]/TMath::Sqrt(length));
967 void AliTPCClusterParam::FitRMS(TTree * tree){
970 for (Int_t idir=0;idir<2; idir++){
971 for (Int_t itype=0; itype<3; itype++){
974 FitRMS0(tree, idir, itype,param0,error0);
975 printf("\nRMS\t%d\t%d\tchi2=%f\n",idir,itype,param0[3]);
976 printf("%f\t%f\t%f\n", param0[0],param0[1],param0[2]);
977 printf("%f\t%f\t%f\n", error0[0],error0[1],error0[2]);
978 for (Int_t ipar=0;ipar<4; ipar++){
979 fParamRMS0[idir][itype][ipar] = param0[ipar];
980 fErrorRMS0[idir][itype][ipar] = param0[ipar];
982 FitRMSQ(tree, idir, itype,param0,error0);
983 printf("\nRMSQ\t%d\t%d\tchi2=%f\n",idir,itype,param0[5]);
984 printf("%f\t%f\t%f\t%f\t%f\n", param0[0],param0[1],param0[2],param0[3],param0[4]);
985 printf("%f\t%f\t%f\t%f\t%f\n", error0[0],error0[1],error0[2],error0[3],error0[4]);
986 for (Int_t ipar=0;ipar<6; ipar++){
987 fParamRMSQ[idir][itype][ipar] = param0[ipar];
988 fErrorRMSQ[idir][itype][ipar] = param0[ipar];
993 printf("RMS z-scaled\n");
994 for (Int_t idir=0;idir<2; idir++){
997 FitRMS1(tree, idir,param0,error0);
998 printf("\nRMS\t%d\tchi2=%f\n",idir,param0[4]);
999 printf("%f\t%f\t%f\t%f\n", param0[0],param0[1],param0[2], param0[3]);
1000 printf("%f\t%f\t%f\t%f\n", error0[0],error0[1],error0[2], error0[3]);
1001 for (Int_t ipar=0;ipar<5; ipar++){
1002 fParamRMS1[idir][ipar] = param0[ipar];
1003 fErrorRMS1[idir][ipar] = param0[ipar];
1007 for (Int_t idir=0;idir<2; idir++){
1008 printf("\nDirection %d\n",idir);
1009 printf("%d\t%f\t%f\t%f\t%f\n", -1,fParamRMS1[idir][0],fParamRMS1[idir][1],fParamRMS1[idir][2], fParamRMS1[idir][3]);
1010 for (Int_t itype=0; itype<3; itype++){
1011 Float_t length=0.75;
1012 if (itype==1) length=1;
1013 if (itype==2) length=1.5;
1014 if (itype==0) printf("%d\t%f\t\t\t%f\t%f\n", itype,fParamRMS0[idir][itype][0],fParamRMS0[idir][itype][1],fParamRMS0[idir][itype][2]/length);
1015 if (itype>0) printf("%d\t\t\t%f\t%f\t%f\n", itype,fParamRMS0[idir][itype][0],fParamRMS0[idir][itype][1],fParamRMS0[idir][itype][2]/length);
1021 printf("RMS fluctuation parameterization \n");
1022 for (Int_t idir=0;idir<2; idir++){
1023 for (Int_t itype=0; itype<3; itype++){
1026 FitRMSSigma(tree, idir,itype,param0,error0);
1027 printf("\t%d\t%d\t%f\t%f\n", idir, itype, param0[0],param0[1]);
1028 for (Int_t ipar=0;ipar<2; ipar++){
1029 fRMSSigmaFit[idir][itype][ipar] = param0[ipar];
1034 // store systematic error end RMS fluctuation parameterization
1036 TH1F hratio("hratio","hratio",100,-0.1,0.1);
1037 tree->Draw("(RMSm-AliTPCClusterParam::SGetRMSQ(Dim,Pad,Zm,AngleM,QMean))/RMSm>>hratio","Dim==0&&QMean>0");
1038 fErrorRMSSys[0] = hratio.GetRMS();
1039 tree->Draw("(RMSm-AliTPCClusterParam::SGetRMSQ(Dim,Pad,Zm,AngleM,QMean))/RMSm>>hratio","Dim==1&&QMean>0");
1040 fErrorRMSSys[1] = hratio.GetRMS();
1041 TH1F hratioR("hratioR","hratioR",100,0,0.2);
1042 tree->Draw("RMSs/RMSm>>hratioR","Dim==0&&QMean>0");
1043 fRMSSigmaRatio[0][0]=hratioR.GetMean();
1044 fRMSSigmaRatio[0][1]=hratioR.GetRMS();
1045 tree->Draw("RMSs/RMSm>>hratioR","Dim==1&&QMean>0");
1046 fRMSSigmaRatio[1][0]=hratioR.GetMean();
1047 fRMSSigmaRatio[1][1]=hratioR.GetRMS();
1050 void AliTPCClusterParam::Test(TTree * tree, const char *output){
1052 // Draw standard quality histograms to output file
1055 TFile f(output,"recreate");
1058 // 1D histograms - resolution
1060 for (Int_t idim=0; idim<2; idim++){
1061 for (Int_t ipad=0; ipad<3; ipad++){
1066 sprintf(hname1,"Delta0 Dir %d Pad %d",idim,ipad);
1067 sprintf(hcut1,"Dim==%d&&QMean<0&&Pad==%d",idim,ipad);
1068 sprintf(hexp1,"(Resol-AliTPCClusterParam::SGetError0(Dim,Pad,Zm,AngleM))/Resol>>%s",hname1);
1069 TH1F his1DRel0(hname1, hname1, 100,-0.2, 0.2);
1070 sprintf(hname1,"Dim==%d&&QMean<0&&Pad=%d",idim,ipad);
1071 tree->Draw(hexp1,hcut1,"");
1074 sprintf(hname1,"Delta0Par Dir %d Pad %d",idim,ipad);
1075 sprintf(hcut1,"Dim==%d&&QMean<0&&Pad==%d",idim,ipad);
1076 sprintf(hexp1,"(Resol-AliTPCClusterParam::SGetError0Par(Dim,Pad,Zm,AngleM))/Resol>>%s",hname1);
1077 TH1F his1DRel0Par(hname1, hname1, 100,-0.2, 0.2);
1078 sprintf(hname1,"Dim==%d&&QMean<0&&Pad=%d",idim,ipad);
1079 tree->Draw(hexp1,hcut1,"");
1080 his1DRel0Par.Write();
1085 // 2D histograms - resolution
1087 for (Int_t idim=0; idim<2; idim++){
1088 for (Int_t ipad=0; ipad<3; ipad++){
1093 sprintf(hname1,"2DDelta0 Dir %d Pad %d",idim,ipad);
1094 sprintf(hcut1,"Dim==%d&&QMean<0&&Pad==%d",idim,ipad);
1095 sprintf(hexp1,"(Resol-AliTPCClusterParam::SGetError0(Dim,Pad,Zm,AngleM))/Resol:AngleM:Zm>>%s",hname1);
1096 TProfile2D profDRel0(hname1, hname1, 6,0,250,6,0,1);
1097 sprintf(hname1,"Dim==%d&&QMean<0&&Pad=%d",idim,ipad);
1098 tree->Draw(hexp1,hcut1,"");
1101 sprintf(hname1,"2DDelta0Par Dir %d Pad %d",idim,ipad);
1102 sprintf(hcut1,"Dim==%d&&QMean<0&&Pad==%d",idim,ipad);
1103 sprintf(hexp1,"(Resol-AliTPCClusterParam::SGetError0Par(Dim,Pad,Zm,AngleM))/Resol:AngleM:Zm>>%s",hname1);
1104 TProfile2D profDRel0Par(hname1, hname1,6,0,250,6,0,1);
1105 sprintf(hname1,"Dim==%d&&QMean<0&&Pad=%d",idim,ipad);
1106 tree->Draw(hexp1,hcut1,"");
1107 profDRel0Par.Write();
1115 void AliTPCClusterParam::Print(Option_t* /*option*/) const{
1117 // Print param Information
1121 // Error parameterization
1123 printf("\nResolution Scaled factors\n");
1124 printf("Dir\tPad\tP0\t\tP1\t\tP2\t\tchi2\n");
1125 printf("Y\tall\t%f\t%f\t%f\t%f\n", TMath::Sqrt(TMath::Abs(fParamS1[0][0])),TMath::Sqrt(TMath::Abs(fParamS1[0][1])),
1126 TMath::Sqrt(TMath::Abs(fParamS1[0][2])),TMath::Sqrt(TMath::Abs(fParamS1[0][3])));
1127 for (Int_t ipad=0; ipad<3; ipad++){
1128 Float_t length=0.75;
1129 if (ipad==1) length=1;
1130 if (ipad==2) length=1.5;
1131 printf("\t%d\t%f\t%f\t%f\t%f\n", ipad,
1132 TMath::Sqrt(TMath::Abs(fParamS0[0][ipad][0])),
1133 TMath::Sqrt(TMath::Abs(fParamS0[0][ipad][1]*length)),
1134 TMath::Sqrt(TMath::Abs(fParamS0[0][ipad][2]/length)),
1135 TMath::Sqrt(TMath::Abs(fParamS0[0][ipad][3])));
1137 for (Int_t ipad=0; ipad<3; ipad++){
1138 Float_t length=0.75;
1139 if (ipad==1) length=1;
1140 if (ipad==2) length=1.5;
1141 printf("\t%dPar\t%f\t%f\t%f\t%f\n", ipad,
1142 TMath::Sqrt(TMath::Abs(fParamS0Par[0][ipad][0])),
1143 TMath::Sqrt(TMath::Abs(fParamS0Par[0][ipad][1]*length)),
1144 TMath::Sqrt(TMath::Abs(fParamS0Par[0][ipad][2]/length)),
1145 TMath::Sqrt(TMath::Abs(fParamS0Par[0][ipad][6])));
1147 printf("Z\tall\t%f\t%f\t%f\t%f\n", TMath::Sqrt(TMath::Abs(fParamS1[1][0])),TMath::Sqrt(fParamS1[1][1]),
1148 TMath::Sqrt(fParamS1[1][2]), TMath::Sqrt(fParamS1[1][3]));
1150 for (Int_t ipad=0; ipad<3; ipad++){
1151 Float_t length=0.75;
1152 if (ipad==1) length=1;
1153 if (ipad==2) length=1.5;
1154 printf("\t%d\t%f\t%f\t%f\t%f\n", ipad,
1155 TMath::Sqrt(TMath::Abs(fParamS0[1][ipad][0])),
1156 TMath::Sqrt(TMath::Abs(fParamS0[1][ipad][1]*length)),
1157 TMath::Sqrt(TMath::Abs(fParamS0[1][ipad][2]/length)),
1158 TMath::Sqrt(TMath::Abs(fParamS0[1][ipad][3])));
1160 for (Int_t ipad=0; ipad<3; ipad++){
1161 Float_t length=0.75;
1162 if (ipad==1) length=1;
1163 if (ipad==2) length=1.5;
1164 printf("\t%dPar\t%f\t%f\t%f\t%f\n", ipad,
1165 TMath::Sqrt(TMath::Abs(TMath::Abs(fParamS0Par[1][ipad][0]))),
1166 TMath::Sqrt(TMath::Abs(fParamS0Par[1][ipad][1]*length)),
1167 TMath::Sqrt(TMath::Abs(fParamS0Par[1][ipad][2]/length)),
1168 TMath::Sqrt(TMath::Abs(fParamS0Par[1][ipad][6])));
1175 printf("\nRMS Scaled factors\n");
1176 printf("Dir\tPad\tP00\t\tP01\t\tP1\t\tP2\t\tchi2\n");
1177 printf("Y\tall\t%f\t%f\t%f\t%f\t%f\n",
1178 TMath::Sqrt(TMath::Abs(fParamRMS1[0][0])),
1179 TMath::Sqrt(TMath::Abs(fParamRMS1[0][1])),
1180 TMath::Sqrt(TMath::Abs(fParamRMS1[0][2])),
1181 TMath::Sqrt(TMath::Abs(fParamRMS1[0][3])),
1182 TMath::Sqrt(TMath::Abs(fParamRMS1[0][4])));
1183 for (Int_t ipad=0; ipad<3; ipad++){
1184 Float_t length=0.75;
1185 if (ipad==1) length=1;
1186 if (ipad==2) length=1.5;
1188 printf("\t%d\t%f\t%f\t%f\t%f\t%f\n", ipad,
1189 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][0])),
1191 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][1])),
1192 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][2]/(length*length))),
1193 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][3])));
1195 printf("\t%d\t%f\t%f\t%f\t%f\t%f\n", ipad,
1197 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][0])),
1198 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][1])),
1199 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][2]/(length*length))),
1200 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][3])));
1204 printf("Z\tall\t%f\t%f\t%f\t%f\t%f\n",
1205 TMath::Sqrt(TMath::Abs(fParamRMS1[1][0])),
1206 TMath::Sqrt(TMath::Abs(fParamRMS1[1][1])),
1207 TMath::Sqrt(TMath::Abs(fParamRMS1[1][2])),
1208 TMath::Sqrt(TMath::Abs(fParamRMS1[1][3])),
1209 TMath::Sqrt(TMath::Abs(fParamRMS1[1][4])));
1210 for (Int_t ipad=0; ipad<3; ipad++){
1211 Float_t length=0.75;
1212 if (ipad==1) length=1;
1213 if (ipad==2) length=1.5;
1215 printf("\t%d\t%f\t%f\t%f\t%f\t%f\n", ipad,
1216 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][0])),
1218 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][1])),
1219 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][2]/(length*length))),
1220 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][3])));
1222 printf("\t%d\t%f\t%f\t%f\t%f\t%f\n", ipad,
1224 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][0])),
1225 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][1])),
1226 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][2]/(length*length))),
1227 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][3])));
1236 Float_t AliTPCClusterParam::Qnorm(Int_t ipad, Int_t itype, Float_t dr, Float_t ty, Float_t tz){
1237 // get Q normalization
1238 // type - 0 Qtot 1 Qmax
1239 // ipad - 0 (0.75 cm) ,1 (1 cm), 2 (1.5 cm)
1241 //expession formula - TString *strq0 = toolkit.FitPlane(chain,"dedxQ.fElements[2]","dr++ty++tz++dr*ty++dr*tz++ty*tz++ty^2++tz^2","IPad==0",chi2,npoints,param,covar,0,100000);
1243 if (fQNorm==0) return 0;
1244 TVectorD * norm = (TVectorD*)fQNorm->At(3*itype+ipad);
1245 if (!norm) return 0;
1246 TVectorD &no = *norm;
1247 Float_t res = no[0]+
1263 void AliTPCClusterParam::SetQnorm(Int_t ipad, Int_t itype, TVectorD * norm){
1265 // set normalization
1267 // type - 0 Qtot 1 Qmax
1268 // ipad - 0 (0.75 cm) ,1 (1 cm), 2 (1.5 cm)
1271 if (fQNorm==0) fQNorm = new TObjArray(6);
1272 fQNorm->AddAt(new TVectorD(*norm), itype*3+ipad);