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 "AliESDVertex.h"
25 class AliKFVertex :public AliKFParticle
34 //* Constructor (empty)
36 AliKFVertex():AliKFParticle(){}
38 //* Destructor (empty)
42 //* Initialisation from ESD vertex
44 AliKFVertex( const AliESDVertex &vertex );
46 //* Copy vertex part to ESD vertex
48 void CopyToESDVertex( AliESDVertex &Vtx ) const ;
54 //* Number of tracks composing the vertex
56 Int_t GetNContributors() const { return (fNDF+3)/2; }
59 //* CONSTRUCTION OF THE VERTEX BY ITS DAUGHTERS
60 //* USING THE KALMAN FILTER METHOD
64 //* Simple way to construct vertices ex. D0 = Pion + Kaon;
66 void operator +=( const AliKFParticle &Daughter );
68 //* Subtract particle from vertex
70 AliKFVertex operator -( const AliKFParticle &Daughter ) const;
72 void operator -=( const AliKFParticle &Daughter );
74 //* Construct vertex with selection of tracks (primary vertex)
76 void ConstructPrimaryVertex( const AliKFParticle *vDaughters[], int NDaughters,
77 Bool_t vtxFlag[], Double_t ChiCut=3.5 );
79 ClassDef( AliKFVertex, 1 );
85 //---------------------------------------------------------------------
87 // Inline implementation of the AliKFVertex methods
89 //---------------------------------------------------------------------
91 inline void AliKFVertex::CopyToESDVertex( AliESDVertex &v ) const
93 AliKFVertex vTmp=*this;
94 v = AliESDVertex( vTmp.fP, vTmp.fC, vTmp.fChi2, (vTmp.fNDF +3)/2 );
97 inline void AliKFVertex::operator +=( const AliKFParticle &Daughter )
99 AliKFParticle::operator +=( Daughter );
103 inline void AliKFVertex::operator -=( const AliKFParticle &Daughter )
105 Daughter.SubtractFromVertex( *this );
108 inline AliKFVertex AliKFVertex::operator -( const AliKFParticle &Daughter ) const
110 AliKFVertex tmp = *this;
111 Daughter.SubtractFromVertex( tmp );