]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCEfield.h
ATO-98 - forgotten commit - Getter for regstered correction - to enable change of...
[u/mrichter/AliRoot.git] / TPC / AliTPCEfield.h
CommitLineData
b1f0a2a5 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
7/* $Id: AliTPCEfield.h 35613 2009-10-16 03:24:40Z marian $ */
8
9
10#include "TNamed.h"
11#include "TMatrixD.h"
12#include "TVectorD.h"
13#include "TNamed.h"
14class TTreeSRedirector;
15
16class AliTPCEfield:public TNamed {
17public:
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");
24 //
25 void MakeFitFunctions(Int_t maxFreq);
26 void FitField();
27 void DumpField(Double_t gridSize=5, Double_t step=0.5);
28 //
29 Double_t EvalField(Int_t ifun, Double_t x, Double_t y, Double_t z, Int_t type=0);
30 Double_t Eval(Double_t x, Double_t y, Double_t z, Int_t type=0);
31 //
32 static Double_t EvalS(Double_t x, Double_t y, Double_t z, Int_t type=0);
33 //
34
35 Double_t Field(Int_t ftype, Double_t ifx, Double_t ify, Double_t ifz, Double_t x, Double_t y, Double_t z);
36 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);
37 TMatrixD* MakeCorrelation(TMatrixD &matrix);
38
39 // get rid of numerical instabilities
40 Double_t SinHNorm(Double_t x, Double_t norm){ return 0.5*(TMath::Exp(x-norm)-TMath::Exp(-x-norm));}
41 Double_t CosHNorm(Double_t x, Double_t norm){ return 0.5*(TMath::Exp(x-norm)+TMath::Exp(-x-norm));}
42 public:
43 Double_t fMin[3]; // range of coordinates from Min to Max
44 Double_t fMax[3]; //
45 Double_t fScale; // scaling factor
46 Int_t fMaxFreq; // maximal frequency of expansion
47 Bool_t fIs2D; // flag for 2D field
48 Bool_t fUseLinear; // flag to use also linear term of the field
49 //
50 TTreeSRedirector * fWorkspace; //! workspace
51 TMatrixD *fFitFunctions; // fit function description
52 TVectorD *fFitParam; // fit parameters - coeficients
53 TMatrixD *fFitCovar; // fit covariance
54 TLinearFitter *fFitter; // linear fitter - temporary solution - integrals to be calculated
55 static AliTPCEfield* fgInstance; // instance of fied - for visualization
56 ClassDef(AliTPCEfield,1)
57};
58
59#endif