ATLAS Offline Software
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
xAOD::CompositeParticle_v1 Class Reference

Description of a composite particle, i.e. More...

#include <CompositeParticle_v1.h>

Inheritance diagram for xAOD::CompositeParticle_v1:
Collaboration diagram for xAOD::CompositeParticle_v1:

Classes

struct  MT
 Define the enumeration of calculation methods for the transverse mass. More...
 

Public Types

using TypelessConstAccessor = ConstAuxElement::TypelessConstAccessor
 
template<class T , class ALLOC = AuxAllocator_t<T>>
using ConstAccessor = SG::ConstAccessor< T, ALLOC >
 
template<class T , class ALLOC = AuxAllocator_t<T>>
using Accessor = SG::Accessor< T, ALLOC >
 
template<class T , class ALLOC = AuxAllocator_t<T>>
using Decorator = SG::Decorator< T, ALLOC >
 

Public Member Functions

 CompositeParticle_v1 ()
 Default constructor. More...
 
void toPersistent ()
 Function preparing the object to be persistified. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
Accessor< T, ALLOC >::reference_type auxdata (const std::string &name)
 Fetch an aux data variable, as a non-const reference. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
Accessor< T, ALLOC >::const_reference_type auxdata (const std::string &name) const
 Fetch an aux data variable, as a const reference. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
bool isAvailableWritable (const std::string &name, const std::string &clsname="")
 Check if an aux variable is available for writing. More...
 
const SG::AuxVectorDatacontainer () const
 Return the container holding this element. More...
 
SG::AuxVectorDatacontainer ()
 Return the container holding this element. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
Accessor< T, ALLOC >::const_reference_type auxdataConst (const std::string &name) const
 Fetch an aux data variable, as a const reference. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
Accessor< T, ALLOC >::const_reference_type auxdataConst (const std::string &name, const std::string &clsname) const
 Fetch an aux data variable, as a const reference. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
bool isAvailableWritableAsDecoration (const std::string &name, const std::string &clsname="") const
 Check if an aux variable is available for writing as a decoration. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
Decorator< T, ALLOC >::reference_type auxdecor (const std::string &name) const
 Fetch an aux decoration, as a non-const reference. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
Decorator< T, ALLOC >::reference_type auxdecor (const std::string &name, const std::string &clsname) const
 Fetch an aux decoration, as a non-const reference. More...
 
void makePrivateStore ()
 Create a new (empty) private store for this object. More...
 
template<class U1 >
void makePrivateStore (const U1 &other)
 Create a new private store for this object and copy aux data. More...
 
template<class U1 >
void makePrivateStore (const U1 *other)
 Create a new private store for this object and copy aux data. More...
 
void releasePrivateStore ()
 Release and free any private store associated with this object. More...
 
void setStore (const SG::IConstAuxStore *store)
 Set the store associated with this object. More...
 
void setStore (SG::IAuxStore *store)
 Set the store associated with this object. More...
 
void setStore (const DataLink< SG::IConstAuxStore > &store)
 Set the store associated with this object. More...
 
void setConstStore (const SG::IConstAuxStore *store)
 Synonym for setStore with IConstAuxStore. More...
 
void setNonConstStore (SG::IAuxStore *store)
 Synonym for setStore with IAuxStore. More...
 
bool usingPrivateStore () const
 Test to see if this object is currently using a private store. More...
 
bool usingStandaloneStore () const
 Test to see if this object is currently using a standalone store. More...
 
const SG::IConstAuxStoregetConstStore () const
 Return the current store, as a const interface. More...
 
SG::IAuxStoregetStore () const
 Return the current store, as a non-const interface. More...
 
void clearCache ()
 Clear the cached aux data pointers. More...
 
const SG::auxid_set_tgetAuxIDs () const
 Return a set of identifiers for existing data items for this object. More...
 
bool hasStore () const
 Return true if this object has an associated store. More...
 
bool hasNonConstStore () const
 Return true if this object has an associated non-const store. More...
 
bool clearDecorations () const
 Clear all decorations. More...
 
bool trackIndices () const
 Return true if index tracking is enabled for this object. More...
 
size_t index () const
 Return the index of this element within its container. More...
 
size_t index () const
 Return the index of this element within its container. More...
 
Functions implementing additional 4-momentum properties
double px () const
 Get the px momentum component of the particle. More...
 
double py () const
 Get the py momentum component of the particle. More...
 
double pz () const
 Get the pz momentum component of the particle. More...
 
double et () const
 The transverse energy ( \(e_T\)) of the particle. More...
 
void setP4 (const FourMom_t &vec)
 Set the 4-vec. More...
 
void setPxPyPzE (double px, double py, double pz, double e)
 Set the 4-vec. More...
 
void setPx (double px)
 Set the x-component of the momentum. More...
 
void setPy (double py)
 Set the y-component of the momentum. More...
 
void setPz (double pz)
 Set the z-component of the momentum. More...
 
void setE (double e)
 Set the energy. More...
 
Functions implementing other particly-type properties
bool hasCharge () const
 Check if this composite particle has its charge set. More...
 
float charge () const
 Return the electric charge. More...
 
void setCharge (float charge)
 Set the electric charge. More...
 
bool hasPdgId () const
 Check if this composite particle has its charge set. More...
 
int pdgId () const
 Return the PDG identifier. More...
 
void setPdgId (int pdgID)
 Set the PDG identifier. More...
 
Functions returning variables that are calculated from 4-momentum

information from constituents.

The 4-momentum is calculated as the sum of 4-momenta of all the constituent particles whos indices are given in the vector. If one of the indices is -1, then missingET will also be used with pz=0 and E=sqrt(mpx*mpx + mpy*mpy).

FourMom_t p4 (const std::vector< int > &partIndices) const
 The total 4-momentum. More...
 
FourMom_t p4 (int partIndexA, int partIndexB) const
 Get the four-momentum with two indices. More...
 
FourMom_t p4 (int partIndexA, int partIndexB, int partIndexC) const
 Get the four-momentum with three indices. More...
 
FourMom_t p4 (int partIndexA, int partIndexB, int partIndexC, int partIndexD) const
 Get the four-momentum with four indices. More...
 
double pt (const std::vector< int > &partIndices) const
 The transverse momentum ( \(p_T\)) More...
 
double eta (const std::vector< int > &partIndices) const
 The pseudorapidity ( \(\eta\)) More...
 
double phi (const std::vector< int > &partIndices) const
 The azimuthal angle ( \(\phi\)) More...
 
double m (const std::vector< int > &partIndices) const
 The invariant mass. More...
 
double p (const std::vector< int > &partIndices) const
 The total 3-momentum. More...
 
double e (const std::vector< int > &partIndices) const
 The total energy. More...
 
double rapidity (const std::vector< int > &partIndices) const
 The true rapidity (y) More...
 
double px (const std::vector< int > &partIndices) const
 Get the px momentum component. More...
 
double py (const std::vector< int > &partIndices) const
 Get the py momentum component. More...
 
double pz (const std::vector< int > &partIndices) const
 Get the pz momentum component. More...
 
double et (const std::vector< int > &partIndices) const
 The transverse energy ( \(e_T\)) Note that this differs from ( \(p_T\)) for massive particles. More...
 
double mt (const std::vector< int > &partIndices, MT::Method method=MT::DEFAULT) const
 Get the transverse mass. More...
 
double mt (int partIndexA, int partIndexB=-2, MT::Method method=MT::DEFAULT) const
 Get the transverse mass with only one constituent particle. More...
 
Functions implementing handling of constituents
void addPart (const xAOD::IParticle *part, bool updateFourMom=true)
 Add a particle as an additional constituent. More...
 
void addPart (const xAOD::IParticleLink &partLink, bool updateFourMom=true)
 Add a particle as an additional constituent. More...
 
void addParts (const xAOD::IParticleLinkContainer &partLinkCont, bool updateFourMom=true)
 Add many constituents at the same time Note that the 4-momentum of this CompositeParticle will be updated accordingly, if updateFourMom=true. More...
 
void removePart (const xAOD::IParticle *part, bool updateFourMom=true)
 Remove a particle as a constituent from this CompostiteParticle. More...
 
void removePart (const xAOD::IParticleLink &partLink, bool updateFourMom=true)
 Remove a particle as a constituent from this CompostiteParticle. More...
 
const xAOD::MissingETmissingET () const
 Get the MissingET object that is associated with this CompositeParticle. More...
 
void setMissingET (const xAOD::MissingET *met, bool updateFourMom=true)
 Set the MissingET for this CompositeParticle. More...
 
void removeMissingET (bool updateFourMom=true)
 Remove the existing MissingET object from this CompositeParticle. More...
 
bool contains (const xAOD::MissingET *met) const
 Check if a given xAOD::MissingET object is part of this CompositeParticle. More...
 
bool contains (const xAOD::IParticle *part) const
 Check if a given xAOD::IParticle is a constituent. More...
 
bool contains (const xAOD::IParticleLink &partLink) const
 Check if a given xAOD::IParticle is a constituent. More...
 
std::size_t nParts () const
 Number of constituent particles. More...
 
std::size_t nCompParts () const
 Number of constituent CompositeParticles. More...
 
std::size_t nPhotons () const
 Number of constituent photons. More...
 
std::size_t nTruthPhotons () const
 Number of constituent truth photons. More...
 
std::size_t nElectrons () const
 Number of constituent electrons. More...
 
std::size_t nTruthElectrons () const
 Number of constituent truth electrons. More...
 
std::size_t nMuons () const
 Number of constituent muons. More...
 
std::size_t nTruthMuons () const
 Number of constituent truth muons. More...
 
std::size_t nTaus () const
 Number of constituent taus. More...
 
std::size_t nTruthTaus () const
 Number of constituent truth taus. More...
 
std::size_t nLeptons () const
 Number of constituent leptons (electrons, muons, and taus). More...
 
std::size_t nTruthLeptons () const
 Number of constituent truth leptons (truth electrons, truth muons, and truth taus). More...
 
std::size_t nJets () const
 Number of constituent jets. More...
 
std::size_t nTruthParts () const
 Number of constituent xAOD::TruthParticles. More...
 
const xAOD::IParticlepart (std::size_t index=0) const
 Get the constituent IParticle number i. More...
 
const xAOD::IParticleLinkpartLink (std::size_t index=0) const
 Get the constituent IParticle number i as an ElementLink. More...
 
const xAOD::IParticleLinkContainerpartLinks () const
 Get all constituents in one go. More...
 
template<typename CONTTYPE >
ConstDataVector< CONTTYPE > * parts () const
 Method to return a DataVector<T>, e.g., a MuonContainer, for all the constituent particles, e.g., of type xAOD::Muon, that this CompositeParticle has. More...
 
xAOD::CompositeParticle_v1compPart (const std::vector< int > &partIndices, const std::vector< int > &otherPartIndices=std::vector< int >{}, bool updateFourMom=true) const
 Get a CompositeParticle that is build on the fly from the constituent particles associated to the indices given (missingET is at index=-1). More...
 
xAOD::CompositeParticle_v1compPart (int partIndexA, int partIndexB, int partIndexC=-2, bool updateFourMom=true) const
 Get a CompositeParticle that is build on the fly from the constituent particles associated to the indices given (missingET is at index=-1). More...
 
const xAOD::CompositeParticle_v1compPart (std::size_t index=0) const
 Get the constituent number i as a CompositeParticle. More...
 
const xAOD::Photonphoton (std::size_t index=0) const
 Get the constituent number i as a Photon. More...
 
const xAOD::Electronelectron (std::size_t index=0) const
 Get the constituent number i as an Electron. More...
 
const xAOD::Muonmuon (std::size_t index=0) const
 Get the constituent number i as an Muon. More...
 
const xAOD::TauJettau (std::size_t index=0) const
 Get the constituent number i as a tau. More...
 
const xAOD::Jetjet (std::size_t index=0) const
 Get the constituent number i as a Jet. More...
 
const xAOD::TruthParticletruthPart (std::size_t index=0) const
 Get the constituent number i as a TruthParticle. More...
 
Functions implementing handling of other constituents. These

The constituent iterators are missing for the moment

other particles are stored separetely from the main constituent particles. They will NOT be used to determine the four-momentum of this CompositeParticle. And they will NOT be used for determining the weight (and other properties) of this CompositeParticle. The main idea is that these other particles can be used for keeping track of, e.g., a third lepton to veto on, or sub-threshold jets.

void addOtherPart (const xAOD::IParticle *part)
 Add a particle as an additional other constituent. More...
 
void addOtherPart (const xAOD::IParticleLink &partLink)
 Add a particle as an additional other constituent. More...
 
void addOtherParts (const xAOD::IParticleLinkContainer &partLinkCont)
 Add many other constituents at the same time. More...
 
void removeOtherPart (const xAOD::IParticle *part)
 Remove a particle as an other constituent from this CompostiteParticle. More...
 
void removeOtherPart (const xAOD::IParticleLink &partLink)
 Remove a particle as an other constituent from this CompostiteParticle. More...
 
