13#ifndef MCPARTICLEEVENT_TRUTHPARTICLE_H
14#define MCPARTICLEEVENT_TRUTHPARTICLE_H
27#include "CLHEP/Vector/LorentzVector.h"
54 TruthParticleNavigation,
55 TruthParticleMomentum,
122 const HepMC::Flow
flow()
const;
126 int flow(
int code_index )
const;
168 bool hasMother(
const int pdgId, std::vector<unsigned int>& indices )
const;
174 bool hasChild(
const int pdgId, std::vector<unsigned int>& indices )
const;
198 unsigned int nDecay()
const;
201 CLHEP::HepLorentzVector
transformVector(
const HepMC::FourVector& )
const;
204 CLHEP::HepLorentzVector
pDecay(
const std::size_t i )
const;
207 int pdgDecay(
const std::size_t i )
const;
214 operator const HepMC::GenParticle&()
const;
316inline int TruthParticle::id()
const
334TruthParticle::operator
const HepMC::GenParticle&()
const
347 CLHEP::HepLorentzVector
hlv(fv.x(),fv.y(),fv.z(),fv.t());
double charge(const T &p)
double ChargeType
typedef ChargeType used to anticipate changes here
std::ostream & operator<<(std::ostream &out, const TruthParticle &mc)
NavigableTerminalNode TruthParticleNavigation
virtual int pdgId() const
const momentum_type & momentumBase() const
virtual CLHEP::HepLorentzVector hlv() const
virtual void set4Mom(const I4Momentum &p4)
const particle_type & particleBase() const
virtual ChargeType charge() const
Trk::RecVertex inherits from Trk::Vertex.
McAod::EtIsolations EtIsol_t
An array of doubles of fixed size to modelize the Et isolations for different values of isolation rad...
void setCharge(const ChargeType charge)
Set the charge of this TruthParticleBase.
HepMC::ConstGenParticlePtr genParticle() const
return the HepMC::GenParticle which is being proxied
virtual void set4Mom(const I4Momentum *const theI4Mom)
set 4Momentum (will throw exception if cannot be implemented)
(HepMC) Monte Carlo particle.
const HepMC::Polarization polarization() const
Forwards the HepMC::GenParticle::polarization() information.
void setGenEventIndex(size_t index)
set the GenEvent index
std::vector< int > m_children
vector of barcodes of all the children of this particle.
~TruthParticle()
Default constructor:
void set4Mom(const HepMC::FourVector &hlv)
int barcode() const
Forwards the HepMC::GenParticle::barcode() information.
evtIndex_t genEventIndex() const
int status() const
Forwards the HepMC::GenParticle::status() information.
int pdgDecay(const std::size_t i) const
Return the PDG-Id of the i-th child of this particle.
bool hasMother(const int pdgId) const
Return true if the given PDG::id to match can be found within the parents of this TruthParticle.
HepMC::ConstGenParticlePtr genChild(const std::size_t i) const
Retrieve the i-th child (GenParticle) of this TruthParticle.
std::vector< int > m_mothers
vector of barcodes of all the mothers of this particle.
ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase > TruthParticleImpl_t
HepMC::ConstGenParticlePtr genParticle() const
Retrieve the GenParticle this TruthParticle has been made from (if any)
const TruthParticle * mother(const std::size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
CLHEP::HepLorentzVector transformVector(const HepMC::FourVector &) const
returns a Pointer to a CLHEP::LorentzVector from a HepMC::FourVector
HepMC::ConstGenParticlePtr genMother(const std::size_t i=0) const
Retrieve the GenParticle mother of this TruthParticle.
void setCharge(const ChargeType charge)
Set the charge of this TruthParticle.
const TruthParticleContainer * m_container
Pointer to the collection holding ourself.
unsigned int nParents() const
Number of parents of this particle.
void setGenParticle(HepMC::ConstGenParticlePtr particle)
Fill the data members of ParticleBase from the GenParticle.
evtIndex_t m_nGenEventIdx
the index of the GenEvent this particle is in
bool hasEtIsol() const
Return true if one has filled the Et isolation infos for this TruthParticle.
long compressedExtBarCode() const
Forwards the HepMC::GenParticle::barcode() information.
unsigned int nDecay() const
Number of children of this particle.
const TruthEtIsolations::EtIsol_t * etIsol() const
Return the transverse energies for all the isolation cones.
TruthParticle()
Default constructor.
const HepMC::Flow flow() const
Forwards the HepMC::GenParticle::flow() information.
const TruthParticle * child(const std::size_t i) const
Retrieve the i-th child (TruthParticle) of this TruthParticle.
TruthParticle & operator=(const TruthParticle &rhs)
Assignment operator.
CLHEP::HepLorentzVector pDecay(const std::size_t i) const
Return the 4-vec of i-th child of this particle.
bool hasChild(const int pdgId) const
Return true if the given PDG::id to match can be found within the children of this TruthParticle.
Polarization polarization(const T &a)
int flow(const T &a, int i)
const GenParticle * ConstGenParticlePtr
Ensure that the ATLAS eigen extensions are properly loaded.
ConeSize
Enum for Cone size indexes (for isolation)