PandaRoot
KFVertex.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------
2 // The KFVertex 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 KFParticleBase
14 //
15 // -= Copyright &copy ALICE HLT Group =-
16 //_________________________________________________________________________________
17 
18 #ifndef KFVERTEX_H
19 #define KFVERTEX_H
20 
21 #include "KFParticle.h"
22 #include "KFPVertex.h"
23 
24 class KFVertex : public KFParticle {
25 
26  public:
27  //*
28  //* INITIALIZATION
29  //*
30 
31  //* Constructor (empty)
32 
34 
35  //* Destructor (empty)
36 
37  ~KFVertex() {}
38 
39  //* Initialisation from VVertex
40 
41  KFVertex(const KFPVertex &vertex);
42 
43  //*
44  //* ACCESSORS
45  //*
46 
47  //* Number of tracks composing the vertex
48 
49  Int_t GetNContributors() const { return fIsConstrained ? fNDF / 2 : (fNDF + 3) / 2; }
50 
51  //*
52  //* CONSTRUCTION OF THE VERTEX BY ITS DAUGHTERS
53  //* USING THE KALMAN FILTER METHOD
54  //*
55 
56  //* Simple way to construct vertices ex. D0 = Pion + Kaon;
57 
58  void operator+=(const KFParticle &Daughter);
59 
60  //* Subtract particle from vertex
61 
62  KFVertex operator-(const KFParticle &Daughter) const;
63 
64  void operator-=(const KFParticle &Daughter);
65 
66  //* Set beam constraint to the primary vertex
67 
68  void SetBeamConstraint(float X, float Y, float Z, float ErrX, float ErrY, float ErrZ);
69 
70  //* Set beam constraint off
71 
72  void SetBeamConstraintOff();
73 
74  //* Construct vertex with selection of tracks (primary vertex)
75 
76  void ConstructPrimaryVertex(const KFParticle *vDaughters[], int NDaughters, Bool_t vtxFlag[], float ChiCut = 3.5);
77 
78  protected:
79  Bool_t fIsConstrained; // Is the beam constraint set
80 };
81 
82 //---------------------------------------------------------------------
83 //
84 // Inline implementation of the KFVertex methods
85 //
86 //---------------------------------------------------------------------
87 
88 inline void KFVertex::operator+=(const KFParticle &Daughter)
89 {
90  KFParticle::operator+=(Daughter);
91 }
92 
93 inline void KFVertex::operator-=(const KFParticle &Daughter)
94 {
95  Daughter.SubtractFromVertex(*this);
96 }
97 
98 inline KFVertex KFVertex::operator-(const KFParticle &Daughter) const
99 {
100  KFVertex tmp = *this;
101  Daughter.SubtractFromVertex(tmp);
102  return tmp;
103 }
104 
105 #endif
const Double_t & Z() const
Definition: KFParticle.h:125
const Double_t & X() const
Definition: KFParticle.h:123
Int_t GetNContributors() const
Definition: KFVertex.h:49
const Double_t & Y() const
Definition: KFParticle.h:124
void operator+=(const KFParticle &Daughter)
Definition: KFVertex.h:88
void SetBeamConstraint(float X, float Y, float Z, float ErrX, float ErrY, float ErrZ)
void SubtractFromVertex(KFParticle &v) const
Definition: KFParticle.h:961
void ConstructPrimaryVertex(const KFParticle *vDaughters[], int NDaughters, Bool_t vtxFlag[], float ChiCut=3.5)
int NDaughters() const
Bool_t fIsConstrained
Definition: KFVertex.h:79
void operator-=(const KFParticle &Daughter)
Definition: KFVertex.h:93
KFVertex operator-(const KFParticle &Daughter) const
Definition: KFVertex.h:98
void operator+=(const KFParticle &Daughter)
Definition: KFParticle.h:844
void SetBeamConstraintOff()
KFVertex()
Definition: KFVertex.h:33
~KFVertex()
Definition: KFVertex.h:37