]>
Commit | Line | Data |
---|---|---|
12ca5da1 | 1 | #ifndef ALITPCCLUSTERPARAM_H |
2 | #define ALITPCCLUSTERPARAM_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id: AliTPCClusterParam.h,v */ | |
7 | ||
8 | //////////////////////////////////////////////////// | |
9 | // // | |
10 | // TPC cluster error and shape parameterization // | |
11 | // // | |
12 | //////////////////////////////////////////////////// | |
13 | ||
14 | ||
15 | #include <TObject.h> | |
0a65832b | 16 | #include <TVectorD.h> |
8a92e133 | 17 | #include <TMatrixD.h> |
12ca5da1 | 18 | |
0a65832b | 19 | class TTree; |
20 | class TObjArray; | |
8a92e133 | 21 | class TH1; |
12ca5da1 | 22 | //_____________________________________________________________________________ |
23 | class AliTPCClusterParam : public TObject { | |
24 | public: | |
25 | static AliTPCClusterParam* Instance(); | |
f1c2a4a3 | 26 | AliTPCClusterParam(); |
38caa778 | 27 | AliTPCClusterParam(const AliTPCClusterParam& param); |
28 | AliTPCClusterParam & operator=(const AliTPCClusterParam&); | |
f1c2a4a3 | 29 | virtual ~AliTPCClusterParam(); |
12ca5da1 | 30 | virtual void Print(Option_t* option = "") const; |
31 | void SetInstance(AliTPCClusterParam*param){fgInstance = param;} | |
dcf3a564 | 32 | // |
33 | // Seting functions | |
34 | // | |
12ca5da1 | 35 | void FitData(TTree * tree); |
dcf3a564 | 36 | void FitResol(TTree * tree); |
37 | void FitRMS(TTree * tree); | |
38 | void SetQnorm(Int_t ipad, Int_t itype, TVectorD * norm); | |
8a92e133 | 39 | void SetQnormCorr(Int_t ipad, Int_t itype, Int_t corrType, Float_t val); |
40 | Double_t GetQnormCorr(Int_t ipad, Int_t itype, Int_t corrType) const; | |
41 | void ResetQnormCorr(); | |
11750d28 | 42 | // |
43 | // Charge parameterization | |
44 | // | |
dcf3a564 | 45 | Float_t Qnorm(Int_t ipad, Int_t itype, Float_t dr, Float_t ty, Float_t tz); |
8a92e133 | 46 | Float_t QnormHis(Int_t ipad, Int_t itype, Float_t dr, Float_t ty, Float_t tz); |
47 | ||
b17540e4 | 48 | |
49 | 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); | |
2e5bcb67 | 50 | static Float_t SQnormPos(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){ return fgInstance->QnormPos(ipad,isMax,pad,time,z,sy2,sz2,qm,qt);;} |
51 | ||
52 | 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); | |
53 | static Float_t SPosCorrection(Int_t type, Int_t ipad, Float_t pad, Float_t time, Float_t z, Float_t sy2, Float_t sz2, Float_t qm){ return fgInstance->PosCorrection(type,ipad,pad,time,z,sy2,sz2,qm);} | |
dcf3a564 | 54 | // |
55 | // Error parameterization | |
56 | // | |
12ca5da1 | 57 | Float_t GetError0(Int_t dim, Int_t type, Float_t z, Float_t angle); |
58 | Float_t GetError0Par(Int_t dim, Int_t type, Float_t z, Float_t angle); | |
59 | Float_t GetError1(Int_t dim, Int_t type, Float_t z, Float_t angle); | |
60 | Float_t GetErrorQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean); | |
61 | Float_t GetErrorQPar(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean); | |
62 | Float_t GetErrorQParScaled(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean); | |
dcf3a564 | 63 | // |
64 | // Shape parameterization | |
65 | // | |
12ca5da1 | 66 | Float_t GetRMS0(Int_t dim, Int_t type, Float_t z, Float_t angle); |
67 | Float_t GetRMS1(Int_t dim, Int_t type, Float_t z, Float_t angle); | |
68 | Float_t GetRMSQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean); | |
69 | Float_t GetRMSSigma(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean); | |
70 | Float_t GetShapeFactor(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean, Float_t rmsL, Float_t rmsM); | |
dcf3a564 | 71 | // |
72 | // | |
73 | // | |
12ca5da1 | 74 | void Test(TTree * tree, const char *output="TestClusterParam.root"); |
75 | // | |
76 | // static methods equivalents - use instance of param object - useful for tree draw and TF2 visualization | |
77 | static Float_t SGetError0(Int_t dim, Int_t type, Float_t z, Float_t angle){ | |
78 | return fgInstance->GetError0(dim,type,z,angle); | |
79 | } | |
80 | static Float_t SGetError0Par(Int_t dim, Int_t type, Float_t z, Float_t angle){ | |
81 | return fgInstance->GetError0Par(dim,type,z,angle); | |
82 | } | |
83 | static Float_t SGetError1(Int_t dim, Int_t type, Float_t z, Float_t angle){ | |
84 | return fgInstance->GetError1(dim,type,z,angle); | |
85 | } | |
86 | static Float_t SGetErrorQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){ | |
87 | return fgInstance->GetErrorQ(dim,type,z,angle,Qmean); | |
88 | } | |
89 | static Float_t SGetErrorQPar(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){ | |
90 | return fgInstance->GetErrorQPar(dim,type,z,angle,Qmean); | |
91 | } | |
92 | static Float_t SGetErrorQParScaled(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){ | |
93 | return fgInstance->GetErrorQParScaled(dim,type,z,angle,Qmean); | |
94 | } | |
95 | ||
96 | static Float_t SGetRMS0(Int_t dim, Int_t type, Float_t z, Float_t angle){ | |
97 | return fgInstance->GetRMS0(dim,type,z,angle); | |
98 | } | |
99 | static Float_t SGetRMS1(Int_t dim, Int_t type, Float_t z, Float_t angle){ | |
100 | return fgInstance->GetRMS1(dim,type,z,angle); | |
101 | } | |
102 | static Float_t SGetRMSQ(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){ | |
103 | return fgInstance->GetRMSQ(dim,type,z,angle,Qmean); | |
104 | } | |
105 | static Float_t SGetRMSSigma(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean){ | |
106 | return fgInstance->GetRMSSigma(dim,type,z,angle,Qmean); | |
107 | } | |
108 | static Float_t SGetShapeFactor(Int_t dim, Int_t type, Float_t z, Float_t angle, Float_t Qmean, Float_t rmsL, Float_t rmsM){ | |
109 | return fgInstance->GetShapeFactor(dim,type,z,angle,Qmean, rmsL, rmsM); | |
110 | } | |
111 | // | |
112 | // | |
0a65832b | 113 | static Float_t SQnorm(Int_t ipad, Int_t itype,Float_t dr, Float_t ty, Float_t tz) {return fgInstance->Qnorm(ipad, itype, dr,ty,tz);} |
8a92e133 | 114 | static Float_t SQnormHis(Int_t ipad, Int_t itype,Float_t dr, Float_t ty, Float_t tz) {return fgInstance->QnormHis(ipad, itype, dr,ty,tz);} |
0a65832b | 115 | |
6194ddbd | 116 | // |
117 | // Analytical position angular correction | |
118 | // | |
119 | static Double_t GaussConvolution(Double_t x0, Double_t x1, Double_t k0, Double_t k1, Double_t s0, Double_t s1); | |
120 | 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); | |
121 | 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); | |
8a92e133 | 122 | 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); |
123 | 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); | |
6194ddbd | 124 | |
125 | ||
0a65832b | 126 | |
236a0d03 | 127 | public: |
dcf3a564 | 128 | // |
129 | // | |
130 | // | |
12ca5da1 | 131 | void FitResol0(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error); |
132 | void FitResol0Par(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error); | |
133 | void FitResol1(TTree * tree, Int_t dim, Float_t *param0, Float_t *error); | |
134 | void FitResolQ(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error); | |
135 | void FitResolQPar(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error); | |
136 | void FitRMS0(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error); | |
137 | void FitRMS1(TTree * tree, Int_t dim, Float_t *param0, Float_t *error); | |
138 | void FitRMSQ(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error); | |
139 | void FitRMSSigma(TTree * tree, Int_t dim, Int_t type, Float_t *param0, Float_t *error); | |
140 | // | |
0a65832b | 141 | |
12ca5da1 | 142 | Float_t fRatio; //ratio of values constibution to error |
143 | Float_t fParamS0[2][3][4]; //error parameterization coeficients | |
144 | Float_t fErrorS0[2][3][4]; //error parameterization coeficients | |
145 | Float_t fParamS0Par[2][3][7]; //error parameterization coeficients | |
146 | Float_t fErrorS0Par[2][3][7]; //error parameterization coeficients | |
147 | Float_t fParamSQ[2][3][6]; //error parameterization coeficients | |
148 | Float_t fErrorSQ[2][3][6]; //error parameterization coeficients | |
149 | Float_t fParamSQPar[2][3][9]; //error parameterization coeficients | |
150 | Float_t fErrorSQPar[2][3][9]; //error parameterization coeficients | |
151 | Float_t fParamS1[2][4]; //error parameterization coeficients | |
152 | Float_t fErrorS1[2][4]; //error parameterization coeficients | |
153 | // | |
154 | Float_t fParamRMS0[2][3][4]; //shape parameterization coeficients | |
155 | Float_t fErrorRMS0[2][3][4]; //shape parameterization coeficients | |
156 | Float_t fParamRMSQ[2][3][6]; //shape parameterization coeficients | |
157 | Float_t fErrorRMSQ[2][3][6]; //shape parameterization coeficients | |
158 | Float_t fParamRMS1[2][5]; //shape parameterization coeficients | |
159 | Float_t fErrorRMS1[2][5]; //shape parameterization coeficients | |
160 | Float_t fErrorRMSSys[2]; // systematic relative error of the parametererization | |
161 | Float_t fRMSSigmaRatio[2][2]; // mean value of the varation of RMS to RMS | |
162 | Float_t fRMSSigmaFit[2][3][2]; // mean value of the varation of RMS to RMS | |
163 | // | |
b17540e4 | 164 | // charge normalization parametrization |
11750d28 | 165 | // |
b17540e4 | 166 | TObjArray *fQNorm; // q norm paramters |
8a92e133 | 167 | TMatrixD *fQNormCorr; // q norm correction for analytica correction |
168 | TObjArray *fQNormHis; // q norm correction for analytical correction | |
2e5bcb67 | 169 | // |
170 | TVectorD *fPosQTnorm[3]; // q position normalization | |
171 | TVectorD *fPosQMnorm[3]; // q position normalization | |
172 | TVectorD *fQpadTnorm; // q pad normalization - Total charge | |
173 | TVectorD *fQpadMnorm; // q pad normalization - Max charge | |
174 | // | |
175 | // Position corrections | |
176 | // | |
177 | TVectorD *fPosYcor[3]; // position correction parameterization | |
178 | TVectorD *fPosZcor[3]; // position correction parameterization | |
b17540e4 | 179 | // |
12ca5da1 | 180 | protected: |
181 | static AliTPCClusterParam* fgInstance; //! Instance of this class (singleton implementation) | |
8a92e133 | 182 | ClassDef(AliTPCClusterParam,6) // TPC Cluster parameter class |
12ca5da1 | 183 | }; |
184 | ||
185 | #endif |