1 #ifndef ALI_TPC_CORRECTION_H
2 #define ALI_TPC_CORRECTION_H
15 #include "TObjArray.h"
19 class TTreeSRedirector;
20 class AliExternalTrackParam;
39 void CorrectPoint (
const Float_t x[], Short_t roc,Float_t xp[]);
40 virtual void GetCorrection(
const Float_t x[], Short_t roc,Float_t dx[]);
42 virtual void GetCorrectionDz(
const Float_t x[], Short_t roc,Float_t dx[], Float_t delta);
48 void DistortPoint (
const Float_t x[], Short_t roc,Float_t xp[]);
49 virtual void GetDistortion(
const Float_t x[], Short_t roc,Float_t dx[]);
51 virtual void GetDistortionDz(
const Float_t x[], Short_t roc,Float_t dx[], Float_t delta);
56 virtual void Update(
const TTimeStamp &timeStamp);
63 virtual void Print(Option_t* option=
"")
const;
75 static void MakeDistortionMap(THnSparse * his0, TTreeSRedirector *
pcstream,
const char* hname, Int_t run, Float_t refX, Int_t type, Int_t integ=1);
80 AliExternalTrackParam *
FitDistortedTrack(AliExternalTrackParam & trackIn, Double_t refX, Int_t dir,TTreeSRedirector *
pcstream);
87 void FastSimDistortedVertex(Double_t orgVertex[3], Int_t nTracks, AliESDVertex &aV, AliESDVertex &avOrg, AliESDVertex &cV, AliESDVertex &cvOrg, TTreeSRedirector *
const pcstream, Double_t etaCuts);
94 static Double_t
GetCorrSector(Double_t sector, Double_t r, Double_t kZ, Int_t axisType, Int_t corrType=0);
95 static Double_t
GetCorrXYZ(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0);
97 static Double_t
GetCorrXYZDz(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0,Double_t delta=5);
98 static Double_t
GetCorrXYZIntegrateZ(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0, Double_t delta=5);
100 static Double_t
GetDistXYZ(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0);
102 static Double_t
GetDistXYZDz(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0,Double_t delta=5);
103 static Double_t
GetDistXYZIntegrateZ(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0, Double_t delta=5);
106 static Double_t
GetCorrectionSector(Double_t sector, Double_t r, Double_t kZ, Int_t axisType, Int_t corrType=0);
107 static Double_t
GetDistortionSector(Double_t sector, Double_t r, Double_t kZ, Int_t axisType, Int_t corrType=0);
111 TH2F*
CreateTH2F(
const char *name,
const char *title,
112 const char *xlabel,
const char *ylabel,
const char *zlabel,
113 Int_t nbinsx,Double_t xlow,Double_t xup,
114 Int_t nbinsy,Double_t ylow,Double_t yup);
139 const Double_t er[
kNZ][
kNR], Double_t &erValue );
143 Double_t &erValue, Double_t &ephiValue, Double_t &ezValue);
146 Int_t nx, Int_t ny,
const Double_t xv[],
const Double_t yv[],
147 const TMatrixD &
array );
149 Int_t nx, Int_t ny, Int_t nz,
150 const Double_t xv[],
const Double_t yv[],
const Double_t zv[],
151 TMatrixD **arrayofArrays );
152 Double_t
Interpolate(
const Double_t xArray[],
const Double_t yArray[],
153 Int_t order, Double_t x );
154 void Search( Int_t n,
const Double_t xArray[], Double_t x, Int_t &low );
158 Int_t nx, Int_t ny,
const Double_t xv[],
const Double_t yv[],
159 const TMatrixF &
array );
161 Int_t nx, Int_t ny, Int_t nz,
162 const Double_t xv[],
const Double_t yv[],
const Double_t zv[],
163 TMatrixF **arrayofArrays );
164 Float_t
Interpolate(
const Double_t xArray[],
const Float_t yArray[],
165 Int_t order, Double_t x );
173 TMatrixD &arrayErOverEz, TMatrixD &arrayDeltaEz,
174 Int_t rows, Int_t columns, Int_t iterations,
175 Bool_t rocDisplacement = kTRUE);
178 TMatrixD **arrayofEroverEz, TMatrixD **arrayofEPhioverEz, TMatrixD **arrayofEz,
179 Int_t rows, Int_t columns, Int_t phislices,
180 Float_t deltaphi, Int_t iterations, Int_t summetry,
static Double_t GetDistXYZ(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0)
AliExternalTrackParam * FitDistortedTrack(AliExternalTrackParam &trackIn, Double_t refX, Int_t dir, TTreeSRedirector *pcstream)
void DistortPointLocal(Float_t x[], Short_t roc)
static Double_t GetDistortionSector(Double_t sector, Double_t r, Double_t kZ, Int_t axisType, Int_t corrType=0)
Double_t fgkZList[kNZ]
points in the z direction (for the lookup table)
void CorrectPoint(Float_t x[], Short_t roc)
virtual void Print(Option_t *option="") const
static Double_t GetCorrSector(Double_t sector, Double_t r, Double_t kZ, Int_t axisType, Int_t corrType=0)
static Double_t GetDistXYZIntegrateZ(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0, Double_t delta=5)
Double_t Interpolate3DTable(Int_t order, Double_t x, Double_t y, Double_t z, Int_t nx, Int_t ny, Int_t nz, const Double_t xv[], const Double_t yv[], const Double_t zv[], TMatrixD **arrayofArrays)
static Double_t GetCorrectionSector(Double_t sector, Double_t r, Double_t kZ, Int_t axisType, Int_t corrType=0)
virtual void SetOmegaTauT1T2(Float_t omegaTau, Float_t t1, Float_t t2)
static const Double_t fgkOFCRadius
Mean Radius of the Outer Field Cage (252.55 min, 256.45 max) (cm)
virtual Bool_t AddCorrectionCompact(AliTPCCorrection *corr, Double_t weight)
TH2F * CreateHistoDRPhiinXY(Float_t z=10., Int_t nx=100, Int_t nphi=100)
TTreeSRedirector * pcstream
virtual void SetCorrScaleFactor(Float_t)
virtual void GetDistortion(const Float_t x[], Short_t roc, Float_t dx[])
static Double_t GetCorrXYZ(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0)
static void MakeSectorDistortionTree(TTree *tinput, Int_t dtype, Int_t ptype, const TObjArray *corrArray, Int_t step=1, Int_t offset=0, Bool_t debug=0)
TH2F * CreateHistoDRPhiinZR(Float_t phi=0., Int_t nZ=100, Int_t nR=100)
virtual Int_t IsPowerOfTwo(Int_t i) const
TH2F * CreateHistoDRinZR(Float_t phi=0., Int_t nZ=100, Int_t nR=100)
Double_t fT1
tensor term of wt - T1
static const Double_t fgkZOffSet
Offset from CE: calculate all distortions closer to CE as if at this point.
void PoissonRelaxation2D(TMatrixD &arrayV, TMatrixD &chargeDensity, TMatrixD &arrayErOverEz, TMatrixD &arrayDeltaEz, Int_t rows, Int_t columns, Int_t iterations, Bool_t rocDisplacement=kTRUE)
virtual void GetDistortionIntegralDz(const Float_t x[], Short_t roc, Float_t dx[], Float_t delta)
void CorrectPointLocal(Float_t x[], Short_t roc)
void Interpolate3DEdistortion(Int_t order, Double_t r, Float_t phi, Double_t z, const Double_t er[kNZ][kNPhi][kNR], const Double_t ephi[kNZ][kNPhi][kNR], const Double_t ez[kNZ][kNPhi][kNR], Double_t &erValue, Double_t &ephiValue, Double_t &ezValue)
virtual ~AliTPCCorrection()
TH2F * CreateTH2F(const char *name, const char *title, const char *xlabel, const char *ylabel, const char *zlabel, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup)
static const Double_t fgkTPCZ0
nominal gating grid position
virtual void GetCorrectionDz(const Float_t x[], Short_t roc, Float_t dx[], Float_t delta)
Double_t Interpolate2DTable(Int_t order, Double_t x, Double_t y, Int_t nx, Int_t ny, const Double_t xv[], const Double_t yv[], const TMatrixD &array)
static AliTPCCorrection * GetVisualCorrection(const char *corName)
static void MakeTrackDistortionTree(TTree *tinput, Int_t dtype, Int_t ptype, const TObjArray *corrArray, Int_t step=1, Int_t offset=0, Bool_t debug=0)
static void MakeDistortionMapSector(THnSparse *his0, TTreeSRedirector *pcstream, const char *hname, Int_t run, Int_t type)
Int_t fKLow
variable to help in the interpolation
static TObjArray * GetVisualCorrections()
static void MakeLaserDistortionTree(TTree *tree, TObjArray *corrArray, Int_t itype)
void Search(Int_t n, const Double_t xArray[], Double_t x, Int_t &low)
static AliTPCCorrection * GetVisualCorrection(Int_t position)
static const Double_t fgke0
vacuum permittivity [A·s/(V·m)]
static Double_t GetCorrXYZDz(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0, Double_t delta=5)
static void AddVisualCorrection(AliTPCCorrection *corr, Int_t position)
virtual Float_t GetCorrScaleFactor() const
Double_t Interpolate(const Double_t xArray[], const Double_t yArray[], Int_t order, Double_t x)
TH2F * CreateHistoDZinXY(Float_t z=10., Int_t nx=100, Int_t ny=100)
TTree * CreateDistortionTree(Double_t step=5, Int_t type=0)
void SetIsLocal(Bool_t isLocal)
static const Double_t fgkEM
charge/mass in [C/kg]
static void MakeDistortionMapCosmic(THnSparse *his0, TTreeSRedirector *pcstream, const char *hname, Int_t run, Float_t refX, Int_t type)
static TObjArray * fgVisualCorrection
array of orrection for visualization
void DistortPoint(Float_t x[], Short_t roc)
TH2F * CreateHistoDRinXY(Float_t z=10., Int_t nx=100, Int_t ny=100)
static const Double_t fgkCathodeV
Cathode Voltage (volts)
IntegrationType fIntegrationType
Presentation of the underlying corrections, integrated, or differential.
Double_t fgkPhiList[kNPhi]
points in the phi direction (for the lookup table)
virtual void GetCorrection(const Float_t x[], Short_t roc, Float_t dx[])
void Interpolate2DEdistortion(Int_t order, Double_t r, Double_t z, const Double_t er[kNZ][kNR], Double_t &erValue)
void FastSimDistortedVertex(Double_t orgVertex[3], Int_t nTracks, AliESDVertex &aV, AliESDVertex &avOrg, AliESDVertex &cV, AliESDVertex &cvOrg, TTreeSRedirector *const pcstream, Double_t etaCuts)
static const Double_t fgkGG
Gating Grid voltage (volts)
void StoreInOCDB(Int_t startRun, Int_t endRun, const char *comment=0)
Double_t fT2
tensor term of wt - T2
Double_t fgkRList[kNR]
points in the radial direction (for the lookup table)
static Double_t GetDistXYZDz(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0, Double_t delta=5)
virtual void GetDistortionDz(const Float_t x[], Short_t roc, Float_t dx[], Float_t delta)
static void MakeDistortionMap(THnSparse *his0, TTreeSRedirector *pcstream, const char *hname, Int_t run, Float_t refX, Int_t type, Int_t integ=1)
static void MakeLaserDistortionTreeOld(TTree *tree, TObjArray *corrArray, Int_t itype)
static Double_t GetCorrXYZIntegrateZ(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0, Double_t delta=5)
virtual void GetCorrectionIntegralDz(const Float_t x[], Short_t roc, Float_t dx[], Float_t delta)
void InitLookUpfulcrums()
AliTPCCorrection & operator=(const AliTPCCorrection &)
virtual void Update(const TTimeStamp &timeStamp)
Bool_t fIsLocal
switch to indicate that the distortion is a local vector drphi/dz, dr/dz
static const Double_t fgkIFCRadius
Mean Radius of the Inner Field Cage ( 82.43 min, 83.70 max) (cm)/hera/alice/wiechula/calib/guiTrees.
static const Double_t fgkdvdE
[cm/V] drift velocity dependency on the E field (from Magboltz for NeCO2N2 at standard environment) ...
TH2F * CreateHistoDZinZR(Float_t phi=0., Int_t nZ=100, Int_t nR=100)
void PoissonRelaxation3D(TMatrixD **arrayofArrayV, TMatrixD **arrayofChargeDensities, TMatrixD **arrayofEroverEz, TMatrixD **arrayofEPhioverEz, TMatrixD **arrayofEz, Int_t rows, Int_t columns, Int_t phislices, Float_t deltaphi, Int_t iterations, Int_t summetry, Bool_t rocDisplacement=kTRUE, IntegrationType integrationType=kIntegral)