ATLAS Offline Software
Loading...
Searching...
No Matches
xAOD::MissingETAssociation_v1 Class Reference

MET association descriptor contains object links and corresponding parameters. More...

#include <MissingETAssociation_v1.h>

Inheritance diagram for xAOD::MissingETAssociation_v1:
Collaboration diagram for xAOD::MissingETAssociation_v1:

Classes

class  ConstVec
 Vector sum of constituents for subtractive overlap removal. 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

 MissingETAssociation_v1 (bool createStore=false)
 Default constructor.
 MissingETAssociation_v1 (const Jet *pjet, bool isMisc=false)
 Construct with a link to a Jet object.
 MissingETAssociation_v1 (const MissingETAssociation_v1 &assocDescr)
 Copy constructor.
MissingETAssociation_v1operator= (const MissingETAssociation_v1 &assocDescr)
virtual ~MissingETAssociation_v1 ()
 Assignment operator.
size_t findCalIndex (MissingETBase::Types::bitmask_t mask) const
size_t findTrkIndex (MissingETBase::Types::bitmask_t mask) const
void assign (const AuxElement &other, bool warnUnlocked=false)
 Assignment.
const SG::AuxVectorDatacontainer () const
 Return the container holding this element.
SG::AuxVectorDatacontainer ()
 Return the container holding this element.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::reference_type auxdata (const std::string &name)
 Fetch an aux data variable, as a non-const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::reference_type auxdata (const std::string &name, const std::string &clsname)
 Fetch an aux data variable, as a non-const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdata (const std::string &name) const
 Fetch an aux data variable, as a const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdata (const std::string &name, const std::string &clsname) const
 Fetch an aux data variable, as a const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdataConst (const std::string &name) const
 Fetch an aux data variable, as a const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED 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.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool isAvailable (const std::string &name, const std::string &clsname="") const
 Check if an aux variable is available for reading.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool isAvailableWritable (const std::string &name, const std::string &clsname="")
 Check if an aux variable is available for writing.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool isAvailableWritableAsDecoration (const std::string &name, const std::string &clsname="") const
 Check if an aux variable is available for writing as a decoration.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type auxdecor (const std::string &name) const
 Fetch an aux decoration, as a non-const reference.
template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type auxdecor (const std::string &name, const std::string &clsname) const
 Fetch an aux decoration, as a non-const reference.
void makePrivateStore ()
 Create a new (empty) private store for this object.
template<class U1>
void makePrivateStore (const U1 &other, bool warnUnlocked=false)
 Create a new private store for this object and copy aux data.
template<class U1>
void makePrivateStore (const U1 *other, bool warnUnlocked=false)
 Create a new private store for this object and copy aux data.
void releasePrivateStore ()
 Release and free any private store associated with this object.
void setStore (const SG::IConstAuxStore *store)
 Set the store associated with this object.
void setStore (SG::IAuxStore *store)
 Set the store associated with this object.
void setStore (const DataLink< SG::IConstAuxStore > &store)
 Set the store associated with this object.
void setConstStore (const SG::IConstAuxStore *store)
 Synonym for setStore with IConstAuxStore.
void setNonConstStore (SG::IAuxStore *store)
 Synonym for setStore with IAuxStore.
bool usingPrivateStore () const
 Test to see if this object is currently using a private store.
bool usingStandaloneStore () const
 Test to see if this object is currently using a standalone store.
const SG::IConstAuxStoregetConstStore () const
 Return the current store, as a const interface.
SG::IAuxStoregetStore () const
 Return the current store, as a non-const interface.
void clearCache ()
 Clear the cached aux data pointers.
const SG::auxid_set_tgetAuxIDs () const
 Return a set of identifiers for existing data items for this object.
const SG::auxid_set_tgetDecorIDs () const
 Return a set of identifiers for decorations for this object.
bool hasStore () const
 Return true if this object has an associated store.
bool hasNonConstStore () const
 Return true if this object has an associated non-const store.
bool clearDecorations () const
 Clear all decorations.
bool trackIndices () const
 Return true if index tracking is enabled for this object.
size_t index () const
 Return the index of this element within its container.
Set reference jet

Base class destructor

bool setRefJet (const Jet *pJet)
 Set reference jet by object pointer reference.
bool setRefJet (const JetContainer *pJetCont, size_t pJetIdx)
 Set reference jet by container pointer and index reference.
Adding data to the MET association description

bool addObject (const IParticle *pPart, const std::vector< const IParticle * > &constlist)
 Add object (particle) from pointer reference with individual constituent vectors.
Conventional and dedicated getter and setters

const std::vector< float > & calpx () const
 Get the vector of \( P_{x} \).
float calpx (const IParticle *pPart) const
 Get the vector \( P_{x} \) for a given object referenced by pointer.
float calpx (size_t keyIdx) const
 Get the vector \( P_{x} \) for a given object referenced by index.
bool setCalPx (const std::vector< float > &calpxvec)
 Set the vector of \( P_{x} \).
bool setCalPx (size_t keyIdx, float calpx)
 Set calo constituent vector \( P_{x} \) for a given contributing object referenced by index.
const std::vector< float > & calpy () const
 Get the vector of \( P_{y} \).
float calpy (size_t keyIdx) const
 Get the vector \( P_{y} \) for a given object referenced by index.
bool setCalPy (const std::vector< float > &calpyvec)
 Set the vector of \( P_{y} \).
bool setCalPy (size_t keyIdx, float calpy)
 Set calo constituent vector \( P_{y} \) for a given contributing object referenced by index.
const std::vector< float > & calpz () const
 Get the vector of \( P_{z} \).
float calpz (size_t keyIdx) const
 Get the vector \( P_{z} \) for a given object referenced by index.
bool setCalPz (const std::vector< float > &calpzvec)
 Set the vector of \( P_{z} \).
bool setCalPz (size_t keyIdx, float calpz)
 Set calo constituent vector \( P_{z} \) for a given contributing object referenced by index.
const std::vector< float > & cale () const
 Get the vector of \( E \).
float cale (size_t keyIdx) const
 Get the vector \( E \) for a given object referenced by index.
bool setCalE (const std::vector< float > &calevec)
 Set the vector of \( E \).
bool setCalE (size_t keyIdx, float cale)
 Set calo constituent vector \( E \) for a given contributing object referenced by index.
const std::vector< float > & calsumpt () const
 Get the vector of sumpt.
float calsumpt (size_t keyIdx) const
 Get the sumpt for a given object referenced by index.
bool setCalSumpt (const std::vector< float > &calsumptvec)
 Set the vector of sumpt.
bool setCalSumpt (size_t keyIdx, float calsumpt)
 Set calo constituent sumpt for a given contributing object referenced by index.
const std::vector< MissingETBase::Types::bitmask_t > & calkey () const
 Get the vector of cal keys.
MissingETBase::Types::bitmask_t calkey (size_t keyIdx) const
 Get the key for a given entry referenced by index.
bool setCalKey (const std::vector< MissingETBase::Types::bitmask_t > &calkeyvec)
 Set the vector of keys.
bool setCalKey (size_t keyIdx, MissingETBase::Types::bitmask_t calkey)
 Set calo key for a given contributing entry referenced by index.
bool setCalVec (size_t keyIdx, const ConstVec &cvec=ConstVec())
 Set the calo constituent vector of an object contribution referenced by index.
bool setCalVec (size_t keyIdx, float calpx, float calpy, float calpz, float ce, float sumpt)
 Set the calo constituent vectors of an object contribution referenced by index.
bool addCalVec (MissingETBase::Types::bitmask_t key, float calpx, float calpy, float calpz, float cale, float sumpt)
 Add a key/vector pair for calo contributions.
bool clearCalVecs ()
 Reset the calo constituent vectors and keys.
const std::vector< float > & trkpx () const
 Get the vector of \( P_{x} \).
float trkpx (size_t keyIdx) const
 Get the vector \( P_{x} \) for a given object referenced by index.
bool setTrkPx (const std::vector< float > &trkpxvec)
 Set the vector of \( P_{x} \).
bool setTrkPx (size_t keyIdx, float trkpx)
 Set track constituent vector \( P_{x} \) for a given contributing object referenced by index.
const std::vector< float > & trkpy () const
 Get the vector of \( P_{y} \).
float trkpy (size_t keyIdx) const
 Get the vector \( P_{y} \) for a given object referenced by index.
bool setTrkPy (const std::vector< float > &trkpyvec)
 Set the vector of \( P_{y} \).
bool setTrkPy (size_t keyIdx, float trkpy)
 Set track constituent vector \( P_{y} \) for a given contributing object referenced by index.
const std::vector< float > & trkpz () const
 Get the vector of \( P_{z} \).
float trkpz (size_t keyIdx) const
 Get the vector \( P_{z} \) for a given object referenced by index.
bool setTrkPz (const std::vector< float > &trkpzvec)
 Set the vector of \( P_{z} \).
bool setTrkPz (size_t keyIdx, float trkpz)
 Set track constituent vector \( P_{z} \) for a given contributing object referenced by index.
const std::vector< float > & trke () const
 Get the vector of \( E \).
float trke (size_t keyIdx) const
 Get the vector \( E \) for a given object referenced by index.
bool setTrkE (const std::vector< float > &trkevec)
 Set the vector of \( E \).
bool setTrkE (size_t keyIdx, float trke)
 Set track constituent vector \( E \) for a given contributing object referenced by index.
const std::vector< float > & trksumpt () const
 Get the vector of \( E \).
float trksumpt (size_t keyIdx) const
 Get the vector \( E \) for a given object referenced by index.
bool setTrkSumpt (const std::vector< float > &trksumptvec)
 Set the vector of \( E \).
bool setTrkSumpt (size_t keyIdx, float trksumpt)
 Set track constituent vector \( E \) for a given contributing object referenced by index.
const std::vector< MissingETBase::Types::bitmask_t > & trkkey () const
 Get the vector of trk keys.
MissingETBase::Types::bitmask_t trkkey (size_t keyIdx) const
 Get the key for a given entry referenced by index.
bool setTrkKey (const std::vector< MissingETBase::Types::bitmask_t > &trkkeyvec)
 Set the vector of keys.
bool setTrkKey (size_t keyIdx, MissingETBase::Types::bitmask_t trkkey)
 Set trk key for a given contributing entry referenced by index.
bool setTrkVec (size_t keyIdx, const ConstVec &cvec=ConstVec())
 Set the track constituent vector of an object contribution referenced by index.
bool setTrkVec (size_t keyIdx, float trkpx, float trkpy, float trkpz, float trke, float sumpt)
 Set the track constituent vectors of an object contribution referenced by index.
bool addTrkVec (MissingETBase::Types::bitmask_t key, float trkpx, float trkpy, float trkpz, float ce, float sumpt)
 Add a key/vector pair for calo contributions.
bool clearTrkVecs ()
 Reset the track constituent vectors and keys.
float jettrkpx () const
 Get the vector \( P_{x} \) for a given object referenced by index.
float jettrkpy () const
 Get the vector \( P_{y} \) for a given object referenced by pointer.
float jettrkpz () const
 Get the vector \( P_{z} \) for a given object referenced by pointer.
float jettrke () const
 Get the vector \( E \) for a given object referenced by index.
float jettrksumpt () const
 Get the sumpt for a given object referenced by index.
void setJetTrkPx (float px)
 Set track constituent vector \( P_{x} \) for the reference jet.
void setJetTrkPy (float py)
 Set track constituent vector \( P_{y} \) for the reference jet.
void setJetTrkPz (float pz)
 Set track constituent vector \( P_{z} \) for the reference jet.
void setJetTrkE (float e)
 Set track constituent vector \( E \) for the reference jet.
void setJetTrkSumpt (float sumpt)
 Set track constituent vector \( E \) for the reference jet.
void setJetTrkVec (const ConstVec &cvec=ConstVec())
 Set the track constituent vector for the reference jet.
void setJetTrkVec (float px, float py, float pz, float ce, float sumpt)
 Set the track constituent vector for the reference jet.
const MissingETBase::Types::jetlink_tjetLink () const
 Get the link to the reference jet.
bool setJetLink (const MissingETBase::Types::jetlink_t &jetLnk)
 Set the link to the reference jet.
const MissingETBase::Types::objlink_vector_tobjectLinks () const
 Get the vector of links to the contributing physics or signal objects.
bool setObjectLinks (const MissingETBase::Types::objlink_vector_t &objLnks)
 Set the vector of links to the contributing physics or signal objects.
const std::vector< std::vector< size_t > > & overlapIndices () const
 Get the list of object overlapIndices.
std::vector< size_t > overlapIndices (const IParticle *pPart) const
 Get the overlap indices for a given object referenced by pointer.
std::vector< size_t > overlapIndices (size_t objIdx) const
 Get the overlap indices for a given object referenced by index.
const std::vector< std::vector< unsigned char > > & overlapTypes () const
 Get the list of object overlapTypes.
std::vector< unsigned charoverlapTypes (const IParticle *pPart) const
 Get the overlap types for a given object referenced by pointer.
std::vector< unsigned charoverlapTypes (size_t objIdx) const
 Get the overlap types for a given object referenced by index.
void clearOverlaps ()
 Clear the vectors of overlap indices.
bool setOverlaps (const std::vector< std::vector< size_t > > &overlapIndices, const std::vector< std::vector< unsigned char > > &overlapTypes)
 Set the vector of overlap indices and types.
bool setOverlaps (const IParticle *pPart, const std::vector< size_t > &overlapIndices, const std::vector< unsigned char > &overlapTypes)
 Set overlap indices and types for a given contributing object referenced by pointer.
bool setOverlaps (size_t objIdx, const std::vector< size_t > &overlapIndices, const std::vector< unsigned char > &overlapTypes)
 Set overlap indices and types for a given contributing object referenced by index.
void setOverrideMom (const std::map< const IParticle *, ConstVec > &pOverride)
 Set override momenta.
std::map< const IParticle *, ConstVecoverrideMom ()
 Get override momenta.
void addOverrideMom (std::map< const IParticle *, ConstVec > &pOverride)
 Extend override momentum map.
Specific methods for manipulating the association description data

bool removeContrib (const IParticle *pPart)
 Remove a contribution referenced by an object pointer.
bool removeContrib (size_t objIdx)
 Remove a contribution referenced by an index.
