ATLAS Offline Software
List of all members
xAOD::MissingETComposition Struct Reference

Collection of functions managing the MET composition map and association map. More...

#include <MissingETComposition.h>

Collaboration diagram for xAOD::MissingETComposition:

Static Public Member Functions

Adding data to the composition map

static bool add (MissingETComponentMap *pMap, const MissingET *pMET, MissingETBase::Types::bitmask_t sw=MissingETBase::Status::clearedStatus())
 Adding a MissingET object to the map. More...
 
static bool insert (MissingETComponentMap *pMap, const MissingET *pMET, const IParticle *pPart, MissingETBase::Types::weight_t weight=MissingETBase::Types::weight_t())
 Insert contributing signal or physics object by pointer, with optional kinematic weight object. More...
 
static bool insert (MissingETComponentMap *pMap, const MissingET *pMET, const IParticle *pPart, const MissingETBase::Types::object_vector_t &signalList, MissingETBase::Types::weight_t weight=MissingETBase::Types::weight_t(), MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::OnlyCluster)
 Insert MET object and contributing object by pointers, with list of signals and optional kinematic weight object. More...
 
static bool insert (MissingETComponentMap *pMap, const MissingET *pMET, const IParticle *pPart, double wpx, double wpy, double wet)
 Insert MET object and contributing object by pointers, with individual weights. More...
 
static bool insert (MissingETComponentMap *pMap, const MissingET *pMET, const IParticle *pPart, const MissingETBase::Types::object_vector_t &signalList, double wpx, double wpy, double wet, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::OnlyCluster)
 Insert MET object and contributing object by pointers, with list of signals and individual weight components. More...
 
Find a contributing particle
static MissingETComponentMap::const_iterator find (const MissingETComponentMap *pMap, const MissingET *pmetObj)
 Find non-modifiable contribution for a given MET object. More...
 
static MissingETComponentMap::iterator find (MissingETComponentMap *pMap, const MissingET *pmetObj)
 
static MissingETComponentMap::const_iterator find (const MissingETComponentMap *pMap, const std::string &metName)
 
static MissingETComponentMap::iterator find (MissingETComponentMap *pMap, const std::string &metName)
 
static MissingETComponentMap::const_iterator find (const MissingETComponentMap *pMap, MissingETBase::Types::bitmask_t src)
 
static MissingETComponentMap::iterator find (MissingETComponentMap *pMap, MissingETBase::Types::bitmask_t src)
 
static size_t findIndex (const MissingETComponentMap *pMap, const MissingET *pmetObj)
 
static size_t findIndex (const MissingETComponentMap *pMap, const std::string &metName)
 
static size_t findIndex (const MissingETComponentMap *pMap, MissingETBase::Types::bitmask_t src)
 
static MissingETComponentMap::const_iterator find (const MissingETComponentMap *pMap, const IParticle *pPart)
 Find non-modifiable contribution for given particle. More...
 
static MissingETComponentMap::iterator find (MissingETComponentMap *pMap, const IParticle *pPart)
 Find modifiable contribution for given particle. More...
 
static MissingETAssociationMap::const_iterator find (const MissingETAssociationMap *pMap, const Jet *pJet)
 Find non-modifiable contribution for a given MET object. More...
 
static MissingETAssociationMap::iterator find (MissingETAssociationMap *pMap, const Jet *pJet)
 
static MissingETAssociationMap::const_iterator find (const MissingETAssociationMap *pMap, const IParticle *pPart)
 Find non-modifiable contribution for given particle. More...
 
static MissingETAssociationMap::iterator find (MissingETAssociationMap *pMap, const IParticle *pPart)
 Find modifiable contribution for given particle. More...
 
Access contribution
static MissingETComponentMap::const_iterator begin (const MissingETComponentMap *pMap)
 Const iterator access to beginning of composition map. More...
 
static MissingETComponentMap::iterator begin (MissingETComponentMap *pMap)
 Iterator access to beginning of composition map. More...
 
static MissingETComponentMap::const_iterator end (const MissingETComponentMap *pMap)
 
static MissingETComponentMap::iterator end (MissingETComponentMap *pMap)
 
static const MissingETComponentgetComponent (const MissingETComponentMap *pMap, const IParticle *pPart)
 Access non-modifiable contribution object. More...
 
static const MissingETComponentgetComponent (const MissingETComponentMap *pMap, const MissingET *pmetObj)
 
static const MissingETComponentgetComponent (const MissingETComponentMap *pMap, const std::string &metName)
 
static const MissingETComponentgetComponent (const MissingETComponentMap *pMap, MissingETBase::Types::bitmask_t src)
 
static MissingETComponentgetComponent (MissingETComponentMap *pMap, const IParticle *pPart)
 Access non-modifiable contribution object. More...
 
static MissingETComponentgetComponent (MissingETComponentMap *pMap, const MissingET *pmetObj)
 
static MissingETComponentgetComponent (MissingETComponentMap *pMap, const std::string &metName)
 
static MissingETComponentgetComponent (MissingETComponentMap *pMap, MissingETBase::Types::bitmask_t src)
 
static std::vector< const MissingETAssociation * > getAssociations (const MissingETAssociationMap *pMap, const IParticle *pPart)
 Access non-modifiable contribution object. More...
 
static MissingETBase::Types::constvec_t getConstVec (const MissingETAssociationMap *pMap, const IParticle *pPart, MissingETBase::UsageHandler::Policy p)
 
static bool objSelected (const MissingETAssociationHelper &helper, const IParticle *obj)
 
static bool selectIfNoOverlaps (MissingETAssociationHelper &helper, const IParticle *obj, MissingETBase::UsageHandler::Policy p)
 
static const MissingETAssociationgetAssociation (const MissingETAssociationMap *pMap, const Jet *pJet)
 
static std::vector< MissingETAssociation * > getAssociations (MissingETAssociationMap *pMap, const IParticle *pPart)
 Access non-modifiable contribution object. More...
 
static MissingETAssociationgetAssociation (MissingETAssociationMap *pMap, const Jet *pJet)
 
Access contribution parameters and linked objects
static MissingETBase::Types::weight_t getWeight (const MissingETComponentMap *pMap, const IParticle *pPart)
 
static MissingETBase::Types::weight_t getWeight (MissingETComponentMap::const_iterator fCont, const IParticle *pPart)
 
static MissingETBase::Types::bitmask_t getStatusWord (const MissingETComponentMap *pMap, const MissingET *pmetObj)
 
static MissingETBase::Types::bitmask_t getStatusWord (MissingETComponentMap::const_iterator fCont)
 
static const MissingETgetMissingET (const MissingETComponentMap *pMap, const IParticle *pPart)
 
static const MissingETgetMissingET (MissingETComponentMap::const_iterator fCont)
 
static const MissingETgetMissingET (const MissingETComponentMap *pMap, const std::string &name)
 
static const MissingETgetMissingET (const MissingETComponentMap *pMap, MissingETBase::Types::bitmask_t sw)
 
