AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliTPCEfield.h
Go to the documentation of this file.
1 #ifndef ALITPCEFIELD_H
2 #define ALITPCEFIELD_H
3 
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
6 
9 
10 #include "TNamed.h"
11 #include "TMatrixD.h"
12 #include "TVectorD.h"
13 #include "TNamed.h"
14 class TTreeSRedirector;
15 
16 class AliTPCEfield:public TNamed {
17 public:
18  AliTPCEfield();
19  AliTPCEfield(const char * name, Int_t maxFreq, Bool_t is2D, Bool_t useLinear=kTRUE);
20  virtual ~AliTPCEfield();
21  void SetRange(Double_t x0, Double_t x1, Double_t y0, Double_t y1, Double_t z00,Double_t z1=0);
22  void AddBoundaryLine(Double_t x0,Double_t y0, Double_t z0, Double_t v0, Double_t x1, Double_t y1, Double_t z1, Double_t v1, Int_t id=0, Int_t npoints=100);
23  TTree * GetTree(const char * tname="Boundary");
25 
26  void MakeFitFunctions(Int_t maxFreq);
27  void FitField();
28  void DumpField(Double_t gridSize=5, Double_t step=0.5);
29  //
30  Double_t EvalField(Int_t ifun, Double_t x, Double_t y, Double_t z, Int_t type=0);
31  Double_t Eval(Double_t x, Double_t y, Double_t z, Int_t type=0);
32  //
33  static Double_t EvalS(Double_t x, Double_t y, Double_t z, Int_t type=0);
34  //
35 
36  Double_t Field(Int_t ftype, Double_t ifx, Double_t ify, Double_t ifz, Double_t x, Double_t y, Double_t z);
37  Double_t FieldDn(Int_t ftype, Double_t ifx, Double_t ify, Double_t ifz, Int_t dn, Double_t x, Double_t y, Double_t z);
38  TMatrixD* MakeCorrelation(TMatrixD &matrix);
39 
40  // get rid of numerical instabilities
41  Double_t SinHNorm(Double_t x, Double_t norm){ return 0.5*(TMath::Exp(x-norm)-TMath::Exp(-x-norm));}
42  Double_t CosHNorm(Double_t x, Double_t norm){ return 0.5*(TMath::Exp(x-norm)+TMath::Exp(-x-norm));}
43  public:
44  Double_t fMin[3];
45  Double_t fMax[3];
46  Double_t fScale;
47  Int_t fMaxFreq;
48  Bool_t fIs2D;
49  Bool_t fUseLinear;
50  //
51  TTreeSRedirector * fWorkspace;
52  TMatrixD *fFitFunctions;
53  TVectorD *fFitParam;
54  TMatrixD *fFitCovar;
55  TLinearFitter *fFitter;
57  ClassDef(AliTPCEfield,1)
58 };
59 
60 #endif
void DumpField(Double_t gridSize=5, Double_t step=0.5)
Double_t EvalField(Int_t ifun, Double_t x, Double_t y, Double_t z, Int_t type=0)
Bool_t fIs2D
flag for 2D field
Definition: AliTPCEfield.h:48
Double_t fMax[3]
Definition: AliTPCEfield.h:45
Double_t fScale
scaling factor
Definition: AliTPCEfield.h:46
virtual ~AliTPCEfield()
static Double_t EvalS(Double_t x, Double_t y, Double_t z, Int_t type=0)
void AddBoundaryLine(Double_t x0, Double_t y0, Double_t z0, Double_t v0, Double_t x1, Double_t y1, Double_t z1, Double_t v1, Int_t id=0, Int_t npoints=100)
void SetRange(Double_t x0, Double_t x1, Double_t y0, Double_t y1, Double_t z00, Double_t z1=0)
Double_t fMin[3]
range of coordinates from Min to Max
Definition: AliTPCEfield.h:44
TMatrixD * fFitFunctions
fit function description
Definition: AliTPCEfield.h:52
Double_t FieldDn(Int_t ftype, Double_t ifx, Double_t ify, Double_t ifz, Int_t dn, Double_t x, Double_t y, Double_t z)
npoints
Definition: driftITSTPC.C:85
Double_t Field(Int_t ftype, Double_t ifx, Double_t ify, Double_t ifz, Double_t x, Double_t y, Double_t z)
TMatrixD * fFitCovar
fit covariance
Definition: AliTPCEfield.h:54
Double_t Eval(Double_t x, Double_t y, Double_t z, Int_t type=0)
Int_t fMaxFreq
maximal frequency of expansion
Definition: AliTPCEfield.h:47
Double_t CosHNorm(Double_t x, Double_t norm)
Definition: AliTPCEfield.h:42
TLinearFitter * fFitter
linear fitter - temporary solution - integrals to be calculated
Definition: AliTPCEfield.h:55
TMatrixD * MakeCorrelation(TMatrixD &matrix)
void MakeFitFunctions(Int_t maxFreq)
AliTPCcalibV0 v0
TTreeSRedirector * fWorkspace
! workspace
Definition: AliTPCEfield.h:51
TVectorD * fFitParam
fit parameters - coeficients
Definition: AliTPCEfield.h:53
TTree * GetTree(const char *tname="Boundary")
Double_t SinHNorm(Double_t x, Double_t norm)
Definition: AliTPCEfield.h:41
Calculation of the electric field.
Definition: AliTPCEfield.h:16
static AliTPCEfield * fgInstance
instance of fied - for visualization
Definition: AliTPCEfield.h:56
Bool_t fUseLinear
flag to use also linear term of the field
Definition: AliTPCEfield.h:49