ATLAS Offline Software
Loading...
Searching...
No Matches
met::IParticle Class Referenceabstract

Class providing the definition of the 4-vector interface. More...

#include <IParticle.h>

Inherits SG::AuxElement.

Inherited by PanTau::PanTauSeed, PanTau::TauConstituent, xAOD::AFPProton_v1, xAOD::CaloCluster_v1, xAOD::CaloTower_v1, xAOD::CaloVertexedClusterBase, xAOD::CompositeParticle_v1, xAOD::DiTauJet_v1, xAOD::Egamma_v1, xAOD::FlowElement_v1, xAOD::GBlock_v1, xAOD::JGTower_v1, xAOD::Jet_v1, xAOD::L2CombinedMuon_v1, xAOD::L2IsoMuon_v1, xAOD::L2StandAloneMuon_v1, xAOD::L2StandAloneMuon_v2, xAOD::Muon_v1, xAOD::NeutralParticle_v1, xAOD::PFO_v1, xAOD::Particle_v1, xAOD::TauJet_v1, xAOD::TauJet_v2, xAOD::TauJet_v3, xAOD::TauTrack_v1, xAOD::TrackCaloCluster_v1, xAOD::TrackParticle_v1, xAOD::TrigElectron_v1, xAOD::TrigPhoton_v1, xAOD::TriggerTower_v2, and xAOD::TruthParticle_v1.

Collaboration diagram for met::IParticle:

Public Member Functions

virtual ~IParticle ()=default
 Virtual destructor, to make vtable happy...
 IParticle ()=default
 IParticle (const IParticle &)=default
 IParticle (IParticle &&)=delete
IParticleoperator= (const IParticle &)=default
IParticleoperator= (IParticle &&)=delete
virtual Type::ObjectType type () const=0
 The type of the object as a simple enumeration.
Functions for getting and setting user properties
template<class T>
XAOD_AUXDATA_DEPRECATED T & auxdata (const std::string &name, const std::string &clsname="")
 Fetch an aux data variable, as a non-const reference.
template<class T>
XAOD_AUXDATA_DEPRECATED const T & auxdata (const std::string &name, const std::string &clsname="") const
 Fetch an aux data variable, as a const reference.
template<class T>
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.
template<class T>
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.

Protected Types

template<class T, class ALLOC = AuxAllocator_t<T>>
using Accessor

Protected Member Functions

const SG::IConstAuxStoregetConstStore () const
 Return the current store, as a const interface.
SG::IAuxStoregetStore () const
 Return the current store, as a non-const interface.

Functions describing the 4-momentum of the object

typedef TLorentzVector FourMom_t
 Definition of the 4-momentum type.
virtual double pt () const=0
 The transverse momentum ( \(p_T\)) of the particle.
virtual double eta () const=0
 The pseudorapidity ( \(\eta\)) of the particle.
virtual double phi () const=0
 The azimuthal angle ( \(\phi\)) of the particle.
virtual double m () const=0
 The invariant mass of the particle.
virtual double e () const=0
 The total energy of the particle.
virtual double rapidity () const=0
 The true rapidity (y) of the particle.
virtual FourMom_t p4 () const=0
 The full 4-momentum of the particle.

Detailed Description

Class providing the definition of the 4-vector interface.

All particle-like classes in the xAOD EDM inherit from this simple interface class to make it simple to write generic analysis code for the objects.

Author
Andy Buckley Andy..nosp@m.Buck.nosp@m.ley@c.nosp@m.ern..nosp@m.ch
Till Eifert Till..nosp@m.Eife.nosp@m.rt@ce.nosp@m.rn.c.nosp@m.h
Markus Elsing Marku.nosp@m.s.El.nosp@m.sing@.nosp@m.cern.nosp@m..ch
Dag Gillberg Dag.G.nosp@m.illb.nosp@m.erg@c.nosp@m.ern..nosp@m.ch
Karsten Koeneke karst.nosp@m.enko.nosp@m.eneke.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Edward Moyse Edwar.nosp@m.d.Mo.nosp@m.yse@c.nosp@m.ern..nosp@m.ch
Revision
604340
Date
2014-07-01 06:04:52 +0200 (Tue, 01 Jul 2014)

Definition at line 41 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

Member Typedef Documentation

◆ Accessor

template<class T, class ALLOC = AuxAllocator_t<T>>
using SG::AuxElement::Accessor
protected

Definition at line 572 of file AuxElement.h.

◆ FourMom_t

typedef TLorentzVector xAOD::IParticle::FourMom_t

Definition of the 4-momentum type.

Definition at line 69 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

Constructor & Destructor Documentation

◆ ~IParticle()

virtual xAOD::IParticle::~IParticle ( )
virtualdefault

Virtual destructor, to make vtable happy...

◆ IParticle() [1/3]

xAOD::IParticle::IParticle ( )
default

◆ IParticle() [2/3]

xAOD::IParticle::IParticle ( const IParticle & )
default

◆ IParticle() [3/3]

xAOD::IParticle::IParticle ( IParticle && )
delete

Member Function Documentation

◆ auxdata() [1/2]