bool containsOther (const xAOD::IParticle *part) const
 Check if a given xAOD::IParticle is an other constituent. More...
 
bool containsOther (const xAOD::IParticleLink &partLink) const
 Check if a given xAOD::IParticle is an other constituent. More...
 
std::size_t nOtherParts () const
 Number of other constituent particles. More...
 
std::size_t nOtherCompParts () const
 Number of other constituent CompositeParticles. More...
 
std::size_t nOtherPhotons () const
 Number of other constituent photons. More...
 
std::size_t nOtherTruthPhotons () const
 Number of other constituent truth photons. More...
 
std::size_t nOtherElectrons () const
 Number of other constituent electrons. More...
 
std::size_t nOtherTruthElectrons () const
 Number of other constituent truth electrons. More...
 
std::size_t nOtherMuons () const
 Number of other constituent muons. More...
 
std::size_t nOtherTruthMuons () const
 Number of other constituent truth muons. More...
 
std::size_t nOtherTaus () const
 Number of other constituent taus. More...
 
std::size_t nOtherTruthTaus () const
 Number of other constituent truth taus. More...
 
std::size_t nOtherLeptons () const
 Number of other constituent leptons (electrons, muons, and taus). More...
 
std::size_t nOtherTruthLeptons () const
 Number of other constituent truth leptons (truth electrons, truth muons, and truth taus). More...
 
std::size_t nOtherJets () const
 Number of other constituent jets. More...
 
std::size_t nOtherTruthParts () const
 Number of other constituent xAOD::TruthParticles. More...
 
const xAOD::IParticleotherPart (std::size_t index=0) const
 Get the other constituent IParticle number i. More...
 
const xAOD::IParticleLinkotherPartLink (std::size_t index=0) const
 Get the other constituent IParticle number i as an ElementLink. More...
 
const xAOD::IParticleLinkContainerotherPartLinks () const
 Get all other constituents in one go. More...
 
const xAOD::CompositeParticle_v1otherCompPart (std::size_t index=0) const
 Get the other constituent number i as a CompositeParticle. More...
 
const xAOD::PhotonotherPhoton (std::size_t index=0) const
 Get the other constituent number i as a Photon. More...
 
const xAOD::ElectronotherElectron (std::size_t index=0) const
 Get the other constituent number i as an Electron. More...
 
const xAOD::MuonotherMuon (std::size_t index=0) const
 Get the other constituent number i as an Muon. More...
 
const xAOD::TauJetotherTau (std::size_t index=0) const
 Get the other constituent number i as a tau. More...
 
const xAOD::JetotherJet (std::size_t index=0) const
 Get the other constituent number i as a Jet. More...
 
const xAOD::TruthParticleotherTruthPart (std::size_t index=0) const
 Get the other constituent number i as a TruthParticle. More...
 
Functions implementing read-only access to auxdata (for python).

The constituent iterators are missing for the moment

This specialization is needed since ROOT 6.02 doesn't yet support C++11 in the TFormula stuff with JIT compilation, see: https://sft.its.cern.ch/jira/browse/ROOT-5083

bool getBool (const std::string &varName) const
 Access to get a variable of type bool (actually, it is stored using type char) More...
 
int getInt (const std::string &varName) const
 Access to get a variable of type int. More...
 
unsigned int getUInt (const std::string &varName) const
 Access to get a variable of type unsigned int. More...
 
float getFloat (const std::string &varName) const
 Access to get a variable of type float. More...
 
double getDouble (const std::string &varName) const
 Access to get a variable of type double. More...
 

Static Public Attributes

static constexpr bool supportsThinning = true
 Mark that this type supports thinning operations. More...
 

Protected Member Functions

void setPartLinks (const xAOD::IParticleLinkContainer &constitLinks)
 Set all constituents in one go. More...
 
void setOtherPartLinks (const xAOD::IParticleLinkContainer &otherPartLinks)
 Set all other constituents in one go. More...
 
bool noPrivateData () const
 True if this element has no private data. More...
 
bool havePrivateData () const
 True if this element currently has private data. More...
 
bool hadPrivateData () const
 True if this element had private data before it was added to its current container. More...
 

Private Types

enum  PrivateStoreState : uint8_t { PrivateStoreState::NO_PRIVATE = 0, PrivateStoreState::HAVE_PRIVATE = 1, PrivateStoreState::HAD_PRIVATE = 2 }
 The current private data state. More...
 

Private Member Functions

void releasePrivateStoreForDtor ()
 Out-of-line portion of destructor. More...
 
void setIndex (size_t index, SG::AuxVectorData *container)
 Set the index/container for this element. More...
 
bool setIndexPrivate (size_t index, SG::AuxVectorData *container)
 Set the index/container for this element. More...
 
void makePrivateStore1 (const void *)
 Create a new private store for this object and copy aux data. More...
 
void makePrivateStore1 (const AuxElement *other)
 Create a new private store for this object and copy aux data. More...
 
AuxElementStandaloneData * setStore1 (const SG::IConstAuxStore *store)
 Set the store associated with this object. More...
 
void clearAux ()
 Clear all aux data associated with this element. More...
 
void copyAux (const ConstAuxElement &other)
 Copy aux data from another object. More...
 
void setNoPrivateData ()
 Record that this element does not have private data. More...
 
void setHavePrivateData ()
 Record that this element currently has private data. More...
 
void setHadPrivateData ()
 Record that this element used to have private data. More...
 

Private Attributes

const SG::AuxVectorDatam_container
 The container of which this object is an element. More...
 
size_t m_index
 The index of this element within its container. More...
 
PrivateStoreState m_privateStoreState
 

Functions implementing the xAOD::IParticle interface

typedef IParticle::FourMom_t FourMom_t
 Definition of the 4-momentum type. More...
 
typedef ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > GenVecFourMom_t
 Base 4 Momentum type (GenVector) More...
 
virtual double pt () const
 The transverse momentum ( \(p_T\)) of the particle. More...
 
virtual double eta () const
 The pseudorapidity ( \(\eta\)) of the particle. More...
 
virtual double phi () const
 The azimuthal angle ( \(\phi\)) of the particle. More...
 
virtual double m () const
 The invariant mass of the particle. More...
 
virtual double e () const
 The total energy of the particle. More...
 
virtual double rapidity () const
 The true rapidity (y) of the particle. More...
 
virtual FourMom_t p4 () const
 The full 4-momentum of the particle. More...
 
GenVecFourMom_t genvecP4 () const
 The full 4-momentum of the particle : GenVector form Note: can be slower than just p4 for this class; added for consistency. More...
 
virtual Type::ObjectType type () const
 The type of the object as a simple enumeration. More...
 

Functions returning variables that are calculated from

information from constituents (not only using their 4-momenta).

float weight (const std::vector< std::string > &varNames, const std::vector< int > &partIndices={}) const
 Get the weight for this xAOD::CompositeParticle by providing a vector of variable names that will be looked for. More...
 
float weight (const std::string &varNameA) const
 Get the weight for this xAOD::CompositeParticle. More...
 
float weight (const std::string &varNameA, const std::string &varNameB) const
 
float weight (const std::string &varNameA, const std::string &varNameB, const std::string &varNameC) const
 
float weight (const std::string &varNameA, const std::string &varNameB, const std::string &varNameC, const std::string &varNameD) const
 
float weight (const std::string &varNameA, const std::string &varNameB, const std::string &varNameC, const std::string &varNameD, const std::string &varNameE) const
 
float weightHelper (const xAOD::IParticle *part, const xAOD::IParticle::ConstAccessor< float > &varAcc) const
 This is a private helper method to calculate the weight. More...
 

Detailed Description

Description of a composite particle, i.e.

a particle that is composed out of several other particles/objects, e.g., a Z boson that consists out of two muons.

Author
Karsten Koeneke karst.nosp@m.en.k.nosp@m.oenek.nosp@m.e@ce.nosp@m.rn.ch
Revision
696023
Date
2015-09-21 19:09:08 +0200 (Mon, 21 Sep 2015)

Definition at line 45 of file CompositeParticle_v1.h.

Member Typedef Documentation

◆ Accessor

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

Definition at line 522 of file AuxElement.h.

◆ ConstAccessor

template<class T , class ALLOC = AuxAllocator_t<T>>
using SG::AuxElement::ConstAccessor = SG::ConstAccessor<T, ALLOC>
inherited

Definition at line 519 of file AuxElement.h.

◆ Decorator

template<class T , class ALLOC = AuxAllocator_t<T>>
using SG::AuxElement::Decorator = SG::Decorator<T, ALLOC>
inherited

Definition at line 525 of file AuxElement.h.

◆ FourMom_t

Definition of the 4-momentum type.

Definition at line 68 of file CompositeParticle_v1.h.

◆ GenVecFourMom_t

typedef ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > xAOD::CompositeParticle_v1::GenVecFourMom_t

Base 4 Momentum type (GenVector)

Definition at line 74 of file CompositeParticle_v1.h.

◆ TypelessConstAccessor

using SG::AuxElement::TypelessConstAccessor = ConstAuxElement::TypelessConstAccessor
inherited

Definition at line 516 of file AuxElement.h.

Member Enumeration Documentation

◆ PrivateStoreState

enum SG::IAuxElement::PrivateStoreState : uint8_t
strongprivateinherited

The current private data state.

Enumerator
NO_PRIVATE 
HAVE_PRIVATE 
HAD_PRIVATE 

Definition at line 131 of file IAuxElement.h.

132  {
133  NO_PRIVATE = 0,
134  HAVE_PRIVATE = 1,
135  HAD_PRIVATE = 2,
136  };

Constructor & Destructor Documentation

◆ CompositeParticle_v1()

xAOD::CompositeParticle_v1::CompositeParticle_v1 ( )

Default constructor.

Definition at line 27 of file CompositeParticle_v1.cxx.

28  : IParticle() {
29  }

Member Function Documentation

◆ addOtherPart() [1/2]

void xAOD::CompositeParticle_v1::addOtherPart ( const xAOD::IParticle part)

Add a particle as an additional other constituent.

◆ addOtherPart() [2/2]

void xAOD::CompositeParticle_v1::addOtherPart ( const xAOD::IParticleLink partLink)

Add a particle as an additional other constituent.

Definition at line 901 of file CompositeParticle_v1.cxx.

901  {
902  // Check if we have a valid ElementLink
903  if ( ! partLink.isValid() ) {
904  // This should not be... throw an error.
905  throw std::runtime_error("Got an invalid ElementLink when adding constituent!");
906  }
907  xAOD::IParticleLinkContainer& otherPartLinks = otherPartLinksAcc( *this );
908 
909  // Add the given ElementLink as a constituent of this composite particle
910  otherPartLinks.push_back( partLink );
911  return;
912  }

◆ addOtherParts()

void xAOD::CompositeParticle_v1::addOtherParts ( const xAOD::IParticleLinkContainer partLinkCont)

Add many other constituents at the same time.

Definition at line 916 of file CompositeParticle_v1.cxx.

916  {
917  for ( xAOD::IParticleLinkContainer::const_iterator
918  constitItr = partLinkCont.begin(),
919  constitItrEnd = partLinkCont.end();
920  constitItr != constitItrEnd;
921  ++constitItr ) {
922  const xAOD::IParticleLink& currentLink = *constitItr;
923  this->addOtherPart( currentLink );
924  }
925  return;
926  }

◆ addPart() [1/2]

void xAOD::CompositeParticle_v1::addPart ( const xAOD::IParticle part,
bool  updateFourMom = true 
)

Add a particle as an additional constituent.

Note that the 4-momentum of this CompositeParticle will be updated accordingly, if updateFourMom=true.

◆ addPart() [2/2]

void xAOD::CompositeParticle_v1::addPart ( const xAOD::IParticleLink partLink,
bool  updateFourMom = true 
)

Add a particle as an additional constituent.

Note that the 4-momentum of this CompositeParticle will be updated accordingly, if updateFourMom=true.

Definition at line 499 of file CompositeParticle_v1.cxx.

499  {
500  // Check if we have a valid ElementLink
501  if ( ! partLink.isValid() ) {
502  // This should not be... throw an error.
503  throw std::runtime_error("Got an invalid ElementLink when adding constituent!");
504  }
505  xAOD::IParticleLinkContainer& constitLinks = partLinksAcc( *this );
506 
507  // Update the four-momentum of this composite particle, if requested
508  if ( updateFourMom ) {
509  this->setP4( this->p4() + (*partLink)->p4() );
510  // Cannot add charge automatically as this is NOT part of the xAOD::IParticle interface
511  //this->setCharge( this->charge() + (*partLink)->charge() );
512  }
513 
514  // Add the given ElementLink as a constituent of this composite particle
515  constitLinks.push_back( partLink );
516  return;
517  }

◆ addParts()

void xAOD::CompositeParticle_v1::addParts ( const xAOD::IParticleLinkContainer partLinkCont,
bool  updateFourMom = true 
)

Add many constituents at the same time Note that the 4-momentum of this CompositeParticle will be updated accordingly, if updateFourMom=true.

