Some of the coding violations corrected
[u/mrichter/AliRoot.git] / TPC / AliTPCExB.h
CommitLineData
98a4cc77 1#ifndef ALITPCEXB_H
2#define ALITPCEXB_H
faf93237 3
9170bb1b 4class AliMagF;
481f877b 5#include "TObject.h"
98a4cc77 6#include "TVectorDfwd.h"
faf93237 7
481f877b 8class AliTPCExB:public TObject {
faf93237 9public:
9170bb1b 10 AliTPCExB();
0ffd2ae1 11 AliTPCExB& operator=(const AliTPCExB &exb);
12 AliTPCExB(const AliTPCExB& exb);
faf93237 13 virtual ~AliTPCExB() {};
481f877b 14 virtual void Correct(const Double_t *position,Double_t *corrected)=0;
15 virtual void CorrectInverse(const Double_t *position,Double_t *corrected) {
16 Correct(position,corrected);
17 for (Int_t i=0;i<3;++i)
18 corrected[i]=position[i]-(corrected[i]-position[i]);
19 }
2abfc1e6 20 //
9170bb1b 21 // Test and visualization
2abfc1e6 22 //
23 void TestExB(const char* fileName);
3ac615eb 24 static Double_t GetDr(Double_t r, Double_t phi, Double_t z, Double_t bz=5);
25 static Double_t GetDrphi(Double_t r, Double_t phi, Double_t z, Double_t bz=5);
26 static Double_t GetDphi(Double_t r, Double_t phi, Double_t z, Double_t bz=5);
27 static Double_t GetDz(Double_t r, Double_t phi, Double_t z, Double_t bz=5);
2abfc1e6 28 static AliTPCExB* Instance(){return fgInstance;}
98a4cc77 29 static void SetInstance(AliTPCExB *const param){fgInstance = param;}
9170bb1b 30 //
31 // Mag field scans
32 //
33 static void RegisterField(Int_t index, AliMagF * magf);
34 static Double_t GetBx(Double_t r, Double_t phi, Double_t z,Int_t index=0);
35 static Double_t GetBy(Double_t r, Double_t phi, Double_t z,Int_t index=0);
36 static Double_t GetBz(Double_t r, Double_t phi, Double_t z,Int_t index=0);
37 static Double_t GetBr(Double_t r, Double_t phi, Double_t z,Int_t index=0);
38 static Double_t GetBrfi(Double_t r, Double_t phi, Double_t z,Int_t index=0);
39 //
40 static Double_t GetBxI(Double_t r, Double_t phi, Double_t z,Int_t index=0);
41 static Double_t GetByI(Double_t r, Double_t phi, Double_t z,Int_t index=0);
42 static Double_t GetBzI(Double_t r, Double_t phi, Double_t z,Int_t index=0);
43 static Double_t GetBrI(Double_t r, Double_t phi, Double_t z,Int_t index=0);
44 static Double_t GetBrfiI(Double_t r, Double_t phi, Double_t z,Int_t index=0);
45 //
46 //
47 Double_t Eval(Int_t type, Double_t r, Double_t phi, Double_t z);
48 Double_t SEval(Int_t type, Double_t r, Double_t phi, Double_t z){return Instance()->Eval(type,r,phi,z);}
98a4cc77 49 static Double_t EvalMat(const TVectorD &vec, Double_t r, Double_t phi, Double_t z); // evalute parameterization
9170bb1b 50
98a4cc77 51 private:
9170bb1b 52 TVectorD * fMatBrBz; //param matrix Br/Bz
53 TVectorD * fMatBrfiBz; //param matrix Br/Bz
54 TVectorD * fMatBrBzI0; //param matrix Br/Bz integral z>0
55 TVectorD * fMatBrBzI1; //param matrix Br/Bz integral z<0
56 TVectorD * fMatBrfiBzI0; //param matrix Br/Bz integral z>0
57 TVectorD * fMatBrfiBzI1; //param matrix Br/Bz integral z<0
58
9170bb1b 59 static AliTPCExB* fgInstance; //! Instance of this class (singleton implementation)
60 static TObjArray fgArray; //! array of magnetic fields
61 //
9732a354 62 ClassDef(AliTPCExB,2)
faf93237 63};
64
65#endif