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