Belle II Software development
DecayChain.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * External Contributor: Wouter Hulsbergen *
5 * *
6 * See git log for contributors and copyright holders. *
7 * This file is licensed under LGPL-3.0, see LICENSE.md. *
8 **************************************************************************/
9#pragma once
10
11#include <analysis/VertexFitting/TreeFitter/ParticleBase.h>
12#include <analysis/VertexFitting/TreeFitter/MergedConstraint.h>
13#include <analysis/VertexFitting/TreeFitter/ConstraintConfiguration.h>
14
15namespace TreeFitter {
16
17 class FitParams ;
21 class DecayChain {
22
23 public:
24
26 DecayChain() : m_dim(0), m_headOfChain(0), m_cand(0), m_isOwner(true) {} //Default constructor (actually never used)
27
30 const ConstraintConfiguration& config,
31 bool forceFitAll = false
32 );
33
36
39
42
45
47 int dim() const { return m_dim;}
48
50 void initConstraintList();
51
54
56 double chiSquare(const FitParams& par) const;
57
60
62 const ParticleBase* cand() { return m_cand ; }
63
65 const ParticleBase* mother() const { return m_headOfChain ; }
66
68 const ParticleBase* locate(Belle2::Particle* bc) const ;
69
71 int index(Belle2::Particle* bc) const ;
72
74 int posIndex(Belle2::Particle* bc) const ;
75
77 int momIndex(Belle2::Particle* bc) const ;
78
80 int tauIndex(Belle2::Particle* bc) const ;
81
83 int momIndex() const ;
84
85 private:
86
87 mutable int m_dim ;
88
90
92
95
97 typedef std::map<Belle2::Particle*, const ParticleBase*> ParticleMap ;
98
101
103 const bool m_isOwner ;
104
107
108 };
109
110}
Class to store reconstructed particles.
Definition Particle.h:76
double chiSquare(const FitParams &par) const
get the chi2 for the head of the chain
const ConstraintConfiguration m_config
config container
Definition DecayChain.h:106
ErrCode initialize(FitParams &par)
initialize the chain
Definition DecayChain.cc:70
int m_dim
the dimension of constraint
Definition DecayChain.h:87
ParticleBase::constraintlist m_constraintlist
list of constraints
Definition DecayChain.h:94
void removeConstraintFromList()
remove constraints from list
Definition DecayChain.cc:61
std::map< Belle2::Particle *, const ParticleBase * > ParticleMap
typedef for a map of a particle to a TreeFitter::ParticleBase
Definition DecayChain.h:97
void initConstraintList()
init contraintlist
Definition DecayChain.cc:53
ParticleBase * m_headOfChain
head of decay tree
Definition DecayChain.h:89
const ParticleBase * locate(Belle2::Particle *bc) const
convert Belle2::particle into particle base(fitter base particle)
int dim() const
get dimension
Definition DecayChain.h:47
const ParticleBase * cand()
get candidate
Definition DecayChain.h:62
ParticleBase * mother()
get mother
Definition DecayChain.h:59
ErrCode filterWithReference(FitParams &par, const FitParams &ref)
filter with respect to a previous iteration for better stability
Definition DecayChain.cc:93
const bool m_isOwner
internal class member to check if we own the chain
Definition DecayChain.h:103
const ParticleBase * m_cand
fit candidate (not same to mother in case of bs/be constraint)
Definition DecayChain.h:91
int index(Belle2::Particle *bc) const
get the particle index
const ParticleBase * mother() const
get mother
Definition DecayChain.h:65
DecayChain()
empty constructor
Definition DecayChain.h:26
int tauIndex(Belle2::Particle *bc) const
get tau (i.e.
int momIndex() const
!NOT IMPLEMENTED
~DecayChain()
destructor
Definition DecayChain.cc:46
ErrCode filter(FitParams &par)
filter down the chain
Definition DecayChain.cc:81
int posIndex(Belle2::Particle *bc) const
get the vertex index of the particle in state vector
ParticleMap m_particleMap
the map from Belle2::Particles to TreeFitter::ParticleBase
Definition DecayChain.h:100
abstract errorocode be aware that the default is success
Definition ErrCode.h:14
Class to store and manage fitparams (statevector)
Definition FitParams.h:20
base class for all particles
std::vector< Constraint > constraintlist
alias