PandaRoot
KFVertex.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //---------------------------------------------------------------------------------
14 // The KFVertex class
15 // .
16 // @author S.Gorbunov, I.Kisel
17 // @version 1.0
18 // @since 13.05.07
19 //
20 // Class to reconstruct and store primary and secondary vertices.
21 // The method is described in CBM-SOFT note 2007-003,
22 // ``Reconstruction of decayed particles based on the Kalman filter'',
23 // http://www.gsi.de/documents/DOC-2007-May-14-1.pdf
24 //
25 // This class is ALICE interface to general mathematics in KFParticleBase
26 //
27 // -= Copyright &copy ALICE HLT Group =-
28 //_________________________________________________________________________________
29 
30 #ifndef KFVERTEX_H
31 #define KFVERTEX_H
32 
33 #include "KFParticle.h"
34 #include "KFPVertex.h"
35 
36 class KFVertex : public KFParticle {
37 
38  public:
39  //*
40  //* INITIALIZATION
41  //*
42 
43  //* Constructor (empty)
44 
46 
47  //* Destructor (empty)
48 
49  ~KFVertex() {}
50 
51  //* Initialisation from VVertex
52 
53  KFVertex(const KFPVertex &vertex);
54 
55  //*
56  //* ACCESSORS
57  //*
58 
59  //* Number of tracks composing the vertex
60 
61  Int_t GetNContributors() const { return fIsConstrained ? fNDF / 2 : (fNDF + 3) / 2; }
62 
63  //*
64  //* CONSTRUCTION OF THE VERTEX BY ITS DAUGHTERS
65  //* USING THE KALMAN FILTER METHOD
66  //*
67 
68  //* Simple way to construct vertices ex. D0 = Pion + Kaon;
69 
70  void operator+=(const KFParticle &Daughter);
71 
72  //* Subtract particle from vertex
73 
74  KFVertex operator-(const KFParticle &Daughter) const;
75 
76  void operator-=(const KFParticle &Daughter);
77 
78  //* Set beam constraint to the primary vertex
79 
80  void SetBeamConstraint(float X, float Y, float Z, float ErrX, float ErrY, float ErrZ);
81 
82  //* Set beam constraint off
83 
84  void SetBeamConstraintOff();
85 
86  //* Construct vertex with selection of tracks (primary vertex)
87 
88  void ConstructPrimaryVertex(const KFParticle *vDaughters[], int NDaughters, Bool_t vtxFlag[], float ChiCut = 3.5);
89 
90  protected:
91  Bool_t fIsConstrained; // Is the beam constraint set
92 };
93 
94 //---------------------------------------------------------------------
95 //
96 // Inline implementation of the KFVertex methods
97 //
98 //---------------------------------------------------------------------
99 
100 inline void KFVertex::operator+=(const KFParticle &Daughter)
101 {
102  KFParticle::operator+=(Daughter);
103 }
104 
105 inline void KFVertex::operator-=(const KFParticle &Daughter)
106 {
107  Daughter.SubtractFromVertex(*this);
108 }
109 
110 inline KFVertex KFVertex::operator-(const KFParticle &Daughter) const
111 {
112  KFVertex tmp = *this;
113  Daughter.SubtractFromVertex(tmp);
114  return tmp;
115 }
116 
117 #endif
const Double_t & Z() const
Definition: KFParticle.h:137
const Double_t & X() const
Definition: KFParticle.h:135
Int_t GetNContributors() const
Definition: KFVertex.h:61
const Double_t & Y() const
Definition: KFParticle.h:136
void operator+=(const KFParticle &Daughter)
Definition: KFVertex.h:100
void SetBeamConstraint(float X, float Y, float Z, float ErrX, float ErrY, float ErrZ)
void SubtractFromVertex(KFParticle &v) const
Definition: KFParticle.h:973
void ConstructPrimaryVertex(const KFParticle *vDaughters[], int NDaughters, Bool_t vtxFlag[], float ChiCut=3.5)
int NDaughters() const
Bool_t fIsConstrained
Definition: KFVertex.h:91
void operator-=(const KFParticle &Daughter)
Definition: KFVertex.h:105
KFVertex operator-(const KFParticle &Daughter) const
Definition: KFVertex.h:110
void operator+=(const KFParticle &Daughter)
Definition: KFParticle.h:856
void SetBeamConstraintOff()
KFVertex()
Definition: KFVertex.h:45
~KFVertex()
Definition: KFVertex.h:49