83 #include <TLinearFitter.h>
86 #include <TProfile2D.h>
88 #include <TObjArray.h>
93 #if ROOT_VERSION_CODE < ROOT_VERSION(6,3,3)
94 #include "TFormulaPrimitive.h"
96 #include "v5/TFormulaPrimitive.h"
98 #include "AliMathBase.h"
158 ::Info(
"AliTPCClusterParam::Instance()",
"registering of the cluster param function primitives");
159 ::Info(
"AliTPCClusterParam::Instance()",
"clusterResolutionYAliRoot");
160 #if ROOT_VERSION_CODE < ROOT_VERSION(6,3,3)
165 ::Info(
"AliTPCClusterParam::Instance()",
"clusterResolutionZAliRoot");
166 #if ROOT_VERSION_CODE < ROOT_VERSION(6,3,3)
185 fWaveCorrectionMap(0),
186 fWaveCorrectionMirroredPad( kFALSE ),
187 fWaveCorrectionMirroredZ( kFALSE ),
188 fWaveCorrectionMirroredAngle( kFALSE ),
208 fQpadTnorm(new TVectorD(*(param.fQpadTnorm))),
209 fQpadMnorm(new TVectorD(*(param.fQpadMnorm))),
210 fWaveCorrectionMap(0),
211 fWaveCorrectionMirroredPad( kFALSE ),
212 fWaveCorrectionMirroredZ( kFALSE ),
213 fWaveCorrectionMirroredAngle( kFALSE ),
240 for (Int_t ii = 0; ii < 2; ++ii) {
241 for (Int_t jj = 0; jj < 3; ++jj) {
242 for (Int_t kk = 0; kk < 4; ++kk) {
248 for (Int_t kk = 0; kk < 7; ++kk) {
252 for (Int_t kk = 0; kk < 6; ++kk) {
258 for (Int_t kk = 0; kk < 9; ++kk) {
262 for (Int_t kk = 0; kk < 2; ++kk) {
266 for (Int_t jj = 0; jj < 4; ++jj) {
270 for (Int_t jj = 0; jj < 5; ++jj) {
275 for (Int_t jj = 0; jj < 2; ++jj){
288 if (
this != ¶m) {
310 for (Int_t ii = 0; ii < 2; ++ii) {
311 for (Int_t jj = 0; jj < 3; ++jj) {
312 for (Int_t kk = 0; kk < 4; ++kk) {
318 for (Int_t kk = 0; kk < 7; ++kk) {
322 for (Int_t kk = 0; kk < 6; ++kk) {
328 for (Int_t kk = 0; kk < 9; ++kk) {
332 for (Int_t kk = 0; kk < 2; ++kk) {
336 for (Int_t jj = 0; jj < 4; ++jj) {
340 for (Int_t jj = 0; jj < 5; ++jj) {
345 for (Int_t jj = 0; jj < 2; ++jj){
394 varVal=
"Resol:AngleM:Zm";
396 varErr=
"Sigma:AngleS:Zs";
398 varCut=Form(
"Dim==%d&&Pad==%d&&QMean<0",dim,type);
400 Int_t entries = tree->Draw(varVal.Data(),varCut);
401 Float_t px[10000], py[10000], pz[10000];
402 Float_t ex[10000], ey[10000], ez[10000];
404 tree->Draw(varErr.Data(),varCut);
405 for (Int_t ipoint=0; ipoint<entries; ipoint++){
406 ex[ipoint]= tree->GetV3()[ipoint];
407 ey[ipoint]= tree->GetV2()[ipoint];
408 ez[ipoint]= tree->GetV1()[ipoint];
410 tree->Draw(varVal.Data(),varCut);
411 for (Int_t ipoint=0; ipoint<entries; ipoint++){
412 px[ipoint]= tree->GetV3()[ipoint];
413 py[ipoint]= tree->GetV2()[ipoint];
414 pz[ipoint]= tree->GetV1()[ipoint];
418 TLinearFitter fitter(3,
"hyp2");
419 for (Int_t ipoint=0; ipoint<entries; ipoint++){
420 Float_t val = pz[ipoint]*pz[ipoint];
421 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+
fRatio*
fRatio*pz[ipoint]*pz[ipoint]);
424 x[1] = py[ipoint]*py[ipoint];
425 fitter.AddPoint(x,val,err);
429 fitter.GetParameters(param);
430 param0[0] = param[0];
431 param0[1] = param[1];
432 param0[2] = param[2];
433 Float_t
chi2 = fitter.GetChisquare()/entries;
435 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
436 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
437 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
447 varVal=
"Resol:AngleM:Zm";
449 varErr=
"Sigma:AngleS:Zs";
451 varCut=Form(
"Dim==%d&&Pad==%d&&QMean<0",dim,type);
453 Int_t entries = tree->Draw(varVal.Data(),varCut);
454 Float_t px[10000], py[10000], pz[10000];
455 Float_t ex[10000], ey[10000], ez[10000];
457 tree->Draw(varErr.Data(),varCut);
458 for (Int_t ipoint=0; ipoint<entries; ipoint++){
459 ex[ipoint]= tree->GetV3()[ipoint];
460 ey[ipoint]= tree->GetV2()[ipoint];
461 ez[ipoint]= tree->GetV1()[ipoint];
463 tree->Draw(varVal.Data(),varCut);
464 for (Int_t ipoint=0; ipoint<entries; ipoint++){
465 px[ipoint]= tree->GetV3()[ipoint];
466 py[ipoint]= tree->GetV2()[ipoint];
467 pz[ipoint]= tree->GetV1()[ipoint];
471 TLinearFitter fitter(6,
"hyp5");
472 for (Int_t ipoint=0; ipoint<entries; ipoint++){
473 Float_t val = pz[ipoint]*pz[ipoint];
474 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+
fRatio*
fRatio*pz[ipoint]*pz[ipoint]);
477 x[1] = py[ipoint]*py[ipoint];
481 fitter.AddPoint(x,val,err);
485 fitter.GetParameters(param);
486 param0[0] = param[0];
487 param0[1] = param[1];
488 param0[2] = param[2];
489 param0[3] = param[3];
490 param0[4] = param[4];
491 param0[5] = param[5];
492 Float_t
chi2 = fitter.GetChisquare()/entries;
494 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
495 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
496 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
497 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
498 error[4] = (fitter.GetParError(4)*TMath::Sqrt(chi2));
499 error[5] = (fitter.GetParError(5)*TMath::Sqrt(chi2));
512 varVal=
"Resol:AngleM*sqrt(Length):Zm/Length";
514 varErr=
"Sigma:AngleS:Zs";
516 varCut=Form(
"Dim==%d&&QMean<0",dim);
518 Int_t entries = tree->Draw(varVal.Data(),varCut);
519 Float_t px[10000], py[10000], pz[10000];
520 Float_t ex[10000], ey[10000], ez[10000];
522 tree->Draw(varErr.Data(),varCut);
523 for (Int_t ipoint=0; ipoint<entries; ipoint++){
524 ex[ipoint]= tree->GetV3()[ipoint];
525 ey[ipoint]= tree->GetV2()[ipoint];
526 ez[ipoint]= tree->GetV1()[ipoint];
528 tree->Draw(varVal.Data(),varCut);
529 for (Int_t ipoint=0; ipoint<entries; ipoint++){
530 px[ipoint]= tree->GetV3()[ipoint];
531 py[ipoint]= tree->GetV2()[ipoint];
532 pz[ipoint]= tree->GetV1()[ipoint];
536 TLinearFitter fitter(3,
"hyp2");
537 for (Int_t ipoint=0; ipoint<entries; ipoint++){
538 Float_t val = pz[ipoint]*pz[ipoint];
539 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+
fRatio*
fRatio*pz[ipoint]*pz[ipoint]);
542 x[1] = py[ipoint]*py[ipoint];
543 fitter.AddPoint(x,val,err);
547 fitter.GetParameters(param);
548 param0[0] = param[0];
549 param0[1] = param[1];
550 param0[2] = param[2];
551 Float_t
chi2 = fitter.GetChisquare()/entries;
553 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
554 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
555 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
564 varVal=
"Resol:AngleM/sqrt(QMean):Zm/QMean";
566 snprintf(varVal0,100,
"Resol:AngleM:Zm");
569 varErr=
"Sigma:AngleS:Zs";
571 varCut=Form(
"Dim==%d&&Pad==%d&&QMean>0",dim,type);
573 Int_t entries = tree->Draw(varVal.Data(),varCut);
574 Float_t px[20000], py[20000], pz[20000], pu[20000], pt[20000];
575 Float_t ex[20000], ey[20000], ez[20000];
577 tree->Draw(varErr.Data(),varCut);
578 for (Int_t ipoint=0; ipoint<entries; ipoint++){
579 ex[ipoint]= tree->GetV3()[ipoint];
580 ey[ipoint]= tree->GetV2()[ipoint];
581 ez[ipoint]= tree->GetV1()[ipoint];
583 tree->Draw(varVal.Data(),varCut);
584 for (Int_t ipoint=0; ipoint<entries; ipoint++){
585 px[ipoint]= tree->GetV3()[ipoint];
586 py[ipoint]= tree->GetV2()[ipoint];
587 pz[ipoint]= tree->GetV1()[ipoint];
589 tree->Draw(varVal0,varCut);
590 for (Int_t ipoint=0; ipoint<entries; ipoint++){
591 pu[ipoint]= tree->GetV3()[ipoint];
592 pt[ipoint]= tree->GetV2()[ipoint];
596 TLinearFitter fitter(5,
"hyp4");
597 for (Int_t ipoint=0; ipoint<entries; ipoint++){
598 Float_t val = pz[ipoint]*pz[ipoint];
599 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+
fRatio*
fRatio*pz[ipoint]*pz[ipoint]);
602 x[1] = pt[ipoint]*pt[ipoint];
604 x[3] = py[ipoint]*py[ipoint];
605 fitter.AddPoint(x,val,err);
610 fitter.GetParameters(param);
611 param0[0] = param[0];
612 param0[1] = param[1];
613 param0[2] = param[2];
614 param0[3] = param[3];
615 param0[4] = param[4];
616 Float_t
chi2 = fitter.GetChisquare()/entries;
618 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
619 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
620 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
621 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
622 error[4] = (fitter.GetParError(4)*TMath::Sqrt(chi2));
631 varVal=
"Resol:AngleM/sqrt(QMean):Zm/QMean";
633 snprintf(varVal0,100,
"Resol:AngleM:Zm");
636 varErr=
"Sigma:AngleS:Zs";
638 varCut=Form(
"Dim==%d&&Pad==%d&&QMean>0",dim,type);
640 Int_t entries = tree->Draw(varVal.Data(),varCut);
641 Float_t px[20000], py[20000], pz[20000], pu[20000], pt[20000];
642 Float_t ex[20000], ey[20000], ez[20000];
644 tree->Draw(varErr.Data(),varCut);
645 for (Int_t ipoint=0; ipoint<entries; ipoint++){
646 ex[ipoint]= tree->GetV3()[ipoint];
647 ey[ipoint]= tree->GetV2()[ipoint];
648 ez[ipoint]= tree->GetV1()[ipoint];
650 tree->Draw(varVal.Data(),varCut);
651 for (Int_t ipoint=0; ipoint<entries; ipoint++){
652 px[ipoint]= tree->GetV3()[ipoint];
653 py[ipoint]= tree->GetV2()[ipoint];
654 pz[ipoint]= tree->GetV1()[ipoint];
656 tree->Draw(varVal0,varCut);
657 for (Int_t ipoint=0; ipoint<entries; ipoint++){
658 pu[ipoint]= tree->GetV3()[ipoint];
659 pt[ipoint]= tree->GetV2()[ipoint];
663 TLinearFitter fitter(8,
"hyp7");
664 for (Int_t ipoint=0; ipoint<entries; ipoint++){
665 Float_t val = pz[ipoint]*pz[ipoint];
666 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+
fRatio*
fRatio*pz[ipoint]*pz[ipoint]);
669 x[1] = pt[ipoint]*pt[ipoint];
674 x[6] = py[ipoint]*py[ipoint];
676 fitter.AddPoint(x,val,err);
681 fitter.GetParameters(param);
682 param0[0] = param[0];
683 param0[1] = param[1];
684 param0[2] = param[2];
685 param0[3] = param[3];
686 param0[4] = param[4];
687 param0[5] = param[5];
688 param0[6] = param[6];
689 param0[7] = param[7];
691 Float_t
chi2 = fitter.GetChisquare()/entries;
693 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
694 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
695 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
696 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
697 error[4] = (fitter.GetParError(4)*TMath::Sqrt(chi2));
698 error[5] = (fitter.GetParError(5)*TMath::Sqrt(chi2));
699 error[6] = (fitter.GetParError(6)*TMath::Sqrt(chi2));
700 error[7] = (fitter.GetParError(7)*TMath::Sqrt(chi2));
711 varVal=
"RMSm:AngleM:Zm";
713 varErr=
"sqrt((1./(100.*sqrt(12.))^2)+RMSe0^2):AngleS:Zs";
715 varCut=Form(
"Dim==%d&&Pad==%d&&QMean<0",dim,type);
717 Int_t entries = tree->Draw(varVal.Data(),varCut);
718 Float_t px[10000], py[10000], pz[10000];
719 Float_t ex[10000], ey[10000], ez[10000];
721 tree->Draw(varErr.Data(),varCut);
722 for (Int_t ipoint=0; ipoint<entries; ipoint++){
723 ex[ipoint]= tree->GetV3()[ipoint];
724 ey[ipoint]= tree->GetV2()[ipoint];
725 ez[ipoint]= tree->GetV1()[ipoint];
727 tree->Draw(varVal.Data(),varCut);
728 for (Int_t ipoint=0; ipoint<entries; ipoint++){
729 px[ipoint]= tree->GetV3()[ipoint];
730 py[ipoint]= tree->GetV2()[ipoint];
731 pz[ipoint]= tree->GetV1()[ipoint];
735 TLinearFitter fitter(3,
"hyp2");
736 for (Int_t ipoint=0; ipoint<entries; ipoint++){
737 Float_t val = pz[ipoint]*pz[ipoint];
738 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+
fRatio*
fRatio*pz[ipoint]*pz[ipoint]);
741 x[1] = py[ipoint]*py[ipoint];
742 fitter.AddPoint(x,val,err);
746 fitter.GetParameters(param);
747 param0[0] = param[0];
748 param0[1] = param[1];
749 param0[2] = param[2];
750 Float_t
chi2 = fitter.GetChisquare()/entries;
752 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
753 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
754 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
763 varVal=
"RMSm:AngleM*Length:Zm";
765 varErr=
"sqrt((1./(100.*sqrt(12.))^2)+RMSe0^2):AngleS:Pad";
767 varCut=Form(
"Dim==%d&&QMean<0",dim);
769 Int_t entries = tree->Draw(varVal.Data(),varCut);
770 Float_t px[10000], py[10000], pz[10000];
771 Float_t type[10000], ey[10000], ez[10000];
773 tree->Draw(varErr.Data(),varCut);
774 for (Int_t ipoint=0; ipoint<entries; ipoint++){
775 type[ipoint] = tree->GetV3()[ipoint];
776 ey[ipoint] = tree->GetV2()[ipoint];
777 ez[ipoint] = tree->GetV1()[ipoint];
779 tree->Draw(varVal.Data(),varCut);
780 for (Int_t ipoint=0; ipoint<entries; ipoint++){
781 px[ipoint]= tree->GetV3()[ipoint];
782 py[ipoint]= tree->GetV2()[ipoint];
783 pz[ipoint]= tree->GetV1()[ipoint];
787 TLinearFitter fitter(4,
"hyp3");
788 for (Int_t ipoint=0; ipoint<entries; ipoint++){
789 Float_t val = pz[ipoint]*pz[ipoint];
790 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+
fRatio*
fRatio*pz[ipoint]*pz[ipoint]);
792 x[0] = (type[ipoint]<0.5)? 0.:1.;
794 x[2] = py[ipoint]*py[ipoint];
795 fitter.AddPoint(x,val,err);
799 fitter.GetParameters(param);
800 param0[0] = param[0];
801 param0[1] = param[0]+param[1];
802 param0[2] = param[2];
803 param0[3] = param[3];
804 Float_t
chi2 = fitter.GetChisquare()/entries;
806 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
807 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
808 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
809 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
818 varVal=
"RMSm:AngleM/sqrt(QMean):Zm/QMean";
820 snprintf(varVal0,100,
"RMSm:AngleM:Zm");
823 varErr=
"sqrt((1./(100.*sqrt(12.))^2)+RMSe0^2):AngleS:Zs";
825 varCut=Form(
"Dim==%d&&Pad==%d&&QMean>0",dim,type);
827 Int_t entries = tree->Draw(varVal.Data(),varCut);
828 Float_t px[20000], py[20000], pz[20000], pu[20000], pt[20000];
829 Float_t ex[20000], ey[20000], ez[20000];
831 tree->Draw(varErr.Data(),varCut);
832 for (Int_t ipoint=0; ipoint<entries; ipoint++){
833 ex[ipoint]= tree->GetV3()[ipoint];
834 ey[ipoint]= tree->GetV2()[ipoint];
835 ez[ipoint]= tree->GetV1()[ipoint];
837 tree->Draw(varVal.Data(),varCut);
838 for (Int_t ipoint=0; ipoint<entries; ipoint++){
839 px[ipoint]= tree->GetV3()[ipoint];
840 py[ipoint]= tree->GetV2()[ipoint];
841 pz[ipoint]= tree->GetV1()[ipoint];
843 tree->Draw(varVal0,varCut);
844 for (Int_t ipoint=0; ipoint<entries; ipoint++){
845 pu[ipoint]= tree->GetV3()[ipoint];
846 pt[ipoint]= tree->GetV2()[ipoint];
850 TLinearFitter fitter(5,
"hyp4");
851 for (Int_t ipoint=0; ipoint<entries; ipoint++){
852 Float_t val = pz[ipoint]*pz[ipoint];
853 Float_t err = 2*pz[ipoint]*TMath::Sqrt(ez[ipoint]*ez[ipoint]+
fRatio*
fRatio*pz[ipoint]*pz[ipoint]);
856 x[1] = pt[ipoint]*pt[ipoint];
858 x[3] = py[ipoint]*py[ipoint];
859 fitter.AddPoint(x,val,err);
864 fitter.GetParameters(param);
865 param0[0] = param[0];
866 param0[1] = param[1];
867 param0[2] = param[2];
868 param0[3] = param[3];
869 param0[4] = param[4];
870 Float_t
chi2 = fitter.GetChisquare()/entries;
872 error[0] = (fitter.GetParError(0)*TMath::Sqrt(chi2));
873 error[1] = (fitter.GetParError(1)*TMath::Sqrt(chi2));
874 error[2] = (fitter.GetParError(2)*TMath::Sqrt(chi2));
875 error[3] = (fitter.GetParError(3)*TMath::Sqrt(chi2));
876 error[4] = (fitter.GetParError(4)*TMath::Sqrt(chi2));
889 varCut=Form(
"Dim==%d&&Pad==%d&&QMean<0",dim,type);
891 Int_t entries = tree->Draw(varVal.Data(),varCut);
892 Float_t px[20000], py[20000];
894 tree->Draw(varVal.Data(),varCut);
895 for (Int_t ipoint=0; ipoint<entries; ipoint++){
896 px[ipoint]= tree->GetV2()[ipoint];
897 py[ipoint]= tree->GetV1()[ipoint];
899 TLinearFitter fitter(2,
"pol1");
900 for (Int_t ipoint=0; ipoint<entries; ipoint++){
901 Float_t val = py[ipoint];
902 Float_t err =
fRatio*px[ipoint];
905 if (err>0) fitter.AddPoint(x,val,err);
908 param0[0]= fitter.GetParameter(0);
909 param0[1]= fitter.GetParameter(1);
920 value +=
fParamS0[dim][type][2]*angle*angle;
921 value = TMath::Sqrt(TMath::Abs(value));
934 value +=
fParamS0Par[dim][type][4]*angle*angle*angle*angle;
936 value = TMath::Sqrt(TMath::Abs(value));
947 if (type==1) length=1;
948 if (type==2) length=1.5;
951 value +=
fParamS1[dim][2]*angle*angle*length;
952 value = TMath::Sqrt(TMath::Abs(value));
962 value +=
fParamSQ[dim][type][2]*angle*angle;
963 value +=
fParamSQ[dim][type][3]*z/Qmean;
964 value +=
fParamSQ[dim][type][4]*angle*angle/Qmean;
965 value = TMath::Sqrt(TMath::Abs(value));
979 value +=
fParamSQPar[dim][type][4]*angle*angle*angle*angle;
982 value +=
fParamSQPar[dim][type][7]*angle*angle/Qmean;
983 value = TMath::Sqrt(TMath::Abs(value));
997 value +=
fParamSQPar[dim][type][4]*angle*angle*angle*angle;
1000 value +=
fParamSQPar[dim][type][7]*angle*angle/Qmean;
1002 value -= 0.35*0.35*valueMean*valueMean;
1003 value = TMath::Sqrt(TMath::Abs(value));
1015 value +=
fParamRMS0[dim][type][2]*angle*angle;
1016 value = TMath::Sqrt(TMath::Abs(value));
1024 Float_t length=0.75;
1025 if (type==1) length=1;
1026 if (type==2) length=1.5;
1033 value +=
fParamRMS1[dim][3]*angle*angle*length*length;
1034 value = TMath::Sqrt(TMath::Abs(value));
1044 value +=
fParamRMSQ[dim][type][2]*angle*angle;
1046 value +=
fParamRMSQ[dim][type][4]*angle*angle/Qmean;
1047 value = TMath::Sqrt(TMath::Abs(value));
1054 Float_t mean =
GetRMSQ(dim,type,z,angle,Qmean);
1065 Float_t rmsMeanQ =
GetRMSQ(dim,type,z,angle,Qmean);
1066 if (rmsL<rmsMeanQ)
return value;
1068 Float_t rmsSigma =
GetRMSSigma(dim,type,z,angle,Qmean);
1072 value+= rmsL*rmsL+2*rmsM*rmsM-3*rmsMeanQ*rmsMeanQ;
1076 value+= rmsL*rmsL-rmsMeanQ*rmsMeanQ;
1079 return TMath::Sqrt(TMath::Abs(value));
1096 for (Int_t idir=0;idir<2; idir++){
1097 for (Int_t itype=0; itype<3; itype++){
1101 FitResol0(tree, idir, itype,param0,error0);
1102 printf(
"\nResol\t%d\t%d\tchi2=%f\n",idir,itype,param0[3]);
1103 printf(
"%f\t%f\t%f\n", param0[0],param0[1],param0[2]);
1104 printf(
"%f\t%f\t%f\n", error0[0],error0[1],error0[2]);
1105 for (Int_t ipar=0;ipar<4; ipar++){
1106 fParamS0[idir][itype][ipar] = param0[ipar];
1107 fErrorS0[idir][itype][ipar] = param0[ipar];
1111 printf(
"\nResolPar\t%d\t%d\tchi2=%f\n",idir,itype,param0[6]);
1112 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]);
1113 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]);
1114 for (Int_t ipar=0;ipar<7; ipar++){
1119 FitResolQ(tree, idir, itype,param0,error0);
1120 printf(
"\nResolQ\t%d\t%d\tchi2=%f\n",idir,itype,param0[5]);
1121 printf(
"%f\t%f\t%f\t%f\t%f\n", param0[0],param0[1],param0[2],param0[3],param0[4]);
1122 printf(
"%f\t%f\t%f\t%f\t%f\n", error0[0],error0[1],error0[2],error0[3],error0[4]);
1123 for (Int_t ipar=0;ipar<6; ipar++){
1124 fParamSQ[idir][itype][ipar] = param0[ipar];
1125 fErrorSQ[idir][itype][ipar] = param0[ipar];
1129 printf(
"\nResolQ\t%d\t%d\tchi2=%f\n",idir,itype,param0[8]);
1130 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]);
1131 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]);
1132 for (Int_t ipar=0;ipar<9; ipar++){
1139 printf(
"Resol z-scaled\n");
1140 for (Int_t idir=0;idir<2; idir++){
1144 printf(
"\nResol\t%d\tchi2=%f\n",idir,param0[3]);
1145 printf(
"%f\t%f\t%f\n", param0[0],param0[1],param0[2]);
1146 printf(
"%f\t%f\t%f\n", error0[0],error0[1],error0[2]);
1147 for (Int_t ipar=0;ipar<4; ipar++){
1148 fParamS1[idir][ipar] = param0[ipar];
1149 fErrorS1[idir][ipar] = param0[ipar];
1153 for (Int_t idir=0;idir<2; idir++){
1154 printf(
"\nDirection %d\n",idir);
1156 for (Int_t itype=0; itype<3; itype++){
1157 Float_t length=0.75;
1158 if (itype==1) length=1;
1159 if (itype==2) length=1.5;
1160 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));
1171 for (Int_t idir=0;idir<2; idir++){
1172 for (Int_t itype=0; itype<3; itype++){
1175 FitRMS0(tree, idir, itype,param0,error0);
1176 printf(
"\nRMS\t%d\t%d\tchi2=%f\n",idir,itype,param0[3]);
1177 printf(
"%f\t%f\t%f\n", param0[0],param0[1],param0[2]);
1178 printf(
"%f\t%f\t%f\n", error0[0],error0[1],error0[2]);
1179 for (Int_t ipar=0;ipar<4; ipar++){
1180 fParamRMS0[idir][itype][ipar] = param0[ipar];
1181 fErrorRMS0[idir][itype][ipar] = param0[ipar];
1183 FitRMSQ(tree, idir, itype,param0,error0);
1184 printf(
"\nRMSQ\t%d\t%d\tchi2=%f\n",idir,itype,param0[5]);
1185 printf(
"%f\t%f\t%f\t%f\t%f\n", param0[0],param0[1],param0[2],param0[3],param0[4]);
1186 printf(
"%f\t%f\t%f\t%f\t%f\n", error0[0],error0[1],error0[2],error0[3],error0[4]);
1187 for (Int_t ipar=0;ipar<6; ipar++){
1188 fParamRMSQ[idir][itype][ipar] = param0[ipar];
1189 fErrorRMSQ[idir][itype][ipar] = param0[ipar];
1194 printf(
"RMS z-scaled\n");
1195 for (Int_t idir=0;idir<2; idir++){
1198 FitRMS1(tree, idir,param0,error0);
1199 printf(
"\nRMS\t%d\tchi2=%f\n",idir,param0[4]);
1200 printf(
"%f\t%f\t%f\t%f\n", param0[0],param0[1],param0[2], param0[3]);
1201 printf(
"%f\t%f\t%f\t%f\n", error0[0],error0[1],error0[2], error0[3]);
1202 for (Int_t ipar=0;ipar<5; ipar++){
1208 for (Int_t idir=0;idir<2; idir++){
1209 printf(
"\nDirection %d\n",idir);
1211 for (Int_t itype=0; itype<3; itype++){
1212 Float_t length=0.75;
1213 if (itype==1) length=1;
1214 if (itype==2) length=1.5;
1222 printf(
"RMS fluctuation parameterization \n");
1223 for (Int_t idir=0;idir<2; idir++){
1224 for (Int_t itype=0; itype<3; itype++){
1228 printf(
"\t%d\t%d\t%f\t%f\n", idir, itype, param0[0],param0[1]);
1229 for (Int_t ipar=0;ipar<2; ipar++){
1237 TH1F hratio(
"hratio",
"hratio",100,-0.1,0.1);
1238 tree->Draw(
"(RMSm-AliTPCClusterParam::SGetRMSQ(Dim,Pad,Zm,AngleM,QMean))/RMSm>>hratio",
"Dim==0&&QMean>0");
1240 tree->Draw(
"(RMSm-AliTPCClusterParam::SGetRMSQ(Dim,Pad,Zm,AngleM,QMean))/RMSm>>hratio",
"Dim==1&&QMean>0");
1242 TH1F hratioR(
"hratioR",
"hratioR",100,0,0.2);
1243 tree->Draw(
"RMSs/RMSm>>hratioR",
"Dim==0&&QMean>0");
1246 tree->Draw(
"RMSs/RMSm>>hratioR",
"Dim==1&&QMean>0");
1255 TFile
f(output,
"recreate");
1260 for (Int_t idim=0; idim<2; idim++){
1261 for (Int_t ipad=0; ipad<3; ipad++){
1266 snprintf(hname1,300,
"Delta0 Dir %d Pad %d",idim,ipad);
1267 snprintf(hcut1,300,
"Dim==%d&&QMean<0&&Pad==%d",idim,ipad);
1268 snprintf(hexp1,300,
"(Resol-AliTPCClusterParam::SGetError0(Dim,Pad,Zm,AngleM))/Resol>>%s",hname1);
1269 TH1F his1DRel0(hname1, hname1, 100,-0.2, 0.2);
1270 snprintf(hname1,300,
"Dim==%d&&QMean<0&&Pad=%d",idim,ipad);
1271 tree->Draw(hexp1,hcut1,
"");
1274 snprintf(hname1,300,
"Delta0Par Dir %d Pad %d",idim,ipad);
1275 snprintf(hcut1,300,
"Dim==%d&&QMean<0&&Pad==%d",idim,ipad);
1276 snprintf(hexp1,300,
"(Resol-AliTPCClusterParam::SGetError0Par(Dim,Pad,Zm,AngleM))/Resol>>%s",hname1);
1277 TH1F his1DRel0Par(hname1, hname1, 100,-0.2, 0.2);
1278 snprintf(hname1,300,
"Dim==%d&&QMean<0&&Pad=%d",idim,ipad);
1279 tree->Draw(hexp1,hcut1,
"");
1280 his1DRel0Par.Write();
1287 for (Int_t idim=0; idim<2; idim++){
1288 for (Int_t ipad=0; ipad<3; ipad++){
1293 snprintf(hname1,300,
"2DDelta0 Dir %d Pad %d",idim,ipad);
1294 snprintf(hcut1,300,
"Dim==%d&&QMean<0&&Pad==%d",idim,ipad);
1295 snprintf(hexp1,300,
"(Resol-AliTPCClusterParam::SGetError0(Dim,Pad,Zm,AngleM))/Resol:AngleM:Zm>>%s",hname1);
1296 TProfile2D profDRel0(hname1, hname1, 6,0,250,6,0,1);
1297 snprintf(hname1,300,
"Dim==%d&&QMean<0&&Pad=%d",idim,ipad);
1298 tree->Draw(hexp1,hcut1,
"");
1301 snprintf(hname1,300,
"2DDelta0Par Dir %d Pad %d",idim,ipad);
1302 snprintf(hcut1,300,
"Dim==%d&&QMean<0&&Pad==%d",idim,ipad);
1303 snprintf(hexp1,300,
"(Resol-AliTPCClusterParam::SGetError0Par(Dim,Pad,Zm,AngleM))/Resol:AngleM:Zm>>%s",hname1);
1304 TProfile2D profDRel0Par(hname1, hname1,6,0,250,6,0,1);
1305 snprintf(hname1,300,
"Dim==%d&&QMean<0&&Pad=%d",idim,ipad);
1306 tree->Draw(hexp1,hcut1,
"");
1307 profDRel0Par.Write();
1321 printf(
"\nResolution Scaled factors\n");
1322 printf(
"Dir\tPad\tP0\t\tP1\t\tP2\t\tchi2\n");
1323 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])),
1324 TMath::Sqrt(TMath::Abs(
fParamS1[0][2])),TMath::Sqrt(TMath::Abs(
fParamS1[0][3])));
1325 for (Int_t ipad=0; ipad<3; ipad++){
1326 Float_t length=0.75;
1327 if (ipad==1) length=1;
1328 if (ipad==2) length=1.5;
1329 printf(
"\t%d\t%f\t%f\t%f\t%f\n", ipad,
1330 TMath::Sqrt(TMath::Abs(
fParamS0[0][ipad][0])),
1331 TMath::Sqrt(TMath::Abs(
fParamS0[0][ipad][1]*length)),
1332 TMath::Sqrt(TMath::Abs(
fParamS0[0][ipad][2]/length)),
1333 TMath::Sqrt(TMath::Abs(
fParamS0[0][ipad][3])));
1335 for (Int_t ipad=0; ipad<3; ipad++){
1336 Float_t length=0.75;
1337 if (ipad==1) length=1;
1338 if (ipad==2) length=1.5;
1339 printf(
"\t%dPar\t%f\t%f\t%f\t%f\n", ipad,
1341 TMath::Sqrt(TMath::Abs(
fParamS0Par[0][ipad][1]*length)),
1342 TMath::Sqrt(TMath::Abs(
fParamS0Par[0][ipad][2]/length)),
1343 TMath::Sqrt(TMath::Abs(
fParamS0Par[0][ipad][6])));
1348 for (Int_t ipad=0; ipad<3; ipad++){
1349 Float_t length=0.75;
1350 if (ipad==1) length=1;
1351 if (ipad==2) length=1.5;
1352 printf(
"\t%d\t%f\t%f\t%f\t%f\n", ipad,
1353 TMath::Sqrt(TMath::Abs(
fParamS0[1][ipad][0])),
1354 TMath::Sqrt(TMath::Abs(
fParamS0[1][ipad][1]*length)),
1355 TMath::Sqrt(TMath::Abs(
fParamS0[1][ipad][2]/length)),
1356 TMath::Sqrt(TMath::Abs(
fParamS0[1][ipad][3])));
1358 for (Int_t ipad=0; ipad<3; ipad++){
1359 Float_t length=0.75;
1360 if (ipad==1) length=1;
1361 if (ipad==2) length=1.5;
1362 printf(
"\t%dPar\t%f\t%f\t%f\t%f\n", ipad,
1363 TMath::Sqrt(TMath::Abs(TMath::Abs(
fParamS0Par[1][ipad][0]))),
1364 TMath::Sqrt(TMath::Abs(
fParamS0Par[1][ipad][1]*length)),
1365 TMath::Sqrt(TMath::Abs(
fParamS0Par[1][ipad][2]/length)),
1366 TMath::Sqrt(TMath::Abs(
fParamS0Par[1][ipad][6])));
1373 printf(
"\nRMS Scaled factors\n");
1374 printf(
"Dir\tPad\tP00\t\tP01\t\tP1\t\tP2\t\tchi2\n");
1375 printf(
"Y\tall\t%f\t%f\t%f\t%f\t%f\n",
1381 for (Int_t ipad=0; ipad<3; ipad++){
1382 Float_t length=0.75;
1383 if (ipad==1) length=1;
1384 if (ipad==2) length=1.5;
1386 printf(
"\t%d\t%f\t%f\t%f\t%f\t%f\n", ipad,
1387 TMath::Sqrt(TMath::Abs(
fParamRMS0[0][ipad][0])),
1389 TMath::Sqrt(TMath::Abs(
fParamRMS0[0][ipad][1])),
1390 TMath::Sqrt(TMath::Abs(
fParamRMS0[0][ipad][2]/(length*length))),
1391 TMath::Sqrt(TMath::Abs(
fParamRMS0[0][ipad][3])));
1393 printf(
"\t%d\t%f\t%f\t%f\t%f\t%f\n", ipad,
1395 TMath::Sqrt(TMath::Abs(
fParamRMS0[0][ipad][0])),
1396 TMath::Sqrt(TMath::Abs(
fParamRMS0[0][ipad][1])),
1397 TMath::Sqrt(TMath::Abs(
fParamRMS0[0][ipad][2]/(length*length))),
1398 TMath::Sqrt(TMath::Abs(
fParamRMS0[0][ipad][3])));
1402 printf(
"Z\tall\t%f\t%f\t%f\t%f\t%f\n",
1408 for (Int_t ipad=0; ipad<3; ipad++){
1409 Float_t length=0.75;
1410 if (ipad==1) length=1;
1411 if (ipad==2) length=1.5;
1413 printf(
"\t%d\t%f\t%f\t%f\t%f\t%f\n", ipad,
1414 TMath::Sqrt(TMath::Abs(
fParamRMS0[1][ipad][0])),
1416 TMath::Sqrt(TMath::Abs(
fParamRMS0[1][ipad][1])),
1417 TMath::Sqrt(TMath::Abs(
fParamRMS0[1][ipad][2]/(length*length))),
1418 TMath::Sqrt(TMath::Abs(
fParamRMS0[1][ipad][3])));
1420 printf(
"\t%d\t%f\t%f\t%f\t%f\t%f\n", ipad,
1422 TMath::Sqrt(TMath::Abs(
fParamRMS0[1][ipad][0])),
1423 TMath::Sqrt(TMath::Abs(
fParamRMS0[1][ipad][1])),
1424 TMath::Sqrt(TMath::Abs(
fParamRMS0[1][ipad][2]/(length*length))),
1425 TMath::Sqrt(TMath::Abs(
fParamRMS0[1][ipad][3])));
1428 printf(
"\ndEdx correction matrix used in GetQnormCorr\n");
1445 TVectorD * norm = (TVectorD*)
fQNorm->At(3*itype+ipad);
1446 if (!norm)
return 0;
1447 TVectorD &no = *norm;
1471 TH3F * norm = (TH3F*)
fQNormHis->At(4*itype+ipad);
1472 if (!norm)
return 1;
1474 dr=TMath::Min(dr,Float_t(norm->GetXaxis()->GetXmax()-norm->GetXaxis()->GetBinWidth(0)));
1475 dr=TMath::Max(dr,Float_t(norm->GetXaxis()->GetXmin()+norm->GetXaxis()->GetBinWidth(0)));
1477 p2=TMath::Min(p2,Float_t(norm->GetYaxis()->GetXmax()-norm->GetYaxis()->GetBinWidth(0)));
1478 p2=TMath::Max(p2,Float_t(norm->GetYaxis()->GetXmin()+norm->GetYaxis()->GetBinWidth(0)));
1480 p3=TMath::Min(p3,Float_t(norm->GetZaxis()->GetXmax()-norm->GetZaxis()->GetBinWidth(0)));
1481 p3=TMath::Max(p3,Float_t(norm->GetZaxis()->GetXmin()+norm->GetZaxis()->GetBinWidth(0)));
1483 Double_t res = norm->GetBinContent(norm->FindBin(dr,p2,p3));
1484 if (res==0) res = norm->GetBinContent(norm->FindBin(0.5,0.5,0.5));
1498 fQNorm->AddAt(
new TVectorD(*norm), itype*3+ipad);
1505 for (Int_t irow=0;irow<12; irow++)
1506 for (Int_t icol=0;icol<6; icol++){
1507 (*fQNormCorr)(irow,icol)=1.;
1508 if (irow>5) (*fQNormCorr)(irow,icol)=0.;
1533 (*fQNormCorr)(itype*3+ipad, corrType) = val;
1536 if (itype<2) (*fQNormCorr)(itype*3+ipad, corrType) *= val;
1537 if (itype>=2) (*fQNormCorr)(itype*3+ipad, corrType)+= val;
1544 return (*
fQNormCorr)(itype*3+ipad, corrType);
1562 Double_t dp = ((pad-int(pad)-0.5)*2.);
1564 Double_t dt = ((time-int(time)-0.5)*2.);
1566 Double_t di = TMath::Sqrt(1-TMath::Abs(z)/250.);
1568 Double_t dq0 = 0.2*(qt+2.)/(qm+2.);
1570 Double_t dq1 = 5.*(qm+2.)/(qt+2.);
1572 Double_t sy = 0.32/TMath::Sqrt(0.01*0.01+sy2);
1574 Double_t sz = 0.32/TMath::Sqrt(0.01*0.01+sz2);
1578 TVectorD * pvec = 0;
1584 TVectorD ¶m = *pvec;
1588 Double_t result=param[0];
1591 result+=dp*param[index++];
1592 result+=dt*param[index++];
1593 result+=dp*dp*param[index++];
1594 result+=dt*dt*param[index++];
1595 result+=dt*dt*dt*param[index++];
1596 result+=dp*dt*param[index++];
1597 result+=dp*dt*dt*param[index++];
1598 result+=(dq0)*param[index++];
1599 result+=(dq1)*param[index++];
1602 result+=dp*dp*(di)*param[index++];
1603 result+=dt*dt*(di)*param[index++];
1604 result+=dp*dp*sy*param[index++];
1605 result+=dt*sz*param[index++];
1606 result+=dt*dt*sz*param[index++];
1607 result+=dt*dt*dt*sz*param[index++];
1609 result+=dp*dp*1*sy*sz*param[index++];
1610 result+=dt*sy*sz*param[index++];
1611 result+=dt*dt*sy*sz*param[index++];
1612 result+=dt*dt*dt*sy*sz*param[index++];
1614 result+=dp*dp*(dq0)*param[index++];
1615 result+=dt*1*(dq0)*param[index++];
1616 result+=dt*dt*(dq0)*param[index++];
1617 result+=dt*dt*dt*(dq0)*param[index++];
1619 result+=dp*dp*(dq1)*param[index++];
1620 result+=dt*(dq1)*param[index++];
1621 result+=dt*dt*(dq1)*param[index++];
1622 result+=dt*dt*dt*(dq1)*param[index++];
1624 if (result<0.75) result=0.75;
1625 if (result>1.25) result=1.25;
1656 Double_t dp = (-1+(z>0)*2)*((pad-int(pad))-0.5);
1657 Double_t dt = (-1+(z>0)*2)*((time-0.66-int(time-0.66))-0.5);
1658 Double_t sp = (TMath::Sin(dp*TMath::Pi())-dp*TMath::Pi());
1659 Double_t st = (TMath::Sin(dt)-dt);
1661 Double_t di = TMath::Sqrt(TMath::Abs(1.-TMath::Abs(z/250.)));
1665 TVectorD * pvec = 0;
1671 TVectorD ¶m = *pvec;
1678 result+=(dp)*param[index++];
1679 result+=(dp)*di*param[index++];
1681 result+=(sp)*param[index++];
1682 result+=(sp)*di*param[index++];
1685 result+=(dt)*param[index++];
1686 result+=(dt)*di*param[index++];
1688 result+=(st)*param[index++];
1689 result+=(st)*di*param[index++];
1691 if (TMath::Abs(result)>0.05)
return 0;
1706 const Double_t twoPi = TMath::TwoPi();
1707 const Double_t hnorm = 0.5/TMath::Sqrt(twoPi);
1708 const Double_t sqtwo = TMath::Sqrt(2.);
1710 if ((TMath::Abs(k0)+TMath::Abs(k1))<kEpsilon*(s0+s1)){
1712 Double_t val = TMath::Gaus(x0,0,s0)*TMath::Gaus(x1,0,s1)/(s0*s1*twoPi);
1715 Double_t sigma2 = k1*k1*s0*s0+k0*k0*s1*s1;
1716 Double_t sigma = TMath::Sqrt(sigma2);
1717 Double_t exp0 = TMath::Exp(-(k1*x0-k0*x1)*(k1*x0-k0*x1)/(2.*sigma2));
1719 Double_t sigmaErf = 1./(2.*s0*s1*sqtwo*sigma);
1720 Double_t k0s1s1 = 2.*k0*s1*s1;
1721 Double_t k1s0s0 = 2.*k1*s0*s0;
1722 Double_t erf0 = AliMathBase::ErfFast((sigma2-k0s1s1*x0-k1s0s0*x1)*sigmaErf);
1723 Double_t erf1 = AliMathBase::ErfFast((sigma2+k0s1s1*x0+k1s0s0*x1)*sigmaErf);
1724 Double_t norm = hnorm/sigma;
1725 Double_t val = norm*exp0*(erf0+erf1);
1738 Double_t
sum =1, mean=0;
1740 for (Float_t iexp=0;iexp<5;iexp+=0.2){
1741 mean+=iexp*TMath::Exp(-iexp/tau);
1742 sum +=TMath::Exp(-iexp/tau);
1748 for (Float_t iexp=0;iexp<5;iexp+=0.2){
1749 val+=
GaussConvolution(x0,x1+mean-iexp, k0, k1 , s0,s1)*TMath::Exp(-iexp/tau);
1750 sum+=TMath::Exp(-iexp/tau);
1764 Double_t
sum =0, mean=0;
1766 for (Float_t iexp=0;iexp<5;iexp+=0.2){
1767 Double_t g4 = TMath::Exp(-4.*iexp/tau)*TMath::Power(iexp/tau,4.);
1775 for (Float_t iexp=0;iexp<5;iexp+=0.2){
1776 Double_t g4 = TMath::Exp(-4.*iexp/tau)*TMath::Power(iexp/tau,4.);
1783 Double_t
AliTPCClusterParam::QmaxCorrection(Int_t sector, Int_t row, Float_t cpad, Float_t ctime, Float_t ky, Float_t kz, Float_t rmsy0, Float_t rmsz0, Float_t effPad, Float_t effDiff){
1805 Double_t effLength= padLength+(param->
GetWWPitch(0)+TMath::Sqrt(ctime*zwidth)*param->
GetDiffT())*effPad;
1808 Double_t diffT=TMath::Sqrt(ctime*zwidth)*param->
GetDiffT()/padWidth;
1809 Double_t diffL=TMath::Sqrt(ctime*zwidth)*param->
GetDiffL()/zwidth;
1815 Double_t pky = ky*effLength/padWidth;
1816 Double_t pkz = kz*effLength/zwidth;
1818 Double_t py = (cpad+0.5)-TMath::Nint(cpad+0.5);
1819 Double_t pz = (ctime+0.5)-TMath::Nint(ctime+0.5);
1822 Double_t sy = TMath::Sqrt(rmsy0*rmsy0+diffT*diffT);
1823 Double_t sz = TMath::Sqrt(rmsz0*rmsz0+diffL*diffL);
1825 Double_t length = padLength*TMath::Sqrt(1+ky*ky+kz*kz);
1829 Double_t
AliTPCClusterParam::QtotCorrection(Int_t sector, Int_t row, Float_t cpad, Float_t ctime, Float_t ky, Float_t kz, Float_t rmsy0, Float_t rmsz0, Float_t qtot, Float_t thr, Float_t effPad, Float_t effDiff){
1853 Double_t effLength= padLength+(param->
GetWWPitch(0)+TMath::Sqrt(ctime*zwidth)*param->
GetDiffT())*effPad;
1856 Double_t diffT=TMath::Sqrt(ctime*zwidth)*param->
GetDiffT()/padWidth;
1857 Double_t diffL=TMath::Sqrt(ctime*zwidth)*param->
GetDiffL()/zwidth;
1862 Double_t pky = ky*effLength/padWidth;
1863 Double_t pkz = kz*effLength/zwidth;
1866 Double_t py = (cpad+0.5)-TMath::Nint(cpad+0.5);
1867 Double_t pz = (ctime+0.5)-TMath::Nint(ctime+0.5);
1869 Double_t sy = TMath::Sqrt(rmsy0*rmsy0+diffT*diffT);
1870 Double_t sz = TMath::Sqrt(rmsz0*rmsz0+diffL*diffL);
1874 Double_t sumAll=0,sumThr=0;
1877 Double_t qnorm=qtot;
1878 for (Float_t iy=-3;iy<=3;iy+=1.)
1879 for (Float_t iz=-4;iz<=4;iz+=1.){
1882 Double_t qlocal =qnorm*val;
1883 if (TMath::Abs(iy)<1.5&&TMath::Abs(iz)<1.5){
1887 if (qlocal>thr && TMath::Abs(iz)<2.5&&TMath::Abs(iy)<2.5) sumThr+=qlocal;
1891 if (sumAll>0&&sumThr>0) {
1892 corr=(sumThr)/sumAll;
1895 Double_t length = padLength*TMath::Sqrt(1+ky*ky+kz*kz);
1927 fResolutionYMap =
dynamic_cast<THnBase*
>( Map->Clone(Map->GetName()));
1936 Bool_t swapY = kFALSE;
1937 Pad = Pad-(Int_t)Pad;
1939 if( TMath::Abs(Pad-0.5)<1.e-8 ){
1956 double var[5] = {
static_cast<double>(Type), Z, static_cast<double>(QMax), Pad, angleY };
1958 if( bin<0 )
return 0;
1960 return (swapY ?-dY :dY);
static AliTPCcalibDB * Instance()
Float_t fErrorRMSSys[2]
systematic relative error of the parametererization
Float_t GetPadPitchLength(Int_t isector=0, Int_t padrow=0) const
Float_t fErrorRMSQ[2][3][6]
shape parameterization coeficients
Float_t fParamS0[2][3][4]
error parameterization coeficients
Float_t fErrorRMS1[2][5]
shape parameterization coeficients
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
TMatrixD * fQNormCorr
q norm correction for analytica correction
void FitRMS0(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
void FitData(TTree *tree)
Float_t fErrorSQ[2][3][6]
error parameterization coeficients
Float_t GetRMSQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const
Float_t GetErrorQPar(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const
Double_t AliTPCClusterParamClusterResolutionY(Double_t x, Double_t s0, Double_t s1)
static Double_t QtotCorrection(Int_t sector, Int_t row, Float_t cpad, Float_t ctime, Float_t ky, Float_t kz, Float_t rmsy0, Float_t rmsz0, Float_t qtot, Float_t thr, Float_t effLength=0, Float_t effDiff=1)
void FitRMS1(TTree *tree, Int_t dim, Float_t *param0, Float_t *error)
TVectorD * fPosQTnorm[3]
q position normalization
Manager and of geomety classes for set: TPC.
static Double_t QmaxCorrection(Int_t sector, Int_t row, Float_t cpad, Float_t ctime, Float_t ky, Float_t kz, Float_t rmsy0, Float_t rmsz0, Float_t effLength=0, Float_t effDiff=1)
virtual ~AliTPCClusterParam()
TFile f("CalibObjects.root")
THnBase * fResolutionYMap
Map of resolution in Y.
static AliTPCClusterParam * Instance()
Float_t fParamRMS1[2][5]
shape parameterization coeficients
void FitResol0(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
Float_t GetRMSSigma(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const
void FitRMSSigma(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
void SetQnormCorr(Int_t ipad, Int_t itype, Int_t corrType, Float_t val, Int_t mode=1)
AliTPCParam * GetParameters() const
TVectorD * fPosZcor[3]
position correction parameterization
Float_t GetError1(Int_t dim, Int_t type, Float_t z, Float_t angle) const
Float_t GetPadPitchWidth(Int_t isector=0) const
static Double_t GaussConvolution(Double_t x0, Double_t x1, Double_t k0, Double_t k1, Double_t s0, Double_t s1)
Float_t fErrorS0Par[2][3][7]
error parameterization coeficients
Float_t fRatio
ratio of values constibution to error
Float_t fRMSSigmaFit[2][3][2]
mean value of the varation of RMS to RMS
Float_t fErrorS1[2][4]
error parameterization coeficients
static Float_t SGetError0Par(Int_t dim, Int_t type, Float_t z, Float_t angle)
Float_t GetError0(Int_t dim, Int_t type, Float_t z, Float_t angle) const
Bool_t fWaveCorrectionMirroredPad
flag is the cog axis mirrored at 0.5
Float_t GetWaveCorrection(Int_t Type, Float_t Z, Int_t QMax, Float_t Pad, Float_t angleY) const
Float_t QnormHis(Int_t ipad, Int_t itype, Float_t dr, Float_t ty, Float_t tz)
TObjArray * fQNormHis
q norm correction for analytical correction
Float_t fParamS0Par[2][3][7]
error parameterization coeficients
TPC cluster error, shape and charge parameterization as function of drift length and inclination angl...
void FitResolQPar(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
Float_t GetRMS1(Int_t dim, Int_t type, Float_t z, Float_t angle) const
Float_t GetErrorQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const
TVectorD * fPosQMnorm[3]
q position normalization
Double_t GetQnormCorr(Int_t ipad, Int_t itype, Int_t corrType) const
void SetResolutionYMap(THnBase *ResolutionYMap)
void SetInstance(AliTPCClusterParam *const param)
Float_t GetZWidth() const
Float_t fParamRMSQ[2][3][6]
shape parameterization coeficients
Float_t Qnorm(Int_t ipad, Int_t itype, Float_t dr, Float_t ty, Float_t tz)
Float_t fParamS1[2][4]
error parameterization coeficients
Float_t PosCorrection(Int_t type, Int_t ipad, Float_t pad, Float_t time, Float_t z, Float_t sy2, Float_t sz2, Float_t qm)
AliTPCClusterParam & operator=(const AliTPCClusterParam ¶m)
void FitRMSQ(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
Bool_t fWaveCorrectionMirroredAngle
flag is the Angle axis mirrored at 0
Float_t GetRMS0(Int_t dim, Int_t type, Float_t z, Float_t angle) const
Float_t fParamSQPar[2][3][9]
error parameterization coeficients
Float_t fErrorSQPar[2][3][9]
error parameterization coeficients
void FitResol1(TTree *tree, Int_t dim, Float_t *param0, Float_t *error)
void FitResol(TTree *tree)
Bool_t fWaveCorrectionMirroredZ
flag is the Z axis mirrored at 0
virtual void Print(Option_t *option="") const
static AliTPCClusterParam * fgInstance
Double_t AliTPCClusterParamClusterResolutionZ(Double_t x, Double_t s0, Double_t s1)
Float_t GetShapeFactor(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean, Float_t rmsL, Float_t rmsM) const
Float_t GetWWPitch(Int_t isector=0) const
static Double_t GaussConvolutionGamma4(Double_t x0, Double_t x1, Double_t k0, Double_t k1, Double_t s0, Double_t s1, Double_t tau)
Float_t fRMSSigmaRatio[2][2]
mean value of the varation of RMS to RMS
void FitResolQ(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
void Test(TTree *tree, const char *output="TestClusterParam.root")
void FitResol0Par(TTree *tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error)
static Double_t GaussConvolutionTail(Double_t x0, Double_t x1, Double_t k0, Double_t k1, Double_t s0, Double_t s1, Double_t tau)
TObjArray * fQNorm
q norm paramters
THnBase * fWaveCorrectionMap
dY with respect to the distance to the center of the pad
Float_t fParamSQ[2][3][6]
error parameterization coeficients
Float_t GetError0Par(Int_t dim, Int_t type, Float_t z, Float_t angle) const
Float_t fErrorRMS0[2][3][4]
shape parameterization coeficients
void SetWaveCorrectionMap(THnBase *WaveCorrectionMap)
Float_t fErrorS0[2][3][4]
error parameterization coeficients
TVectorD * fPosYcor[3]
position correction parameterization
Float_t GetErrorQParScaled(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean) const
Float_t QnormPos(Int_t ipad, Bool_t isMax, Float_t pad, Float_t time, Float_t z, Float_t sy2, Float_t sz2, Float_t qm, Float_t qt)
Float_t fParamRMS0[2][3][4]
shape parameterization coeficients
void SetQnorm(Int_t ipad, Int_t itype, const TVectorD *const norm)