Belle II Software development
Resonance.cc
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
10#include <analysis/VertexFitting/TreeFitter/Resonance.h>
11
12namespace TreeFitter {
13
15 const ParticleBase* mother,
16 const ConstraintConfiguration& config,
17 bool forceFitAll) :
18 InternalParticle(particle, mother, config, forceFitAll) {}
19
21 {
22 ErrCode status;
23 for (auto daughter : m_daughters) {
24 status |= daughter->initMotherlessParticle(fitparams);
25 }
26 return status;
27 }
28
30 {
31 ErrCode status;
32 for (auto daughter : m_daughters) {
33 status |= daughter->initParticleWithMother(fitparams);
34 }
35 initMomentum(fitparams);
36 return status;
37 }
38
39 Resonance::~Resonance() = default;
40
41 std::string Resonance::parname(int index) const
42 {
43 return ParticleBase::parname(index + 4);
44 }
45
46}
Class to store reconstructed particles.
Definition: Particle.h:75
constraint configuration class
abstract errorocode be aware that the default is success
Definition: ErrCode.h:14
Class to store and manage fitparams (statevector)
Definition: FitParams.h:20
another unnecessary layer of abstraction
ErrCode initMomentum(FitParams &fitparams) const
init momentum of *this and daughters
base class for all particles
Definition: ParticleBase.h:25
virtual std::string parname(int index) const
get name of parameter i
int index() const
get index
Definition: ParticleBase.h:95
std::vector< ParticleBase * > m_daughters
daughter container
Definition: ParticleBase.h:198
virtual ~Resonance()
destructor
virtual std::string parname(int index) const override
parameter name
Definition: Resonance.cc:41
ErrCode initParticleWithMother(FitParams &fitparams) override
initialise a particle with a mother
Definition: Resonance.cc:29
ErrCode initMotherlessParticle(FitParams &fitparams) override
initialise a motherless particle
Definition: Resonance.cc:20
Resonance(Belle2::Particle *particle, const ParticleBase *mother, const ConstraintConfiguration &config, bool forceFitAll)
constructor
Definition: Resonance.cc:14