7#ifndef XAODTRUTH_VERSIONS_TRUTHPARTICLE_V1_H
8#define XAODTRUTH_VERSIONS_TRUTHPARTICLE_V1_H
11#include "AthLinks/ElementLink.h"
21#include "Math/Vector4D.h"
23template struct DataVector_detail::DVLEltBaseInit< xAOD::TruthParticle_v1>;
126 virtual double pt()
const override final;
128 virtual
double eta()
const override final;
130 virtual
double phi()
const override final;
188 void setE(
float value );
191 void setM(
float value );
333 bool polarizationParameter(
float& value, PolParam parameter )
const;
347 bool setPolarizationParameter(
float value, PolParam parameter );
359 float polarizationParameter( PolParam parameter )
const;
375 return ( (
phi > 0.0 ) && (
theta > 0.0 ) );
399 if (!p) { os <<
"Prt: Empty particle" << std::endl;
return os;}
401 os << p->uid() <<
" pdg_id=";
402 os << p->pdg_id() <<
" (px,py,pz,e)=";
403 os << p->px() <<
",";
404 os << p->py() <<
",";
405 os << p->pz() <<
",";
406 os << p->e() <<
";(pt,eta,phi)=";
407 os << p->pt() <<
",";
408 os << p->eta() <<
",";
409 os << p->phi() <<
"; status=";
std::ostream & operator<<(std::ostream &lhs, const TestGaudiProperty &rhs)
Class describing a truth particle in the MC record.
void setPy(float value)
Set the y component of the particle's momentum.
bool isNeutrino() const
Whether the particle is a neutrino (or antineutrino)
bool isSimulationParticle() const
Check if this particle was produced during the simulation.
bool isLightBaryon() const
Determine if the PID is that of a light flavour (not b or c) baryon.
const TruthParticle_v1 * child(size_t i) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
int status() const
Status code.
double abseta() const
The absolute pseudorapidity ( ) of the particle.
bool isResonance() const
Check if this particle is a resonant state.
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
bool isBottomHadron() const
Determine if the PID is that of a b-hadron.
bool isStrangeMeson() const
Determine if the PID is that of a strange meson.
bool isStrangeHadron() const
Determine if the PID is that of a strange hadron.
bool hasStrange() const
Whether the particle contains a strange quark (or antiquark)
int threeCharge() const
3 x the physical charge (so it can be an int for quarks)
double absrapidity() const
The true absolute rapidity ( ) of the particle.
void setUid(int value)
Set unique ID.
virtual double rapidity() const override final
The true rapidity ( ) of the particle.
void toPersistent()
Function making sure that the object is ready for persistification.
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector form.
bool isHadron() const
Whether the particle is a hadron.
void setM(float value)
Also store the mass.
bool isLightMeson() const
Determine if the PID is that of a light flavour (not b or c) meson.
bool isBSM() const
Check if this is a BSM particle.
bool isStrangeBaryon() const
Determine if the PID is that of a strange baryon.
virtual double m() const override final
The mass of the particle.
bool hasBottom() const
Whether the particle contains a bottom quark (or antiquark)
bool isBottomBaryon() const
Determine if the PID is that of a b-baryon.
void setE(float value)
Set the energy of the particle.
bool isStable() const
Check if this is a stable particle (generator or simulation produced)
bool isQuark() const
Check if this particle is a quark.
bool isMeson() const
Whether the particle is a meson.
int pdgId() const
PDG ID code.
const ElementLink< TruthVertexContainer > & decayVtxLink() const
The decay vertex link of this particle.
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
bool isBaryon() const
Whether the particle is a baryon.
int pdg_id() const
PDG ID code.
bool isCharged() const
Whether the particle is electrically charged.
TruthParticle_v1()
Default constructor.
bool isHeavyBaryon() const
Determine if the PID is that of a heavy flavour (b or c) baryon.
bool isGenSpecific() const
Check if this is a generator specific (non-physical) particle.
const TruthParticle_v1 * parent(size_t i) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
Polarization polarization() const
Retrieve a full Polarization with a single call.
int absPdgId() const
Absolute PDG ID code (often useful)
bool isCharmMeson() const
Determine if the PID is that of a c-meson.
bool hasCharm() const
Whether the particle contains a charm quark (or antiquark)
bool isBottomMeson() const
Determine if the PID is that of a b-meson.
void setPz(float value)
Set the z component of the particle's momentum.
bool isChLepton() const
Whether the particle is a charged lepton.
bool hasProdVtx() const
Check for a production vertex on this particle.
virtual Type::ObjectType type() const override final
The type of the object as a simple enumeration.
float px() const
The x component of the particle's momentum.
bool hasDecayVtx() const
Check for a decay vertex on this particle.
bool isTop() const
Check if this particle is a top quark.
virtual double e() const override final
The total energy of the particle.
bool isLepton() const
Whether the particle is a lepton.
bool isW() const
Check if this particle is a W boson.
bool isNeutral() const
Whether the particle is electrically neutral.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
bool isGenStable() const
Check if this is generator stable particle.
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > GenVecFourMom_t
Base 4 Momentum type for TruthParticle.
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
void setDecayVtxLink(const ElementLink< TruthVertexContainer > &link)
Set the decay vertex of the particle.
float py() const
The y component of the particle's momentum.
double charge() const
Physical charge.
bool isHeavyMeson() const
Determine if the PID is that of a heavy flavour (b or c) meson.
void setStatus(int value)
Set status code.
size_t nParents() const
Number of parents of this particle.
bool isCharmBaryon() const
Determine if the PID is that of a c-baryon.
int uid() const
Unique ID.
bool isElectron() const
Whether the particle is an electron (or positron)
bool isLightHadron() const
Determine if the PID is that of a light flavour (not b or c) hadron.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
void setPdgId(int pid)
Set PDG ID code.
void setPx(float value)
Set the x component of the particle's momentum.
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
size_t nChildren() const
Number of children of this particle.
bool isParton() const
Check if this particle is a parton.
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
float pz() const
The z component of the particle's momentum.
bool isZ() const
Check if this particle is a Z boson.
const TruthVertex_v1 * end_vertex() const
The decay vertex of this particle.
PolParam
Polarization parameter types.
@ polarizationPhi
Polarization in ( )
@ polarizationTheta
Polarization in ( )
bool isPhoton() const
Whether the particle is a photon.
const ElementLink< TruthVertexContainer > & prodVtxLink() const
The production vertex link of this particle.
const TruthVertex_v1 * production_vertex() const
The production vertex of this particle.
bool isTau() const
Whether the particle is a tau (or antitau)
bool isMuon() const
Whether the particle is a muon (or antimuon)
bool isHeavyHadron() const
Determine if the PID is that of a heavy flavour (b or c) hadron.
bool isHiggs() const
Check if this particle is a Higgs boson.
void setProdVtxLink(const ElementLink< TruthVertexContainer > &link)
Set the production vertex of the particle.
bool isCharmHadron() const
Determine if the PID is that of a c-hadron.
Class describing a truth vertex in the MC record.
Selection rules: declare transient members.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Single container for full polarization information.
Polarization()
Constructor to set (invalid) defaults.
bool valid() const
Check if the stored values are valid.
float phi
Polarization in ( )
float theta
Polarization in ( )