Belle II Software light-2406-ragdoll
RecoPhoton.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
13namespace TreeFitter {
14
16 class RecoPhoton : public RecoParticle {
17
18 public:
21
23 virtual ~RecoPhoton() {};
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 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 kRecoPhoton ; }
51
53 virtual void addToConstraintList(constraintlist& alist, int depth) const override
54 {
55 alist.push_back(Constraint(this, Constraint::photon, depth, dimM())) ;
56 }
57
59 static bool useEnergy(const Belle2::Particle& cand) ;
60
61 private:
62
64 const int m_dim;
65
67 bool m_init ;
68
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
87 };
88
89}
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
const ParticleBase * mother() const
getMother() / hasMother()
Definition: ParticleBase.h:98
std::vector< Constraint > constraintlist
alias
Definition: ParticleBase.h:52
class to store the projected residuals and the corresponding jacobian as well as the covariance matri...
Definition: Projection.h:18
base for RecoPhoton RecoTrack
Definition: RecoParticle.h:16
representation of the photon constraint
Definition: RecoPhoton.h:16
bool m_useEnergy
has energy ins statevector
Definition: RecoPhoton.h:70
Eigen::Matrix< double, 4, 4 > m_covariance
covariance (x_c,y_c,z_c,E_c) of measured pars
Definition: RecoPhoton.h:76
ErrCode initCovariance(FitParams &fitparams) const override
init covariance
Definition: RecoPhoton.cc:75
virtual int dim() const override
set the size of the particle in the statevector
Definition: RecoPhoton.h:47
ErrCode initParams()
update or init params
Definition: RecoPhoton.cc:92
const float m_momentumScalingFactor
scale the momentum / energy by this correction factor
Definition: RecoPhoton.h:86
virtual int type() const override
type
Definition: RecoPhoton.h:50
const int m_dim
dimension of residuals and 'width' of H
Definition: RecoPhoton.h:64
virtual bool hasEnergy() const override
how should the energy be calculated ? from momentum or from E ?
Definition: RecoPhoton.h:44
virtual void addToConstraintList(constraintlist &alist, int depth) const override
add to list
Definition: RecoPhoton.h:53
int m_i3
another random index
Definition: RecoPhoton.h:83
virtual int dimM() const override
sets the size of the corresponding residual projection
Definition: RecoPhoton.h:41
int m_i1
index with the highest momentum.
Definition: RecoPhoton.h:79
virtual ErrCode initParticleWithMother(FitParams &fitparams) override
init particle with mother
Definition: RecoPhoton.cc:37
static bool useEnergy(const Belle2::Particle &cand)
has energy in fit params?
Definition: RecoPhoton.cc:63
int m_i2
random other index
Definition: RecoPhoton.h:81
virtual ErrCode initMotherlessParticle(FitParams &fitparams) override
init particle without mother
Definition: RecoPhoton.cc:58
bool m_init
was initialized*
Definition: RecoPhoton.h:67
ErrCode projectRecoConstraint(const FitParams &fitparams, Projection &p) const override
project photon constraint
Definition: RecoPhoton.cc:166
Eigen::Matrix< double, 1, 4 > m_clusterPars
constrains measured params (x_c, y_c, z_c, E_c)
Definition: RecoPhoton.h:73
virtual ~RecoPhoton()
destructor
Definition: RecoPhoton.h:23