bool removeContrib ()
 Remove all contributions.
bool resetContrib (const IParticle *pPart)
 Reset the contribution parameters of an object referenced by a pointer.
bool resetContrib (size_t objIdx)
 Reset the contribution parameters of an object referenced by an index.
bool resetContrib ()
 Reset all contribution parameters.
Dedicated accessors for linked objects
const JetrefJet () const
 Access reference jet.
const JetContainerrefJetContainer () const
 Access reference jet container holding reference jet.
size_t refJetIndex () const
 Access index of reference jet in its container.
std::vector< const IParticle * > objects () const
 Access contributing objects.
std::vector< const IParticle * > objects (std::vector< ConstVec > &calVecs, std::vector< ConstVec > &trkVecs) const
 Access contributing objects and retrieve constituent vectors.
std::vector< const IParticle * > objects (const std::vector< float > *&calpxPtr, const std::vector< float > *&calpyPtr, const std::vector< float > *&calpzPtr, const std::vector< float > *&calePtr, const std::vector< float > *&calsumptPtr, const std::vector< float > *&trkpxPtr, const std::vector< float > *&trkpyPtr, const std::vector< float > *&trkpzPtr, const std::vector< float > *&trkePtr, const std::vector< float > *&trksumptPtr) const
 Access contributing objects and retrieve constituent vectors.
ConstVec calVec (const IParticle *pPart) const
 Get calo constituent vector for a given object.
ConstVec calVec (size_t keyIdx) const
 Get calo constituent vector for a given entry (index) in the contributing object list.
ConstVec trkVec (const IParticle *pPart) const
 Get track constituent vector for a given object.
ConstVec trkVec (size_t keyIdx) const
 Get track constituent vector for a given entry (index) in the contributing object list.
ConstVec jetTrkVec () const
 Get track constituent vector for the reference jet.
Adding and retrieving selection and overlap information
bool addOverlap (const IParticle *pPart, size_t index, unsigned char type)
 Add overlap index for a given contributing object referenced by pointer.
bool addOverlap (size_t objIdx, size_t index, unsigned char type)
 Add overlap index for a given contributing object referenced by index.
bool identifyOverlaps ()
 Loop over contributing objects to identify those that share constituents.
bool identifyOverlaps (size_t objIdx)
 Search association for particles that share constituents with this one.
bool identifyOverlaps (const IParticle *pPart)
 Search association for particles that share constituents with this one.
bool hasOverlaps (const MissingETAssociationHelper &helper, size_t objIdx, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::OnlyCluster) const
 Check if any selected particles overlap this one.
bool hasOverlaps (const MissingETAssociationHelper &helper, const IParticle *pPart, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::OnlyCluster) const
 Check if any selected particles overlap this one.
bool hasAlternateConstVec () const
xAOD::JetFourMom_t getAlternateConstVec () const
ConstVec overlapCalVec (const MissingETAssociationHelper &helper) const
 Retrieve total cluster-based vector to be subtracted from the jet.
ConstVec overlapTrkVec (const MissingETAssociationHelper &helper) const
 Retrieve total track-based vector to be subtracted from the jet.
bool containsSignal (const IParticle *pSig) const
 Check if this signal object matches the constituents of any contributing objects.
bool containsPhysics (const IParticle *pPhys) const
 Check if this physics object matches any contributing objects.
bool isMisc () const
 Check if this association is a miscellaneous association.
bool checkUsage (const MissingETAssociationHelper &helper, const IParticle *pSig, MissingETBase::UsageHandler::Policy p) const
 Check if this signal object matches the constituents of any flagged contributing objects.
Allocating and accessing objects in the contribution

size_t findIndex (const IParticle *pPart) const
 Find index of given object in contributing object store.
List management and information
size_t size () const
 Update all internally used ElementLink instances.
size_t sizeCal () const
size_t sizeTrk () const
bool empty () const
 Empty list of contributing objects indicator.
Comparators
Parameters
[in]contribreference to non-modifiable contribution object to compare to.
bool operator== (const MissingETAssociation_v1 &contrib) const
bool operator!= (const MissingETAssociation_v1 &contrib) const
 Equality.

Static Public Member Functions

static bool testPolicy (const xAOD::IParticle &part, MissingETBase::UsageHandler::Policy p)

Static Public Attributes

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

Protected Member Functions

void createPrivateStore ()
 Function initialising the object to work in standalone mode.
bool noPrivateData () const
 True if this element has no private data.
bool havePrivateData () const
 True if this element currently has private data.
bool hadPrivateData () const
 True if this element had private data before it was added to its current container.
Internal non-const accessors

The underlying data model uses the auxiliary store MissingETAuxComposition_v1, which only employs low level data structures and ElementLinks.

The accessors forward their specific request to static accessors, which retrieve the data by internally used names.

MissingETBase::Types::objlink_vector_tf_objectLinks ()
 Non-const link reference.
MissingETBase::Types::jetlink_tf_jetLink ()
 Non-const link reference.
std::vector< float > & f_calpx ()
std::vector< float > & f_calpy ()
std::vector< float > & f_calpz ()
std::vector< float > & f_cale ()
std::vector< float > & f_calsumpt ()
std::vector< MissingETBase::Types::bitmask_t > & f_calkey ()
std::vector< float > & f_trkpx ()
std::vector< float > & f_trkpy ()
std::vector< float > & f_trkpz ()
std::vector< float > & f_trke ()
std::vector< float > & f_trksumpt ()
std::vector< MissingETBase::Types::bitmask_t > & f_trkkey ()
floatf_jettrkpx ()
floatf_jettrkpy ()
floatf_jettrkpz ()
floatf_jettrke ()
floatf_jettrksumpt ()
charf_isMisc ()
std::vector< std::vector< size_t > > & f_overlapIndices ()
 record overlapIndices between constributing objects
std::vector< std::vector< unsigned char > > & f_overlapTypes ()
 record overlapTypes between constributing objects
Helpers
bool f_removeContrib (size_t objIdx)
 Copy the contribution data from a source.
void copyData (const MissingETAssociation_v1 &assocDescr)
template<class POBJ, class LINK>
void f_setObject (const POBJ *pObj, LINK &elemLink)
 Generalized link manager.
template<class LINK>
bool f_setLink (LINK &elemLink)
Management of local cache
void initCache ()
 initialise cache for overlap removal decisions

Static Protected Member Functions

static bool testPolicy (xAOD::Type::ObjectType type, MissingETBase::UsageHandler::Policy p)

Protected Attributes

Internal data for local cache
std::vector< std::vector< ElementLink< IParticleContainer > > > m_objConstLinks
 Cache object constituents for overlap-finding.

Private Types

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

Private Member Functions

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

Static Private Member Functions

static void clearAuxHelper (AuxVectorData &container, size_t index)
 Clear all aux data associated with an element.
static void copyAuxHelper (AuxVectorData &container, size_t index, const ConstAuxElement &other, bool warnUnlocked)
 Copy aux data from another object.

Private Attributes

std::map< const IParticle *, ConstVecm_override
const SG::AuxVectorDatam_container
 The container of which this object is an element.
size_t m_index
 The index of this element within its container.
PrivateStoreState m_privateStoreState

Static Private Attributes

static const SG::AuxElement::Accessor< std::vector< float > > m_acc_calpx
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_calpy
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_calpz
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_cale
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_calsumpt
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_trkpx
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_trkpy
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_trkpz
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_trke
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_trksumpt
static const SG::AuxElement::Accessor< floatm_acc_jettrkpx
static const SG::AuxElement::Accessor< floatm_acc_jettrkpy
static const SG::AuxElement::Accessor< floatm_acc_jettrkpz
static const SG::AuxElement::Accessor< floatm_acc_jettrke
static const SG::AuxElement::Accessor< floatm_acc_jettrksumpt

Detailed Description

MET association descriptor contains object links and corresponding parameters.

Definition at line 24 of file MissingETAssociation_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 572 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 569 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 575 of file AuxElement.h.

◆ TypelessConstAccessor

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

Definition at line 566 of file AuxElement.h.

Member Enumeration Documentation

◆ PrivateStoreState

enum class 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

◆ MissingETAssociation_v1() [1/3]

xAOD::MissingETAssociation_v1::MissingETAssociation_v1 ( bool createStore = false)
explicit

Default constructor.

Definition at line 94 of file MissingETAssociation_v1.cxx.

95 : SG::AuxElement()
96 {
97
98 if( createStore ) createPrivateStore();
99 initCache();
100 }
void createPrivateStore()
Function initialising the object to work in standalone mode.
void initCache()
initialise cache for overlap removal decisions

◆ MissingETAssociation_v1() [2/3]

xAOD::MissingETAssociation_v1::MissingETAssociation_v1 ( const Jet * pjet,
bool isMisc = false )

Construct with a link to a Jet object.

Definition at line 102 of file MissingETAssociation_v1.cxx.

103 : SG::AuxElement()
104 {
105
107 f_isMisc() = isMisc;
108 setRefJet( pJet );
109 initCache();
110 }
bool isMisc() const
Check if this association is a miscellaneous association.
bool setRefJet(const Jet *pJet)
Set reference jet by object pointer reference.

◆ MissingETAssociation_v1() [3/3]

xAOD::MissingETAssociation_v1::MissingETAssociation_v1 ( const MissingETAssociation_v1 & assocDescr)

Copy constructor.

Definition at line 112 of file MissingETAssociation_v1.cxx.

113 : SG::AuxElement(assocDescr)
114 {
115 this->makePrivateStore(&assocDescr);
116 initCache();
117 }
void makePrivateStore()
Create a new (empty) private store for this object.

◆ ~MissingETAssociation_v1()

xAOD::MissingETAssociation_v1::~MissingETAssociation_v1 ( )
virtual

Assignment operator.

Definition at line 146 of file MissingETAssociation_v1.cxx.

146{ }

Member Function Documentation

◆ addCalVec()

bool xAOD::MissingETAssociation_v1::addCalVec ( MissingETBase::Types::bitmask_t key,
float calpx,
float calpy,
float calpz,
float cale,
float sumpt )

Add a key/vector pair for calo contributions.

Definition at line 345 of file MissingETAssociation_v1.cxx.

345 {
346 for(MissingETBase::Types::bitmask_t testkey : this->f_calkey()) {
347 // quit if key already exists.
348 if(key==testkey) return false;
349 }
350 this->f_calkey().push_back(key);
351 this->f_calpx().push_back(calpx);
352 this->f_calpy().push_back(calpy);
353 this->f_calpz().push_back(calpz);
354 this->f_cale().push_back(cale);
355 this->f_calsumpt().push_back(sumpt);
356 return true;
357 }
const std::vector< float > & cale() const
Get the vector of .
std::vector< float > & f_calpz()
std::vector< float > & f_cale()
const std::vector< float > & calpy() const
Get the vector of .
std::vector< float > & f_calsumpt()
std::vector< MissingETBase::Types::bitmask_t > & f_calkey()
const std::vector< float > & calpz() const
Get the vector of .
std::vector< float > & f_calpy()
const std::vector< float > & calpx() const
Get the vector of .
std::vector< float > & f_calpx()
uint64_t bitmask_t
Type for status word bit mask.

◆ addObject()

bool xAOD::MissingETAssociation_v1::addObject ( const IParticle * pPart,
const std::vector< const IParticle * > & constlist )

Add object (particle) from pointer reference with individual constituent vectors.

Definition at line 152 of file MissingETAssociation_v1.cxx.

153 {
154 // check if object is in store
155
156 size_t idx(this->findIndex(pPart));
157 // found - add const vectors
159 {
160 m_objConstLinks[idx].clear();
161 m_objConstLinks[idx].reserve(constlist.size());
162 for(const auto& signal : constlist) {
163 const IParticleContainer* pCont = static_cast<const IParticleContainer*>(signal->container());
165 m_objConstLinks[idx].push_back(el);
166 }
167 return false; }
168 // new object
169 else
170 {
172 // add to stores
173 this->f_objectLinks().push_back(oLnk);
174 vector<MissingETBase::Types::objlink_t > linklist;
175 linklist.reserve(constlist.size());
176 for(const auto& signal : constlist) {
177 const IParticleContainer* pCont = static_cast<const IParticleContainer*>(signal->container());
179 linklist.push_back(el);
180 }
181 m_objConstLinks.push_back(linklist);
182 this->f_overlapIndices().emplace_back(0);
183 this->f_overlapTypes().emplace_back(0);
185 return linkset;
186 }
187 }
std::vector< std::vector< ElementLink< IParticleContainer > > > m_objConstLinks
Cache object constituents for overlap-finding.
bool f_setLink(LINK &elemLink)
MissingETBase::Types::objlink_vector_t & f_objectLinks()
Non-const link reference.
std::vector< std::vector< size_t > > & f_overlapIndices()
record overlapIndices between constributing objects
void f_setObject(const POBJ *pObj, LINK &elemLink)
Generalized link manager.
std::vector< std::vector< unsigned char > > & f_overlapTypes()
record overlapTypes between constributing objects
size_t findIndex(const IParticle *pPart) const
Find index of given object in contributing object store.
ElementLink< xAOD::IParticleContainer > objlink_t
Link to contributing object.
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.
static size_t invalidIndex()
Access invalid index indicator.

◆ addOverlap() [1/2]

bool xAOD::MissingETAssociation_v1::addOverlap ( const IParticle * pPart,
size_t index,
unsigned char type )

Add overlap index for a given contributing object referenced by pointer.

◆ addOverlap() [2/2]

bool xAOD::MissingETAssociation_v1::addOverlap ( size_t objIdx,
size_t index,
unsigned char type )

Add overlap index for a given contributing object referenced by index.

Definition at line 589 of file MissingETAssociation_v1.cxx.

590 {
591 if ( objIdx != MissingETBase::Numerical::invalidIndex() && objIdx < this->f_overlapIndices().size() ) {
592 this->f_overlapIndices()[objIdx].push_back(overlapIndex);
593 this->f_overlapTypes()[objIdx].push_back(overlapType);
594 return true;
595 } else { return false; }
596 }
size_t size() const
Update all internally used ElementLink instances.

◆ addOverrideMom()

void xAOD::MissingETAssociation_v1::addOverrideMom ( std::map< const IParticle *, ConstVec > & pOverride)

