Belle II Software development
|
another unnecessary layer of abstraction More...
#include <InternalParticle.h>
Public Types | |
enum | TFParticleType { kInteractionPoint , kOrigin , kComposite , kRecoResonance , kInternalParticle , kRecoTrack , kResonance , kRecoPhoton , kRecoKlong , kMissingParticle } |
particle types More... | |
typedef std::vector< Constraint > | constraintlist |
alias | |
typedef std::vector< std::pair< const ParticleBase *, int > > | indexmap |
alias | |
Public Member Functions | |
InternalParticle (Belle2::Particle *particle, const ParticleBase *mother, const ConstraintConfiguration &config, bool forceFitAll) | |
constructor | |
virtual | ~InternalParticle () |
destructor | |
virtual ErrCode | initCovariance (FitParams &) const override |
init covariance | |
ErrCode | projectKineConstraint (const FitParams &, Projection &) const |
project kinematical constraint | |
ErrCode | projectBeamConstraint (const FitParams &, Projection &) const |
project beam four momentum constraint | |
virtual void | forceP4Sum (FitParams &) const override |
enforce conservation of momentum sum | |
virtual ErrCode | initParticleWithMother (FitParams &fitparams) override |
init particle in case it has a mother | |
virtual ErrCode | initMotherlessParticle (FitParams &fitparams) override |
init particle in case it has no mother | |
ErrCode | projectConstraint (const Constraint::Type type, const FitParams &fitparams, Projection &p) const override |
find out which constraint it is and project | |
virtual int | dim () const override |
space reserved in fit params, if has mother then it has tau | |
virtual int | type () const override |
type | |
virtual int | posIndex () const override |
position index in fit params | |
virtual int | tauIndex () const override |
tau index in fit params only if it has a mother | |
virtual int | momIndex () const override |
momentum index in fit params depending on whether it has a mother | |
virtual bool | hasEnergy () const override |
has energy in fitparams | |
virtual bool | hasPosition () const override |
has position index | |
virtual std::string | parname (int index) const override |
name | |
virtual void | addToConstraintList (constraintlist &list, int depth) const override |
add to constraint list | |
void | setMassConstraint (bool b) |
set mass constraint flag | |
virtual void | updateIndex (int &offset) |
this sets the index for momentum, position, etc. | |
const ParticleBase * | locate (Belle2::Particle *particle) const |
get particle base from basf2 particle | |
Belle2::Particle * | particle () const |
get basf2 particle | |
int | index () const |
get index | |
const ParticleBase * | mother () const |
getMother() / hasMother() | |
virtual ErrCode | projectGeoConstraint (const FitParams &, Projection &) const |
project geometrical constraint | |
virtual ErrCode | projectMassConstraintParticle (const FitParams &, Projection &) const |
project mass constraint using the particles parameters | |
virtual ErrCode | projectMassConstraintDaughters (const FitParams &, Projection &) const |
project mass constraint using the parameters of the daughters | |
virtual ErrCode | projectMassConstraint (const FitParams &, Projection &) const |
project mass constraint abstract | |
int | eneIndex () const |
get energy index | |
virtual double | chiSquare (const FitParams &) const |
get chi2 | |
int | charge () const |
get charge | |
virtual ParticleBase * | addDaughter (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 | |
void | collectVertexDaughters (std::vector< ParticleBase * > &particles, int posindex) |
get vertex daughters | |
virtual int | nFinalChargedCandidates () const |
number of charged candidates | |
Static Public Member Functions | |
static ParticleBase * | createParticle (Belle2::Particle *particle, const ParticleBase *mother, const ConstraintConfiguration &config, bool forceFitAll=false) |
create the according treeFitter particle obj for a basf2 particle type | |
static ParticleBase * | createOrigin (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 | initMomentum (FitParams &fitparams) const |
init momentum of *this and daughters | |
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. | |
Protected Attributes | |
Belle2::Particle * | m_particle |
pointer to framework type | |
const ParticleBase * | m_mother |
motherparticle | |
std::vector< ParticleBase * > | m_daughters |
daughter container | |
bool | m_isStronglyDecayingResonance |
decay length less than 1 micron | |
const ConstraintConfiguration * | m_config |
has all the constraint config | |
Static Private Member Functions | |
static bool | compTrkTransverseMomentum (const RecoTrack *lhs, const RecoTrack *rhs) |
compare transverse track momentum | |
Private Attributes | |
bool | m_massconstraint |
has mass constraint | |
bool | m_beamconstraint |
has beam constraint | |
bool | m_shares_vertex_with_mother |
shares vertex with mother, that means decay vertex = productionvertex | |
bool | m_geo_constraint |
use a geo metric constraint | |
bool | m_lifetimeconstraint |
has lifetime constraint | |
bool | m_isconversion |
is conversion | |
bool | m_automatic_vertex_constraining |
automatically figure out if mother and particle vertex should be the same and also add geometric constraints | |
int | m_index |
index | |
std::string | m_name |
name | |
another unnecessary layer of abstraction
Definition at line 17 of file InternalParticle.h.
|
inherited |
alias
Definition at line 52 of file ParticleBase.h.
|
inherited |
alias
Definition at line 55 of file ParticleBase.h.
|
protectedinherited |
just an alias
Definition at line 178 of file ParticleBase.h.
|
inherited |
particle types
Definition at line 30 of file ParticleBase.h.
InternalParticle | ( | Belle2::Particle * | particle, |
const ParticleBase * | mother, | ||
const ConstraintConfiguration & | config, | ||
bool | forceFitAll | ||
) |
constructor
Definition at line 41 of file InternalParticle.cc.
|
inlinevirtual |
|
virtualinherited |
add daughter
Definition at line 65 of file ParticleBase.cc.
|
overridevirtual |
add to constraint list
Implements ParticleBase.
Definition at line 376 of file InternalParticle.cc.
|
inlineinherited |
get charge
Definition at line 144 of file ParticleBase.h.
|
virtualinherited |
get chi2
Definition at line 231 of file ParticleBase.cc.
|
inherited |
get vertex daughters
Definition at line 156 of file ParticleBase.cc.
compare transverse track momentum
Definition at line 83 of file InternalParticle.cc.
|
staticinherited |
create a custom origin particle or a beamspot
Definition at line 93 of file ParticleBase.cc.
|
staticinherited |
create the according treeFitter particle obj for a basf2 particle type
Definition at line 102 of file ParticleBase.cc.
|
overridevirtual |
space reserved in fit params, if has mother then it has tau
Implements ParticleBase.
Reimplemented in Resonance.
Definition at line 336 of file InternalParticle.cc.
|
inlineinherited |
get energy index
Definition at line 138 of file ParticleBase.h.
|
overridevirtual |
enforce conservation of momentum sum
Reimplemented from ParticleBase.
Definition at line 411 of file InternalParticle.cc.
|
inlineoverridevirtual |
has energy in fitparams
Reimplemented from ParticleBase.
Definition at line 68 of file InternalParticle.h.
|
overridevirtual |
has position index
Reimplemented from ParticleBase.
Reimplemented in Resonance.
Definition at line 369 of file InternalParticle.cc.
|
inlineinherited |
init covariance
Reimplemented from ParticleBase.
Definition at line 226 of file InternalParticle.cc.
init momentum of *this and daughters
Definition at line 206 of file InternalParticle.cc.
init particle in case it has no mother
(0,0,0) is the best guess in any other case
Implements ParticleBase.
Reimplemented in Resonance.
Definition at line 89 of file InternalParticle.cc.
init particle in case it has a mother
Implements ParticleBase.
Reimplemented in Resonance.
Definition at line 191 of file InternalParticle.cc.
initialises tau as a length
Definition at line 426 of file ParticleBase.cc.
|
staticprotectedinherited |
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.
|
inherited |
get particle base from basf2 particle
Definition at line 211 of file ParticleBase.cc.
|
overridevirtual |
momentum index in fit params depending on whether it has a mother
indexing in { x, y, z, tau, px, py, pz, E } but tau is not existing for all InternalParticles
Reimplemented from ParticleBase.
Reimplemented in Resonance.
Definition at line 353 of file InternalParticle.cc.
|
inlineinherited |
getMother() / hasMother()
Definition at line 98 of file ParticleBase.h.
|
virtualinherited |
number of charged candidates
Reimplemented in RecoTrack.
Definition at line 240 of file ParticleBase.cc.
|
overridevirtual |
name
Reimplemented from ParticleBase.
Reimplemented in Resonance.
Definition at line 404 of file InternalParticle.cc.
|
inlineinherited |
|
overridevirtual |
position index in fit params
Reimplemented from ParticleBase.
Reimplemented in Resonance.
Definition at line 330 of file InternalParticle.cc.
ErrCode projectBeamConstraint | ( | const FitParams & | fitparams, |
Projection & | p | ||
) | const |
project beam four momentum constraint
Definition at line 285 of file InternalParticle.cc.
|
overridevirtual |
find out which constraint it is and project
Reimplemented from ParticleBase.
Definition at line 305 of file InternalParticle.cc.
|
virtualinherited |
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.
ErrCode projectKineConstraint | ( | const FitParams & | fitparams, |
Projection & | p | ||
) | const |
project kinematical constraint
Definition at line 237 of file InternalParticle.cc.
|
virtualinherited |
project mass constraint abstract
Definition at line 405 of file ParticleBase.cc.
|
virtualinherited |
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.
|
virtualinherited |
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.
|
virtualinherited |
remove daughter
Definition at line 73 of file ParticleBase.cc.
|
virtualinherited |
get index map
Definition at line 223 of file ParticleBase.cc.
|
inlineprotectedinherited |
|
inline |
set mass constraint flag
Definition at line 80 of file InternalParticle.h.
|
inlineinherited |
|
overridevirtual |
tau index in fit params only if it has a mother
only exists if particle is geo constraint and has a mother
Reimplemented from ParticleBase.
Reimplemented in Resonance.
Definition at line 347 of file InternalParticle.cc.
|
inlineoverridevirtual |
type
Implements ParticleBase.
Reimplemented in Resonance.
Definition at line 56 of file InternalParticle.h.
|
virtualinherited |
this sets the index for momentum, position, etc.
in the statevector
Definition at line 84 of file ParticleBase.cc.
|
private |
automatically figure out if mother and particle vertex should be the same and also add geometric constraints
Definition at line 112 of file InternalParticle.h.
|
private |
has beam constraint
Definition at line 96 of file InternalParticle.h.
|
protectedinherited |
has all the constraint config
Definition at line 204 of file ParticleBase.h.
|
protectedinherited |
daughter container
Definition at line 198 of file ParticleBase.h.
|
private |
use a geo metric constraint
Definition at line 102 of file InternalParticle.h.
|
privateinherited |
index
Definition at line 208 of file ParticleBase.h.
|
private |
is conversion
Definition at line 108 of file InternalParticle.h.
|
protectedinherited |
decay length less than 1 micron
Definition at line 201 of file ParticleBase.h.
|
private |
has lifetime constraint
Definition at line 105 of file InternalParticle.h.
|
private |
has mass constraint
Definition at line 93 of file InternalParticle.h.
|
protectedinherited |
motherparticle
Definition at line 195 of file ParticleBase.h.
|
privateinherited |
name
Definition at line 211 of file ParticleBase.h.
|
protectedinherited |
pointer to framework type
Definition at line 192 of file ParticleBase.h.
|
private |
shares vertex with mother, that means decay vertex = productionvertex
Definition at line 99 of file InternalParticle.h.