 |
Belle II Software
release-05-02-19
|
14 #include <framework/gearbox/Const.h>
15 #include <framework/core/FrameworkExceptions.h>
16 #include <framework/datastore/RelationsObject.h>
18 #include <TClonesArray.h>
20 #include <TLorentzVector.h>
125 unsigned int getStatus(
unsigned short int bitmask = USHRT_MAX)
const {
return m_status & bitmask; }
132 bool hasStatus(
unsigned short int bitmask)
const {
return (
m_status & bitmask) == bitmask; }
570 virtuality = (fabs(E2 - (p2 + m2)) >
c_epsilon * E2);
int getFirstDaughter() const
Get 1-based index of first daughter, 0 if no daughters.
int getIndex() const
Get 1-based index of the particle in the corresponding MCParticle list.
float getEnergy() const
Return particle energy in GeV.
float m_productionVertex_y
production vertex of particle, y component
int m_lastDaughter
1-based index of last daughter particle in collection, 0 if no daughters
@ c_StoppedInDetector
bit 3: Particle was stopped in the detector (the simulation volume).
float getCharge() const
Return the particle charge defined in TDatabasePDG.
@ c_IsPHOTOSPhoton
bit 8: Particle is an radiative photon from PHOTOS
virtual std::string getInfoHTML() const
Return a short summary of this object's contents in HTML format.
float getDecayTime() const
Return the decay time in ns.
StatusBit
Exception is thrown if the requested index for the last child is out of range.
void setMassFromPDG()
Sets the mass for the particle from the particle's PDG code.
TClonesArray * m_plist
Internal pointer to DataStore Array containing particles belonging to this collection.
void setSeenInDetector(Const::DetectorSet set)
Set the seen-in flags for the entire Belle II subdetectors for an Monte Carlo particle.
void fixParticleList() const
Search the DataStore for the corresponding MCParticle array.
@ c_IsFSRPhoton
bit 7: Particle is from finial state radiation
float m_decayVertex_y
decay vertex of particle, y component
@ c_IsVirtual
bit 4: Particle is virtual and not going to Geant4.
float m_productionVertex_x
production vertex of particle, x component
@ c_IsISRPhoton
bit 6: Particle is from initial state radiation
void setVirtual()
Set particle to virtual.
void setDecayVertex(const TVector3 &vertex)
Set decay vertex.
float m_productionVertex_z
production vertex of particle, z component
bool hasSeenInDetector(Const::DetectorSet set) const
Return if the seen-in flag for a specific subdetector is set or not.
void setStatus(unsigned short int status)
Set Status code for the particle.
The DetectorSet class for sets of detector IDs in the form of EDetector values.
void removeSeenInDetector(Const::DetectorSet set)
Unflag/Remove the bit if the MC particle is not seen in a specific subdetector.
int getArrayIndex() const
Get 0-based index of the particle in the corresponding MCParticle list.
int getSecondaryPhysicsProcess() const
Returns the physics process type of a secondary particle.
void setInitial()
Set particle to initial.
bool isPrimaryParticle() const
Check if particle is a primary particle which was created by the generator (and not,...
@ c_LeftDetector
bit 2: Particle left the detector (the simulation volume).
void addSeenInDetector(Const::DetectorSet set)
Flag/Add a bit if the MC particle is seen in a specific subdetector.
bool isInitial() const
Check if particle is an initial particle such as ISR.
TVector3 getDecayVertex() const
Return decay vertex.
bool hasValidVertex() const
Indication whether vertex and time information is useful or just default.
virtual std::string getName() const
Return name of this particle.
float m_momentum_x
momentum of particle, x component
bool hasStatus(unsigned short int bitmask) const
Return if specific status bit is set.
unsigned int getStatus(unsigned short int bitmask=USHRT_MAX) const
Return status code of particle.
void setProductionTime(float time)
Set production time.
float m_mass
mass of the particle
float m_decayVertex_x
decay vertex of particle, x component
float m_decayVertex_z
decay vertex of particle, z component
void setSecondaryPhysicsProcess(int physicsProcess)
Sets the physics process type of a secondary particle.
float m_decayTime
decay time
int m_firstDaughter
1-based index of first daughter particle in collection, 0 if no daughters
Abstract base class for different kinds of events.
TVector3 getVertex() const
Return production vertex position, shorthand for getProductionVertex().
unsigned short int m_status
transient 1-based index of particle
void setPDG(int pdg)
Set PDG code of the particle.
@ c_Initial
bit 5: Particle is initial such as e+ or e- and not going to Geant4
float m_momentum_z
momentum of particle, z component
TVector3 getProductionVertex() const
Return production vertex position.
int getPDG() const
Return PDG code of particle.
void setProductionVertex(const TVector3 &vertex)
Set production vertex position.
void addStatus(unsigned short int bitmask)
Add bitmask to current status.
float getMass() const
Return the particle mass in GeV.
MCParticle * getMother() const
Returns a pointer to the mother particle.
int getLastDaughter() const
Get 1-based index of last daughter, 0 if no daughters.
bool isVirtual() const
Check if particle is virtual.
int m_index
transient pointer to particle list
Const::DetectorSet getSeenInDetector() const
Return the seen-in flags of the entire Belle II subdetectors for an MC particle.
@ c_StableInGenerator
bit 1: Particle is stable, i.e., not decaying in the generator.
void removeStatus(unsigned short int bitmask)
Remove bitmask from current status.
MCParticle()
Default constructor for ROOT.
std::vector< Belle2::MCParticle * > getDaughters() const
Get vector of all daughter particles, empty vector if none.
@ c_IsRadiativePhoton
combined flag to test whether the particle is radiative
void setEnergy(float energy)
Set energy.
int m_pdg
PDG-Code of the particle.
TLorentzVector get4Vector() const
Return 4Vector of particle.
Const::DetectorSet m_seenIn
Each bit is a seen-in flag for the corresoponding subdetector of Belle II.
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
float getLifetime() const
Return the lifetime in ns.
float m_productionTime
production time
TVector3 getMomentum() const
Return momentum.
void setMass(float mass)
Set particle mass.
void set4Vector(const TLorentzVector &p4)
Sets the 4Vector of particle.
bool contains(const DetectorSet &set) const
Check whether this set contains another set.
A Class to store the Monte Carlo particle information.
static const double c_epsilon
limit of precision for two doubles to be the same.
#define BELLE2_DEFINE_EXCEPTION(ClassName, Message)
Macro that defines an exception with the given message template.
int getNDaughters() const
Return number of daughter MCParticles.
void setDecayTime(float time)
Set decay time.
float m_energy
energy of the particle
bool m_validVertex
indication wether vertex and time information is useful or just default
void setMomentum(const TVector3 &momentum)
Set particle momentum.
int m_secondaryPhysicsProcess
physics process type of a secondary particle
void setValidVertex(bool valid)
Set indication wether vertex and time information is valid or just default.
@ c_PrimaryParticle
bit 0: Particle is primary particle.
float getProductionTime() const
Return production time in ns.
int m_mother
1-based index of the mother particle
float m_momentum_y
momentum of particle, y component
ClassDef(MCParticle, 5)
A Class to store the Monte Carlo particle information.