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