]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliExternalTrackParam.h
Cell numbering fixed for V0A
[u/mrichter/AliRoot.git] / STEER / AliExternalTrackParam.h
CommitLineData
51ad6848 1#ifndef ALIEXTERNALTRACKPARAM_H
2#define ALIEXTERNALTRACKPARAM_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
49d13e89 8/*****************************************************************************
9 * "External" track parametrisation class *
10 * *
11 * external param0: local Y-coordinate of a track (cm) *
12 * external param1: local Z-coordinate of a track (cm) *
13 * external param2: local sine of the track momentum azimuthal angle *
14 * external param3: tangent of the track momentum dip angle *
15 * external param4: 1/pt (1/(GeV/c)) *
16 * *
17 * The parameters are estimated at an exact position x in a local coord. *
18 * system rotated by angle alpha with respect to the global coord.system. *
19 * Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch *
20 *****************************************************************************/
a5e407e9 21#include "TObject.h"
a5e407e9 22
49d13e89 23const Double_t kAlmost1=0.999;
24const Double_t kAlmost0=1e-33;
25const Double_t kVeryBig=1./kAlmost0;
26
5773defd 27const Double_t kB2C=0.299792458e-3;
28const Double_t kAlmost0Field=1.e-13;
29const Double_t kVeryBigConvConst=1/kB2C/kAlmost0Field;
30const Double_t kMostProbableMomentum=0.35;
31
51ad6848 32class AliKalmanTrack;
f76701bf 33class AliESDVertex;
51ad6848 34
a5e407e9 35class AliExternalTrackParam: public TObject {
51ad6848 36 public:
37 AliExternalTrackParam();
38 AliExternalTrackParam(Double_t x, Double_t alpha,
39 const Double_t param[5], const Double_t covar[15]);
40 AliExternalTrackParam(const AliKalmanTrack& track);
1530f89c 41 virtual ~AliExternalTrackParam(){}
ac3eaff4 42
c9ec41e8 43 void Reset();
44 void Set(const AliKalmanTrack& track);
45
49d13e89 46 const Double_t *GetParameter() const {return fP;}
47 const Double_t *GetCovariance() const {return fC;}
c7bafca9 48 Double_t GetSigmaY2() const {return fC[0];}
49 Double_t GetSigmaZ2() const {return fC[2];}
50 Double_t GetX() const {return fX;}
2d57349e 51 Double_t GetY() const {return fP[0];}
52 Double_t GetZ() const {return fP[1];}
c7bafca9 53 Double_t GetAlpha() const {return fAlpha;}
c9ec41e8 54 Double_t GetSign() const {return (fP[4]>0) ? 1 : -1;}
55 Double_t GetP() const;
1d99986f 56 Double_t Get1P() const;
1530f89c 57 Double_t GetC(Double_t b) const {return fP[4]*b*kB2C;}
58 void GetDZ(Double_t x,Double_t y,Double_t z,Double_t b,Float_t dz[2]) const;
c7bafca9 59 Double_t GetD(Double_t xv, Double_t yv, Double_t b) const;
49d13e89 60 Double_t GetLinearD(Double_t xv, Double_t yv) const;
c7bafca9 61 Bool_t CorrectForMaterial(Double_t d, Double_t x0, Double_t mass);
49d13e89 62 Double_t GetPredictedChi2(Double_t p[2],Double_t cov[3]) const;
63 Bool_t Update(Double_t p[2],Double_t cov[3]);
64 Bool_t Rotate(Double_t alpha);
65 Bool_t PropagateTo(Double_t x, Double_t b);
66 Bool_t Propagate(Double_t alpha, Double_t x, Double_t b) {
67 if (Rotate(alpha))
68 if (PropagateTo(x,b)) return kTRUE;
69 return kFALSE;
70 }
71
c7bafca9 72 void GetHelixParameters(Double_t h[6], Double_t b) const;
73 Double_t GetDCA(const AliExternalTrackParam *p, Double_t b,
74 Double_t &xthis,Double_t &xp) const;
75 Double_t PropagateToDCA(AliExternalTrackParam *p, Double_t b);
f76701bf 76 Bool_t PropagateToDCA(const AliESDVertex *vtx, Double_t b, Double_t maxd);
c7bafca9 77
c9ec41e8 78 Bool_t GetPxPyPz(Double_t *p) const;
79 Bool_t GetXYZ(Double_t *p) const;
80 Bool_t GetCovarianceXYZPxPyPz(Double_t cv[21]) const;
81 Bool_t GetPxPyPzAt(Double_t x, Double_t b, Double_t p[3]) const;
82 Bool_t GetXYZAt(Double_t x, Double_t b, Double_t r[3]) const;
7cf7bb6c 83 Bool_t GetYAt(Double_t x, Double_t b, Double_t &y) const;
c9ec41e8 84 void Print(Option_t* option = "") const;
5b77d93c 85 // MI
c194ba83 86 virtual Bool_t PropagateTo(Double_t x, Double_t b, Double_t mass, Double_t maxStep, Bool_t rotateTo=kTRUE, Double_t maxSnp=0.8);
87 Double_t GetSnpAt(Double_t x,Double_t b) const;
c9ec41e8 88private:
49d13e89 89 Double_t fX; // X coordinate for the point of parametrisation
90 Double_t fAlpha; // Local <-->global coor.system rotation angle
91 Double_t fP[5]; // The track parameters
92 Double_t fC[15]; // The track parameter covariance matrix
c9ec41e8 93
94 ClassDef(AliExternalTrackParam, 4)
51ad6848 95};
96
97#endif