Coverity 16571
[u/mrichter/AliRoot.git] / STEER / AliKFVertex.h
CommitLineData
f826d409 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"
706952f5 22#include "AliVVertex.h"
f826d409 23
706952f5 24class AliKFVertex : public AliKFParticle
f826d409 25{
26
27 public:
28
29 //*
30 //* INITIALIZATION
31 //*
32
33 //* Constructor (empty)
34
706952f5 35 AliKFVertex():AliKFParticle(),fIsConstrained(0){ }
f826d409 36
37 //* Destructor (empty)
38
39 ~AliKFVertex(){}
40
706952f5 41 //* Initialisation from VVertex
f826d409 42
706952f5 43 AliKFVertex( const AliVVertex &vertex );
f826d409 44
706952f5 45
90de4d9b 46 //*
47 //* ACCESSORS
48 //*
49
50 //* Number of tracks composing the vertex
51
de0d0ceb 52 Int_t GetNContributors() const { return fIsConstrained ?fNDF/2:(fNDF+3)/2; }
f826d409 53
54 //*
55 //* CONSTRUCTION OF THE VERTEX BY ITS DAUGHTERS
56 //* USING THE KALMAN FILTER METHOD
57 //*
58
59
4bbc290d 60 //* Simple way to construct vertices ex. D0 = Pion + Kaon;
61
62 void operator +=( const AliKFParticle &Daughter );
f826d409 63
64 //* Subtract particle from vertex
65
66 AliKFVertex operator -( const AliKFParticle &Daughter ) const;
67
68 void operator -=( const AliKFParticle &Daughter );
69
706952f5 70 //* Set beam constraint to the primary vertex
71
72 void SetBeamConstraint( Double_t X, Double_t Y, Double_t Z,
73 Double_t ErrX, Double_t ErrY, Double_t ErrZ );
74
75 //* Set beam constraint off
76
77 void SetBeamConstraintOff();
78
f826d409 79 //* Construct vertex with selection of tracks (primary vertex)
80
4bbc290d 81 void ConstructPrimaryVertex( const AliKFParticle *vDaughters[], int NDaughters,
82 Bool_t vtxFlag[], Double_t ChiCut=3.5 );
3e90f604 83
706952f5 84 protected:
85
86 Bool_t fIsConstrained; // Is the beam constraint set
87
f826d409 88 ClassDef( AliKFVertex, 1 );
89
90};
91
92
f826d409 93//---------------------------------------------------------------------
94//
95// Inline implementation of the AliKFVertex methods
96//
97//---------------------------------------------------------------------
98
706952f5 99
4bbc290d 100inline void AliKFVertex::operator +=( const AliKFParticle &Daughter )
101{
102 AliKFParticle::operator +=( Daughter );
103}
104
f826d409 105
106inline void AliKFVertex::operator -=( const AliKFParticle &Daughter )
107{
108 Daughter.SubtractFromVertex( *this );
109}
110
111inline AliKFVertex AliKFVertex::operator -( const AliKFParticle &Daughter ) const
112{
113 AliKFVertex tmp = *this;
114 Daughter.SubtractFromVertex( tmp );
115 return tmp;
116}
117
118
119#endif