Corrected protection.
[u/mrichter/AliRoot.git] / STEER / AliTrackerBase.h
CommitLineData
4811a3f4 1#ifndef ALITRACKERBASE_H
2#define ALITRACKERBASE_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliTrackerBase.h 38069 2009-12-24 16:56:18Z belikov $ */
7
8//-------------------------------------------------------------------------
9// class AliTrackerBase
10// This is the base tracker class, independent on STEER
075f4221 11// Origin: Marian.Ivanov@cern.ch
4811a3f4 12//-------------------------------------------------------------------------
13
14#include <TObject.h>
15#include <TGeoGlobalMagField.h>
16
17#include "AliMagF.h"
18
19class AliExternalTrackParam;
075f4221 20class AliTrackPoint;
21class AliTrackPointArray;
4811a3f4 22
23class AliTrackerBase : public TObject {
24public:
25 AliTrackerBase();
26 virtual ~AliTrackerBase(){}
27
28 void SetVertex(const Double_t *xyz, const Double_t *ers=0) {
29 fX=xyz[0]; fY=xyz[1]; fZ=xyz[2];
30 if (ers) { fSigmaX=ers[0]; fSigmaY=ers[1]; fSigmaZ=ers[2]; }
31 }
32 Double_t GetX() const {return fX;}
33 Double_t GetY() const {return fY;}
34 Double_t GetZ() const {return fZ;}
35 Double_t GetSigmaX() const {return fSigmaX;}
36 Double_t GetSigmaY() const {return fSigmaY;}
37 Double_t GetSigmaZ() const {return fSigmaZ;}
38
39 static Double_t GetTrackPredictedChi2(AliExternalTrackParam *track,
40 Double_t mass, Double_t step,
41 const AliExternalTrackParam *backup);
363db7c3 42 static void UpdateTrack(AliExternalTrackParam&,
43 const AliExternalTrackParam&);
4811a3f4 44 static
45 Double_t MeanMaterialBudget(const Double_t *start, const Double_t *end,
46 Double_t *mparam);
47 static
48 Bool_t PropagateTrackTo(AliExternalTrackParam *track, Double_t x, Double_t m,
49 Double_t maxStep, Bool_t rotateTo=kTRUE, Double_t maxSnp=0.8, Double_t sign=1.);
50 static Bool_t PropagateTrackToBxByBz(AliExternalTrackParam *track, Double_t x,
51 Double_t m,
52 Double_t maxStep, Bool_t rotateTo=kTRUE, Double_t maxSnp=0.8,Double_t sign=1.);
53 //
54 static Double_t GetBz(const Double_t *r);
55 static void GetBxByBz(const Double_t r[3], Double_t b[3]);
56 static Double_t GetBz();
075f4221 57 static Bool_t UniformField();
58
59
60 static Double_t MakeC(Double_t x1,Double_t y1,
61 Double_t x2,Double_t y2,
62 Double_t x3,Double_t y3);
63 static Double_t MakeSnp(Double_t x1,Double_t y1,
64 Double_t x2,Double_t y2,
65 Double_t x3,Double_t y3);
66 static Double_t MakeTgl(Double_t x1,Double_t y1,
67 Double_t x2,Double_t y2,
68 Double_t z1,Double_t z2);
69 static Double_t MakeTgl(Double_t x1,Double_t y1,
70 Double_t x2,Double_t y2,
71 Double_t z1,Double_t z2,Double_t c);
72 static AliExternalTrackParam *MakeSeed(AliTrackPoint &point0,
73 AliTrackPoint &point1,
74 AliTrackPoint &point2);
75 static Double_t FitTrack(AliExternalTrackParam *trackParam,
76 AliTrackPointArray *pointArray,
77 Double_t mass, Double_t maxStep);
4811a3f4 78 //
79
80protected:
81 AliTrackerBase(const AliTrackerBase &atr);
82private:
83 AliTrackerBase & operator=(const AliTrackerBase & atr);
84
85 Double_t fX; //X-coordinate of the primary vertex
86 Double_t fY; //Y-coordinate of the primary vertex
87 Double_t fZ; //Z-coordinate of the primary vertex
88
89 Double_t fSigmaX; // error of the primary vertex position in X
90 Double_t fSigmaY; // error of the primary vertex position in Y
91 Double_t fSigmaZ; // error of the primary vertex position in Z
92
93 ClassDef(AliTrackerBase,1) //base tracker
94};
95
96//__________________________________________________________________________
97inline Bool_t AliTrackerBase::UniformField()
98{
99 AliMagF* fld = (AliMagF*)TGeoGlobalMagField::Instance()->GetField();
100 return fld ? fld->IsUniform():kTRUE;
101}
102
103#endif