Belle II Software  release-06-01-15
Particle Class Reference

Class to store reconstructed particles. More...

#include <Particle.h>

Inheritance diagram for Particle:
Collaboration diagram for Particle:

Public Types

enum  EParticleSourceObject {
  c_Undefined = 0 ,
  c_Track = 1 ,
  c_ECLCluster = 2 ,
  c_KLMCluster = 3 ,
  c_V0 = 4 ,
  c_MCParticle = 5 ,
  c_Composite = 6
}
 particle source enumerators
 
enum  EFlavorType {
  c_Unflavored = 0 ,
  c_Flavored = 1
}
 describes flavor type, see getFlavorType(). More...
 
enum  {
  c_DimPosition = 3 ,
  c_DimMomentum = 4 ,
  c_DimMatrix = 7 ,
  c_SizeMatrix = c_DimMatrix * (c_DimMatrix + 1) / 2
}
 error matrix dimensions and size of 1D representation
 
enum  {
  c_Px ,
  c_Py ,
  c_Pz ,
  c_E ,
  c_X ,
  c_Y ,
  c_Z
}
 enumerator used for error matrix handling, shows also in which order the rows (columns) are defined
 
enum  PropertyFlags {
  c_Ordinary = 0 ,
  c_IsUnspecified = 1 ,
  c_IsIgnoreRadiatedPhotons = 2 ,
  c_IsIgnoreIntermediate = 4 ,
  c_IsIgnoreMassive = 8 ,
  c_IsIgnoreNeutrino = 16 ,
  c_IsIgnoreGamma = 32 ,
  c_IsIgnoreBrems = 64 ,
  c_IsIgnoreMisID = 128 ,
  c_IsIgnoreDecayInFlight = 256
}
 Flags that describe the particle property, which are used in the MC matching. More...
 

Public Member Functions

 Particle ()
 Default constructor. More...
 
 Particle (const TLorentzVector &momentum, const int pdgCode)
 Constructor from a Lorentz vector and PDG code. More...
 
 Particle (const TLorentzVector &momentum, const int pdgCode, EFlavorType flavorType, const EParticleSourceObject particleType, const unsigned mdstIndex)
 Constructor for final state particles. More...
 
 Particle (const TLorentzVector &momentum, const int pdgCode, EFlavorType flavorType, const std::vector< int > &daughterIndices, TClonesArray *arrayPointer=nullptr)
 Constructor for composite particles. More...
 
 Particle (const TLorentzVector &momentum, const int pdgCode, EFlavorType flavorType, const std::vector< int > &daughterIndices, int properties, TClonesArray *arrayPointer=nullptr)
 Constructor for composite particles. More...
 
 Particle (const TLorentzVector &momentum, const int pdgCode, EFlavorType flavorType, const std::vector< int > &daughterIndices, int properties, const std::vector< int > &daughterProperties, TClonesArray *arrayPointer=nullptr)
 Constructor for composite particles. More...
 
 Particle (const Track *track, const Const::ChargedStable &chargedStable)
 Constructor from a reconstructed track (mdst object Track);. More...
 
 Particle (const int trackArrayIndex, const TrackFitResult *trackFit, const Const::ChargedStable &chargedStable, const Const::ChargedStable &chargedStableUsedForFit)
 Constructor from a reconstructed Track given as TrackFitResult. More...
 
 Particle (int trackArrayIndex, const TrackFitResult *trackFit, const Const::ChargedStable &chargedStable)
 Constructor from a reconstructed Track given as TrackFitResult. More...
 
 Particle (const ECLCluster *eclCluster, const Const::ParticleType &type=Const::photon)
 Constructor of a photon from a reconstructed ECL cluster that is not matched to any charged track. More...
 
 Particle (const KLMCluster *klmCluster, const int pdgCode=Const::Klong.getPDGCode())
 Constructor from a reconstructed KLM cluster. More...
 
 Particle (const MCParticle *MCparticle)
 Constructor from MC particle (mdst object MCParticle) More...
 
 ~Particle ()
 Destructor.
 
void set4Vector (const TLorentzVector &p4)
 Sets Lorentz vector. More...
 
void setVertex (const TVector3 &vertex)
 Sets position (decay vertex) More...
 
void setMomentumScalingFactor (float momentumScalingFactor)
 Sets momentum scaling. More...
 
void setJacobiMatrix (const TMatrixF &jacobiMatrix)
 Sets 4x6 jacobi matrix. More...
 
void setMomentumVertexErrorMatrix (const TMatrixFSym &errMatrix)
 Sets 7x7 error matrix. More...
 
void setPValue (float pValue)
 Sets chi^2 probability of fit. More...
 
void setProperty (const int properties)
 sets m_properties
 
void updateMomentum (const TLorentzVector &p4, const TVector3 &vertex, const TMatrixFSym &errMatrix, float pValue)
 Sets Lorentz vector, position, 7x7 error matrix and p-value. More...
 
void updateMass (const int pdgCode)
 Updates particle mass with the mass of the particle corresponding to the given PDG. More...
 
void appendDaughter (const Particle *daughter, const bool updateType=true)
 Appends index of daughter to daughters index array. More...
 
void appendDaughter (int particleIndex, const bool updateType=true)
 Appends index of daughter to daughters index array. More...
 
void removeDaughter (const Particle *daughter, const bool updateType=true)
 Removes index of daughter from daughters index array. More...
 
int getPDGCode (void) const
 Returns PDG code. More...
 
float getCharge (void) const
 Returns particle charge. More...
 
EFlavorType getFlavorType () const
 Returns flavor type of the decay (for FS particles: flavor type of particle) More...
 
EParticleSourceObject getParticleSource () const
 Returns particle source as defined with enum EParticleSourceObject. More...
 
unsigned getMdstArrayIndex (void) const
 Returns 0-based index of MDST store array object (0 for composite particles) More...
 
int getProperty () const
 Returns particle property as a bit pattern The values are defined in the PropertyFlags enum and described in detail there. More...
 
float getMass () const
 Returns invariant mass (= nominal for FS particles) More...
 
float getPDGMass (void) const
 Returns uncertainty on the invariant mass (requires valid momentum error matrix) More...
 
float getEnergy () const
 Returns total energy. More...
 
TLorentzVector get4Vector () const
 Returns Lorentz vector. More...
 
TVector3 getMomentum () const
 Returns momentum vector. More...
 
float getMomentumMagnitude () const
 Returns momentum magnitude. More...
 
float getP () const
 Returns momentum magnitude (same as getMomentumMagnitude but with shorter name) More...
 
float getPx () const
 Returns x component of momentum. More...
 
float getPy () const
 Returns y component of momentum. More...
 
float getPz () const
 Returns z component of momentum. More...
 
float getMomentumScalingFactor () const
 Returns momentum scaling factor. More...
 
TVector3 getVertex () const
 Returns vertex position (POCA for charged, IP for neutral FS particles) More...
 
float getX () const
 Returns x component of vertex position. More...
 
float getY () const
 Returns y component of vertex position. More...
 
float getZ () const
 Returns z component of vertex position. More...
 
float getPValue () const
 Returns chi^2 probability of fit if done or -1. More...
 
TMatrixFSym getMomentumVertexErrorMatrix () const
 Returns 7x7 error matrix. More...
 
TMatrixFSym getMomentumErrorMatrix () const
 Returns the 4x4 momentum error matrix. More...
 
TMatrixFSym getVertexErrorMatrix () const
 Returns the 3x3 position error sub-matrix. More...
 
float getCosHelicity (const Particle *mother=nullptr) const
 Returns cosine of the helicity angle The helicity angle is defined in the rest frame of the particle as the angle between the negative momentum of the mother and. More...
 
float getCosHelicityDaughter (unsigned iDaughter, unsigned iGrandDaughter=0) const
 Returns cosine of the helicity angle of the given daughter defined by given grand daughter. More...
 
float getAcoplanarity () const
 Returns acoplanarity angle defined as the angle between the decay planes of the grand daughters in the particle's rest frame This assumes that the particle and its daughters have two daughters each. More...
 
int getMdstSource () const
 Returns unique identifier of final state particle (needed in particle combiner) More...
 
unsigned getNDaughters (void) const
 Returns number of daughter particles. More...
 
const std::vector< int > & getDaughterIndices () const
 Returns a vector of store array indices of daughter particles. More...
 
const std::vector< int > & getDaughterProperties () const
 Returns a vector of properties of daughter particles. More...
 
const ParticlegetDaughter (unsigned i) const
 Returns a pointer to the i-th daughter particle. More...
 
bool forEachDaughter (const std::function< bool(const Particle *)> &function, bool recursive=true, bool includeSelf=true) const
 Apply a function to all daughters of this particle. More...
 
std::vector< Belle2::Particle * > getDaughters () const
 Returns a vector of pointers to daughter particles. More...
 
std::vector< const Belle2::Particle * > getFinalStateDaughters () const
 Returns a vector of pointers to Final State daughter particles. More...
 
std::vector< int > getMdstArrayIndices (EParticleSourceObject type) const
 Returns a vector of StoreArray indices of given MDST dataobjects. More...
 
bool overlapsWith (const Particle *oParticle) const
 Returns true if final state ancestors of oParticle overlap. More...
 
bool isCopyOf (const Particle *oParticle, bool doDetailedComparison=false) const
 Returns true if this Particle and oParticle are copies of each other. More...
 
const TrackgetTrack () const
 Returns the pointer to the Track object that was used to create this Particle (ParticleType == c_Track). More...
 
const TrackFitResultgetTrackFitResult () const
 Returns the pointer to the TrackFitResult that was used to create this Particle (ParticleType == c_Track). More...
 
const V0getV0 () const
 Returns the pointer to the V0 object that was used to create this Particle (if ParticleType == c_V0). More...
 
const PIDLikelihoodgetPIDLikelihood () const
 Returns the pointer to the PIDLikelihood object that is related to the Track, which was used to create this Particle (ParticleType == c_Track). More...
 
const ECLClustergetECLCluster () const
 Returns the pointer to the ECLCluster object that was used to create this Particle (if ParticleType == c_ECLCluster). More...
 
double getECLClusterEnergy () const
 Returns the energy of the ECLCluster for the particle. More...
 
const KLMClustergetKLMCluster () const
 Returns the pointer to the KLMCluster object that was used to create this Particle (ParticleType == c_KLMCluster). More...
 
const MCParticlegetMCParticle () const
 Returns the pointer to the MCParticle object that was used to create this Particle (ParticleType == c_MCParticle). More...
 
std::string getName () const override
 Return name of this particle.
 
std::string getInfoHTML () const override
 Return a short summary of this object's contents in HTML format.
 
void print () const
 Prints the contents of a Particle object to standard output.
 
std::vector< std::string > getExtraInfoNames () const
 get a list of the extra info names
 
void removeExtraInfo ()
 Remove all stored extra info fields.
 
float getExtraInfo (const std::string &name) const
 Return given value if set. More...
 
bool hasExtraInfo (const std::string &name) const
 Return whether the extra info with the given name is set.
 
int getExtraInfoMap () const
 Return the id of the associated ParticleExtraInfoMap or -1 if no map is set.
 
unsigned int getExtraInfoSize () const
 Return the size of the extra info array.
 
void writeExtraInfo (const std::string &name, const float value)
 Sets the user defined extraInfo. More...
 
void setExtraInfo (const std::string &name, float value)
 Sets the user-defined data of given name to the given value. More...
 
void addExtraInfo (const std::string &name, float value)
 Sets the user-defined data of given name to the given value. More...
 
TClonesArray * getArrayPointer () const
 Returns the pointer to the store array which holds the daughter particles. More...
 
int getPDGCodeUsedForFit ()
 Return the always positive PDG code which was used for the track fit (if there was a track fit) of this particle. More...
 
bool wasExactFitHypothesisUsed () const
 Returns true if the type represented by this Particle object was used use as a mass hypothesis during the track of this Particle's parameters.
 
bool isMostLikely () const
 Returns true if the (track-based) particle is created with its most likely mass hypothesis.
 
ECLCluster::EHypothesisBit getECLClusterEHypothesisBit () const
 Returns the ECLCluster EHypothesisBit for this Particle.
 
const ParticlegetParticleFromGeneralizedIndexString (const std::string &generalizedIndex) const
 Explores the decay tree of the particle and returns the (grand^n)daughter identified by a generalized index. More...
 
void updateJacobiMatrix ()
 Propagate the photon energy scaling to jacobian elements that were calculated using energy.
 
void addRelationTo (const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (with caching). More...
 
void addRelationTo (const TObject *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (no caching, can be quite slow). More...
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights). More...
 
template<class TO >
RelationVector< TO > getRelationsTo (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from this object to another store array. More...
 
template<class FROM >
RelationVector< FROM > getRelationsFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from another store array to this object. More...
 
template<class T >
RelationVector< T > getRelationsWith (const std::string &name="", const std::string &namedRelation="") const
 Get the relations between this object and another store array. More...
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation. More...
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation. More...
 
template<class T >
T * getRelated (const std::string &name="", const std::string &namedRelation="") const
 Get the object to or from which this object has a relation. More...
 
template<class TO >
std::pair< TO *, float > getRelatedToWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing to an array. More...
 
template<class FROM >
std::pair< FROM *, float > getRelatedFromWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from an array. More...
 
template<class T >
std::pair< T *, float > getRelatedWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from/to an array. More...
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format. More...
 
std::string getArrayName () const
 Get name of array this object is stored in, or "" if not found.
 
int getArrayIndex () const
 Returns this object's array index (in StoreArray), or -1 if not found.
 

Private Member Functions

void setMomentumPositionErrorMatrix (const TrackFitResult *trackFit)
 Sets the momentum, position and error matrix for this particle (created from charged Track)
 
void resetErrorMatrix ()
 Resets 7x7 error matrix All elements are set to 0.0.
 
void resetJacobiMatrix ()
 Resets 4x6 error matrix All elements are set to 0.0.
 
void storeErrorMatrix (const TMatrixFSym &errMatrix)
 Stores 7x7 error matrix into private member m_errMatrix. More...
 
void storeJacobiMatrix (const TMatrixF &jacobiMatrix)
 Stores 4x6 Jacobi matrix into private member m_jacobiMatrix. More...
 
void fillFSPDaughters (std::vector< const Belle2::Particle * > &fspDaughters) const
 Fill final state particle daughters into a vector. More...
 
void fillDecayChain (std::vector< int > &decayChain) const
 Fill vector with (PDGCode, MdstSource) pairs for the entire decay chain. More...
 
void setFlavorType ()
 sets m_flavorType using m_pdgCode
 
void setMdstArrayIndex (const int arrayIndex)
 set mdst array index
 
int generatePDGCodeFromCharge (const int chargedSign, const Const::ChargedStable &chargedStable)
 Generate the PDG code with correct sign, using the charge. More...
 
 ClassDefOverride (Particle, 14)
 Class to store reconstructed particles.
 
 ClassDef (RelationsInterface, 0)
 defines interface for accessing relations of objects in StoreArray.
 

Private Attributes

int m_pdgCode
 PDG code.
 
int m_pdgCodeUsedForFit = 0
 PDG code used for the track fit.
 
float m_mass
 particle (invariant) mass
 
float m_px
 momentum component x
 
float m_py
 momentum component y
 
float m_pz
 momentum component z
 
float m_momentumScale = 1.0
 momentum scaling factor
 
float m_x
 position component x
 
float m_y
 position component y
 
float m_z
 position component z
 
float m_errMatrix [c_SizeMatrix] = {}
 error matrix (1D representation)
 
float m_jacobiMatrix [c_SizeMatrix] = {}
 error matrix (1D representation)
 
float m_pValue
 chi^2 probability of the fit. More...
 
std::vector< int > m_daughterIndices
 daughter particle indices
 
EFlavorType m_flavorType
 flavor type.
 
EParticleSourceObject m_particleSource
 (mdst) source of particle
 
unsigned m_mdstIndex
 0-based index of MDST store array object
 
int m_properties
 particle property
 
std::vector< int > m_daughterProperties
 daughter particle properties
 
int m_identifier = -1
 Identifier that can be used to identify whether the particle is unique or is a copy or representation of another. More...
 
std::vector< float > m_extraInfo
 Stores associated user defined values. More...
 
TClonesArray * m_arrayPointer
 Internal pointer to DataStore array containing the daughters of this particle. More...
 
DataStore::StoreEntrym_cacheDataStoreEntry
 Cache of the data store entry to which this object belongs.
 
int m_cacheArrayIndex
 Cache of the index in the TClonesArray to which this object belongs.
 

Friends

class ParticleSubset
 

Detailed Description

Class to store reconstructed particles.

This class is a common representation of all particle types, e.g.:

  • final state particles (FS particles):
    • charged kaons/pions/electrons/muons/protons reconstructed as Track
    • photons reconstructed as ECLCluster (without associated Track)
    • long lived neutral kaons reconstructed in KLM (as KLMCluster without associated Track)
  • composite particles:
    • pre-reconstructed V0 particles: Kshort, Lambda baryon, converted photon, ...
    • reconstructed in decays (via combinations)

Private members are limited to those which completely define the particle and that are common to all particle types. These are:

  • particle mass
    • nominal for FS particles
    • invariant for composite particles
  • momentum vector (px, py, pz)
  • position (x, y, z)
    • POCA for charged FS particles
    • IP for photons, Klong and pi0
    • decay vertex for composite particles
  • 7x7 error matrix (order is: px, py, pz, E, x, y, z)
  • chi^2 probability of the fit (track fit, pi0 mass-constr. fit or vertex fit)
  • PDG code
  • vector of StoreArray<Particle> indices of daughter particles

Additional private members are needed in order to make composite particles (via combinations):

  • mdst index of an object from which the FS particle is created
  • source of the object from which the particle is created (see EParticleSourceObject)
  • flavor type (unflavored/flavored) of a decay or flavor type of FS particle

Finally, it is possible to store user-defined floating-point values using addExtraInfo() and getExtraInfo(), identified by a string key. These are general purpose functions for collecting additional information about reconstructed particles that can not be included into any existing data object. Different Particle objects can store different sets of values, and there are no hard-coded limitations on the number of values stored.

Definition at line 74 of file Particle.h.

Member Enumeration Documentation

◆ EFlavorType

describes flavor type, see getFlavorType().

Enumerator
c_Unflavored 

Is its own antiparticle or we don't know whether it is a particle/antiparticle.

c_Flavored 

Is either particle or antiparticle.

Definition at line 92 of file Particle.h.

92  {
93  c_Unflavored = 0,
94  c_Flavored = 1,
95  };
@ c_Unflavored
Is its own antiparticle or we don't know whether it is a particle/antiparticle.
Definition: Particle.h:93
@ c_Flavored
Is either particle or antiparticle.
Definition: Particle.h:94

◆ PropertyFlags

Flags that describe the particle property, which are used in the MC matching.

Enumerator
c_IsUnspecified 

Ordinary particles.

Is the particle unspecified by marking @ ?

c_IsIgnoreRadiatedPhotons 

Is the particle MC matched with the ignore radiated photon flag set?

c_IsIgnoreIntermediate 

Is the particle MC matched with the ignore intermediate resonances flag set?

c_IsIgnoreMassive 

Is the particle MC matched with the ignore missing massive particle flag set?

c_IsIgnoreNeutrino 

Is the particle MC matched with the ignore missing neutrino flag set?

c_IsIgnoreGamma 

Is the particle MC matched with the ignore missing gamma flag set?

c_IsIgnoreBrems 

Is the particle MC matched with the ignore added Brems gamma flag set?

c_IsIgnoreMisID 

Is the particle MC matched with the ignore MisID flag set?

c_IsIgnoreDecayInFlight 

Is the particle MC matched with the ignore DecayInFlight flag set?

Definition at line 114 of file Particle.h.

Constructor & Destructor Documentation

◆ Particle() [1/12]

Particle ( )

Default constructor.

All private members are set to 0. Particle type is set to c_Undefined.

Definition at line 43 of file Particle.cc.

43  :
44  m_pdgCode(0), m_mass(0), m_px(0), m_py(0), m_pz(0), m_x(0), m_y(0), m_z(0),
46  m_arrayPointer(nullptr)
47 {
49 }
float m_mass
particle (invariant) mass
Definition: Particle.h:939
unsigned m_mdstIndex
0-based index of MDST store array object
Definition: Particle.h:953
float m_pValue
chi^2 probability of the fit.
Definition: Particle.h:949
float m_py
momentum component y
Definition: Particle.h:941
TClonesArray * m_arrayPointer
Internal pointer to DataStore array containing the daughters of this particle.
Definition: Particle.h:980
EParticleSourceObject m_particleSource
(mdst) source of particle
Definition: Particle.h:952
void resetErrorMatrix()
Resets 7x7 error matrix All elements are set to 0.0.
Definition: Particle.cc:1048
EFlavorType m_flavorType
flavor type.
Definition: Particle.h:951
float m_pz
momentum component z
Definition: Particle.h:942
float m_px
momentum component x
Definition: Particle.h:940
float m_y
position component y
Definition: Particle.h:945
int m_pdgCode
PDG code.
Definition: Particle.h:937
int m_properties
particle property
Definition: Particle.h:954
float m_z
position component z
Definition: Particle.h:946
float m_x
position component x
Definition: Particle.h:944

◆ Particle() [2/12]

Particle ( const TLorentzVector &  momentum,
const int  pdgCode 
)

Constructor from a Lorentz vector and PDG code.

All other private members are set to their default values (0).

Parameters
momentumLorentz vector
pdgCodePDG code

Definition at line 52 of file Particle.cc.

◆ Particle() [3/12]

Particle ( const TLorentzVector &  momentum,
const int  pdgCode,
EFlavorType  flavorType,
const EParticleSourceObject  particleType,
const unsigned  mdstIndex 
)

Constructor for final state particles.

All other private members are set to their default values (0).

Parameters
momentumLorentz vector
pdgCodePDG code
flavorTypeflavor type
particleTypeparticle source
mdstIndexmdst index

Definition at line 62 of file Particle.cc.

◆ Particle() [4/12]

Particle ( const TLorentzVector &  momentum,
const int  pdgCode,
EFlavorType  flavorType,
const std::vector< int > &  daughterIndices,
TClonesArray *  arrayPointer = nullptr 
)

Constructor for composite particles.

All other private members are set to their default values (0).

Parameters
momentumLorentz vector
pdgCodePDG code
flavorTypedecay flavor type
daughterIndicesindices of daughters in StoreArray<Particle>
arrayPointerpointer to store array which stores the daughters, if the particle itself is stored in the same array the pointer can be automatically determined

Definition at line 79 of file Particle.cc.

◆ Particle() [5/12]

Particle ( const TLorentzVector &  momentum,
const int  pdgCode,
EFlavorType  flavorType,
const std::vector< int > &  daughterIndices,
int  properties,
TClonesArray *  arrayPointer = nullptr 
)

Constructor for composite particles.

All other private members are set to their default values (0).

Parameters
momentumLorentz vector
pdgCodePDG code
flavorTypedecay flavor type
daughterIndicesindices of daughters in StoreArray<Particle>
propertiesparticle property
arrayPointerpointer to store array which stores the daughters, if the particle itself is stored in the same array the pointer can be automatically determined

Definition at line 108 of file Particle.cc.

◆ Particle() [6/12]

Particle ( const TLorentzVector &  momentum,
const int  pdgCode,
EFlavorType  flavorType,
const std::vector< int > &  daughterIndices,
int  properties,
const std::vector< int > &  daughterProperties,
TClonesArray *  arrayPointer = nullptr 
)

Constructor for composite particles.

All other private members are set to their default values (0).

Parameters
momentumLorentz vector
pdgCodePDG code
flavorTypedecay flavor type
daughterIndicesindices of daughters in StoreArray<Particle>
propertiesparticle property
daughterPropertiesdaughter particle properties
arrayPointerpointer to store array which stores the daughters, if the particle itself is stored in the same array the pointer can be automatically determined

Definition at line 140 of file Particle.cc.

◆ Particle() [7/12]

Particle ( const Track track,
const Const::ChargedStable chargedStable 
)

Constructor from a reconstructed track (mdst object Track);.

Parameters
trackpointer to Track object
chargedStableType of charged particle

Definition at line 171 of file Particle.cc.

◆ Particle() [8/12]

Particle ( const int  trackArrayIndex,
const TrackFitResult trackFit,
const Const::ChargedStable chargedStable,
const Const::ChargedStable chargedStableUsedForFit 
)

Constructor from a reconstructed Track given as TrackFitResult.

To be used to create Particle objects from V0 daughters.

Parameters
trackArrayIndextrack StoreArray index
trackFitpointer to TrackFitResult object
chargedStableType of charged particle
chargedStableUsedForFitType of particle which has been used in the track fit. This can be different as chargedStable as we don't fit all tracks with all hypothesis.

Definition at line 204 of file Particle.cc.

◆ Particle() [9/12]

Particle ( int  trackArrayIndex,
const TrackFitResult trackFit,
const Const::ChargedStable chargedStable 
)

Constructor from a reconstructed Track given as TrackFitResult.

To be used to create Particle objects from tracks with full control over the hypothesis (e.g. V0 daughters).

Parameters
trackArrayIndextrack StoreArray index
trackFitpointer to TrackFitResult object
chargedStableType of charged particle

Definition at line 178 of file Particle.cc.

◆ Particle() [10/12]

Particle ( const ECLCluster eclCluster,
const Const::ParticleType type = Const::photon 
)
explicit

Constructor of a photon from a reconstructed ECL cluster that is not matched to any charged track.

Parameters
eclClusterpointer to ECLCluster object
typethe kind of ParticleType we want (photon by default)

Definition at line 231 of file Particle.cc.

◆ Particle() [11/12]

Particle ( const KLMCluster klmCluster,
const int  pdgCode = Const::Klong.getPDGCode() 
)
explicit

Constructor from a reconstructed KLM cluster.

Parameters
klmClusterpointer to KLMCluster object
pdgCodePDG code (Klong by default)

Definition at line 301 of file Particle.cc.

◆ Particle() [12/12]

Particle ( const MCParticle MCparticle)
explicit

Constructor from MC particle (mdst object MCParticle)

Parameters
MCparticlepointer to MCParticle object

Definition at line 327 of file Particle.cc.

Member Function Documentation

◆ addExtraInfo()

void addExtraInfo ( const std::string &  name,
float  value 
)

Sets the user-defined data of given name to the given value.

throws std::runtime_error if variable is already set.

Definition at line 1289 of file Particle.cc.

◆ addRelationTo() [1/2]

void addRelationTo ( const RelationsInterface< BASE > *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (with caching).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 142 of file RelationsObject.h.

◆ addRelationTo() [2/2]

void addRelationTo ( const TObject *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (no caching, can be quite slow).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 155 of file RelationsObject.h.

◆ appendDaughter() [1/2]

void appendDaughter ( const Particle daughter,
const bool  updateType = true 
)

Appends index of daughter to daughters index array.

Parameters
daughterpointer to the daughter particle
updateTypebool to set whether particle type should be updated

Definition at line 677 of file Particle.cc.

◆ appendDaughter() [2/2]

void appendDaughter ( int  particleIndex,
const bool  updateType = true 
)
inline

Appends index of daughter to daughters index array.

Parameters
particleIndexindex of daughter in StoreArray<Particle>
updateTypebool to set whether particle type should be updated

Definition at line 369 of file Particle.h.

◆ copyRelations()

void copyRelations ( const RelationsInterface< BASE > *  sourceObj)
inlineinherited

Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).

Useful if you want to make a complete copy of a StoreArray object to make modifications to it, but retain all information on linked objects.

Note: this only works if sourceObj inherits from the same base (e.g. RelationsObject), and only for related objects that also inherit from the same base.

Definition at line 170 of file RelationsObject.h.

◆ fillDecayChain()

void fillDecayChain ( std::vector< int > &  decayChain) const
private

Fill vector with (PDGCode, MdstSource) pairs for the entire decay chain.

Used to determine if two Particles are copies or not.

Function is called recursively

Parameters
decayChainvector of (PDGCode, MdstSource) pairs for each particle in the decay chain of this particle

Definition at line 1096 of file Particle.cc.

◆ fillFSPDaughters()

void fillFSPDaughters ( std::vector< const Belle2::Particle * > &  fspDaughters) const
private

Fill final state particle daughters into a vector.

Function is called recursively

Parameters
fspDaughtersvector of daughter particles

Definition at line 1083 of file Particle.cc.

◆ forEachDaughter()

bool forEachDaughter ( const std::function< bool(const Particle *)> &  function,
bool  recursive = true,
bool  includeSelf = true 
) const

Apply a function to all daughters of this particle.

Parameters
functionfunction object to run on each daughter. If this function returns true the processing will be stopped immediately.
recursiveif true go through all daughters of daughters as well
includeSelfif true also apply the function to this particle
Returns
true if the function returned true for any of the particles it was applied to

Definition at line 1311 of file Particle.cc.

◆ generatePDGCodeFromCharge()

int generatePDGCodeFromCharge ( const int  chargedSign,
const Const::ChargedStable chargedStable 
)
private

Generate the PDG code with correct sign, using the charge.

Parameters
chargedSigncharge of the particle
chargedStableType of charged particle

Definition at line 1335 of file Particle.cc.

◆ get4Vector()

TLorentzVector get4Vector ( ) const
inline

Returns Lorentz vector.

Returns
Lorentz vector

Definition at line 477 of file Particle.h.

◆ getAcoplanarity()

float getAcoplanarity ( ) const

Returns acoplanarity angle defined as the angle between the decay planes of the grand daughters in the particle's rest frame This assumes that the particle and its daughters have two daughters each.

Returns
acoplanarity angle

Definition at line 546 of file Particle.cc.

◆ getArrayPointer()

TClonesArray* getArrayPointer ( ) const
inline

Returns the pointer to the store array which holds the daughter particles.

Warning
TClonesArray is dangerously easy to misuse, please avoid.

Definition at line 866 of file Particle.h.

◆ getCharge()

float getCharge ( void  ) const

Returns particle charge.

Returns
particle charge in units of elementary charge

Definition at line 630 of file Particle.cc.

◆ getCosHelicity()

float getCosHelicity ( const Particle mother = nullptr) const

Returns cosine of the helicity angle The helicity angle is defined in the rest frame of the particle as the angle between the negative momentum of the mother and.

  • the momentum of the first daughter for two body decays
  • the momentum of the photon for pi0 Dalitz decays
  • the direction perpendicular to the daughter momenta for three body decays
    Parameters
    mothermother particle, if not given the center of mass system is taken as mother frame
    Returns
    cosine of the helicity angle

Definition at line 469 of file Particle.cc.

◆ getCosHelicityDaughter()

float getCosHelicityDaughter ( unsigned  iDaughter,
unsigned  iGrandDaughter = 0 
) const

Returns cosine of the helicity angle of the given daughter defined by given grand daughter.

Parameters
iDaughter0-based index of daughter particle
iGrandDaughter0-based index of grand daughter particle
Returns
cosine of the helicity angle

Definition at line 513 of file Particle.cc.

◆ getDaughter()

const Particle * getDaughter ( unsigned  i) const

Returns a pointer to the i-th daughter particle.

Parameters
i0-based index of daughter particle
Returns
Pointer to i-th daughter particles

Definition at line 639 of file Particle.cc.

◆ getDaughterIndices()

const std::vector<int>& getDaughterIndices ( ) const
inline

Returns a vector of store array indices of daughter particles.

Returns
vector of store array indices of daughter particle

Definition at line 656 of file Particle.h.

◆ getDaughterProperties()

const std::vector<int>& getDaughterProperties ( ) const
inline

Returns a vector of properties of daughter particles.

Returns
vector of daughter properties

Definition at line 665 of file Particle.h.

◆ getDaughters()

std::vector< Belle2::Particle * > getDaughters ( ) const

Returns a vector of pointers to daughter particles.

Returns
vector of pointers to daughter particles

Definition at line 645 of file Particle.cc.

◆ getECLCluster()

const ECLCluster * getECLCluster ( ) const

Returns the pointer to the ECLCluster object that was used to create this Particle (if ParticleType == c_ECLCluster).

Returns the pointer to the most energetic ECLCluster matched to the track (if ParticleType == c_Track). NULL pointer is returned, if the Particle has no relation to an ECLCluster (either the particle is a different type or there was no track match).

Returns
const pointer to the ECLCluster

Definition at line 860 of file Particle.cc.

◆ getECLClusterEnergy()

double getECLClusterEnergy ( ) const

Returns the energy of the ECLCluster for the particle.

The return value depends on the ECLCluster hypothesis.

Returns
energy of the ECLCluster

Definition at line 888 of file Particle.cc.

◆ getEnergy()

float getEnergy ( ) const
inline

Returns total energy.

Returns
total energy

Definition at line 467 of file Particle.h.

◆ getExtraInfo()

float getExtraInfo ( const std::string &  name) const

Return given value if set.

throws std::runtime_error if variable is not set.

Definition at line 1242 of file Particle.cc.

◆ getFinalStateDaughters()

std::vector< const Belle2::Particle * > getFinalStateDaughters ( ) const

Returns a vector of pointers to Final State daughter particles.

Returns
vector of pointers to final state daughter particles

Definition at line 657 of file Particle.cc.

◆ getFlavorType()

EFlavorType getFlavorType ( ) const
inline

Returns flavor type of the decay (for FS particles: flavor type of particle)

Returns
flavor type (0=unflavored, 1=flavored)

Definition at line 407 of file Particle.h.

◆ getInfo()

std::string getInfo ( ) const
inlineinherited

Return a short summary of this object's contents in raw text format.

Returns the contents of getInfoHTML() while translating line-breaks etc.

Note
: You don't need to implement this function (it's not virtual), getInfoHTML() is enough.

Definition at line 370 of file RelationsObject.h.

◆ getKLMCluster()

const KLMCluster * getKLMCluster ( ) const

Returns the pointer to the KLMCluster object that was used to create this Particle (ParticleType == c_KLMCluster).

Returns the pointer to the KLMCluster object associated to this Particle if ParticleType == c_Track. NULL pointer is returned, if the Particle has no relation to the KLMCluster.

Returns
const pointer to the KLMCluster

Definition at line 895 of file Particle.cc.

◆ getMass()

float getMass ( ) const
inline

Returns invariant mass (= nominal for FS particles)

Returns
invariant mass

Definition at line 445 of file Particle.h.

◆ getMCParticle()

const MCParticle * getMCParticle ( ) const

Returns the pointer to the MCParticle object that was used to create this Particle (ParticleType == c_MCParticle).

Returns the best MC match for this particle (if ParticleType == c_Track or c_ECLCluster or c_KLMCluster) NULL pointer is returned, if the Particle was not made from MCParticle or not matched.

Returns
const pointer to the MCParticle

Definition at line 911 of file Particle.cc.

◆ getMdstArrayIndex()

unsigned getMdstArrayIndex ( void  ) const
inline

Returns 0-based index of MDST store array object (0 for composite particles)

Returns
index of MDST store array object

Definition at line 425 of file Particle.h.

◆ getMdstArrayIndices()

std::vector< int > getMdstArrayIndices ( EParticleSourceObject  type) const

Returns a vector of StoreArray indices of given MDST dataobjects.

Parameters
typeEParticleSourceObject corresponding to a given MDST dataobject
Returns
vector of StoreArray indices of a given MDST dataobjects

Definition at line 665 of file Particle.cc.

◆ getMdstSource()

int getMdstSource ( ) const

Returns unique identifier of final state particle (needed in particle combiner)

Returns
unique identifier of final state particle

Definition at line 377 of file Particle.cc.

◆ getMomentum()

TVector3 getMomentum ( ) const
inline

Returns momentum vector.

Returns
momentum vector

Definition at line 488 of file Particle.h.

◆ getMomentumErrorMatrix()

TMatrixFSym getMomentumErrorMatrix ( ) const

Returns the 4x4 momentum error matrix.

Returns
The 4x4 momentum error matrix (order: px,py,pz,E)

Definition at line 445 of file Particle.cc.

◆ getMomentumMagnitude()

float getMomentumMagnitude ( ) const
inline

Returns momentum magnitude.

Returns
momentum magnitude

Definition at line 497 of file Particle.h.

◆ getMomentumScalingFactor()

float getMomentumScalingFactor ( ) const
inline

Returns momentum scaling factor.

Returns
momentum scaling factor

Definition at line 542 of file Particle.h.

◆ getMomentumVertexErrorMatrix()

TMatrixFSym getMomentumVertexErrorMatrix ( ) const

Returns 7x7 error matrix.

Returns
7x7 error matrix (order: px,py,pz,E,x,y,z)

Definition at line 430 of file Particle.cc.

◆ getNDaughters()

unsigned getNDaughters ( void  ) const
inline

Returns number of daughter particles.

Returns
number of daughter particles

Definition at line 647 of file Particle.h.

◆ getP()

float getP ( ) const
inline

Returns momentum magnitude (same as getMomentumMagnitude but with shorter name)

Returns
momentum magnitude

Definition at line 506 of file Particle.h.

◆ getParticleFromGeneralizedIndexString()

const Particle * getParticleFromGeneralizedIndexString ( const std::string &  generalizedIndex) const

Explores the decay tree of the particle and returns the (grand^n)daughter identified by a generalized index.

The generalized index consists of a colon-separated list of daughter indexes, starting from the root particle: 0:1:3 identifies the fourth daughter (3) of the second daughter (1) of the first daughter (0) of the mother particle.

Parameters
generalizedIndexthe generalized index of the particle to be returned
Returns
a particle in the decay tree of the root particle.

Definition at line 925 of file Particle.cc.

◆ getParticleSource()

EParticleSourceObject getParticleSource ( ) const
inline

Returns particle source as defined with enum EParticleSourceObject.

Returns
particle type

Definition at line 416 of file Particle.h.

◆ getPDGCode()

int getPDGCode ( void  ) const
inline

Returns PDG code.

Returns
PDG code

Definition at line 392 of file Particle.h.

◆ getPDGCodeUsedForFit()

int getPDGCodeUsedForFit ( )
inline

Return the always positive PDG code which was used for the track fit (if there was a track fit) of this particle.

This can be different than the Particle's PDG id as not all mass hypothesis are fitted during the reconstruction.

Definition at line 878 of file Particle.h.

◆ getPDGMass()

float getPDGMass ( void  ) const

Returns uncertainty on the invariant mass (requires valid momentum error matrix)

Returns
mass error Returns particle nominal mass
nominal mass

Definition at line 621 of file Particle.cc.

◆ getPIDLikelihood()

const PIDLikelihood * getPIDLikelihood ( ) const

Returns the pointer to the PIDLikelihood object that is related to the Track, which was used to create this Particle (ParticleType == c_Track).

NULL pointer is returned, if the Particle was not made from Track or if the Track has no relation to the PIDLikelihood

Returns
const pointer to the Track

Definition at line 840 of file Particle.cc.

◆ getProperty()

int getProperty ( ) const
inline

Returns particle property as a bit pattern The values are defined in the PropertyFlags enum and described in detail there.

Returns
Combination of Properties describing the particle property

Definition at line 436 of file Particle.h.

◆ getPValue()

float getPValue ( ) const
inline

Returns chi^2 probability of fit if done or -1.

Returns
p-value of fit (nan means no fit done)

Definition at line 587 of file Particle.h.

◆ getPx()

float getPx ( ) const
inline

Returns x component of momentum.

Returns
x component of momentum

Definition at line 515 of file Particle.h.

◆ getPy()

float getPy ( ) const
inline

Returns y component of momentum.

Returns
y component of momentum

Definition at line 524 of file Particle.h.

◆ getPz()

float getPz ( ) const
inline

Returns z component of momentum.

Returns
z component of momentum

Definition at line 533 of file Particle.h.

◆ getRelated()

T* getRelated ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to or from which this object has a relation.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 278 of file RelationsObject.h.

◆ getRelatedFrom()

FROM* getRelatedFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object from which this object has a relation.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 263 of file RelationsObject.h.

◆ getRelatedFromWithWeight()

std::pair<FROM*, float> getRelatedFromWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from an array.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 314 of file RelationsObject.h.

◆ getRelatedTo()

TO* getRelatedTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to which this object has a relation.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 248 of file RelationsObject.h.

◆ getRelatedToWithWeight()

std::pair<TO*, float> getRelatedToWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing to an array.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 297 of file RelationsObject.h.

◆ getRelatedWithWeight()

std::pair<T*, float> getRelatedWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from/to an array.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 331 of file RelationsObject.h.

◆ getRelationsFrom()

RelationVector<FROM> getRelationsFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from another store array to this object.

Template Parameters
FROMThe class of objects from which the relations point.
Parameters
nameThe name of the store array from which the relations point. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 212 of file RelationsObject.h.

◆ getRelationsTo()

RelationVector<TO> getRelationsTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from this object to another store array.

Template Parameters
TOThe class of objects to which the relations point.
Parameters
nameThe name of the store array to which the relations point. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 197 of file RelationsObject.h.

◆ getRelationsWith()

RelationVector<T> getRelationsWith ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations between this object and another store array.

Relations in both directions are returned.

Template Parameters
TThe class of objects to or from which the relations point.
Parameters
nameThe name of the store array to or from which the relations point. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 230 of file RelationsObject.h.

◆ getTrack()

const Track * getTrack ( ) const

Returns the pointer to the Track object that was used to create this Particle (ParticleType == c_Track).

NULL pointer is returned, if the Particle was not made from Track.

Returns
const pointer to the Track

Definition at line 814 of file Particle.cc.

◆ getTrackFitResult()

const TrackFitResult * getTrackFitResult ( ) const

Returns the pointer to the TrackFitResult that was used to create this Particle (ParticleType == c_Track).

NULL pointer is returned, if the Particle was not made from Track.

Returns
const pointer to the TrackFitResult

Definition at line 823 of file Particle.cc.

◆ getV0()

const V0 * getV0 ( ) const

Returns the pointer to the V0 object that was used to create this Particle (if ParticleType == c_V0).

NULL pointer is returned if the Particle was not made from a V0.

Returns
const pointer to the V0

Definition at line 849 of file Particle.cc.

◆ getVertex()

TVector3 getVertex ( ) const
inline

Returns vertex position (POCA for charged, IP for neutral FS particles)

Returns
vertex position

Definition at line 551 of file Particle.h.

◆ getVertexErrorMatrix()

TMatrixFSym getVertexErrorMatrix ( ) const

Returns the 3x3 position error sub-matrix.

Returns
The 3x3 position error matrix (order: x,y,z)

Definition at line 457 of file Particle.cc.

◆ getX()

float getX ( ) const
inline

Returns x component of vertex position.

Returns
x component of vertex position

Definition at line 560 of file Particle.h.

◆ getY()

float getY ( ) const
inline

Returns y component of vertex position.

Returns
y component of vertex position

Definition at line 569 of file Particle.h.

◆ getZ()

float getZ ( ) const
inline

Returns z component of vertex position.

Returns
z component of vertex position

Definition at line 578 of file Particle.h.

◆ isCopyOf()

bool isCopyOf ( const Particle oParticle,
bool  doDetailedComparison = false 
) const

Returns true if this Particle and oParticle are copies of each other.

Copies are defined as: o) The decay chain of both Particles is exactly the same o) Both Particles are constructed from exactly the same final state particles

  • Examples: M1 -> (C1 -> F1 F2) (C2 -> F3 F4) M2 -> (C1 -> F1 F2) (C2 -> F3 F5) M3 -> (C1 -> F1 F2) F3 F4 M4 -> (C1 -> F1 F2) (C2 -> F3 F4) and M4 is kinematically fitted (its momentum updated)

M1 and M2 are not copies since condition 2 is not fulfilled. M1 and M3 are not copies since condition 1 is not fulfilled. M1 and M4 are copies since both conditions are fulfilled.

Parameters
oParticlepointer to other particle
doDetailedComparisonif true, this means that particles of different PDG codes, but created from the same track or cluster will be indicated as copies. Returns B2FATAL in case of comparison of c_MCParticle type to a non c_MCParticle.
Returns
true if particles are copies of each-other, otherwise false

Definition at line 721 of file Particle.cc.

◆ overlapsWith()

bool overlapsWith ( const Particle oParticle) const

Returns true if final state ancestors of oParticle overlap.

Parameters
oParticlepointer to particle
Returns
true if overlap, otherwise false

Definition at line 706 of file Particle.cc.

◆ removeDaughter()

void removeDaughter ( const Particle daughter,
const bool  updateType = true 
)

Removes index of daughter from daughters index array.

Parameters
daughterpointer to the daughter particle
updateTypebool whether particle type should be updated if last daughter was removed

Definition at line 689 of file Particle.cc.

◆ set4Vector()

void set4Vector ( const TLorentzVector &  p4)
inline

Sets Lorentz vector.

Parameters
p4Lorentz vector

Definition at line 276 of file Particle.h.

◆ setExtraInfo()

