5 #include "TLinearFitter.h" 54 fMatBrBz(new
TVectorD(*(exb.fMatBrBz))),
55 fMatBrfiBz(new
TVectorD(*(exb.fMatBrfiBz))),
56 fMatBrBzI0(new
TVectorD(*(exb.fMatBrBzI0))),
57 fMatBrBzI1(new
TVectorD(*(exb.fMatBrBzI1))),
58 fMatBrfiBzI0(new
TVectorD(*(exb.fMatBrfiBzI0))),
59 fMatBrfiBzI1(new
TVectorD(*(exb.fMatBrfiBzI1)))
81 for (x[0]=-250.;x[0]<=250.;x[0]+=10.)
82 for (x[1]=-250.;x[1]<=250.;x[1]+=10.)
83 for (x[2]=-250.;x[2]<=250.;x[2]+=20.) {
84 Double_t r=TMath::Sqrt(x[0]*x[0]+x[1]*x[1]);
90 Double_t rd=TMath::Sqrt(d[0]*d[0]+d[1]*d[1]);
92 Double_t phi=TMath::ATan2(x[1],x[0]);
93 Double_t phid=TMath::ATan2(d[1],d[0]);
94 Double_t dphi=phi-phid;
95 if (dphi<0.) dphi+=TMath::TwoPi();
96 if (dphi>TMath::Pi()) dphi=TMath::TwoPi()-dphi;
97 Double_t drphi=r*dphi;
98 Double_t dx=x[0]-d[0];
99 Double_t dy=x[1]-d[1];
100 Double_t dz=x[2]-d[2];
102 Double_t bx =
GetBx(r,phi,z,0);
103 Double_t by =
GetBy(r,phi,z,0);
104 Double_t bz =
GetBz(r,phi,z,0);
105 Double_t br =
GetBr(r,phi,z,0);
106 Double_t brfi =
GetBrfi(r,phi,z,0);
108 Double_t bxi =
GetBxI(r,phi,z,0);
109 Double_t byi =
GetByI(r,phi,z,0);
110 Double_t bzi =
GetBzI(r,phi,z,0);
111 Double_t bri =
GetBrI(r,phi,z,0);
112 Double_t brfii =
GetBrfiI(r,phi,z,0);
152 Double_t pos0[3] = {r*TMath::Cos(phi), r*TMath::Sin(phi),z};
155 Double_t dx=pos1[0]-pos0[0];
156 Double_t dy=pos1[1]-pos0[1];
159 Float_t dr = (dx*pos0[0]+dy*pos0[1])/r;
170 Double_t pos0[3] = {r*TMath::Cos(phi), r*TMath::Sin(phi),z};
173 Double_t dphi=TMath::ATan2(pos1[1],pos1[0])-TMath::ATan2(pos0[1],pos0[0]);
174 if (dphi>TMath::Pi()) dphi-=TMath::TwoPi();
175 if (dphi<-TMath::Pi()) dphi+=TMath::TwoPi();
187 Double_t pos0[3] = {r*TMath::Cos(phi), r*TMath::Sin(phi),z};
190 Double_t dphi=TMath::ATan2(pos1[1],pos1[0])-TMath::ATan2(pos0[1],pos0[0]);
201 Double_t pos0[3] = {r*TMath::Cos(phi), r*TMath::Sin(phi),z};
204 Double_t dz=pos1[2]-pos0[2];
228 Double_t xyz[3]={r*TMath::Cos(phi),r*TMath::Sin(phi),z};
231 mag->
Field(xyz,bxyz);
240 Double_t xyz[3]={r*TMath::Cos(phi),r*TMath::Sin(phi),z};
243 mag->
Field(xyz,bxyz);
252 Double_t xyz[3]={r*TMath::Cos(phi),r*TMath::Sin(phi),z};
255 mag->
Field(xyz,bxyz);
266 Double_t xyz[3]={r*TMath::Cos(phi),r*TMath::Sin(phi),z};
269 mag->
Field(xyz,bxyz);
271 Double_t br = (bxyz[0]*xyz[0]+bxyz[1]*xyz[1])/r;
280 Double_t xyz[3]={r*TMath::Cos(phi),r*TMath::Sin(phi),z};
283 mag->
Field(xyz,bxyz);
285 Double_t br = (-bxyz[0]*xyz[1]+bxyz[1]*xyz[0])/r;
296 for (Float_t zi=z;zi<250;zi+=5){
297 sumf+=
GetBx(r,phi,zi,index)/
GetBz(r,phi,zi,index);
301 for (Float_t zi=z;zi>-250;zi-=5){
302 sumf+=
GetBx(r,phi,zi,index)/
GetBz(r,phi,zi,index);
312 for (Float_t zi=z;zi<250;zi+=5){
313 sumf+=
GetBy(r,phi,zi,index)/
GetBz(r,phi,zi,index);
317 for (Float_t zi=z;zi>-250;zi-=5){
318 sumf+=
GetBy(r,phi,zi,index)/
GetBz(r,phi,zi,index);
328 for (Float_t zi=z;zi<250;zi+=5){
329 sumf+=
GetBz(r,phi,zi,index);
333 for (Float_t zi=z;zi>-250;zi-=5){
334 sumf+=
GetBz(r,phi,zi,index);
345 for (Float_t zi=z;zi<250;zi+=5){
346 sumf+=
GetBr(r,phi,zi,index)/
GetBz(r,phi,zi,index);
350 for (Float_t zi=z;zi>-250;zi-=5){
351 sumf+=
GetBr(r,phi,zi,index)/
GetBz(r,phi,zi,index);
361 for (Float_t zi=z;zi<250;zi+=5.){
366 for (Float_t zi=z;zi>-250;zi-=5){
430 Double_t sa = TMath::Sin(phi);
431 Double_t ca = TMath::Cos(phi);
432 Double_t sa2 = TMath::Sin(phi*2);
433 Double_t ca2 = TMath::Cos(phi*2);
434 Double_t zn = z/250.;
435 Double_t rn = r/250.;
437 Double_t
res = vec[ipoint++];
438 res+=vec[ipoint++]*zn;
439 res+=vec[ipoint++]*rn;
440 res+=vec[ipoint++]*zn*rn;
441 res+=vec[ipoint++]*zn*zn;
442 res+=vec[ipoint++]*zn*zn*rn;
443 res+=vec[ipoint++]*zn*rn*rn;
445 res+=vec[ipoint++]*sa;
446 res+=vec[ipoint++]*ca;
447 res+=vec[ipoint++]*ca2;
448 res+=vec[ipoint++]*sa2;
449 res+=vec[ipoint++]*ca*zn;
450 res+=vec[ipoint++]*sa*zn;
451 res+=vec[ipoint++]*ca2*zn;
452 res+=vec[ipoint++]*sa2*zn;
453 res+=vec[ipoint++]*ca*zn*zn;
454 res+=vec[ipoint++]*sa*zn*zn;
455 res+=vec[ipoint++]*ca*zn*rn;
456 res+=vec[ipoint++]*sa*zn*rn;
static Double_t GetDz(Double_t r, Double_t phi, Double_t z, Double_t bz=5)
TVectorD * fMatBrBz
param matrix Br/Bz
TVectorD * fMatBrBzI1
param matrix Br/Bz integral z<0
static Double_t GetDrphi(Double_t r, Double_t phi, Double_t z, Double_t bz=5)
static Double_t GetBxI(Double_t r, Double_t phi, Double_t z, Int_t index=0)
static Double_t GetByI(Double_t r, Double_t phi, Double_t z, Int_t index=0)
virtual void Field(const Double_t *x, Double_t *b)
static Double_t GetBrI(Double_t r, Double_t phi, Double_t z, Int_t index=0)
AliTPCExB & operator=(const AliTPCExB &exb)
AliTPCExB * GetExB() const
static Double_t GetBrfi(Double_t r, Double_t phi, Double_t z, Int_t index=0)
static Double_t GetBy(Double_t r, Double_t phi, Double_t z, Int_t index=0)
TString fileName(const char *dir, int runNumber, const char *da, int i, const char *type)
static TObjArray fgArray
! array of magnetic fields
static AliTPCExB * fgInstance
! Instance of this class (singleton implementation)
void TestExB(const char *fileName)
static Double_t GetBz(Double_t r, Double_t phi, Double_t z, Int_t index=0)
static Double_t GetBr(Double_t r, Double_t phi, Double_t z, Int_t index=0)
static Double_t GetBrfiI(Double_t r, Double_t phi, Double_t z, Int_t index=0)
static void RegisterField(Int_t index, AliMagF *magf)
Double_t Eval(Int_t type, Double_t r, Double_t phi, Double_t z)
static Double_t GetDr(Double_t r, Double_t phi, Double_t z, Double_t bz=5)
static Double_t GetDphi(Double_t r, Double_t phi, Double_t z, Double_t bz=5)
TVectorD * fMatBrfiBzI1
param matrix Br/Bz integral z<0
virtual void Correct(const Double_t *position, Double_t *corrected)=0
TVectorD * fMatBrfiBz
param matrix Br/Bz
static AliMagF::BMap_t mag
class TVectorT< Double_t > TVectorD
TVectorD * fMatBrfiBzI0
param matrix Br/Bz integral z>0
TVectorD * fMatBrBzI0
param matrix Br/Bz integral z>0
Abstract class for ExB effect parameterization.
static Double_t EvalMat(const TVectorD &vec, Double_t r, Double_t phi, Double_t z)
static Double_t GetBx(Double_t r, Double_t phi, Double_t z, Int_t index=0)
static AliTPCExB * Instance()
static Double_t GetBzI(Double_t r, Double_t phi, Double_t z, Int_t index=0)