]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliKFVertex.h
Swapped the names AliMagFCheb and AliMagWrapCheb. The former should be used
[u/mrichter/AliRoot.git] / STEER / AliKFVertex.h
1 //---------------------------------------------------------------------------------
2 // The AliKFVertex class
3 // .
4 // @author  S.Gorbunov, I.Kisel
5 // @version 1.0
6 // @since   13.05.07
7 // 
8 // Class to reconstruct and store primary and secondary vertices.
9 // The method is described in CBM-SOFT note 2007-003, 
10 // ``Reconstruction of decayed particles based on the Kalman filter'', 
11 // http://www.gsi.de/documents/DOC-2007-May-14-1.pdf
12 //
13 // This class is ALICE interface to general mathematics in AliKFParticleBase
14 // 
15 //  -= Copyright &copy ALICE HLT Group =-
16 //_________________________________________________________________________________
17
18 #ifndef ALIKFVERTEX_H
19 #define ALIKFVERTEX_H
20
21 #include "AliKFParticle.h"
22 #include "AliVVertex.h"
23 #include "AliESDVertex.h"
24
25 class AliKFVertex : public AliKFParticle
26 {
27   
28  public:
29
30   //*
31   //*  INITIALIZATION
32   //*
33
34   //* Constructor (empty)
35
36   AliKFVertex():AliKFParticle(),fIsConstrained(0){ } 
37
38   //* Destructor (empty)
39
40   ~AliKFVertex(){}
41
42   //* Initialisation from VVertex 
43
44   AliKFVertex( const AliVVertex &vertex );
45
46   //* Copy vertex part to ESD vertex 
47
48   void CopyToESDVertex( AliESDVertex &Vtx ) const ;
49
50
51   //*
52   //*  ACCESSORS
53   //*
54
55   //* Number of tracks composing the vertex
56
57   Int_t GetNContributors() const { return (fNDF+3)/2; }
58
59   //* 
60   //* CONSTRUCTION OF THE VERTEX BY ITS DAUGHTERS 
61   //* USING THE KALMAN FILTER METHOD
62   //*
63
64
65   //* Simple way to construct vertices ex. D0 = Pion + Kaon;   
66
67   void operator +=( const AliKFParticle &Daughter );  
68
69   //* Subtract particle from vertex
70
71   AliKFVertex operator -( const AliKFParticle &Daughter ) const;
72
73   void operator -=( const AliKFParticle &Daughter );  
74
75   //* Set beam constraint to the primary vertex
76
77   void SetBeamConstraint( Double_t X, Double_t Y, Double_t Z, 
78                           Double_t ErrX, Double_t ErrY, Double_t ErrZ );
79
80   //* Set beam constraint off
81
82   void SetBeamConstraintOff();
83
84   //* Construct vertex with selection of tracks (primary vertex)
85
86   void ConstructPrimaryVertex( const AliKFParticle *vDaughters[], int NDaughters,
87                                Bool_t vtxFlag[], Double_t ChiCut=3.5  );
88
89  protected:
90
91   Bool_t fIsConstrained; // Is the beam constraint set
92
93   ClassDef( AliKFVertex, 1 );
94
95 };
96
97
98 //---------------------------------------------------------------------
99 //
100 //     Inline implementation of the AliKFVertex methods
101 //
102 //---------------------------------------------------------------------
103
104
105 inline void AliKFVertex::CopyToESDVertex( AliESDVertex &v ) const 
106 {
107   AliKFVertex vTmp=*this;
108   v = AliESDVertex( vTmp.fP, vTmp.fC, vTmp.fChi2, (vTmp.fNDF +3)/2 );
109 }
110
111 inline void AliKFVertex::operator +=( const AliKFParticle &Daughter )
112 {
113   AliKFParticle::operator +=( Daughter );
114 }
115   
116
117 inline void AliKFVertex::operator -=( const AliKFParticle &Daughter )
118 {
119   Daughter.SubtractFromVertex( *this );
120 }
121   
122 inline AliKFVertex AliKFVertex::operator -( const AliKFParticle &Daughter ) const 
123 {
124   AliKFVertex tmp = *this;
125   Daughter.SubtractFromVertex( tmp );
126   return tmp;
127 }
128
129
130 #endif