void setExtraInfo ( const std::string &  name,
float  value 
)

Sets the user-defined data of given name to the given value.

throws std::runtime_error if variable isn't set.

Definition at line 1270 of file Particle.cc.

◆ setJacobiMatrix()

void setJacobiMatrix ( const TMatrixF &  jacobiMatrix)

Sets 4x6 jacobi matrix.

Parameters
jacobiMatrix4x6 momentum and vertex error matrix (order: px,py,pz,E,x,y,z)

Definition at line 417 of file Particle.cc.

◆ setMomentumScalingFactor()

void setMomentumScalingFactor ( float  momentumScalingFactor)
inline

Sets momentum scaling.

Parameters
momentumScalingFactorscaling factor

Definition at line 299 of file Particle.h.

◆ setMomentumVertexErrorMatrix()

void setMomentumVertexErrorMatrix ( const TMatrixFSym &  errMatrix)

Sets 7x7 error matrix.

Parameters
errMatrix7x7 momentum and vertex error matrix (order: px,py,pz,E,x,y,z)

Definition at line 403 of file Particle.cc.

◆ setPValue()

void setPValue ( float  pValue)
inline

Sets chi^2 probability of fit.

Parameters
pValuep-value of fit

Definition at line 320 of file Particle.h.

◆ setVertex()

void setVertex ( const TVector3 &  vertex)
inline

Sets position (decay vertex)

Parameters
vertexposition

Definition at line 288 of file Particle.h.

◆ storeErrorMatrix()

void storeErrorMatrix ( const TMatrixFSym &  errMatrix)
private

Stores 7x7 error matrix into private member m_errMatrix.

Parameters
errMatrix7x7 error matrix

Definition at line 1060 of file Particle.cc.

◆ storeJacobiMatrix()

void storeJacobiMatrix ( const TMatrixF &  jacobiMatrix)
private

Stores 4x6 Jacobi matrix into private member m_jacobiMatrix.

Parameters
jacobiMatrix4x6 error matrix

Definition at line 1071 of file Particle.cc.

◆ updateMass()

void updateMass ( const int  pdgCode)

Updates particle mass with the mass of the particle corresponding to the given PDG.

Parameters
pdgCodePDG code of the particle with the desired mass

Definition at line 614 of file Particle.cc.

◆ updateMomentum()

void updateMomentum ( const TLorentzVector &  p4,
const TVector3 &  vertex,
const TMatrixFSym &  errMatrix,
float  pValue 
)
inline

Sets Lorentz vector, position, 7x7 error matrix and p-value.

Parameters
p4Lorentz vector
vertexpoint (position or vertex)
errMatrix7x7 momentum and vertex error matrix (order: px,py,pz,E,x,y,z)
pValuechi^2 probability of the fit