Extend override momentum map.

◆ addTrkVec()

bool xAOD::MissingETAssociation_v1::addTrkVec ( MissingETBase::Types::bitmask_t key,
float trkpx,
float trkpy,
float trkpz,
float ce,
float sumpt )

Add a key/vector pair for calo contributions.

Definition at line 379 of file MissingETAssociation_v1.cxx.

379 {
380 for(MissingETBase::Types::bitmask_t testkey : this->f_trkkey()) {
381 // quit if key already exists.
382 if(key==testkey) return false;
383 }
384 this->f_trkkey().push_back(key);
385 this->f_trkpx().push_back(trkpx);
386 this->f_trkpy().push_back(trkpy);
387 this->f_trkpz().push_back(trkpz);
388 this->f_trke().push_back(trke);
389 this->f_trksumpt().push_back(sumpt);
390 return true;
391 }
const std::vector< float > & trkpy() const
Get the vector of .
const std::vector< float > & trkpz() const
Get the vector of .
std::vector< float > & f_trkpz()
std::vector< float > & f_trkpx()
const std::vector< float > & trke() const
Get the vector of .
std::vector< float > & f_trkpy()
std::vector< float > & f_trksumpt()
const std::vector< float > & trkpx() const
Get the vector of .
std::vector< MissingETBase::Types::bitmask_t > & f_trkkey()
std::vector< float > & f_trke()

◆ assign()

void SG::AuxElement::assign ( const AuxElement & other,
bool warnUnlocked = false )
inherited

Assignment.

Parameters
otherThe object from which we're assigning.
warnUnlockedIf true, then warn when we skip unlocked decorations.

We don't copy container/index, as assignment doesn't change where this object is. However, if we have aux data, then we copy aux data if we're copying from an object that also has it; otherwise, if we're copying from an object with no aux data, then we clear ours.

◆ auxdata() [1/4]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED 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>>
XAOD_AUXDATA_DEPRECATED 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, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::reference_type SG::AuxElement::auxdata ( const std::string & name,
const std::string & clsname )
inherited

Fetch an aux data variable, 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.

◆ auxdata() [4/4]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type SG::AuxElement::auxdata ( 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 Accessor or ConstAccessor classes.

◆ auxdataConst() [1/2]

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED 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>>
XAOD_AUXDATA_DEPRECATED 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>>
XAOD_AUXDATA_DEPRECATED 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>>
XAOD_AUXDATA_DEPRECATED 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.

◆ cale() [1/2]

const std::vector< float > & xAOD::MissingETAssociation_v1::cale ( ) const

Get the vector of \( E \).

◆ cale() [2/2]

float xAOD::MissingETAssociation_v1::cale ( size_t keyIdx) const

Get the vector \( E \) for a given object referenced by index.

Definition at line 473 of file MissingETAssociation_v1.cxx.

474 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeCal() ? this->cale()[keyIdx] : MissingETBase::Numerical::ceError(); }
static double ceError()
Access error return value for constituent vector .

◆ calkey() [1/2]

const std::vector< MissingETBase::Types::bitmask_t > & xAOD::MissingETAssociation_v1::calkey ( ) const

Get the vector of cal keys.

◆ calkey() [2/2]

MissingETBase::Types::bitmask_t xAOD::MissingETAssociation_v1::calkey ( size_t keyIdx) const

Get the key for a given entry referenced by index.

Definition at line 477 of file MissingETAssociation_v1.cxx.

478 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeCal() ? this->calkey()[keyIdx] : MissingETBase::Numerical::invalidIndex(); }
const std::vector< MissingETBase::Types::bitmask_t > & calkey() const
Get the vector of cal keys.

◆ calpx() [1/3]

const std::vector< float > & xAOD::MissingETAssociation_v1::calpx ( ) const

Get the vector of \( P_{x} \).

◆ calpx() [2/3]

float xAOD::MissingETAssociation_v1::calpx ( const IParticle * pPart) const

Get the vector \( P_{x} \) for a given object referenced by pointer.

◆ calpx() [3/3]

float xAOD::MissingETAssociation_v1::calpx ( size_t keyIdx) const

Get the vector \( P_{x} \) for a given object referenced by index.

Definition at line 467 of file MissingETAssociation_v1.cxx.

468 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeCal() ? this->calpx()[keyIdx] : MissingETBase::Numerical::cpxError(); }
static double cpxError()
Access error return value for constituent vector .

◆ calpy() [1/2]

const std::vector< float > & xAOD::MissingETAssociation_v1::calpy ( ) const

Get the vector of \( P_{y} \).

◆ calpy() [2/2]

float xAOD::MissingETAssociation_v1::calpy ( size_t keyIdx) const

Get the vector \( P_{y} \) for a given object referenced by index.

Definition at line 469 of file MissingETAssociation_v1.cxx.

470 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeCal() ? this->calpy()[keyIdx] : MissingETBase::Numerical::cpyError(); }
static double cpyError()
Access error return value for constituent vector .

◆ calpz() [1/2]

const std::vector< float > & xAOD::MissingETAssociation_v1::calpz ( ) const

Get the vector of \( P_{z} \).

◆ calpz() [2/2]

float xAOD::MissingETAssociation_v1::calpz ( size_t keyIdx) const

Get the vector \( P_{z} \) for a given object referenced by index.

Definition at line 471 of file MissingETAssociation_v1.cxx.

472 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeCal() ? this->calpz()[keyIdx] : MissingETBase::Numerical::cpzError(); }
static double cpzError()
Access error return value for constituent vector .

◆ calsumpt() [1/2]

const std::vector< float > & xAOD::MissingETAssociation_v1::calsumpt ( ) const

Get the vector of sumpt.

◆ calsumpt() [2/2]

float xAOD::MissingETAssociation_v1::calsumpt ( size_t keyIdx) const

Get the sumpt for a given object referenced by index.

Definition at line 475 of file MissingETAssociation_v1.cxx.

476 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeCal() ? this->calsumpt()[keyIdx] : MissingETBase::Numerical::sumptError(); }
const std::vector< float > & calsumpt() const
Get the vector of sumpt.
static double sumptError()
Access error return value for constituent vector sumpt.

◆ calVec() [1/2]

MissingETAssociation_v1::ConstVec xAOD::MissingETAssociation_v1::calVec ( const IParticle * pPart) const

Get calo constituent vector for a given object.

Definition at line 538 of file MissingETAssociation_v1.cxx.

539 {
541 for (size_t iKey = 0; iKey < this->sizeCal(); iKey++) {
542 if (this->calkey(iKey) & getObjMask(this->findIndex(pPart)))
543 totalvec+=this->calVec(iKey);
544 }
545 return totalvec;
546 }
ConstVec calVec(const IParticle *pPart) const
Get calo constituent vector for a given object.
xAOD::MissingETAssociation_v1::ConstVec constvec_t
Type for constituent vector.
MissingETBase::Types::bitmask_t getObjMask(size_t objIndex)

◆ calVec() [2/2]

constvec_t xAOD::MissingETAssociation_v1::calVec ( size_t keyIdx) const

Get calo constituent vector for a given entry (index) in the contributing object list.

Definition at line 558 of file MissingETAssociation_v1.cxx.

559 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeCal()
560 ? constvec_t(this->calpx(keyIdx),this->calpy(keyIdx),this->calpz(keyIdx),this->cale(keyIdx),this->calsumpt(keyIdx))
561 : constvec_t(MissingETBase::Numerical::cpxError(),MissingETBase::Numerical::cpyError(),MissingETBase::Numerical::cpzError(),MissingETBase::Numerical::ceError(),MissingETBase::Numerical::sumptError()); }

◆ checkUsage()

bool xAOD::MissingETAssociation_v1::checkUsage ( const MissingETAssociationHelper & helper,
const IParticle * pSig,
MissingETBase::UsageHandler::Policy p ) const

Check if this signal object matches the constituents of any flagged contributing objects.

Definition at line 816 of file MissingETAssociation_v1.cxx.

817 {
819 const IParticleContainer* pCont = static_cast<const IParticleContainer*>(pSig->container());
820 MissingETBase::Types::objlink_t el(*pCont,pSig->index());
821 for(size_t iObj=0; iObj<this->objectLinks().size(); ++iObj) {
822 if(helper.objSelected(this,iObj)) {
823 for(const auto& link : m_objConstLinks[iObj]) {
824 if(el == link) return true;
825 }
826 }
827 }
828 }
829 return false;
830 }
const MissingETBase::Types::objlink_vector_t & objectLinks() const
Get the vector of links to the contributing physics or signal objects.
static bool testPolicy(const xAOD::IParticle &part, MissingETBase::UsageHandler::Policy p)

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

581{
582 if (!m_container) return;
584}
static void clearAuxHelper(AuxVectorData &container, size_t index)
Clear all aux data associated with an element.
const SG::AuxVectorData * container() const
Return the container holding this element.
size_t index() const
Return the index of this element within its container.
const SG::AuxVectorData * m_container
The container of which this object is an element.
Definition AuxElement.h:335

◆ clearAuxHelper()

void SG::AuxElement::clearAuxHelper ( AuxVectorData & container,
size_t index )
staticprivateinherited

Clear all aux data associated with an element.

Parameters
containerContainer of the element.
indexIndex of this element within the container.

If the associated aux data is const, this throws ExcConstAuxData.

Definition at line 639 of file AuxElement.cxx.

640{
641 if (!container.hasStore()) return;
642 if (!container.hasNonConstStore()) {
643 throw SG::ExcConstAuxData ("clearAux", SG::null_auxid);
644 }
645
646 SG::AuxTypeRegistry& r = SG::AuxTypeRegistry::instance();
647 for (SG::auxid_t auxid : container.getWritableAuxIDs()) {
648 r.clear (auxid, container, index, 1);
649 }
650}
static AuxTypeRegistry & instance()
Return the singleton registry instance.
int r
Definition globals.cxx:22
static const auxid_t null_auxid
To signal no aux data item.
Definition AuxTypes.h:30
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27

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

340{
341 if (container())
343}
void clearCache()
Clear the cached aux data pointers.

◆ clearCalVecs()

bool xAOD::MissingETAssociation_v1::clearCalVecs ( )

Reset the calo constituent vectors and keys.

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

429{
430 if (havePrivateData())
431 return m_container->clearDecorations();
432 return false;
433}
bool havePrivateData() const
True if this element currently has private data.

◆ clearOverlaps()

void xAOD::MissingETAssociation_v1::clearOverlaps ( )

Clear the vectors of overlap indices.

Definition at line 411 of file MissingETAssociation_v1.cxx.

412 {
413 this->f_overlapIndices().clear();
414 this->f_overlapIndices().resize(this->f_overlapIndices().size(),vector<size_t>(0));
415 this->f_overlapTypes().clear();
416 this->f_overlapTypes().resize(this->f_overlapTypes().size(),vector<unsigned char>(0));
417 }

◆ clearTrkVecs()

bool xAOD::MissingETAssociation_v1::clearTrkVecs ( )

Reset the track constituent vectors and keys.

◆ 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.

◆ containsPhysics()

bool xAOD::MissingETAssociation_v1::containsPhysics ( const IParticle * pPhys) const

Check if this physics object matches any contributing objects.

Definition at line 790 of file MissingETAssociation_v1.cxx.

791 {
792 for(const auto& link : this->objectLinks()) {
793 if(link.isValid()) {
794 if(pPhys == *link) {
795 return true;
796 }
797 }
798 }
799 return false;
800 }

◆ containsSignal()

bool xAOD::MissingETAssociation_v1::containsSignal ( const IParticle * pSig) const

Check if this signal object matches the constituents of any contributing objects.

Definition at line 802 of file MissingETAssociation_v1.cxx.

803 {
804 for(size_t iObj=0; iObj<this->objectLinks().size(); ++iObj) {
805 for(const auto& link : m_objConstLinks[iObj]) {
806 if(link.isValid()) {
807 if(pSig == *link) {
808 return true;
809 }
810 }
811 }
812 }
813 return false;
814 }

◆ copyAux()

void SG::AuxElement::copyAux ( const ConstAuxElement & other,
bool warnUnlocked = false )
privateinherited

Copy aux data from another object.

Parameters
otherThe object from which to copy.
warnUnlockedIf true, then warn when we skip unlocked decorations.

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

602{
603 if (!m_container) return;
604 copyAuxHelper (*container(), index(), other, warnUnlocked);
605}
static void copyAuxHelper(AuxVectorData &container, size_t index, const ConstAuxElement &other, bool warnUnlocked)
Copy aux data from another object.

◆ copyAuxHelper()

void SG::AuxElement::copyAuxHelper ( AuxVectorData & container,
size_t index,
const ConstAuxElement & other,
bool warnUnlocked )
staticprivateinherited

Copy aux data from another object.

Parameters
containerContainer of the element.
indexIndex of this element within the container.
otherThe object from which to copy.
warnUnlockedIf true, then warn when we skip unlocked decorations.

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

671{
672 if (!container.hasStore()) return;
673 if (!container.hasNonConstStore())
674 throw SG::ExcConstAuxData ("copyAux");
675
676 const SG::AuxVectorData* ocont = other.container();
677
678 if (!ocont || !ocont->hasStore()) {
680 return;
681 }
682
683#ifndef XAOD_STANDALONE
684 const SG::auxid_set_t& other_decors = ocont->getDecorIDs();
685#endif
686 SG::auxid_set_t other_ids = ocont->getAuxIDs();
687
688 size_t oindex = other.index();
689 SG::AuxTypeRegistry& r = SG::AuxTypeRegistry::instance();
690
691 for (SG::auxid_t auxid : other_ids) {
692#ifndef XAOD_STANDALONE
693 if (other_decors.test (auxid)) {
694 // Don't copy decorations --- another thread may be modifying them.
695 other_ids.reset (auxid);
696 // Warn if we skip a decoration (except for mcEventWeights,
697 // for which this is expected).
698 if (warnUnlocked && r.getName(auxid) != "mcEventWeights") {
699 std::ostringstream ss;
700 ss << "skipped unlocked decoration " << r.getName(auxid)
701 << " (" << auxid << ")";
702 ATHCONTAINERS_WARNING("copyAux", ss.str());
703 }
704 }
705 else
706#endif
707 if (!r.isLinked (auxid)) {
708 r.copy (auxid, container, index, *ocont, oindex, 1);
709 }
710 }
711
712 for (SG::auxid_t auxid : container.getWritableAuxIDs()) {
713 if (!other_ids.test (auxid)) {
714 r.clear (auxid, container, index, 1);
715 }
716 }
717}
static Double_t ss
bool test(bit_t bit) const
Test to see if a bit is set.
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items in store associated with this object.
const SG::auxid_set_t & getDecorIDs() const
Return a set of identifiers for decorations for this object.
bool hasStore() const
Return true if this object has an associated store.
#define ATHCONTAINERS_WARNING(ctx, msg)
Definition error.h:57

