PandaRoot
AliKFVertex.h
Go to the documentation of this file.
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 "KFPVertex.h"
23 
24 class AliKFVertex : public AliKFParticle {
25 
26  public:
27  //*
28  //* INITIALIZATION
29  //*
30 
31  //* Constructor (empty)
32 
33  AliKFVertex() : AliKFParticle(), fIsConstrained(0) {}
34 
35  //* Destructor (empty)
36 
38 
39  //* Initialisation from VVertex
40 
41  AliKFVertex(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 AliKFParticle &Daughter);
59 
60  //* Subtract particle from vertex
61 
62  AliKFVertex operator-(const AliKFParticle &Daughter) const;
63 
64  void operator-=(const AliKFParticle &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 AliKFParticle *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 AliKFVertex methods
85 //
86 //---------------------------------------------------------------------
87 
88 inline void AliKFVertex::operator+=(const AliKFParticle &Daughter)
89 {
90  AliKFParticle::operator+=(Daughter);
91 }
92 
93 inline void AliKFVertex::operator-=(const AliKFParticle &Daughter)
94 {
95  Daughter.SubtractFromVertex(*this);
96 }
97 
98 inline AliKFVertex AliKFVertex::operator-(const AliKFParticle &Daughter) const
99 {
100  AliKFVertex tmp = *this;
101  Daughter.SubtractFromVertex(tmp);
102  return tmp;
103 }
104 
105 #endif
void ConstructPrimaryVertex(const AliKFParticle *vDaughters[], int NDaughters, Bool_t vtxFlag[], float ChiCut=3.5)
void SetBeamConstraint(float X, float Y, float Z, float ErrX, float ErrY, float ErrZ)
friend void operator+=(F32vec1 &a, const F32vec1 &b)
void operator+=(const AliKFParticle &Daughter)
Definition: AliKFVertex.h:88
void SetBeamConstraintOff()
AliKFVertex operator-(const AliKFParticle &Daughter) const
Definition: AliKFVertex.h:98
Int_t GetNContributors() const
Definition: AliKFVertex.h:49
Bool_t fIsConstrained
Definition: AliKFVertex.h:79
void operator-=(const AliKFParticle &Daughter)
Definition: AliKFVertex.h:93