template<int OBJTYPE>
static bool fillMissingET (const MissingETComponentMap *pMap, MissingET *pMET, MissingETBase::Types::bitmask_t=MissingETBase::Status::clearedStatus())
 Fill a given MissingET object. More...
 
static const JetgetRefJet (const MissingETAssociationMap *pMap, const IParticle *pPart)
 
static const JetgetRefJet (MissingETAssociationMap::const_iterator fCont)
 
Adding data to the association map

static bool add (MissingETAssociationMap *pMap, const Jet *pJet, const std::vector< ElementLink< IParticleContainer > > &jetconst=std::vector< ElementLink< IParticleContainer > >(), const MissingETBase::Types::constvec_t &trkvec=MissingETBase::Types::constvec_t())
 Adding a Jet object to the map. More...
 
static bool add (MissingETAssociationMap *pMap, const Jet *pJet, const std::vector< const IParticle * > &jetracks=std::vector< const IParticle * >())
 Adding a Jet object to the map. More...
 
static bool addMiscAssociation (MissingETAssociationMap *pMap)
 Add an association to hold objects not associated to any jet. More...
 
static bool insert (MissingETAssociationMap *pMap, size_t jetIndex, const IParticle *pPart, const std::vector< const IParticle * > &constlist)
 Insert contributing object to jet referenced by index, with constVecs for track and calo constituents. More...
 
static bool insert (MissingETAssociationMap *pMap, const Jet *pJet, const IParticle *pPart, const std::vector< const IParticle * > &constlist)
 Insert contributing object to jet referenced by pointer, with constVecs for track and calo constituents. More...
 
static bool insert (MissingETAssociationMap *pMap, const IParticle *pPart, const std::vector< const IParticle * > &constlist, std::map< const IParticle *, MissingETBase::Types::constvec_t > pOverride=std::map< const IParticle *, MissingETBase::Types::constvec_t >())
 Insert contributing object, finding the appropriate association automatically. More...
 
static bool setJetConstSum (MissingETAssociationMap *metMap, const Jet *jet, const std::vector< const IParticle * > &altConsts, std::map< const IParticle *, MissingETBase::Types::constvec_t > pOverride)
 
static bool insertMisc (MissingETAssociationMap *pMap, const IParticle *pPart, const std::vector< const IParticle * > &constlist)
 Insert contributing object into miscellaneous association. More...
 

Detailed Description

Collection of functions managing the MET composition map and association map.

Preliminaries

This struct does not contain any private data, and does not support any storable data. It collects functions interacting with the data objects providing the composition of a given missing transverse momentum (MET) reconstruction configuration. One set of these data objects includes MissingETComponent for the description of the contributions to a given MET, and MissingETComponentMap , which collects all contributions to a full and consistent MET and thus describes its configuration in terms of contributions from the all physics and signal objects in the event. The other set consists of MissingETAssociation that stores objects matched to a reconstructed jet, and MissingETAssociationMap , which encodes all overlaps between objects in a physics event.

Introduction

The principal data objects describing the composition of a given reconstructed MET are (1) the MissingETComponent object and (2) the MissingETComponentMap object. The first one describes the contributions to a given MET term, as documented here , and the second object is a collection of MET contibutions describing the composition of the fully reconstructed MET.

To permit the rebuilding of MET more easily without recourse to the constituent collections, we define (1) the MissingETAssociation object and (2) the MissingETAssociationMap object. The first one describes the objects matched to a reconstructed jet, as documented here , and the second object is a collection of associations, holding all overlap removal decisions for objects in the event.

The interaction with these data objects and the rules applied to these interactions are provided by the functions collected in the MissingETComposition structure.

Insertion rules (link to code documentation)

Two different levels of

Example: add data to the composition map

Each tool reconstructing a MET term is expected to add a MissingET object to a composition map. The sequence in the tool's execute method should look like this:

StatusCode METElectronTool::executeTool(xAOD::MissingET* pMET,xAOD::MissingETComponentMap* pMap) {
const xAOD::EgammaContainer pCont = 0;
if ( this->evtStore()->retrieve(pCont,"ElectronContainer").isFailure() )
{ ATH_MSG_ERROR("Cannot allocate ElectronContainer"); return StatusCode::FAILURE; }
pMET->setName("METElectron"); // set name
pMET->setSource(MissingETBase::Source::electron()); // set source indicator
{ ATH_MSG_WARNING("MissingET object <" << pMET->name() << " already in composition map"); return StatusCode::SUCCESS; }
for ( ; fEle != lEle; ++fEle ) {
if ( this->filter(*fEle) ) { // select electrons
clusterList.clear(); // accepted electron: clear cluster list
this->extractClusters(*fEle,clusterList); // accepted electron: extract list of clusters associated with the electron
if ( !pMap->checkOverlap(clusterList) ) { // accepted electron: check for signal overlap
pMet.add((*fEle)->p4().Px(),(*fEle)->p4().Py(),(*fEle)->pt()); // accepted electron/no overlap: add to MET object
MissingETComposition::insert(pMap,pMET,*fEle,clusterList); // accepted electron/no overlap: add to composition map
} // no signal overlap
} // accepted electron
} // loop on all electrons
return StatusCode::SUCCESS;
}

In this example MissingETComposition::add(MissingETComponentMap*,const MissingET*,MissingETBase::Types::bitmask_t sw) and MissingETComposition::insert(MissingETComponentMap*,const MissingET*,const MissingETBase::Types::weight_t&) are used.

Definition at line 21 of file Event/xAOD/xAODMissingET/xAODMissingET/MissingETComposition.h.

Member Function Documentation

◆ add() [1/3]

bool MissingETComposition::add ( MissingETAssociationMap pMap,
const Jet pJet,
const std::vector< const IParticle * > &  jetracks = std::vector<const IParticle*>() 
)
static

Adding a Jet object to the map.

This function should be called for a given Jet object before MissingETComposition::insert is invoked for the same object. Note that the the rules for adding a MET object do not allow to add the same object more than once to a given MissingETAssociationMap .