◆ copyData()

void xAOD::MissingETAssociation_v1::copyData ( const MissingETAssociation_v1 & assocDescr)
protected

◆ createPrivateStore()

void xAOD::MissingETAssociation_v1::createPrivateStore ( )
protected

Function initialising the object to work in standalone mode.

Definition at line 836 of file MissingETAssociation_v1.cxx.

837 {
838
840 f_jetLink() = jetlink_t();
841 f_objectLinks().clear();
842 f_overlapIndices().clear();
843 f_overlapTypes().clear();
844 f_isMisc() = false;
845 f_calpx().clear();
846 f_calpy().clear();
847 f_calpz().clear();
848 f_cale().clear();
849 f_calsumpt().clear();
850 f_calkey().clear();
851 f_trkpx().clear();
852 f_trkpy().clear();
853 f_trkpz().clear();
854 f_trke().clear();
855 f_trksumpt().clear();
856 f_trkkey().clear();
857 f_jettrkpx() = 0;
858 f_jettrkpy() = 0;
859 f_jettrkpz() = 0;
860 f_jettrke() = 0;
861 f_jettrksumpt() = 0;
862
863 return;
864 }
MissingETBase::Types::jetlink_t & f_jetLink()
Non-const link reference.
ElementLink< xAOD::JetContainer > jetlink_t
Link to Jet object.

◆ empty()

bool xAOD::MissingETAssociation_v1::empty ( ) const

Empty list of contributing objects indicator.

◆ f_cale()

std::vector< float > & xAOD::MissingETAssociation_v1::f_cale ( )
protected

◆ f_calkey()

std::vector< MissingETBase::Types::bitmask_t > & xAOD::MissingETAssociation_v1::f_calkey ( )
protected

◆ f_calpx()

std::vector< float > & xAOD::MissingETAssociation_v1::f_calpx ( )
protected

◆ f_calpy()

std::vector< float > & xAOD::MissingETAssociation_v1::f_calpy ( )
protected

◆ f_calpz()

std::vector< float > & xAOD::MissingETAssociation_v1::f_calpz ( )
protected

◆ f_calsumpt()

std::vector< float > & xAOD::MissingETAssociation_v1::f_calsumpt ( )
protected

◆ f_isMisc()

char & xAOD::MissingETAssociation_v1::f_isMisc ( )
protected

◆ f_jetLink()

MissingETBase::Types::jetlink_t & xAOD::MissingETAssociation_v1::f_jetLink ( )
protected

Non-const link reference.

◆ f_jettrke()

float & xAOD::MissingETAssociation_v1::f_jettrke ( )
protected

◆ f_jettrkpx()

float & xAOD::MissingETAssociation_v1::f_jettrkpx ( )
protected

◆ f_jettrkpy()

float & xAOD::MissingETAssociation_v1::f_jettrkpy ( )
protected

◆ f_jettrkpz()

float & xAOD::MissingETAssociation_v1::f_jettrkpz ( )
protected

◆ f_jettrksumpt()

float & xAOD::MissingETAssociation_v1::f_jettrksumpt ( )
protected

◆ f_objectLinks()

MissingETBase::Types::objlink_vector_t & xAOD::MissingETAssociation_v1::f_objectLinks ( )
protected

Non-const link reference.

◆ f_overlapIndices()

std::vector< std::vector< size_t > > & xAOD::MissingETAssociation_v1::f_overlapIndices ( )
protected

record overlapIndices between constributing objects

◆ f_overlapTypes()

std::vector< std::vector< unsigned char > > & xAOD::MissingETAssociation_v1::f_overlapTypes ( )
protected

record overlapTypes between constributing objects

◆ f_removeContrib()

bool xAOD::MissingETAssociation_v1::f_removeContrib ( size_t objIdx)
protected

Copy the contribution data from a source.

  • Parameters
    [in]contribreference to non-modifiable contribution object (the source).

Definition at line 218 of file MissingETAssociation_v1.cxx.

219 {
220 objlink_vector_t::iterator fCon(this->f_objectLinks().begin()); std::advance<objlink_vector_t::iterator>(fCon,objIdx);
221 this->f_objectLinks().erase(fCon);
222 vector<vector<size_t> >::iterator fOverlapIndices(this->f_overlapIndices().begin()); std::advance<vector<vector<size_t> >::iterator>(fOverlapIndices,objIdx);
223 this->f_overlapIndices().erase(fOverlapIndices);
224 vector<vector<unsigned char> >::iterator fOverlapTypes(this->f_overlapTypes().begin()); std::advance<vector<vector<unsigned char> >::iterator>(fOverlapTypes,objIdx);
225 this->f_overlapTypes().erase(fOverlapTypes);
226 this->f_calpx().clear();
227 this->f_calpy().clear();
228 this->f_calpz().clear();
229 this->f_cale().clear();
230 this->f_calsumpt().clear();
231 this->f_calkey().clear();
232 this->f_trkpx().clear();
233 this->f_trkpy().clear();
234 this->f_trkpz().clear();
235 this->f_trke().clear();
236 this->f_trksumpt().clear();
237 this->f_trkkey().clear();
238 return true;
239 }
JetConstituentVector::iterator iterator

◆ f_setLink()

template<class LINK>
bool xAOD::MissingETAssociation_v1::f_setLink ( LINK & elemLink)
protected

◆ f_setObject()

template<class POBJ, class LINK>
void xAOD::MissingETAssociation_v1::f_setObject ( const POBJ * pObj,
LINK & elemLink )
protected

Generalized link manager.

Inserts link data into ElementLink, even if incomplete. At least, the pointer of linked object will be set (except if NULL).

Template Parameters
POBJlinked object type
LINKspecific ElementLink type
Parameters
[in]pObjpointer to non-modifiable object to be linked
[in]elemLinkreference to modifiable ElementLink object. Initial data content of this object are overwritten.
Note
This is the generalized implementation for e.g. MissingETAssociation_v1::setMET and MissingETAssociation_v1::addObject

◆ f_trke()

std::vector< float > & xAOD::MissingETAssociation_v1::f_trke ( )
protected

◆ f_trkkey()

std::vector< MissingETBase::Types::bitmask_t > & xAOD::MissingETAssociation_v1::f_trkkey ( )
protected

◆ f_trkpx()

std::vector< float > & xAOD::MissingETAssociation_v1::f_trkpx ( )
protected

◆ f_trkpy()

std::vector< float > & xAOD::MissingETAssociation_v1::f_trkpy ( )
protected

◆ f_trkpz()

std::vector< float > & xAOD::MissingETAssociation_v1::f_trkpz ( )
protected

◆ f_trksumpt()

std::vector< float > & xAOD::MissingETAssociation_v1::f_trksumpt ( )
protected

◆ findCalIndex()

size_t xAOD::MissingETAssociation_v1::findCalIndex ( MissingETBase::Types::bitmask_t mask) const

Definition at line 281 of file MissingETAssociation_v1.cxx.

282 {
283 for (size_t ind = 0; ind < this->sizeCal(); ind++) if (mask==this->calkey()[ind]) return ind;
285 }

◆ findIndex()

size_t xAOD::MissingETAssociation_v1::findIndex ( const IParticle * pPart) const

Find index of given object in contributing object store.

The returned index is valid for the contributing object store and the parameter stores (index-parallel stores).

Returns
A valid index \( i \in \{ 0 \ldots N_{\rm objects} - 1 \} \), where \( N_{\rm objects} \) is the total number of contributing objects to the MET contribution. If the given object is not in the store with the requested status, MissingETBase::Numerical::invalidIndex() is returned.

This method makes use of a cache. If the pointer to the checked object is the same as the last one successfully searched for, the index is returned from a cached data word. If the pointer is not the same, xAOD::MissingETAssociation::findIndex(const IParticle*) is invoked. If this method finds the referenced object, the cache is updated and the valid index is returned. In case the object is not found, MissingETBase::Nummerical::invalidIndex() is returned.

Returns
Valid object index \( i = 0 \ldots N_{\rm objects} - 1 \) if object found in list, else MissingETBase::Numerical::invalidIndex().
Parameters
[in]pPartpointer to non-modifiable object
[in]pPartpointer to non-modifiable object in the list of contributing objects

Definition at line 266 of file MissingETAssociation_v1.cxx.

267 {
268 objlink_vector_t::const_iterator fLnk(this->objectLinks().begin());
269 // FIXME: This is based on dereferencing the ElementLink, which is risky.
270 while ( fLnk != this->objectLinks().end() ) {
271 if((*fLnk).isValid()) {
272 if(*(*fLnk) == pPart) break;
273 }
274 ++fLnk;
275 }
276 if ( fLnk != this->objectLinks().end() )
277 return std::distance(this->objectLinks().begin(),fLnk);
279 }

◆ findTrkIndex()

size_t xAOD::MissingETAssociation_v1::findTrkIndex ( MissingETBase::Types::bitmask_t mask) const

Definition at line 287 of file MissingETAssociation_v1.cxx.

288 {
289 for (size_t ind = 0; ind < this->sizeTrk(); ind++) if (mask==this->trkkey()[ind]) return ind;
291 }
const std::vector< MissingETBase::Types::bitmask_t > & trkkey() const
Get the vector of trk keys.

◆ getAlternateConstVec()

xAOD::JetFourMom_t xAOD::MissingETAssociation_v1::getAlternateConstVec ( ) const

Definition at line 757 of file MissingETAssociation_v1.cxx.

758 {
759 xAOD::JetFourMom_t newvec;
760 constvec_t newpt;
761 size_t newptIndex = this->findIndex(this->refJet());
762 if (newptIndex == MissingETBase::Numerical::invalidIndex()) return newvec;
764
765 for (size_t iKey = 0; iKey < this->sizeCal(); iKey++) if (mask & this->calkey()[iKey]) newpt += this->calVec(iKey);
766 newvec.SetPxPyPzE(newpt.cpx(),newpt.cpy(),newpt.cpz(),newpt.ce());
767 return newvec;
768 }
const Jet * refJet() const
Access reference jet.
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition JetTypes.h:17

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

356{
357#ifdef ATHCONTAINERS_R21_COMPAT
358 if (havePrivateData())
359 return m_container->getConstStore()->getAuxIDs();
360 if (container())
361 return container()->getAuxIDs();
362 static const SG::auxid_set_t null_set;
363 return null_set;
364#else
366#endif
367}
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items for this object.

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

305{
306 if (havePrivateData()) {
307 return m_container->getConstStore();
308 }
309 return 0;
310}

◆ getDecorIDs()

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

Return a set of identifiers for decorations 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 378 of file AuxElement.cxx.

379{
380#ifdef ATHCONTAINERS_R21_COMPAT
381 if (havePrivateData())
382 return m_container->getConstStore()->getDecorIDs();
383 if (container())
384 return container()->getDecorIDs();
385 static const SG::auxid_set_t null_set;
386 return null_set;
387#else
389#endif
390}
const SG::auxid_set_t & getDecorIDs() const
Return a set of identifiers for decorations for this object.

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

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

◆ hadPrivateData()

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

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

◆ hasAlternateConstVec()

bool xAOD::MissingETAssociation_v1::hasAlternateConstVec ( ) const

Definition at line 752 of file MissingETAssociation_v1.cxx.

753 {
754 return (!this->isMisc() && this->containsPhysics(this->refJet()));
755 }
bool containsPhysics(const IParticle *pPhys) const
Check if this physics object matches any contributing objects.

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

412{
413 if (havePrivateData())
414 return m_container->hasNonConstStore();
415 return false;
416}

◆ hasOverlaps() [1/2]

bool xAOD::MissingETAssociation_v1::hasOverlaps ( const MissingETAssociationHelper & helper,
const IParticle * pPart,
MissingETBase::UsageHandler::Policy p = MissingETBase::UsageHandler::OnlyCluster ) const

Check if any selected particles overlap this one.

◆ hasOverlaps() [2/2]

bool xAOD::MissingETAssociation_v1::hasOverlaps ( const MissingETAssociationHelper & helper,
size_t objIdx,
MissingETBase::UsageHandler::Policy p = MissingETBase::UsageHandler::OnlyCluster ) const

Check if any selected particles overlap this one.

Definition at line 717 of file MissingETAssociation_v1.cxx.

718 {
719 if ( objIdx == MissingETBase::Numerical::invalidIndex() ) return false;
720 vector<size_t> indices = this->overlapIndices(objIdx);
721 vector<unsigned char> types = this->overlapTypes(objIdx);
722 for(size_t iOL=0; iOL<indices.size(); ++iOL) {
723 if(helper.objSelected(this, indices[iOL])) {
724 // printf("Test object %lu for overlaps: OL type %i\n",indices[iOL],(int)types[iOL]);
725 switch(p) {
727 if((types[iOL] & 1<<xAOD::Type::CaloCluster) || (types[iOL] & 1<<xAOD::Type::TrackParticle)) {break;}
728 else {continue;}
730 if(types[iOL] & 1<<xAOD::Type::CaloCluster) {break;}
731 else {continue;}
733 if(types[iOL] & 1<<xAOD::Type::TrackParticle) {break;}
734 else {continue;}
736 if(types[iOL] & 1<<xAOD::Type::ParticleFlow) {break;}
737 else {continue;}
739 if(types[iOL] & 1) {break;}
740 else {continue;}
742 if(types[iOL] & ~(1<<xAOD::Type::TrackParticle)) {break;}
743 else {continue;}
744 default: continue;
745 }
746 return true;
747 }
748 }
749 return false;
750 }
static const std::vector< std::string > types
const std::vector< std::vector< unsigned char > > & overlapTypes() const
Get the list of object overlapTypes.
const std::vector< std::vector< size_t > > & overlapIndices() const
Get the list of object overlapIndices.
@ AllCalo
Inclusive except tracks.
@ OnlyCluster
CaloCluster based only.
@ ParticleFlow
Particle Flow Object based.
@ TrackCluster
Both cluster and track based.
std::pair< long int, long int > indices
@ TrackParticle
The object is a charged track particle.
Definition ObjectType.h:43
@ ParticleFlow
The object is a particle-flow object.
Definition ObjectType.h:41
@ CaloCluster
The object is a calorimeter cluster.
Definition ObjectType.h:39

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

