]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/TPCbase/AliTPCExBTwist.h
doxy: TPC/TPCbase converted
[u/mrichter/AliRoot.git] / TPC / TPCbase / AliTPCExBTwist.h
1 #ifndef ALI_TPC_EX_B_TWIST_H
2 #define ALI_TPC_EX_B_TWIST_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /// \class AliTPCExBTwist
8 /// \brief AliTPCExBTwist class
9 ///
10 /// The class calculates the space point distortions due to a mismatch
11 /// of the E and B field axis (original code from STAR)
12 ///
13 /// It assumes a homogeneous magnetic and electric field. The calculations performed
14 /// within this class can be written in a compact form as well (compare notes of Jim Thomas)
15 ///
16 /// The inputs to this class are the twist angles in the x and y plane ($\theta_x,\theta_y$)
17 /// in cartesian coordinates. They can be set via the member functions SetXTwist and SetYTwist.
18 ///
19 /// ![Picture from ROOT macro](AliTPCExBTwist_h_76e03fd.png)
20 ///
21 /// Support since 2010: mrain.ivanov@cern.ch
22 ///
23 /// \author Jim Thomas, Magnus Mager, Stefan Rossegger
24 /// \date 27/04/2010
25
26 #include "AliTPCCorrection.h"
27
28 class AliTPCExBTwist : public AliTPCCorrection {
29 public:
30   AliTPCExBTwist();
31   virtual ~AliTPCExBTwist();
32   virtual Bool_t AddCorrectionCompact(AliTPCCorrection* corr, Double_t weight);
33   // initialization and update functions
34   virtual void Init();
35   virtual void Update(const TTimeStamp &timeStamp);
36
37
38   // common setters and getters for ExB
39   virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) {
40     fT1=t1; fT2=t2;
41     const Float_t wt1=t1*omegaTau;     fC1=wt1/(1.+wt1*wt1);
42     const Float_t wt2=t2*omegaTau;     fC2=wt2*wt2/(1.+wt2*wt2);
43   };
44   void SetC1C2(Float_t c1,Float_t c2) {fC1=c1;fC2=c2;} // CAUTION: USE WITH CARE
45   Float_t GetC1() const {return fC1;}
46   Float_t GetC2() const {return fC2;}
47
48   // setters and getters for twist
49   void SetXTwist(Float_t xTwist) {fXTwist=xTwist;}
50   void SetYTwist(Float_t yTwist) {fYTwist=yTwist;}
51   Float_t GetXTwist() const {return fXTwist;}
52   Float_t GetYTwist() const {return fYTwist;}
53
54   virtual void Print(const Option_t* option="") const;
55
56 protected:
57   virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
58
59 private:
60   Float_t fC1; ///< coefficient C1                 (compare Jim Thomas's notes for definitions)
61   Float_t fC2; ///< coefficient C2                 (compare Jim Thomas's notes for definitions)
62
63   Float_t fXTwist;               ///< Twist of E to B field in X-Z [rad]
64   Float_t fYTwist;               ///< Twist of E to B field in Y-Z [rad]
65
66   /// \cond CLASSIMP
67   ClassDef(AliTPCExBTwist,1);
68   /// \endcond
69 };
70
71 #endif