![]() |
ATLAS Offline Software
|
(HepMC) Monte Carlo particle. More...
#include <TruthParticle.h>
Public Types | |
| typedef ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase > | TruthParticleImpl_t |
| typedef std::size_t | evtIndex_t |
| typedef TruthParticleNavigation | navigable_type |
| publish the type of the base class (ie: 'traits-itize' it) | |
| typedef TruthParticleMomentum | momentum_type |
| publish the type of the base class (ie: 'traits-itize' it) | |
| typedef TruthParticleBase | particle_type |
| publish the type of the base class (ie: 'traits-itize' it) | |
| typedef ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase > | self_type |
| publish the type of the base class (ie: 'traits-itize' it) | |
| enum | Kind |
Public Member Functions | |
| TruthParticle () | |
| Default constructor. | |
| TruthParticle (const TruthParticle &rhs) | |
| Copy constructor. | |
| TruthParticle (HepMC::ConstGenParticlePtr genParticle, const TruthParticleContainer *container=0) | |
Constructor with parameters: construct a TruthParticle from a HepMC::GenParticle and the TruthParticleContainer holding this TruthParticle. | |
| TruthParticle & | operator= (const TruthParticle &rhs) |
| Assignment operator. | |
| ~TruthParticle () | |
| Default constructor: | |
| HepMC::ConstGenParticlePtr | genMother (const std::size_t i=0) const |
| Retrieve the GenParticle mother of this TruthParticle. | |
| HepMC::ConstGenParticlePtr | genParticle () const |
| Retrieve the GenParticle this TruthParticle has been made from (if any) | |
| HepMC::ConstGenParticlePtr | genChild (const std::size_t i) const |
| Retrieve the i-th child (GenParticle) of this TruthParticle. | |
| const TruthParticle * | mother (const std::size_t i=0) const |
| Retrieve the i-th mother (TruthParticle) of this TruthParticle. | |
| const TruthParticle * | child (const std::size_t i) const |
| Retrieve the i-th child (TruthParticle) of this TruthParticle. | |
| bool | hasMother (const int pdgId) const |
| Return true if the given PDG::id to match can be found within the parents of this TruthParticle. | |
| bool | hasChild (const int pdgId) const |
| Return true if the given PDG::id to match can be found within the children of this TruthParticle. | |
| bool | hasMother (const int pdgId, std::vector< unsigned int > &indices) const |
| Return true if the given PDG::id to match can be found within the parents of this TruthParticle. | |
| bool | hasChild (const int pdgId, std::vector< unsigned int > &indices) const |
| Return true if the given PDG::id to match can be found within the children of this TruthParticle. | |
| bool | hasEtIsol () const |
Return true if one has filled the Et isolation infos for this TruthParticle. | |
| double | etIsol (const TruthParticleParameters::ConeSize coneIdx) const |
| Return the transverse energy in a given cone size of isolation. | |
| const TruthEtIsolations::EtIsol_t * | etIsol () const |
| Return the transverse energies for all the isolation cones. | |
| unsigned int | nParents () const |
| Number of parents of this particle. | |
| unsigned int | nDecay () const |
| Number of children of this particle. | |
| CLHEP::HepLorentzVector | transformVector (const HepMC::FourVector &) const |
| returns a Pointer to a CLHEP::LorentzVector from a HepMC::FourVector | |
| CLHEP::HepLorentzVector | pDecay (const std::size_t i) const |
| Return the 4-vec of i-th child of this particle. | |
| int | pdgDecay (const std::size_t i) const |
| Return the PDG-Id of the i-th child of this particle. | |
| operator const HepMC::GenParticle & () const | |
conversion operator: convert a TruthParticle to its underlying HepMC::GenParticle | |
| evtIndex_t | genEventIndex () const |
| void | setCharge (const ChargeType charge) |
| Set the charge of this TruthParticle. | |
| void | set4Mom (const HepMC::FourVector &hlv) |
| void | setGenEventIndex (size_t index) |
| set the GenEvent index | |
| virtual void | set4Mom (const I4Momentum &p4) |
| set 4Momentum (will throw exception if cannot be implemented) | |
| virtual void | set4Mom (const I4Momentum *const p4) |
| set 4Momentum (will throw exception if cannot be implemented) | |
| virtual void | set4Mom (const CLHEP::HepLorentzVector &hlv) |
| set 4Momentum (will throw exception if cannot be implemented) | |
| const navigable_type & | navigableBase () const |
| access to underlying base type (INavigable-like) | |
| navigable_type & | navigableBase () |
| access to underlying base type (INavigable-like) | |
| const momentum_type & | momentumBase () const |
| access to underlying base type (I4Momentum-like) | |
| momentum_type & | momentumBase () |
| access to underlying base type (I4Momentum-like) | |
| const particle_type & | particleBase () const |
| access to underlying base type (IParticle-like) | |
| particle_type & | particleBase () |
| access to underlying base type (IParticle-like) | |
| virtual void | set_dataType (ParticleDataType::DataType x) |
| virtual void | set_charge (ChargeType x) |
| virtual void | set_pdgId (int x) |
| virtual void | set_origin (const VxContainer *theContainer, int index) |
| virtual void | set_origin (const VxContainer *theContainer, const Trk::VxCandidate *vertex) |
| void | set_origin (const ElementLink< VxContainer > &origin) |
| int | status () const |
| Forwards the HepMC::GenParticle::status() information. | |
| const HepMC::Flow | flow () const |
| Forwards the HepMC::GenParticle::flow() information. | |
| int | flow (int code_index) const |
| Forwards the HepMC::GenParticle::flow(idx) information. | |
| const HepMC::Polarization | polarization () const |
| Forwards the HepMC::GenParticle::polarization() information. | |
| int | barcode () const |
| Forwards the HepMC::GenParticle::barcode() information. | |
| long | compressedExtBarCode () const |
| Forwards the HepMC::GenParticle::barcode() information. | |
| virtual void | fillToken (INavigationToken &thisToken) const |
| virtual void | fillToken (INavigationToken &thisToken, const std::any &weight) const |
| AthenaBarCode_t | getAthenaBarCode () const |
| void | setAthenaBarCode (AthenaBarCode_t) |
| bool | hasSameAthenaBarCode (const IAthenaBarCode &) const |
| bool | hasSameAthenaBarCodeExceptVersion (const IAthenaBarCode &) const |
| AthenaBarCodeVersion_t | getVersion () const |
| void | newVersion () |
| void | setVersion (AthenaBarCodeVersion_t newversion) |
| virtual double | px () const |
| x component of momentum | |
| virtual double | py () const |
| y component of momentum | |
| virtual double | pz () const |
| z component of momentum | |
| virtual double | m () const |
| mass | |
| virtual double | m2 () const |
| mass squared | |
| virtual double | p () const |
| mass momentum magnitude | |
| virtual double | p2 () const |
| square of momentum magnitude | |
| virtual double | rapidity () const |
| rapidity | |
| virtual double | eta () const |
| pseudo rapidity | |
| virtual double | phi () const |
| phi in [-pi,pi[ | |
| virtual double | e () const |
| energy | |
| virtual double | et () const |
| transverse energy defined to be e*sin(theta) | |
| virtual double | pt () const |
| transverse momentum | |
| virtual double | iPt () const |
| inverse of transverse momentum | |
| virtual double | cosPhi () const |
| cosinus phi | |
| virtual double | sinPhi () const |
| sinus phi | |
| virtual double | tanTh () const |
| tan theta | |
| virtual double | cosTh () const |
| cosinus theta | |
| virtual double | sinTh () const |
| sinus theta | |
| virtual double | cotTh () const |
| cottan theta | |
| virtual CLHEP::HepLorentzVector | hlv () const |
| CLHEP HepLorentzVector. | |
| virtual const I4MomentumError * | errors () const |
| Access to errors, if available; returns 0 if no errors. | |
| virtual I4Momentum::Kind | kind () const |
| add Kind which tells what kind (P4XYZ) the underlying implementation has | |
| virtual std::ostream & | dump (std::ostream &out) const |
Print I4Momentum content. | |
| virtual ParticleDataType::DataType | dataType () const |
| Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the following values: {Data = 0, Full = 1, FastShower = 2, Fast = 3, True = 4}. | |
| virtual const Trk::RecVertex * | origin () const |
| Return a RecVertex corresponding to particle Origin. | |
| virtual const ElementLink< VxContainer > & | originLink () const |
| Return an ElementLink corresponding to particle's Origin. | |
| virtual bool | hasCharge () const |
| method to check if charge information is available | |
| virtual ChargeType | charge () const |
| returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed to an int and ask jets to extend this interface | |
| virtual bool | hasPdgId () const |
| method to check if particle id information is available | |
| virtual int | pdgId () const |
| Return enum indicating particle id the enum file is available in Event/EventKernel/PdtPdg.h. | |
Static Public Attributes | |
| static const AthenaBarCode_t | UNDEFINEDBARCODE |
| static const AthenaBarCode_t | UNDEFINEDVERSION |
Protected Member Functions | |
| void | setGenParticle (HepMC::ConstGenParticlePtr particle) |
| Fill the data members of ParticleBase from the GenParticle. | |
Protected Attributes | |
| const TruthParticleContainer * | m_container |
| Pointer to the collection holding ourself. | |
| std::vector< int > | m_mothers |
| vector of barcodes of all the mothers of this particle. | |
| std::vector< int > | m_children |
| vector of barcodes of all the children of this particle. | |
| evtIndex_t | m_nGenEventIdx |
| the index of the GenEvent this particle is in | |
Private Attributes | |
| TruthParticleNavigation | m_nav |
| The navigable part. | |
| TruthParticleMomentum | m_mom |
| The 4-momentum part. | |
| TruthParticleBase | m_part |
| The particle-id part. | |
(HepMC) Monte Carlo particle.
Adds isolation information. Adapts the HepMC::GenParticle to the IParticle interface.
Definition at line 53 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
| typedef std::size_t TruthParticle::evtIndex_t |
Definition at line 71 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
inherited |
publish the type of the base class (ie: 'traits-itize' it)
Definition at line 52 of file ParticleImpl.h.
|
inherited |
publish the type of the base class (ie: 'traits-itize' it)
Definition at line 48 of file ParticleImpl.h.
|
inherited |
publish the type of the base class (ie: 'traits-itize' it)
Definition at line 56 of file ParticleImpl.h.
|
inherited |
publish the type of the base class (ie: 'traits-itize' it)
Definition at line 62 of file ParticleImpl.h.
| typedef ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase > TruthParticle::TruthParticleImpl_t |
Definition at line 69 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
inherited |
Definition at line 33 of file I4Momentum.h.
| TruthParticle::TruthParticle | ( | ) |
Default constructor.
Definition at line 33 of file TruthParticle.cxx.
| TruthParticle::TruthParticle | ( | const TruthParticle & | rhs | ) |
Copy constructor.
Definition at line 44 of file TruthParticle.cxx.
| TruthParticle::TruthParticle | ( | HepMC::ConstGenParticlePtr | genParticle, |
| const TruthParticleContainer * | container = 0 ) |
Constructor with parameters: construct a TruthParticle from a HepMC::GenParticle and the TruthParticleContainer holding this TruthParticle.
Definition at line 56 of file TruthParticle.cxx.
|
inline |
Default constructor:
Definition at line 282 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
inline |
Forwards the HepMC::GenParticle::barcode() information.
Definition at line 310 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
virtualinherited |
returns charge as a typedef ChargeType currently Charge Type is a double for jets this may be changed to an int and ask jets to extend this interface
Implements IParticle.
| const TruthParticle * TruthParticle::child | ( | const std::size_t | i | ) | const |
Retrieve the i-th child (TruthParticle) of this TruthParticle.
Definition at line 98 of file TruthParticle.cxx.
|
inline |
Forwards the HepMC::GenParticle::barcode() information.
Definition at line 144 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
virtualinherited |
cosinus phi
Implements I4Momentum.
|
virtualinherited |
cosinus theta
Implements I4Momentum.
|
virtualinherited |
cottan theta
Implements I4Momentum.
|
virtualinherited |
|
virtualinherited |
Print I4Momentum content.
Implements I4Momentum.
|
virtualinherited |
energy
Implements I4Momentum.
|
virtualinherited |
Access to errors, if available; returns 0 if no errors.
Implements I4Momentum.
|
virtualinherited |
transverse energy defined to be e*sin(theta)
Implements I4Momentum.
|
virtualinherited |
pseudo rapidity
Implements I4Momentum.
| const TruthEtIsolations::EtIsol_t * TruthParticle::etIsol | ( | ) | const |
Return the transverse energies for all the isolation cones.
Definition at line 188 of file TruthParticle.cxx.
| double TruthParticle::etIsol | ( | const TruthParticleParameters::ConeSize | coneIdx | ) | const |
Return the transverse energy in a given cone size of isolation.
Note that the size of the code must be one of the encoded sizes (see TruthParticleParamDefs.h file) and that the index is checked for out of bounds.
Definition at line 194 of file TruthParticle.cxx.
|
virtualinherited |
INavigable interface forwarding
Implements INavigable.
|
virtualinherited |
Implements INavigable.
|
inline |
Forwards the HepMC::GenParticle::flow() information.
Definition at line 295 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
inline |
Forwards the HepMC::GenParticle::flow(idx) information.
Definition at line 300 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
| HepMC::ConstGenParticlePtr TruthParticle::genChild | ( | const std::size_t | i | ) | const |
Retrieve the i-th child (GenParticle) of this TruthParticle.
Definition at line 118 of file TruthParticle.cxx.
|
inline |
Definition at line 217 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
| HepMC::ConstGenParticlePtr TruthParticle::genMother | ( | const std::size_t | i = 0 | ) | const |
Retrieve the GenParticle mother of this TruthParticle.
Definition at line 107 of file TruthParticle.cxx.
|
inline |
Retrieve the GenParticle this TruthParticle has been made from (if any)
Definition at line 285 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
virtualinherited |
IAthenaBarCode interface forwarding
Reimplemented from IAthenaBarCode.
|
virtualinherited |
Reimplemented from IAthenaBarCode.
|
virtualinherited |
method to check if charge information is available
Implements IParticle.
| bool TruthParticle::hasChild | ( | const int | pdgId | ) | const |
Return true if the given PDG::id to match can be found within the children of this TruthParticle.
Definition at line 141 of file TruthParticle.cxx.
| bool TruthParticle::hasChild | ( | const int | pdgId, |
| std::vector< unsigned int > & | indices ) const |
Return true if the given PDG::id to match can be found within the children of this TruthParticle.
It also fills the given vector with the indices toward the matching particles.
Definition at line 168 of file TruthParticle.cxx.
| bool TruthParticle::hasEtIsol | ( | ) | const |
Return true if one has filled the Et isolation infos for this TruthParticle.
Definition at line 183 of file TruthParticle.cxx.
| bool TruthParticle::hasMother | ( | const int | pdgId | ) | const |
Return true if the given PDG::id to match can be found within the parents of this TruthParticle.
Definition at line 129 of file TruthParticle.cxx.
| bool TruthParticle::hasMother | ( | const int | pdgId, |
| std::vector< unsigned int > & | indices ) const |
Return true if the given PDG::id to match can be found within the parents of this TruthParticle.
It also fills the given vector with the indices toward the matching particles.
Definition at line 153 of file TruthParticle.cxx.
|
virtualinherited |
method to check if particle id information is available
Implements IParticle.
|
virtualinherited |
Reimplemented from IAthenaBarCode.
|
virtualinherited |
Reimplemented from IAthenaBarCode.
|
virtualinherited |
CLHEP HepLorentzVector.
Implements I4Momentum.
|
virtualinherited |
inverse of transverse momentum
Implements I4Momentum.
|
virtualinherited |
add Kind which tells what kind (P4XYZ) the underlying implementation has
Implements I4Momentum.
|
virtualinherited |
mass
Implements I4Momentum.
|
virtualinherited |
mass squared
Implements I4Momentum.
|
inherited |
access to underlying base type (I4Momentum-like)
|
inherited |
access to underlying base type (I4Momentum-like)
| const TruthParticle * TruthParticle::mother | ( | const std::size_t | i = 0 | ) | const |
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
Definition at line 90 of file TruthParticle.cxx.
|
inherited |
access to underlying base type (INavigable-like)
|
inherited |
access to underlying base type (INavigable-like)
|
inline |
Number of children of this particle.
Definition at line 325 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
virtualinherited |
Reimplemented from IAthenaBarCode.
|
inline |
Number of parents of this particle.
Definition at line 322 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
inline |
conversion operator: convert a TruthParticle to its underlying HepMC::GenParticle
Definition at line 334 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
| TruthParticle & TruthParticle::operator= | ( | const TruthParticle & | rhs | ) |
Assignment operator.
Definition at line 71 of file TruthParticle.cxx.
|
virtualinherited |
Return a RecVertex corresponding to particle Origin.
Implements IParticle.
|
virtualinherited |
Return an ElementLink corresponding to particle's Origin.
Implements IParticle.
|
virtualinherited |
mass momentum magnitude
Implements I4Momentum.
|
virtualinherited |
square of momentum magnitude
Implements I4Momentum.
|
inherited |
access to underlying base type (IParticle-like)
|
inherited |
access to underlying base type (IParticle-like)
| CLHEP::HepLorentzVector TruthParticle::pDecay | ( | const std::size_t | i | ) | const |
Return the 4-vec of i-th child of this particle.
Definition at line 205 of file TruthParticle.cxx.
| int TruthParticle::pdgDecay | ( | const std::size_t | i | ) | const |
Return the PDG-Id of the i-th child of this particle.
Definition at line 221 of file TruthParticle.cxx.
|
virtualinherited |
Return enum indicating particle id the enum file is available in Event/EventKernel/PdtPdg.h.
Implements IParticle.
|
virtualinherited |
phi in [-pi,pi[
Implements I4Momentum.
|
inline |
Forwards the HepMC::GenParticle::polarization() information.
Definition at line 305 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
virtualinherited |
transverse momentum
Implements I4Momentum.
|
virtualinherited |
|
virtualinherited |
y component of momentum
Implements I4Momentum.
|
virtualinherited |
z component of momentum
Implements I4Momentum.
|
virtualinherited |
rapidity
Implements I4Momentum.
|
virtual |
set 4Momentum (will throw exception if cannot be implemented)
Reimplemented from ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >.
|
inline |
Definition at line 228 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
virtual |
set 4Momentum (will throw exception if cannot be implemented)
Reimplemented from ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >.
|
virtual |
set 4Momentum (will throw exception if cannot be implemented)
Reimplemented from ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >.
|
virtualinherited |
|
virtualinherited |
|
inherited |
|
virtualinherited |
|
virtualinherited |
|
virtualinherited |
|
virtualinherited |
Reimplemented from IAthenaBarCode.
|
inline |
Set the charge of this TruthParticle.
Definition at line 340 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
inline |
set the GenEvent index
Definition at line 351 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
protected |
Fill the data members of ParticleBase from the GenParticle.
Definition at line 240 of file TruthParticle.cxx.
|
virtualinherited |
Reimplemented from IAthenaBarCode.
|
virtualinherited |
sinus phi
Implements I4Momentum.
|
virtualinherited |
sinus theta
Implements I4Momentum.
|
inline |
Forwards the HepMC::GenParticle::status() information.
HepMC::GenParticle forwarding interface
Definition at line 290 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
virtualinherited |
tan theta
Implements I4Momentum.
|
inline |
returns a Pointer to a CLHEP::LorentzVector from a HepMC::FourVector
Definition at line 345 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
protected |
vector of barcodes of all the children of this particle.
This will be forwarded to the container holding ourself to be able to retrieve TruthParticle pointers.
Definition at line 266 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
protected |
Pointer to the collection holding ourself.
Definition at line 254 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
privateinherited |
The 4-momentum part.
Definition at line 310 of file ParticleImpl.h.
|
protected |
vector of barcodes of all the mothers of this particle.
This will be forwarded to the container holding ourself to be able to retrieve TruthParticle pointers.
Definition at line 260 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
privateinherited |
The navigable part.
Definition at line 307 of file ParticleImpl.h.
|
protected |
the index of the GenEvent this particle is in
Definition at line 269 of file PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h.
|
privateinherited |
The particle-id part.
Definition at line 313 of file ParticleImpl.h.
|
staticinherited |
Definition at line 52 of file AthenaKernel/AthenaKernel/IAthenaBarCode.h.
|
staticinherited |
Definition at line 53 of file AthenaKernel/AthenaKernel/IAthenaBarCode.h.