]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliKFVertex.cxx
Faster AliDebug. The debug message is evaluated after the check for the debug level...
[u/mrichter/AliRoot.git] / STEER / AliKFVertex.cxx
CommitLineData
f826d409 1//----------------------------------------------------------------------------
2// Implementation of 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 AliKFParticleCore
14//
15// -= Copyright &copy ALICE HLT Group =-
16//____________________________________________________________________________
17
18
19#include "AliKFVertex.h"
20
21
22ClassImp(AliKFVertex)
23
24
25AliKFVertex::AliKFVertex( const AliESDVertex &vertex )
26{
27 // Constructor from ALICE ESD vertex
28
29 vertex.GetXYZ( fP );
30 vertex.GetCovMatrix( fC );
31 fChi2 = vertex.GetChi2();
32 fNDF = 2*vertex.GetNContributors() - 3;
33 fQ = 0;
34 fAtProductionVertex = 0;
35 fIsLinearized = 0;
36 fSFromDecay = 0;
37}
38
39void AliKFVertex::ConstructPrimaryVertex( const AliKFParticle *vDaughters[],
40 int NDaughters, Double_t ChiCut )
41{
42 //* Primary vertex finder with simple rejection of outliers
43
44 if( NDaughters<2 ) return;
45 Construct( &(vDaughters[0]), NDaughters );
46
47 Int_t nt=NDaughters;
48 for( Int_t it=0; it<NDaughters; it++){
49 if( nt<3) return;
50 const AliKFParticle &p = *(vDaughters[it]);
51 AliKFVertex tmp = *this - p;
52 Double_t d = p.GetDeviationFromVertex( tmp );
53 if( d>ChiCut ){
54 *this = tmp;
55 nt--;
56 }
57 }
58}