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 -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
65 ///////////////////////////////////////////////////////////////////////////////
66 #include "AliTPCClusterParam.h"
71 #include <TLinearFitter.h>
73 #include <TProfile2D.h>
75 #include <TObjArray.h>
77 ClassImp(AliTPCClusterParam)
80 AliTPCClusterParam* AliTPCClusterParam::fgInstance = 0;
84 Example usage fitting parameterization:
85 TFile fres("resol.root"); //tree with resolution and shape
86 TTree * treeRes =(TTree*)fres.Get("Resol");
88 AliTPCClusterParam param;
89 param.SetInstance(¶m);
90 param.FitResol(treeRes);
91 param.FitRMS(treeRes);
92 TFile fparam("TPCClusterParam.root","recreate");
96 TFile fparam("TPCClusterParam.root");
97 AliTPCClusterParam *param2 = (AliTPCClusterParam *) fparam.Get("Param");
98 param2->SetInstance(param2);
99 param2->Test(treeRes);
102 treeRes->Draw("(Resol-AliTPCClusterParam::SGetError0(Dim,Pad,Zm,AngleM))/Resol","Dim==0&&QMean<0")
109 //_ singleton implementation __________________________________________________
110 AliTPCClusterParam* AliTPCClusterParam::Instance()
113 // Singleton implementation
114 // Returns an instance of this class, it is created if neccessary
116 if (fgInstance == 0){
117 fgInstance = new AliTPCClusterParam();
125 void AliTPCClusterParam::FitResol0(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error){
127 // Fit z - angular dependence of resolution
129 // Int_t dim=0, type=0;
131 sprintf(varVal,"Resol:AngleM:Zm");
133 sprintf(varErr,"Sigma:AngleS:Zs");
135 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean<0",dim,type);
137 Int_t entries = tree->Draw(varVal,varCut);
138 Float_t px[10000], py[10000], pz[10000];
139 Float_t ex[10000], ey[10000], ez[10000];
141 tree->Draw(varErr,varCut);
142 for (Int_t ipoint=0; ipoint<entries; ipoint++){
143 ex[ipoint]= tree->GetV3()[ipoint];
144 ey[ipoint]= tree->GetV2()[ipoint];
145 ez[ipoint]= tree->GetV1()[ipoint];
147 tree->Draw(varVal,varCut);
148 for (Int_t ipoint=0; ipoint<entries; ipoint++){
149 px[ipoint]= tree->GetV3()[ipoint];
150 py[ipoint]= tree->GetV2()[ipoint];
151 pz[ipoint]= tree->GetV1()[ipoint];
155 TLinearFitter fitter(3,"hyp2");
156 for (Int_t ipoint=0; ipoint<entries; ipoint++){
157 Float_t val = pz[ipoint]*pz[ipoint];
158 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
161 x[1] = py[ipoint]*py[ipoint];
162 fitter.AddPoint(x,val,err);
166 fitter.GetParameters(param);
167 param0[0] = param[0];
168 param0[1] = param[1];
169 param0[2] = param[2];
170 Float_t chi2 = fitter.GetChisquare()/entries;
172 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
173 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
174 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
178 void AliTPCClusterParam::FitResol0Par(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error){
180 // Fit z - angular dependence of resolution
182 // Int_t dim=0, type=0;
184 sprintf(varVal,"Resol:AngleM:Zm");
186 sprintf(varErr,"Sigma:AngleS:Zs");
188 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean<0",dim,type);
190 Int_t entries = tree->Draw(varVal,varCut);
191 Float_t px[10000], py[10000], pz[10000];
192 Float_t ex[10000], ey[10000], ez[10000];
194 tree->Draw(varErr,varCut);
195 for (Int_t ipoint=0; ipoint<entries; ipoint++){
196 ex[ipoint]= tree->GetV3()[ipoint];
197 ey[ipoint]= tree->GetV2()[ipoint];
198 ez[ipoint]= tree->GetV1()[ipoint];
200 tree->Draw(varVal,varCut);
201 for (Int_t ipoint=0; ipoint<entries; ipoint++){
202 px[ipoint]= tree->GetV3()[ipoint];
203 py[ipoint]= tree->GetV2()[ipoint];
204 pz[ipoint]= tree->GetV1()[ipoint];
208 TLinearFitter fitter(6,"hyp5");
209 for (Int_t ipoint=0; ipoint<entries; ipoint++){
210 Float_t val = pz[ipoint]*pz[ipoint];
211 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
214 x[1] = py[ipoint]*py[ipoint];
218 fitter.AddPoint(x,val,err);
222 fitter.GetParameters(param);
223 param0[0] = param[0];
224 param0[1] = param[1];
225 param0[2] = param[2];
226 param0[3] = param[3];
227 param0[4] = param[4];
228 param0[5] = param[5];
229 Float_t chi2 = fitter.GetChisquare()/entries;
231 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
232 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
233 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
234 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
235 error[4] = (fitter.GetParError(4)*TMath::Sqrt(chi2));
236 error[5] = (fitter.GetParError(5)*TMath::Sqrt(chi2));
243 void AliTPCClusterParam::FitResol1(TTree * tree, Int_t dim, Float_t *param0, Float_t *error){
245 // Fit z - angular dependence of resolution - pad length scaling
247 // Int_t dim=0, type=0;
249 sprintf(varVal,"Resol:AngleM*sqrt(Length):Zm/Length");
251 sprintf(varErr,"Sigma:AngleS:Zs");
253 sprintf(varCut,"Dim==%d&&QMean<0",dim);
255 Int_t entries = tree->Draw(varVal,varCut);
256 Float_t px[10000], py[10000], pz[10000];
257 Float_t ex[10000], ey[10000], ez[10000];
259 tree->Draw(varErr,varCut);
260 for (Int_t ipoint=0; ipoint<entries; ipoint++){
261 ex[ipoint]= tree->GetV3()[ipoint];
262 ey[ipoint]= tree->GetV2()[ipoint];
263 ez[ipoint]= tree->GetV1()[ipoint];
265 tree->Draw(varVal,varCut);
266 for (Int_t ipoint=0; ipoint<entries; ipoint++){
267 px[ipoint]= tree->GetV3()[ipoint];
268 py[ipoint]= tree->GetV2()[ipoint];
269 pz[ipoint]= tree->GetV1()[ipoint];
273 TLinearFitter fitter(3,"hyp2");
274 for (Int_t ipoint=0; ipoint<entries; ipoint++){
275 Float_t val = pz[ipoint]*pz[ipoint];
276 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
279 x[1] = py[ipoint]*py[ipoint];
280 fitter.AddPoint(x,val,err);
284 fitter.GetParameters(param);
285 param0[0] = param[0];
286 param0[1] = param[1];
287 param0[2] = param[2];
288 Float_t chi2 = fitter.GetChisquare()/entries;
290 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
291 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
292 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
295 void AliTPCClusterParam::FitResolQ(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error){
297 // Fit z - angular dependence of resolution - Q scaling
299 // Int_t dim=0, type=0;
301 sprintf(varVal,"Resol:AngleM/sqrt(QMean):Zm/QMean");
303 sprintf(varVal0,"Resol:AngleM:Zm");
306 sprintf(varErr,"Sigma:AngleS:Zs");
308 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean>0",dim,type);
310 Int_t entries = tree->Draw(varVal,varCut);
311 Float_t px[20000], py[20000], pz[20000], pu[20000], pt[20000];
312 Float_t ex[20000], ey[20000], ez[20000];
314 tree->Draw(varErr,varCut);
315 for (Int_t ipoint=0; ipoint<entries; ipoint++){
316 ex[ipoint]= tree->GetV3()[ipoint];
317 ey[ipoint]= tree->GetV2()[ipoint];
318 ez[ipoint]= tree->GetV1()[ipoint];
320 tree->Draw(varVal,varCut);
321 for (Int_t ipoint=0; ipoint<entries; ipoint++){
322 px[ipoint]= tree->GetV3()[ipoint];
323 py[ipoint]= tree->GetV2()[ipoint];
324 pz[ipoint]= tree->GetV1()[ipoint];
326 tree->Draw(varVal0,varCut);
327 for (Int_t ipoint=0; ipoint<entries; ipoint++){
328 pu[ipoint]= tree->GetV3()[ipoint];
329 pt[ipoint]= tree->GetV2()[ipoint];
333 TLinearFitter fitter(5,"hyp4");
334 for (Int_t ipoint=0; ipoint<entries; ipoint++){
335 Float_t val = pz[ipoint]*pz[ipoint];
336 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
339 x[1] = pt[ipoint]*pt[ipoint];
341 x[3] = py[ipoint]*py[ipoint];
342 fitter.AddPoint(x,val,err);
347 fitter.GetParameters(param);
348 param0[0] = param[0];
349 param0[1] = param[1];
350 param0[2] = param[2];
351 param0[3] = param[3];
352 param0[4] = param[4];
353 Float_t chi2 = fitter.GetChisquare()/entries;
355 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
356 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
357 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
358 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
359 error[4] = (fitter.GetParError(4)*TMath::Sqrt(chi2));
362 void AliTPCClusterParam::FitResolQPar(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error){
364 // Fit z - angular dependence of resolution - Q scaling - parabolic correction
366 // Int_t dim=0, type=0;
368 sprintf(varVal,"Resol:AngleM/sqrt(QMean):Zm/QMean");
370 sprintf(varVal0,"Resol:AngleM:Zm");
373 sprintf(varErr,"Sigma:AngleS:Zs");
375 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean>0",dim,type);
377 Int_t entries = tree->Draw(varVal,varCut);
378 Float_t px[20000], py[20000], pz[20000], pu[20000], pt[20000];
379 Float_t ex[20000], ey[20000], ez[20000];
381 tree->Draw(varErr,varCut);
382 for (Int_t ipoint=0; ipoint<entries; ipoint++){
383 ex[ipoint]= tree->GetV3()[ipoint];
384 ey[ipoint]= tree->GetV2()[ipoint];
385 ez[ipoint]= tree->GetV1()[ipoint];
387 tree->Draw(varVal,varCut);
388 for (Int_t ipoint=0; ipoint<entries; ipoint++){
389 px[ipoint]= tree->GetV3()[ipoint];
390 py[ipoint]= tree->GetV2()[ipoint];
391 pz[ipoint]= tree->GetV1()[ipoint];
393 tree->Draw(varVal0,varCut);
394 for (Int_t ipoint=0; ipoint<entries; ipoint++){
395 pu[ipoint]= tree->GetV3()[ipoint];
396 pt[ipoint]= tree->GetV2()[ipoint];
400 TLinearFitter fitter(8,"hyp7");
401 for (Int_t ipoint=0; ipoint<entries; ipoint++){
402 Float_t val = pz[ipoint]*pz[ipoint];
403 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
406 x[1] = pt[ipoint]*pt[ipoint];
411 x[6] = py[ipoint]*py[ipoint];
413 fitter.AddPoint(x,val,err);
418 fitter.GetParameters(param);
419 param0[0] = param[0];
420 param0[1] = param[1];
421 param0[2] = param[2];
422 param0[3] = param[3];
423 param0[4] = param[4];
424 param0[5] = param[5];
425 param0[6] = param[6];
426 param0[7] = param[7];
428 Float_t chi2 = fitter.GetChisquare()/entries;
430 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
431 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
432 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
433 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
434 error[4] = (fitter.GetParError(4)*TMath::Sqrt(chi2));
435 error[5] = (fitter.GetParError(5)*TMath::Sqrt(chi2));
436 error[6] = (fitter.GetParError(6)*TMath::Sqrt(chi2));
437 error[7] = (fitter.GetParError(7)*TMath::Sqrt(chi2));
442 void AliTPCClusterParam::FitRMS0(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error){
444 // Fit z - angular dependence of resolution
446 // Int_t dim=0, type=0;
448 sprintf(varVal,"RMSm:AngleM:Zm");
450 sprintf(varErr,"sqrt((1./(100.*sqrt(12.))^2)+RMSe0^2):AngleS:Zs");
452 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean<0",dim,type);
454 Int_t entries = tree->Draw(varVal,varCut);
455 Float_t px[10000], py[10000], pz[10000];
456 Float_t ex[10000], ey[10000], ez[10000];
458 tree->Draw(varErr,varCut);
459 for (Int_t ipoint=0; ipoint<entries; ipoint++){
460 ex[ipoint]= tree->GetV3()[ipoint];
461 ey[ipoint]= tree->GetV2()[ipoint];
462 ez[ipoint]= tree->GetV1()[ipoint];
464 tree->Draw(varVal,varCut);
465 for (Int_t ipoint=0; ipoint<entries; ipoint++){
466 px[ipoint]= tree->GetV3()[ipoint];
467 py[ipoint]= tree->GetV2()[ipoint];
468 pz[ipoint]= tree->GetV1()[ipoint];
472 TLinearFitter fitter(3,"hyp2");
473 for (Int_t ipoint=0; ipoint<entries; ipoint++){
474 Float_t val = pz[ipoint]*pz[ipoint];
475 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
478 x[1] = py[ipoint]*py[ipoint];
479 fitter.AddPoint(x,val,err);
483 fitter.GetParameters(param);
484 param0[0] = param[0];
485 param0[1] = param[1];
486 param0[2] = param[2];
487 Float_t chi2 = fitter.GetChisquare()/entries;
489 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
490 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
491 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
494 void AliTPCClusterParam::FitRMS1(TTree * tree, Int_t dim, Float_t *param0, Float_t *error){
496 // Fit z - angular dependence of resolution - pad length scaling
498 // Int_t dim=0, type=0;
500 sprintf(varVal,"RMSm:AngleM*Length:Zm");
502 sprintf(varErr,"sqrt((1./(100.*sqrt(12.))^2)+RMSe0^2):AngleS:Pad");
504 sprintf(varCut,"Dim==%d&&QMean<0",dim);
506 Int_t entries = tree->Draw(varVal,varCut);
507 Float_t px[10000], py[10000], pz[10000];
508 Float_t type[10000], ey[10000], ez[10000];
510 tree->Draw(varErr,varCut);
511 for (Int_t ipoint=0; ipoint<entries; ipoint++){
512 type[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(4,"hyp3");
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]);
529 x[0] = (type[ipoint]<0.5)? 0.:1.;
531 x[2] = py[ipoint]*py[ipoint];
532 fitter.AddPoint(x,val,err);
536 fitter.GetParameters(param);
537 param0[0] = param[0];
538 param0[1] = param[0]+param[1];
539 param0[2] = param[2];
540 param0[3] = param[3];
541 Float_t chi2 = fitter.GetChisquare()/entries;
543 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
544 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
545 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
546 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
549 void AliTPCClusterParam::FitRMSQ(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error){
551 // Fit z - angular dependence of resolution - Q scaling
553 // Int_t dim=0, type=0;
555 sprintf(varVal,"RMSm:AngleM/sqrt(QMean):Zm/QMean");
557 sprintf(varVal0,"RMSm:AngleM:Zm");
560 sprintf(varErr,"sqrt((1./(100.*sqrt(12.))^2)+RMSe0^2):AngleS:Zs");
562 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean>0",dim,type);
564 Int_t entries = tree->Draw(varVal,varCut);
565 Float_t px[20000], py[20000], pz[20000], pu[20000], pt[20000];
566 Float_t ex[20000], ey[20000], ez[20000];
568 tree->Draw(varErr,varCut);
569 for (Int_t ipoint=0; ipoint<entries; ipoint++){
570 ex[ipoint]= tree->GetV3()[ipoint];
571 ey[ipoint]= tree->GetV2()[ipoint];
572 ez[ipoint]= tree->GetV1()[ipoint];
574 tree->Draw(varVal,varCut);
575 for (Int_t ipoint=0; ipoint<entries; ipoint++){
576 px[ipoint]= tree->GetV3()[ipoint];
577 py[ipoint]= tree->GetV2()[ipoint];
578 pz[ipoint]= tree->GetV1()[ipoint];
580 tree->Draw(varVal0,varCut);
581 for (Int_t ipoint=0; ipoint<entries; ipoint++){
582 pu[ipoint]= tree->GetV3()[ipoint];
583 pt[ipoint]= tree->GetV2()[ipoint];
587 TLinearFitter fitter(5,"hyp4");
588 for (Int_t ipoint=0; ipoint<entries; ipoint++){
589 Float_t val = pz[ipoint]*pz[ipoint];
590 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+fRatio*fRatio*pz[ipoint]*pz[ipoint]);
593 x[1] = pt[ipoint]*pt[ipoint];
595 x[3] = py[ipoint]*py[ipoint];
596 fitter.AddPoint(x,val,err);
601 fitter.GetParameters(param);
602 param0[0] = param[0];
603 param0[1] = param[1];
604 param0[2] = param[2];
605 param0[3] = param[3];
606 param0[4] = param[4];
607 Float_t chi2 = fitter.GetChisquare()/entries;
609 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
610 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
611 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
612 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
613 error[4] = (fitter.GetParError(4)*TMath::Sqrt(chi2));
617 void AliTPCClusterParam::FitRMSSigma(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t */*error*/){
619 // Fit z - angular dependence of resolution - Q scaling
621 // Int_t dim=0, type=0;
623 sprintf(varVal,"RMSs:RMSm");
626 sprintf(varCut,"Dim==%d&&Pad==%d&&QMean<0",dim,type);
628 Int_t entries = tree->Draw(varVal,varCut);
629 Float_t px[20000], py[20000];
631 tree->Draw(varVal,varCut);
632 for (Int_t ipoint=0; ipoint<entries; ipoint++){
633 px[ipoint]= tree->GetV2()[ipoint];
634 py[ipoint]= tree->GetV1()[ipoint];
636 TLinearFitter fitter(2,"pol1");
637 for (Int_t ipoint=0; ipoint<entries; ipoint++){
638 Float_t val = py[ipoint];
639 Float_t err = fRatio*px[ipoint];
642 fitter.AddPoint(x,val,err);
645 param0[0]= fitter.GetParameter(0);
646 param0[1]= fitter.GetParameter(1);
651 Float_t AliTPCClusterParam::GetError0(Int_t dim, Int_t type, Float_t z, Float_t angle){
656 value += fParamS0[dim][type][0];
657 value += fParamS0[dim][type][1]*z;
658 value += fParamS0[dim][type][2]*angle*angle;
659 value = TMath::Sqrt(TMath::Abs(value));
664 Float_t AliTPCClusterParam::GetError0Par(Int_t dim, Int_t type, Float_t z, Float_t angle){
669 value += fParamS0Par[dim][type][0];
670 value += fParamS0Par[dim][type][1]*z;
671 value += fParamS0Par[dim][type][2]*angle*angle;
672 value += fParamS0Par[dim][type][3]*z*z;
673 value += fParamS0Par[dim][type][4]*angle*angle*angle*angle;
674 value += fParamS0Par[dim][type][5]*z*angle*angle;
675 value = TMath::Sqrt(TMath::Abs(value));
681 Float_t AliTPCClusterParam::GetError1(Int_t dim, Int_t type, Float_t z, Float_t angle){
687 if (type==1) length=1;
688 if (type==2) length=1.5;
689 value += fParamS1[dim][0];
690 value += fParamS1[dim][1]*z/length;
691 value += fParamS1[dim][2]*angle*angle*length;
692 value = TMath::Sqrt(TMath::Abs(value));
696 Float_t AliTPCClusterParam::GetErrorQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
701 value += fParamSQ[dim][type][0];
702 value += fParamSQ[dim][type][1]*z;
703 value += fParamSQ[dim][type][2]*angle*angle;
704 value += fParamSQ[dim][type][3]*z/Qmean;
705 value += fParamSQ[dim][type][4]*angle*angle/Qmean;
706 value = TMath::Sqrt(TMath::Abs(value));
712 Float_t AliTPCClusterParam::GetErrorQPar(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
717 value += fParamSQPar[dim][type][0];
718 value += fParamSQPar[dim][type][1]*z;
719 value += fParamSQPar[dim][type][2]*angle*angle;
720 value += fParamSQPar[dim][type][3]*z*z;
721 value += fParamSQPar[dim][type][4]*angle*angle*angle*angle;
722 value += fParamSQPar[dim][type][5]*z*angle*angle;
723 value += fParamSQPar[dim][type][6]*z/Qmean;
724 value += fParamSQPar[dim][type][7]*angle*angle/Qmean;
725 value = TMath::Sqrt(TMath::Abs(value));
731 Float_t AliTPCClusterParam::GetErrorQParScaled(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
736 value += fParamSQPar[dim][type][0];
737 value += fParamSQPar[dim][type][1]*z;
738 value += fParamSQPar[dim][type][2]*angle*angle;
739 value += fParamSQPar[dim][type][3]*z*z;
740 value += fParamSQPar[dim][type][4]*angle*angle*angle*angle;
741 value += fParamSQPar[dim][type][5]*z*angle*angle;
742 value += fParamSQPar[dim][type][6]*z/Qmean;
743 value += fParamSQPar[dim][type][7]*angle*angle/Qmean;
744 Float_t valueMean = GetError0Par(dim,type,z,angle);
745 value -= 0.35*0.35*valueMean*valueMean;
746 value = TMath::Sqrt(TMath::Abs(value));
752 Float_t AliTPCClusterParam::GetRMS0(Int_t dim, Int_t type, Float_t z, Float_t angle){
754 // calculate mean RMS of cluster - z,angle - parameters for each pad and dimension separatelly
757 value += fParamRMS0[dim][type][0];
758 value += fParamRMS0[dim][type][1]*z;
759 value += fParamRMS0[dim][type][2]*angle*angle;
760 value = TMath::Sqrt(TMath::Abs(value));
764 Float_t AliTPCClusterParam::GetRMS1(Int_t dim, Int_t type, Float_t z, Float_t angle){
766 // calculate mean RMS of cluster - z,angle - pad length scalling
770 if (type==1) length=1;
771 if (type==2) length=1.5;
773 value += fParamRMS1[dim][0];
775 value += fParamRMS1[dim][1];
777 value += fParamRMS1[dim][2]*z;
778 value += fParamRMS1[dim][3]*angle*angle*length*length;
779 value = TMath::Sqrt(TMath::Abs(value));
783 Float_t AliTPCClusterParam::GetRMSQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
785 // calculate mean RMS of cluster - z,angle, Q dependence
788 value += fParamRMSQ[dim][type][0];
789 value += fParamRMSQ[dim][type][1]*z;
790 value += fParamRMSQ[dim][type][2]*angle*angle;
791 value += fParamRMSQ[dim][type][3]*z/Qmean;
792 value += fParamRMSQ[dim][type][4]*angle*angle/Qmean;
793 value = TMath::Sqrt(TMath::Abs(value));
797 Float_t AliTPCClusterParam::GetRMSSigma(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){
799 // calculates RMS of signal shape fluctuation
801 Float_t mean = GetRMSQ(dim,type,z,angle,Qmean);
802 Float_t value = fRMSSigmaFit[dim][type][0];
803 value+= fRMSSigmaFit[dim][type][1]*mean;
807 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){
809 // calculates vallue - sigma distortion contribution
813 Float_t rmsMeanQ = GetRMSQ(dim,type,z,angle,Qmean);
814 if (rmsL<rmsMeanQ) return value;
816 Float_t rmsSigma = GetRMSSigma(dim,type,z,angle,Qmean);
818 if ((rmsM-rmsMeanQ)>2.0*(rmsSigma+fErrorRMSSys[dim])){
819 //1.5 sigma cut on mean
820 value+= rmsL*rmsL+2*rmsM*rmsM-3*rmsMeanQ*rmsMeanQ;
822 if ((rmsL-rmsMeanQ)>3.*(rmsSigma+fErrorRMSSys[dim])){
823 //3 sigma cut on local
824 value+= rmsL*rmsL-rmsMeanQ*rmsMeanQ;
827 return TMath::Sqrt(TMath::Abs(value));
832 void AliTPCClusterParam::FitData(TTree * tree){
834 // make fits for error param and shape param
841 void AliTPCClusterParam::FitResol(TTree * tree){
844 for (Int_t idir=0;idir<2; idir++){
845 for (Int_t itype=0; itype<3; itype++){
849 FitResol0(tree, idir, itype,param0,error0);
850 printf("\nResol\t%d\t%d\tchi2=%f\n",idir,itype,param0[3]);
851 printf("%f\t%f\t%f\n", param0[0],param0[1],param0[2]);
852 printf("%f\t%f\t%f\n", error0[0],error0[1],error0[2]);
853 for (Int_t ipar=0;ipar<4; ipar++){
854 fParamS0[idir][itype][ipar] = param0[ipar];
855 fErrorS0[idir][itype][ipar] = param0[ipar];
857 // error param with parabolic correction
858 FitResol0Par(tree, idir, itype,param0,error0);
859 printf("\nResolPar\t%d\t%d\tchi2=%f\n",idir,itype,param0[6]);
860 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]);
861 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]);
862 for (Int_t ipar=0;ipar<7; ipar++){
863 fParamS0Par[idir][itype][ipar] = param0[ipar];
864 fErrorS0Par[idir][itype][ipar] = param0[ipar];
867 FitResolQ(tree, idir, itype,param0,error0);
868 printf("\nResolQ\t%d\t%d\tchi2=%f\n",idir,itype,param0[5]);
869 printf("%f\t%f\t%f\t%f\t%f\n", param0[0],param0[1],param0[2],param0[3],param0[4]);
870 printf("%f\t%f\t%f\t%f\t%f\n", error0[0],error0[1],error0[2],error0[3],error0[4]);
871 for (Int_t ipar=0;ipar<6; ipar++){
872 fParamSQ[idir][itype][ipar] = param0[ipar];
873 fErrorSQ[idir][itype][ipar] = param0[ipar];
876 FitResolQPar(tree, idir, itype,param0,error0);
877 printf("\nResolQ\t%d\t%d\tchi2=%f\n",idir,itype,param0[8]);
878 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]);
879 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]);
880 for (Int_t ipar=0;ipar<9; ipar++){
881 fParamSQPar[idir][itype][ipar] = param0[ipar];
882 fErrorSQPar[idir][itype][ipar] = param0[ipar];
887 printf("Resol z-scaled\n");
888 for (Int_t idir=0;idir<2; idir++){
891 FitResol1(tree, idir,param0,error0);
892 printf("\nResol\t%d\tchi2=%f\n",idir,param0[3]);
893 printf("%f\t%f\t%f\n", param0[0],param0[1],param0[2]);
894 printf("%f\t%f\t%f\n", error0[0],error0[1],error0[2]);
895 for (Int_t ipar=0;ipar<4; ipar++){
896 fParamS1[idir][ipar] = param0[ipar];
897 fErrorS1[idir][ipar] = param0[ipar];
901 for (Int_t idir=0;idir<2; idir++){
902 printf("\nDirection %d\n",idir);
903 printf("%d\t%f\t%f\t%f\n", -1,fParamS1[idir][0],fParamS1[idir][1],fParamS1[idir][2]);
904 for (Int_t itype=0; itype<3; itype++){
906 if (itype==1) length=1;
907 if (itype==2) length=1.5;
908 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));
915 void AliTPCClusterParam::FitRMS(TTree * tree){
918 for (Int_t idir=0;idir<2; idir++){
919 for (Int_t itype=0; itype<3; itype++){
922 FitRMS0(tree, idir, itype,param0,error0);
923 printf("\nRMS\t%d\t%d\tchi2=%f\n",idir,itype,param0[3]);
924 printf("%f\t%f\t%f\n", param0[0],param0[1],param0[2]);
925 printf("%f\t%f\t%f\n", error0[0],error0[1],error0[2]);
926 for (Int_t ipar=0;ipar<4; ipar++){
927 fParamRMS0[idir][itype][ipar] = param0[ipar];
928 fErrorRMS0[idir][itype][ipar] = param0[ipar];
930 FitRMSQ(tree, idir, itype,param0,error0);
931 printf("\nRMSQ\t%d\t%d\tchi2=%f\n",idir,itype,param0[5]);
932 printf("%f\t%f\t%f\t%f\t%f\n", param0[0],param0[1],param0[2],param0[3],param0[4]);
933 printf("%f\t%f\t%f\t%f\t%f\n", error0[0],error0[1],error0[2],error0[3],error0[4]);
934 for (Int_t ipar=0;ipar<6; ipar++){
935 fParamRMSQ[idir][itype][ipar] = param0[ipar];
936 fErrorRMSQ[idir][itype][ipar] = param0[ipar];
941 printf("RMS z-scaled\n");
942 for (Int_t idir=0;idir<2; idir++){
945 FitRMS1(tree, idir,param0,error0);
946 printf("\nRMS\t%d\tchi2=%f\n",idir,param0[4]);
947 printf("%f\t%f\t%f\t%f\n", param0[0],param0[1],param0[2], param0[3]);
948 printf("%f\t%f\t%f\t%f\n", error0[0],error0[1],error0[2], error0[3]);
949 for (Int_t ipar=0;ipar<5; ipar++){
950 fParamRMS1[idir][ipar] = param0[ipar];
951 fErrorRMS1[idir][ipar] = param0[ipar];
955 for (Int_t idir=0;idir<2; idir++){
956 printf("\nDirection %d\n",idir);
957 printf("%d\t%f\t%f\t%f\t%f\n", -1,fParamRMS1[idir][0],fParamRMS1[idir][1],fParamRMS1[idir][2], fParamRMS1[idir][3]);
958 for (Int_t itype=0; itype<3; itype++){
960 if (itype==1) length=1;
961 if (itype==2) length=1.5;
962 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);
963 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);
969 printf("RMS fluctuation parameterization \n");
970 for (Int_t idir=0;idir<2; idir++){
971 for (Int_t itype=0; itype<3; itype++){
974 FitRMSSigma(tree, idir,itype,param0,error0);
975 printf("\t%d\t%d\t%f\t%f\n", idir, itype, param0[0],param0[1]);
976 for (Int_t ipar=0;ipar<2; ipar++){
977 fRMSSigmaFit[idir][itype][ipar] = param0[ipar];
982 // store systematic error end RMS fluctuation parameterization
984 TH1F hratio("hratio","hratio",100,-0.1,0.1);
985 tree->Draw("(RMSm-AliTPCClusterParam::SGetRMSQ(Dim,Pad,Zm,AngleM,QMean))/RMSm>>hratio","Dim==0&&QMean>0");
986 fErrorRMSSys[0] = hratio.GetRMS();
987 tree->Draw("(RMSm-AliTPCClusterParam::SGetRMSQ(Dim,Pad,Zm,AngleM,QMean))/RMSm>>hratio","Dim==1&&QMean>0");
988 fErrorRMSSys[1] = hratio.GetRMS();
989 TH1F hratioR("hratioR","hratioR",100,0,0.2);
990 tree->Draw("RMSs/RMSm>>hratioR","Dim==0&&QMean>0");
991 fRMSSigmaRatio[0][0]=hratioR.GetMean();
992 fRMSSigmaRatio[0][1]=hratioR.GetRMS();
993 tree->Draw("RMSs/RMSm>>hratioR","Dim==1&&QMean>0");
994 fRMSSigmaRatio[1][0]=hratioR.GetMean();
995 fRMSSigmaRatio[1][1]=hratioR.GetRMS();
998 void AliTPCClusterParam::Test(TTree * tree, const char *output){
1000 // Draw standard quality histograms to output file
1003 TFile f(output,"recreate");
1006 // 1D histograms - resolution
1008 for (Int_t idim=0; idim<2; idim++){
1009 for (Int_t ipad=0; ipad<3; ipad++){
1014 sprintf(hname1,"Delta0 Dir %d Pad %d",idim,ipad);
1015 sprintf(hcut1,"Dim==%d&&QMean<0&&Pad==%d",idim,ipad);
1016 sprintf(hexp1,"(Resol-AliTPCClusterParam::SGetError0(Dim,Pad,Zm,AngleM))/Resol>>%s",hname1);
1017 TH1F his1DRel0(hname1, hname1, 100,-0.2, 0.2);
1018 sprintf(hname1,"Dim==%d&&QMean<0&&Pad=%d",idim,ipad);
1019 tree->Draw(hexp1,hcut1,"");
1022 sprintf(hname1,"Delta0Par Dir %d Pad %d",idim,ipad);
1023 sprintf(hcut1,"Dim==%d&&QMean<0&&Pad==%d",idim,ipad);
1024 sprintf(hexp1,"(Resol-AliTPCClusterParam::SGetError0Par(Dim,Pad,Zm,AngleM))/Resol>>%s",hname1);
1025 TH1F his1DRel0Par(hname1, hname1, 100,-0.2, 0.2);
1026 sprintf(hname1,"Dim==%d&&QMean<0&&Pad=%d",idim,ipad);
1027 tree->Draw(hexp1,hcut1,"");
1028 his1DRel0Par.Write();
1033 // 2D histograms - resolution
1035 for (Int_t idim=0; idim<2; idim++){
1036 for (Int_t ipad=0; ipad<3; ipad++){
1041 sprintf(hname1,"2DDelta0 Dir %d Pad %d",idim,ipad);
1042 sprintf(hcut1,"Dim==%d&&QMean<0&&Pad==%d",idim,ipad);
1043 sprintf(hexp1,"(Resol-AliTPCClusterParam::SGetError0(Dim,Pad,Zm,AngleM))/Resol:AngleM:Zm>>%s",hname1);
1044 TProfile2D profDRel0(hname1, hname1, 6,0,250,6,0,1);
1045 sprintf(hname1,"Dim==%d&&QMean<0&&Pad=%d",idim,ipad);
1046 tree->Draw(hexp1,hcut1,"");
1049 sprintf(hname1,"2DDelta0Par Dir %d Pad %d",idim,ipad);
1050 sprintf(hcut1,"Dim==%d&&QMean<0&&Pad==%d",idim,ipad);
1051 sprintf(hexp1,"(Resol-AliTPCClusterParam::SGetError0Par(Dim,Pad,Zm,AngleM))/Resol:AngleM:Zm>>%s",hname1);
1052 TProfile2D profDRel0Par(hname1, hname1,6,0,250,6,0,1);
1053 sprintf(hname1,"Dim==%d&&QMean<0&&Pad=%d",idim,ipad);
1054 tree->Draw(hexp1,hcut1,"");
1055 profDRel0Par.Write();
1063 void AliTPCClusterParam::Print(Option_t* /*option*/) const{
1065 // Print param Information
1069 // Error parameterization
1071 printf("\nResolution Scaled factors\n");
1072 printf("Dir\tPad\tP0\t\tP1\t\tP2\t\tchi2\n");
1073 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])),
1074 TMath::Sqrt(TMath::Abs(fParamS1[0][2])),TMath::Sqrt(TMath::Abs(fParamS1[0][3])));
1075 for (Int_t ipad=0; ipad<3; ipad++){
1076 Float_t length=0.75;
1077 if (ipad==1) length=1;
1078 if (ipad==2) length=1.5;
1079 printf("\t%d\t%f\t%f\t%f\t%f\n", ipad,
1080 TMath::Sqrt(TMath::Abs(fParamS0[0][ipad][0])),
1081 TMath::Sqrt(TMath::Abs(fParamS0[0][ipad][1]*length)),
1082 TMath::Sqrt(TMath::Abs(fParamS0[0][ipad][2]/length)),
1083 TMath::Sqrt(TMath::Abs(fParamS0[0][ipad][3])));
1085 for (Int_t ipad=0; ipad<3; ipad++){
1086 Float_t length=0.75;
1087 if (ipad==1) length=1;
1088 if (ipad==2) length=1.5;
1089 printf("\t%dPar\t%f\t%f\t%f\t%f\n", ipad,
1090 TMath::Sqrt(TMath::Abs(fParamS0Par[0][ipad][0])),
1091 TMath::Sqrt(TMath::Abs(fParamS0Par[0][ipad][1]*length)),
1092 TMath::Sqrt(TMath::Abs(fParamS0Par[0][ipad][2]/length)),
1093 TMath::Sqrt(TMath::Abs(fParamS0Par[0][ipad][6])));
1095 printf("Z\tall\t%f\t%f\t%f\t%f\n", TMath::Sqrt(TMath::Abs(fParamS1[1][0])),TMath::Sqrt(fParamS1[1][1]),
1096 TMath::Sqrt(fParamS1[1][2]), TMath::Sqrt(fParamS1[1][3]));
1098 for (Int_t ipad=0; ipad<3; ipad++){
1099 Float_t length=0.75;
1100 if (ipad==1) length=1;
1101 if (ipad==2) length=1.5;
1102 printf("\t%d\t%f\t%f\t%f\t%f\n", ipad,
1103 TMath::Sqrt(TMath::Abs(fParamS0[1][ipad][0])),
1104 TMath::Sqrt(TMath::Abs(fParamS0[1][ipad][1]*length)),
1105 TMath::Sqrt(TMath::Abs(fParamS0[1][ipad][2]/length)),
1106 TMath::Sqrt(TMath::Abs(fParamS0[1][ipad][3])));
1108 for (Int_t ipad=0; ipad<3; ipad++){
1109 Float_t length=0.75;
1110 if (ipad==1) length=1;
1111 if (ipad==2) length=1.5;
1112 printf("\t%dPar\t%f\t%f\t%f\t%f\n", ipad,
1113 TMath::Sqrt(TMath::Abs(TMath::Abs(fParamS0Par[1][ipad][0]))),
1114 TMath::Sqrt(TMath::Abs(fParamS0Par[1][ipad][1]*length)),
1115 TMath::Sqrt(TMath::Abs(fParamS0Par[1][ipad][2]/length)),
1116 TMath::Sqrt(TMath::Abs(fParamS0Par[1][ipad][6])));
1123 printf("\nRMS Scaled factors\n");
1124 printf("Dir\tPad\tP00\t\tP01\t\tP1\t\tP2\t\tchi2\n");
1125 printf("Y\tall\t%f\t%f\t%f\t%f\t%f\n",
1126 TMath::Sqrt(TMath::Abs(fParamRMS1[0][0])),
1127 TMath::Sqrt(TMath::Abs(fParamRMS1[0][1])),
1128 TMath::Sqrt(TMath::Abs(fParamRMS1[0][2])),
1129 TMath::Sqrt(TMath::Abs(fParamRMS1[0][3])),
1130 TMath::Sqrt(TMath::Abs(fParamRMS1[0][4])));
1131 for (Int_t ipad=0; ipad<3; ipad++){
1132 Float_t length=0.75;
1133 if (ipad==1) length=1;
1134 if (ipad==2) length=1.5;
1136 printf("\t%d\t%f\t%f\t%f\t%f\t%f\n", ipad,
1137 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][0])),
1139 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][1])),
1140 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][2]/(length*length))),
1141 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][3])));
1143 printf("\t%d\t%f\t%f\t%f\t%f\t%f\n", ipad,
1145 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][0])),
1146 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][1])),
1147 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][2]/(length*length))),
1148 TMath::Sqrt(TMath::Abs(fParamRMS0[0][ipad][3])));
1152 printf("Z\tall\t%f\t%f\t%f\t%f\t%f\n",
1153 TMath::Sqrt(TMath::Abs(fParamRMS1[1][0])),
1154 TMath::Sqrt(TMath::Abs(fParamRMS1[1][1])),
1155 TMath::Sqrt(TMath::Abs(fParamRMS1[1][2])),
1156 TMath::Sqrt(TMath::Abs(fParamRMS1[1][3])),
1157 TMath::Sqrt(TMath::Abs(fParamRMS1[1][4])));
1158 for (Int_t ipad=0; ipad<3; ipad++){
1159 Float_t length=0.75;
1160 if (ipad==1) length=1;
1161 if (ipad==2) length=1.5;
1163 printf("\t%d\t%f\t%f\t%f\t%f\t%f\n", ipad,
1164 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][0])),
1166 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][1])),
1167 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][2]/(length*length))),
1168 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][3])));
1170 printf("\t%d\t%f\t%f\t%f\t%f\t%f\n", ipad,
1172 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][0])),
1173 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][1])),
1174 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][2]/(length*length))),
1175 TMath::Sqrt(TMath::Abs(fParamRMS0[1][ipad][3])));
1184 Float_t AliTPCClusterParam::Qnorm(Int_t ipad, Int_t itype, Float_t dr, Float_t ty, Float_t tz){
1185 // get Q normalization
1186 // type - 0 Qtot 1 Qmax
1187 // ipad - 0 (0.75 cm) ,1 (1 cm), 2 (1.5 cm)
1189 //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);
1191 if (!fQNorm) return 0;
1192 TVectorD * norm = (TVectorD*)fQNorm->At(3*itype+ipad);
1193 if (!norm) return 0;
1194 TVectorD &no = *norm;
1195 Float_t res = no[0]+
1211 void AliTPCClusterParam::SetQnorm(Int_t ipad, Int_t itype, TVectorD * norm){
1213 // set normalization
1215 // type - 0 Qtot 1 Qmax
1216 // ipad - 0 (0.75 cm) ,1 (1 cm), 2 (1.5 cm)
1219 if (fQNorm==0) fQNorm = new TObjArray(6);
1220 fQNorm->AddAt(new TVectorD(*norm), itype*3+ipad);