PandaRoot
AliKFVertex.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 AliKFVertex 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 AliKFParticleBase
26 //
27 // -= Copyright &copy ALICE HLT Group =-
28 //_________________________________________________________________________________
29 
30 #ifndef ALIKFVERTEX_H
31 #define ALIKFVERTEX_H
32 
33 #include "AliKFParticle.h"
34 #include "KFPVertex.h"
35 
36 class AliKFVertex : public AliKFParticle {
37 
38  public:
39  //*
40  //* INITIALIZATION
41  //*
42 
43  //* Constructor (empty)
44 
45  AliKFVertex() : AliKFParticle(), fIsConstrained(0) {}
46 
47  //* Destructor (empty)
48 
50 
51  //* Initialisation from VVertex
52 
53  AliKFVertex(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 AliKFParticle &Daughter);
71 
72  //* Subtract particle from vertex
73 
74  AliKFVertex operator-(const AliKFParticle &Daughter) const;
75 
76  void operator-=(const AliKFParticle &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 AliKFParticle *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 AliKFVertex methods
97 //
98 //---------------------------------------------------------------------
99 
100 inline void AliKFVertex::operator+=(const AliKFParticle &Daughter)
101 {
102  AliKFParticle::operator+=(Daughter);
103 }
104 
105 inline void AliKFVertex::operator-=(const AliKFParticle &Daughter)
106 {
107  Daughter.SubtractFromVertex(*this);
108 }
109 
110 inline AliKFVertex AliKFVertex::operator-(const AliKFParticle &Daughter) const
111 {
112  AliKFVertex tmp = *this;
113  Daughter.SubtractFromVertex(tmp);
114  return tmp;
115 }
116 
117 #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:100
void SetBeamConstraintOff()
AliKFVertex operator-(const AliKFParticle &Daughter) const
Definition: AliKFVertex.h:110
Int_t GetNContributors() const
Definition: AliKFVertex.h:61
Bool_t fIsConstrained
Definition: AliKFVertex.h:91
void operator-=(const AliKFParticle &Daughter)
Definition: AliKFVertex.h:105