Belle II Software  release-08-01-10
RecoKlong.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/RecoParticle.h>
12 
13 namespace TreeFitter {
14 
16  class RecoKlong : public RecoParticle {
17 
18  public:
21 
23  virtual ~RecoKlong() {};
24 
26  virtual ErrCode initParticleWithMother(FitParams& fitparams) override;
27 
29  virtual ErrCode initMotherlessParticle(FitParams& fitparams) override;
30 
32  ErrCode initCovariance(FitParams& fitparams) const override;
33 
36 
38  ErrCode projectRecoConstraint(const FitParams& fitparams, Projection& p) const override;
39 
41  virtual int dimM() const override { return m_dim; }
42 
44  virtual bool hasEnergy() const override { return false; }
45 
47  virtual int dim() const override { return m_dim; }
48 
50  virtual int type() const override { return kRecoKlong ; }
51 
53  virtual void addToConstraintList(constraintlist& alist, int depth) const override
54  {
55  alist.push_back(Constraint(this, Constraint::klong, depth, dimM())) ;
56  }
57 
59  static bool useEnergy(Belle2::Particle& cand) ;
60 
61  private:
62 
64  const int m_dim;
65 
67  bool m_init ;
68 
70  bool m_useEnergy ;
71 
73  Eigen::Matrix<double, 1, 4> m_clusterPars;
74 
76  Eigen::Matrix<double, 4, 4> m_covariance;
77 
79  int m_i1;
81  int m_i2;
83  int m_i3;
84  };
85 
86 }
87 
Class to store reconstructed particles.
Definition: Particle.h:75
class to manage the order of constraints and their filtering
Definition: Constraint.h:20
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
std::vector< Constraint > constraintlist
alias
Definition: ParticleBase.h:52
const ParticleBase * mother() const
getMother() / hasMother()
Definition: ParticleBase.h:98
class to store the projected residuals and the corresponding jacobian as well as the covariance matri...
Definition: Projection.h:18
representation of the Klong constraint
Definition: RecoKlong.h:16
bool m_useEnergy
has energy ins statevector
Definition: RecoKlong.h:70
Eigen::Matrix< double, 4, 4 > m_covariance
covariance (x_c,y_c,z_c,E_c) of measured pars
Definition: RecoKlong.h:76
ErrCode initCovariance(FitParams &fitparams) const override
init covariance
Definition: RecoKlong.cc:62
virtual int dim() const override
set the size of the particle in the statevector
Definition: RecoKlong.h:47
ErrCode initParams()
update or init params
Definition: RecoKlong.cc:79
virtual ~RecoKlong()
destructor
Definition: RecoKlong.h:23
virtual int type() const override
type
Definition: RecoKlong.h:50
const int m_dim
dimension of residuals and 'width' of H
Definition: RecoKlong.h:64
virtual bool hasEnergy() const override
how should the energy be calculated ? from momentum or from E ?
Definition: RecoKlong.h:44
virtual void addToConstraintList(constraintlist &alist, int depth) const override
add to list
Definition: RecoKlong.h:53
int m_i3
another random index
Definition: RecoKlong.h:83
virtual int dimM() const override
sets the size of the corresponding residual projection
Definition: RecoKlong.h:41
int m_i1
index with the highest momentum.
Definition: RecoKlong.h:79
virtual ErrCode initParticleWithMother(FitParams &fitparams) override
init particle with mother
Definition: RecoKlong.cc:33
int m_i2
random index
Definition: RecoKlong.h:81
RecoKlong(Belle2::Particle *bc, const ParticleBase *mother)
constructor
Definition: RecoKlong.cc:22
virtual ErrCode initMotherlessParticle(FitParams &fitparams) override
init particle without mother
Definition: RecoKlong.cc:57
static bool useEnergy(Belle2::Particle &cand)
has energy in fit params?
bool m_init
was initialized*
Definition: RecoKlong.h:67
ErrCode projectRecoConstraint(const FitParams &fitparams, Projection &p) const override
project klong constraint
Definition: RecoKlong.cc:124
Eigen::Matrix< double, 1, 4 > m_clusterPars
constrains measured params (x_c, y_c, z_c, E_c)
Definition: RecoKlong.h:73
base for RecoPhoton RecoTrack
Definition: RecoParticle.h:16