ATLAS Offline Software
Loading...
Searching...
No Matches
MissingETAssociation_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
9#include "xAODPFlow/PFO.h"
11#include "xAODPFlow/FEHelpers.h"
12
13
14using namespace MissingETBase::Types;
15using std::vector;
16
17namespace xAOD {
18
19 // Static accessors
25
31
32 const SG::AuxElement::Accessor<float> MissingETAssociation_v1::m_acc_jettrkpx("jettrkpx");
33 const SG::AuxElement::Accessor<float> MissingETAssociation_v1::m_acc_jettrkpy("jettrkpy");
34 const SG::AuxElement::Accessor<float> MissingETAssociation_v1::m_acc_jettrkpz("jettrkpz");
35 const SG::AuxElement::Accessor<float> MissingETAssociation_v1::m_acc_jettrke("jettrke");
36 const SG::AuxElement::Accessor<float> MissingETAssociation_v1::m_acc_jettrksumpt("jettrksumpt");
37
39 {
40 if(objIndex==MissingETBase::Numerical::invalidIndex()) return 0;
41 return 1<<objIndex;
42 }
43
45 // MissingETAssociation_v1::ConstVec Implementations //
47
49 {
50 this->cpx() += cvec.cpx(); this->cpy() += cvec.cpy(); this->cpz() += cvec.cpz(); this->ce() += cvec.ce();
51 this->sumpt() += cvec.sumpt();
52 return *this;
53 }
54
56 {
57 this->cpx() -= cvec.cpx(); this->cpy() -= cvec.cpy(); this->cpz() -= cvec.cpz(); this->ce() -= cvec.ce();
58 this->sumpt() -= cvec.sumpt();
59 return *this;
60 }
61
63 {
64 this->cpx() *= scale; this->cpy() *= scale; this->cpz() *= scale; this->ce() *= scale;
65 this->sumpt() *= scale;
66 return *this;
67 }
68
70 {
71 if ( scale <1e-9 ) { this->cpx() = 0.; this->cpy() = 0.; this->cpz() = 0.; this->ce() = 0.; this->sumpt() = 0.; return *this; }
72 else { return this->operator*=(1./scale); }
73 }
74
76 {
77 return
81 MissingETBase::Numerical::isEqual(this->ce(),cvec.ce()) &&
83 }
84
86 {
87 return sqrt(this->cpx()*this->cpx()+this->cpy()*this->cpy());
88 }
89
91 // Constructors and destructors //
93
95 : SG::AuxElement()
96 {
97
98 if( createStore ) createPrivateStore();
99 initCache();
100 }
101
103 : SG::AuxElement()
104 {
105
107 f_isMisc() = isMisc;
108 setRefJet( pJet );
109 initCache();
110 }
111
113 : SG::AuxElement(assocDescr)
114 {
115 this->makePrivateStore(&assocDescr);
116 initCache();
117 }
118
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 }
145
147
149 // Data store management //
151
152 bool MissingETAssociation_v1::addObject(const IParticle* pPart,const std::vector<const IParticle*>& constlist)
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());
164 MissingETBase::Types::objlink_t el(*pCont,signal->index());
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());
178 MissingETBase::Types::objlink_t el(*pCont,signal->index());
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 }
188
189 // void MissingETAssociation_v1::updateLinks()
190 // {
191 // this->updateJetLink();
192 // static SG::AuxElement::Accessor<MissingETBase::Types::objlink_vector_t> acc("objectLinks");
193 // if(acc.isAvailableWritable(*this)) {
194 // for ( auto& link : this->f_objectLinks() ) {
195 // link.toPersistent();
196 // }
197 // }
198 // }
199
200 // void MissingETAssociation_v1::updateJetLink() {
201 // if(!this->isMisc()) {
202 // static SG::AuxElement::Accessor<MissingETBase::Types::jetlink_t> acc("jetLink");
203 // if(acc.isAvailableWritable(*this)) {
204 // if(f_setLink<MissingETBase::Types::jetlink_t>(this->f_jetLink())) {
205 // this->f_jetLink().toPersistent();
206 // }
207 // }
208 // }
209 // }
210
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 }
217
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 }
240
242 {
243 this->resetContrib();
244 return true;
245 }
246
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 }
265
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 }
280
282 {
283 for (size_t ind = 0; ind < this->sizeCal(); ind++) if (mask==this->calkey()[ind]) return ind;
285 }
286
288 {
289 for (size_t ind = 0; ind < this->sizeTrk(); ind++) if (mask==this->trkkey()[ind]) return ind;
291 }
292
294 // Setters //
296
297 bool MissingETAssociation_v1::setCalPx(const std::vector<float>& calpxvec)
298 { this->f_calpx().clear(); this->f_calpx().insert(this->f_calpx().end(),calpxvec.begin(),calpxvec.end()); return !this->f_calpx().empty(); }
299 bool MissingETAssociation_v1::setCalPy(const std::vector<float>& calpyvec)
300 { this->f_calpy().clear(); this->f_calpy().insert(this->f_calpy().end(),calpyvec.begin(),calpyvec.end()); return !this->f_calpy().empty(); }
301 bool MissingETAssociation_v1::setCalPz(const std::vector<float>& calpzvec)
302 { this->f_calpz().clear(); this->f_calpz().insert(this->f_calpz().end(),calpzvec.begin(),calpzvec.end()); return !this->f_calpz().empty(); }
303 bool MissingETAssociation_v1::setCalE(const std::vector<float>& calevec)
304 { this->f_cale().clear(); this->f_cale().insert(this->f_cale().end(),calevec.begin(),calevec.end()); return !this->f_cale().empty(); }
305 bool MissingETAssociation_v1::setCalSumpt(const std::vector<float>& calsumptvec)
306 { this->f_calsumpt().clear(); this->f_calsumpt().insert(this->f_calsumpt().end(),calsumptvec.begin(),calsumptvec.end()); return !this->f_calsumpt().empty(); }
307 bool MissingETAssociation_v1::setCalKey(const std::vector<MissingETBase::Types::bitmask_t>& calkeyvec)
308 { this->f_calkey().clear(); this->f_calkey().insert(this->f_calkey().end(),calkeyvec.begin(),calkeyvec.end()); return !this->f_calkey().empty(); }
309
310 bool MissingETAssociation_v1::setTrkPx(const std::vector<float>& trkpxvec)
311 { this->f_trkpx().clear(); this->f_trkpx().insert(this->f_trkpx().end(),trkpxvec.begin(),trkpxvec.end()); return !this->f_trkpx().empty(); }
312 bool MissingETAssociation_v1::setTrkPy(const std::vector<float>& trkpyvec)
313 { this->f_trkpy().clear(); this->f_trkpy().insert(this->f_trkpy().end(),trkpyvec.begin(),trkpyvec.end()); return !this->f_trkpy().empty(); }
314 bool MissingETAssociation_v1::setTrkPz(const std::vector<float>& trkpzvec)
315 { this->f_trkpz().clear(); this->f_trkpz().insert(this->f_trkpz().end(),trkpzvec.begin(),trkpzvec.end()); return !this->f_trkpz().empty(); }
316 bool MissingETAssociation_v1::setTrkE(const std::vector<float>& trkevec)
317 { this->f_trke().clear(); this->f_trke().insert(this->f_trke().end(),trkevec.begin(),trkevec.end()); return !this->f_trke().empty(); }
318 bool MissingETAssociation_v1::setTrkSumpt(const std::vector<float>& trksumptvec)
319 { this->f_trksumpt().clear(); this->f_trksumpt().insert(this->f_trksumpt().end(),trksumptvec.begin(),trksumptvec.end()); return !this->f_trksumpt().empty(); }
320 bool MissingETAssociation_v1::setTrkKey(const std::vector<MissingETBase::Types::bitmask_t>& trkkeyvec)
321 { this->f_trkkey().clear(); this->f_trkkey().insert(this->f_trkkey().end(),trkkeyvec.begin(),trkkeyvec.end()); return !this->f_trkkey().empty(); }
322
324 // FIXME: failsafe implementation checks on invalidKey and vector index - vector index may be sufficient?
325 bool MissingETAssociation_v1::setCalPx(size_t keyIdx,float calpx)
326 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_calpx().size() ) { this->f_calpx()[keyIdx] = calpx; return true; } else { return false; } }
327 bool MissingETAssociation_v1::setCalPy(size_t keyIdx,float calpy)
328 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_calpy().size() ) { this->f_calpy()[keyIdx] = calpy; return true; } else { return false; } }
329 bool MissingETAssociation_v1::setCalPz(size_t keyIdx,float calpz)
330 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_calpz().size() ) { this->f_calpz()[keyIdx] = calpz; return true; } else { return false; } }
331 bool MissingETAssociation_v1::setCalE(size_t keyIdx,float cale)
332 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_cale().size() ) { this->f_cale()[keyIdx] = cale; return true; } else { return false; } }
334 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_calsumpt().size() ) { this->f_calsumpt()[keyIdx] = calsumpt; return true; } else { return false; } }
336 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_calkey().size() ) { this->f_calkey()[keyIdx] = calkey; return true; } else { return false; } }
337 bool MissingETAssociation_v1::setCalVec(size_t keyIdx,float calpx,float calpy,float calpz,float cale,float sumpt)
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 }
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 }
358
359 bool MissingETAssociation_v1::setTrkPx(size_t keyIdx,float trkpx)
360 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_trkpx().size() ) { this->f_trkpx()[keyIdx] = trkpx; return true; } else { return false; } }
361 bool MissingETAssociation_v1::setTrkPy(size_t keyIdx,float trkpy)
362 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_trkpy().size() ) { this->f_trkpy()[keyIdx] = trkpy; return true; } else { return false; } }
363 bool MissingETAssociation_v1::setTrkPz(size_t keyIdx,float trkpz)
364 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_trkpz().size() ) { this->f_trkpz()[keyIdx] = trkpz; return true; } else { return false; } }
365 bool MissingETAssociation_v1::setTrkE(size_t keyIdx,float trke)
366 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_trke().size() ) { this->f_trke()[keyIdx] = trke; return true; } else { return false; } }
368 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_trksumpt().size() ) { this->f_trksumpt()[keyIdx] = trksumpt; return true; } else { return false; } }
370 { if ( keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->f_trkkey().size() ) { this->f_trkkey()[keyIdx] = trkkey; return true; } else { return false; } }
371 bool MissingETAssociation_v1::setTrkVec(size_t keyIdx,float trkpx,float trkpy,float trkpz,float trke,float sumpt)
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 }
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 }
392
393
395 { this->f_jettrkpx() = px; }
397 { this->f_jettrkpy() = py; }
399 { this->f_jettrkpz() = pz; }
401 { this->f_jettrke() = e; }
403 { this->f_jettrksumpt() = sumpt; }
404 void MissingETAssociation_v1::setJetTrkVec(float px,float py,float pz,float e,float sumpt)
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 }
410
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 }
418 bool MissingETAssociation_v1::setOverlaps(const std::vector<std::vector<size_t> >& overlapIndexVector,const std::vector<std::vector<unsigned char> >& overlapTypeVector)
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 }
424 bool MissingETAssociation_v1::setOverlaps(size_t objIdx,const std::vector<size_t>& overlapIndices,const std::vector<unsigned char>& overlapTypes)
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 }
432
433
435 {
436 bool wasSet(this->f_jetLink().getStorableObjectPointer() != nullptr);
438 return wasSet;
439 }
440
441 bool MissingETAssociation_v1::setRefJet(const JetContainer* pJetCont, size_t pJetIdx)
442 {
443 bool wasSet(this->f_jetLink().getStorableObjectPointer() != nullptr);
444 this->f_jetLink().toIndexedElement(*pJetCont,pJetIdx);
445 return wasSet;
446 }
447
449 {
450 bool wasSet(this->f_jetLink().getStorableObjectPointer() != nullptr);
451 this->f_jetLink() = jetLnk;
452 return wasSet;
453 }
454
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 }
461
462
464 // Getters //
466
467 float MissingETAssociation_v1::calpx(size_t keyIdx) const
468 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeCal() ? this->calpx()[keyIdx] : MissingETBase::Numerical::cpxError(); }
469 float MissingETAssociation_v1::calpy(size_t keyIdx) const
470 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeCal() ? this->calpy()[keyIdx] : MissingETBase::Numerical::cpyError(); }
471 float MissingETAssociation_v1::calpz(size_t keyIdx) const
472 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeCal() ? this->calpz()[keyIdx] : MissingETBase::Numerical::cpzError(); }
473 float MissingETAssociation_v1::cale(size_t keyIdx) const
474 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeCal() ? this->cale()[keyIdx] : MissingETBase::Numerical::ceError(); }
475 float MissingETAssociation_v1::calsumpt(size_t keyIdx) const
476 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeCal() ? this->calsumpt()[keyIdx] : MissingETBase::Numerical::sumptError(); }
479
480 float MissingETAssociation_v1::trkpx(size_t keyIdx) const
481 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeTrk() ? this->trkpx()[keyIdx] : MissingETBase::Numerical::cpxError(); }
482 float MissingETAssociation_v1::trkpy(size_t keyIdx) const
483 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeTrk() ? this->trkpy()[keyIdx] : MissingETBase::Numerical::cpyError(); }
484 float MissingETAssociation_v1::trkpz(size_t keyIdx) const
485 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeTrk() ? this->trkpz()[keyIdx] : MissingETBase::Numerical::cpzError(); }
486 float MissingETAssociation_v1::trke(size_t keyIdx) const
487 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeTrk() ? this->trke()[keyIdx] : MissingETBase::Numerical::ceError(); }
488 float MissingETAssociation_v1::trksumpt(size_t keyIdx) const
489 { return keyIdx != MissingETBase::Numerical::invalidIndex() && keyIdx < this->sizeTrk() ? this->trksumpt()[keyIdx] : MissingETBase::Numerical::sumptError(); }
492
493 std::vector<size_t> MissingETAssociation_v1::overlapIndices(size_t objIdx) const
494 {
495 return (objIdx != MissingETBase::Numerical::invalidIndex() && objIdx < this->size()) ? this->overlapIndices()[objIdx] : vector<size_t>(0);
496 }
497
498 std::vector<unsigned char> MissingETAssociation_v1::overlapTypes(size_t objIdx) const
499 {
500 return (objIdx != MissingETBase::Numerical::invalidIndex() && objIdx < this->size()) ? this->overlapTypes()[objIdx] : vector<unsigned char>(0);
501 }
502
503 std::vector<const IParticle*> MissingETAssociation_v1::objects() const
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 }
509
510 std::vector<const IParticle*> MissingETAssociation_v1::objects(std::vector<constvec_t>& calVecs,std::vector<constvec_t>& trkVecs) const
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 }
521
522 std::vector<const IParticle*> MissingETAssociation_v1::objects(const std::vector<float>*& calpxPtr,const std::vector<float>*& calpyPtr,
523 const std::vector<float>*& calpzPtr,const std::vector<float>*& calePtr,
524 const std::vector<float>*& calsumptPtr,
525 const std::vector<float>*& trkpxPtr,const std::vector<float>*& trkpyPtr,
526 const std::vector<float>*& trkpzPtr,const std::vector<float>*& trkePtr,
527 const std::vector<float>*& trksumptPtr) const
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 }
533
535 // constvec_t object generators //
537
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 }
547
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 }
557
562
567
569 { return constvec_t(this->jettrkpx(),this->jettrkpy(),this->jettrkpz(),this->jettrke(),this->jettrksumpt()); }
570
572 // Comparators //
574
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 }
582
583
585 // Overlap functions //
587
588
589 bool MissingETAssociation_v1::addOverlap(size_t objIdx,size_t overlapIndex,unsigned char overlapType)
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 }
597
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 }
677
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 }
716
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 }
751
753 {
754 return (!this->isMisc() && this->containsPhysics(this->refJet()));
755 }
756
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 }
769
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 }
779
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 }
789
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 }
801
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 }
815
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 }
831
833 // Other function(s) //
835
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 }
865
867 {
868
869 m_objConstLinks.clear();
870 m_objConstLinks.reserve(50);
871 }
872
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 }
878
896
897}
void makePrivateStore()
Create a new (empty) private store for this object.
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
const SG::AuxVectorData * container() const
Return the container holding this element.
AuxElement()
Default constructor.
size_t index() const
Return the index of this element within its container.
Class providing the definition of the 4-vector interface.
Vector sum of constituents for subtractive overlap removal.
ConstVec & operator+=(const ConstVec &cvec)
Add another vector.
float sumpt() const
Returns sum of component pt.
bool operator==(const ConstVec &cvec) const
Equality comparator.
ConstVec & operator-=(const ConstVec &cvec)
Subtract another vector.
ConstVec & operator*=(float scale)
Scale vector by multiplication.
ConstVec & operator/=(float scale)
Scale vector by division.
bool isMisc() const
Check if this association is a miscellaneous association.
const std::vector< float > & cale() const
Get the vector of .
bool setCalSumpt(const std::vector< float > &calsumptvec)
Set the vector of sumpt.
std::vector< float > & f_calpz()
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.
const Jet * refJet() const
Access reference jet.
std::vector< float > & f_cale()
const MissingETBase::Types::objlink_vector_t & objectLinks() const
Get the vector of links to the contributing physics or signal objects.
const std::vector< MissingETBase::Types::bitmask_t > & calkey() const
Get the vector of cal keys.
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.
static const SG::AuxElement::Accessor< float > m_acc_jettrke
std::vector< std::vector< ElementLink< IParticleContainer > > > m_objConstLinks
Cache object constituents for overlap-finding.
float jettrkpx() const
Get the vector for a given object referenced by index.
const std::vector< float > & trksumpt() const
Get the vector of .
void setJetTrkPy(float py)
Set track constituent vector for the reference jet.
size_t size() const
Update all internally used ElementLink instances.
bool setTrkPy(const std::vector< float > &trkpyvec)
Set the vector of .
void setJetTrkE(float e)
Set track constituent vector for the reference jet.
bool f_setLink(LINK &elemLink)
ConstVec trkVec(const IParticle *pPart) const
Get track constituent vector for a given object.
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_trkpz
const std::vector< float > & calsumpt() const
Get the vector of sumpt.
void clearOverlaps()
Clear the vectors of overlap indices.
const std::vector< std::vector< unsigned char > > & overlapTypes() const
Get the list of object overlapTypes.
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_calsumpt
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_calpz
bool setCalE(const std::vector< float > &calevec)
Set the vector of .
bool setRefJet(const Jet *pJet)
Set reference jet by object pointer reference.
const std::vector< float > & calpy() const
Get the vector of .
void setJetTrkPx(float px)
Set track constituent vector for the reference jet.
ConstVec overlapTrkVec(const MissingETAssociationHelper &helper) const
Retrieve total track-based vector to be subtracted from the jet.
std::vector< const IParticle * > objects() const
Access contributing objects.
static const SG::AuxElement::Accessor< float > m_acc_jettrkpz
bool addOverlap(const IParticle *pPart, size_t index, unsigned char type)
Add overlap index for a given contributing object referenced by pointer.
float jettrkpy() const
Get the vector for a given object referenced by pointer.
const std::vector< MissingETBase::Types::bitmask_t > & trkkey() const
Get the vector of trk keys.
std::vector< float > & f_calsumpt()
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.
MissingETBase::Types::objlink_vector_t & f_objectLinks()
Non-const link reference.
const std::vector< float > & trkpy() const
Get the vector of .
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_trksumpt
bool setTrkPx(const std::vector< float > &trkpxvec)
Set the vector of .
xAOD::JetFourMom_t getAlternateConstVec() const
size_t findTrkIndex(MissingETBase::Types::bitmask_t mask) const
bool hasOverlaps(const MissingETAssociationHelper &helper, size_t objIdx, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::OnlyCluster) const
Check if any selected particles overlap this one.
ConstVec overlapCalVec(const MissingETAssociationHelper &helper) const
Retrieve total cluster-based vector to be subtracted from the jet.
bool setJetLink(const MissingETBase::Types::jetlink_t &jetLnk)
Set the link to the reference jet.
bool removeContrib()
Remove all contributions.
bool setObjectLinks(const MissingETBase::Types::objlink_vector_t &objLnks)
Set the vector of links to the contributing physics or signal objects.
const std::vector< float > & trkpz() const
Get the vector of .
bool containsSignal(const IParticle *pSig) const
Check if this signal object matches the constituents of any contributing objects.
static const SG::AuxElement::Accessor< float > m_acc_jettrkpx
void setJetTrkPz(float pz)
Set track constituent vector for the reference jet.
std::vector< std::vector< size_t > > & f_overlapIndices()
record overlapIndices between constributing objects
std::vector< float > & f_trkpz()
bool setCalPx(const std::vector< float > &calpxvec)
Set the vector of .
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_calpy
void setJetTrkSumpt(float sumpt)
Set track constituent vector for the reference jet.
virtual ~MissingETAssociation_v1()
Assignment operator.
std::map< const IParticle *, ConstVec > m_override
std::vector< float > & f_trkpx()
const std::vector< float > & trke() const
Get the vector of .
bool addObject(const IParticle *pPart, const std::vector< const IParticle * > &constlist)
Add object (particle) from pointer reference with individual constituent vectors.
const MissingETBase::Types::jetlink_t & jetLink() const
Get the link to the reference jet.
bool setTrkE(const std::vector< float > &trkevec)
Set the vector of .
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_trke
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_trkpy
ConstVec jetTrkVec() const
Get track constituent vector for the reference jet.
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_trkpx
std::vector< MissingETBase::Types::bitmask_t > & f_calkey()
bool setCalVec(size_t keyIdx, const ConstVec &cvec=ConstVec())
Set the calo constituent vector of an object contribution referenced by index.
std::vector< float > & f_trkpy()
static const SG::AuxElement::Accessor< float > m_acc_jettrksumpt
const std::vector< float > & calpz() const
Get the vector of .
bool containsPhysics(const IParticle *pPhys) const
Check if this physics object matches any contributing objects.
bool identifyOverlaps()
Loop over contributing objects to identify those that share constituents.
std::vector< float > & f_trksumpt()
bool f_removeContrib(size_t objIdx)
Copy the contribution data from a source.
bool empty() const
Empty list of contributing objects indicator.
void f_setObject(const POBJ *pObj, LINK &elemLink)
Generalized link manager.
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_cale
size_t findCalIndex(MissingETBase::Types::bitmask_t mask) const
MissingETAssociation_v1 & operator=(const MissingETAssociation_v1 &assocDescr)
std::vector< std::vector< unsigned char > > & f_overlapTypes()
record overlapTypes between constributing objects
bool setTrkPz(const std::vector< float > &trkpzvec)
Set the vector of .
void createPrivateStore()
Function initialising the object to work in standalone mode.
float jettrkpz() const
Get the vector for a given object referenced by pointer.
static const SG::AuxElement::Accessor< std::vector< float > > m_acc_calpx
float jettrksumpt() const
Get the sumpt for a given object referenced by index.
const std::vector< float > & trkpx() const
Get 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 resetContrib()
Reset all contribution parameters.
bool operator==(const MissingETAssociation_v1 &contrib) const
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.
std::vector< float > & f_calpy()
bool setTrkKey(const std::vector< MissingETBase::Types::bitmask_t > &trkkeyvec)
Set the vector of keys.
size_t findIndex(const IParticle *pPart) const
Find index of given object in contributing object store.
float jettrke() const
Get the vector for a given object referenced by index.
void setJetTrkVec(const ConstVec &cvec=ConstVec())
Set the track constituent vector for the reference jet.
const std::vector< float > & calpx() const
Get the vector of .
std::vector< float > & f_calpx()
MissingETBase::Types::jetlink_t & f_jetLink()
Non-const link reference.
void initCache()
initialise cache for overlap removal decisions
bool setCalPy(const std::vector< float > &calpyvec)
Set the vector of .
static bool testPolicy(const xAOD::IParticle &part, MissingETBase::UsageHandler::Policy p)
std::vector< MissingETBase::Types::bitmask_t > & f_trkkey()
const std::vector< std::vector< size_t > > & overlapIndices() const
Get the list of object overlapIndices.
ConstVec calVec(const IParticle *pPart) const
Get calo constituent vector for a given object.
MissingETAssociation_v1(bool createStore=false)
Default constructor.
bool setTrkSumpt(const std::vector< float > &trksumptvec)
Set the vector of .
bool setTrkVec(size_t keyIdx, const ConstVec &cvec=ConstVec())
Set the track constituent vector of an object contribution referenced by index.
static const SG::AuxElement::Accessor< float > m_acc_jettrkpy
std::vector< float > & f_trke()
bool isCharged() const
is a charged PFO
Definition PFO_v1.cxx:251
xAOD::Type::ObjectType signalToXAODType(const xAOD::FlowElement &fe)
Namespace for generally used type definitions.
xAOD::MissingETAssociation_v1::ConstVec constvec_t
Type for constituent vector.
uint64_t bitmask_t
Type for status word bit mask.
ElementLink< xAOD::JetContainer > jetlink_t
Link to Jet object.
std::vector< objlink_t > objlink_vector_t
Vector of object links type.
ElementLink< xAOD::IParticleContainer > objlink_t
Link to contributing object.
@ AllCalo
Inclusive except tracks.
@ OnlyCluster
CaloCluster based only.
@ ParticleFlow
Particle Flow Object based.
@ TrackCluster
Both cluster and track based.
Forward declaration.
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition ObjectType.h:32
@ TrackParticle
The object is a charged track particle.
Definition ObjectType.h:43
@ ParticleFlow
The object is a particle-flow object.
Definition ObjectType.h:41
@ Other
An object not falling into any of the other categories.
Definition ObjectType.h:34
@ FlowElement
The object is a track-calo-cluster.
Definition ObjectType.h:52
@ CaloCluster
The object is a calorimeter cluster.
Definition ObjectType.h:39
@ TruthParticle
The object is a truth particle.
Definition ObjectType.h:67
@ NeutralParticle
The object is a neutral particle.
Definition ObjectType.h:44
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Jet_v1 Jet
Definition of the current "jet version".
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition FlowElement.h:16
static const EventInfo_v1::Accessor< std::vector< std::string > > types("streamTagTypes")
TruthParticle_v1 TruthParticle
Typedef to implementation.
JetConstituentVector::iterator iterator
JetContainer_v1 JetContainer
Definition of the current "jet container version".
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.
MissingETBase::Types::bitmask_t getObjMask(size_t objIndex)
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition JetTypes.h:17
static double cpyError()
Access error return value for constituent vector .
static double cpxError()
Access error return value for constituent vector .
static double ceError()
Access error return value for constituent vector .
static bool isEqual(double x, double y)
Test of equality.
static size_t invalidIndex()
Access invalid index indicator.
static double cpzError()
Access error return value for constituent vector .
static double sumptError()
Access error return value for constituent vector sumpt.