Returns
true if the object is not already in the map, else false.
Parameters
[in]pMappointer to modifiable MissingETAssociationMap object (the map to which the Jet object added.
[in]pJetpointer to non-modifiable Jet object.
[in]jettracksvector of pointers to tracks associated to jet.

Definition at line 204 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

205  {
206  // input check
207  if ( pMap == nullptr || pJet == nullptr )
208  { printf("MissingETComposition::add - ERROR - possible invalid pointer values: MissingETAssociationMap* = %p, Jet* = %p\n",(void*)pMap,(void*)pJet); return false; }
209  // check if jet already in map
210  if ( pMap->find(pJet) != pMap->end() )
211  { printf("MissingETComposition::add - WARNING - jet with index %zu already in map, not added again\n",pJet->index()); return false; }
212  // insert object
213  // size_t nextIdx = pMap->size();
214  std::vector<ElementLink<IParticleContainer> > jetconst = pJet->constituentLinks();
216  if(!jettracks.empty()) {
217  const IParticleContainer* pTrkCont = static_cast<const IParticleContainer*>(jettracks.front()->container());
218  for(const auto& trk : jettracks) {
219  ElementLink<IParticleContainer> link(*pTrkCont,trk->index());
220  jetconst.push_back(link);
221  trkvec += *trk;
222  }
223  }
224  return add(pMap,pJet,jetconst,trkvec);
225  }

◆ add() [2/3]

bool MissingETComposition::add ( MissingETAssociationMap pMap,
const Jet pJet,
const std::vector< ElementLink< IParticleContainer > > &  jetconst = std::vector<ElementLink<IParticleContainer> >(),
const MissingETBase::Types::constvec_t trkvec = MissingETBase::Types::constvec_t() 
)
static

Adding a Jet object to the map.

This function should be called for a given Jet object before MissingETComposition::insert is invoked for the same object. Note that the the rules for adding a MET object do not allow to add the same object more than once to a given MissingETAssociationMap .

Returns
true if the object is not already in the map, else false.
Parameters
[in]pMappointer to modifiable MissingETAssociationMap object (the map to which the Jet object added.
[in]pJetpointer to non-modifiable Jet object.
[in]jetconstvector of elementlinks to jet constituents.

Definition at line 186 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

188  {
189  // input check
190  if ( pMap == nullptr || pJet == nullptr )
191  { printf("MissingETComposition::add - ERROR - possible invalid pointer values: MissingETAssociationMap* = %p, Jet* = %p\n",(void*)pMap,(void*)pJet); return false; }
192  // check if jet already in map
193  if ( pMap->find(pJet) != pMap->end() )
194  { printf("MissingETComposition::add - WARNING - jet with index %zu already in map, not added again\n",pJet->index()); return false; }
195  // insert object
196  size_t nextIdx = pMap->size();
197  pMap->push_back(new MissingETAssociation(pJet));
198  pMap->setJetConstituents(jetconst,nextIdx);
199  // printf("Jet track vector: px %f, py %f\n",trkvec.cpx(),trkvec.cpy());
200  pMap->back()->setJetTrkVec(trkvec);
201  return pMap->back() != nullptr;
202  }

◆ add() [3/3]

bool MissingETComposition::add ( MissingETComponentMap pMap,
const MissingET pMET,
MissingETBase::Types::bitmask_t  sw = MissingETBase::Status::clearedStatus() 
)
static

Adding a MissingET object to the map.

This function should be called for a given MissingET object before MissingETComposition::insert is invoked for the same object. Note that the the rules for adding a MET object do not allow to add the same object more than once to a given MissingETComponentMap .

Returns
true if the object is not already in the map, else false.
Parameters
[in]pMappointer to modifiable MissingETComponentMap object (the map to which the MissingET object added.
[in]pMETpointer to non-modifiable MissingET object.
[in]swbitmask indicating contribution status (optional, default is MissingETBase::Status::clearedStatus())

Definition at line 29 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

30  {
31  // input check
32  if ( pMap == nullptr || pMET == nullptr )
33  { printf("MissingETComposition::add - ERROR - possible invalid pointer values: MissingETComponentMap* = %p, MissingET* = %p\n",(void*)pMap,(void*)pMET); return false; }
34  // check if MET object already in map
35  if ( pMap->find(pMET) != pMap->end() )
36  { printf("MissingETComposition::add - WARNING - MissingET object \042%s\042 already in map, not added again\n",pMET->name().c_str()); return false; }
37  // insert object
38  pMap->push_back(new MissingETComponent(pMET,sw));
39  return pMap->back() != nullptr;
40  }

◆ addMiscAssociation()

bool MissingETComposition::addMiscAssociation ( MissingETAssociationMap pMap)
static

Add an association to hold objects not associated to any jet.

In some cases, e.g. muons, it's useful to have a dummy association, so that overlap removal can be handled for objects not associated to a jet.

Returns
true if the object is not already in the map, else false.
Parameters
[in]pMappointer to modifiable MissingETAssociationMap object (the map to which the Jet object added.

Definition at line 227 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

228  {
229  // input check
230  if ( pMap == nullptr )
231  { printf("MissingETComposition::addMiscAssociation - ERROR - possible invalid pointer values: MissingETAssociationMap* = %p\n",(void*)pMap); return false; }
232  // insert object
233  pMap->push_back(new MissingETAssociation((const Jet*)nullptr,true));
234  return pMap->back() != nullptr;
235  }

◆ begin() [1/2]

static MissingETComponentMap::const_iterator xAOD::MissingETComposition::begin ( const MissingETComponentMap pMap)
static

Const iterator access to beginning of composition map.

Returns
Const iterator referencing the first entry in MissingETComponentMap . It the map is empty MissingETComposition::end(const MissingETComponentMap*) is returned.
Parameters
[in]pMappointer to non-modifiable composition map.
Warning
Handing a NULL pointer to this function will lead to a program termination (crash).

◆ begin() [2/2]

static MissingETComponentMap::iterator xAOD::MissingETComposition::begin ( MissingETComponentMap pMap)
static

Iterator access to beginning of composition map.

Returns
Iterator referencing the first entry in MissingETComponentMap . It the map is empty MissingETComposition::end(const MissingETComponentMap*) is returned.
Parameters
[in]pMappointer to non-modifiable composition map.
Warning
Handing a NULL pointer to this function will lead to a program termination (crash).

◆ end() [1/2]

static MissingETComponentMap::const_iterator xAOD::MissingETComposition::end ( const MissingETComponentMap pMap)
static

◆ end() [2/2]

static MissingETComponentMap::iterator xAOD::MissingETComposition::end ( MissingETComponentMap pMap)
static

◆ fillMissingET()

template<int OBJTYPE>
static bool xAOD::MissingETComposition::fillMissingET ( const MissingETComponentMap pMap,
MissingET pMET,
MissingETBase::Types::bitmask_t  = MissingETBase::Status::clearedStatus() 
)
inlinestatic

Fill a given MissingET object.

This method fills a referenced MissingET object with kinematics from a specific object type. This method is useful if contributions to a given MET term are of one object type only (basically true for all hard MET terms). For the soft MET term, which may be composed of contributions from tracks and clusters, one could invoke this method twice (once for each object type) for the same MissingET object. The method does not reset the MissingET object, it strictly adds the contributions from objects of the requested type.

Returns
true if anything added to the referenced MissingET object, else false.
Template Parameters
OBJTYPExAOD::Type::ObjectType requested to contribute to the MET object.
Parameters
[in]pMETpointer to modifiable MET object to be updated.
[in]statusstatusword filter to be applied as a contribution filter (optional, default is MissingETBase::Status::clearedStatus())

Definition at line 200 of file Event/xAOD/xAODMissingET/xAODMissingET/MissingETComposition.h.

202  {
203  if ( pMap == 0 || pMap->empty() ) return false;
204  //
205  double sumet(pMET->sumet());
206  MissingETComponentMap::const_iterator fComp(pMap->begin());
207  MissingETComponentMap::const_iterator lComp(pMap->end());
208  for ( ; fComp != lComp; ++fComp )
209  {
210  const MissingETComponent* pCont = *fComp;
211  if ( pCont != 0 )
212  {
213  // get objects from contribution
215  MissingETBase::Types::object_vector_t objs = pCont->objects(kinePars);
216  for ( size_t iObj(0); iObj<objs.size(); ++iObj )
217  {
218  if ( objs[iObj]->type() == OBJTYPE )
219  { // this is really stupid!!!!
220  pMET->add(objs.at(iObj)->p4().Px()*kinePars.at(iObj).wpx(),
221  objs.at(iObj)->p4().Py()*kinePars.at(iObj).wpy(),
222  objs.at(iObj)->pt()*kinePars.at(iObj).wet());
223  } // requested type
224  } // loop on contributing objects
225  } // contribution valid
226  } // loop on all contributions
227  return pMET->sumet() != sumet;
228  } // fillMissingET

◆ find() [1/12]

MissingETAssociationMap::const_iterator MissingETComposition::find ( const MissingETAssociationMap pMap,
const IParticle pPart 
)
static

Find non-modifiable contribution for given particle.

Returns
Const iterator pointing to non-modifiable MissingETAssociation object linked to given object (particle) with a given status if found, else return end (const) iterator. The first occurance with a given status is returned.
Parameters
[in]pPartpointer to non-modifiable object possibly contributing to a given MET object.

Definition at line 339 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

340  {
341  if ( pMap == nullptr ) { return MissingETAssociationMap::const_iterator(); }
342  // linear search - FIXME: method find(const IParticle*) in MissingETAssociationMap ??
343  MissingETAssociationMap::const_iterator fAssoc(pMap->begin());
344  MissingETAssociationMap::const_iterator lAssoc(pMap->end());
345  bool found(false);
346  while ( fAssoc != lAssoc && !found ) { found = (*fAssoc)->findIndex(pPart) != MissingETBase::Numerical::invalidIndex(); if ( !found ) { ++fAssoc; } }
347  return fAssoc;
348  }

◆ find() [2/12]

MissingETAssociationMap::const_iterator MissingETComposition::find ( const MissingETAssociationMap pMap,
const Jet pJet 
)
static

Find non-modifiable contribution for a given MET object.

Returns
Const iterator pointing to a non-modifiable MissingETAssociation object linked to given object (particle) if found, else return end (const) iterator. The first occurance is returned, independent of the status of the contribution.
Parameters
[in]pJetpointer to valid Jet object.
Note
This method performs a linear search with at most N iterations (N is the number of contributions in the association map).

Definition at line 333 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

334  { return pMap != nullptr ? pMap->find(pJet) : MissingETAssociationMap::const_iterator(); }

◆ find() [3/12]

MissingETComponentMap::const_iterator MissingETComposition::find ( const MissingETComponentMap pMap,
const IParticle pPart 
)
static

Find non-modifiable contribution for given particle.

Returns
Const iterator pointing to non-modifiable MissingETComponent object linked to given object (particle) with a given status if found, else return end (const) iterator. The first occurance with a given status is returned.
Parameters
[in]pPartpointer to non-modifiable object possibly contributing to a given MET object.

Definition at line 100 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

101  {
102  if ( pMap == nullptr ) { return MissingETComponentMap::const_iterator(); }
103  // linear search - FIXME: method find(const IParticle*) in MissingETComponentMap ??
104  MissingETComponentMap::const_iterator fCont(pMap->begin());
105  MissingETComponentMap::const_iterator lCont(pMap->end());
106  bool found(false);
107  while ( fCont != lCont && !found ) { found = (*fCont)->findIndex(pPart) != MissingETBase::Numerical::invalidIndex(); if ( !found ) { ++fCont; } }
108  return fCont;
109  }

◆ find() [4/12]

MissingETComponentMap::const_iterator MissingETComposition::find ( const MissingETComponentMap pMap,
const MissingET pmetObj 
)
static

Find non-modifiable contribution for a given MET object.

Returns
Const iterator pointing to a non-modifiable MissingETComponent object linked to given object (particle) if found, else return end (const) iterator. The first occurance is returned, independent of the status of the contribution.
Parameters
[in]pmetObjpointer to valid MissingET object.
Note
This method performs a linear search with at most N iterations (N is the number of contributions in the composition map).

Definition at line 82 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

83  { return pMap != nullptr ? pMap->find(pMET) : MissingETComponentMap::const_iterator(); }

◆ find() [5/12]

MissingETComponentMap::const_iterator MissingETComposition::find ( const MissingETComponentMap pMap,
const std::string &  metName 
)
static

Definition at line 88 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

89  { return pMap !=nullptr ? pMap->find(metName) : MissingETComponentMap::const_iterator(); }

◆ find() [6/12]

Definition at line 94 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

95  { return pMap !=nullptr ? pMap->find(src) : MissingETComponentMap::const_iterator(); }

◆ find() [7/12]

MissingETAssociationMap::iterator MissingETComposition::find ( MissingETAssociationMap pMap,
const IParticle pPart 
)
static

Find modifiable contribution for given particle.

Returns
Iterator pointing to non-modifiable MissingETAssociation object linked to given object (particle) if found, else return end iterator. The first occurance is returned, independent of the status of the contribution.
Parameters
[in]pPartpointer to non-modifiable object possibly contributing to a given MET object.

Definition at line 350 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

351  {
352  if ( pMap == nullptr ) { return MissingETAssociationMap::iterator(); }
353  // linear search - FIXME: method find(const IParticle*) in MissingETAssociationMap ??
354  MissingETAssociationMap::iterator fAssoc(pMap->begin());
355  MissingETAssociationMap::iterator lAssoc(pMap->end());
356  bool found(false);
357  while ( fAssoc != lAssoc && !found ) { found = (*fAssoc)->findIndex(pPart) != MissingETBase::Numerical::invalidIndex(); if ( !found ) { ++fAssoc; } }
358  return fAssoc;
359  }

◆ find() [8/12]

MissingETAssociationMap::iterator MissingETComposition::find ( MissingETAssociationMap pMap,
const Jet pJet 
)
static

Definition at line 336 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

337  { return pMap != nullptr ? pMap->find(pJet) : MissingETAssociationMap::iterator(); }

◆ find() [9/12]

MissingETComponentMap::iterator MissingETComposition::find ( MissingETComponentMap pMap,
const IParticle pPart 
)
static

Find modifiable contribution for given particle.

Returns
Iterator pointing to non-modifiable MissingETComponent object linked to given object (particle) if found, else return end iterator. The first occurance is returned, independent of the status of the contribution.
Parameters
[in]pPartpointer to non-modifiable object possibly contributing to a given MET object.

Definition at line 111 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

112  {
113  if ( pMap == nullptr ) { return MissingETComponentMap::iterator(); }
114  // linear search - FIXME: method find(const IParticle*) in MissingETComponentMap ??
115  MissingETComponentMap::iterator fCont(pMap->begin());
116  MissingETComponentMap::iterator lCont(pMap->end());
117  bool found(false);
118  while ( fCont != lCont && !found ) { found = (*fCont)->findIndex(pPart) != MissingETBase::Numerical::invalidIndex(); if ( !found ) { ++fCont; } }
119  return fCont;
120  }

◆ find() [10/12]

MissingETComponentMap::iterator MissingETComposition::find ( MissingETComponentMap pMap,
const MissingET pmetObj 
)
static

Definition at line 85 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

86  { return pMap != nullptr ? pMap->find(pMET) : MissingETComponentMap::iterator(); }

◆ find() [11/12]

MissingETComponentMap::iterator MissingETComposition::find ( MissingETComponentMap pMap,
const std::string &  metName 
)
static

Definition at line 91 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

92  { return pMap !=nullptr ? pMap->find(metName) : MissingETComponentMap::iterator(); }

◆ find() [12/12]

MissingETComponentMap::iterator MissingETComposition::find ( MissingETComponentMap pMap,
MissingETBase::Types::bitmask_t  src 
)
static

Definition at line 97 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

98  { return pMap !=nullptr ? pMap->find(src) : MissingETComponentMap::iterator(); }

◆ findIndex() [1/3]

static size_t xAOD::MissingETComposition::findIndex ( const MissingETComponentMap pMap,
const MissingET pmetObj 
)
static

◆ findIndex() [2/3]

static size_t xAOD::MissingETComposition::findIndex ( const MissingETComponentMap pMap,
const std::string &  metName 
)
static

◆ findIndex() [3/3]

static size_t xAOD::MissingETComposition::findIndex ( const MissingETComponentMap pMap,
MissingETBase::Types::bitmask_t  src 
)
static

◆ getAssociation() [1/2]

const MissingETAssociation * MissingETComposition::getAssociation ( const MissingETAssociationMap pMap,
const Jet pJet 
)
static

Definition at line 415 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

416  { MissingETAssociationMap::const_iterator fAssoc(find(pMap,pJet)); return fAssoc != pMap->end() ? *fAssoc : (const MissingETAssociation*)nullptr; }

◆ getAssociation() [2/2]

MissingETAssociation * MissingETComposition::getAssociation ( MissingETAssociationMap pMap,
const Jet pJet 
)
static

Definition at line 418 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

419  { MissingETAssociationMap::iterator fAssoc(find(pMap,pJet)); return fAssoc != pMap->end() ? *fAssoc : (MissingETAssociation*)nullptr; }

◆ getAssociations() [1/2]

std::vector< const MissingETAssociation * > MissingETComposition::getAssociations ( const MissingETAssociationMap pMap,
const IParticle pPart 
)
static

Access non-modifiable contribution object.

Returns
Pointer to non-modifiable MissingETAssociation object if contribution of referenced object (particle) found, else NULL.
Parameters
[in]pPartpointer to non-modifiable object possibly contributing to a given MET object.

Definition at line 391 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

392  {
393  std::vector<const MissingETAssociation*> assocs;
394  if ( pMap == nullptr ) { return assocs; }
395  else {
396  for (const auto fAssoc : *pMap) {
397  if (fAssoc->findIndex(pPart) != MissingETBase::Numerical::invalidIndex()) assocs.push_back(fAssoc);
398  }
399  }
400  return assocs;
401  }

◆ getAssociations() [2/2]

std::vector< MissingETAssociation * > MissingETComposition::getAssociations ( MissingETAssociationMap pMap,
const IParticle pPart 
)
static

Access non-modifiable contribution object.

Returns
Pointer to modifiable MissingETAssociation object if contribution of referenced object (particle) found, else NULL.

Definition at line 403 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

404  {
405  std::vector<MissingETAssociation*> assocs;
406  if ( pMap == nullptr ) { return assocs; }
407  else {
408  for (const auto fAssoc : *pMap) {
409  if (fAssoc->findIndex(pPart) != MissingETBase::Numerical::invalidIndex()) assocs.push_back(fAssoc);
410  }
411  }
412  return assocs;
413  }

◆ getComponent() [1/8]

const MissingETComponent * MissingETComposition::getComponent ( const MissingETComponentMap pMap,
const IParticle pPart 
)
static

Access non-modifiable contribution object.

Returns
Pointer to non-modifiable MissingETComponent object if contribution of referenced object (particle) found, else NULL.
Parameters
[in]pPartpointer to non-modifiable object possibly contributing to a given MET object.

Definition at line 122 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

123  {
124  if ( pMap == nullptr ) { return (const MissingETComponent*)nullptr; }
125  else { MissingETComponentMap::const_iterator fCont(find(pMap,pPart)); return fCont != pMap->end() ? *fCont : (const MissingETComponent*)nullptr; }
126  }

◆ getComponent() [2/8]

const MissingETComponent * MissingETComposition::getComponent ( const MissingETComponentMap pMap,
const MissingET pmetObj 
)
static

Definition at line 134 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

135  { MissingETComponentMap::const_iterator fCont(find(pMap,pMET)); return fCont != pMap->end() ? *fCont : (const MissingETComponent*)nullptr; }

◆ getComponent() [3/8]

const MissingETComponent * MissingETComposition::getComponent ( const MissingETComponentMap pMap,
const std::string &  metName 
)
static

Definition at line 140 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

141  { MissingETComponentMap::const_iterator fCont(find(pMap,metName)); return fCont != pMap->end() ? *fCont : (const MissingETComponent*)nullptr; }

◆ getComponent() [4/8]

const MissingETComponent * MissingETComposition::getComponent ( const MissingETComponentMap pMap,
MissingETBase::Types::bitmask_t  src 
)
static

Definition at line 146 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

147  { MissingETComponentMap::const_iterator fCont(find(pMap,sw)); return fCont != pMap->end() ? *fCont : (const MissingETComponent*)nullptr; }

◆ getComponent() [5/8]

MissingETComponent * MissingETComposition::getComponent ( MissingETComponentMap pMap,
const IParticle pPart 
)
static

Access non-modifiable contribution object.

Returns
Pointer to modifiable MissingETComponent object if contribution of referenced object (particle) found, else NULL.

Definition at line 128 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

129  {
130  if ( pMap == nullptr ) { return (MissingETComponent*)nullptr; }
131  else { MissingETComponentMap::iterator fCont(find(pMap,pPart)); return fCont != pMap->end() ? *fCont : (MissingETComponent*)nullptr; }
132  }

◆ getComponent() [6/8]

MissingETComponent * MissingETComposition::getComponent ( MissingETComponentMap pMap,
const MissingET pmetObj 
)
static

Definition at line 137 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

138  { MissingETComponentMap::iterator fCont(find(pMap,pMET)); return fCont != pMap->end() ? *fCont : (MissingETComponent*)nullptr; }

◆ getComponent() [7/8]

MissingETComponent * MissingETComposition::getComponent ( MissingETComponentMap pMap,
const std::string &  metName 
)
static

Definition at line 143 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

144  { MissingETComponentMap::iterator fCont(find(pMap,metName)); return fCont != pMap->end() ? *fCont : (MissingETComponent*)nullptr; }

◆ getComponent() [8/8]

MissingETComponent * MissingETComposition::getComponent ( MissingETComponentMap pMap,
MissingETBase::Types::bitmask_t  src 
)
static

Definition at line 149 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

150  { MissingETComponentMap::iterator fCont(find(pMap,sw)); return fCont != pMap->end() ? *fCont : (MissingETComponent*)nullptr; }

◆ getConstVec()

MissingETBase::Types::constvec_t MissingETComposition::getConstVec ( const MissingETAssociationMap pMap,
const IParticle pPart,
MissingETBase::UsageHandler::Policy  p 
)
static

Definition at line 361 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

362  {
364  std::vector<const MissingETAssociation*> assocs = getAssociations(pMap,pPart);
365  for (size_t i = 0; i < assocs.size(); i++) {
367  totalvec += assocs[i]->trkVec(pPart);
368  } else {
369  totalvec += assocs[i]->calVec(pPart);
370  }
371  }
372  return totalvec;
373  }

◆ getMissingET() [1/4]

const MissingET * MissingETComposition::getMissingET ( const MissingETComponentMap pMap,
const IParticle pPart 
)
static

Definition at line 170 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

171  { return getMissingET(find(pMap,pPart)); }

◆ getMissingET() [2/4]

const MissingET * MissingETComposition::getMissingET ( const MissingETComponentMap pMap,
const std::string &  name 
)
static

Definition at line 176 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

177  { return getMissingET(find(pMap,name)); }

◆ getMissingET() [3/4]

const MissingET * MissingETComposition::getMissingET ( const MissingETComponentMap pMap,
MissingETBase::Types::bitmask_t  sw 
)
static

Definition at line 179 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

180  { return getMissingET(find(pMap,sw)); }

◆ getMissingET() [4/4]

const MissingET * MissingETComposition::getMissingET ( MissingETComponentMap::const_iterator  fCont)
static

Definition at line 173 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

174  { return *fCont != nullptr ? (*fCont)->metObject() : (const MissingET*)nullptr; }

◆ getRefJet() [1/2]

const Jet * MissingETComposition::getRefJet ( const MissingETAssociationMap pMap,
const IParticle pPart 
)
static

Definition at line 425 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

426  {
427  MissingETAssociationMap::const_iterator fAssoc = find(pMap,pPart);
428  return fAssoc==pMap->end() ? nullptr : getRefJet(fAssoc);
429  }

◆ getRefJet() [2/2]

const Jet * MissingETComposition::getRefJet ( MissingETAssociationMap::const_iterator  fCont)
static

Definition at line 431 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

432  { return *fAssoc != nullptr ? (*fAssoc)->refJet() : (const Jet*) nullptr; }

◆ getStatusWord() [1/2]

MissingETBase::Types::bitmask_t MissingETComposition::getStatusWord ( const MissingETComponentMap pMap,
const MissingET pmetObj 
)
static

Definition at line 163 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

164  { MissingETComponentMap::const_iterator fCont(find(pMap,pmetObj)); return fCont == pMap->end() ? MissingETBase::Status::clearedStatus() : (*fCont)->statusWord(); }

◆ getStatusWord() [2/2]

MissingETBase::Types::bitmask_t MissingETComposition::getStatusWord ( MissingETComponentMap::const_iterator  fCont)
static

Definition at line 166 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

167  { return *fCont != nullptr ? (*fCont)->statusWord() : MissingETBase::Status::clearedStatus(); }

◆ getWeight() [1/2]

MissingETBase::Types::weight_t MissingETComposition::getWeight ( const MissingETComponentMap pMap,
const IParticle pPart 
)
static

Definition at line 155 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

157  { MissingETComponentMap::const_iterator fCont(find(pMap,pPart)); return fCont == pMap->end() ? MissingETBase::Types::weight_t(0.,0.,0.) : (*fCont)->weight(pPart); }

◆ getWeight() [2/2]

MissingETBase::Types::weight_t MissingETComposition::getWeight ( MissingETComponentMap::const_iterator  fCont,
const IParticle pPart 
)
static

Definition at line 159 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

160  { return *fCont != nullptr ? (*fCont)->weight(pPart) : MissingETBase::Types::weight_t(0.,0.,0.); }

◆ insert() [1/7]

bool MissingETComposition::insert ( MissingETAssociationMap pMap,
const IParticle pPart,
const std::vector< const IParticle * > &  constlist,
std::map< const IParticle *, MissingETBase::Types::constvec_t pOverride = std::map<const IParticle*,MissingETBase::Types::constvec_t>() 
)
static

Insert contributing object, finding the appropriate association automatically.

Returns
true if insertion successful according to the rules lined out here
Parameters
[in]pPartgeneric pointer to non-modifiable physics or signal object contributing to the MET object
[in]constListreference to non-modifiable list of (base type) pointers to signals associated with the given physics object

Definition at line 266 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

268  {
269  // input check
270  if ( pMap == nullptr )
271  { printf("MissingETComposition::insert - ERROR - possible invalid pointer values: MissingETAssociationMap* = %p\n",(void*)pMap); return false; }
272 
273  // loop over constituents and try to identify an appropriate association
274  // FIXME: check in case more than one appropriate index found?
275  std::map<size_t,std::vector<const IParticle*> > constMap;
276  for(const auto& signal : constlist) {
277  size_t jetIndex = pMap->findIndexByJetConst(signal);
278  // printf("Constituent type %i, jetIndex %lu\n",signal->type(),jetIndex);
279  constMap[jetIndex].push_back(signal);
280  }
281  std::map<size_t,std::vector<const IParticle*> >::iterator jetIter;
282  for(auto& jetIter : constMap) {
283  if(jetIter.first!=MissingETBase::Numerical::invalidIndex()) {
284  insert(pMap,jetIter.first,pPart,jetIter.second);
285  // printf("Associated object (type %d, pt %f) with jet %lu\n",pPart->type(),pPart->pt(),jetIter.first);
286  (*pMap)[jetIter.first]->addOverrideMom(pOverride);
287  } else {
288  insertMisc(pMap,pPart,jetIter.second);
289  pMap->getMiscAssociation()->addOverrideMom(pOverride);
290  }
291  }
292  if (constMap.empty()) insertMisc(pMap,pPart,std::vector<const IParticle*>());
293  return true;
294  }

◆ insert() [2/7]

bool MissingETComposition::insert ( MissingETAssociationMap pMap,
const Jet pJet,
const IParticle pPart,
const std::vector< const IParticle * > &  constlist 
)
static

Insert contributing object to jet referenced by pointer, with constVecs for track and calo constituents.

Returns
true if insertion successful according to the rules lined out here
Parameters
[in]pJetnon-modifiable pointer to the reference jet
[in]pPartgeneric pointer to non-modifiable physics or signal object contributing to the MET object
[in]constListreference to non-modifiable list of (base type) pointers to signals associated with the given physics object

Definition at line 253 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

254  {
255  // input check
256  if ( pMap == nullptr || pJet == nullptr )
257  { printf("MissingETComposition::insert - ERROR - possible invalid pointer values: MissingETAssociationMap* = %p, Jet* = %p\n",(void*)pMap,(void*)pJet); return false; }
258  // check if jet already in map
259  size_t jetIndex(pMap->findIndex(pJet));
261  { printf("MissingETComposition::insert - WARNING - jet with pointer %p not in map, could not add\n",(void*)pJet); return false; }
262 
263  return insert(pMap,jetIndex,pPart,constlist);
264  }

◆ insert() [3/7]

bool MissingETComposition::insert ( MissingETAssociationMap pMap,
size_t  jetIndex,
const IParticle pPart,
const std::vector< const IParticle * > &  constlist 
)
static

Insert contributing object to jet referenced by index, with constVecs for track and calo constituents.

Returns
true if insertion successful according to the rules lined out here
Parameters
[in]pJetnon-modifiable pointer to the reference jet
[in]pPartgeneric pointer to non-modifiable physics or signal object contributing to the MET object
[in]constListreference to non-modifiable list of (base type) pointers to signals associated with the given physics object

Definition at line 237 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

238  {
239  // input check
240  if ( pMap == nullptr )
241  { printf("MissingETComposition::insert - ERROR - possible invalid pointer value: MissingETAssociationMap* = %p\n",(void*)pMap); return false; }
242  // check if MET object already in map
243 
244  // printf("MissingETComposition::insert - INFO - associated to jet %lu\n",jetIndex);
245 
246  if ( jetIndex==MissingETBase::Numerical::invalidIndex() || jetIndex>=pMap->size())
247  { printf("MissingETComposition::insert - WARNING - no MissingETAssociation matching this jet, could not add\n"); return false; }
248 
249  (*pMap)[jetIndex]->addObject(pPart,constlist);
250  return true;
251  }

◆ insert() [4/7]

bool MissingETComposition::insert ( MissingETComponentMap pMap,
const MissingET pMET,
const IParticle pPart,
const MissingETBase::Types::object_vector_t signalList,
double  wpx,
double  wpy,
double  wet,
MissingETBase::UsageHandler::Policy  p = MissingETBase::UsageHandler::OnlyCluster 
)
static

Insert MET object and contributing object by pointers, with list of signals and individual weight components.

Returns
true if insertion successful according to the rules lined out here
Parameters
[in]pMETpointer to non-modifiable MET object
[in]pPartgeneric pointer to non-modifiable physics or signal object contributing to the MET object
[in]wpxkinematic weight \( w_{x} \)
[in]wpykinematic weight \( w_{y} \)
[in]wetkinematic weight \( w_{\rm T} \)
[in]signalListreference to non-modifiable list of (base type) pointers to signals associated with the given physics or signal object
[in]psignal type indicator (optional, default is MissingETBase:UsageHandler::OnlyCluster)

Definition at line 63 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

65  {
66  bool flag(insert(pMap,pMET,pPart,wpx,wpy,wet));
67  if ( flag && !signalList.empty() ) { flag = pMap->addObjects(pMET,pPart,signalList,p); }
68  return flag;
69  }

◆ insert() [5/7]

Insert MET object and contributing object by pointers, with list of signals and optional kinematic weight object.

Returns
true if insertion successful according to the rules lined out here
Parameters
[in]pMETpointer to non-modifiable MET object
[in]pPartgeneric pointer to non-modifiable physics or signal object contributing to the MET object
[in]weightkinematic weights of the contribution (optional, for default see MissingETComponent::Weight::Weight() constructor)
[in]signalListreference to non-modifiable list of (base type) pointers to signals associated with the given physics or signal object
[in]psignal type indicator (optional, default is MissingETBase:UsageHandler::OnlyCluster)

Definition at line 59 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

61  { return insert(pMap,pMET,pPart,signalList,weight.wpx(),weight.wpy(),weight.wet(),p); }

◆ insert() [6/7]

bool MissingETComposition::insert ( MissingETComponentMap pMap,
const MissingET pMET,
const IParticle pPart,
double  wpx,
double  wpy,
double  wet 
)
static

Insert MET object and contributing object by pointers, with individual weights.

Returns
true if insertion successful according to the rules lined out here
Parameters
[in]pMETpointer to non-modifiable MET object
[in]pPartgeneric pointer to non-modifiable physics or signal object contributing to the MET object
[in]wpxkinematic weight \( w_{x} \)
[in]wpykinematic weight \( w_{y} \)
[in]wetkinematic weight \( w_{\rm T} \)

Definition at line 45 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

46  {
47  // input check
48  if ( pMap == nullptr || pMET == nullptr )
49  { printf("MissingETComposition::insert - ERROR - possible invalid pointer values: MissingETComponentMap* = %p, MissingET* = %p\n",(void*)pMap,(void*)pMET); return false; }
50  // check if MET object already in map
51  MissingETComponentMap::iterator fMap(pMap->find(pMET));
52  if ( fMap == pMap->end() )
53  { printf("MissingETComposition::insert - ERROR - referenced MissingET object \042%%%s\042 not yet in map, add first!\n",pMET->name().c_str()); return false; }
54 
55  (*fMap)->addObject(pPart,wpx,wpy,wet);
56  return true;
57  }

◆ insert() [7/7]

bool MissingETComposition::insert ( MissingETComponentMap pMap,
const MissingET pMET,
const IParticle pPart,
MissingETBase::Types::weight_t  weight = MissingETBase::Types::weight_t() 
)
static

Insert contributing signal or physics object by pointer, with optional kinematic weight object.

Returns
true if insertion successful according to the rules lined out here
Parameters
[in]pMETpointer to non-modifiable MET object
[in]pPartgeneric pointer to non-modifiable physics or signal object contributing to the MET object
[in]weightkinematic weights of the contribution (optional, for default see MissingETComponent::Weight::Weight() constructor)

Definition at line 42 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

43  { return insert(pMap,pMET,pPart,weight.wpx(),weight.wpy(),weight.wet()); }

◆ insertMisc()

bool MissingETComposition::insertMisc ( MissingETAssociationMap pMap,
const IParticle pPart,
const std::vector< const IParticle * > &  constlist 
)
static

Insert contributing object into miscellaneous association.

Returns
true if insertion successful according to the rules lined out here
Parameters
[in]pPartgeneric pointer to non-modifiable physics or signal object contributing to the MET object
[in]constListreference to non-modifiable list of (base type) pointers to signals associated with the given physics object

Definition at line 312 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

313  {
314  // input check
315  if ( pMap == nullptr )
316  { printf("MissingETComposition::insertMisc - ERROR - possible invalid pointer values: MissingETAssociationMap* = %p\n",(void*)pMap); return false; }
317 
318  size_t jetIndex(MissingETBase::Numerical::invalidIndex());
319  // loop over constituents and make sure these don't belong to some other association
320  // printf("Associated object (type %d, pt %f) with no jet\n",pPart->type(),pPart->pt());
321  for(const auto& signal : constlist) {
322  // printf("MissingETComposition::insertMisc - INFO - constituent pt %f\n", signal->pt());
323  jetIndex = pMap->findIndexByJetConst(signal);
325  printf("MissingETComposition::insertMisc - ERROR - object %p with constituent %p is associated to jet %zu, will not place in misc association\n",(void*)pPart,(void*)signal,jetIndex); return false;
326  }
327  }
328  pMap->getMiscAssociation()->addObject(pPart,constlist);
329 
330  return true;
331  }

◆ objSelected()

bool MissingETComposition::objSelected ( const MissingETAssociationHelper helper,
const IParticle obj 
)
static

Definition at line 375 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

375  {
376  std::vector<const MissingETAssociation*> assocs = getAssociations(helper.map(),obj);
377  for(size_t i = 0; i < assocs.size(); i++) if(helper.objSelected(assocs[i],obj)) return true;
378  return false;
379  }

◆ selectIfNoOverlaps()

bool MissingETComposition::selectIfNoOverlaps ( MissingETAssociationHelper helper,
const IParticle obj,
MissingETBase::UsageHandler::Policy  p 
)
static

Definition at line 382 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

382  {
383  std::vector<const MissingETAssociation*> assocs = getAssociations(helper.map(),obj);
384  bool overlaps(false);
385  for(size_t i = 0; i < assocs.size(); i++) overlaps |= assocs[i]->hasOverlaps(helper,obj,p);
386  if (overlaps) return false;
387  for(size_t i = 0; i < assocs.size(); i++) helper.setObjSelectionFlag(assocs[i],obj,true);
388  return true;
389  }

◆ setJetConstSum()

bool MissingETComposition::setJetConstSum ( MissingETAssociationMap metMap,
const Jet jet,
const std::vector< const IParticle * > &  altConsts,
std::map< const IParticle *, MissingETBase::Types::constvec_t pOverride 
)
static

Definition at line 296 of file Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx.

297  {
298  std::vector<ElementLink<IParticleContainer> > jetconst;
299  if(!altConsts.empty()) {
300  for(const auto& alt : altConsts) {
301  const IParticleContainer* pCont = static_cast<const IParticleContainer*>(alt->container());
302  ElementLink<IParticleContainer> link(*pCont,alt->index());
303  jetconst.push_back(link);
304  }
305  }
306  metMap->setJetConstituents(jetconst,jet);
307  if (!altConsts.empty()) insert(metMap,jet,altConsts,std::move(pOverride));
308  else insert(metMap,jet,jet,altConsts);
309  return true;
310  }

The documentation for this struct was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
xAOD::MissingETComponentMap_v1
Definition: MissingETComponentMap_v1.h:25
xAOD::name
name
Definition: TriggerMenuJson_v1.cxx:29
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
DataVector< MissingETAssociation_v1 >::iterator
DataModel_detail::iterator< DataVector > iterator
Standard iterator.
Definition: DataVector.h:841
Jet
Basic data class defines behavior for all Jet objects The Jet class is the principal data class for...
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:47
DataVector< MissingETComponent_v1 >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition: DataVector.h:837
Cut::signal
@ signal
Definition: SUSYToolsAlg.cxx:64
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
xAOD::MissingETComposition::find
static MissingETComponentMap::const_iterator find(const MissingETComponentMap *pMap, const MissingET *pmetObj)
Find non-modifiable contribution for a given MET object.
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:82
MissingETBase::Source::electron
static Types::bitmask_t electron(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed electrons.
Definition: MissingETBase.h:229
MissingETBase::Numerical::invalidIndex
static size_t invalidIndex()
Access invalid index indicator.
Definition: MissingETBase.h:103
MissingETBase::Types::weight_vector_t
std::vector< weight_t > weight_vector_t
Vector type for kinematic weight containers.
Definition: MissingETComponent_v1.h:265
xAOD::MissingETAssociation
MissingETAssociation_v1 MissingETAssociation
Version control by type definition.
Definition: MissingETAssociation.h:15
xAOD::MissingET_v1::setSource
void setSource(MissingETBase::Types::bitmask_t src)
Set the source of the MET object.
xAOD::MissingETAssociation_v1::ConstVec
Vector sum of constituents for subtractive overlap removal.
Definition: MissingETAssociation_v1.h:36
xAOD::MissingETComposition::getRefJet
static const Jet * getRefJet(const MissingETAssociationMap *pMap, const IParticle *pPart)
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:425
MissingETBase::Types::weight_t
xAOD::MissingETComponent_v1::Weight weight_t
Type for kinematic weight.
Definition: MissingETComponent_v1.h:264
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
covarianceTool.filter
filter
Definition: covarianceTool.py:514
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
xAOD::MissingET_v1::setName
void setName(const std::string &name)
Set the name of the MET object.
xAOD::MissingETComposition::insert
static bool insert(MissingETComponentMap *pMap, const MissingET *pMET, const IParticle *pPart, MissingETBase::Types::weight_t weight=MissingETBase::Types::weight_t())
Insert contributing signal or physics object by pointer, with optional kinematic weight object.
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:42
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:92
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
master.flag
bool flag
Definition: master.py:29
checkFileSG.objs
list objs
Definition: checkFileSG.py:93
xAOD::MissingET_v1
Principal data object for Missing ET.
Definition: MissingET_v1.h:25
xAOD::MissingETComposition::getMissingET
static const MissingET * getMissingET(const MissingETComponentMap *pMap, const IParticle *pPart)
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:170
xAOD::MissingET_v1::name
const std::string & name() const
Identifier getters.
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
xAOD::MissingETComposition::insertMisc
static bool insertMisc(MissingETAssociationMap *pMap, const IParticle *pPart, const std::vector< const IParticle * > &constlist)
Insert contributing object into miscellaneous association.
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:312
MissingETBase::UsageHandler::OnlyTrack
@ OnlyTrack
Track based only.
Definition: MissingETCompositionBase.h:185
xAOD::MissingETComposition::add
static bool add(MissingETComponentMap *pMap, const MissingET *pMET, MissingETBase::Types::bitmask_t sw=MissingETBase::Status::clearedStatus())
Adding a MissingET object to the map.
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:29
MissingET::add
virtual void add(double theEx, double theEy, double theEt, double theEta, double weight)
Definition: MissingET.cxx:127
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MissingET
Definition: Reconstruction/MissingETEvent/MissingETEvent/MissingET.h:23
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
beamspotPlotBcids.statusWord
statusWord
Definition: beamspotPlotBcids.py:495
MissingET::sumet
virtual double sumet() const
Definition: MissingET.cxx:149
xAOD::MissingETComponent
MissingETComponent_v1 MissingETComponent
Version control by type definition.
Definition: MissingETComponent.h:15
python.PyAthena.obj
obj
Definition: PyAthena.py:135
MissingETBase::Status::clearedStatus
static Types::bitmask_t clearedStatus()
Cleared term tag accessor.
Definition: MissingETCompositionBase.h:115
MissingETBase::Types::object_vector_t
std::vector< const xAOD::IParticle * > object_vector_t
Vector of object type.
Definition: MissingETCompositionBase.h:59
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
xAOD::MissingETComposition::getAssociations
static std::vector< const MissingETAssociation * > getAssociations(const MissingETAssociationMap *pMap, const IParticle *pPart)
Access non-modifiable contribution object.
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:391