Belle II Software  release-08-01-10
ParticleBase Class Referenceabstract

base class for all particles More...

#include <ParticleBase.h>

Inheritance diagram for ParticleBase:
Collaboration diagram for ParticleBase:

Public Types

enum  TFParticleType {
  kInteractionPoint ,
  kOrigin ,
  kComposite ,
  kRecoResonance ,
  kInternalParticle ,
  kRecoTrack ,
  kResonance ,
  kRecoPhoton ,
  kRecoKlong ,
  kMissingParticle
}
 particle types

 
typedef std::vector< Constraintconstraintlist
 alias
 
typedef std::vector< std::pair< const ParticleBase *, int > > indexmap
 alias
 

Public Member Functions

 ParticleBase (Belle2::Particle *particle, const ParticleBase *mother, const ConstraintConfiguration *config=nullptr)
 default constructor

 
 ParticleBase (const std::string &name)
 constructor only used by interaction point (ip constraint)

 
virtual ~ParticleBase ()
 destructor, actually does something

 
virtual ErrCode initMotherlessParticle (FitParams &)=0
 init particle that does not need a mother vertex

 
virtual ErrCode initParticleWithMother (FitParams &)=0
 init particle that does need a mother vertex

 
virtual ErrCode initCovariance (FitParams &) const
 init covariance matrix
 
virtual int dim () const =0
 get dimension of constraint
 
virtual void updateIndex (int &offset)
 this sets the index for momentum, position, etc. More...
 
virtual std::string parname (int index) const
 get name of parameter i
 
const ParticleBaselocate (Belle2::Particle *particle) const
 get particle base from basf2 particle
 
Belle2::Particleparticle () const
 get basf2 particle

 
int index () const
 get index

 
const ParticleBasemother () const
 getMother() / hasMother()
 
virtual ErrCode projectGeoConstraint (const FitParams &, Projection &) const
 project geometrical constraint More...
 
virtual ErrCode projectMassConstraintParticle (const FitParams &, Projection &) const
 project mass constraint using the particles parameters More...
 
virtual ErrCode projectMassConstraintDaughters (const FitParams &, Projection &) const
 project mass constraint using the parameters of the daughters More...
 
virtual ErrCode projectMassConstraint (const FitParams &, Projection &) const
 project mass constraint abstract
 
virtual ErrCode projectConstraint (Constraint::Type, const FitParams &, Projection &) const
 project constraint. More...
 
virtual void forceP4Sum (FitParams &) const
 force p4 sum conservation all along the tree
 
virtual int type () const =0
 get particle type
 
virtual int posIndex () const
 get vertex index (in statevector!)
 
virtual int tauIndex () const
 get tau index
 
virtual int momIndex () const
 get momentum index
 
virtual bool hasEnergy () const
 get momentum dimension
 
virtual bool hasPosition () const
 get false

 
int eneIndex () const
 get energy index

 
virtual double chiSquare (const FitParams &) const
 get chi2
 
int charge () const
 get charge
 
virtual ParticleBaseaddDaughter (Belle2::Particle *, const ConstraintConfiguration &config, bool forceFitAll=false)
 add daughter

 
virtual void removeDaughter (const ParticleBase *pb)
 remove daughter
 
virtual void retrieveIndexMap (indexmap &anindexmap) const
 get index map

 
void setMother (const ParticleBase *m)
 set mother

 
virtual void addToConstraintList (constraintlist &alist, int depth) const =0
 add to constraint list

 
void collectVertexDaughters (std::vector< ParticleBase * > &particles, int posindex)
 get vertex daughters
 
virtual int nFinalChargedCandidates () const
 number of charged candidates
 

Static Public Member Functions

static ParticleBasecreateParticle (Belle2::Particle *particle, const ParticleBase *mother, const ConstraintConfiguration &config, bool forceFitAll=false)
 create the according treeFitter particle obj for a basf2 particle type

 
static ParticleBasecreateOrigin (Belle2::Particle *daughter, const ConstraintConfiguration &config, bool forceFitAll)
 create a custom origin particle or a beamspot
 

Protected Types

typedef std::vector< ParticleBase * > ParticleContainer
 just an alias
 

Protected Member Functions

ErrCode initTau (FitParams &par) const
 initialises tau as a length

 
void setIndex (int i)
 set Index (in statevector)
 

Static Protected Member Functions

static bool isAResonance (Belle2::Particle *particle)
 controls if a particle is treated as a resonance(lifetime=0) or a particle that has a finite lifetime. More...
 

Protected Attributes

Belle2::Particlem_particle
 pointer to framework type

 
const ParticleBasem_mother
 motherparticle
 
std::vector< ParticleBase * > m_daughters
 daughter container

 
bool m_isStronglyDecayingResonance
 decay length less than 1 micron

 
const ConstraintConfigurationm_config
 has all the constraint config
 

Private Attributes

int m_index
 index
 
std::string m_name
 name

 

Detailed Description

base class for all particles

Definition at line 25 of file ParticleBase.h.

Member Function Documentation

◆ isAResonance()

bool isAResonance ( Belle2::Particle particle)
staticprotected

controls if a particle is treated as a resonance(lifetime=0) or a particle that has a finite lifetime.

A finite life time means it will register a geo constraint for this particle

Definition at line 134 of file ParticleBase.cc.

◆ projectConstraint()

ErrCode projectConstraint ( Constraint::Type  type,
const FitParams fitparams,
Projection p 
) const
virtual

project constraint.


Reimplemented in RecoResonance, RecoParticle, Origin, Composite, and InternalParticle.

Definition at line 416 of file ParticleBase.cc.

◆ projectGeoConstraint()

ErrCode projectGeoConstraint ( const FitParams fitparams,
Projection p 
) const
virtual

project geometrical constraint

the direction of the momentum is very well known from the kinematic constraints that is why we do not extract the distance as a vector here

Definition at line 249 of file ParticleBase.cc.

◆ projectMassConstraintDaughters()

ErrCode projectMassConstraintDaughters ( const FitParams fitparams,
Projection p 
) const
virtual

project mass constraint using the parameters of the daughters

be aware that the signs here are important E-|p|-m extracts a negative mass and messes with the momentum !

Definition at line 314 of file ParticleBase.cc.

◆ projectMassConstraintParticle()

ErrCode projectMassConstraintParticle ( const FitParams fitparams,
Projection p 
) const
virtual

project mass constraint using the particles parameters

be aware that the signs here are important E-|p|-m extracts a negative mass and messes with the momentum !

Definition at line 375 of file ParticleBase.cc.

◆ updateIndex()

void updateIndex ( int &  offset)
virtual

this sets the index for momentum, position, etc.

in the statevector

Definition at line 84 of file ParticleBase.cc.


The documentation for this class was generated from the following files: