]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCExBTwist.h
Bugfix for the Zero Suppression mode plus fixes of coding violations
[u/mrichter/AliRoot.git] / TPC / 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 ////////////////////////////////////////////////////////////////////////////
8 //                                                                        //
9 // AliTPCExBTwist class                                                   //
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 // The class allows "effective Omega Tau" corrections.                    // 
13 //                                                                        //
14 // date: 27/04/2010                                                       //
15 // Authors: Jim Thomas, Magnus Mager, Stefan Rossegger                    //
16 ////////////////////////////////////////////////////////////////////////////
17
18 #include "AliTPCCorrection.h"
19
20 class AliTPCExBTwist : public AliTPCCorrection {
21 public:
22   AliTPCExBTwist();
23   virtual ~AliTPCExBTwist();
24
25   // initialization and update functions
26   virtual void Init();
27   virtual void Update(const TTimeStamp &timeStamp);
28
29
30   // common setters and getters for ExB
31   virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) {
32     fT1=t1; fT2=t2; 
33     const Float_t wt1=t1*omegaTau;     fC1=wt1/(1.+wt1*wt1);
34     const Float_t wt2=t2*omegaTau;     fC2=wt2*wt2/(1.+wt2*wt2);
35   };
36   void SetC1C2(Float_t c1,Float_t c2) {fC1=c1;fC2=c2;} // CAUTION: USE WITH CARE
37   Float_t GetC1() const {return fC1;}
38   Float_t GetC2() const {return fC2;}
39
40   // setters and getters for twist
41   void SetXTwist(Float_t xTwist) {fXTwist=xTwist;}
42   void SetYTwist(Float_t yTwist) {fYTwist=yTwist;}
43   Float_t GetXTwist() const {return fXTwist;}
44   Float_t GetYTwist() const {return fYTwist;}
45
46   virtual void Print(const Option_t* option="") const;
47
48 protected:
49   virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
50
51 private:
52   Float_t fC1; // coefficient C1                 (compare Jim Thomas's notes for definitions)
53   Float_t fC2; // coefficient C2                 (compare Jim Thomas's notes for definitions)
54
55   Float_t fXTwist;               // Twist of E to B field in X-Z [rad]
56   Float_t fYTwist;               // Twist of E to B field in Y-Z [rad]
57
58   ClassDef(AliTPCExBTwist,1);
59 };
60
61 #endif