Definition at line 521 of file CompositeParticle_v1.cxx.

522  {
523  for ( xAOD::IParticleLinkContainer::const_iterator
524  constitItr = partLinkCont.begin(),
525  constitItrEnd = partLinkCont.end();
526  constitItr != constitItrEnd;
527  ++constitItr ) {
528  const xAOD::IParticleLink& currentLink = *constitItr;
529  this->addPart( currentLink, updateFourMom );
530  }
531  return;
532  }

◆ auxdata() [1/4]

template<class T , class ALLOC = AuxAllocator_t<T>>
Accessor<T, ALLOC>::reference_type SG::AuxElement::auxdata ( const std::string &  name)
inherited

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

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ auxdata() [2/4]

template<class T , class ALLOC = AuxAllocator_t<T>>
Accessor<T, ALLOC>::const_reference_type SG::AuxElement::auxdata ( const std::string &  name) const
inherited

Fetch an aux data variable, as a const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor or ConstAccessor classes.

◆ auxdata() [3/4]

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

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 modifyable reference to the decoration

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

97  {
98 
99  return SG::AuxElement::auxdata< T >( name, clsname );
100  }

◆ auxdata() [4/4]

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

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 115 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

116  {
117 
118  return SG::AuxElement::auxdata< T >( name, clsname );
119  }

◆ auxdataConst() [1/2]

template<class T , class ALLOC = AuxAllocator_t<T>>
Accessor<T, ALLOC>::const_reference_type SG::AuxElement::auxdataConst ( const std::string &  name) const
inherited

Fetch an aux data variable, as a const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the ConstAccessor class.

◆ auxdataConst() [2/2]

template<class T , class ALLOC = AuxAllocator_t<T>>
Accessor<T, ALLOC>::const_reference_type SG::AuxElement::auxdataConst ( const std::string &  name,
const std::string &  clsname 
) const
inherited

Fetch an aux data variable, as a const reference.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the ConstAccessor class.

◆ auxdecor() [1/2]

template<class T , class ALLOC = AuxAllocator_t<T>>
Decorator<T, ALLOC>::reference_type SG::AuxElement::auxdecor ( const std::string &  name) const
inherited

Fetch an aux decoration, as a non-const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ auxdecor() [2/2]

template<class T , class ALLOC = AuxAllocator_t<T>>
Decorator<T, ALLOC>::reference_type SG::AuxElement::auxdecor ( const std::string &  name,
const std::string &  clsname 
) const
inherited

Fetch an aux decoration, as a non-const reference.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ charge()

float xAOD::CompositeParticle_v1::charge ( ) const

Return the electric charge.

Definition at line 182 of file CompositeParticle_v1.cxx.

182  {
183  if ( chargeAcc.isAvailable(*this) ) {
184  // If we have stored the charge with this CompositeParticle, just use it.
185  return chargeAcc(*this);
186  }
187  else {
188  // Otherwise, try to re-calculate it from the constituents
189  float charge = 0.0;
190  // Sum up the charges of all constituents, if all have it
191  std::size_t nParts = this->nParts();
192  for ( std::size_t i=0; i<nParts; ++i ) {
193  const xAOD::IParticle* part = this->part(i);
194  if (!part) {
195  throw std::runtime_error("Got a zero pointer to an xAOD::IParticle!");
196  }
197  if ( chargeAcc.isAvailable(*part) ) {
198  charge += chargeAcc(*part);
199  }
200  else if ( part->type() != xAOD::Type::CompositeParticle ) {
201  // We have an electron
203  charge += compPart->charge();
204  }
205  } // End: loop over all constituent particles
206  return charge;
207  }
208  }

◆ clearAux()

void SG::AuxElement::clearAux ( )
privateinherited

Clear all aux data associated with this element.

If this object has no associated store, this does nothing. If the associated aux data is const, this throws ExcConstAuxData.

Definition at line 535 of file AuxElement.cxx.

536 {
537  if (!m_container) return;
538  if (!m_container->hasStore()) return;
540  throw SG::ExcConstAuxData ("clearAux", SG::null_auxid);
541 
543  for (SG::auxid_t auxid : m_container->getWritableAuxIDs()) {
544  r.clear (auxid, *container(), index(), 1);
545  }
546 }

◆ clearCache()

void SG::AuxElement::clearCache ( )
inherited

Clear the cached aux data pointers.

You should call this any time something changes in the aux store that could invalidate the vector pointers.

Definition at line 319 of file AuxElement.cxx.

320 {
321  if (container())
322  container()->clearCache();
323 }

◆ clearDecorations()

bool SG::AuxElement::clearDecorations ( ) const
inherited

Clear all decorations.

Erase all decorations from an associated store, restoring the state to when lock was called.

Returns true if there were any decorations that were cleared, false if the store did not contain any decorations.

Definition at line 385 of file AuxElement.cxx.

386 {
387  if (havePrivateData())
388  return m_container->clearDecorations();
389  return false;
390 }

◆ compPart() [1/3]

xAOD::CompositeParticle_v1* xAOD::CompositeParticle_v1::compPart ( const std::vector< int > &  partIndices,
const std::vector< int > &  otherPartIndices = std::vector< int >{},
bool  updateFourMom = true 
) const

Get a CompositeParticle that is build on the fly from the constituent particles associated to the indices given (missingET is at index=-1).

If the second list of idices is given, also the "other" particles will be used in building this CompositeParticle.

◆ compPart() [2/3]

xAOD::CompositeParticle_v1* xAOD::CompositeParticle_v1::compPart ( int  partIndexA,
int  partIndexB,
int  partIndexC = -2,
bool  updateFourMom = true 
) const
inline

Get a CompositeParticle that is build on the fly from the constituent particles associated to the indices given (missingET is at index=-1).

This specialization to the above method is needed since ROOT 6.02 doesn't yet support C++11 in the TFormula stuff with JIT compilation, see: https://sft.its.cern.ch/jira/browse/ROOT-5083

Definition at line 418 of file CompositeParticle_v1.h.

419  {
420  if ( partIndexC==-2 ) {
421  return this->compPart( std::vector<int>{partIndexA, partIndexB}, std::vector<int>{}, updateFourMom );
422  }
423  return this->compPart( std::vector<int>{partIndexA, partIndexB, partIndexC}, std::vector<int>{}, updateFourMom );
424  }

◆ compPart() [3/3]

const xAOD::CompositeParticle_v1 * xAOD::CompositeParticle_v1::compPart ( std::size_t  index = 0) const
inline

Get the constituent number i as a CompositeParticle.

If the cast to CompositeParticle fails for a constituent, a null pointer is returned.

Definition at line 642 of file CompositeParticle_v1.h.

643 {
644  const xAOD::IParticle* ipart = this->part(index);
645  if ( ipart->type() != xAOD::Type::CompositeParticle ){ return 0; }
646  return static_cast<const xAOD::CompositeParticle_v1*>(ipart);
647 }

◆ container() [1/2]

SG::AuxVectorData* SG::AuxElement::container ( )
inherited

Return the container holding this element.

◆ container() [2/2]

const SG::AuxVectorData* SG::AuxElement::container ( ) const
inherited

Return the container holding this element.

◆ contains() [1/3]

bool xAOD::CompositeParticle_v1::contains ( const xAOD::IParticle part) const

Check if a given xAOD::IParticle is a constituent.

Definition at line 687 of file CompositeParticle_v1.cxx.

687  {
688  const xAOD::IParticleLinkContainer& constitLinks = this->partLinks();
689  for ( xAOD::IParticleLinkContainer::const_iterator
690  constitItr = constitLinks.begin(),
691  constitItrEnd = constitLinks.end();
692  constitItr != constitItrEnd;
693  ++constitItr ) {
694  const xAOD::IParticleLink& currentLink = *constitItr;
695  if ( ! currentLink.isValid() ) continue;
696  const xAOD::IParticle* currentPart = *currentLink;
697  if ( part == currentPart ) {
698  return true;
699  }
700  }
701  return false;
702  }

◆ contains() [2/3]

bool xAOD::CompositeParticle_v1::contains ( const xAOD::IParticleLink partLink) const

Check if a given xAOD::IParticle is a constituent.

Definition at line 706 of file CompositeParticle_v1.cxx.

706  {
707  const xAOD::IParticleLinkContainer& constitLinks = this->partLinks();
708  for ( xAOD::IParticleLinkContainer::const_iterator
709  constitItr = constitLinks.begin(),
710  constitItrEnd = constitLinks.end();
711  constitItr != constitItrEnd;
712  ++constitItr ) {
713  const xAOD::IParticleLink& currentLink = *constitItr;
714  if ( partLink == currentLink ) {
715  return true;
716  }
717  }
718  return false;
719  }

◆ contains() [3/3]

bool xAOD::CompositeParticle_v1::contains ( const xAOD::MissingET met) const

Check if a given xAOD::MissingET object is part of this CompositeParticle.

Definition at line 660 of file CompositeParticle_v1.cxx.

660  {
661  const ElementLink<xAOD::MissingETContainer>& metLink = metLinkAcc(*this);
662  // Check if we have a valid ElementLink. If not, return false. This is
663  // because the given met that we check against obviously exists, meaning
664  // that if it would be the same, the ElementLink should have been valid.
665  if ( ! metLink.isValid() ) {
666  return false;
667  }
668  const xAOD::MissingET* thisMet = *metLink;
669 
670  // Check if the pointers are equal
671  if ( thisMet == met ) {
672  return true;
673  }
674 
675  // Use the MissingET == operator
676  if ( (*thisMet) == (*met) ) {
677  return true;
678  }
679 
680  // Otherwise, return false
681  return false;
682  }

◆ containsOther() [1/2]

bool xAOD::CompositeParticle_v1::containsOther ( const xAOD::IParticle part) const

Check if a given xAOD::IParticle is an other constituent.

Definition at line 975 of file CompositeParticle_v1.cxx.

975  {
977  for ( xAOD::IParticleLinkContainer::const_iterator
978  constitItr = otherPartLinks.begin(),
979  constitItrEnd = otherPartLinks.end();
980  constitItr != constitItrEnd;
981  ++constitItr ) {
982  const xAOD::IParticleLink& currentLink = *constitItr;
983  if ( ! currentLink.isValid() ) continue;
984  const xAOD::IParticle* currentPart = *currentLink;
985  if ( part == currentPart ) {
986  return true;
987  }
988  }
989  return false;
990  }

◆ containsOther() [2/2]

bool xAOD::CompositeParticle_v1::containsOther ( const xAOD::IParticleLink partLink) const

Check if a given xAOD::IParticle is an other constituent.

Definition at line 994 of file CompositeParticle_v1.cxx.

994  {
996  for ( xAOD::IParticleLinkContainer::const_iterator
997  constitItr = otherPartLinks.begin(),
998  constitItrEnd = otherPartLinks.end();
999  constitItr != constitItrEnd;
1000  ++constitItr ) {
1001  const xAOD::IParticleLink& currentLink = *constitItr;
1002  if ( partLink == currentLink ) {
1003  return true;
1004  }
1005  }
1006  return false;
1007  }

◆ copyAux()

void SG::AuxElement::copyAux ( const ConstAuxElement other)
privateinherited

Copy aux data from another object.

Parameters
otherThe object from which to copy.

If this object has no associated store, this does nothing. If the associated aux data is const, this throws ExcConstAuxData.

All aux data items from other are copied to this object. Any aux data items associated with this object that are not present in other are cleared. (If other has no aux data, then all aux data items for this object are cleared.)

Definition at line 561 of file AuxElement.cxx.

562 {
563  if (!m_container) return;
564  if (!m_container->hasStore()) return;
566  throw SG::ExcConstAuxData ("copyAux");
567 
568  const SG::AuxVectorData* ocont = other.container();
569 
570  if (!ocont || !ocont->hasStore()) {
571  this->clearAux();
572  return;
573  }
574 
575  size_t oindex = other.index();
576  SG::auxid_set_t other_ids = ocont->getAuxIDs();
577 
579 
580  SG::AuxVectorData& cont = *container();
581  for (SG::auxid_t auxid : other_ids) {
582  r.copy (auxid, cont, index(), *ocont, oindex, 1);
583  }
584 
585  for (SG::auxid_t auxid : m_container->getWritableAuxIDs()) {
586  if (!other_ids.test (auxid)) {
587  r.clear (auxid, cont, index(), 1);
588  }
589  }
590 }

◆ e() [1/2]

double xAOD::CompositeParticle_v1::e ( ) const
virtual

The total energy of the particle.

Implements xAOD::IParticle.

Definition at line 107 of file CompositeParticle_v1.cxx.

107  {
108  return p4().E();
109  }

◆ e() [2/2]

double xAOD::CompositeParticle_v1::e ( const std::vector< int > &  partIndices) const

The total energy.

◆ electron()

const xAOD::Electron * xAOD::CompositeParticle_v1::electron ( std::size_t  index = 0) const
inline

Get the constituent number i as an Electron.

