|
ATLAS Offline Software
|
Go to the documentation of this file.
46 return std::abs(
pdgId() );
69 acc_prodVtxLink(
"prodVtxLink" );
72 acc_decayVtxLink(
"decayVtxLink" );
76 return ( acc_prodVtxLink.isAvailable( *
this ) &&
77 acc_prodVtxLink( *this ).isValid() );
87 prodVtxLink, setProdVtxLink )
92 acc_decayVtxLink( *this ).isValid() );
102 decayVtxLink, setDecayVtxLink )
114 acc_parentLinks(
"parentLinks" );
117 acc_childLinks(
"childLinks" );
125 }
else if ( acc_parentLinks.isAvailable( *
this ) ) {
126 return acc_parentLinks( *this ).size();
134 }
else if ( acc_parentLinks.isAvailable( *
this ) &&
i<acc_parentLinks( *this ).size() ) {
135 return acc_parentLinks( *
this )[
i].isValid() ? *(acc_parentLinks( *
this )[
i]) :
nullptr;
143 }
else if ( acc_childLinks.
isAvailable( *
this ) ) {
144 return acc_childLinks( *this ).size();
152 }
else if ( acc_childLinks.
isAvailable( *
this ) &&
i<acc_childLinks( *this ).size() ) {
153 return acc_childLinks( *
this )[
i].isValid() ? *(acc_childLinks( *
this )[
i]) :
nullptr;
169 const double localPx =
static_cast< double >(
px() );
170 const double localPy =
static_cast< double >(
py() );
171 return std::sqrt( localPx * localPx + localPy * localPy );
193 return genvecP4().Rapidity();
220 return std::abs(
eta() );
237 acc( *
this ) =
value;
243 acc( *
this ) =
value;
256 #define MC_PID_HELPER( TYPE, FNAME ) \
257 TYPE TruthParticle_v1::FNAME() const { \
258 return MC::FNAME( pdgId() ); \
335 std::cerr <<
"xAOD::TruthParticle_v1::polarizationParameter ERROR "
336 <<
"Request for an unknown (" << param <<
") polarization "
337 <<
"parameter type" << std::endl;
341 if( ! acc->isAvailable( *
this ) ) {
347 value = ( *acc )( *this );
358 std::cerr <<
"xAOD::TruthParticle_v1::setPolarizationParameter ERROR "
359 <<
"Request for an unknown (" << param <<
") polarization "
360 <<
"parameter type" << std::endl;
365 ( *acc )( *this ) =
value;
375 throw std::runtime_error(
"Unrecognized polarization parameter "
380 return ( *acc )( *this );
398 if( acc_prodVtxLink.isAvailableWritable( *
this ) ) {
399 acc_prodVtxLink( *this ).toPersistent();
size_t nOutgoingParticles() const
Get the number of outgoing particles.
const TruthParticle_v1 * parent(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
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 isGenSpecific(const T &p)
#define MC_PID_HELPER(TYPE, FNAME)
Helper macro to implement the functions that rely in functions from MC:: namespace.
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 dot...
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 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.
int barcode() const
Barcode.
bool isChLepton(const T &p)
APID: the fourth generation leptons are leptons.
const ElementLink< TruthVertexContainer > & decayVtxLink() const
The decay vertex link of this particle.
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 isStrangeHadron(const T &p)
bool isHadron(const T &p)
bool isBaryon(const T &p)
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 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
const TruthParticle_v1 * child(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
bool isLepton(const T &p)
APID: the fourth generation leptons are leptons.
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.