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:
SG::AuxElement SG::IAuxElement

List of all members.

Classes

class  ConstVec
 Vector sum of constituents for subtractive overlap removal. More...

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)
 Assignment.
virtual ~MissingETAssociation_v1 ()
 Assignment operator.
size_t findCalIndex (MissingETBase::Types::bitmask_t mask) const
size_t findTrkIndex (MissingETBase::Types::bitmask_t mask) const
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< double > & calpx () const
 Get the vector of $ P_{x} $.
double calpx (const IParticle *pPart) const
 Get the vector $ P_{x} $ for a given object referenced by pointer.
double calpx (size_t keyIdx) const
 Get the vector $ P_{x} $ for a given object referenced by index.
bool setCalPx (const std::vector< double > &calpxvec)
 Set the vector of $ P_{x} $.
bool setCalPx (size_t keyIdx, double calpx)
 Set calo constituent vector $ P_{x} $ for a given contributing object referenced by index.
const std::vector< double > & calpy () const
 Get the vector of $ P_{y} $.
double calpy (size_t keyIdx) const
 Get the vector $ P_{y} $ for a given object referenced by index.
bool setCalPy (const std::vector< double > &calpyvec)
 Set the vector of $ P_{y} $.
bool setCalPy (size_t keyIdx, double calpy)
 Set calo constituent vector $ P_{y} $ for a given contributing object referenced by index.
const std::vector< double > & calpz () const
 Get the vector of $ P_{z} $.
double calpz (size_t keyIdx) const
 Get the vector $ P_{z} $ for a given object referenced by index.
bool setCalPz (const std::vector< double > &calpzvec)
 Set the vector of $ P_{z} $.
bool setCalPz (size_t keyIdx, double calpz)
 Set calo constituent vector $ P_{z} $ for a given contributing object referenced by index.
const std::vector< double > & cale () const
 Get the vector of $ E $.
double cale (size_t keyIdx) const
 Get the vector $ E $ for a given object referenced by index.
bool setCalE (const std::vector< double > &calevec)
 Set the vector of $ E $.
bool setCalE (size_t keyIdx, double cale)
 Set calo constituent vector $ E $ for a given contributing object referenced by index.
const std::vector< double > & calsumpt () const
 Get the vector of sumpt.
double calsumpt (size_t keyIdx) const
 Get the sumpt for a given object referenced by index.
bool setCalSumpt (const std::vector< double > &calsumptvec)
 Set the vector of sumpt.
bool setCalSumpt (size_t keyIdx, double 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, double calpx, double calpy, double calpz, double ce, double sumpt)
 Set the calo constituent vectors of an object contribution referenced by index.
bool addCalVec (MissingETBase::Types::bitmask_t key, double calpx, double calpy, double calpz, double cale, double sumpt)
 Add a key/vector pair for calo contributions.
bool clearCalVecs ()
 Reset the calo constituent vectors and keys.
const std::vector< double > & trkpx () const
 Get the vector of $ P_{x} $.
double trkpx (size_t keyIdx) const
 Get the vector $ P_{x} $ for a given object referenced by index.
bool setTrkPx (const std::vector< double > &trkpxvec)
 Set the vector of $ P_{x} $.
bool setTrkPx (size_t keyIdx, double trkpx)
 Set track constituent vector $ P_{x} $ for a given contributing object referenced by index.
const std::vector< double > & trkpy () const
 Get the vector of $ P_{y} $.
double trkpy (size_t keyIdx) const
 Get the vector $ P_{y} $ for a given object referenced by index.
bool setTrkPy (const std::vector< double > &trkpyvec)
 Set the vector of $ P_{y} $.
bool setTrkPy (size_t keyIdx, double trkpy)
 Set track constituent vector $ P_{y} $ for a given contributing object referenced by index.
const std::vector< double > & trkpz () const
 Get the vector of $ P_{z} $.
double trkpz (size_t keyIdx) const
 Get the vector $ P_{z} $ for a given object referenced by index.
bool setTrkPz (const std::vector< double > &trkpzvec)
 Set the vector of $ P_{z} $.
bool setTrkPz (size_t keyIdx, double trkpz)
 Set track constituent vector $ P_{z} $ for a given contributing object referenced by index.
const std::vector< double > & trke () const
 Get the vector of $ E $.
double trke (size_t keyIdx) const
 Get the vector $ E $ for a given object referenced by index.
bool setTrkE (const std::vector< double > &trkevec)
 Set the vector of $ E $.
bool setTrkE (size_t keyIdx, double trke)
 Set track constituent vector $ E $ for a given contributing object referenced by index.
const std::vector< double > & trksumpt () const
 Get the vector of $ E $.
double trksumpt (size_t keyIdx) const
 Get the vector $ E $ for a given object referenced by index.
bool setTrkSumpt (const std::vector< double > &trksumptvec)
 Set the vector of $ E $.
bool setTrkSumpt (size_t keyIdx, double 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, double trkpx, double trkpy, double trkpz, double trke, double sumpt)
 Set the track constituent vectors of an object contribution referenced by index.
bool addTrkVec (MissingETBase::Types::bitmask_t key, double trkpx, double trkpy, double trkpz, double ce, double sumpt)
 Add a key/vector pair for calo contributions.
bool clearTrkVecs ()
 Reset the track constituent vectors and keys.