399{
400 if (havePrivateData())
401 return m_container->hasStore();
402 return false;
403}

◆ havePrivateData()

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

True if this element currently has private data.

◆ identifyOverlaps() [1/3]

bool xAOD::MissingETAssociation_v1::identifyOverlaps ( )

Loop over contributing objects to identify those that share constituents.

Definition at line 598 of file MissingETAssociation_v1.cxx.

599 {
601 this->resetContrib();
602 std::map<MissingETBase::Types::bitmask_t,MissingETBase::Types::constvec_t> trkOverlaps;
603 std::map<MissingETBase::Types::bitmask_t,MissingETBase::Types::constvec_t> calOverlaps;
604 std::map<ElementLink<IParticleContainer>,bitmask_t> objects;
605 for(size_t iObj=0; iObj<this->objectLinks().size(); ++iObj) {
606 const vector<ElementLink<IParticleContainer> >& myConst = m_objConstLinks[iObj];
607 for (size_t iConst=0; iConst<myConst.size(); ++iConst) {
608 objects[myConst[iConst]] |= static_cast<bitmask_t>(1) << iObj;
609 }
610 }
611 for (const auto& objpair : objects) {
612 const IParticle* obj = *objpair.first;
613 MissingETBase::Types::bitmask_t bm = objpair.second;
614 if (obj->type()==xAOD::Type::TrackParticle) trkOverlaps[bm] += MissingETBase::Types::constvec_t(*obj);
615 else if (obj->type()==xAOD::Type::FlowElement) {
616 const xAOD::FlowElement* fe = static_cast<const xAOD::FlowElement*>(obj);
617 // Assume this FlowElement represents a PFO
618 if(fe->isCharged()) {
619 // apply cPFO weight if present, only for the inclusive PFO sum
620 if (m_override.find(obj)!=m_override.end()) {
621 calOverlaps[bm] += m_override[obj];
622 } else {
623 calOverlaps[bm] += MissingETBase::Types::constvec_t(*obj);
624 }
625 trkOverlaps[bm] += MissingETBase::Types::constvec_t(*obj);
626 } else {
627 if (m_override.find(obj)!=m_override.end()) {
628 calOverlaps[bm] += m_override[obj];
629 } else {
630 calOverlaps[bm] += MissingETBase::Types::constvec_t(*obj);
631 } // gets ignored otherwise?
632 }
633 }
634 else if (obj->type()==xAOD::Type::ParticleFlow) {
635 const PFO* pfo = static_cast<const PFO*>(obj);
636 if(pfo->isCharged()) {
637 // apply cPFO weight if present, only for the inclusive PFO sum
638 if (m_override.find(obj)!=m_override.end()) {
639 calOverlaps[bm] += m_override[obj];
640 } else {
641 calOverlaps[bm] += MissingETBase::Types::constvec_t(*obj);
642 }
643 trkOverlaps[bm] += MissingETBase::Types::constvec_t(*obj);
644 } else {
645 if (m_override.find(obj)!=m_override.end()) {
646 calOverlaps[bm] += m_override[obj];
647 } else {
648 calOverlaps[bm] += MissingETBase::Types::constvec_t(*obj);
649 } // gets ignored otherwise?
650 }
651 } else if(obj->type()==xAOD::Type::TruthParticle) {
652 const TruthParticle* tp = static_cast<const TruthParticle*>(obj);
653 if(fabs(tp->charge())>0.)
654 trkOverlaps[bm] += MissingETBase::Types::constvec_t(*obj);
655 if(!tp->isMuon())
656 calOverlaps[bm] += MissingETBase::Types::constvec_t(*obj);
657 }
658 else calOverlaps[bm] += MissingETBase::Types::constvec_t(*obj);
659 }
660 for (const auto& calpair : calOverlaps) {
661 MissingETBase::Types::bitmask_t bm = calpair.first;
662 MissingETBase::Types::constvec_t cv = calpair.second;
663 this->addCalVec(bm,cv.cpx(),cv.cpy(),cv.cpz(),cv.ce(),cv.sumpt());
664 }
665 for (const auto& trkpair : trkOverlaps) {
666 MissingETBase::Types::bitmask_t bm = trkpair.first;
667 MissingETBase::Types::constvec_t cv = trkpair.second;
668 this->addTrkVec(bm,cv.cpx(),cv.cpy(),cv.cpz(),cv.ce(),cv.sumpt());
669 }
670
671 bool foundOverlaps(false);
672 for(size_t iObj=0; iObj<this->objectLinks().size(); ++iObj) {
673 foundOverlaps |= identifyOverlaps(iObj);
674 }
675 return foundOverlaps;
676 }
float sumpt() const
Returns sum of component pt.
std::vector< const IParticle * > objects() const
Access contributing objects.
bool addTrkVec(MissingETBase::Types::bitmask_t key, float trkpx, float trkpy, float trkpz, float ce, float sumpt)
Add a key/vector pair for calo contributions.
std::map< const IParticle *, ConstVec > m_override
bool identifyOverlaps()
Loop over contributing objects to identify those that share constituents.
bool resetContrib()
Reset all contribution parameters.
bool addCalVec(MissingETBase::Types::bitmask_t key, float calpx, float calpy, float calpz, float cale, float sumpt)
Add a key/vector pair for calo contributions.
@ FlowElement
The object is a track-calo-cluster.
Definition ObjectType.h:52
@ TruthParticle
The object is a truth particle.
Definition ObjectType.h:67
PFO_v1 PFO
Definition of the current "pfo version".
Definition PFO.h:17
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition FlowElement.h:16
TruthParticle_v1 TruthParticle
Typedef to implementation.

◆ identifyOverlaps() [2/3]

bool xAOD::MissingETAssociation_v1::identifyOverlaps ( const IParticle * pPart)

Search association for particles that share constituents with this one.

◆ identifyOverlaps() [3/3]

bool xAOD::MissingETAssociation_v1::identifyOverlaps ( size_t objIdx)

Search association for particles that share constituents with this one.

Definition at line 678 of file MissingETAssociation_v1.cxx.

679 {
680 if ( objIdx == MissingETBase::Numerical::invalidIndex() ) return false;
681 // extract constituent list
682 const vector<MissingETBase::Types::objlink_t >& myConst = m_objConstLinks[objIdx];
683 // loop over subsequent objects in this association
684 // (assume earlier ones have been tested)
685 vector<size_t>& myOverlaps = f_overlapIndices()[objIdx];
686 for(size_t iTargetObj=objIdx+1; iTargetObj<this->objectLinks().size(); ++iTargetObj) {
687 const vector<MissingETBase::Types::objlink_t >& checkConst = m_objConstLinks[iTargetObj];
688 bool overlapFound(false);
689 unsigned char overlapTypes(0);
690 // if we somehow already recorded an overlap for this one, skip
691 for(vector<size_t>::const_iterator iOverlap=myOverlaps.begin();
692 iOverlap!=myOverlaps.end() && !overlapFound; ++iOverlap) {
693 overlapFound = (*iOverlap) == iTargetObj;
694 }
695 if(overlapFound) continue;
696 // otherwise, compare constituents to check if any match
697 for(const auto& mine : myConst) {
698 for(const auto& target : checkConst) {
699 overlapFound |= ( mine == target );
700 if(mine == target) {
701 if((*mine)->type()==xAOD::Type::TruthParticle) overlapTypes |= 1;
702 else if((*mine)->type()==xAOD::Type::Other) overlapTypes |= 1 << xAOD::Type::NeutralParticle;
703 else if((*mine)->type()==xAOD::Type::FlowElement) overlapTypes |= 1 << FEHelpers::signalToXAODType(static_cast<const xAOD::FlowElement&>(**mine));
704 else overlapTypes |= 1 << (*mine)->type();
705 }
706 }
707 }
708 // record the overlap
709 if(overlapFound) {
710 this->addOverlap(objIdx,iTargetObj,overlapTypes);
711 this->addOverlap(iTargetObj,objIdx,overlapTypes);
712 }
713 }
714 return !overlapIndices(objIdx).empty();
715 }
bool addOverlap(const IParticle *pPart, size_t index, unsigned char type)
Add overlap index for a given contributing object referenced by pointer.
xAOD::Type::ObjectType signalToXAODType(const xAOD::FlowElement &fe)
@ Other
An object not falling into any of the other categories.
Definition ObjectType.h:34
@ NeutralParticle
The object is a neutral particle.
Definition ObjectType.h:44

◆ index()

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

Return the index of this element within its container.

Inherited from IAuxElement.

◆ initCache()

void xAOD::MissingETAssociation_v1::initCache ( )
protected

initialise cache for overlap removal decisions

Definition at line 866 of file MissingETAssociation_v1.cxx.

867 {
868
869 m_objConstLinks.clear();
870 m_objConstLinks.reserve(50);
871 }

◆ isAvailable()

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

Check if an aux variable is available for reading.

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()

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED 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.

◆ isAvailableWritableAsDecoration()

template<class T, class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED 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.

◆ isMisc()

bool xAOD::MissingETAssociation_v1::isMisc ( ) const

Check if this association is a miscellaneous association.

◆ jetLink()

const MissingETBase::Types::jetlink_t & xAOD::MissingETAssociation_v1::jetLink ( ) const

Get the link to the reference jet.

◆ jettrke()

float xAOD::MissingETAssociation_v1::jettrke ( ) const

Get the vector \( E \) for a given object referenced by index.

◆ jettrkpx()

float xAOD::MissingETAssociation_v1::jettrkpx ( ) const

Get the vector \( P_{x} \) for a given object referenced by index.

◆ jettrkpy()

float xAOD::MissingETAssociation_v1::jettrkpy ( ) const

Get the vector \( P_{y} \) for a given object referenced by pointer.

◆ jettrkpz()

float xAOD::MissingETAssociation_v1::jettrkpz ( ) const

Get the vector \( P_{z} \) for a given object referenced by pointer.

◆ jettrksumpt()

float xAOD::MissingETAssociation_v1::jettrksumpt ( ) const

Get the sumpt for a given object referenced by index.

◆ jetTrkVec()

constvec_t xAOD::MissingETAssociation_v1::jetTrkVec ( ) const

Get track constituent vector for the reference jet.

Definition at line 568 of file MissingETAssociation_v1.cxx.

569 { return constvec_t(this->jettrkpx(),this->jettrkpy(),this->jettrkpz(),this->jettrke(),this->jettrksumpt()); }
float jettrkpx() const
Get the vector for a given object referenced by index.
float jettrkpy() const
Get the vector for a given object referenced by pointer.
float jettrkpz() const
Get the vector for a given object referenced by pointer.
float jettrksumpt() const
Get the sumpt for a given object referenced by index.
float jettrke() const
Get the vector for a given object referenced by index.

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

193{
194 if (m_container) {
195 throw SG::ExcBadPrivateStore ("store already exists");
196 }
197
198 m_container = new SG::AuxElementPrivateData;
201}
void setIndex(size_t index)
Set the index of this element within its container.
void setHavePrivateData()
Record that this element currently has private data.

◆ makePrivateStore() [2/3]

template<class U1>
void SG::AuxElement::makePrivateStore ( const U1 & other,
bool warnUnlocked = false )
inherited

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

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

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,
bool warnUnlocked = false )
inherited

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

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

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,
bool warnUnlocked )
privateinherited

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

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

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

567{
569 if (other)
570 this->copyAux (*other, warnUnlocked);
571}
void copyAux(const ConstAuxElement &other, bool warnUnlocked=false)
Copy aux data from another object.

◆ makePrivateStore1() [2/2]

void SG::AuxElement::makePrivateStore1 ( const void * other,
bool warnUnlocked )
privateinherited

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

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

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.

◆ noPrivateData()

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

True if this element has no private data.

◆ objectLinks()

const MissingETBase::Types::objlink_vector_t & xAOD::MissingETAssociation_v1::objectLinks ( ) const

Get the vector of links to the contributing physics or signal objects.

◆ objects() [1/3]

std::vector< const IParticle * > xAOD::MissingETAssociation_v1::objects ( ) const

Access contributing objects.

Definition at line 503 of file MissingETAssociation_v1.cxx.

504 {
505 vector<const IParticle*> pVec;
506 for ( objlink_vector_t::const_iterator fLnk(this->objectLinks().begin()); fLnk != this->objectLinks().end(); ++fLnk) {pVec.push_back((*fLnk).isValid()?*(*fLnk):nullptr); }
507 return pVec;
508 }

◆ objects() [2/3]

std::vector< const IParticle * > xAOD::MissingETAssociation_v1::objects ( const std::vector< float > *& calpxPtr,
const std::vector< float > *& calpyPtr,
const std::vector< float > *& calpzPtr,
const std::vector< float > *& calePtr,
const std::vector< float > *& calsumptPtr,
const std::vector< float > *& trkpxPtr,
const std::vector< float > *& trkpyPtr,
const std::vector< float > *& trkpzPtr,
const std::vector< float > *& trkePtr,
const std::vector< float > *& trksumptPtr ) const

Access contributing objects and retrieve constituent vectors.

Definition at line 522 of file MissingETAssociation_v1.cxx.

528 {
529 calpxPtr = &(this->calpx()); calpyPtr = &(this->calpy()); calpzPtr = &(this->calpz()); calePtr = &(this->cale()); calsumptPtr = &(this->calsumpt());
530 trkpxPtr = &(this->trkpx()); trkpyPtr = &(this->trkpy()); trkpzPtr = &(this->trkpz()); trkePtr = &(this->trke()); trksumptPtr = &(this->trksumpt());
531 return this->objects();
532 }
const std::vector< float > & trksumpt() const
Get the vector of .

◆ objects() [3/3]

