Implementation of MCParticle. More...
#include <IMPL/MCParticleImpl.h>
Public Member Functions | |
virtual | ~MCParticleImpl () |
Copy c'tor. More... | |
virtual int | id () const |
Returns an object id for internal (debugging) use in LCIO. | |
virtual const EVENT::MCParticleVec & | getParents () const |
Returns the parents of this particle. | |
virtual const EVENT::MCParticleVec & | getDaughters () const |
Returns the daughters of this particle. | |
virtual const double * | getEndpoint () const |
Returns the i-th daughter of this particle. More... | |
virtual int | getPDG () const |
Returns the number of daughters of this particle. More... | |
virtual int | getGeneratorStatus () const |
Returns the status for particles from the generator 0 empty line 1 undecayed particle, stable in the generator 2 particle decayed in the generator 3 documentation line. | |
virtual int | getSimulatorStatus () const |
Returns the status for particles from the simulation, e.g. More... | |
virtual bool | isCreatedInSimulation () const |
True if the particle has been created by the simulation program (rather than the generator). | |
virtual bool | isBackscatter () const |
True if the particle is the result of a backscatter from a calorimeter shower. | |
virtual bool | vertexIsNotEndpointOfParent () const |
True if the particle's vertex is not the endpoint of the parent particle. | |
virtual bool | isDecayedInTracker () const |
True if the particle has interacted in a tracking region. | |
virtual bool | isDecayedInCalorimeter () const |
True if the particle has interacted in a calorimeter region. | |
virtual bool | hasLeftDetector () const |
True if the particle has left the world volume undecayed. | |
virtual bool | isStopped () const |
True if the particle has been stopped by the simulation program. | |
virtual bool | isOverlay () const |
True if the particle has been overlayed by the simulation (or digitization) program. | |
virtual const double * | getVertex () const |
Returns the production vertex of the particle. | |
virtual float | getTime () const |
The creation time of the particle in [ns] wrt. More... | |
virtual const double * | getMomentum () const |
Returns the particle momentum at the production vertex. | |
virtual const double * | getMomentumAtEndpoint () const |
Returns the particle momentum at the endpoint. | |
virtual double | getMass () const |
Returns the mass of the particle in [GeV]. | |
virtual float | getCharge () const |
Returns the particle's charge. | |
virtual double | getEnergy () const |
Returns the energy of the particle (at the vertex) in [GeV] computed from the particle's momentum and mass. | |
virtual const float * | getSpin () const |
Returns the spin. | |
virtual const int * | getColorFlow () const |
Returns the color flow. | |
void | addParent (EVENT::MCParticle *mom) |
Adds a parent particle. | |
void | setPDG (int pdg) |
Sets the parent. More... | |
void | setGeneratorStatus (int status) |
Sets the Generator status. | |
void | setSimulatorStatus (int status) |
Sets the Simulator status. | |
void | setVertex (const double vtx[3]) |
Sets the production vertex. | |
void | setTime (float time) |
Sets the createion time. | |
void | setEndpoint (const double pnt[3]) |
Sets the particle endpoint. | |
void | setMomentum (const float p[3]) |
Sets the momentum. | |
void | setMomentum (const double p[3]) |
Sets the momentum. | |
void | setMomentumAtEndpoint (const float p[3]) |
Sets the momentum at the endpoint. | |
void | setMomentumAtEndpoint (const double p[3]) |
Sets the momentum at the endpoint. | |
void | setMass (float m) |
Sets the mass. | |
void | setCharge (float c) |
Sets the charge. | |
void | setSpin (const float spin[3]) |
Sets the spin. | |
void | setColorFlow (const int cflow[2]) |
Sets the color flow. | |
virtual void | setCreatedInSimulation (bool val) |
virtual void | setBackscatter (bool val) |
virtual void | setVertexIsNotEndpointOfParent (bool val) |
virtual void | setDecayedInTracker (bool val) |
virtual void | setDecayedInCalorimeter (bool val) |
virtual void | setHasLeftDetector (bool val) |
virtual void | setStopped (bool val) |
virtual void | setOverlay (bool val) |
![]() | |
virtual | ~MCParticle () |
Destructor. | |
![]() | |
virtual | ~LCObject () |
Destructor. | |
virtual LCObject * | clone () const |
Returns an object id for internal (debugging) use in LCIO. More... | |
![]() | |
template<class V > | |
V::ext_type | ext () |
Provides access to an extension object - the type and ownership is defined by the class V which should be a subtype of LCExtension, LCOwnedExtension, LCExtensionVector, LCExtensionList,... | |
template<class V > | |
const V::ext_type | ext () const |
template<class V > | |
V::rel_type | rel () |
Provides read access to relations - the object types and their connectivity are defined by the class V which has to be a subtype of either LC1To1Relation, LC1ToNRelation or LCNToNRelation. | |
![]() | |
virtual int | simpleUID () const |
Protected Member Functions | |
void | addDaughter (EVENT::MCParticle *daughter) |
Adds a daughter particle - only called from addParent(). | |
![]() | |
template<class V > | |
V::ptr & | ptr () const |
Returns the reference to the pointer to the extension/relation object. | |
![]() | |
virtual void | setReadOnly (bool readOnly) |
void | checkAccess () throw ( EVENT::ReadOnlyException ) |
void | checkAccess (const char *what) throw ( EVENT::ReadOnlyException ) |
Protected Attributes | |
int | _pdg |
int | _genstatus |
std::bitset< 32 > | _simstatus |
double | _vertex [3] |
double | _endpoint [3] |
double | _pEndpoint [3] |
double | _p [3] |
double | _mass |
float | _charge |
float | _time |
EVENT::MCParticleVec | _parents |
EVENT::MCParticleVec | _daughters |
bool | _endpointSet |
float | _spin [3] |
int | _colorFlow [2] |
![]() | |
bool | _readOnly |
int | _id |
Additional Inherited Members | |
![]() | |
typedef MCParticle | lcobject_type |
Useful typedef for template programming with LCIO. | |
![]() | |
static const int | BITEndpoint = 31 |
static const int | BITCreatedInSimulation = 30 |
static const int | BITBackscatter = 29 |
static const int | BITVertexIsNotEndpointOfParent = 28 |
static const int | BITDecayedInTracker = 27 |
static const int | BITDecayedInCalorimeter = 26 |
static const int | BITLeftDetector = 25 |
static const int | BITStopped = 24 |
static const int | BITOverlay = 23 |
|
virtual |
Copy c'tor.
Destructor.
|
virtual |
Returns the i-th daughter of this particle.
Same as getDaughter() except for return type.
Implements EVENT::MCParticle.
|
virtual |
Returns the number of daughters of this particle.
Returns the PDG code of the particle.
Implements EVENT::MCParticle.
Referenced by UTIL::LCStdHepRdr::readEvent(), and UTIL::LCStdHepRdrNew::readEvent().
|
virtual |
Returns the status for particles from the simulation, e.g.
decayed in flight. Bits 31-16 are used to decode the information. Use the followng boolean functions to determine the proper simulator status:
Implements EVENT::MCParticle.
|
virtual |
The creation time of the particle in [ns] wrt.
the event, e.g. for preassigned decays or decays in flight from the simulator.
Implements EVENT::MCParticle.
void IMPL::MCParticleImpl::setPDG | ( | int | pdg | ) |
Sets the parent.
Sets a second parent.Sets the PDG code.
Referenced by HEPEVTIMPL::HEPEVT::fromHepEvt(), UTIL::LCStdHepRdrNew::readEvent(), and UTIL::LCStdHepRdr::readEvent().