If the cast to Electron fails for a constituent, a null pointer is returned.

Definition at line 662 of file CompositeParticle_v1.h.

663 {
664  const xAOD::IParticle* ipart = this->part(index);
665  if ( ipart->type() != xAOD::Type::Electron ){ return 0; }
666  return static_cast<const xAOD::Electron*>(ipart);
667 }

◆ et() [1/2]

double xAOD::CompositeParticle_v1::et ( ) const

The transverse energy ( \(e_T\)) of the particle.

Note that this differs from ( \(p_T\)) for massive particles.

Definition at line 127 of file CompositeParticle_v1.cxx.

127  {
128  return p4().Et();
129  }

◆ et() [2/2]

double xAOD::CompositeParticle_v1::et ( const std::vector< int > &  partIndices) const

The transverse energy ( \(e_T\)) Note that this differs from ( \(p_T\)) for massive particles.

◆ eta() [1/2]

double xAOD::CompositeParticle_v1::eta ( ) const
virtual

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

Implements xAOD::IParticle.

Definition at line 48 of file CompositeParticle_v1.cxx.

48  {
49  return p4().Eta();
50  }

◆ eta() [2/2]

double xAOD::CompositeParticle_v1::eta ( const std::vector< int > &  partIndices) const

The pseudorapidity ( \(\eta\))

◆ genvecP4()

CompositeParticle_v1::GenVecFourMom_t xAOD::CompositeParticle_v1::genvecP4 ( ) const

The full 4-momentum of the particle : GenVector form Note: can be slower than just p4 for this class; added for consistency.

Definition at line 83 of file CompositeParticle_v1.cxx.

83  {
84  if ( accPx.isAvailable(*this) && accPy.isAvailable(*this)
85  && accPz.isAvailable(*this) && accE.isAvailable(*this) ) {
86  // We have everything stored with this CompositeParticle. Just use it.
87  const double px = static_cast<double>(accPx(*this));
88  const double py = static_cast<double>(accPy(*this));
89  const double pz = static_cast<double>(accPz(*this));
90  const double e = static_cast<double>(accE(*this));
91  return GenVecFourMom_t( px, py, pz, e );
92  }
93  else {
94  // Not everything is stored, we need to re-calculate the p4 based on the constituents.
95  // Create an empty vector such that the subsequent call will use all constituents.
96  const std::vector<int> partIndices;
97  FourMom_t fourmom = p4(partIndices);
98  return GenVecFourMom_t(fourmom.Px(), fourmom.Py(), fourmom.Pz(), fourmom.E());
99  }
100  }

◆ getAuxIDs()

const SG::auxid_set_t & SG::AuxElement::getAuxIDs ( ) const
inherited

Return a set of identifiers for existing data items for this object.

If this object has a private or standalone store, then information from that will be returned. Otherwise, if this element is part of a container, then information for the container will be returned. Otherwise, return an empty set.

Definition at line 335 of file AuxElement.cxx.

336 {
337 #ifdef ATHCONTAINERS_R21_COMPAT
338  if (havePrivateData())
339  return m_container->getConstStore()->getAuxIDs();
340  if (container())
341  return container()->getAuxIDs();
342  static const SG::auxid_set_t null_set;
343  return null_set;
344 #else
346 #endif
347 }

◆ getBool()

bool xAOD::CompositeParticle_v1::getBool ( const std::string &  varName) const
inline

Access to get a variable of type bool (actually, it is stored using type char)

Definition at line 589 of file CompositeParticle_v1.h.

589  {
590  return SG::ConstAccessor<bool>(varName)(*this);
591  }

◆ getConstStore()

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

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 284 of file AuxElement.cxx.

285 {
286  if (havePrivateData()) {
287  return m_container->getConstStore();
288  }
289  return 0;
290 }

◆ getDouble()

double xAOD::CompositeParticle_v1::getDouble ( const std::string &  varName) const
inline

Access to get a variable of type double.

Definition at line 609 of file CompositeParticle_v1.h.

609  {
610  return SG::ConstAccessor<double>(varName)(*this);
611  }

◆ getFloat()

float xAOD::CompositeParticle_v1::getFloat ( const std::string &  varName) const
inline

Access to get a variable of type float.

Definition at line 604 of file CompositeParticle_v1.h.

604  {
605  return SG::ConstAccessor<float>(varName)(*this);
606  }

◆ getInt()

int xAOD::CompositeParticle_v1::getInt ( const std::string &  varName) const
inline

Access to get a variable of type int.

Definition at line 594 of file CompositeParticle_v1.h.

594  {
595  return SG::ConstAccessor<int>(varName)(*this);
596  }

◆ getStore()

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

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 299 of file AuxElement.cxx.

300 {
301  if (havePrivateData()) {
302 #ifdef ATHCONTAINERS_R21_COMPAT
304 #else
305  SG::AuxVectorData* container_nc ATLAS_THREAD_SAFE = const_cast<SG::AuxVectorData*>(container());
306 #endif
307  return container_nc->getStore();
308  }
309  return 0;
310 }

◆ getUInt()

unsigned int xAOD::CompositeParticle_v1::getUInt ( const std::string &  varName) const
inline

Access to get a variable of type unsigned int.

Definition at line 599 of file CompositeParticle_v1.h.

599  {
601  }

◆ hadPrivateData()

bool SG::IAuxElement::hadPrivateData ( ) const
protectedinherited

True if this element had private data before it was added to its current container.

◆ hasCharge()

setPy setE bool xAOD::CompositeParticle_v1::hasCharge ( ) const

Check if this composite particle has its charge set.

Definition at line 177 of file CompositeParticle_v1.cxx.

177  {
178  return chargeAcc.isAvailable( *this );
179  }

◆ hasNonConstStore()

bool SG::AuxElement::hasNonConstStore ( ) const
inherited

Return true if this object has an associated non-const store.

This will be true for either a private or standalone store.

Definition at line 368 of file AuxElement.cxx.

369 {
370  if (havePrivateData())
371  return m_container->hasNonConstStore();
372  return false;
373 }

◆ hasPdgId()

bool xAOD::CompositeParticle_v1::hasPdgId ( ) const

Check if this composite particle has its charge set.

Definition at line 217 of file CompositeParticle_v1.cxx.

217  {
218  return pdgAcc.isAvailable( *this );
219  }

◆ hasStore()

bool SG::AuxElement::hasStore ( ) const
inherited

Return true if this object has an associated store.

This will be true for either a private or standalone store.

Definition at line 355 of file AuxElement.cxx.

356 {
357  if (havePrivateData())
358  return m_container->hasStore();
359  return false;
360 }

◆ havePrivateData()

bool SG::IAuxElement::havePrivateData ( ) const
protectedinherited

True if this element currently has private data.

◆ index() [1/2]

size_t SG::IAuxElement::index ( ) const
inherited

Return the index of this element within its container.

◆ index() [2/2]

size_t SG::IAuxElement::index
inherited

Return the index of this element within its container.

Inherited from IAuxElement.

◆ isAvailable()

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

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 131 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

132  {
133 
134  return SG::AuxElement::isAvailable< T >( name, clsname );
135  }

◆ isAvailableWritable() [1/2]

template<class T , class ALLOC = AuxAllocator_t<T>>
bool SG::AuxElement::isAvailableWritable ( const std::string &  name,
const std::string &  clsname = "" 
)
inherited

Check if an aux variable is available for writing.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ isAvailableWritable() [2/2]

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

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 147 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

148  {
149 
150  return SG::AuxElement::isAvailableWritable< T >( name, clsname );
151  }

◆ isAvailableWritableAsDecoration()

template<class T , class ALLOC = AuxAllocator_t<T>>
bool SG::AuxElement::isAvailableWritableAsDecoration ( const std::string &  name,
const std::string &  clsname = "" 
) const
inherited

Check if an aux variable is available for writing as a decoration.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ jet()

const xAOD::Jet * xAOD::CompositeParticle_v1::jet ( std::size_t  index = 0) const
inline

Get the constituent number i as a Jet.

If the cast to Jet fails for a constituent, a null pointer is returned.

Definition at line 692 of file CompositeParticle_v1.h.

693 {
694  const xAOD::IParticle* ipart = this->part(index);
695  if ( ipart->type() != xAOD::Type::Jet ){ return 0; }
696  return static_cast<const xAOD::Jet*>(ipart);
697 }

◆ m() [1/2]

double xAOD::CompositeParticle_v1::m ( ) const
virtual

The invariant mass of the particle.

Implements xAOD::IParticle.

Definition at line 56 of file CompositeParticle_v1.cxx.

56  {
57  return p4().M();
58  }

◆ m() [2/2]

double xAOD::CompositeParticle_v1::m ( const std::vector< int > &  partIndices) const

The invariant mass.

◆ makePrivateStore() [1/3]

void SG::AuxElement::makePrivateStore ( )
inherited

Create a new (empty) private store for this object.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

Definition at line 172 of file AuxElement.cxx.

173 {
174  if (m_container) {
175  throw SG::ExcBadPrivateStore ("store already exists");
176  }
177 
181 }

◆ makePrivateStore() [2/3]

template<class U1 >
void SG::AuxElement::makePrivateStore ( const U1 &  other)
inherited

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

If other is an object that has aux data, then those data will be copied; otherwise, nothing will be done.

◆ makePrivateStore() [3/3]

template<class U1 >
void SG::AuxElement::makePrivateStore ( const U1 *  other)
inherited

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

If other is an object that has aux data, then those data will be copied; otherwise, nothing will be done.

◆ makePrivateStore1() [1/2]

void SG::AuxElement::makePrivateStore1 ( const AuxElement other)
privateinherited

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

This overload handles the case where other does have aux data.

Definition at line 521 of file AuxElement.cxx.

522 {
524  if (other)
525  this->copyAux (*other);
526 }

◆ makePrivateStore1() [2/2]

void SG::AuxElement::makePrivateStore1 ( const void *  )
privateinherited

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

This overload handles the case where other does not have aux data.

◆ missingET()

const xAOD::MissingET * xAOD::CompositeParticle_v1::missingET ( ) const

Get the MissingET object that is associated with this CompositeParticle.

If no (valid) MissingET object is associated with this CompositeParticle, a null pointer will be returned

Definition at line 593 of file CompositeParticle_v1.cxx.

593  {
594  if ( !(metLinkAcc.isAvailable(*this)) ) {
595  return nullptr;
596  }
597  const ElementLink<xAOD::MissingETContainer>& metLink = metLinkAcc(*this);
598  // Check if we have a valid ElementLink
599  if ( ! metLink.isValid() ) {
600  return nullptr;
601  }
602  return *metLink;
603  }

◆ mt() [1/2]

double xAOD::CompositeParticle_v1::mt ( const std::vector< int > &  partIndices,
MT::Method  method = MT::DEFAULT 
) const

Get the transverse mass.

Specify which calculation method to use as an optional additional argument.

◆ mt() [2/2]

double xAOD::CompositeParticle_v1::mt ( int  partIndexA,
int  partIndexB = -2,
MT::Method  method = MT::DEFAULT 
) const
inline

Get the transverse mass with only one constituent particle.

Specify which calculation method to use as an optional additional argument. This specialization to the above method is needed since ROOT 6.02 doesn't yet support C++11 in the TFormula stuff with JIT compilation, see: https://sft.its.cern.ch/jira/browse/ROOT-5083

Definition at line 205 of file CompositeParticle_v1.h.

205  {
206  if ( partIndexB==-2 ) {
207  return this->mt( std::vector<int>{partIndexA}, method );
208  }
209  return this->mt( std::vector<int>{partIndexA, partIndexB}, method );
210  }

◆ muon()

const xAOD::Muon * xAOD::CompositeParticle_v1::muon ( std::size_t  index = 0) const
inline

Get the constituent number i as an Muon.

If the cast to Muon fails for a constituent, a null pointer is returned.

Definition at line 672 of file CompositeParticle_v1.h.

673 {
674  const xAOD::IParticle* ipart = this->part(index);
675  if ( ipart->type() != xAOD::Type::Muon ){ return 0; }
676  return static_cast<const xAOD::Muon*>(ipart);
677 }

◆ nCompParts()

std::size_t xAOD::CompositeParticle_v1::nCompParts ( ) const

Number of constituent CompositeParticles.

◆ nElectrons()

std::size_t xAOD::CompositeParticle_v1::nElectrons ( ) const

Number of constituent electrons.

◆ nJets()

std::size_t xAOD::CompositeParticle_v1::nJets ( ) const

Number of constituent jets.

◆ nLeptons()

std::size_t xAOD::CompositeParticle_v1::nLeptons ( ) const

Number of constituent leptons (electrons, muons, and taus).

Definition at line 750 of file CompositeParticle_v1.cxx.

750  {
751  return this->nElectrons() + this->nMuons() + this->nTaus();
752  }

◆ nMuons()

std::size_t xAOD::CompositeParticle_v1::nMuons ( ) const

Number of constituent muons.

◆ noPrivateData()

bool SG::IAuxElement::noPrivateData ( ) const
protectedinherited