std::vector< const IParticle * > xAOD::MissingETAssociation_v1::objects ( std::vector< ConstVec > & calVecs,
std::vector< ConstVec > & trkVecs ) const

Access contributing objects and retrieve constituent vectors.

Definition at line 510 of file MissingETAssociation_v1.cxx.

511 {
512 size_t nEnt(this->objectLinks().size());
513 vector<const IParticle*> pVec(nEnt,(const IParticle*)nullptr);
514 calVecs.clear(); calVecs.resize(this->sizeCal(),constvec_t());
515 trkVecs.clear(); trkVecs.resize(this->sizeTrk(),constvec_t());
516 for ( size_t idx(0); idx < nEnt; ++idx ) pVec[idx] = *(this->objectLinks().at(idx));
517 for ( size_t idx(0); idx < this->sizeCal(); idx++) calVecs[idx] = constvec_t(this->calpx(idx),this->calpy(idx),this->calpz(idx),this->cale(idx),this->calsumpt(idx));
518 for ( size_t idx(0); idx < this->sizeTrk(); idx++) trkVecs[idx] = constvec_t(this->trkpx(idx),this->trkpy(idx),this->trkpz(idx),this->trke(idx),this->trksumpt(idx));
519 return pVec;
520 }

◆ operator!=()

bool xAOD::MissingETAssociation_v1::operator!= ( const MissingETAssociation_v1 & contrib) const

Equality.

◆ operator=()

MissingETAssociation_v1 & xAOD::MissingETAssociation_v1::operator= ( const MissingETAssociation_v1 & assocDescr)

Definition at line 119 of file MissingETAssociation_v1.cxx.

120 {
121 if((&assocDescr) != this) {
122 f_isMisc() = assocDescr.isMisc();
123 this->setJetLink(assocDescr.jetLink());
124 this->setObjectLinks(assocDescr.objectLinks());
125 this->setOverlaps(assocDescr.overlapIndices(),assocDescr.overlapTypes());
126 this->setCalPx(assocDescr.calpx());
127 this->setCalPy(assocDescr.calpy());
128 this->setCalPz(assocDescr.calpz());
129 this->setCalE(assocDescr.cale());
130 this->setCalSumpt(assocDescr.calsumpt());
131 this->setCalKey(assocDescr.calkey());
132 this->setTrkPx(assocDescr.trkpx());
133 this->setTrkPy(assocDescr.trkpy());
134 this->setTrkPz(assocDescr.trkpz());
135 this->setTrkE(assocDescr.trke());
136 this->setTrkSumpt(assocDescr.trksumpt());
137 this->setTrkKey(assocDescr.trkkey());
138 this->setJetTrkPx(assocDescr.jettrkpx());
139 this->setJetTrkPy(assocDescr.jettrkpy());
140 this->setJetTrkPz(assocDescr.jettrkpz());
141 this->setJetTrkE(assocDescr.jettrke());
142 }
143 return *this;
144 }
bool setCalSumpt(const std::vector< float > &calsumptvec)
Set the vector of sumpt.
bool setOverlaps(const std::vector< std::vector< size_t > > &overlapIndices, const std::vector< std::vector< unsigned char > > &overlapTypes)
Set the vector of overlap indices and types.
void setJetTrkPy(float py)
Set track constituent vector for the reference jet.
bool setTrkPy(const std::vector< float > &trkpyvec)
Set the vector of .
void setJetTrkE(float e)
Set track constituent vector for the reference jet.
bool setCalE(const std::vector< float > &calevec)
Set the vector of .
void setJetTrkPx(float px)
Set track constituent vector for the reference jet.
bool setTrkPx(const std::vector< float > &trkpxvec)
Set the vector of .
bool setJetLink(const MissingETBase::Types::jetlink_t &jetLnk)
Set the link to the reference jet.
bool setObjectLinks(const MissingETBase::Types::objlink_vector_t &objLnks)
Set the vector of links to the contributing physics or signal objects.
void setJetTrkPz(float pz)
Set track constituent vector for the reference jet.
bool setCalPx(const std::vector< float > &calpxvec)
Set the vector of .
bool setTrkE(const std::vector< float > &trkevec)
Set the vector of .
bool setTrkPz(const std::vector< float > &trkpzvec)
Set the vector of .
bool setCalPz(const std::vector< float > &calpzvec)
Set the vector of .
bool setCalKey(const std::vector< MissingETBase::Types::bitmask_t > &calkeyvec)
Set the vector of keys.
bool setTrkKey(const std::vector< MissingETBase::Types::bitmask_t > &trkkeyvec)
Set the vector of keys.
bool setCalPy(const std::vector< float > &calpyvec)
Set the vector of .
bool setTrkSumpt(const std::vector< float > &trksumptvec)
Set the vector of .

◆ operator==()

bool xAOD::MissingETAssociation_v1::operator== ( const MissingETAssociation_v1 & contrib) const

Definition at line 575 of file MissingETAssociation_v1.cxx.

576 {
577 // FIXME compare only jet link and number of contributing particles
578 return
579 this->jetLink() == assocDescr.jetLink() &&
580 this->size() == assocDescr.size();
581 }
const MissingETBase::Types::jetlink_t & jetLink() const
Get the link to the reference jet.

◆ overlapCalVec()

constvec_t xAOD::MissingETAssociation_v1::overlapCalVec ( const MissingETAssociationHelper & helper) const

Retrieve total cluster-based vector to be subtracted from the jet.

Definition at line 770 of file MissingETAssociation_v1.cxx.

771 {
772 constvec_t calvec;
773 for (size_t iKey = 0; iKey < this->sizeCal(); iKey++) {
774 bool selector = (helper.getObjSelectionFlags(this) & this->calkey()[iKey]) ? !this->isMisc() : this->isMisc();
775 if (selector) calvec+=this->calVec(iKey);
776 }
777 return calvec;
778 }

◆ overlapIndices() [1/3]

const std::vector< std::vector< size_t > > & xAOD::MissingETAssociation_v1::overlapIndices ( ) const

Get the list of object overlapIndices.

◆ overlapIndices() [2/3]

std::vector< size_t > xAOD::MissingETAssociation_v1::overlapIndices ( const IParticle * pPart) const

Get the overlap indices for a given object referenced by pointer.

◆ overlapIndices() [3/3]

std::vector< size_t > xAOD::MissingETAssociation_v1::overlapIndices ( size_t objIdx) const

Get the overlap indices for a given object referenced by index.

Definition at line 493 of file MissingETAssociation_v1.cxx.

494 {
495 return (objIdx != MissingETBase::Numerical::invalidIndex() && objIdx < this->size()) ? this->overlapIndices()[objIdx] : vector<size_t>(0);
496 }

◆ overlapTrkVec()

constvec_t xAOD::MissingETAssociation_v1::overlapTrkVec ( const MissingETAssociationHelper & helper) const

Retrieve total track-based vector to be subtracted from the jet.

Definition at line 780 of file MissingETAssociation_v1.cxx.

781 {
782 constvec_t trkvec;
783 for (size_t iKey = 0; iKey < this->sizeTrk(); iKey++) {
784 bool selector = (helper.getObjSelectionFlags(this) & this->trkkey()[iKey]) ? !this->isMisc() : this->isMisc();
785 if (selector) trkvec+=ConstVec(this->trkpx()[iKey],this->trkpy()[iKey],this->trkpz()[iKey],this->trke()[iKey],this->trksumpt()[iKey]);
786 }
787 return trkvec;
788 }
Vector sum of constituents for subtractive overlap removal.

◆ overlapTypes() [1/3]

const std::vector< std::vector< unsigned char > > & xAOD::MissingETAssociation_v1::overlapTypes ( ) const

Get the list of object overlapTypes.

◆ overlapTypes() [2/3]

std::vector< unsigned char > xAOD::MissingETAssociation_v1::overlapTypes ( const IParticle * pPart) const

Get the overlap types for a given object referenced by pointer.

◆ overlapTypes() [3/3]

std::vector< unsigned char > xAOD::MissingETAssociation_v1::overlapTypes ( size_t objIdx) const

Get the overlap types for a given object referenced by index.

Definition at line 498 of file MissingETAssociation_v1.cxx.

499 {
500 return (objIdx != MissingETBase::Numerical::invalidIndex() && objIdx < this->size()) ? this->overlapTypes()[objIdx] : vector<unsigned char>(0);
501 }

◆ overrideMom()

std::map< const IParticle *, ConstVec > xAOD::MissingETAssociation_v1::overrideMom ( )

Get override momenta.

◆ refJet()

const Jet * xAOD::MissingETAssociation_v1::refJet ( ) const

Access reference jet.

◆ refJetContainer()

const JetContainer * xAOD::MissingETAssociation_v1::refJetContainer ( ) const

Access reference jet container holding reference jet.

◆ refJetIndex()

size_t xAOD::MissingETAssociation_v1::refJetIndex ( ) const

Access index of reference jet in its container.

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

211{
212 if (hadPrivateData()) {
213 // We had a private store, but it was released because this object
214 // was added to a container. Just forget about it.
216 return;
217 }
218
219 if (!havePrivateData() ||
220 !m_container ||
221 typeid(*m_container) != typeid(AuxElementPrivateData))
222 {
223 throw SG::ExcBadPrivateStore ("no private store exists");
224 }
225
228 delete m_container;
229 m_container = 0;
230}
bool hadPrivateData() const
True if this element had private data before it was added to its current container.
void setNoPrivateData()
Record that this element does not have private data.

◆ releasePrivateStoreForDtor()

void SG::AuxElement::releasePrivateStoreForDtor ( )
privateinherited

Out-of-line portion of destructor.

Delete a private store if we have one.

Definition at line 441 of file AuxElement.cxx.

442{
443#ifdef ATHCONTAINERS_R21_COMPAT
444 if (havePrivateData()) {
445 delete m_container;
446 }
447#else
449#endif
450}
void releasePrivateStoreForDtor()
Out-of-line portion of destructor.

◆ removeContrib() [1/3]

bool xAOD::MissingETAssociation_v1::removeContrib ( )

Remove all contributions.

Definition at line 211 of file MissingETAssociation_v1.cxx.

212 {
213 if ( this->empty() ) { return false; }
214 else
215 { size_t nEnt(this->size()); for ( size_t objIdx(0); objIdx<nEnt; ++objIdx ) { this->f_removeContrib(objIdx); } return true; }
216 }
bool f_removeContrib(size_t objIdx)
Copy the contribution data from a source.
bool empty() const
Empty list of contributing objects indicator.

◆ removeContrib() [2/3]

bool xAOD::MissingETAssociation_v1::removeContrib ( const IParticle * pPart)

Remove a contribution referenced by an object pointer.

◆ removeContrib() [3/3]

bool xAOD::MissingETAssociation_v1::removeContrib ( size_t objIdx)

Remove a contribution referenced by an index.

◆ resetContrib() [1/3]

bool xAOD::MissingETAssociation_v1::resetContrib ( )

Reset all contribution parameters.

Definition at line 247 of file MissingETAssociation_v1.cxx.

248 {
249 for (size_t idx = 0; idx < this->size(); idx++) this->f_overlapIndices()[idx].clear();
250 for (size_t idx = 0; idx < this->size(); idx++) this->f_overlapTypes()[idx].clear();
251 this->f_calpx().clear();
252 this->f_calpy().clear();
253 this->f_calpz().clear();
254 this->f_cale().clear();
255 this->f_calsumpt().clear();
256 this->f_calkey().clear();
257 this->f_trkpx().clear();
258 this->f_trkpy().clear();
259 this->f_trkpz().clear();
260 this->f_trke().clear();
261 this->f_trksumpt().clear();
262 this->f_trkkey().clear();
263 return true;
264 }

◆ resetContrib() [2/3]

bool xAOD::MissingETAssociation_v1::resetContrib ( const IParticle * pPart)

Reset the contribution parameters of an object referenced by a pointer.

◆ resetContrib() [3/3]

bool xAOD::MissingETAssociation_v1::resetContrib ( size_t objIdx)

Reset the contribution parameters of an object referenced by an index.

Definition at line 241 of file MissingETAssociation_v1.cxx.

242 {
243 this->resetContrib();
244 return true;
245 }

◆ setCalE() [1/2]

bool xAOD::MissingETAssociation_v1::setCalE ( const std::vector< float > & calevec)

Set the vector of \( E \).

Definition at line 303 of file MissingETAssociation_v1.cxx.

304 { this->f_cale().clear(); this->f_cale().insert(this->f_cale().end(),calevec.begin(),calevec.end()); return !this->f_cale().empty(); }

◆ setCalE() [2/2]

bool xAOD::MissingETAssociation_v1::setCalE ( size_t keyIdx,
float cale )

Set calo constituent vector \( E \) for a given contributing object referenced by index.

Definition at line 331 of file MissingETAssociation_v1.cxx.

332 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_cale().size() ) { this->f_cale()[keyIdx] = cale; return true; } else { return false; } }

◆ setCalKey() [1/2]

bool xAOD::MissingETAssociation_v1::setCalKey ( const std::vector< MissingETBase::Types::bitmask_t > & calkeyvec)

Set the vector of keys.

Definition at line 307 of file MissingETAssociation_v1.cxx.

308 { this->f_calkey().clear(); this->f_calkey().insert(this->f_calkey().end(),calkeyvec.begin(),calkeyvec.end()); return !this->f_calkey().empty(); }

◆ setCalKey() [2/2]

bool xAOD::MissingETAssociation_v1::setCalKey ( size_t keyIdx,
MissingETBase::Types::bitmask_t calkey )

Set calo key for a given contributing entry referenced by index.

Definition at line 335 of file MissingETAssociation_v1.cxx.

336 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_calkey().size() ) { this->f_calkey()[keyIdx] = calkey; return true; } else { return false; } }

◆ setCalPx() [1/2]

bool xAOD::MissingETAssociation_v1::setCalPx ( const std::vector< float > & calpxvec)

Set the vector of \( P_{x} \).

Definition at line 297 of file MissingETAssociation_v1.cxx.

298 { this->f_calpx().clear(); this->f_calpx().insert(this->f_calpx().end(),calpxvec.begin(),calpxvec.end()); return !this->f_calpx().empty(); }

◆ setCalPx() [2/2]

