Belle II Software  release-05-01-25
FeedthroughParticle.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2020 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributor: Francesco Tenchini, Jo-Frederik Krohn, Fabian Krinner *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <analysis/VertexFitting/TreeFitter/ParticleBase.h>
13 
14 namespace TreeFitter {
16  class FeedthroughParticle : public ParticleBase {
17 
18  public:
19 
22  const ParticleBase* mother,
23  const ConstraintConfiguration& config,
24  bool forceFitAll
25  );
26 
29 
31  virtual ErrCode initMotherlessParticle(FitParams&) override;
32 
34  virtual ErrCode initParticleWithMother(FitParams&) override {return ErrCode(ErrCode::Status::success);}
35 
37  virtual ErrCode initCovariance(FitParams&) const override;
38 
40  virtual int dim() const override {return 0;} // This does not have any parameters
41 
43  virtual void addToConstraintList(constraintlist& alist, int depth) const override;
44 
46  int type() const override {return kFeedthroughParticle;}
47 
49  int posIndex() const override;
50 
52  int momIndex() const override;
53 
54  };
55 
56 }
TreeFitter::FeedthroughParticle::~FeedthroughParticle
~FeedthroughParticle()
Destructor.
Definition: FeedthroughParticle.h:44
TreeFitter::ParticleBase::ParticleBase
ParticleBase(Belle2::Particle *particle, const ParticleBase *mother, const ConstraintConfiguration *config)
default constructor
Definition: ParticleBase.cc:41
TreeFitter::ErrCode
abstract errorocode be aware that the default is succes
Definition: ErrCode.h:23
TreeFitter::FitParams
Class to store and manage fitparams (statevector)
Definition: FitParams.h:29
TreeFitter::FeedthroughParticle::initCovariance
virtual ErrCode initCovariance(FitParams &) const override
init covariance matrix, do nothing, since the particle is just a feedthrough
Definition: FeedthroughParticle.cc:50
TreeFitter::FeedthroughParticle::type
int type() const override
get particle type
Definition: FeedthroughParticle.h:62
TreeFitter::FeedthroughParticle::posIndex
int posIndex() const override
take posIndex from daughter
Definition: FeedthroughParticle.cc:65
TreeFitter::FeedthroughParticle::initParticleWithMother
virtual ErrCode initParticleWithMother(FitParams &) override
init particle that does need a mother vertex
Definition: FeedthroughParticle.h:50
TreeFitter::FeedthroughParticle::addToConstraintList
virtual void addToConstraintList(constraintlist &alist, int depth) const override
add to constraint list
Definition: FeedthroughParticle.cc:57
TreeFitter::ParticleBase::constraintlist
std::vector< Constraint > constraintlist
alias
Definition: ParticleBase.h:69
TreeFitter::FeedthroughParticle::momIndex
int momIndex() const override
take momIndex from daughter
Definition: FeedthroughParticle.cc:74
TreeFitter::FeedthroughParticle::dim
virtual int dim() const override
get dimension of constraint
Definition: FeedthroughParticle.h:56
Belle2::Particle
Class to store reconstructed particles.
Definition: Particle.h:77
TreeFitter::ParticleBase::mother
const ParticleBase * mother() const
getMother() / hasMother()
Definition: ParticleBase.cc:295
TreeFitter::FeedthroughParticle::FeedthroughParticle
FeedthroughParticle(Belle2::Particle *particle, const ParticleBase *mother, const ConstraintConfiguration &config, bool forceFitAll)
Constructor.
Definition: FeedthroughParticle.cc:20
TreeFitter::FeedthroughParticle::initMotherlessParticle
virtual ErrCode initMotherlessParticle(FitParams &) override
init particle that does not need a mother vertex
Definition: FeedthroughParticle.cc:37
TreeFitter::ParticleBase::particle
Belle2::Particle * particle() const
get basf2 particle
Definition: ParticleBase.h:109