Belle II Software  release-05-01-25
RecoPhoton.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributor: Wouter Hulsbergen, Francesco Tenchini, Jo-Frederik Krohn *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <analysis/VertexFitting/TreeFitter/RecoParticle.h>
13 
14 namespace TreeFitter {
15 
17  class RecoPhoton : public RecoParticle {
18 
19  public:
22 
24  virtual ~RecoPhoton() {};
25 
27  virtual ErrCode initParticleWithMother(FitParams& fitparams) override;
28 
30  virtual ErrCode initMotherlessParticle(FitParams& fitparams) override;
31 
33  ErrCode initCovariance(FitParams& fitparams) const override;
34 
37 
39  ErrCode projectRecoConstraint(const FitParams& fitparams, Projection& p) const override;
40 
42  virtual int dimM() const override { return dim(); }
43 
45  virtual bool hasEnergy() const override { return false; }
46 
48  virtual int dim() const override { return m_dim; }
49 
51  virtual int type() const override { return kRecoPhoton ; }
52 
54  virtual void addToConstraintList(constraintlist& alist, int depth) const override
55  {
56  alist.push_back(Constraint(this, Constraint::photon, depth, dimM())) ;
57  }
58 
60  static bool useEnergy(const Belle2::Particle& cand) ;
61 
62  private:
63 
65  const int m_dim;
66 
68  bool m_init ;
69 
71  bool m_useEnergy ;
72 
74  Eigen::Matrix<double, 1, 4> m_clusterPars;
75 
77  Eigen::Matrix<double, 4, 4> m_covariance;
78 
80  int m_i1;
82  int m_i2;
84  int m_i3;
85 
86  };
87 
88 }
TreeFitter::RecoPhoton::m_dim
const int m_dim
dimension of residuals and 'width' of H
Definition: RecoPhoton.h:81
TreeFitter::RecoPhoton::RecoPhoton
RecoPhoton(Belle2::Particle *bc, const ParticleBase *mother)
constructor
Definition: RecoPhoton.cc:36
TreeFitter::RecoPhoton::dim
virtual int dim() const override
set the size of the particle in the statevector
Definition: RecoPhoton.h:64
TreeFitter::RecoPhoton::initMotherlessParticle
virtual ErrCode initMotherlessParticle(FitParams &fitparams) override
init particle without mother
Definition: RecoPhoton.cc:68
TreeFitter::RecoPhoton::initParams
ErrCode initParams()
update or init params
Definition: RecoPhoton.cc:102
TreeFitter::RecoPhoton::m_clusterPars
Eigen::Matrix< double, 1, 4 > m_clusterPars
constrains measured params (x_c, y_c, z_c, E_c)
Definition: RecoPhoton.h:90
TreeFitter::RecoPhoton::dimM
virtual int dimM() const override
sets the size of the corresponding residual projection
Definition: RecoPhoton.h:58
TreeFitter::ParticleBase::ParticleBase
ParticleBase(Belle2::Particle *particle, const ParticleBase *mother, const ConstraintConfiguration *config)
default constructor
Definition: ParticleBase.cc:41
TreeFitter::RecoPhoton::m_i1
int m_i1
index with the highest momentum.
Definition: RecoPhoton.h:96
TreeFitter::ErrCode
abstract errorocode be aware that the default is succes
Definition: ErrCode.h:23
TreeFitter::RecoPhoton::m_covariance
Eigen::Matrix< double, 4, 4 > m_covariance
covariance (x_c,y_c,z_c,E_c) of measured pars
Definition: RecoPhoton.h:93
TreeFitter::FitParams
Class to store and manage fitparams (statevector)
Definition: FitParams.h:29
TreeFitter::RecoPhoton::addToConstraintList
virtual void addToConstraintList(constraintlist &alist, int depth) const override
add to list
Definition: RecoPhoton.h:70
TreeFitter::RecoPhoton::m_useEnergy
bool m_useEnergy
has energy ins statevector
Definition: RecoPhoton.h:87
TreeFitter::RecoPhoton::~RecoPhoton
virtual ~RecoPhoton()
destructor
Definition: RecoPhoton.h:40
TreeFitter::RecoPhoton::hasEnergy
virtual bool hasEnergy() const override
how should the energy be calculated ? from momentum or from E ?
Definition: RecoPhoton.h:61
TreeFitter::RecoPhoton::m_init
bool m_init
was initialized*
Definition: RecoPhoton.h:84
TreeFitter::RecoPhoton::initParticleWithMother
virtual ErrCode initParticleWithMother(FitParams &fitparams) override
init particle with mother
Definition: RecoPhoton.cc:47
TreeFitter::RecoPhoton::initCovariance
ErrCode initCovariance(FitParams &fitparams) const override
init covariance
Definition: RecoPhoton.cc:85
TreeFitter::ParticleBase::constraintlist
std::vector< Constraint > constraintlist
alias
Definition: ParticleBase.h:69
Belle2::Particle
Class to store reconstructed particles.
Definition: Particle.h:77
TreeFitter::RecoPhoton::type
virtual int type() const override
type
Definition: RecoPhoton.h:67
TreeFitter::RecoPhoton::projectRecoConstraint
ErrCode projectRecoConstraint(const FitParams &fitparams, Projection &p) const override
project photon constraint
Definition: RecoPhoton.cc:171
TreeFitter::RecoPhoton::useEnergy
static bool useEnergy(const Belle2::Particle &cand)
has energy in fit params?
Definition: RecoPhoton.cc:73
TreeFitter::RecoPhoton::m_i2
int m_i2
random other index
Definition: RecoPhoton.h:98
TreeFitter::ParticleBase::mother
const ParticleBase * mother() const
getMother() / hasMother()
Definition: ParticleBase.cc:295
TreeFitter::RecoPhoton::m_i3
int m_i3
another random index
Definition: RecoPhoton.h:100
TreeFitter::Projection
class to store the projected residuals and the corresponding jacobian as well as the covariance matri...
Definition: Projection.h:27