Belle II Software development
RecoResonance.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
10#pragma once
11
12#include <analysis/VertexFitting/TreeFitter/Composite.h>
13
14namespace TreeFitter {
15
17 class RecoResonance : public Composite {
18
19 public:
20
23
25 virtual ErrCode initParticleWithMother(FitParams& fitparams) override;
26
28 virtual ErrCode initMotherlessParticle(FitParams& fitparams) override;
29
31 virtual ~RecoResonance() {};
32
34 virtual int dim() const override
35 {
36 if (particle()->hasExtraInfo("treeFitterTreatMeAsInvisible")
37 && particle()->getExtraInfo("treeFitterTreatMeAsInvisible") == 1) {
38 // invisible particle shouldn't contribute degrees of freedom to fit
39 // set dimension to "measurement" dimension to cancel them out
40 return dimM() ;
41 }
42 return hasEnergy() ? 4 : 3; // (px,py,pz,(E))
43 }
44
46 virtual ErrCode projectConstraint(Constraint::Type, const FitParams&, Projection&) const override;
47
49 virtual int type() const override { return kRecoResonance; }
50
52 virtual int posIndex() const override { return mother()->posIndex(); }
53
55 virtual int momIndex() const override { return index(); }
56
58 virtual int tauIndex() const override { return -1; }
59
61 virtual std::string parname(int index) const override;
62
64 virtual void addToConstraintList(constraintlist& list, int depth) const override;
65
66 private:
69
70
71 };
72
73}
Class to store reconstructed particles.
Definition Particle.h:76
int dimM() const
get dimension of measurement
Definition Composite.h:45
Composite(Belle2::Particle *bc, const ParticleBase *mother, const ConstraintConfiguration &config, bool massconstraint=false)
constructor
Definition Composite.cc:20
virtual bool hasEnergy() const override
return of this constraint/particle has an energy component
Definition Composite.h:63
Type
type of constraints the order of these constraints is important: it is the order in which they are ap...
Definition Constraint.h:27
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
Belle2::Particle * particle() const
get basf2 particle
virtual int posIndex() const
get vertex index (in statevector!)
int index() const
get index
const ParticleBase * mother() const
getMother() / hasMother()
std::vector< Constraint > constraintlist
alias
class to store the projected residuals and the corresponding jacobian as well as the covariance matri...
Definition Projection.h:18
virtual ~RecoResonance()
destructor
RecoResonance(Belle2::Particle *bc, const ParticleBase *mother, const ConstraintConfiguration &config)
constructor
virtual std::string parname(int index) const override
parameter name
virtual int tauIndex() const override
get tau (decay time) index in statevector
virtual int dim() const override
dimension of the vector
virtual ErrCode projectConstraint(Constraint::Type, const FitParams &, Projection &) const override
project the constraint
bool m_massconstraint
has mass constraint
virtual int momIndex() const override
get momentum index in statevector
virtual int type() const override
get type
virtual ErrCode initParticleWithMother(FitParams &fitparams) override
init particle in case it has a mother
virtual void addToConstraintList(constraintlist &list, int depth) const override
add to the list of constraints
virtual ErrCode initMotherlessParticle(FitParams &fitparams) override
init particle in case it has no mother
virtual int posIndex() const override
get position index in statevector x,y,z,tau,px,py,pz