bool xAOD::MissingETAssociation_v1::setCalPx ( size_t keyIdx,
float calpx )

Set calo constituent vector \( P_{x} \) for a given contributing object referenced by index.

Definition at line 325 of file MissingETAssociation_v1.cxx.

326 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_calpx().size() ) { this->f_calpx()[keyIdx] = calpx; return true; } else { return false; } }

◆ setCalPy() [1/2]

bool xAOD::MissingETAssociation_v1::setCalPy ( const std::vector< float > & calpyvec)

Set the vector of \( P_{y} \).

Definition at line 299 of file MissingETAssociation_v1.cxx.

300 { this->f_calpy().clear(); this->f_calpy().insert(this->f_calpy().end(),calpyvec.begin(),calpyvec.end()); return !this->f_calpy().empty(); }

◆ setCalPy() [2/2]

bool xAOD::MissingETAssociation_v1::setCalPy ( size_t keyIdx,
float calpy )

Set calo constituent vector \( P_{y} \) for a given contributing object referenced by index.

Definition at line 327 of file MissingETAssociation_v1.cxx.

328 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_calpy().size() ) { this->f_calpy()[keyIdx] = calpy; return true; } else { return false; } }

◆ setCalPz() [1/2]

bool xAOD::MissingETAssociation_v1::setCalPz ( const std::vector< float > & calpzvec)

Set the vector of \( P_{z} \).

Definition at line 301 of file MissingETAssociation_v1.cxx.

302 { this->f_calpz().clear(); this->f_calpz().insert(this->f_calpz().end(),calpzvec.begin(),calpzvec.end()); return !this->f_calpz().empty(); }

◆ setCalPz() [2/2]

bool xAOD::MissingETAssociation_v1::setCalPz ( size_t keyIdx,
float calpz )

Set calo constituent vector \( P_{z} \) for a given contributing object referenced by index.

Definition at line 329 of file MissingETAssociation_v1.cxx.

330 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_calpz().size() ) { this->f_calpz()[keyIdx] = calpz; return true; } else { return false; } }

◆ setCalSumpt() [1/2]

bool xAOD::MissingETAssociation_v1::setCalSumpt ( const std::vector< float > & calsumptvec)

Set the vector of sumpt.

Definition at line 305 of file MissingETAssociation_v1.cxx.

306 { this->f_calsumpt().clear(); this->f_calsumpt().insert(this->f_calsumpt().end(),calsumptvec.begin(),calsumptvec.end()); return !this->f_calsumpt().empty(); }

◆ setCalSumpt() [2/2]

bool xAOD::MissingETAssociation_v1::setCalSumpt ( size_t keyIdx,
float calsumpt )

Set calo constituent sumpt for a given contributing object referenced by index.

Definition at line 333 of file MissingETAssociation_v1.cxx.

334 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_calsumpt().size() ) { this->f_calsumpt()[keyIdx] = calsumpt; return true; } else { return false; } }

◆ setCalVec() [1/2]

bool xAOD::MissingETAssociation_v1::setCalVec ( size_t keyIdx,
const ConstVec & cvec = ConstVec() )

Set the calo constituent vector of an object contribution referenced by index.

◆ setCalVec() [2/2]

bool xAOD::MissingETAssociation_v1::setCalVec ( size_t keyIdx,
float calpx,
float calpy,
float calpz,
float ce,
float sumpt )

Set the calo constituent vectors of an object contribution referenced by index.

Definition at line 337 of file MissingETAssociation_v1.cxx.

338 {
339 if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_cale().size() ) {
340 this->f_calpx()[keyIdx] = calpx; this->f_calpy()[keyIdx] = calpy;
341 this->f_calpz()[keyIdx] = calpz; this->f_cale()[keyIdx] = cale;
342 this->f_calsumpt()[keyIdx] = sumpt; return true;
343 } else { return false; }
344 }

◆ setConstStore()

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

Synonym for setStore with IConstAuxStore.

Parameters
storeThe new store.

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

506{
507#ifdef ATHCONTAINERS_R21_COMPAT
508 if (hadPrivateData()) {
509 // We had a private store, but it was released because we were added
510 // to a container.
511
512 if (container == 0) {
513 // We're being moved out of the container. Make a new private
514 // store, copy the data, and switch to it.
515 auto privateData = new SG::AuxElementPrivateData;
516 AuxElement to (privateData, 0);
517 to.copyAux (*this);
520 m_container = privateData;
521 return true;
522 }
523 }
524 else if (havePrivateData() &&
525 typeid(*m_container) == typeid(AuxElementPrivateData))
526 {
527 // We currently have a private store.
528
529 if (container != 0 && container != m_container) {
530 // We're being added to a container.
531 // Aux data has already been copied.
532 // Release private store.
535 delete m_container;
537 return false;
538 }
539 }
540 else {
541 // We have a standalone store.
542 throw SG::ExcBadPrivateStore ("Attempt to add/remove a standalone object "
543 "from a container.");
544 }
545
548 return false;
549#else
551#endif
552}
AuxElement()
Default constructor.
bool setIndexPrivate(size_t index, const SG::AuxVectorData *container)
Set the index/container for this element.
void setHadPrivateData()
Record that this element used to have private data.
CONT to(RANGE &&r)
Definition ranges.h:39

◆ setJetLink()

bool xAOD::MissingETAssociation_v1::setJetLink ( const MissingETBase::Types::jetlink_t & jetLnk)

Set the link to the reference jet.

Definition at line 448 of file MissingETAssociation_v1.cxx.

449 {
450 bool wasSet(this->f_jetLink().getStorableObjectPointer() != nullptr);
451 this->f_jetLink() = jetLnk;
452 return wasSet;
453 }

◆ setJetTrkE()

void xAOD::MissingETAssociation_v1::setJetTrkE ( float e)

Set track constituent vector \( E \) for the reference jet.

Definition at line 400 of file MissingETAssociation_v1.cxx.

401 { this->f_jettrke() = e; }

◆ setJetTrkPx()

void xAOD::MissingETAssociation_v1::setJetTrkPx ( float px)

Set track constituent vector \( P_{x} \) for the reference jet.

Definition at line 394 of file MissingETAssociation_v1.cxx.

395 { this->f_jettrkpx() = px; }

◆ setJetTrkPy()

void xAOD::MissingETAssociation_v1::setJetTrkPy ( float py)

Set track constituent vector \( P_{y} \) for the reference jet.

Definition at line 396 of file MissingETAssociation_v1.cxx.

397 { this->f_jettrkpy() = py; }

◆ setJetTrkPz()

void xAOD::MissingETAssociation_v1::setJetTrkPz ( float pz)

Set track constituent vector \( P_{z} \) for the reference jet.

Definition at line 398 of file MissingETAssociation_v1.cxx.

399 { this->f_jettrkpz() = pz; }

◆ setJetTrkSumpt()

void xAOD::MissingETAssociation_v1::setJetTrkSumpt ( float sumpt)

Set track constituent vector \( E \) for the reference jet.

Definition at line 402 of file MissingETAssociation_v1.cxx.

403 { this->f_jettrksumpt() = sumpt; }

◆ setJetTrkVec() [1/2]

void xAOD::MissingETAssociation_v1::setJetTrkVec ( const ConstVec & cvec = ConstVec())

Set the track constituent vector for the reference jet.

◆ setJetTrkVec() [2/2]

void xAOD::MissingETAssociation_v1::setJetTrkVec ( float px,
float py,
float pz,
float ce,
float sumpt )

Set the track constituent vector for the reference jet.

Definition at line 404 of file MissingETAssociation_v1.cxx.

405 {
406 this->f_jettrkpx() = px; this->f_jettrkpy() = py;
407 this->f_jettrkpz() = pz; this->f_jettrke() = e;
408 this->f_jettrksumpt() = sumpt;
409 }

◆ 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.

◆ setObjectLinks()

bool xAOD::MissingETAssociation_v1::setObjectLinks ( const MissingETBase::Types::objlink_vector_t & objLnks)

Set the vector of links to the contributing physics or signal objects.

Definition at line 455 of file MissingETAssociation_v1.cxx.

456 {
457 bool wasSet(!this->f_objectLinks().empty());
458 if ( wasSet ) { this->f_objectLinks().clear(); this->f_objectLinks().insert(this->f_objectLinks().end(),objLnks.begin(),objLnks.end()); }
459 return wasSet;
460 }

◆ setOverlaps() [1/3]

bool xAOD::MissingETAssociation_v1::setOverlaps ( const IParticle * pPart,
const std::vector< size_t > & overlapIndices,
const std::vector< unsigned char > & overlapTypes )

Set overlap indices and types for a given contributing object referenced by pointer.

◆ setOverlaps() [2/3]

bool xAOD::MissingETAssociation_v1::setOverlaps ( const std::vector< std::vector< size_t > > & overlapIndices,
const std::vector< std::vector< unsigned char > > & overlapTypes )

Set the vector of overlap indices and types.

Definition at line 418 of file MissingETAssociation_v1.cxx.

419 {
420 this->f_overlapIndices().clear(); this->f_overlapIndices().insert(this->f_overlapIndices().end(),overlapIndexVector.begin(),overlapIndexVector.end());
421 this->f_overlapTypes().clear(); this->f_overlapTypes().insert(this->f_overlapTypes().end(),overlapTypeVector.begin(),overlapTypeVector.end());
422 return !this->f_overlapIndices().empty();
423 }

◆ setOverlaps() [3/3]

bool xAOD::MissingETAssociation_v1::setOverlaps ( size_t objIdx,
const std::vector< size_t > & overlapIndices,
const std::vector< unsigned char > & overlapTypes )

Set overlap indices and types for a given contributing object referenced by index.

Definition at line 424 of file MissingETAssociation_v1.cxx.

425 {
426 if ( objIdx != MissingETBase::Numerical::invalidIndex() && objIdx < this->f_overlapIndices().size() ) {
427 this->f_overlapIndices()[objIdx] = overlapIndices;
428 this->f_overlapTypes()[objIdx] = overlapTypes;
429 return true;
430 } else { return false; }
431 }

◆ setOverrideMom()

void xAOD::MissingETAssociation_v1::setOverrideMom ( const std::map< const IParticle *, ConstVec > & pOverride)

Set override momenta.

◆ setRefJet() [1/2]

bool xAOD::MissingETAssociation_v1::setRefJet ( const Jet * pJet)

Set reference jet by object pointer reference.

Definition at line 434 of file MissingETAssociation_v1.cxx.

435 {
436 bool wasSet(this->f_jetLink().getStorableObjectPointer() != nullptr);
438 return wasSet;
439 }

◆ setRefJet() [2/2]

bool xAOD::MissingETAssociation_v1::setRefJet ( const JetContainer * pJetCont,
size_t pJetIdx )

Set reference jet by container pointer and index reference.

Definition at line 441 of file MissingETAssociation_v1.cxx.

442 {
443 bool wasSet(this->f_jetLink().getStorableObjectPointer() != nullptr);
444 this->f_jetLink().toIndexedElement(*pJetCont,pJetIdx);
445 return wasSet;
446 }

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

270{
271 AuxElementStandaloneData* data = setStore1 (store);
272 if (store)
273 data->setStore (store);
274}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
AuxElementStandaloneData * setStore1(const SG::IConstAuxStore *store)
Set the store associated with this object.

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

242{
243 AuxElementStandaloneData* data = setStore1 (store);
244 if (store)
245 data->setStore (store);
246}

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

258{
259 AuxElementStandaloneData* data = setStore1 (store);
260 if (store)
261 data->setStore (store);
262}

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

462{
463 if (store) {
464 // Want this object be standalone.
465 if (!m_container) {
466 // Not in a container (and no private store). Make a new object.
467 AuxElementStandaloneData* data = new AuxElementStandaloneData;
470 return data;
471 }
472 if (usingStandaloneStore()) {
473 // Standalone --- return existing object.
474 return static_cast<AuxElementStandaloneData*> (container());
475 }
476 // Otherwise, it's an error.
477 throw ExcBadPrivateStore ("Attempt to attach a standalone store to an "
478 "object in a container or with a private store.");
479 }
480
481 else {
482 // Getting rid of a standalone store.
483 if (usingStandaloneStore()) {
485 delete m_container;
486 m_container = 0;
487 }
488 else if (m_container != 0)
489 throw ExcBadPrivateStore ("Attempt to remove a standalone store from an "
490 "object in a container or with a private store.");
491 return 0;
492 }
493}
bool usingStandaloneStore() const
Test to see if this object is currently using a standalone store.

◆ setTrkE() [1/2]

bool xAOD::MissingETAssociation_v1::setTrkE ( const std::vector< float > & trkevec)

Set the vector of \( E \).

Definition at line 316 of file MissingETAssociation_v1.cxx.

317 { this->f_trke().clear(); this->f_trke().insert(this->f_trke().end(),trkevec.begin(),trkevec.end()); return !this->f_trke().empty(); }

◆ setTrkE() [2/2]

bool xAOD::MissingETAssociation_v1::setTrkE ( size_t keyIdx,
float trke )

Set track constituent vector \( E \) for a given contributing object referenced by index.

Definition at line 365 of file MissingETAssociation_v1.cxx.

366 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_trke().size() ) { this->f_trke()[keyIdx] = trke; return true; } else { return false; } }

◆ setTrkKey() [1/2]

bool xAOD::MissingETAssociation_v1::setTrkKey ( const std::vector< MissingETBase::Types::bitmask_t > & trkkeyvec)

Set the vector of keys.

Definition at line 320 of file MissingETAssociation_v1.cxx.

321 { this->f_trkkey().clear(); this->f_trkkey().insert(this->f_trkkey().end(),trkkeyvec.begin(),trkkeyvec.end()); return !this->f_trkkey().empty(); }

◆ setTrkKey() [2/2]

bool xAOD::MissingETAssociation_v1::setTrkKey ( size_t keyIdx,
MissingETBase::Types::bitmask_t trkkey )

Set trk key for a given contributing entry referenced by index.

Definition at line 369 of file MissingETAssociation_v1.cxx.

370 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_trkkey().size() ) { this->f_trkkey()[keyIdx] = trkkey; return true; } else { return false; } }

◆ setTrkPx() [1/2]

bool xAOD::MissingETAssociation_v1::setTrkPx ( const std::vector< float > & trkpxvec)