template<class T>
XAOD_AUXDATA_DEPRECATED T & xAOD::IParticle::auxdata ( const std::string & name,
const std::string & clsname = "" )
inline

Fetch an aux data variable, as a non-const reference.

This function provides an easy way for users to decorate objects with auxiliary data.

Take note that this function is slow. Should not be used inside time-critical code.

Parameters
nameName of the aux variable
clsnameThe name of the associated class. May be blank
Returns
A modifiable reference to the decoration

Definition at line 98 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

99 {
100
101 return SG::Accessor< T >(name, clsname)(*this);
102 }

◆ auxdata() [2/2]

template<class T>
XAOD_AUXDATA_DEPRECATED const T & xAOD::IParticle::auxdata ( const std::string & name,
const std::string & clsname = "" ) const
inline

Fetch an aux data variable, as a const reference.

This function provides an easy way for users to retrieve auxiliary decorations from an object.

Take note that this function is slow. Should not be used inside time-critical code.

Parameters
nameName of the aux variable
clsnameThe name of the associated class. May be blank
Returns
A constant reference to the decoration

Definition at line 118 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

119 {
120
121 return SG::ConstAccessor< T >( name, clsname )( *this );
122 }

◆ e()

virtual double xAOD::IParticle::e ( ) const
pure virtual

The total energy of the particle.

◆ eta()

virtual double xAOD::IParticle::eta ( ) const
pure virtual

The pseudorapidity ( \(\eta\)) of the particle.

◆ getConstStore()

const SG::IConstAuxStore * SG::AuxElement::getConstStore ( ) const
protected

Return the current store, as a const interface.

This will be non-zero if either a const or non-const store is associated with this object. This will fetch either a private or standalone store.

Definition at line 869 of file AuxElement.cxx.

305{
306 if (havePrivateData()) {
307 return m_container->getConstStore();
308 }
309 return 0;
310}
const SG::AuxVectorData * m_container
The container of which this object is an element.
Definition AuxElement.h:335
bool havePrivateData() const
True if this element currently has private data.

◆ getStore()

SG::IAuxStore * SG::AuxElement::getStore ( ) const
protected

Return the current store, as a non-const interface.

This will be non-zero if a non-const store is associated with this object. This will fetch either a private or standalone store.

Definition at line 878 of file AuxElement.cxx.

320{
321 if (havePrivateData()) {
322#ifdef ATHCONTAINERS_R21_COMPAT
323 SG::AuxVectorData* container_nc ATLAS_THREAD_SAFE = m_container;
324#else
325 SG::AuxVectorData* container_nc ATLAS_THREAD_SAFE = const_cast<SG::AuxVectorData*>(container());
326#endif
327 return container_nc->getStore();
328 }
329 return 0;
330}
#define ATLAS_THREAD_SAFE
const SG::AuxVectorData * container() const
Return the container holding this element.

◆ isAvailable()

template<class T>
XAOD_AUXDATA_DEPRECATED bool xAOD::IParticle::isAvailable ( const std::string & name,
const std::string & clsname = "" ) const
inline

Check if a user property is available for reading or not.

This function should be used to check if a user property which may or may not exist, is set on the object.

Parameters
nameName of the auxiliary variable
clsnameThe name of the associated class. May be blank
Returns
Whether the decoration exists or not

Definition at line 135 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

136 {
137
138 return SG::ConstAccessor< T >(name, clsname).isAvailable(*this);
139 }

◆ isAvailableWritable()

template<class T>
XAOD_AUXDATA_DEPRECATED bool xAOD::IParticle::isAvailableWritable ( const std::string & name,
const std::string & clsname = "" ) const
inline

Check if a user property is available for writing or not.

This function can be used to check whether it will be possible to set a user property on the object.

Parameters
nameName of the auxiliary variable
clsnameThe name of the associated class. May be blank
Returns
Whether the decoration is possible to set

Definition at line 152 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

153 {
154
155 return SG::Accessor< T >(name, clsname).isAvailableWritable(*this);
156 }

◆ m()

virtual double xAOD::IParticle::m ( ) const
pure virtual

The invariant mass of the particle.

◆ operator=() [1/2]

IParticle & xAOD::IParticle::operator= ( const IParticle & )
default

◆ operator=() [2/2]

IParticle & xAOD::IParticle::operator= ( IParticle && )
delete

◆ p4()

virtual FourMom_t xAOD::IParticle::p4 ( ) const
pure virtual

The full 4-momentum of the particle.

◆ phi()

virtual double xAOD::IParticle::phi ( ) const
pure virtual

The azimuthal angle ( \(\phi\)) of the particle.

◆ pt()

virtual double xAOD::IParticle::pt ( ) const
pure virtual

The transverse momentum ( \(p_T\)) of the particle.

◆ rapidity()

virtual double xAOD::IParticle::rapidity ( ) const
pure virtual

The true rapidity (y) of the particle.

◆ type()

virtual Type::ObjectType xAOD::IParticle::type ( ) const
pure virtual

The type of the object as a simple enumeration.


The documentation for this class was generated from the following file: