more secure string operations
[u/mrichter/AliRoot.git] / TPC / AliTPCExBBShape.h
CommitLineData
b1f0a2a5 1#ifndef ALI_TPC_EX_BB_SHAPE_H
2#define ALI_TPC_EX_BB_SHAPE_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>AliExBBShape class </h2>
11// The class calculates the space point distortions due to the B field
12// shape imperfections using a second order technique based on integrals
13// over Bz (e.g. int By/Bz) obtained via the AliMagF class. The essential
14// input for this class is the magnetic field maps which can be set via the function SetBField.
15// <p>
16// The class allows "effective Omega Tau" corrections.
17// End_Html
18// Begin_Macro(source)
19// {
20// gROOT->SetStyle("Plain"); gStyle->SetPalette(1);
21// TCanvas *c2 = new TCanvas("c2","c2",500,300);
22// AliTPCExBBShape exb;
23// AliMagF mag("mag","mag"); // 0.5 Tesla (solenoid)
24// exb.SetBField(&mag); // use Bfield from AliMagF
25// exb.SetOmegaTauT1T2(-0.32,1.,1.); // values ideally from OCDB
26// exb.CreateHistoDRPhiinZR(0,100,100)->Draw("surf2");
27// return c2;
28// }
29// End_Macro
30// Begin_Html
31// <p>
32// Date: 27/04/2010 <br>
33// Authors: Magnus Mager, Jim Thomas, Stefan Rossegger
34// End_Html
35// _________________________________________________________________
0116859c 36
37#include "AliTPCCorrection.h"
38
39class AliMagF;
40
41class AliTPCExBBShape : public AliTPCCorrection {
42public:
43 AliTPCExBBShape();
44 virtual ~AliTPCExBBShape();
45
e527a1b9 46 // initialization and update functions
47 virtual void Init();
48 virtual void Update(const TTimeStamp &timeStamp);
49
0116859c 50 // common setters and getters for ExB
51 virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) {
534fd34a 52 fT1=t1; fT2=t2;
b1f0a2a5 53 const Float_t wt1=t1*omegaTau; fC1=wt1/(1.+wt1*wt1);
54 const Float_t wt2=t2*omegaTau; fC2=wt2*wt2/(1.+wt2*wt2);
0116859c 55 };
56 void SetC1C2(Float_t c1,Float_t c2) {fC1=c1;fC2=c2;} // CAUTION: USE WITH CARE
57 Float_t GetC1() const {return fC1;}
58 Float_t GetC2() const {return fC2;}
59
60 // setters and getters for the magentic field map
b1f0a2a5 61 void SetBField(const AliMagF *bField) {fBField=(AliMagF*)bField;}
0116859c 62 AliMagF* GetBField() const {return fBField;}
63
64 virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
65 void GetBxAndByOverBz(const Float_t x[],const Short_t roc,Float_t BxByOverBz[]);
66
67 virtual void Print(Option_t* option="") const;
68
69private:
70 Float_t fC1; // coefficient C1 (compare Jim Thomas's notes for definitions)
71 Float_t fC2; // coefficient C2 (compare Jim Thomas's notes for definitions)
72
b1f0a2a5 73 AliMagF *fBField; // pointer to magnetic field
0116859c 74
75 AliTPCExBBShape & operator =(const AliTPCExBBShape);
76 AliTPCExBBShape(const AliTPCExBBShape&); //dummy copy contructor
77
534fd34a 78 ClassDef(AliTPCExBBShape,2);
0116859c 79};
80
81#endif