34 #include "TLinearFitter.h" 35 #include "Riostream.h" 65 fArraySectorIntParam(36),
66 fArraySectorIntCovar(36),
97 fArraySectorIntParam(36),
98 fArraySectorIntCovar(36),
177 Double_t alpha = TMath::ATan2(cy,cx);
178 if (alpha<0) alpha+=TMath::Pi()*2;
179 sector = Int_t(18*alpha/(TMath::Pi()*2));
182 if (type==kFALSE) sector=36+(sector%36>=18);
184 Double_t radius = TMath::Sqrt(cx*cx+cy*cy);
187 Double_t dout = xout-radius;
188 if (dout<0)
return 0;
190 Double_t dr = 0.5 - TMath::Abs(cz/250.);
195 Double_t eout10 = TMath::Exp(-dout/10.);
196 Double_t eout5 = TMath::Exp(-dout/5.);
197 Double_t eoutp = (eout10+eout5)*0.5;
198 Double_t eoutm = (eout10-eout5)*0.5;
201 result+=(*vec)[1]*eoutp;
202 result+=(*vec)[2]*eoutm;
203 result+=(*vec)[3]*eoutp*dr;
204 result+=(*vec)[4]*eoutm*dr;
205 result+=(*vec)[5]*eoutp*dr*dr;
206 result+=(*vec)[6]*eoutm*dr*dr;
230 AliFatal(
"TPC OCDB not initialized");
234 if (sector>=36) padtype = (padrow>64)?2:1;
235 Double_t padwidth=(padtype==0)? 0.4:0.6;
237 Double_t sigma = clparam->
GetRMS0(0,padtype,250-TMath::Abs(z),ky)/padwidth;
240 Float_t yshift = TMath::Abs(cy)-TMath::Abs((-npads*0.5+pad)*padwidth);
243 y -= yshift*((y>0)?1.:-1.);
244 Double_t y0 = npads*0.5*padwidth;
245 Double_t dy = (TMath::Abs(y0)-TMath::Abs(y))/padwidth-0.5;
247 Double_t padcenter = TMath::Nint(dy);
250 for (Double_t ip=padcenter-2.5; ip<=padcenter+2.5;ip++){
251 Double_t weightGaus = qMax*TMath::Exp(-(dy-ip)*(dy-ip)/(2*sigma*sigma));
252 Double_t ypad = (ip-npads*0.5)*padwidth;
253 Double_t weightGain =
GetEdgeQ0(sector,padrow,ypad);
255 Double_t weight = TMath::Nint(weightGaus*weightGain);
256 if (ip<0 &&weight> threshold) weight = threshold;
257 if (weight<0)
continue;
262 if (sumw>0) result = sumwi/sumw;
263 result = (result-dy)*padwidth;
280 Double_t alpha = TMath::ATan2(cy,cx);
281 if (alpha<0) alpha+=TMath::Pi()*2;
282 sector = Int_t(18*alpha/(TMath::Pi()*2));
285 if (type==kFALSE) sector=36+(sector%36>=18);
287 Double_t radius = TMath::Sqrt(cx*cx+cy*cy);
290 Double_t dout = xout-radius;
291 if (dout<0)
return 0;
293 Double_t dr = 0.5 - TMath::Abs(cz/250.);
298 Double_t eout10 = TMath::Exp(-dout/10.);
299 Double_t eout5 = TMath::Exp(-dout/5.);
300 Double_t eoutp = (eout10+eout5)*0.5;
301 Double_t eoutm = (eout10-eout5)*0.5;
304 result+=(*vec)[1]*eoutp;
305 result+=(*vec)[2]*eoutm;
306 result+=(*vec)[3]*eoutp*dr;
307 result+=(*vec)[4]*eoutm*dr;
308 result+=(*vec)[5]*eoutp*dr*dr;
309 result+=(*vec)[6]*eoutm*dr*dr;
324 Double_t params[2]={100,0};
326 params[0]=4.71413; params[1]=1.39558;
329 if (padrow<64) { params[0]=2.114; params[1]=1.526;}
330 if (padrow>=64){ params[0]=2.15; params[1]=1.535;}
334 Double_t ymax = TMath::Tan(TMath::Pi()/18.)*xrow;
335 Double_t dedge = ymax-TMath::Abs(y);
336 if (dedge-params[1]<0)
return 0;
337 if (dedge>10.*params[1])
return 1;
338 result = 1.-TMath::Exp(-params[0]*(dedge-params[1]));
355 for (Int_t isec=0;isec<36;isec++){
366 (*mat0Covar)=(*mat1Covar);
367 if (reset) (*mat0)=(*mat1);
368 if (!reset) (*mat0)+=(*mat1);
371 for (Int_t isec=0;isec<36;isec++){
382 (*mat0Covar)=(*mat1Covar);
383 if (reset) (*mat0)=(*mat1);
384 if (!reset) (*mat0)+=(*mat1);
393 if (!param)
return 0;
395 if (lx<
fXIO) quadrant=0;
398 if (ly<0) quadrant=1;
399 if (ly>0) quadrant=2;
402 if (ly<0) quadrant=3;
403 if (ly>0) quadrant=4;
407 Double_t a10 = (*param)(quadrant*6+0,0);
408 Double_t a20 = (*param)(quadrant*6+1,0);
409 Double_t a21 = (*param)(quadrant*6+2,0);
410 Double_t dx = (*param)(quadrant*6+3,0);
411 Double_t dy = (*param)(quadrant*6+4,0);
412 Double_t dz = (*param)(quadrant*6+5,0);
414 if (coord==0)
return dx;
415 if (coord==1)
return dy+deltaX*a10;
416 if (coord==2)
return dz+deltaX*a20+ly*a21;
417 if (coord==3)
return a10;
418 if (coord==4)
return a20;
419 if (coord==5)
return a21;
438 Double_t a10 = (*fSectorParam)(sector*6+0,0);
439 Double_t a20 = (*fSectorParam)(sector*6+1,0);
440 Double_t a21 = (*fSectorParam)(sector*6+2,0);
441 Double_t dx = (*fSectorParam)(sector*6+3,0);
442 Double_t dy = (*fSectorParam)(sector*6+4,0);
443 Double_t dz = (*fSectorParam)(sector*6+5,0);
444 Double_t deltaX = lx-
fXIO;
446 if (coord==0)
return dx;
447 if (coord==1)
return dy+deltaX*a10;
448 if (coord==2)
return dz+deltaX*a20+ly*a21;
449 if (coord==3)
return a10;
450 if (coord==4)
return a20;
451 if (coord==5)
return a21;
static AliTPCcalibDB * Instance()
Double_t GetCorrection(Int_t coord, Int_t sector, Double_t lx, Double_t ly, Double_t lz)
Double_t CorrectionOutZ0(Bool_t isGlobal, Bool_t type, Double_t cx, Double_t cy, Double_t cz, Int_t sector)
UInt_t GetNPads(UInt_t sector, UInt_t row) const
Double_t SRPhiCOGCorrection(Int_t sector, Int_t padrow, Float_t pad, Float_t cy, Float_t y, Float_t z, Float_t ky, Float_t qMax, Float_t threhsold)
void AddCorrectionSector(TObjArray &sideAPar, TObjArray &sideCPar, TObjArray &sideACov, TObjArray &sideCCov, Bool_t reset)
AliTPCClusterParam * GetClusterParam() const
TVectorD * GetParamOutR(Int_t sector)
TMatrixD * fSectorParam
Kalman parameter.
static AliTPCPointCorrection * fgInstance
UInt_t GetNRows(UInt_t sector) const
Double_t CorrectionOutR0(Bool_t isGlobal, Bool_t type, Double_t cx, Double_t cy, Double_t cz, Int_t sector)
Double_t fXIO
OROC-IROC boundary.
static Double_t SGetDzOut(Bool_t isGlobal, Bool_t type, Double_t cx, Double_t cy, Double_t cz, Int_t sector)
static Double_t SGetCorrection(Int_t coord, Int_t sector, Double_t lx, Double_t ly, Double_t lz)
Int_t fParamOutRVersion
version of the parameterization
Double_t GetDrOut(Bool_t isGlobal, Bool_t type, Double_t cx, Double_t cy, Double_t cz, Int_t sector)
static Double_t SGetCorrectionSector(Int_t coord, Int_t sector, Double_t lx, Double_t ly, Double_t lz, Int_t quadrant=-1)
static Double_t SGetDrOut(Bool_t isGlobal, Bool_t type, Double_t cx, Double_t cy, Double_t cz, Int_t sector)
TPC cluster error, shape and charge parameterization as function of drift length and inclination angl...
virtual ~AliTPCPointCorrection()
static AliTPCPointCorrection * Instance()
Float_t GetPadRowRadiiUp(UInt_t irow) const
Int_t fParamOutZVersion
version of the parameterization
Geometry class for a single ROC.
Double_t GetEdgeQ0(Int_t sector, Int_t padrow, Float_t y)
Float_t GetRMS0(Int_t dim, Int_t type, Float_t z, Float_t angle) const
#define AliFatal(message)
TObjArray fArraySectorIntParam
array of sector alignment parameters
Double_t GetDzOut(Bool_t isGlobal, Bool_t type, Double_t cx, Double_t cy, Double_t cz, Int_t sector)
Double_t RPhiCOGCorrection(Int_t sector, Int_t padrow, Float_t pad, Float_t cy, Float_t y, Float_t z, Float_t ky, Float_t qMax, Float_t threhsold)
static Double_t SGetEdgeQ0(Int_t sector, Int_t padrow, Float_t y)
static AliTPCROC * Instance()
class TVectorT< Double_t > TVectorD
Double_t fXquadrant
x quadrant
Float_t GetPadRowRadii(UInt_t isec, UInt_t irow) const
Double_t GetCorrectionSector(Int_t coord, Int_t sector, Double_t lx, Double_t ly, Double_t lz, Int_t quadrant=-1)
TObjArray fArraySectorIntCovar
array of sector alignment covariances
class TMatrixT< Double_t > TMatrixD
Double_t fXmiddle
center of the TPC sector local X