True if this element has no private data.

◆ nOtherCompParts()

std::size_t xAOD::CompositeParticle_v1::nOtherCompParts ( ) const

Number of other constituent CompositeParticles.

◆ nOtherElectrons()

std::size_t xAOD::CompositeParticle_v1::nOtherElectrons ( ) const

Number of other constituent electrons.

◆ nOtherJets()

std::size_t xAOD::CompositeParticle_v1::nOtherJets ( ) const

Number of other constituent jets.

◆ nOtherLeptons()

std::size_t xAOD::CompositeParticle_v1::nOtherLeptons ( ) const

Number of other constituent leptons (electrons, muons, and taus).

Definition at line 1038 of file CompositeParticle_v1.cxx.

1038  {
1039  return this->nOtherElectrons() + this->nOtherMuons() + this->nOtherTaus();
1040  }

◆ nOtherMuons()

std::size_t xAOD::CompositeParticle_v1::nOtherMuons ( ) const

Number of other constituent muons.

◆ nOtherParts()

std::size_t xAOD::CompositeParticle_v1::nOtherParts ( ) const

Number of other constituent particles.

Definition at line 1010 of file CompositeParticle_v1.cxx.

1010  {
1011  if( otherPartLinksAcc.isAvailable( *this ) ) {
1012  return otherPartLinksAcc( *this ).size();
1013  }
1014  return 0;
1015  }

◆ nOtherPhotons()

std::size_t xAOD::CompositeParticle_v1::nOtherPhotons ( ) const

Number of other constituent photons.

◆ nOtherTaus()

std::size_t xAOD::CompositeParticle_v1::nOtherTaus ( ) const

Number of other constituent taus.

◆ nOtherTruthElectrons()

std::size_t xAOD::CompositeParticle_v1::nOtherTruthElectrons ( ) const

Number of other constituent truth electrons.

◆ nOtherTruthLeptons()

std::size_t xAOD::CompositeParticle_v1::nOtherTruthLeptons ( ) const

Number of other constituent truth leptons (truth electrons, truth muons, and truth taus).

Definition at line 1065 of file CompositeParticle_v1.cxx.

1065  {
1066  return this->nOtherTruthElectrons() + this->nOtherTruthMuons() + this->nOtherTruthTaus();
1067  }

◆ nOtherTruthMuons()

std::size_t xAOD::CompositeParticle_v1::nOtherTruthMuons ( ) const

Number of other constituent truth muons.

◆ nOtherTruthParts()

std::size_t xAOD::CompositeParticle_v1::nOtherTruthParts ( ) const

Number of other constituent xAOD::TruthParticles.

◆ nOtherTruthPhotons()

std::size_t xAOD::CompositeParticle_v1::nOtherTruthPhotons ( ) const

Number of other constituent truth photons.

◆ nOtherTruthTaus()

std::size_t xAOD::CompositeParticle_v1::nOtherTruthTaus ( ) const

Number of other constituent truth taus.

◆ nParts()

std::size_t xAOD::CompositeParticle_v1::nParts ( ) const

Number of constituent particles.

Note that MissingET is NOT counted as a constituent in this context

Definition at line 722 of file CompositeParticle_v1.cxx.

722  {
723  if( partLinksAcc.isAvailable( *this ) ) {
724  return partLinksAcc( *this ).size();
725  }
726  return 0;
727  }

◆ nPhotons()

std::size_t xAOD::CompositeParticle_v1::nPhotons ( ) const

Number of constituent photons.

◆ nTaus()

std::size_t xAOD::CompositeParticle_v1::nTaus ( ) const

Number of constituent taus.

◆ nTruthElectrons()

std::size_t xAOD::CompositeParticle_v1::nTruthElectrons ( ) const

Number of constituent truth electrons.

◆ nTruthLeptons()

std::size_t xAOD::CompositeParticle_v1::nTruthLeptons ( ) const

Number of constituent truth leptons (truth electrons, truth muons, and truth taus).

Definition at line 777 of file CompositeParticle_v1.cxx.

777  {
778  return this->nTruthElectrons() + this->nTruthMuons() + this->nTruthTaus();
779  }

◆ nTruthMuons()

std::size_t xAOD::CompositeParticle_v1::nTruthMuons ( ) const

Number of constituent truth muons.

◆ nTruthParts()

std::size_t xAOD::CompositeParticle_v1::nTruthParts ( ) const

Number of constituent xAOD::TruthParticles.

◆ nTruthPhotons()

std::size_t xAOD::CompositeParticle_v1::nTruthPhotons ( ) const

Number of constituent truth photons.

◆ nTruthTaus()

std::size_t xAOD::CompositeParticle_v1::nTruthTaus ( ) const

Number of constituent truth taus.

◆ otherCompPart()

const xAOD::CompositeParticle_v1 * xAOD::CompositeParticle_v1::otherCompPart ( std::size_t  index = 0) const
inline

Get the other constituent number i as a CompositeParticle.

If the cast to CompositeParticle fails for a constituent, a null pointer is returned.

Definition at line 713 of file CompositeParticle_v1.h.

714 {
715  const xAOD::IParticle* ipart = this->otherPart(index);
716  if ( ipart->type() != xAOD::Type::CompositeParticle ){ return 0; }
717  return static_cast<const xAOD::CompositeParticle_v1*>(ipart);
718 }

◆ otherElectron()

const xAOD::Electron * xAOD::CompositeParticle_v1::otherElectron ( std::size_t  index = 0) const
inline

Get the other constituent number i as an Electron.

If the cast to Electron fails for a constituent, a null pointer is returned.

Definition at line 733 of file CompositeParticle_v1.h.

734 {
735  const xAOD::IParticle* ipart = this->otherPart(index);
736  if ( ipart->type() != xAOD::Type::Electron ){ return 0; }
737  return static_cast<const xAOD::Electron*>(ipart);
738 }

◆ otherJet()

const xAOD::Jet * xAOD::CompositeParticle_v1::otherJet ( std::size_t  index = 0) const
inline

Get the other constituent number i as a Jet.

If the cast to Jet fails for a constituent, a null pointer is returned.

Definition at line 763 of file CompositeParticle_v1.h.

764 {
765  const xAOD::IParticle* ipart = this->otherPart(index);
766  if ( ipart->type() != xAOD::Type::Jet ){ return 0; }
767  return static_cast<const xAOD::Jet*>(ipart);
768 }

◆ otherMuon()

const xAOD::Muon * xAOD::CompositeParticle_v1::otherMuon ( std::size_t  index = 0) const
inline

Get the other constituent number i as an Muon.

If the cast to Muon fails for a constituent, a null pointer is returned.

Definition at line 743 of file CompositeParticle_v1.h.

744 {
745  const xAOD::IParticle* ipart = this->otherPart(index);
746  if ( ipart->type() != xAOD::Type::Muon ){ return 0; }
747  return static_cast<const xAOD::Muon*>(ipart);
748 }

◆ otherPart()

const xAOD::IParticle * xAOD::CompositeParticle_v1::otherPart ( std::size_t  index = 0) const

Get the other constituent IParticle number i.

Definition at line 1071 of file CompositeParticle_v1.cxx.

1071  {
1072  if ( index >= this->nOtherParts() ) {
1073  return nullptr;
1074  }
1076  if ( ! otherPartLink.isValid() ) {
1077  return nullptr;
1078  }
1079  return *otherPartLink;
1080  }

◆ otherPartLink()

const xAOD::IParticleLink & xAOD::CompositeParticle_v1::otherPartLink ( std::size_t  index = 0) const

Get the other constituent IParticle number i as an ElementLink.

Definition at line 1084 of file CompositeParticle_v1.cxx.

1084  {
1085  if ( index >= this->nOtherParts() ) {
1086  static const xAOD::IParticleLink dummy;
1087  return dummy;
1088  }
1089  return otherPartLinks()[ index ];
1090  }

◆ otherPartLinks()

const xAOD::IParticleLinkContainer& xAOD::CompositeParticle_v1::otherPartLinks ( ) const

Get all other constituents in one go.

◆ otherPhoton()

const xAOD::Photon * xAOD::CompositeParticle_v1::otherPhoton ( std::size_t  index = 0) const
inline

Get the other constituent number i as a Photon.

If the cast to Photon fails for a constituent, a null pointer is returned.

Definition at line 723 of file CompositeParticle_v1.h.

724 {
725  const xAOD::IParticle* ipart = this->otherPart(index);
726  if ( ipart->type() != xAOD::Type::Photon ){ return 0; }
727  return static_cast<const xAOD::Photon*>(ipart);
728 }

◆ otherTau()

const xAOD::TauJet * xAOD::CompositeParticle_v1::otherTau ( std::size_t  index = 0) const
inline

Get the other constituent number i as a tau.

If the cast to tau fails for a constituent, a null pointer is returned.

Definition at line 753 of file CompositeParticle_v1.h.

754 {
755  const xAOD::IParticle* ipart = this->otherPart(index);
756  if ( ipart->type() != xAOD::Type::Tau ){ return 0; }
757  return static_cast<const xAOD::TauJet*>(ipart);
758 }

◆ otherTruthPart()

const xAOD::TruthParticle * xAOD::CompositeParticle_v1::otherTruthPart ( std::size_t  index = 0) const
inline

Get the other constituent number i as a TruthParticle.

If the cast to TruthParticle fails for a constituent, a null pointer is returned.

Definition at line 773 of file CompositeParticle_v1.h.

774 {
775  const xAOD::IParticle* ipart = this->otherPart(index);
776  if ( ipart->type() != xAOD::Type::TruthParticle ){ return 0; }
777  return static_cast<const xAOD::TruthParticle*>(ipart);
778 }

◆ p()

double xAOD::CompositeParticle_v1::p ( const std::vector< int > &  partIndices) const

The total 3-momentum.

◆ p4() [1/5]

CompositeParticle_v1::FourMom_t xAOD::CompositeParticle_v1::p4 ( ) const
virtual

The full 4-momentum of the particle.

Implements xAOD::IParticle.

Definition at line 64 of file CompositeParticle_v1.cxx.

64  {
65  if ( accPx.isAvailable(*this) && accPy.isAvailable(*this)
66  && accPz.isAvailable(*this) && accE.isAvailable(*this) ) {
67  // We have everything stored with this CompositeParticle. Just use it.
68  const double px = static_cast<double>(accPx(*this));
69  const double py = static_cast<double>(accPy(*this));
70  const double pz = static_cast<double>(accPz(*this));
71  const double e = static_cast<double>(accE(*this));
72  return FourMom_t( px, py, pz, e );
73  }
74  else {
75  // Not everything is stored, we need to re-calculate the p4 based on the constituents.
76  // Create an empty vector such that the subsequent call will use all constituents.
77  const std::vector<int> partIndices;
78  return p4( partIndices );
79  }
80  }

◆ p4() [2/5]

FourMom_t xAOD::CompositeParticle_v1::p4 ( const std::vector< int > &  partIndices) const

The total 4-momentum.

◆ p4() [3/5]

FourMom_t xAOD::CompositeParticle_v1::p4 ( int  partIndexA,
int  partIndexB 
) const
inline

Get the four-momentum with two indices.

This specialization to the above method is needed since ROOT 6.02 doesn't yet support C++11 in the TFormula stuff with JIT compilation, see: https://sft.its.cern.ch/jira/browse/ROOT-5083

Definition at line 149 of file CompositeParticle_v1.h.

149  {
150  return this->p4( std::vector<int>{partIndexA, partIndexB} );
151  }

◆ p4() [4/5]

FourMom_t xAOD::CompositeParticle_v1::p4 ( int  partIndexA,
int  partIndexB,
int  partIndexC 
) const
inline

Get the four-momentum with three indices.

Definition at line 153 of file CompositeParticle_v1.h.

153  {
154  return this->p4( std::vector<int>{partIndexA, partIndexB, partIndexC} );
155  }

◆ p4() [5/5]

FourMom_t xAOD::CompositeParticle_v1::p4 ( int  partIndexA,
int  partIndexB,
int  partIndexC,
int  partIndexD 
) const
inline

Get the four-momentum with four indices.

Definition at line 157 of file CompositeParticle_v1.h.

157  {
158  return this->p4( std::vector<int>{partIndexA, partIndexB, partIndexC, partIndexD} );
159  }

◆ part()

const xAOD::IParticle * xAOD::CompositeParticle_v1::part ( std::size_t  index = 0) const

Get the constituent IParticle number i.

Definition at line 782 of file CompositeParticle_v1.cxx.

782  {
783  if ( index >= this->nParts() ) {
784  return nullptr;
785  }
786  const xAOD::IParticleLink & constitLink = partLink( index );
787  if ( ! constitLink.isValid() ) {
788  return nullptr;
789  }
790  return *constitLink;
791  }

◆ partLink()

const xAOD::IParticleLink & xAOD::CompositeParticle_v1::partLink ( std::size_t  index = 0) const

Get the constituent IParticle number i as an ElementLink.

Definition at line 795 of file CompositeParticle_v1.cxx.