Definition at line 340 of file Particle.h.

◆ writeExtraInfo()

void writeExtraInfo ( const std::string &  name,
const float  value 
)

Sets the user defined extraInfo.

Adds it if necessary, overwrites existing ones if they share the same name.

Definition at line 1261 of file Particle.cc.

Member Data Documentation

◆ m_arrayPointer

TClonesArray* m_arrayPointer
mutableprivate

Internal pointer to DataStore array containing the daughters of this particle.

This is a transient member and will not be written to file. The pointer is set by getArrayPointer() when first called.

Definition at line 980 of file Particle.h.

◆ m_extraInfo

std::vector<float> m_extraInfo
private

Stores associated user defined values.

Order is given by string -> index mapping in ParticleExtraInfoMap. entry 0 is reserved specifies which map to use.

Definition at line 971 of file Particle.h.

◆ m_identifier

int m_identifier = -1
private

Identifier that can be used to identify whether the particle is unique or is a copy or representation of another.

For example a kaon and pion particles constructed from the same Track are representations of the same physical object in the detector and cannot be used in the reconstruction of the same decay chain

Definition at line 964 of file Particle.h.

◆ m_pValue

float m_pValue
private

chi^2 probability of the fit.

Default is nan

Definition at line 949 of file Particle.h.


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