71 if (!truthPh) {
return false;}
78 if (!orgTruthPh){
return false;}
89std::vector<const xAOD::TruthParticle*>
91 const bool allTheWayBack) {
92 std::vector<const xAOD::TruthParticle*>
vec;
97 vec.push_back(truthel);
110 for (
size_t p = 0; p < truthel->
nParents(); ++p) {
112 parent = truthel->
parent(p);
115 if (!parent)
return vec;
116 vec.push_back(parent);
119 while (parent->nParents() &&
124 for (
size_t p = 0; p < parent->nParents(); ++p) {
132 vec.push_back(parent);
138 const bool allTheWayBack){
146 const bool allTheWayBack) {
147 std::vector<const xAOD::TruthParticle*>
vec =
156std::vector<const xAOD::TruthParticle*>
158 const bool allTheWayBack) {
std::vector< size_t > vec
static const SG::AuxElement::Accessor< ElementLink< xAOD::ElectronContainer > > recoElectronLinkAcc("recoElectronLink")
Accessor for the "recoElectronLink" dynamic variable.
static const SG::AuxElement::Accessor< ElementLink< xAOD::PhotonContainer > > recoPhotonLinkAcc("recoPhotonLink")
Accessor for the "recoPhotonLink" dynamic variable.
ATLAS-specific HepMC functions.
bool isValid() const
Test to see if the link can be dereferenced.
SG::Accessor< T, ALLOC > Accessor
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
const TruthParticle_v1 * parent(size_t i) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
bool hasDecayVtx() const
Check for a decay vertex on this particle.
size_t nParents() const
Number of parents of this particle.
float perp() const
Vertex transverse distance from the beam line.
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
bool isPhoton(const T &p)
bool isElectron(const T &p)
std::vector< const xAOD::TruthParticle * > getBkgElectronLineage(const xAOD::TruthParticle *truthel, const bool allTheWayBack=true)
Helper function for getting the truth lineage of an electron that is arising from material interactio...
bool isTrueConvertedPhoton(const xAOD::Photon *ph, float maxRadius=800.)
is the object matched to a true converted photon with R < maxRadius
const xAOD::TruthParticle * getBkgElectronMother(const xAOD::Electron *el, const bool allTheWayBack=true)
Helper wrapper function for calling the function above extracting the truth from a reco electron.
const xAOD::Photon * getRecoPhoton(const xAOD::TruthParticle *particle)
return the reco photon associated to the given TruthParticle (if any)
const xAOD::Electron * getRecoElectron(const xAOD::TruthParticle *)
return the reco electron associated to the given TruthParticle (if any)
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
TruthParticle_v1 TruthParticle
Typedef to implementation.
Photon_v1 Photon
Definition of the current "egamma version".
Electron_v1 Electron
Definition of the current "egamma version".