795  {
796  if ( index >= this->nParts() ) {
797  static const xAOD::IParticleLink dummy;
798  return dummy;
799  }
800  return partLinks()[ index ];
801  }

◆ partLinks()

const xAOD::IParticleLinkContainer& xAOD::CompositeParticle_v1::partLinks ( ) const

Get all constituents in one go.

◆ parts()

template<typename CONTTYPE >
ConstDataVector<CONTTYPE>* xAOD::CompositeParticle_v1::parts ( ) const

Method to return a DataVector<T>, e.g., a MuonContainer, for all the constituent particles, e.g., of type xAOD::Muon, that this CompositeParticle has.

This DataVector be a simple SG::VIEW_ELEMENTS container, i.e., it does NOT own the elements, e.g., muons, but has simple pointers to them. However, the user is still required to take care of its memory management by either recording it to StoreGate (and thus transfering ownership), or by deleting this view-container when done with it.

◆ pdgId()

int xAOD::CompositeParticle_v1::pdgId ( ) const

Return the PDG identifier.

◆ phi() [1/2]

double xAOD::CompositeParticle_v1::phi ( ) const
virtual

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

Implements xAOD::IParticle.

Definition at line 52 of file CompositeParticle_v1.cxx.

52  {
53  return p4().Phi();
54  }

◆ phi() [2/2]

double xAOD::CompositeParticle_v1::phi ( const std::vector< int > &  partIndices) const

The azimuthal angle ( \(\phi\))

◆ photon()

const xAOD::Photon * xAOD::CompositeParticle_v1::photon ( std::size_t  index = 0) const
inline

Get the constituent number i as a Photon.

If the cast to Photon fails for a constituent, a null pointer is returned.

Definition at line 652 of file CompositeParticle_v1.h.

653 {
654  const xAOD::IParticle* ipart = this->part(index);
655  if ( ipart->type() != xAOD::Type::Photon ){ return 0; }
656  return static_cast<const xAOD::Photon*>(ipart);
657 }

◆ pt() [1/2]

double xAOD::CompositeParticle_v1::pt ( ) const
virtual

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

Implements xAOD::IParticle.

Definition at line 44 of file CompositeParticle_v1.cxx.

44  {
45  return std::hypot( px(), py() );
46  }

◆ pt() [2/2]

double xAOD::CompositeParticle_v1::pt ( const std::vector< int > &  partIndices) const

The transverse momentum ( \(p_T\))

◆ px() [1/2]

double xAOD::CompositeParticle_v1::px ( ) const

Get the px momentum component of the particle.

Definition at line 112 of file CompositeParticle_v1.cxx.

112  {
113  return p4().Px();
114  }

◆ px() [2/2]

double xAOD::CompositeParticle_v1::px ( const std::vector< int > &  partIndices) const

Get the px momentum component.

◆ py() [1/2]

double xAOD::CompositeParticle_v1::py ( ) const

Get the py momentum component of the particle.

Definition at line 117 of file CompositeParticle_v1.cxx.

117  {
118  return p4().Py();
119  }

◆ py() [2/2]

double xAOD::CompositeParticle_v1::py ( const std::vector< int > &  partIndices) const

Get the py momentum component.

◆ pz() [1/2]

double xAOD::CompositeParticle_v1::pz ( ) const

Get the pz momentum component of the particle.

Definition at line 122 of file CompositeParticle_v1.cxx.

122  {
123  return p4().Pz();
124  }

◆ pz() [2/2]

double xAOD::CompositeParticle_v1::pz ( const std::vector< int > &  partIndices) const

Get the pz momentum component.

◆ rapidity() [1/2]

double xAOD::CompositeParticle_v1::rapidity ( ) const
virtual

The true rapidity (y) of the particle.

Implements xAOD::IParticle.

Definition at line 60 of file CompositeParticle_v1.cxx.

60  {
61  return p4().Rapidity();
62  }

◆ rapidity() [2/2]

double xAOD::CompositeParticle_v1::rapidity ( const std::vector< int > &  partIndices) const

The true rapidity (y)

◆ releasePrivateStore()

void SG::AuxElement::releasePrivateStore ( )
inherited

Release and free any private store associated with this object.

ExcBadPrivateStore will be thrown if this object does not have a private store.

Definition at line 190 of file AuxElement.cxx.

191 {
192  if (hadPrivateData()) {
193  // We had a private store, but it was released because this object
194  // was added to a container. Just forget about it.
196  return;
197  }
198 
199  if (!havePrivateData() ||
200  !m_container ||
201  typeid(*m_container) != typeid(AuxElementPrivateData))
202  {
203  throw SG::ExcBadPrivateStore ("no private store exists");
204  }
205 
208  delete m_container;
209  m_container = 0;
210 }

◆ releasePrivateStoreForDtor()

void SG::AuxElement::releasePrivateStoreForDtor ( )
privateinherited

Out-of-line portion of destructor.

Delete a private store if we have one.

Definition at line 398 of file AuxElement.cxx.

399 {
400 #ifdef ATHCONTAINERS_R21_COMPAT
401  if (havePrivateData()) {
402  delete m_container;
403  }
404 #else
406 #endif
407 }

◆ removeMissingET()

void xAOD::CompositeParticle_v1::removeMissingET ( bool  updateFourMom = true)

Remove the existing MissingET object from this CompositeParticle.

Note that the 4-momentum of this CompositeParticle will be updated accordingly, if updateFourMom=true.

Definition at line 636 of file CompositeParticle_v1.cxx.

636  {
637  const xAOD::MissingET* met = this->missingET();
638  if ( !met ) {
639  // There is no valid MissingET object assigned... nothing can done
640  return;
641  }
642 
643  // Update the four-momentum of this composite particle, if requested
644  if ( updateFourMom ) {
646  double metpx = met->mpx();
647  double metpy = met->mpy();
648  metP4.SetPxPyPzE( metpx, metpy, 0.0, std::sqrt(metpx*metpx + metpy*metpy) );
649  this->setP4( this->p4() - metP4 );
650  }
651  // Assign an invalid ElementLink here
652  metLinkAcc(*this) = ElementLink<xAOD::MissingETContainer>();
653  return;
654  }

◆ removeOtherPart() [1/2]

void xAOD::CompositeParticle_v1::removeOtherPart ( const xAOD::IParticle part)

Remove a particle as an other constituent from this CompostiteParticle.

Definition at line 930 of file CompositeParticle_v1.cxx.

930  {
931  // Check if we have a valid pointer
932  if ( !part ) {
933  // This should not be... throw an error.
934  throw std::runtime_error("Got a zero pointer to an xAOD::IParticle when adding constituent!");
935  }
936 
937  // Add the ElementLink of the given particle and pass it on
938  const std::size_t partIdx = part->index();
939  const xAOD::IParticleContainer* partCont =
940  static_cast<const xAOD::IParticleContainer*>(part->container());
941  this->removeOtherPart( IParticleLink( *partCont, partIdx ) );
942  return;
943  }

◆ removeOtherPart() [2/2]

void xAOD::CompositeParticle_v1::removeOtherPart ( const xAOD::IParticleLink partLink)

Remove a particle as an other constituent from this CompostiteParticle.

Definition at line 948 of file CompositeParticle_v1.cxx.

948  {
949  // Check if we have a valid ElementLink
950  if ( ! partLink.isValid() ) {
951  // This should not be... throw an error.
952  throw std::runtime_error("Got an invalid ElementLink when adding constituent!");
953  }
954  xAOD::IParticleLinkContainer& otherPartLinks = otherPartLinksAcc( *this );
955 
956  // Find the constituent particle that should be removed
958  constitItr = otherPartLinks.begin(),
959  constitItrEnd = otherPartLinks.end();
960  constitItr != constitItrEnd;
961  ++constitItr ) {
962  const xAOD::IParticleLink& currentLink = *constitItr;
963  if ( partLink == currentLink ) {
964  // Remove the found link
965  otherPartLinks.erase( constitItr );
966  return;
967  }
968  }
969  return;
970  }

◆ removePart() [1/2]

void xAOD::CompositeParticle_v1::removePart ( const xAOD::IParticle part,
bool  updateFourMom = true 
)

Remove a particle as a constituent from this CompostiteParticle.

Note that the 4-momentum of this CompositeParticle will be updated accordingly, if updateFourMom=true. If the given IParticle is not already a constituent of this CompositeParticle, nothing happens

Definition at line 536 of file CompositeParticle_v1.cxx.

537  {
538  // Check if we have a valid pointer
539  if ( !part ) {
540  // This should not be... throw an error.
541  throw std::runtime_error("Got a zero pointer to an xAOD::IParticle when adding constituent!");
542  }
543 
544  // Add the ElementLink of the given particle and pass it on
545  const std::size_t partIdx = part->index();
546  const xAOD::IParticleContainer* partCont =
547  static_cast<const xAOD::IParticleContainer*>(part->container());
548  this->removePart( IParticleLink( *partCont, partIdx ), updateFourMom );
549  return;
550  }

◆ removePart() [2/2]

void xAOD::CompositeParticle_v1::removePart ( const xAOD::IParticleLink partLink,
bool  updateFourMom = true 
)

Remove a particle as a constituent from this CompostiteParticle.

Note that the 4-momentum of this CompositeParticle will be updated accordingly, if updateFourMom=true. If the given IParticle is not already a constituent of this CompositeParticle, nothing happens

Definition at line 555 of file CompositeParticle_v1.cxx.

556  {
557  // Check if we have a valid ElementLink
558  if ( ! partLink.isValid() ) {
559  // This should not be... throw an error.
560  throw std::runtime_error("Got an invalid ElementLink when adding constituent!");
561  }
562  xAOD::IParticleLinkContainer& constitLinks = partLinksAcc( *this );
563 
564  // Find the constituent particle that should be removed
566  constitItr = constitLinks.begin(),
567  constitItrEnd = constitLinks.end();
568  constitItr != constitItrEnd;
569  ++constitItr ) {
570  const xAOD::IParticleLink& currentLink = *constitItr;
571  if ( partLink == currentLink ) {
572  // Update the four-momentum of this composite particle, if requested
573  if ( updateFourMom ) {
574  this->setP4( this->p4() - (*partLink)->p4() );
575  // Cannot add charge automatically as this is NOT part of the xAOD::IParticle interface
576  //this->setCharge( this->charge() - (*partLink)->charge() );
577  }
578 
579  // Remove the found link
580  constitLinks.erase( constitItr );
581  return;
582  }
583  }
584  return;
585  }

◆ setCharge()

void xAOD::CompositeParticle_v1::setCharge ( float  charge)

Set the electric charge.

Definition at line 211 of file CompositeParticle_v1.cxx.

211  {
212  chargeAcc(*this) = charge;
213  return;
214  }

◆ setConstStore()

void SG::AuxElement::setConstStore ( const SG::IConstAuxStore store)
inherited

Synonym for setStore with IConstAuxStore.

Parameters
storeThe new store.

◆ setE()

void xAOD::CompositeParticle_v1::setE ( double  e)

Set the energy.

◆ setHadPrivateData()

void SG::IAuxElement::setHadPrivateData ( )
privateinherited

Record that this element used to have private data.

◆ setHavePrivateData()

void SG::IAuxElement::setHavePrivateData ( )
privateinherited

Record that this element currently has private data.

◆ setIndex()

void SG::AuxElement::setIndex ( size_t  index,
SG::AuxVectorData container 
)
privateinherited

Set the index/container for this element.

Parameters
indexThe index of this object within the container.
containerThe container holding this object. May be null if this object is being removed from a container.

Usually this simply sets the index and container members of this object. However, in the case where this object has an associated private store, then we need to deal with releasing the store if the object is being added to a container, or making a new store if the object is being removed from a container.

◆ setIndexPrivate()

bool SG::AuxElement::setIndexPrivate ( size_t  index,
SG::AuxVectorData container 
)
privateinherited

Set the index/container for this element.

Parameters
indexThe index of this object within the container.
containerThe container holding this object. May be null if this object is being removed from a container.

This is called from setIndex when we have a private store to deal with.

Definition at line 462 of file AuxElement.cxx.

463 {
464 #ifdef ATHCONTAINERS_R21_COMPAT
465  if (hadPrivateData()) {
466  // We had a private store, but it was released because we were added
467  // to a container.
468 
469  if (container == 0) {
470  // We're being moved out of the container. Make a new private
471  // store, copy the data, and switch to it.
472  auto privateData = new SG::AuxElementPrivateData;
473  AuxElement to (privateData, 0);
474  to.copyAux (*this);
477  m_container = privateData;
478  return true;
479  }
480  }
481  else if (havePrivateData() &&
482  typeid(*m_container) == typeid(AuxElementPrivateData))
483  {
484  // We currently have a private store.
485 
486  if (container != 0 && container != m_container) {
487  // We're being added to a container.
488  // Aux data has already been copied.
489  // Release private store.
492  delete m_container;
494  return false;
495  }
496  }
497  else {
498  // We have a standalone store.
499  throw SG::ExcBadPrivateStore ("Attempt to add/remove a standalone object "
500  "from a container.");
501  }
502 
505  return false;
506 #else
508 #endif
509 }

