]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/Base/AliTPCExBTwist.h
ATO-98 AddCorrectionCompact - to make corrections compact in memory + UnitTests...
[u/mrichter/AliRoot.git] / TPC / Base / AliTPCExBTwist.h
CommitLineData
b1f0a2a5 1#ifndef ALI_TPC_EX_B_TWIST_H
2#define ALI_TPC_EX_B_TWIST_H
0116859c 3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
b4caed64 7// _________________________________________________________________
8//
9// Begin_Html
10// <h2> AliTPCExBTwist class </h2>
11// The class calculates the space point distortions due to a mismatch
12// of the E and B field axis (original code from STAR)
13// <p>
14// It assumes a homogeneous magnetic and electric field. The calculations performed
15// within this class can be written in a compact form as well (compare notes of Jim Thomas)
16// <p>
17// The inputs to this class are the twist angles in the x and y plane ($\theta_x,\theta_y$)
18// in cartesian coordinates. They can be set via the member functions SetXTwist and SetYTwist.
19// End_Html
20//
6a1caa6b 21// Begin_Macro(source)
b4caed64 22// {
23// gROOT->SetStyle("Plain"); gStyle->SetPalette(1);
6a1caa6b 24// TCanvas *c2 = new TCanvas("cAliTPCExBTwist","cAliTPCExBTwist",500,300);
b4caed64 25// AliTPCExBTwist twist;
26// twist.SetXTwist(0.001); // x angle in [rad]
27// twist.SetXTwist(0.0005); // y angle in [rad]
28// twist.SetOmegaTauT1T2(0.32,1,1);
29// twist.CreateHistoDRPhiinXY(1.)->Draw("surf2"); // A side
30// return c2;
31// }
32// End_Macro
33//
34// Begin_Html
35// <p>
36// Date: 27/04/2010 <br>
37// Authors: Jim Thomas, Magnus Mager, Stefan Rossegger
69d03c4d 38// Support since 2010: mrain.ivanov@cern.ch
b4caed64 39// End_Html
40// _________________________________________________________________
0116859c 41
42#include "AliTPCCorrection.h"
43
44class AliTPCExBTwist : public AliTPCCorrection {
45public:
46 AliTPCExBTwist();
47 virtual ~AliTPCExBTwist();
69d03c4d 48 virtual Bool_t AddCorrectionCompact(AliTPCCorrection* corr, Double_t weight);
e527a1b9 49 // initialization and update functions
50 virtual void Init();
51 virtual void Update(const TTimeStamp &timeStamp);
52
53
0116859c 54 // common setters and getters for ExB
55 virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) {
b1f0a2a5 56 fT1=t1; fT2=t2;
57 const Float_t wt1=t1*omegaTau; fC1=wt1/(1.+wt1*wt1);
58 const Float_t wt2=t2*omegaTau; fC2=wt2*wt2/(1.+wt2*wt2);
0116859c 59 };
60 void SetC1C2(Float_t c1,Float_t c2) {fC1=c1;fC2=c2;} // CAUTION: USE WITH CARE
61 Float_t GetC1() const {return fC1;}
62 Float_t GetC2() const {return fC2;}
63
64 // setters and getters for twist
65 void SetXTwist(Float_t xTwist) {fXTwist=xTwist;}
66 void SetYTwist(Float_t yTwist) {fYTwist=yTwist;}
67 Float_t GetXTwist() const {return fXTwist;}
68 Float_t GetYTwist() const {return fYTwist;}
69
b1f0a2a5 70 virtual void Print(const Option_t* option="") const;
0116859c 71
72protected:
73 virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
74
75private:
76 Float_t fC1; // coefficient C1 (compare Jim Thomas's notes for definitions)
77 Float_t fC2; // coefficient C2 (compare Jim Thomas's notes for definitions)
78
79 Float_t fXTwist; // Twist of E to B field in X-Z [rad]
80 Float_t fYTwist; // Twist of E to B field in Y-Z [rad]
81
82 ClassDef(AliTPCExBTwist,1);
83};
84
85#endif