Set the vector of \( P_{x} \).

Definition at line 310 of file MissingETAssociation_v1.cxx.

311 { this->f_trkpx().clear(); this->f_trkpx().insert(this->f_trkpx().end(),trkpxvec.begin(),trkpxvec.end()); return !this->f_trkpx().empty(); }

◆ setTrkPx() [2/2]

bool xAOD::MissingETAssociation_v1::setTrkPx ( size_t keyIdx,
float trkpx )

Set track constituent vector \( P_{x} \) for a given contributing object referenced by index.

Definition at line 359 of file MissingETAssociation_v1.cxx.

360 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_trkpx().size() ) { this->f_trkpx()[keyIdx] = trkpx; return true; } else { return false; } }

◆ setTrkPy() [1/2]

bool xAOD::MissingETAssociation_v1::setTrkPy ( const std::vector< float > & trkpyvec)

Set the vector of \( P_{y} \).

Definition at line 312 of file MissingETAssociation_v1.cxx.

313 { this->f_trkpy().clear(); this->f_trkpy().insert(this->f_trkpy().end(),trkpyvec.begin(),trkpyvec.end()); return !this->f_trkpy().empty(); }

◆ setTrkPy() [2/2]

bool xAOD::MissingETAssociation_v1::setTrkPy ( size_t keyIdx,
float trkpy )

Set track constituent vector \( P_{y} \) for a given contributing object referenced by index.

Definition at line 361 of file MissingETAssociation_v1.cxx.

362 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_trkpy().size() ) { this->f_trkpy()[keyIdx] = trkpy; return true; } else { return false; } }

◆ setTrkPz() [1/2]

bool xAOD::MissingETAssociation_v1::setTrkPz ( const std::vector< float > & trkpzvec)

Set the vector of \( P_{z} \).

Definition at line 314 of file MissingETAssociation_v1.cxx.

315 { this->f_trkpz().clear(); this->f_trkpz().insert(this->f_trkpz().end(),trkpzvec.begin(),trkpzvec.end()); return !this->f_trkpz().empty(); }

◆ setTrkPz() [2/2]

bool xAOD::MissingETAssociation_v1::setTrkPz ( size_t keyIdx,
float trkpz )

Set track constituent vector \( P_{z} \) for a given contributing object referenced by index.

Definition at line 363 of file MissingETAssociation_v1.cxx.

364 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_trkpz().size() ) { this->f_trkpz()[keyIdx] = trkpz; return true; } else { return false; } }

◆ setTrkSumpt() [1/2]

bool xAOD::MissingETAssociation_v1::setTrkSumpt ( const std::vector< float > & trksumptvec)

Set the vector of \( E \).

Definition at line 318 of file MissingETAssociation_v1.cxx.

319 { this->f_trksumpt().clear(); this->f_trksumpt().insert(this->f_trksumpt().end(),trksumptvec.begin(),trksumptvec.end()); return !this->f_trksumpt().empty(); }

◆ setTrkSumpt() [2/2]

bool xAOD::MissingETAssociation_v1::setTrkSumpt ( size_t keyIdx,
float trksumpt )

Set track constituent vector \( E \) for a given contributing object referenced by index.

Definition at line 367 of file MissingETAssociation_v1.cxx.

368 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_trksumpt().size() ) { this->f_trksumpt()[keyIdx] = trksumpt; return true; } else { return false; } }

◆ setTrkVec() [1/2]

bool xAOD::MissingETAssociation_v1::setTrkVec ( size_t keyIdx,
const ConstVec & cvec = ConstVec() )

Set the track constituent vector of an object contribution referenced by index.

◆ setTrkVec() [2/2]

bool xAOD::MissingETAssociation_v1::setTrkVec ( size_t keyIdx,
float trkpx,
float trkpy,
float trkpz,
float trke,
float sumpt )

Set the track constituent vectors of an object contribution referenced by index.

Definition at line 371 of file MissingETAssociation_v1.cxx.

372 {
373 if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_trke().size() ) {
374 this->f_trkpx()[keyIdx] = trkpx; this->f_trkpy()[keyIdx] = trkpy;
375 this->f_trkpz()[keyIdx] = trkpz; this->f_trke()[keyIdx] = trke;
376 this->f_trksumpt()[keyIdx] = sumpt; return true;
377 } else { return false; }
378 }

◆ size()

size_t xAOD::MissingETAssociation_v1::size ( ) const

Update all internally used ElementLink instances.

Note
[Deprecated] This method scans the full list of contributing objects. It invokes MissingETAssociation_v1::updateJetlink internally.

[Deprecated] Update link to reference jet only

◆ sizeCal()

size_t xAOD::MissingETAssociation_v1::sizeCal ( ) const

◆ sizeTrk()

size_t xAOD::MissingETAssociation_v1::sizeTrk ( ) const

◆ testPolicy() [1/2]

bool xAOD::MissingETAssociation_v1::testPolicy ( const xAOD::IParticle & part,
MissingETBase::UsageHandler::Policy p )
static

Definition at line 873 of file MissingETAssociation_v1.cxx.

873 {
874 xAOD::Type::ObjectType objType = part.type();
875 if(objType == xAOD::Type::FlowElement) objType = FEHelpers::signalToXAODType(static_cast<const xAOD::FlowElement&>(part));
876 return testPolicy(objType, p);
877 }
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition ObjectType.h:32

◆ testPolicy() [2/2]

◆ 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.

◆ trke() [1/2]

const std::vector< float > & xAOD::MissingETAssociation_v1::trke ( ) const

Get the vector of \( E \).

◆ trke() [2/2]

float xAOD::MissingETAssociation_v1::trke ( size_t keyIdx) const

Get the vector \( E \) for a given object referenced by index.

Definition at line 486 of file MissingETAssociation_v1.cxx.

487 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeTrk() ? this->trke()[keyIdx] : MissingETBase::Numerical::ceError(); }

◆ trkkey() [1/2]

const std::vector< MissingETBase::Types::bitmask_t > & xAOD::MissingETAssociation_v1::trkkey ( ) const

Get the vector of trk keys.

◆ trkkey() [2/2]

MissingETBase::Types::bitmask_t xAOD::MissingETAssociation_v1::trkkey ( size_t keyIdx) const

Get the key for a given entry referenced by index.

Definition at line 490 of file MissingETAssociation_v1.cxx.

491 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeTrk() ? this->trkkey()[keyIdx] : MissingETBase::Numerical::invalidIndex(); }

◆ trkpx() [1/2]

const std::vector< float > & xAOD::MissingETAssociation_v1::trkpx ( ) const

Get the vector of \( P_{x} \).

◆ trkpx() [2/2]

float xAOD::MissingETAssociation_v1::trkpx ( size_t keyIdx) const

Get the vector \( P_{x} \) for a given object referenced by index.

Definition at line 480 of file MissingETAssociation_v1.cxx.

481 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeTrk() ? this->trkpx()[keyIdx] : MissingETBase::Numerical::cpxError(); }

◆ trkpy() [1/2]

const std::vector< float > & xAOD::MissingETAssociation_v1::trkpy ( ) const

Get the vector of \( P_{y} \).

◆ trkpy() [2/2]

float xAOD::MissingETAssociation_v1::trkpy ( size_t keyIdx) const

Get the vector \( P_{y} \) for a given object referenced by index.

Definition at line 482 of file MissingETAssociation_v1.cxx.

483 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeTrk() ? this->trkpy()[keyIdx] : MissingETBase::Numerical::cpyError(); }

◆ trkpz() [1/2]

const std::vector< float > & xAOD::MissingETAssociation_v1::trkpz ( ) const

Get the vector of \( P_{z} \).

◆ trkpz() [2/2]

float xAOD::MissingETAssociation_v1::trkpz ( size_t keyIdx) const

Get the vector \( P_{z} \) for a given object referenced by index.

Definition at line 484 of file MissingETAssociation_v1.cxx.

485 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeTrk() ? this->trkpz()[keyIdx] : MissingETBase::Numerical::cpzError(); }

◆ trksumpt() [1/2]

const std::vector< float > & xAOD::MissingETAssociation_v1::trksumpt ( ) const

Get the vector of \( E \).

◆ trksumpt() [2/2]

float xAOD::MissingETAssociation_v1::trksumpt ( size_t keyIdx) const

Get the vector \( E \) for a given object referenced by index.

Definition at line 488 of file MissingETAssociation_v1.cxx.

489 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeTrk() ? this->trksumpt()[keyIdx] : MissingETBase::Numerical::sumptError(); }

◆ trkVec() [1/2]

MissingETAssociation_v1::ConstVec xAOD::MissingETAssociation_v1::trkVec ( const IParticle * pPart) const

Get track constituent vector for a given object.

Definition at line 548 of file MissingETAssociation_v1.cxx.

549 {
551 for (size_t iKey = 0; iKey < this->sizeTrk(); iKey++) {
552 if (this->trkkey(iKey) & getObjMask(this->findIndex(pPart)))
553 totalvec+=this->trkVec(iKey);
554 }
555 return totalvec;
556 }
ConstVec trkVec(const IParticle *pPart) const
Get track constituent vector for a given object.

◆ trkVec() [2/2]

constvec_t xAOD::MissingETAssociation_v1::trkVec ( size_t keyIdx) const

Get track constituent vector for a given entry (index) in the contributing object list.

Definition at line 563 of file MissingETAssociation_v1.cxx.

564 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeTrk()
565 ? constvec_t(this->trkpx(keyIdx),this->trkpy(keyIdx),this->trkpz(keyIdx),this->trke(keyIdx),this->trksumpt(keyIdx))
566 : constvec_t(MissingETBase::Numerical::cpxError(),MissingETBase::Numerical::cpyError(),MissingETBase::Numerical::cpzError(),MissingETBase::Numerical::ceError(),MissingETBase::Numerical::sumptError()); }

◆ usingPrivateStore()

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

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

Definition at line 280 of file AuxElement.cxx.

281{
282 return havePrivateData() &&
283 typeid(*m_container) == typeid(AuxElementPrivateData);
284}

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

291{
292 return havePrivateData() &&
293 typeid(*m_container) == typeid(AuxElementStandaloneData);
294}

Member Data Documentation

◆ m_acc_cale

const SG::AuxElement::Accessor< std::vector< float > > xAOD::MissingETAssociation_v1::m_acc_cale
staticprivate

Definition at line 431 of file MissingETAssociation_v1.h.

◆ m_acc_calpx

const SG::AuxElement::Accessor< std::vector< float > > xAOD::MissingETAssociation_v1::m_acc_calpx
staticprivate

Definition at line 428 of file MissingETAssociation_v1.h.

◆ m_acc_calpy

const SG::AuxElement::Accessor< std::vector< float > > xAOD::MissingETAssociation_v1::m_acc_calpy
staticprivate

Definition at line 429 of file MissingETAssociation_v1.h.

◆ m_acc_calpz

const SG::AuxElement::Accessor< std::vector< float > > xAOD::MissingETAssociation_v1::m_acc_calpz
staticprivate

Definition at line 430 of file MissingETAssociation_v1.h.

◆ m_acc_calsumpt

const SG::AuxElement::Accessor< std::vector< float > > xAOD::MissingETAssociation_v1::m_acc_calsumpt
staticprivate

Definition at line 432 of file MissingETAssociation_v1.h.

◆ m_acc_jettrke

const SG::AuxElement::Accessor< float > xAOD::MissingETAssociation_v1::m_acc_jettrke
staticprivate

Definition at line 443 of file MissingETAssociation_v1.h.

◆ m_acc_jettrkpx

const SG::AuxElement::Accessor< float > xAOD::MissingETAssociation_v1::m_acc_jettrkpx
staticprivate

Definition at line 440 of file MissingETAssociation_v1.h.

◆ m_acc_jettrkpy

const SG::AuxElement::Accessor< float > xAOD::MissingETAssociation_v1::m_acc_jettrkpy
staticprivate

Definition at line 441 of file MissingETAssociation_v1.h.

◆ m_acc_jettrkpz

const SG::AuxElement::Accessor< float > xAOD::MissingETAssociation_v1::m_acc_jettrkpz
staticprivate

Definition at line 442 of file MissingETAssociation_v1.h.

◆ m_acc_jettrksumpt

const SG::AuxElement::Accessor< float > xAOD::MissingETAssociation_v1::m_acc_jettrksumpt
staticprivate

Definition at line 444 of file MissingETAssociation_v1.h.

◆ m_acc_trke

const SG::AuxElement::Accessor< std::vector< float > > xAOD::MissingETAssociation_v1::m_acc_trke
staticprivate

Definition at line 437 of file MissingETAssociation_v1.h.

◆ m_acc_trkpx

const SG::AuxElement::Accessor< std::vector< float > > xAOD::MissingETAssociation_v1::m_acc_trkpx
staticprivate

Definition at line 434 of file MissingETAssociation_v1.h.

◆ m_acc_trkpy

const SG::AuxElement::Accessor< std::vector< float > > xAOD::MissingETAssociation_v1::m_acc_trkpy
staticprivate

Definition at line 435 of file MissingETAssociation_v1.h.

◆ m_acc_trkpz

const SG::AuxElement::Accessor< std::vector< float > > xAOD::MissingETAssociation_v1::m_acc_trkpz
staticprivate

Definition at line 436 of file MissingETAssociation_v1.h.

◆ m_acc_trksumpt

const SG::AuxElement::Accessor< std::vector< float > > xAOD::MissingETAssociation_v1::m_acc_trksumpt
staticprivate

Definition at line 438 of file MissingETAssociation_v1.h.

◆ 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 335 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_objConstLinks

std::vector<std::vector<ElementLink<IParticleContainer> > > xAOD::MissingETAssociation_v1::m_objConstLinks
protected

Cache object constituents for overlap-finding.

Definition at line 423 of file MissingETAssociation_v1.h.

◆ m_override

std::map<const IParticle*,ConstVec> xAOD::MissingETAssociation_v1::m_override
private

Definition at line 426 of file MissingETAssociation_v1.h.

◆ m_privateStoreState

PrivateStoreState SG::IAuxElement::m_privateStoreState
privateinherited

Definition at line 137 of file IAuxElement.h.

◆ supportsThinning

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 959 of file AuxElement.h.


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