◆ setMissingET()

void xAOD::CompositeParticle_v1::setMissingET ( const xAOD::MissingET met,
bool  updateFourMom = true 
)

Set the MissingET for this CompositeParticle.

Note that the 4-momentum of this CompositeParticle will be updated accordingly, if updateFourMom=true.

Definition at line 608 of file CompositeParticle_v1.cxx.

609  {
610  // Check if we have a valid pointer
611  if ( !met ) {
612  // This should not be... throw an error.
613  throw std::runtime_error("Got a zero pointer to xAOD::MissingET when adding it!");
614  }
615 
616  // Update the four-momentum of this composite particle, if requested
617  if ( updateFourMom ) {
619  double metpx = met->mpx();
620  double metpy = met->mpy();
621  metP4.SetPxPyPzE( metpx, metpy, 0.0, std::sqrt(metpx*metpx + metpy*metpy) );
622  this->setP4( this->p4() + metP4 );
623  }
624 
625  // Add the given ElementLink as a constituent of this composite particle
626  const std::size_t metIdx = met->index();
627  const xAOD::MissingETContainer* metCont =
628  static_cast<const xAOD::MissingETContainer*>(met->container());
629  metLinkAcc(*this) = ElementLink<xAOD::MissingETContainer>( *metCont, metIdx );
630  return;
631  }

◆ setNonConstStore()

void SG::AuxElement::setNonConstStore ( SG::IAuxStore store)
inherited

Synonym for setStore with IAuxStore.

Parameters
storeThe new store.

◆ setNoPrivateData()

void SG::IAuxElement::setNoPrivateData ( )
privateinherited

Record that this element does not have private data.

◆ setOtherPartLinks()

void xAOD::CompositeParticle_v1::setOtherPartLinks ( const xAOD::IParticleLinkContainer otherPartLinks)
protected

Set all other constituents in one go.

◆ setP4()

void xAOD::CompositeParticle_v1::setP4 ( const FourMom_t vec)

Set the 4-vec.

Definition at line 132 of file CompositeParticle_v1.cxx.

132  {
133  accPx( *this ) = static_cast<float>(vec.Px());
134  accPy( *this ) = static_cast<float>(vec.Py());
135  accPz( *this ) = static_cast<float>(vec.Pz());
136  accE( *this ) = static_cast<float>(vec.E());
137  }

◆ setPartLinks()

void xAOD::CompositeParticle_v1::setPartLinks ( const xAOD::IParticleLinkContainer constitLinks)
protected

Set all constituents in one go.

Warning: This is meant for usage internal to this class only because no addition of the constituent properties will be done!

◆ setPdgId()

void xAOD::CompositeParticle_v1::setPdgId ( int  pdgID)

Set the PDG identifier.

◆ setPx()

void xAOD::CompositeParticle_v1::setPx ( double  px)

Set the x-component of the momentum.

◆ setPxPyPzE()

void xAOD::CompositeParticle_v1::setPxPyPzE ( double  px,
double  py,
double  pz,
double  e 
)

Set the 4-vec.

Definition at line 140 of file CompositeParticle_v1.cxx.

143  {
144  static const Accessor< float > acc1( "px" );
145  acc1( *this ) = (float)px;
146  static const Accessor< float > acc2( "py" );
147  acc2( *this ) = (float)py;
148  static const Accessor< float > acc3( "pz" );
149  acc3( *this ) = (float)pz;
150  static const Accessor< float > acc4( "e" );
151  acc4( *this ) = (float)e;
152  }

◆ setPy()

void xAOD::CompositeParticle_v1::setPy ( double  py)

Set the y-component of the momentum.

◆ setPz()

void xAOD::CompositeParticle_v1::setPz ( double  pz)

Set the z-component of the momentum.

◆ setStore() [1/3]

void SG::AuxElement::setStore ( const DataLink< SG::IConstAuxStore > &  store)
inherited

Set the store associated with this object.

Parameters
storeThe new store.

If store is nonzero, this adds a standalone store to the object. The object must not be in a container and must not have a private store. If store is zero, this removes a standalone store.

Parameters
storeLink to the new store.

Definition at line 249 of file AuxElement.cxx.

250 {
251  AuxElementStandaloneData* data = setStore1 (store);
252  if (store)
253  data->setStore (store);
254 }

◆ setStore() [2/3]

void SG::AuxElement::setStore ( const SG::IConstAuxStore store)
inherited

Set the store associated with this object.

Parameters
storeThe new store.

If store is nonzero, this adds a standalone store to the object. The object must not be in a container and must not have a private store. If store is zero, this removes a standalone store.

Definition at line 221 of file AuxElement.cxx.

222 {
223  AuxElementStandaloneData* data = setStore1 (store);
224  if (store)
225  data->setStore (store);
226 }

◆ setStore() [3/3]

void SG::AuxElement::setStore ( SG::IAuxStore store)
inherited

Set the store associated with this object.

Parameters
storeThe new store.

If store is nonzero, this adds a standalone store to the object. The object must not be in a container and must not have a private store. If store is zero, this removes a standalone store.

Definition at line 237 of file AuxElement.cxx.

238 {
239  AuxElementStandaloneData* data = setStore1 (store);
240  if (store)
241  data->setStore (store);
242 }

◆ setStore1()

AuxElementStandaloneData * SG::AuxElement::setStore1 ( const SG::IConstAuxStore store)
privateinherited

Set the store associated with this object.

Parameters
storeThe new store.

Helper for setStore. Creates the AuxElementStandaloneData object if needed and returns it.

Parameters
storeThe new store.

Helper for setStore. Creates the @x AuxElementStandaloneData object if needed and returns it.

Definition at line 418 of file AuxElement.cxx.

419 {
420  if (store) {
421  // Want this object be standalone.
422  if (!m_container) {
423  // Not in a container (and no private store). Make a new object.
424  AuxElementStandaloneData* data = new AuxElementStandaloneData;
426  m_container = data;
427  return data;
428  }
429  if (usingStandaloneStore()) {
430  // Standalone --- return existing object.
431  return static_cast<AuxElementStandaloneData*> (container());
432  }
433  // Otherwise, it's an error.
434  throw ExcBadPrivateStore ("Attempt to attach a standalone store to an "
435  "object in a container or with a private store.");
436  }
437 
438  else {
439  // Getting rid of a standalone store.
440  if (usingStandaloneStore()) {
442  delete m_container;
443  m_container = 0;
444  }
445  else if (m_container != 0)
446  throw ExcBadPrivateStore ("Attempt to remove a standalone store from an "
447  "object in a container or with a private store.");
448  return 0;
449  }
450 }

◆ tau()

const xAOD::TauJet * xAOD::CompositeParticle_v1::tau ( std::size_t  index = 0) const
inline

Get the constituent number i as a tau.

If the cast to tau fails for a constituent, a null pointer is returned.

Definition at line 682 of file CompositeParticle_v1.h.

683 {
684  const xAOD::IParticle* ipart = this->part(index);
685  if ( ipart->type() != xAOD::Type::Tau ){ return 0; }
686  return static_cast<const xAOD::TauJet*>(ipart);
687 }

◆ toPersistent()

void xAOD::CompositeParticle_v1::toPersistent ( )

Function preparing the object to be persistified.

◆ trackIndices()

bool SG::AuxElement::trackIndices ( ) const
inherited

Return true if index tracking is enabled for this object.

Always returns true. Included here to be consistent with AuxVectorBase when standalone objects may be used as template parameters.

◆ truthPart()

const xAOD::TruthParticle * xAOD::CompositeParticle_v1::truthPart ( std::size_t  index = 0) const
inline

Get the constituent number i as a TruthParticle.

If the cast to TruthParticle fails for a constituent, a null pointer is returned.

Definition at line 702 of file CompositeParticle_v1.h.

703 {
704  const xAOD::IParticle* ipart = this->part(index);
705  if ( ipart->type() != xAOD::Type::TruthParticle ){ return 0; }
706  return static_cast<const xAOD::TruthParticle*>(ipart);
707 }

◆ type()

Type::ObjectType xAOD::CompositeParticle_v1::type ( ) const
virtual

The type of the object as a simple enumeration.

Implements xAOD::IParticle.

Definition at line 102 of file CompositeParticle_v1.cxx.

102  {
104  }

◆ usingPrivateStore()

bool SG::AuxElement::usingPrivateStore ( ) const
inherited

Test to see if this object is currently using a private store.

Definition at line 260 of file AuxElement.cxx.

261 {
262  return havePrivateData() &&
263  typeid(*m_container) == typeid(AuxElementPrivateData);
264 }

◆ usingStandaloneStore()

bool SG::AuxElement::usingStandaloneStore ( ) const
inherited

Test to see if this object is currently using a standalone store.

Test to see if this object is currently using a private store.

Definition at line 270 of file AuxElement.cxx.

271 {
272  return havePrivateData() &&
273  typeid(*m_container) == typeid(AuxElementStandaloneData);
274 }

◆ weight() [1/6]

float xAOD::CompositeParticle_v1::weight ( const std::string &  varNameA) const
inline

Get the weight for this xAOD::CompositeParticle.

This specialization to the above method is needed since ROOT 6.02 doesn't yet support C++11 in the TFormula stuff with JIT compilation, see: https://sft.its.cern.ch/jira/browse/ROOT-5083

Definition at line 239 of file CompositeParticle_v1.h.

239  {
240  return this->weight( std::vector<std::string>{varNameA} );
241  }

◆ weight() [2/6]

float xAOD::CompositeParticle_v1::weight ( const std::string &  varNameA,
const std::string &  varNameB 
) const
inline

Definition at line 242 of file CompositeParticle_v1.h.

243  {
244  return this->weight( std::vector<std::string>{varNameA,varNameB} );
245  }

◆ weight() [3/6]

float xAOD::CompositeParticle_v1::weight ( const std::string &  varNameA,
const std::string &  varNameB,
const std::string &  varNameC 
) const
inline

Definition at line 246 of file CompositeParticle_v1.h.

248  {
249  return this->weight( std::vector<std::string>{varNameA,varNameB,varNameC} );
250  }

◆ weight() [4/6]

float xAOD::CompositeParticle_v1::weight ( const std::string &  varNameA,
const std::string &  varNameB,
const std::string &  varNameC,
const std::string &  varNameD 
) const
inline

Definition at line 251 of file CompositeParticle_v1.h.

254  {
255  return this->weight( std::vector<std::string>{varNameA,varNameB,varNameC,varNameD} );
256  }

◆ weight() [5/6]

float xAOD::CompositeParticle_v1::weight ( const std::string &  varNameA,
const std::string &  varNameB,
const std::string &  varNameC,
const std::string &  varNameD,
const std::string &  varNameE 
) const
inline

Definition at line 257 of file CompositeParticle_v1.h.

261  {
262  return this->weight( std::vector<std::string>{varNameA,varNameB,varNameC,varNameD,varNameE} );
263  }

◆ weight() [6/6]

float xAOD::CompositeParticle_v1::weight ( const std::vector< std::string > &  varNames,
const std::vector< int > &  partIndices = {} 
) const

Get the weight for this xAOD::CompositeParticle by providing a vector of variable names that will be looked for.

These variables, if found, are assumed to be of type float and to hold a multiplicative weight variable. If a given variable name is not found for this xAOD::CompositeParticle, then, the whole constituent tree will be searched for iteratively. The same variable name can be found and used for several constituents. But if a xAOD::CompositeParticle has that variable, the iterative search will not look into the constituents of that xAOD::CompositeParticle. The second, optional, argument is a list of indices such that one can restrict the variable name search to only the given constituent particles.

◆ weightHelper()

float xAOD::CompositeParticle_v1::weightHelper ( const xAOD::IParticle part,
const xAOD::IParticle::ConstAccessor< float > &  varAcc 
) const
private

This is a private helper method to calculate the weight.

Member Data Documentation

◆ m_container

const SG::AuxVectorData* SG::ConstAuxElement::m_container
privateinherited

The container of which this object is an element.

Should be null if this object is not within a container, except that it may also point at a private store.

Definition at line 298 of file AuxElement.h.

◆ m_index

size_t SG::IAuxElement::m_index
privateinherited

The index of this element within its container.

Should be 0 if this object is not within a container.

Definition at line 128 of file IAuxElement.h.

◆ m_privateStoreState

PrivateStoreState SG::IAuxElement::m_privateStoreState
privateinherited

Definition at line 137 of file IAuxElement.h.

◆ supportsThinning

constexpr bool SG::AuxElement::supportsThinning = true
staticconstexprinherited

Mark that this type supports thinning operations.

See AthContainers/supportsThinning.h and AthenaPoolCnvSvc/T_AthenaPoolCnv.h. Helps guide which pool converter template will be used. If false, the default pool converter will be used rather than the aux store-specific one. Ordinary xAOD type should not touch this, but may be overridden in a derived class to handle certain special cases.