double jettrkpx () const
 Get the vector $ P_{x} $ for a given object referenced by index.
double jettrkpy () const
 Get the vector $ P_{y} $ for a given object referenced by pointer.
double jettrkpz () const
 Get the vector $ P_{z} $ for a given object referenced by pointer.
double jettrke () const
 Get the vector $ E $ for a given object referenced by index.
double jettrksumpt () const
 Get the sumpt for a given object referenced by index.
void setJetTrkPx (double px)
 Set track constituent vector $ P_{x} $ for the reference jet.
void setJetTrkPy (double py)
 Set track constituent vector $ P_{y} $ for the reference jet.
void setJetTrkPz (double pz)
 Set track constituent vector $ P_{z} $ for the reference jet.
void setJetTrkE (double e)
 Set track constituent vector $ E $ for the reference jet.
void setJetTrkSumpt (double 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 (double px, double py, double pz, double ce, double sumpt)
 Set the track constituent vector for the reference jet.
const
MissingETBase::Types::jetlink_t
jetLink () 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_t
objectLinks () 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 char > overlapTypes (const IParticle *pPart) const
 Get the overlap types for a given object referenced by pointer.
std::vector< unsigned char > overlapTypes (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 (std::map< const IParticle *, ConstVec > pOverride)
 Set override momenta.
std::map< const IParticle
*, ConstVec
overrideMom ()
 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.
void resetCache ()
 reset cache for overlap removal decisions
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< double > *&calpxPtr, const std::vector< double > *&calpyPtr, const std::vector< double > *&calpzPtr, const std::vector< double > *&calePtr, const std::vector< double > *&calsumptPtr, const std::vector< double > *&trkpxPtr, const std::vector< double > *&trkpyPtr, const std::vector< double > *&trkpzPtr, const std::vector< double > *&trkePtr, const std::vector< double > *&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



void setObjSelectionFlag (size_t objIdx, bool status) const
 Flag object as selected for MET calculation.
void setObjSelectionFlag (const IParticle *pPart, bool status) const
 Flag object as selected for MET calculation.
void resetObjSelectionFlags () const
 Reset flags.
bool objSelected (size_t objIdx) const
 Test if object is selected for MET calculation.
bool objSelected (const IParticle *pPart) const
 Test if object is selected for MET calculation.
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 (size_t objIdx, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::OnlyCluster) const
 Check if any selected particles overlap this one.
bool hasOverlaps (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
 Retrieve total cluster-based vector to be subtracted from the jet.
ConstVec overlapTrkVec () 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 checkUsage (const IParticle *pSig, MissingETBase::UsageHandler::Policy p) const
 Check if this signal object matches the constituents of any flagged contributing objects.
bool isMisc () const
 Check if this association is a miscellaneous association.
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



void updateLinks ()
 Update all internally used ElementLink instances.
void updateJetLink ()
 Update link to reference jet only.
size_t size () const
size_t sizeCal () const
size_t sizeTrk () const
bool empty () const
 Empty list of contributing objects indicator.
Comparators

Parameters:
[in] contrib reference 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 (unsigned int type, MissingETBase::UsageHandler::Policy p)

Protected Member Functions

void createPrivateStore ()
 Function initialising the object to work in standalone mode.
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< double > & f_calpx ()
std::vector< double > & f_calpy ()
std::vector< double > & f_calpz ()
std::vector< double > & f_cale ()
std::vector< double > & f_calsumpt ()
std::vector
< MissingETBase::Types::bitmask_t > & 
f_calkey ()
std::vector< double > & f_trkpx ()
std::vector< double > & f_trkpy ()
std::vector< double > & f_trkpz ()
std::vector< double > & f_trke ()
std::vector< double > & f_trksumpt ()
std::vector
< MissingETBase::Types::bitmask_t > & 
f_trkkey ()
double & f_jettrkpx ()
double & f_jettrkpy ()
double & f_jettrkpz ()
double & f_jettrke ()
double & f_jettrksumpt ()
char & f_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

Protected Attributes

Internal data for local cache



std::vector< std::vector
< ElementLink
< IParticleContainer > > > 
m_objConstLinks
 Cache object constituents for overlap-finding.
MissingETBase::Types::bitmask_t m_useObjectFlags
std::vector< const IParticle * > m_contribObjects

Detailed Description

MET association descriptor contains object links and corresponding parameters.


Member Function Documentation

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

Copy the contribution data from a source

Parameters:
[in] contrib reference to non-modifiable contribution object (the source).
template<class POBJ , class LINK >
void xAOD::MissingETAssociation_v1::f_setObject ( const POBJ *  pObj,
LINK &  elemLink 
) [inline, 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:
POBJ linked object type
LINK specific ElementLink type
Parameters:
[in] pObj pointer to non-modifiable object to be linked
[in] elemLink reference 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
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] pPart pointer to non-modifiable object
[in] pPart pointer to non-modifiable object in the list of contributing objects
MissingETAssociation_v1 & xAOD::MissingETAssociation_v1::operator= ( const MissingETAssociation_v1 other  ) 

Assignment.

Parameters:
other The object from which we're assigning.

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.

Reimplemented from SG::AuxElement.

void xAOD::MissingETAssociation_v1::updateLinks (  ) 

Update all internally used ElementLink instances.

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

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1