Belle II Software  release-06-02-00
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/RecoComposite.h>
13 
14 namespace TreeFitter {
15 
17  class RecoResonance : public RecoComposite {
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 { return hasEnergy() ? 4 : 3;} // (px,py,pz,(E))
35 
37  virtual ErrCode projectConstraint(Constraint::Type, const FitParams&, Projection&) const override;
38 
40  virtual int type() const override { return kRecoResonance; }
41 
43  virtual int posIndex() const override { return mother()->posIndex(); }
44 
46  virtual int momIndex() const override { return index(); }
47 
49  virtual int tauIndex() const override { return -1; }
50 
52  virtual std::string parname(int index) const override;
53 
55  virtual void addToConstraintList(constraintlist& list, int depth) const override
56  {
57  list.push_back(Constraint(this, Constraint::resonance, depth, dimM()));
58  }
59 
60  };
61 
62 }
Class to store reconstructed particles.
Definition: Particle.h:74
class to manage the order of constraints and their filtering
Definition: Constraint.h:20
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
Definition: ParticleBase.h:25
virtual int posIndex() const
get vertex index (in statevector!)
Definition: ParticleBase.h:129
int index() const
get index
Definition: ParticleBase.h:99
const ParticleBase * mother() const
getMother() / hasMother()
std::vector< Constraint > constraintlist
alias
Definition: ParticleBase.h:56
class to store the projected residuals and the corresponding jacobian as well as the covariance matri...
Definition: Projection.h:18
A class for composite particles.
Definition: RecoComposite.h:16
int dimM() const
get dimension of measurement
Definition: RecoComposite.h:48
virtual bool hasEnergy() const override
return of this constraint/particle has an energy component
Definition: RecoComposite.h:66
A class for resonances.
Definition: RecoResonance.h:17
virtual ~RecoResonance()
destructor
Definition: RecoResonance.h:31
virtual std::string parname(int index) const override
parameter name
virtual int tauIndex() const override
get tau (decay time) index in statevector
Definition: RecoResonance.h:49
virtual int dim() const override
dimension of the vector
Definition: RecoResonance.h:34
virtual ErrCode projectConstraint(Constraint::Type, const FitParams &, Projection &) const override
project the constraint
virtual int momIndex() const override
get momentum index in statevector
Definition: RecoResonance.h:46
virtual int type() const override
get type
Definition: RecoResonance.h:40
RecoResonance(Belle2::Particle *bc, const ParticleBase *mother)
constructor
virtual ErrCode initParticleWithMother(FitParams &fitparams) override
init particle in case it has a mother
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
Definition: RecoResonance.h:43
virtual void addToConstraintList(constraintlist &list, int depth) const override
add to the list of constraints
Definition: RecoResonance.h:55