ATLAS Offline Software
Public Member Functions | Private Types | Private Attributes | List of all members
ParticleJetTools::IParticleLinker Class Reference

#include <ParticleJetLabelCommon.h>

Collaboration diagram for ParticleJetTools::IParticleLinker:

Public Member Functions

 IParticleLinker (const SG::ReadHandleKey< xAOD::TruthParticleContainer > &, const std::string &linkName)
 
void decorate (const xAOD::Jet &, const std::vector< const xAOD::TruthParticle * > &) const
 

Private Types

using IPLV = std::vector< ElementLink< xAOD::IParticleContainer > >
 

Private Attributes

SG::AuxElement::Decorator< IPLVm_dec
 

Detailed Description

Definition at line 58 of file ParticleJetLabelCommon.h.

Member Typedef Documentation

◆ IPLV

Definition at line 65 of file ParticleJetLabelCommon.h.

Constructor & Destructor Documentation

◆ IParticleLinker()

ParticleJetTools::IParticleLinker::IParticleLinker ( const SG::ReadHandleKey< xAOD::TruthParticleContainer > &  ,
const std::string &  linkName 
)

Definition at line 137 of file ParticleJetLabelCommon.cxx.

139  :
140  m_dec(linkname)
141  {
142  }

Member Function Documentation

◆ decorate()

void ParticleJetTools::IParticleLinker::decorate ( const xAOD::Jet jet,
const std::vector< const xAOD::TruthParticle * > &  ipv 
) const

Definition at line 143 of file ParticleJetLabelCommon.cxx.

146  {
147  IPLV links;
148  for (const xAOD::TruthParticle* ip: ipv) {
149  // I copied this whole song and dance from setAssociatedObjects
150  // in the jet edm. It would be much easier if we could store the
151  // container hash in this object and use ElementLink(sgkey,
152  // index) but that seems to break in AnalysisBase
153  IPLV::value_type link;
154  const auto* ipc = dynamic_cast<const xAOD::IParticleContainer*>(
155  ip->container());
156  link.toIndexedElement(*ipc, ip->index());
157  links.push_back(link);
158  }
159  m_dec(jet) = links;
160  }

Member Data Documentation

◆ m_dec

SG::AuxElement::Decorator<IPLV> ParticleJetTools::IParticleLinker::m_dec
private

Definition at line 66 of file ParticleJetLabelCommon.h.


The documentation for this class was generated from the following files:
ParticleJetTools::IParticleLinker::m_dec
SG::AuxElement::Decorator< IPLV > m_dec
Definition: ParticleJetLabelCommon.h:66
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
DMTest::links
links
Definition: CLinks_v1.cxx:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ParticleJetTools::IParticleLinker::IPLV
std::vector< ElementLink< xAOD::IParticleContainer > > IPLV
Definition: ParticleJetLabelCommon.h:65