21 #include "TGeoGlobalMagField.h"
32 fDeltaVGGA(0.),fDeltaVGGC(0.),
47 AliMagF* magF= (AliMagF*)TGeoGlobalMagField::Instance()->GetField();
48 if (!magF) AliError(
"Magneticd field - not initialized");
49 Double_t bzField = magF->SolenoidField()/10.;
51 if (!param) AliError(
"Parameters - not initialized");
53 Double_t ezField = 400;
54 Double_t wt = -10.0 * (bzField*10) * vdrift / ezField ;
65 AliMagF* magF= (AliMagF*)TGeoGlobalMagField::Instance()->GetField();
66 if (!magF) AliError(
"Magneticd field - not initialized");
67 Double_t bzField = magF->SolenoidField()/10.;
69 if (!param) AliError(
"Parameters - not initialized");
71 Double_t ezField = 400;
72 Double_t wt = -10.0 * (bzField*10) * vdrift / ezField ;
88 if (!
fInitLookUp) AliError(
"Lookup table was not initialized! You should do InitGGVoltErrorDistortion() ...");
92 Double_t intEr, intEphi ;
98 r = TMath::Sqrt( x[0]*x[0] + x[1]*x[1] );
99 phi = TMath::ATan2(x[1],x[0]);
100 if ( phi < 0 ) phi += TMath::TwoPi();
103 if ( (roc%36) < 18 ) {
119 phi = phi + deltaVGG*(
fC0*intEphi -
fC1*intEr ) / r;
120 r = r + deltaVGG*(
fC0*intEr +
fC1*intEphi );
124 dx[0] = r * TMath::Cos(phi) - x[0];
125 dx[1] = r * TMath::Sin(phi) - x[1];
137 if (!
fInitLookUp) AliError(
"Lookup table was not initialized! You should do InitGGVoltErrorDistortion() ...");
147 r = TMath::Sqrt( x[0]*x[0] + x[1]*x[1] );
148 phi = TMath::ATan2(x[1],x[0]);
149 if ( phi < 0 ) phi += TMath::TwoPi();
152 if ( (roc%36) < 18 ) {
165 return (intEr*deltaVGG);
174 for ( Int_t i = 0 ; i <
kNZ ; ++i ) {
176 for ( Int_t j = 0 ; j <
kNR ; ++j ) {
179 Double_t intz = 0.0 ;
180 for ( Int_t n = 1 ; n < nterms ; ++n ) {
181 Double_t k = n * TMath::Pi() /
fgkTPCZ0 ;
188 if ( z == 0 ) continue ;
194 Double_t bn = eout * TMath::BesselI0( k*fgkIFCRadius ) - ein * TMath::BesselI0( k*fgkOFCRadius ) ;
196 an * TMath::BesselI1( k*r ) - bn * TMath::BesselK1( k*r ) ;
197 Double_t denominator =
198 TMath::BesselK0( k*fgkOFCRadius ) * TMath::BesselI0( k*fgkIFCRadius ) -
199 TMath::BesselK0( k*fgkIFCRadius ) * TMath::BesselI0( k*fgkOFCRadius ) ;
200 Double_t zterm = TMath::Cos( k*(
fgkTPCZ0-TMath::Abs(z)) ) - 1 ;
201 intz += zterm * numerator / denominator ;
203 if ( n>10 && TMath::Abs(intz)*1.e-10 > TMath::Abs(numerator/denominator) )
break;
219 TString opt = option; opt.ToLower();
220 printf(
"%s\n",GetTitle());
222 if (opt.Contains(
"a")) {
227 if (!
fInitLookUp) AliError(
"Lookup table was not initialized! You should do InitGGVoltErrorDistortion() ...");
static AliTPCcalibDB * Instance()
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
Double_t fgkZList[kNZ]
points in the z direction (for the lookup table)
Double_t fDeltaVGGC
Missmatch of gating grid voltage on C-side [V].
Manager and of geomety classes for set: TPC.
Float_t GetDriftV() const
static const Double_t fgkOFCRadius
Mean Radius of the Outer Field Cage (252.55 min, 256.45 max) (cm)
Double_t fDeltaVGGA
Missmatch of gating grid voltage on A-side [V].
AliTPCParam * GetParameters() const
virtual ~AliTPCGGVoltError()
Bool_t fInitLookUp
flag to check it the Look Up table was created
virtual void Print(const Option_t *option="") const
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.
virtual void GetCorrection(const Float_t x[], const Short_t roc, Float_t dx[])
void InitGGVoltErrorDistortion()
Float_t GetIntErOverEz(const Float_t x[], const Short_t roc)
static const Double_t fgkTPCZ0
nominal gating grid position
Float_t fC1
coefficient C1 (compare Jim Thomas's notes for definitions)
Double_t fGGVoltErrorER[kNZ][kNR]
Array to store electric field for GGVoltError calculation.
virtual void Update(const TTimeStamp &timeStamp)
static const Double_t fgkCathodeV
Cathode Voltage (volts)
void Interpolate2DEdistortion(Int_t order, Double_t r, Double_t z, const Double_t er[kNZ][kNR], Double_t &erValue)
static const Double_t fgkGG
Gating Grid voltage (volts)
Double_t fT2
tensor term of wt - T2
Double_t fgkRList[kNR]
points in the radial direction (for the lookup table)
Float_t fC0
coefficient C0 (compare Jim Thomas's notes for definitions)
virtual void SetOmegaTauT1T2(Float_t omegaTau, Float_t t1, Float_t t2)
static const Double_t fgkIFCRadius
Mean Radius of the Inner Field Cage ( 82.43 min, 83.70 max) (cm)/hera/alice/wiechula/calib/guiTrees.