1 //---------------------------------------------------------------------------------
2 // The AliKFVertex class
4 // @author S.Gorbunov, I.Kisel
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
13 // This class is ALICE interface to general mathematics in AliKFParticleBase
15 // -= Copyright © ALICE HLT Group =-
16 //_________________________________________________________________________________
21 #include "AliKFParticle.h"
22 #include "AliVVertex.h"
23 #include "AliESDVertex.h"
25 class AliKFVertex : public AliKFParticle
34 //* Constructor (empty)
36 AliKFVertex():AliKFParticle(),fIsConstrained(0){ }
38 //* Destructor (empty)
42 //* Initialisation from VVertex
44 AliKFVertex( const AliVVertex &vertex );
46 //* Copy vertex part to ESD vertex
48 void CopyToESDVertex( AliESDVertex &Vtx ) const ;
55 //* Number of tracks composing the vertex
57 Int_t GetNContributors() const { return (fNDF+3)/2; }
60 //* CONSTRUCTION OF THE VERTEX BY ITS DAUGHTERS
61 //* USING THE KALMAN FILTER METHOD
65 //* Simple way to construct vertices ex. D0 = Pion + Kaon;
67 void operator +=( const AliKFParticle &Daughter );
69 //* Subtract particle from vertex
71 AliKFVertex operator -( const AliKFParticle &Daughter ) const;
73 void operator -=( const AliKFParticle &Daughter );
75 //* Set beam constraint to the primary vertex
77 void SetBeamConstraint( Double_t X, Double_t Y, Double_t Z,
78 Double_t ErrX, Double_t ErrY, Double_t ErrZ );
80 //* Set beam constraint off
82 void SetBeamConstraintOff();
84 //* Construct vertex with selection of tracks (primary vertex)
86 void ConstructPrimaryVertex( const AliKFParticle *vDaughters[], int NDaughters,
87 Bool_t vtxFlag[], Double_t ChiCut=3.5 );
91 Bool_t fIsConstrained; // Is the beam constraint set
93 ClassDef( AliKFVertex, 1 );
98 //---------------------------------------------------------------------
100 // Inline implementation of the AliKFVertex methods
102 //---------------------------------------------------------------------
105 inline void AliKFVertex::CopyToESDVertex( AliESDVertex &v ) const
107 AliKFVertex vTmp=*this;
108 v = AliESDVertex( vTmp.fP, vTmp.fC, vTmp.fChi2, (vTmp.fNDF +3)/2 );
111 inline void AliKFVertex::operator +=( const AliKFParticle &Daughter )
113 AliKFParticle::operator +=( Daughter );
117 inline void AliKFVertex::operator -=( const AliKFParticle &Daughter )
119 Daughter.SubtractFromVertex( *this );
122 inline AliKFVertex AliKFVertex::operator -( const AliKFParticle &Daughter ) const
124 AliKFVertex tmp = *this;
125 Daughter.SubtractFromVertex( tmp );