X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TPC%2FAliTPCExB.h;h=9e23a5d9a525f61a1c2c7b167eaa169bfbd76df0;hb=dd4bfd89c346ca0dd412e1327c6122a7e34d53de;hp=e8fd263046e116ff29d356c2f36537a4c5b83cc8;hpb=faf9323738d83434592a89e8b4439f5b9130db9c;p=u%2Fmrichter%2FAliRoot.git diff --git a/TPC/AliTPCExB.h b/TPC/AliTPCExB.h index e8fd263046e..9e23a5d9a52 100644 --- a/TPC/AliTPCExB.h +++ b/TPC/AliTPCExB.h @@ -1,18 +1,65 @@ -#ifndef ALITPC_EXB -#define ALITPC_EXB +#ifndef ALITPCEXB_H +#define ALITPCEXB_H -#include "AliCorrector.h" +class AliMagF; +#include "TObject.h" +#include "TVectorDfwd.h" -class AliTPCExB:public AliCorrector { +class AliTPCExB:public TObject { public: + AliTPCExB(); + AliTPCExB& operator=(const AliTPCExB &exb); + AliTPCExB(const AliTPCExB& exb); virtual ~AliTPCExB() {}; - void SetDriftVelocity(Double_t driftVelocity) { - fDriftVelocity=driftVelocity; - }; -protected: - Double_t fDriftVelocity; // The electron drift velocity. + virtual void Correct(const Double_t *position,Double_t *corrected)=0; + virtual void CorrectInverse(const Double_t *position,Double_t *corrected) { + Correct(position,corrected); + for (Int_t i=0;i<3;++i) + corrected[i]=position[i]-(corrected[i]-position[i]); + } + // + // Test and visualization + // + void TestExB(const char* fileName); + static Double_t GetDr(Double_t r, Double_t phi, Double_t z, Double_t bz=5); + static Double_t GetDrphi(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); + static Double_t GetDz(Double_t r, Double_t phi, Double_t z, Double_t bz=5); + static AliTPCExB* Instance(){return fgInstance;} + static void SetInstance(AliTPCExB *const param){fgInstance = param;} + // + // Mag field scans + // + static void RegisterField(Int_t index, AliMagF * magf); + static Double_t GetBx(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); + 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 GetBrfi(Double_t r, Double_t phi, Double_t z,Int_t index=0); + // + 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); + static Double_t GetBzI(Double_t r, Double_t phi, Double_t z,Int_t index=0); + static Double_t GetBrI(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); + // + // + Double_t Eval(Int_t type, Double_t r, Double_t phi, Double_t z); + Double_t SEval(Int_t type, Double_t r, Double_t phi, Double_t z){return Instance()->Eval(type,r,phi,z);} + static Double_t EvalMat(const TVectorD &vec, Double_t r, Double_t phi, Double_t z); // evalute parameterization + + private: + TVectorD * fMatBrBz; //param matrix Br/Bz + TVectorD * fMatBrfiBz; //param matrix Br/Bz + TVectorD * fMatBrBzI0; //param matrix Br/Bz integral z>0 + TVectorD * fMatBrBzI1; //param matrix Br/Bz integral z<0 + TVectorD * fMatBrfiBzI0; //param matrix Br/Bz integral z>0 + TVectorD * fMatBrfiBzI1; //param matrix Br/Bz integral z<0 - ClassDef(AliTPCExB,1) + static AliTPCExB* fgInstance; //! Instance of this class (singleton implementation) + static TObjArray fgArray; //! array of magnetic fields + // + ClassDef(AliTPCExB,2) }; #endif