1 //----------------------------------------------------------------------------
2 // Implementation of 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 AliKFParticleCore
15 // -= Copyright © ALICE HLT Group =-
16 //____________________________________________________________________________
19 #include "AliKFVertex.h"
25 AliKFVertex::AliKFVertex( const AliESDVertex &vertex )
27 // Constructor from ALICE ESD vertex
30 vertex.GetCovMatrix( fC );
31 fChi2 = vertex.GetChi2();
32 fNDF = 2*vertex.GetNContributors() - 3;
34 fAtProductionVertex = 0;
40 void AliKFVertex::ConstructPrimaryVertex( const AliKFParticle *vDaughters[],
41 int NDaughters, Bool_t vtxFlag[],
44 //* Primary vertex finder with simple rejection of outliers
45 if( NDaughters<2 ) return;
46 Construct( vDaughters, NDaughters );
47 for( int i=0; i<NDaughters; i++ ) vtxFlag[i] = 1;
49 Int_t nRest = NDaughters;
52 Double_t worstChi = 0.;
53 Int_t worstDaughter = 0;
54 for( Int_t it=0; it<NDaughters; it++ ){
55 if( !vtxFlag[it] ) continue;
56 const AliKFParticle &p = *(vDaughters[it]);
57 AliKFVertex tmp = *this - p;
58 Double_t chi = p.GetDeviationFromVertex( tmp );
64 if( worstChi < ChiCut ) break;
66 vtxFlag[worstDaughter] = 0;
67 *this -= *(vDaughters[worstDaughter]);
71 if( nRest<=2 && GetChi2()>ChiCut*ChiCut*GetNDF() ){
72 for( int i=0; i<NDaughters; i++ ) vtxFlag[i] = 0;