Definition at line 883 of file AuxElement.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
python.CaloBCIDAvgAlgConfig.acc3
def acc3
Definition: CaloBCIDAvgAlgConfig.py:68
SG::AuxVectorData::getConstStore
const SG::IConstAuxStore * getConstStore() const
Return the current store, as a const interface.
xAOD::CompositeParticle_v1::nParts
std::size_t nParts() const
Number of constituent particles.
Definition: CompositeParticle_v1.cxx:722
beamspotman.r
def r
Definition: beamspotman.py:676
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:69
SG::ConstAuxElement::getAuxIDs
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items for this object.
Definition: AuxElement.cxx:152
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
xAOD::name
name
Definition: TriggerMenuJson_v1.cxx:29
xAOD::CompositeParticle_v1::FourMom_t
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
Definition: CompositeParticle_v1.h:68
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
xAOD::CompositeParticle_v1::partLink
const xAOD::IParticleLink & partLink(std::size_t index=0) const
Get the constituent IParticle number i as an ElementLink.
Definition: CompositeParticle_v1.cxx:795
xAOD::CompositeParticle_v1::nOtherTruthElectrons
std::size_t nOtherTruthElectrons() const
Number of other constituent truth electrons.
xAOD::CompositeParticle_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: CompositeParticle_v1.cxx:64
xAOD::float
float
Definition: BTagging_v1.cxx:168
SG::AuxTypeRegistry::instance
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Definition: AuxTypeRegistry.cxx:49
SG::Accessor< float >
SG::AuxVectorData::getWritableAuxIDs
const SG::auxid_set_t & getWritableAuxIDs() const
Return a set of identifiers for writable data items in this store.
Definition: AuxVectorData.cxx:217
index
Definition: index.py:1
SG::AuxElement::copyAux
void copyAux(const ConstAuxElement &other)
Copy aux data from another object.
Definition: AuxElement.cxx:561
SG::ConstAuxElement::m_container
const SG::AuxVectorData * m_container
The container of which this object is an element.
Definition: AuxElement.h:298
xAOD::CompositeParticle_v1::GenVecFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > GenVecFourMom_t
Base 4 Momentum type (GenVector)
Definition: CompositeParticle_v1.h:74
xAOD::CompositeParticle_v1::nTaus
std::size_t nTaus() const
Number of constituent taus.
xAOD::CompositeParticle_v1::nOtherParts
std::size_t nOtherParts() const
Number of other constituent particles.
Definition: CompositeParticle_v1.cxx:1010
TruthParticle
HepMC::GenParticle TruthParticle
Definition: Simulation/G4Sim/MCTruth/MCTruth/TruthEvent.h:13
SG::AuxVectorData::hasNonConstStore
bool hasNonConstStore() const
Return true if this object has an associated non-const store.
xAOD::CompositeParticle_v1::e
virtual double e() const
The total energy of the particle.
Definition: CompositeParticle_v1.cxx:107
xAOD::IParticle::type
virtual Type::ObjectType type() const =0
The type of the object as a simple enumeration.
xAOD::IParticleLinkContainer
IParticleLinkContainer_v1 IParticleLinkContainer
Define the latest version of the IParticleLinkContainer class.
Definition: xAOD/xAODParticleEvent/xAODParticleEvent/IParticleLinkContainer.h:18
SG::AuxElement::usingStandaloneStore
bool usingStandaloneStore() const
Test to see if this object is currently using a standalone store.
Definition: AuxElement.cxx:270
SG::ConstAuxElement::setIndexPrivate
bool setIndexPrivate(size_t index, const SG::AuxVectorData *container)
Set the index/container for this element.
Definition: AuxElement.cxx:96
xAOD::CompositeParticle_v1::partLinks
const xAOD::IParticleLinkContainer & partLinks() const
Get all constituents in one go.
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
xAOD::CompositeParticle_v1::py
double py() const
Get the py momentum component of the particle.
Definition: CompositeParticle_v1.cxx:117
xAOD::CompositeParticle_v1::nOtherTruthTaus
std::size_t nOtherTruthTaus() const
Number of other constituent truth taus.
SG::ExcConstAuxData
Exception — Non-const operation performed on const aux data.
Definition: Control/AthContainers/AthContainers/exceptions.h:77
SG::IAuxElement::setNoPrivateData
void setNoPrivateData()
Record that this element does not have private data.
xAOD::CompositeParticle_v1::addPart
void addPart(const xAOD::IParticle *part, bool updateFourMom=true)
Add a particle as an additional constituent.
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
xAOD::CompositeParticle_v1::nOtherMuons
std::size_t nOtherMuons() const
Number of other constituent muons.
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
SG::AuxVectorData::getAuxIDs
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items in store associated with this object.
Definition: AuxVectorData.cxx:201
xAOD::CompositeParticle_v1::part
const xAOD::IParticle * part(std::size_t index=0) const
Get the constituent IParticle number i.
Definition: CompositeParticle_v1.cxx:782
xAOD::IParticle::FourMom_t
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:68
SG::AuxTypeRegistry
Handle mappings between names and auxid_t.
Definition: AuxTypeRegistry.h:62
xAOD::CompositeParticle
CompositeParticle_v1 CompositeParticle
Define the latest version of the composite particle class.
Definition: Event/xAOD/xAODParticleEvent/xAODParticleEvent/CompositeParticle.h:17
SG::IAuxElement::index
size_t index() const
Return the index of this element within its container.
SG::IAuxElement::setHadPrivateData
void setHadPrivateData()
Record that this element used to have private data.
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
met
Definition: IMETSignificance.h:24
xAOD::CompositeParticle_v1::mt
double mt(const std::vector< int > &partIndices, MT::Method method=MT::DEFAULT) const
Get the transverse mass.
lumiFormat.i
int i
Definition: lumiFormat.py:92
SG::AuxElement::clearAux
void clearAux()
Clear all aux data associated with this element.
Definition: AuxElement.cxx:535
PixelAthClusterMonAlgCfg.varName
string varName
end cluster ToT and charge
Definition: PixelAthClusterMonAlgCfg.py:117
SG::AuxElement::AuxElement
AuxElement()
Default constructor.
python.CaloBCIDAvgAlgConfig.acc1
def acc1
Definition: CaloBCIDAvgAlgConfig.py:48
SG::IAuxElement::havePrivateData
bool havePrivateData() const
True if this element currently has private data.
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
xAOD::CompositeParticle_v1::nMuons
std::size_t nMuons() const
Number of constituent muons.
SG::AuxVectorData::getStore
SG::IAuxStore * getStore()
Return the current store, as a non-const interface.
xAOD::CompositeParticle_v1
Description of a composite particle, i.e.
Definition: CompositeParticle_v1.h:45
python.CaloBCIDAvgAlgConfig.acc2
def acc2
Definition: CaloBCIDAvgAlgConfig.py:58
xAOD::MissingET_v1
Principal data object for Missing ET.
Definition: MissingET_v1.h:25
xAOD::CompositeParticle_v1::removeOtherPart
void removeOtherPart(const xAOD::IParticle *part)
Remove a particle as an other constituent from this CompostiteParticle.
Definition: CompositeParticle_v1.cxx:930
python.xAODType.dummy
dummy
Definition: xAODType.py:4
SG::AuxElementPrivateData
Internal data container for private store.
Definition: AuxElement.cxx:45
xAOD::CompositeParticle_v1::nElectrons
std::size_t nElectrons() const
Number of constituent electrons.
xAOD::CompositeParticle_v1::nOtherTaus
std::size_t nOtherTaus() const
Number of other constituent taus.
xAOD::CompositeParticle_v1::nOtherTruthMuons
std::size_t nOtherTruthMuons() const
Number of other constituent truth muons.
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
SG::AuxVectorData::hasStore
bool hasStore() const
Return true if this object has an associated store.
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
python.LArRecUtilsConfig.acc4
def acc4
Definition: LArRecUtilsConfig.py:196
xAOD::MissingETContainer_v1
Container for xAOD::MissingET_v1 objects.
Definition: MissingETContainer_v1.h:21
xAOD::CompositeParticle_v1::pz
double pz() const
Get the pz momentum component of the particle.
Definition: CompositeParticle_v1.cxx:122
xAOD::CompositeParticle_v1::otherPartLinks
const xAOD::IParticleLinkContainer & otherPartLinks() const
Get all other constituents in one go.
xAOD::CompositeParticle_v1::px
double px() const
Get the px momentum component of the particle.
Definition: CompositeParticle_v1.cxx:112
SG::IAuxElement::setHavePrivateData
void setHavePrivateData()
Record that this element currently has private data.
SG::AuxVectorData::clearCache
void clearCache()
Clear the cached aux data pointers.
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:172
xAOD::Electron_v1
Definition: Electron_v1.h:34
xAOD::CompositeParticle_v1::addOtherPart
void addOtherPart(const xAOD::IParticle *part)
Add a particle as an additional other constituent.
xAOD::CompositeParticle_v1::compPart
xAOD::CompositeParticle_v1 * compPart(const std::vector< int > &partIndices, const std::vector< int > &otherPartIndices=std::vector< int >{}, bool updateFourMom=true) const
Get a CompositeParticle that is build on the fly from the constituent particles associated to the ind...
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
Muon
struct TBPatternUnitContext Muon
xAOD::CompositeParticle_v1::charge
float charge() const
Return the electric charge.
Definition: CompositeParticle_v1.cxx:182
xAOD::CompositeParticle_v1::nTruthElectrons
std::size_t nTruthElectrons() const
Number of constituent truth electrons.
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
xAOD::IParticle::IParticle
IParticle()=default
SG::IAuxElement::setIndex
void setIndex(size_t index)
Set the index of this element within its container.
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
SG::AuxVectorData::clearDecorations
bool clearDecorations() const
Clear all decorations.
Definition: AuxVectorData.cxx:593
xAOD::Photon_v1
Definition: Photon_v1.h:37
xAOD::CompositeParticle_v1::otherPartLink
const xAOD::IParticleLink & otherPartLink(std::size_t index=0) const
Get the other constituent IParticle number i as an ElementLink.
Definition: CompositeParticle_v1.cxx:1084
SG::ExcBadPrivateStore
Exception — Bad use of private store.
Definition: Control/AthContainers/AthContainers/exceptions.h:113
xAOD::CompositeParticle_v1::nOtherElectrons
std::size_t nOtherElectrons() const
Number of other constituent electrons.
xAOD::CompositeParticle_v1::nTruthMuons
std::size_t nTruthMuons() const
Number of constituent truth muons.
xAOD::CompositeParticle_v1::removePart
void removePart(const xAOD::IParticle *part, bool updateFourMom=true)
Remove a particle as a constituent from this CompostiteParticle.
Definition: CompositeParticle_v1.cxx:536
xAODType::Tau
@ Tau
The object is a tau (jet)
Definition: ObjectType.h:49
SG::auxid_set_t
A set of aux data identifiers.
Definition: AuxTypes.h:47
xAOD::IParticleLink
IParticleLink_v1 IParticleLink
Define the latest version of the IParticleLink class.
Definition: xAOD/xAODParticleEvent/xAODParticleEvent/IParticleLink.h:17
SG::AuxVectorData
Manage lookup of vectors of auxiliary data.
Definition: AuxVectorData.h:167
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
SG::ConstAuxElement::releasePrivateStoreForDtor
void releasePrivateStoreForDtor()
Out-of-line portion of destructor.
Definition: AuxElement.cxx:79
SG::AuxElement::container
const SG::AuxVectorData * container() const
Return the container holding this element.
xAOD::CompositeParticle_v1::setP4
void setP4(const FourMom_t &vec)
Set the 4-vec.
Definition: CompositeParticle_v1.cxx:132
xAOD::CompositeParticle_v1::otherPart
const xAOD::IParticle * otherPart(std::size_t index=0) const
Get the other constituent IParticle number i.
Definition: CompositeParticle_v1.cxx:1071
SG::IAuxElement::hadPrivateData
bool hadPrivateData() const
True if this element had private data before it was added to its current container.
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition: Event/xAOD/xAODJet/xAODJet/Jet.h:17
SG::IConstAuxStore::getAuxIDs
virtual const SG::auxid_set_t & getAuxIDs() const =0
Return a set of identifiers for existing data items in this store.
xAOD::CompositeParticle_v1::nTruthTaus
std::size_t nTruthTaus() const
Number of constituent truth taus.
SG::AuxElement::setStore1
AuxElementStandaloneData * setStore1(const SG::IConstAuxStore *store)
Set the store associated with this object.
Definition: AuxElement.cxx:418
xAOD::CompositeParticle_v1::missingET
const xAOD::MissingET * missingET() const
Get the MissingET object that is associated with this CompositeParticle.
Definition: CompositeParticle_v1.cxx:593
xAOD::CompositeParticle_v1::weight
float weight(const std::vector< std::string > &varNames, const std::vector< int > &partIndices={}) const
Get the weight for this xAOD::CompositeParticle by providing a vector of variable names that will be ...