 |
ATLAS Offline Software
|
Go to the documentation of this file.
46 return std::abs(
pdgId() );
64 acc_prodVtxLink(
"prodVtxLink" );
67 acc_decayVtxLink(
"decayVtxLink" );
71 return ( acc_prodVtxLink.isAvailable( *
this ) &&
72 acc_prodVtxLink( *this ).isValid() );
82 prodVtxLink, setProdVtxLink )
87 acc_decayVtxLink( *this ).isValid() );
97 decayVtxLink, setDecayVtxLink )
109 acc_parentLinks(
"parentLinks" );
112 acc_childLinks(
"childLinks" );
120 }
else if ( acc_parentLinks.isAvailable( *
this ) ) {
121 return acc_parentLinks( *this ).size();
129 }
else if ( acc_parentLinks.isAvailable( *
this ) &&
i<acc_parentLinks( *this ).size() ) {
130 return acc_parentLinks( *
this )[
i].isValid() ? *(acc_parentLinks( *
this )[
i]) :
nullptr;
138 }
else if ( acc_childLinks.
isAvailable( *
this ) ) {
139 return acc_childLinks( *this ).size();
147 }
else if ( acc_childLinks.
isAvailable( *
this ) &&
i<acc_childLinks( *this ).size() ) {
148 return acc_childLinks( *
this )[
i].isValid() ? *(acc_childLinks( *
this )[
i]) :
nullptr;
164 const double localPx =
static_cast< double >(
px() );
165 const double localPy =
static_cast< double >(
py() );
166 return std::sqrt( localPx * localPx + localPy * localPy );
188 return genvecP4().Rapidity();
215 return std::abs(
eta() );
232 acc( *
this ) =
value;
238 acc( *
this ) =
value;
251 #define MC_PID_HELPER( TYPE, FNAME ) \
252 TYPE TruthParticle_v1::FNAME() const { \
253 return MC::FNAME( pdgId() ); \
332 std::cerr <<
"xAOD::TruthParticle_v1::polarizationParameter ERROR "
333 <<
"Request for an unknown (" << param <<
") polarization "
334 <<
"parameter type" << std::endl;
338 if( ! acc->isAvailable( *
this ) ) {
344 value = ( *acc )( *this );
355 std::cerr <<
"xAOD::TruthParticle_v1::setPolarizationParameter ERROR "
356 <<
"Request for an unknown (" << param <<
") polarization "
357 <<
"parameter type" << std::endl;
362 ( *acc )( *this ) =
value;
372 throw std::runtime_error(
"Unrecognized polarization parameter "
377 return ( *acc )( *this );
395 if( acc_prodVtxLink.isAvailableWritable( *
this ) ) {
396 acc_prodVtxLink( *this ).toPersistent();
size_t nOutgoingParticles() const
Get the number of outgoing particles.
bool isStrangeMeson(const T &p)
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
bool isBottomMeson(const T &p)
int absPdgId() const
Absolute PDG ID code (often useful)
bool isHeavyHadron(const T &p)
XAOD_AUXDATA_DEPRECATED bool isAvailable(const std::string &name, const std::string &clsname="") const
Check if a user property is available for reading or not.
void toPersistent()
Function making sure that the object is ready for persistification.
bool isBottomBaryon(const T &p)
virtual Type::ObjectType type() const override final
The type of the object as a simple enumeration.
float pz() const
The z component of the particle's momentum.
bool hasCharm(const T &p)
Helper class to provide type-safe access to aux data.
bool isBSM(const T &p)
APID: graviton and all Higgs extensions are BSM.
bool isGenSpecific(const T &p)
Main Table for MC internal use 81–100,901–930,998-999,1901–1930,2901–2930, and 3901–3930.
#define MC_PID_HELPER(TYPE, FNAME)
Helper macro to implement the functions that rely in functions from MC:: namespace.
bool isMeson(const T &p)
Table 43.1 PDG rule 5a: The numbers specifying the meson’s quark content conform to the convention nq...
bool setPolarizationParameter(float value, PolParam parameter)
Set method for polarization parameter values.
double threeCharge(const T &p)
bool isCharmMeson(const T &p)
bool hasBottom(const T &p)
bool isGenStable() const
Check if this is generator stable particle.
TruthParticle_v1()
Default constructor.
Polarization polarization() const
Retrieve a full Polarization with a single call.
bool isNeutrino(const T &p)
APID: the fourth generation neutrinos are neutrinos.
float px() const
The x component of the particle's momentum.
bool isResonance(const T &p)
bool isParton(const T &p)
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
virtual double rapidity() const override final
The true rapidity ( ) of the particle.
float py() const
The y component of the particle's momentum.
Helper class to provide constant type-safe access to aux data.
bool isHeavyBaryon(const T &p)
bool isLightBaryon(const T &p)
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > GenVecFourMom_t
Base 4 Momentum type for TruthParticle.
Class providing the definition of the 4-vector interface.
bool isBottomHadron(const T &p)
bool isGenStable(const T &p)
Determine if the particle is stable at the generator (not det-sim) level,.
bool isLightMeson(const T &p)
bool isHiggs(const T &p)
APID: HIGGS boson is only one particle.
bool isQuark(const T &p)
PDG rule 2: Quarks and leptons are numbered consecutively starting from 1 and 11 respectively; to do ...
bool hasDecayVtx() const
Check for a decay vertex on this particle.
size_t nParents() const
Number of parents of this particle.
void setM(float value)
Also store the mass.
bool isLightHadron(const T &p)
virtual double e() const override final
The total energy of the particle.
const ElementLink< TruthVertexContainer > & prodVtxLink() const
The production vertex link of this particle.
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 isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(Muon_v1, uint8_t, Muon_v1::EnergyLossType, energyLossType) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(Muon_v1
Class describing a truth particle in the MC record.
bool isCharmBaryon(const T &p)
TruthParticle_v1 TruthParticle
Typedef to implementation.
bool hasProdVtx() const
Check for a production vertex on this particle.
bool isNeutral(const T &p)
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector form.
double absrapidity() const
The true absolute rapidity ( ) of the particle.
bool hasStrange(const T &p)
const TruthParticle_v1 * incomingParticle(size_t index) const
Get one of the incoming particles.
TruthVertex_v1 TruthVertex
Typedef to implementation.
bool isChLepton(const T &p)
APID: the fourth generation leptons are leptons.
const ElementLink< TruthVertexContainer > & decayVtxLink() const
The decay vertex link of this particle.
bool isSimulationParticle() const
Check if this particle was produced during the simulation.
float phi
Polarization in ( )
ElementLink implementation for ROOT usage.
XAOD_AUXDATA_DEPRECATED bool isAvailableWritable(const std::string &name, const std::string &clsname="") const
Check if a user property is available for writing or not.
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
Class describing a truth vertex in the MC record.
size_t nChildren() const
Number of children of this particle.
bool isStable() const
Check if this is a stable particle (generator or simulation produced)
bool isStrangeHadron(const T &p)
bool isHadron(const T &p)
const TruthParticle_v1 * child(size_t i) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
bool isBaryon(const T &p)
Table 43.2 APID: states with fourth generation quarks are not baryons.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
bool polarizationParameter(float &value, PolParam parameter) const
Accessor for polarization parameters.
const SG::AuxElement::Accessor< float > * polarizationAccessorV1(TruthParticle_v1::PolParam type)
This function holds on to Accessor objects that can be used by each TruthParticle_v1 object at runtim...
PolParam
Polarization parameter types.
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
bool isCharged(const T &p)
@ polarizationTheta
Polarization in ( )
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
size_t nIncomingParticles() const
Get the number of incoming particles.
@ polarizationPhi
Polarization in ( )
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
bool isLepton(const T &p)
APID: the fourth generation leptons are leptons.
const TruthParticle_v1 * parent(size_t i) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
bool isCharmHadron(const T &p)
virtual double pt() const override final
The transverse momentum ( ) of the particle.
bool isHeavyMeson(const T &p)
bool isStrangeBaryon(const T &p)
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
ObjectType
Type of objects that have a representation in the xAOD EDM.
Single container for full polarization information.
int pdgId() const
PDG ID code.
const TruthParticle_v1 * outgoingParticle(size_t index) const
Get one of the outgoing particles.
float theta
Polarization in ( )
Base class for elements of a container that can have aux data.
double abseta() const
The absolute pseudorapidity ( ) of the particle.
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.