#include <IParticleExtractor.h>
Definition at line 18 of file IParticleExtractor.h.
◆ IParticleExtractor()
| IParticleExtractor::IParticleExtractor |
( |
const xAOD::IParticleContainer * | ips, |
|
|
const std::string & | label = "", |
|
|
bool | isGhost = false, |
|
|
bool | isTrigger = false ) |
Definition at line 13 of file IParticleExtractor.cxx.
16 :
20{
21}
const xAOD::IParticleContainer * m_iParticles
std::string label(const std::string &format, int i)
◆ ~IParticleExtractor()
| IParticleExtractor::~IParticleExtractor |
( |
| ) |
|
|
virtualdefault |
◆ addToJet()
| void IParticleExtractor::addToJet |
( |
xAOD::Jet & | jet, |
|
|
const std::vector< int > & | indices ) const |
|
overridevirtual |
Implements IConstituentExtractor.
Definition at line 36 of file IParticleExtractor.cxx.
37 {
38
39
40 std::vector<const xAOD::IParticle*> constituents;
41 constituents.reserve(
indices.size());
42 for(auto i : indices){
45 } else {
47 }
48 }
49
51
52
53 double ptSum = std::accumulate(constituents.begin(),
54 constituents.end(),
55 0.0,
56 [](double sumPt, const xAOD::IParticle* p){
57 return sumPt + p->pt();});
58
62 } else {
63
64 for(const auto *c: constituents) {
66 }
67 }
68}
void setAttribute(const std::string &name, const T &v)
void addConstituent(const ElementLink< IParticleContainer > &link, float weight=1.0)
Add a constituent directly in the ElementLink format.
void setAssociatedObjects(const std::string &name, const std::vector< const T * > &vec)
set associated objects from a vector of arbitrary object.
std::pair< long int, long int > indices
◆ checkIntegrity()
| bool IParticleExtractor::checkIntegrity |
( |
| ) |
const |
|
overridevirtual |
◆ clone()
◆ ghostClone()
◆ toString()
| std::string IParticleExtractor::toString |
( |
int | level | ) |
const |
|
overridevirtual |
Implements IConstituentExtractor.
Definition at line 72 of file IParticleExtractor.cxx.
72 {
73 std::ostringstream oss{"", std::ios::ate};
74 oss <<
"IParticleExtractor dump level (" <<
level <<
")"
76 <<
" isGhost: " << std::boolalpha <<
m_isGhost
79
80 if (level > 0){
81
82 oss << "\n IParticle energies\n";
83 std::vector<float> energies;
87 std::back_inserter(energies),
88 [](const xAOD::IParticle* p){return p->e();});
89
92
93 std::vector<const xAOD::IParticle*> adds(
m_iParticles->begin(),
95 oss << "\n IParticle addresses\n"
97 << '\n';
98 }
99 return oss.str();
100}
◆ m_debug
| bool IParticleExtractor::m_debug {false} |
|
private |
◆ m_iParticles
◆ m_isGhost
| bool IParticleExtractor::m_isGhost |
|
private |
◆ m_isTrigger
| bool IParticleExtractor::m_isTrigger {false} |
|
private |
◆ m_label
| std::string IParticleExtractor::m_label |
|
private |
The documentation for this class was generated from the following files: