![]() |
Belle II Software
release-05-02-19
|
Class to store reconstructed particles. More...
#include <Particle.h>
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 | 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 uncertaint on the invariant mass (requiers 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... | |
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 Particle * | getDaughter (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 ancessors 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 Track * | getTrack () const |
Returns the pointer to the Track object that was used to create this Particle (ParticleType == c_Track). More... | |
const TrackFitResult * | getTrackFitResult () const |
Returns the pointer to the TrackFitResult that was used to create this Particle (ParticleType == c_Track). More... | |
const V0 * | getV0 () const |
Returns the pointer to the V0 object that was used to create this Particle (if ParticleType == c_V0). More... | |
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). More... | |
const ECLCluster * | getECLCluster () 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 KLMCluster * | getKLMCluster () const |
Returns the pointer to the KLMCluster object that was used to create this Particle (ParticleType == c_KLMCluster). More... | |
const MCParticle * | getMCParticle () const |
Returns the pointer to the MCParticle object that was used to create this Particle (ParticleType == c_MCParticle). More... | |
virtual std::string | getName () const |
Return name of this particle. | |
virtual std::string | getInfoHTML () const |
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 wether 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. | |
ECLCluster::EHypothesisBit | getECLClusterEHypothesisBit () const |
Returns the ECLCluster EHypothesisBit for this Particle. | |
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. More... | |
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 | storeErrorMatrix (const TMatrixFSym &errMatrix) |
Stores 7x7 error matrix into private member m_errMatrix. 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... | |
ClassDef (Particle, 12) | |
Class to store reconstructed particles. | |
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_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_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::StoreEntry * | m_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 |
Class to store reconstructed particles.
This class is a common representation of all particle types, e.g.:
Private members are limited to those which completely define the particle and that are common to all particle types. These are:
Additional private members are needed in order to make composite particles (via combinations):
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 77 of file Particle.h.
enum 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 95 of file Particle.h.
enum PropertyFlags |
Flags that describe the particle property, which are used in the MC matching.
Definition at line 117 of file Particle.h.
Particle | ( | ) |
Default constructor.
All private members are set to 0. Particle type is set to c_Undefined.
Definition at line 47 of file Particle.cc.
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).
momentum | Lorentz vector |
pdgCode | PDG code |
Definition at line 56 of file Particle.cc.
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).
momentum | Lorentz vector |
pdgCode | PDG code |
flavorType | flavor type |
particleType | particle source |
mdstIndex | mdst index |
Definition at line 66 of file Particle.cc.
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).
momentum | Lorentz vector |
pdgCode | PDG code |
flavorType | decay flavor type |
daughterIndices | indices of daughters in StoreArray<Particle> |
arrayPointer | pointer 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 83 of file Particle.cc.
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).
momentum | Lorentz vector |
pdgCode | PDG code |
flavorType | decay flavor type |
daughterIndices | indices of daughters in StoreArray<Particle> |
properties | particle property |
arrayPointer | pointer 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 112 of file Particle.cc.
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).
momentum | Lorentz vector |
pdgCode | PDG code |
flavorType | decay flavor type |
daughterIndices | indices of daughters in StoreArray<Particle> |
particle | property |
daughter | particle properties |
arrayPointer | pointer 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 144 of file Particle.cc.
Particle | ( | const Track * | track, |
const Const::ChargedStable & | chargedStable | ||
) |
Constructor from a reconstructed track (mdst object Track);.
track | pointer to Track object |
chargedStable | Type of charged particle |
Definition at line 175 of file Particle.cc.
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.
trackArrayIndex | track StoreArray index |
trackFit | pointer to TrackFitResult object |
chargedStable | Type of charged particle |
chargedStableUsedForFit | Type 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 208 of file Particle.cc.
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).
trackArrayIndex | track StoreArray index |
trackFit | pointer to TrackFitResult object |
chargedStable | Type of charged particle |
Definition at line 182 of file Particle.cc.
|
explicit |
Constructor of a photon from a reconstructed ECL cluster that is not matched to any charged track.
eclCluster | pointer to ECLCluster object |
type | the kind of ParticleType we want (photon by default) |
Definition at line 235 of file Particle.cc.
|
explicit |
Constructor from a reconstructed KLM cluster.
klmCluster | pointer to KLMCluster object |
pdgCode | PDG code (Klong by default) |
Definition at line 271 of file Particle.cc.
|
explicit |
Constructor from MC particle (mdst object MCParticle)
MCparticle | pointer to MCParticle object |
Definition at line 297 of file Particle.cc.
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 1224 of file Particle.cc.
|
inlineinherited |
Add a relation from this object to another object (with caching).
object | The object to which the relation should point. |
weight | The weight of the relation. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 144 of file RelationsObject.h.
|
inlineinherited |
Add a relation from this object to another object (no caching, can be quite slow).
object | The object to which the relation should point. |
weight | The weight of the relation. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 157 of file RelationsObject.h.
void appendDaughter | ( | const Particle * | daughter, |
const bool | updateType = true |
||
) |
Appends index of daughter to daughters index array.
daughter | pointer to the daughter particle |
updateType | bool to set whether particle type should be updated |
Definition at line 633 of file Particle.cc.
|
inline |
Appends index of daughter to daughters index array.
particleIndex | index of daughter in StoreArray<Particle> |
updateType | bool to set whether particle type should be updated |
Definition at line 357 of file Particle.h.
|
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 172 of file RelationsObject.h.
|
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
decayChain | vector of (PDGCode, MdstSource) pairs for each particle in the decay chain of this particle |
Definition at line 1034 of file Particle.cc.
|
private |
Fill final state particle daughters into a vector.
Function is called recursively
fspDaughters | vector of daughter particles |
Definition at line 1021 of file Particle.cc.
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.
function | function object to run on each daughter. If this function returns true the processing will be stopped immeddiately. |
recursive | if true go through all daughters of daughters as well |
includeSelf | if true also apply the function to this particle |
Definition at line 1246 of file Particle.cc.
|
private |
Generate the PDG code with correct sign, using the charge.
chargedSign | charge of the particle |
chargedStable | Type of charged particle |
Definition at line 1270 of file Particle.cc.
|
inline |
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.
Definition at line 502 of file Particle.cc.
|
inline |
Returns the pointer to the store array which holds the daughter particles.
Definition at line 844 of file Particle.h.
float getCharge | ( | void | ) | const |
Returns particle charge.
Definition at line 586 of file Particle.cc.
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.
mother | mother particle, if not given the center of mass system is taken as mother frame |
Definition at line 425 of file Particle.cc.
float getCosHelicityDaughter | ( | unsigned | iDaughter, |
unsigned | iGrandDaughter = 0 |
||
) | const |
Returns cosine of the helicity angle of the given daughter defined by given grand daughter.
iDaughter | 0-based index of daughter particle |
iGrandDaughter | 0-based index of grand daughter particle |
Definition at line 469 of file Particle.cc.
const Particle * getDaughter | ( | unsigned | i | ) | const |
Returns a pointer to the i-th daughter particle.
i | 0-based index of daughter particle |
Definition at line 595 of file Particle.cc.
|
inline |
Returns a vector of store array indices of daughter particles.
Definition at line 634 of file Particle.h.
|
inline |
Returns a vector of properties of daughter particles.
Definition at line 643 of file Particle.h.
std::vector< Belle2::Particle * > getDaughters | ( | ) | const |
Returns a vector of pointers to daughter particles.
Definition at line 601 of file Particle.cc.
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).
Definition at line 816 of file Particle.cc.
double getECLClusterEnergy | ( | ) | const |
Returns the energy of the ECLCluster for the particle.
The return value depends on the ECLCluster hypothesis.
Definition at line 844 of file Particle.cc.
|
inline |
float getExtraInfo | ( | const std::string & | name | ) | const |
Return given value if set.
throws std::runtime_error if variable is not set.
Definition at line 1177 of file Particle.cc.
std::vector< const Belle2::Particle * > getFinalStateDaughters | ( | ) | const |
Returns a vector of pointers to Final State daughter particles.
Definition at line 613 of file Particle.cc.
|
inline |
Returns flavor type of the decay (for FS particles: flavor type of particle)
Definition at line 395 of file Particle.h.
|
inlineinherited |
Return a short summary of this object's contents in raw text format.
Returns the contents of getInfoHTML() while translating line-breaks etc.
Definition at line 372 of file RelationsObject.h.
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.
Definition at line 850 of file Particle.cc.
|
inline |
Returns invariant mass (= nominal for FS particles)
Definition at line 433 of file Particle.h.
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.
Definition at line 866 of file Particle.cc.
|
inline |
Returns 0-based index of MDST store array object (0 for composite particles)
Definition at line 413 of file Particle.h.
std::vector< int > getMdstArrayIndices | ( | EParticleSourceObject | type | ) | const |
Returns a vector of StoreArray indices of given MDST dataobjects.
type | EParticleSourceObject corresponding to a given MDST dataobject |
Definition at line 621 of file Particle.cc.
int getMdstSource | ( | ) | const |
Returns unique identifier of final state particle (needed in particle combiner)
Definition at line 347 of file Particle.cc.
|
inline |
TMatrixFSym getMomentumErrorMatrix | ( | ) | const |
Returns the 4x4 momentum error matrix.
Definition at line 401 of file Particle.cc.
|
inline |
TMatrixFSym getMomentumVertexErrorMatrix | ( | ) | const |
Returns 7x7 error matrix.
Definition at line 386 of file Particle.cc.
|
inline |
Returns number of daughter particles.
Definition at line 625 of file Particle.h.
|
inline |
Returns momentum magnitude (same as getMomentumMagnitude but with shorter name)
Definition at line 493 of file Particle.h.
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.
generalizedIndex | the generalized index of the particle to be returned |
Definition at line 880 of file Particle.cc.
|
inline |
Returns particle source as defined with enum EParticleSourceObject.
Definition at line 404 of file Particle.h.
|
inline |
|
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 856 of file Particle.h.
float getPDGMass | ( | void | ) | const |
Returns uncertaint on the invariant mass (requiers valid momentum error matrix)
Definition at line 577 of file Particle.cc.
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
Definition at line 796 of file Particle.cc.
|
inline |
Returns particle property as a bit pattern The values are defined in the PropertyFlags enum and described in detail there.
Definition at line 424 of file Particle.h.
|
inline |
Returns chi^2 probability of fit if done or -1.
Definition at line 565 of file Particle.h.
|
inline |
Returns x component of momentum.
Definition at line 502 of file Particle.h.
|
inline |
Returns y component of momentum.
Definition at line 511 of file Particle.h.
|
inline |
Returns z component of momentum.
Definition at line 520 of file Particle.h.
|
inlineinherited |
Get the object to or from which this object has a relation.
T | The class of objects to or from which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 280 of file RelationsObject.h.
|
inlineinherited |
Get the object from which this object has a relation.
FROM | The class of objects from which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 265 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing from an array.
FROM | The class of objects from which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 316 of file RelationsObject.h.
|
inlineinherited |
Get the object to which this object has a relation.
TO | The class of objects to which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 250 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing to an array.
TO | The class of objects to which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 299 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing from/to an array.
T | The class of objects to or from which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 333 of file RelationsObject.h.
|
inlineinherited |
Get the relations that point from another store array to this object.
FROM | The class of objects from which the relations point. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 214 of file RelationsObject.h.
|
inlineinherited |
Get the relations that point from this object to another store array.
TO | The class of objects to which the relations point. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 199 of file RelationsObject.h.
|
inlineinherited |
Get the relations between this object and another store array.
Relations in both directions are returned.
T | The class of objects to or from which the relations point. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 232 of file RelationsObject.h.
const Track * getTrack | ( | ) | const |
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.
Definition at line 779 of file Particle.cc.
const V0 * getV0 | ( | ) | const |
|
inline |
Returns vertex position (POCA for charged, IP for neutral FS particles)
Definition at line 529 of file Particle.h.
TMatrixFSym getVertexErrorMatrix | ( | ) | const |
Returns the 3x3 position error sub-matrix.
Definition at line 413 of file Particle.cc.
|
inline |
Returns x component of vertex position.
Definition at line 538 of file Particle.h.
|
inline |
Returns y component of vertex position.
Definition at line 547 of file Particle.h.
|
inline |
Returns z component of vertex position.
Definition at line 556 of file Particle.h.
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
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.
oParticle | pointer to other particle |
doDetailedComparison | if 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. |
Definition at line 677 of file Particle.cc.
bool overlapsWith | ( | const Particle * | oParticle | ) | const |
Returns true if final state ancessors of oParticle overlap.
oParticle | pointer to particle |
Definition at line 662 of file Particle.cc.
void removeDaughter | ( | const Particle * | daughter, |
const bool | updateType = true |
||
) |
Removes index of daughter from daughters index array.
daughter | pointer to the daughter particle |
updateType | bool whether particle type should be updated if last daughter was removed |
Definition at line 645 of file Particle.cc.
|
inline |
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 1205 of file Particle.cc.
void setMomentumVertexErrorMatrix | ( | const TMatrixFSym & | errMatrix | ) |
Sets 7x7 error matrix.
errMatrix | 7x7 momentum and vertex error matrix (order: px,py,pz,E,x,y,z) |
Definition at line 373 of file Particle.cc.
|
inline |
Sets chi^2 probability of fit.
pValue | p-value of fit |
Definition at line 308 of file Particle.h.
|
inline |
|
private |
Stores 7x7 error matrix into private member m_errMatrix.
errMatrix | 7x7 error matrix |
Definition at line 1009 of file Particle.cc.
void updateMass | ( | const int | pdgCode | ) |
Updates particle mass with the mass of the particle corresponding to the given PDG.
pdgCode | PDG code of the particle with the desired mass |
Definition at line 570 of file Particle.cc.
|
inline |
Sets Lorentz vector, position, 7x7 error matrix and p-value.
p4 | Lorentz vector |
vertex | point (position or vertex) |
errMatrix | 7x7 momentum and vertex error matrix (order: px,py,pz,E,x,y,z) |
pValue | chi^2 probability of the fit |
Definition at line 328 of file Particle.h.
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 1196 of file Particle.cc.
|
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 947 of file Particle.h.
|
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 938 of file Particle.h.
|
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 931 of file Particle.h.
|
private |