ATLAS Offline Software
IsolationBuilder.cxx
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // IsolationBuilder.cxx
8 // Implementation file for class IsolationBuilder
10 
11 // Isolation includes
12 #include "IsolationBuilder.h"
13 #include "xAODEgamma/Egamma.h"
15 #include "xAODEgamma/Photon.h"
16 #include "xAODEgamma/Electron.h"
17 
19  ISvcLocator* pSvcLocator)
20  : ::AthReentrantAlgorithm(name, pSvcLocator)
21 {}
22 
24 
27 {
28  ATH_MSG_INFO("Initializing " << name() << "...");
29 
30  std::set<xAOD::Iso::IsolationFlavour> runIsoType;
31 
32  if (m_elisoInts.size()) {
33  ATH_MSG_DEBUG("Initializing central electrons");
34  ATH_CHECK(initializeIso(runIsoType,
35  &m_elCaloIso,
36  &m_elTrackIso,
44  }
45 
46  if (m_phisoInts.size()) {
47  ATH_MSG_DEBUG("Initializing central photons");
48  ATH_CHECK(initializeIso(runIsoType,
49  &m_phCaloIso,
50  &m_phTrackIso,
58  }
59 
60  if (m_feisoInts.size()) {
61  ATH_MSG_DEBUG("Initializing forward electrons");
62  ATH_CHECK(initializeIso(runIsoType,
63  &m_feCaloIso,
64  nullptr,
71  }
72 
73  if (m_muisoInts.size()) {
74  ATH_MSG_DEBUG("Initializing muons");
75  ATH_CHECK(initializeIso(runIsoType,
76  &m_muCaloIso,
77  &m_muTrackIso,
85  }
86 
87  // Retrieve the tools (there three Calo ones are the same in fact)
88  if (!m_cellIsolationTool.empty() &&
89  runIsoType.find(xAOD::Iso::etcone) != runIsoType.end()) {
90  ATH_CHECK(m_cellIsolationTool.retrieve());
91  } else {
92  m_cellIsolationTool.disable();
93  }
94 
95  if (!m_topoIsolationTool.empty() &&
96  runIsoType.find(xAOD::Iso::topoetcone) != runIsoType.end()) {
97  ATH_CHECK(m_topoIsolationTool.retrieve());
98  } else {
99  m_topoIsolationTool.disable();
100  }
101 
102  if (!m_pflowIsolationTool.empty() &&
103  runIsoType.find(xAOD::Iso::neflowisol) != runIsoType.end()) {
104  ATH_CHECK(m_pflowIsolationTool.retrieve());
105  } else {
106  m_pflowIsolationTool.disable();
107  }
108 
109  if (!m_trackIsolationTool.empty() &&
110  runIsoType.find(xAOD::Iso::IsolationFlavour::ptcone) !=
111  runIsoType.end()) {
112  ATH_CHECK(m_trackIsolationTool.retrieve());
113  } else {
114  m_trackIsolationTool.disable();
115  }
116 
117  // initialise data handles
119 
120  return StatusCode::SUCCESS;
121 }
122 
125 {
126  ATH_MSG_INFO("Finalizing " << name() << "...");
127 
128  return StatusCode::SUCCESS;
129 }
130 
132 IsolationBuilder::execute(const EventContext& ctx) const
133 {
134  ATH_MSG_DEBUG("Executing " << name() << "...");
135 
136  // For etcone, needs the cells
137 
138  const CaloCellContainer* cellColl = nullptr;
139  if (!m_cellIsolationTool.empty()) {
141  // check is only used for serial running; remove when MT scheduler used
142  if (!cellcoll.isValid()) {
143  ATH_MSG_FATAL("Failed to retrieve cell container: " << m_cellsKey.key());
144  return StatusCode::FAILURE;
145  }
146  cellColl = cellcoll.cptr();
147  }
148  // Compute isolations
149 
150  if (m_elCaloIso.size()) {
151  ATH_MSG_DEBUG("About to execute Electron calo iso");
153  }
154  if (m_phCaloIso.size()) {
155  ATH_MSG_DEBUG("About to execute Photon calo iso");
157  }
158  if (m_feCaloIso.size()) {
159  ATH_MSG_DEBUG("About to execute Forward Electron calo iso");
161  }
162  if (m_muCaloIso.size()) {
163  ATH_MSG_DEBUG("About to execute muon calo iso");
165  }
166 
167  if (m_elTrackIso.size()) {
168  ATH_MSG_DEBUG("About to execute Electron track iso");
170  }
171  if (m_phTrackIso.size()) {
172  ATH_MSG_DEBUG("About to execute Photon track iso");
174  }
175  if (m_muTrackIso.size()) {
176  ATH_MSG_DEBUG("About to execute Muon track iso");
178  }
179 
180  return StatusCode::SUCCESS;
181 }
182 
183 // constructor
185 {
186  isoDeco.setOwner(owningAlg);
187  corrBitsetDeco.setOwner(owningAlg);
188 }
189 
190 // declare dependencies
191 void
192 IsolationBuilder::CaloIsoHelpKey::declare(IDataHandleHolder* owningAlg)
193 {
194  isoDeco.declare(owningAlg);
195  owningAlg->declare(corrBitsetDeco);
196 
197  for (auto& coreCor : coreCorDeco) {
198  owningAlg->declare(coreCor.second);
199  }
200 
201  for (auto& noncoreCor : noncoreCorDeco) {
202  noncoreCor.second.declare(owningAlg);
203  }
204 }
205 
206 // constructor
208 {
209  isoDeco.setOwner(owningAlg);
210  isoDecoV.setOwner(owningAlg);
211  corrBitsetDeco.setOwner(owningAlg);
212 }
213 
214 // declare dependencies
215 void
216 IsolationBuilder::TrackIsoHelpKey::declare(IDataHandleHolder* owningAlg)
217 {
218  isoDeco.declare(owningAlg);
219  isoDecoV.declare(owningAlg);
220  owningAlg->declare(corrBitsetDeco);
221 
222  for (auto& coreCor : coreCorDeco) {
223  owningAlg->declare(coreCor.second);
224  }
225 }
226 
227 // constructor
230  : corrBitsetDeco(keys.corrBitsetDeco)
231 {
232  for (const auto& key : keys.isoDeco) {
233  isoDeco.emplace_back(key);
234  }
235  for (const auto& coreCor : keys.coreCorDeco) {
236  coreCorDeco.emplace(coreCor);
237  }
238  for (const auto& noncoreCor : keys.noncoreCorDeco) {
239  noncoreCorDeco.emplace(
240  noncoreCor.first,
242  std::begin(noncoreCor.second), std::end(noncoreCor.second) });
243  }
244 }
245 
248  : corrBitsetDeco(keys.corrBitsetDeco)
249 {
250  for (const auto& key : keys.isoDeco) {
251  isoDeco.emplace_back(key);
252  }
253  for (const auto& key : keys.isoDecoV) {
254  isoDecoV.emplace_back(key);
255  }
256  for (const auto& coreCor : keys.coreCorDeco) {
257  coreCorDeco.emplace(coreCor);
258  }
259 }
260 
261 bool
263 {
264  return (cor == xAOD::Iso::coreCone || cor == xAOD::Iso::coreConeSC ||
266 }
267 
270  std::set<xAOD::Iso::IsolationFlavour>& runIsoType, // out
271  std::vector<std::pair<xAOD::Iso::IsolationFlavour, CaloIsoHelpKey>>*
272  caloIsoMap, // out
273  std::vector<std::pair<xAOD::Iso::IsolationFlavour, TrackIsoHelpKey>>*
274  trackIsoMap, // out
275  const std::string& containerName,
276  const std::vector<std::vector<int>>& isoInts,
277  const std::vector<std::vector<int>>& corInts,
278  const std::vector<std::vector<int>>& corIntsExtra,
279  const std::string& customConfig)
280 {
281 
282  std::string prefix = containerName + ".";
283 
284  for (size_t flavor = 0; flavor < isoInts.size(); flavor++) {
285  // iterate over the flavor (cell, topo, eflow, track
286  // Note: it is a configuration error if different types
287  // are included in one inner vector
288 
289  CaloIsoHelpKey cisoH(this);
290  TrackIsoHelpKey tisoH(this);
291 
292  // std::vector<SG::AuxElement::Decorator<float>*> Deco;
295 
296  for (size_t type = 0; type < isoInts[flavor].size(); type++) {
297  // iterate over the cone sizes for a given flavor.
298  // (also check that the cone sizes really are of the same flavor;
299  // otherwise an error)
300 
301  xAOD::Iso::IsolationType isoType =
302  static_cast<xAOD::Iso::IsolationType>(isoInts[flavor][type]);
303  isoFlav = xAOD::Iso::isolationFlavour(isoType);
304  ATH_MSG_DEBUG("Saw isoType " << xAOD::Iso::toString(isoType) << " and isoFlav " << xAOD::Iso::toString(isoFlav));
305  if (oldIsoFlav != xAOD::Iso::numIsolationFlavours &&
306  oldIsoFlav != isoFlav) {
307  ATH_MSG_FATAL("Configuration error: can only have one type of "
308  "isolation in inner vector");
309  return StatusCode::FAILURE;
310  }
311  oldIsoFlav = isoFlav;
312  std::string isoName = prefix + xAOD::Iso::toString(isoType);
313  if (!customConfig.empty()) {
314  isoName += "_" + customConfig;
315  }
316  if (isoFlav == xAOD::Iso::etcone || isoFlav == xAOD::Iso::topoetcone ||
317  isoFlav == xAOD::Iso::neflowisol) {
318  cisoH.isoTypes.push_back(isoType);
319  cisoH.isoDeco.emplace_back(isoName);
320  } else if (isoFlav == xAOD::Iso::ptcone) {
321  tisoH.isoTypes.push_back(isoType);
322  tisoH.isoDeco.emplace_back(isoName);
323  auto coneSize =
324  static_cast<int>(round(100 * xAOD::Iso::coneSize(isoType)));
325  std::string isoNameV = prefix + "ptvarcone" + std::to_string(coneSize);
326  if (!customConfig.empty()) {
327  isoNameV += "_" + customConfig;
328  }
329  tisoH.isoDecoV.emplace_back(isoNameV);
330  } else {
331  ATH_MSG_FATAL("Configuration error: Isolation flavor "
332  << isoFlav << " not supported.");
333  return StatusCode::FAILURE;
334  }
335  }
336 
337  // check that there were isolations configured
338  if (isoFlav == xAOD::Iso::numIsolationFlavours) {
339  ATH_MSG_WARNING("The configuration was malformed: an empty inner vector "
340  "was added; ignoring");
341  continue;
342  }
343 
345  // Now that the isolations to calculate are determined,
346  // initialize the isolation decorations
347  // and then determine the corrections to apply,
348  // and finally add it to the IsoMap.
350 
351  if (isoFlav == xAOD::Iso::etcone || isoFlav == xAOD::Iso::topoetcone ||
352  isoFlav == xAOD::Iso::neflowisol) {
353 
354  // let's initialize the decos
355  ATH_MSG_DEBUG("Initializing cisoH.isoDeco");
356  ATH_CHECK(cisoH.isoDeco.initialize());
357 
359  flavor, isoFlav, cisoH, corInts, false, prefix, customConfig));
361  flavor, isoFlav, cisoH, corIntsExtra, true, prefix, customConfig));
362 
363  if (caloIsoMap) {
364  caloIsoMap->push_back(std::make_pair(isoFlav, cisoH));
365  } else {
367  "caloIsoMap was nullptr but the configuration attempted to use it");
368  return StatusCode::FAILURE;
369  }
370  } else if (isoFlav == xAOD::Iso::ptcone) {
371 
372  // let's initialize the decos
373  ATH_MSG_DEBUG("Initializing tisoH.isoDeco");
374  ATH_CHECK(tisoH.isoDeco.initialize());
375  ATH_MSG_DEBUG("Initializing tisoH.isoDecoV");
376  ATH_CHECK(tisoH.isoDecoV.initialize());
377 
379  flavor, isoFlav, tisoH, corInts, false, prefix, customConfig));
381  flavor, isoFlav, tisoH, corIntsExtra, true, prefix, customConfig));
382 
383  if (trackIsoMap) {
384  trackIsoMap->push_back(std::make_pair(isoFlav, tisoH));
385  } else {
387  "trackIsoMap was nullptr but the configuration attempted to use it");
388  return StatusCode::FAILURE;
389  }
390  } else {
391  ATH_MSG_WARNING("Isolation flavour "
392  << xAOD::Iso::toCString(isoFlav)
393  << " does not exist ! Check your inputs");
394  }
395  runIsoType.insert(isoFlav);
396  }
397  return StatusCode::SUCCESS;
398 }
399 
402  size_t flavor,
404  CaloIsoHelpKey& cisoH,
405  const std::vector<std::vector<int>>& corInts,
406  bool corrsAreExtra,
407  const std::string& prefix,
408  const std::string& customConfig)
409 {
410 
411  if (!corrsAreExtra) {
412  std::string bitsetName =
413  prefix + xAOD::Iso::toString(isoFlav) + "CorrBitset";
414  if (!customConfig.empty()) {
415  bitsetName += "_" + customConfig;
416  }
417 
418  cisoH.corrBitsetDeco = bitsetName;
419  ATH_MSG_DEBUG("Initializing non extra corr : " << cisoH.corrBitsetDeco.key());
420  ATH_CHECK(cisoH.corrBitsetDeco.initialize());
421  }
422 
423  for (size_t corrType = 0; corrType < corInts[flavor].size(); corrType++) {
424  // iterate over the calo isolation corrections
425  const auto cor = static_cast<unsigned int>(corInts[flavor][corrType]);
426  if (!corrsAreExtra)
427  cisoH.CorrList.calobitset.set(cor);
429  static_cast<xAOD::Iso::IsolationCaloCorrection>(cor);
430 
431  if (isCoreCor(isoCor)) {
432  std::string isoCorName = prefix;
433  if (isoCor != xAOD::Iso::core57cells) {
434  isoCorName += xAOD::Iso::toString(isoFlav); // since this doesn't depend on the flavor, just have one
435  }
436 
437  // a core correction; only store core energy, not the core area
438  isoCorName += xAOD::Iso::toString(isoCor) +
440  if (!customConfig.empty()) {
441  isoCorName += "_" + customConfig;
442  }
443  cisoH.coreCorDeco.emplace(isoCor, isoCorName);
444  cisoH.coreCorDeco[isoCor].setOwner(this);
445  ATH_MSG_DEBUG("initializing " << cisoH.coreCorDeco[isoCor].key());
446  ATH_CHECK(cisoH.coreCorDeco[isoCor].initialize());
447  } else {
448  // noncore correction
450  continue;
451  cisoH.noncoreCorDeco.emplace(
453  auto& vec = cisoH.noncoreCorDeco[isoCor];
454  vec.setOwner(this);
455  for (auto type : cisoH.isoTypes) {
456  std::string corName = prefix + xAOD::Iso::toString(type) +
457  xAOD::Iso::toString(isoCor) + "Correction";
458  if (!customConfig.empty()) {
459  corName += "_" + customConfig;
460  }
461  vec.emplace_back(corName);
462  }
463  ATH_MSG_DEBUG("Initializing " << xAOD::Iso::toString(isoCor)
464  << " Corrections");
465  ATH_CHECK(vec.initialize());
466  }
467  }
468  return StatusCode::SUCCESS;
469 }
470 
473  size_t flavor,
475  TrackIsoHelpKey& tisoH,
476  const std::vector<std::vector<int>>& corInts,
477  bool corrsAreExtra,
478  const std::string& prefix,
479  const std::string& customConfig)
480 {
481 
482  if (!corrsAreExtra) {
483  std::string bitsetName =
484  prefix + xAOD::Iso::toString(isoFlav) + "CorrBitset";
485  if (!customConfig.empty()) {
486  bitsetName += "_" + customConfig;
487  }
488 
489  tisoH.corrBitsetDeco = bitsetName;
490  ATH_MSG_DEBUG("Initializing " << tisoH.corrBitsetDeco.key());
491  ATH_CHECK(tisoH.corrBitsetDeco.initialize());
492  }
493 
494  for (size_t corrType = 0; corrType < corInts[flavor].size(); corrType++) {
495  const auto cor = static_cast<unsigned int>(corInts[flavor][corrType]);
496  if (!corrsAreExtra)
497  tisoH.CorrList.trackbitset.set(cor);
499  static_cast<xAOD::Iso::IsolationTrackCorrection>(cor);
500 
501  // all pt corrections are core type
502  std::string isoCorName = prefix + xAOD::Iso::toString(isoFlav) +
503  xAOD::Iso::toString(isoCor) + "Correction";
504 
505  if (!customConfig.empty()) {
506  isoCorName += "_" + customConfig;
507  }
508  tisoH.coreCorDeco.emplace(isoCor, isoCorName);
509  tisoH.coreCorDeco[isoCor].setOwner(this);
510  ATH_MSG_DEBUG("initializing " << tisoH.coreCorDeco[isoCor].key());
511  ATH_CHECK(tisoH.coreCorDeco[isoCor].initialize());
512  }
513  return StatusCode::SUCCESS;
514 }
515 
518  const std::vector<std::pair<xAOD::Iso::IsolationFlavour, CaloIsoHelpKey>>&
519  caloIsoMap,
520  const CaloCellContainer* cellColl) const
521 {
522  for (const auto& pr : caloIsoMap) {
523 
524  const xAOD::Iso::IsolationFlavour flav = pr.first;
525  const auto& keys = pr.second;
526  CaloIsoHelpHandles handles(keys);
527 
528  ATH_MSG_DEBUG("Executing calo iso flavor: " << xAOD::Iso::toString(flav));
529 
530  if (handles.isoDeco.empty()) {
531  ATH_MSG_FATAL("Have a CaloIsoHelpHandles with no actual isolations; "
532  "something wrong happened");
533  return StatusCode::FAILURE;
534  }
535  auto& readHandle =
536  handles.isoDeco[0]; // can treat the writeDecorHandle as a read handle;
537 
538  if (readHandle.isAvailable()){ // This must be before readHandle.isValid() or else the isValid call
539  // will crash if the deocration already exists
540  ATH_MSG_DEBUG("read (actually a write) handle for " << keys.isoDeco[0].key() << " already exists. "
541  << "Will not recompute." );
542  return StatusCode::SUCCESS;
543  }
544 
545  if (!readHandle.isValid()) {
546  ATH_MSG_FATAL("Could not retrieve read handle for "
547  << keys.isoDeco[0].key());
548  return StatusCode::FAILURE;
549  }
550 
551  for (const auto *part : *readHandle) {
552  xAOD::CaloIsolation CaloIsoResult;
553  bool successfulCalc = false;
554  if (flav == xAOD::Iso::IsolationFlavour::etcone && cellColl) {
555  successfulCalc = m_cellIsolationTool->caloCellIsolation(
556  CaloIsoResult, *part, keys.isoTypes, keys.CorrList, cellColl);
557  } else if (flav == xAOD::Iso::IsolationFlavour::topoetcone) {
558  successfulCalc = m_topoIsolationTool->caloTopoClusterIsolation(
559  CaloIsoResult, *part, keys.isoTypes, keys.CorrList);
560  } else if (flav == xAOD::Iso::IsolationFlavour::neflowisol) {
561  successfulCalc = m_pflowIsolationTool->neutralEflowIsolation(
562  CaloIsoResult, *part, keys.isoTypes, keys.CorrList);
563  }
564 
565  if (successfulCalc) {
566  for (unsigned int i = 0; i < keys.isoTypes.size(); i++) {
567  float iso = CaloIsoResult.etcones[i];
568  ATH_MSG_DEBUG("custom Iso " << xAOD::Iso::toCString(keys.isoTypes[i])
569  << " = " << iso / 1e3);
570  (handles.isoDeco[i])(*part) = iso;
571  }
572  // corrections
573  (handles.corrBitsetDeco)(*part) = keys.CorrList.calobitset.to_ulong();
574 
575  // let's do the core corrections
576 
577  // iterate over the values we want to store
578  for (auto& coreCorDecoPr : handles.coreCorDeco) {
579  // find the matching result
580  auto corIter =
581  CaloIsoResult.coreCorrections.find(coreCorDecoPr.first);
582  if (corIter == CaloIsoResult.coreCorrections.end()) {
583  ATH_MSG_FATAL("Could not find core correction of required type: "
584  << xAOD::Iso::toCString(coreCorDecoPr.first));
585  ATH_MSG_FATAL("Check configuration");
586  return StatusCode::FAILURE;
587  }
588  // now that we have the match, let's find the energy
590  float>::const_iterator it =
591  corIter->second.find(xAOD::Iso::coreEnergy);
592  if (it == corIter->second.end()) {
593  ATH_MSG_FATAL("Could not find coreEnergy correction for: "
594  << xAOD::Iso::toCString(coreCorDecoPr.first));
595  ATH_MSG_FATAL("Check configuration");
596  return StatusCode::FAILURE;
597  }
598  ATH_MSG_DEBUG("About to write core correction: "
599  << xAOD::Iso::toCString(coreCorDecoPr.first));
600  (coreCorDecoPr.second)(*part) = it->second;
601  }
602 
603  // let's do the noncore corrections
604  for (auto& noncoreCorDecoPr : handles.noncoreCorDeco) {
605  // find the matching result
606  auto corIter =
607  CaloIsoResult.noncoreCorrections.find(noncoreCorDecoPr.first);
608  if (corIter == CaloIsoResult.noncoreCorrections.end()) {
609  ATH_MSG_FATAL("Could not find noncore correction of required type: "
610  << xAOD::Iso::toCString(noncoreCorDecoPr.first));
611  ATH_MSG_FATAL("Check configuration");
612  return StatusCode::FAILURE;
613  }
614 
615  ATH_MSG_DEBUG("About to write noncore correction: "
616  << xAOD::Iso::toCString(noncoreCorDecoPr.first));
617  auto& vecHandles = noncoreCorDecoPr.second;
618  for (size_t i = 0; i < vecHandles.size(); i++) {
619  (vecHandles[i])(*part) = corIter->second[i];
620  }
621  }
622  } else {
623  ATH_MSG_FATAL("Call to CaloIsolationTool failed for flavor "
624  << xAOD::Iso::toCString(flav));
625  return StatusCode::FAILURE;
626  }
627  }
628  }
629  return StatusCode::SUCCESS;
630 }
631 
634  const std::vector<std::pair<xAOD::Iso::IsolationFlavour, TrackIsoHelpKey>>&
635  trackIsoMap) const
636 {
637  for (const auto& pr : trackIsoMap) {
638  const xAOD::Iso::IsolationFlavour flav = pr.first;
639  const auto& keys = pr.second;
640  TrackIsoHelpHandles handles(keys);
641 
642  ATH_MSG_DEBUG("Executing track iso flavor: " << xAOD::Iso::toString(flav));
643 
644  if (handles.isoDeco.empty()) {
645  ATH_MSG_FATAL("Have a TrackIsoHelpHandles with no actual isolations; "
646  "something wrong happened");
647  return StatusCode::FAILURE;
648  }
649  auto& readHandle =
650  handles.isoDeco[0]; // can treat the writeDecorHandle as a read handle;
651 
652  if (readHandle.isAvailable()){ // This must be before readHandle.isValid() or else the isValid call
653  // will crash if the deocration already exists
654  ATH_MSG_DEBUG("Decoration for for " << keys.isoDeco[0].key() << " already exists. "
655  << "Will not recompute." );
656  return StatusCode::SUCCESS;
657  }
658 
659  if (!readHandle.isValid()) {
660  ATH_MSG_FATAL("Could not retrieve read handle for "
661  << keys.isoDeco[0].key());
662  return StatusCode::FAILURE;
663  }
664 
665  for (const auto *part : *readHandle) {
666  xAOD::TrackIsolation TrackIsoResult;
667  bool successfulCalc = false;
668  // check to see if we are dealing with an electron
669  const auto * eg = dynamic_cast<const xAOD::Egamma*>(part);
670  if (eg) {
671  ATH_MSG_DEBUG("Doing track isolation on an egamma particle");
672  std::unique_ptr<xAOD::Vertex> trigVtx = nullptr;
673  std::set<const xAOD::TrackParticle*> tracksToExclude;
675  tracksToExclude =
677  if (m_isTrigger) {
678  const xAOD::Electron* el = static_cast<const xAOD::Electron*>(part);
679  trigVtx = std::make_unique<xAOD::Vertex>();
680  trigVtx->makePrivateStore();
681  trigVtx->setZ(el->trackParticle()->z0() + el->trackParticle()->vz());
682  ATH_MSG_DEBUG("will use a vertex at z = " << trigVtx->z() << " to compute electron track isolation");
683  }
684  } else {
685  if (m_allTrackRemoval) { // New (from ??/??/16) : now this gives all
686  // tracks
687  tracksToExclude =
689  } else { // this is just to be able to have the 2015+2016 default case
690  // (only tracks from first vertex)
691  const auto * gam = dynamic_cast<const xAOD::Photon*>(eg);
692  if (gam && gam->nVertices() > 0) {
693  const xAOD::Vertex* phvtx = gam->vertex(0);
694  for (unsigned int itk = 0; itk < phvtx->nTrackParticles(); itk++)
695  tracksToExclude.insert(
698  phvtx->trackParticle(itk))
699  : phvtx->trackParticle(itk));
700  }
701  }
702  }
703  successfulCalc = m_trackIsolationTool->trackIsolation(TrackIsoResult,
704  *part,
705  keys.isoTypes,
706  keys.CorrList,
707  trigVtx.get(),
708  &tracksToExclude);
709  } else {
710  ATH_MSG_DEBUG("Not doing track isolation on an egamma particle");
711  successfulCalc = m_trackIsolationTool->trackIsolation(
712  TrackIsoResult, *part, keys.isoTypes, keys.CorrList);
713  }
714 
715  if (successfulCalc) {
716  for (unsigned int i = 0; i < keys.isoTypes.size(); i++) {
717  float iso = TrackIsoResult.ptcones[i];
718  float isoV = TrackIsoResult.ptvarcones_10GeVDivPt[i];
719  ATH_MSG_DEBUG("custom Iso " << xAOD::Iso::toCString(keys.isoTypes[i])
720  << " = " << iso / 1e3
721  << ", var cone = " << isoV / 1e3);
722  (handles.isoDeco[i])(*part) = iso;
723  (handles.isoDecoV[i])(*part) = isoV;
724  }
725 
726  // corrections
727  (handles.corrBitsetDeco)(*part) = keys.CorrList.trackbitset.to_ulong();
728  // let's do the core corrections
729  // iterate over the values we want to store
730  for (auto& coreCorDecoPr : handles.coreCorDeco) {
731  // find the matching result
732  auto corIter =
733  TrackIsoResult.coreCorrections.find(coreCorDecoPr.first);
734  if (corIter == TrackIsoResult.coreCorrections.end()) {
735  ATH_MSG_FATAL("Could not find core correction of required type: "
736  << xAOD::Iso::toCString(coreCorDecoPr.first));
737  ATH_MSG_FATAL("Check configuration");
738  return StatusCode::FAILURE;
739  }
740  ATH_MSG_DEBUG("About to write tracking core correction: "
741  << xAOD::Iso::toCString(coreCorDecoPr.first));
742  (coreCorDecoPr.second)(*part) = corIter->second;
743  }
744 
745  } else {
746  ATH_MSG_FATAL("Call to TrackIsolationTool failed for flavor "
747  << xAOD::Iso::toCString(flav));
748  return StatusCode::FAILURE;
749  }
750  }
751  }
752  return StatusCode::SUCCESS;
753 }
754 
755 void
757  std::vector<std::pair<xAOD::Iso::IsolationFlavour, CaloIsoHelpKey>>& caloIso)
758 {
759  for (auto& iso : caloIso) {
760  iso.second.declare(this);
761  }
762 }
763 
764 void
766  std::vector<std::pair<xAOD::Iso::IsolationFlavour, TrackIsoHelpKey>>&
767  trackIso)
768 {
769  for (auto& iso : trackIso) {
770  iso.second.declare(this);
771  }
772 }
IsolationBuilder::m_allTrackRemoval
Gaudi::Property< bool > m_allTrackRemoval
Definition: IsolationBuilder.h:145
IsolationBuilder::TrackIsoHelpKey::isoDeco
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainer > isoDeco
The actual isolations.
Definition: IsolationBuilder.h:295
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
IsolationBuilder::m_elisoInts
Gaudi::Property< std::vector< std::vector< int > > > m_elisoInts
Isolation types.
Definition: IsolationBuilder.h:150
xAOD::Iso::topoetcone
@ topoetcone
Topo-cluster ET-sum.
Definition: IsolationFlavour.h:25
IsolationBuilder::initialize
virtual StatusCode initialize() override final
Definition: IsolationBuilder.cxx:26
IsolationBuilder::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Definition: IsolationBuilder.cxx:132
IsolationBuilder::m_customConfigFwd
Gaudi::Property< std::string > m_customConfigFwd
Definition: IsolationBuilder.h:363
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
CheckAppliedSFs.corrType
string corrType
Definition: CheckAppliedSFs.py:233
IsolationBuilder::m_storepileupCorrection
Gaudi::Property< bool > m_storepileupCorrection
Definition: IsolationBuilder.h:147
xAOD::Vertex_v1::nTrackParticles
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Definition: Vertex_v1.cxx:270
xAOD::Iso::coreConeSC
@ coreConeSC
core energy (super cluster).
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:38
IsolationBuilder::declareIso
void declareIso(std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey >> &caloIso)
Definition: IsolationBuilder.cxx:756
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::Iso::coreEnergy
@ coreEnergy
energy stored for this correction
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:93
ParticleTest.eg
eg
Definition: ParticleTest.py:29
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
xAOD::TrackIsolation::ptvarcones_10GeVDivPt
std::vector< float > ptvarcones_10GeVDivPt
Definition: IsolationCommon.h:37
IsolationBuilder::m_phCaloIso
std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey > > m_phCaloIso
Definition: IsolationBuilder.h:279
IsolationBuilder::m_customConfigMu
Gaudi::Property< std::string > m_customConfigMu
Definition: IsolationBuilder.h:370
IsolationBuilder::CaloIsoHelpHandles
Definition: IsolationBuilder.h:321
IsolationBuilder::m_elcorIntsExtra
Gaudi::Property< std::vector< std::vector< int > > > m_elcorIntsExtra
Definition: IsolationBuilder.h:166
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
IsolationBuilder::CaloIsoHelpKey::CaloIsoHelpKey
CaloIsoHelpKey(IDataHandleHolder *owningAlg)
constructor
Definition: IsolationBuilder.cxx:184
xAOD::Iso::IsolationFlavour
IsolationFlavour
Enumeration for different ways of calculating isolation in xAOD files.
Definition: IsolationFlavour.h:17
xAOD::Iso::toString
std::string toString(const IsoType &iso)
Definition: IsolationHelpers.h:59
IsolationBuilder::m_mucorInts
Gaudi::Property< std::vector< std::vector< int > > > m_mucorInts
Definition: IsolationBuilder.h:206
IsolationBuilder::TrackIsoHelpHandles::TrackIsoHelpHandles
TrackIsoHelpHandles(const TrackIsoHelpKey &keys)
Definition: IsolationBuilder.cxx:246
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
IsolationBuilder::m_ElectronContainerName
Gaudi::Property< std::string > m_ElectronContainerName
Containers (Is it best to make them as strings? Used by multiple handles)
Definition: IsolationBuilder.h:72
skel.it
it
Definition: skel.GENtoEVGEN.py:396
IsolationBuilder.h
xAOD::TrackCorrection::trackbitset
Iso::IsolationTrackCorrectionBitset trackbitset
Definition: IsolationCommon.h:19
IsolationBuilder::TrackIsoHelpKey::coreCorDeco
std::map< xAOD::Iso::IsolationTrackCorrection, SG::WriteDecorHandleKey< xAOD::IParticleContainer > > coreCorDeco
The corrections.
Definition: IsolationBuilder.h:301
IsolationBuilder::TrackIsoHelpHandles::isoDeco
std::vector< SG::WriteDecorHandle< xAOD::IParticleContainer, float > > isoDeco
Definition: IsolationBuilder.h:340
IsolationBuilder::m_phisoInts
Gaudi::Property< std::vector< std::vector< int > > > m_phisoInts
Isolation types (for the alg.
Definition: IsolationBuilder.h:175
IsolationBuilder::TrackIsoHelpKey::declare
void declare(IDataHandleHolder *owningAlg)
only to be called after placed in the final location, to propagate dependencies
Definition: IsolationBuilder.cxx:216
IsolationBuilder::m_MuonContainerName
Gaudi::Property< std::string > m_MuonContainerName
Definition: IsolationBuilder.h:90
IsolationBuilder::TrackIsoHelpHandles::isoDecoV
std::vector< SG::WriteDecorHandle< xAOD::IParticleContainer, float > > isoDecoV
Definition: IsolationBuilder.h:341
IsolationBuilder::m_FwdElectronContainerName
Gaudi::Property< std::string > m_FwdElectronContainerName
Definition: IsolationBuilder.h:78
xAOD::Iso::etcone
@ etcone
Calorimeter isolation.
Definition: IsolationFlavour.h:19
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
xAOD::EgammaHelpers::getTrackParticles
std::set< const xAOD::TrackParticle * > getTrackParticles(const xAOD::Egamma *eg, bool useBremAssoc=true, bool allParticles=true)
Return a list of all or only the best TrackParticle associated to the object.
Definition: EgammaxAODHelpers.cxx:120
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
xAOD::Iso::neflowisol
@ neflowisol
neutral eflow
Definition: IsolationFlavour.h:31
IsolationBuilder::m_isTrigger
Gaudi::Property< bool > m_isTrigger
is the alg run at trigger level
Definition: IsolationBuilder.h:137
IsolationBuilder::TrackIsoHelpKey
Definition: IsolationBuilder.h:286
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
IsolationBuilder::TrackIsoHelpKey::CorrList
xAOD::TrackCorrection CorrList
to keep track of the corrections
Definition: IsolationBuilder.h:307
xAOD::Iso::IsolationCorrectionParameter
IsolationCorrectionParameter
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:91
IsolationBuilder::m_elTrackIso
std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey > > m_elTrackIso
Definition: IsolationBuilder.h:314
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
IsolationBuilder::m_fecorInts
Gaudi::Property< std::vector< std::vector< int > > > m_fecorInts
Definition: IsolationBuilder.h:229
IsolationBuilder::addCaloIsoCorrections
StatusCode addCaloIsoCorrections(size_t flavor, xAOD::Iso::IsolationFlavour isoFlav, CaloIsoHelpKey &cisoH, const std::vector< std::vector< int >> &corInts, bool corrsAreExtra, const std::string &prefix, const std::string &customConfig)
called by initializeIso
Definition: IsolationBuilder.cxx:401
IsolationBuilder::TrackIsoHelpKey::isoTypes
std::vector< xAOD::Iso::IsolationType > isoTypes
the types of isolations to calculate
Definition: IsolationBuilder.h:304
IsolationBuilder::addTrackIsoCorrections
StatusCode addTrackIsoCorrections(size_t flavor, xAOD::Iso::IsolationFlavour isoFlav, TrackIsoHelpKey &tisoH, const std::vector< std::vector< int >> &corInts, bool corrsAreExtra, const std::string &prefix, const std::string &customConfig)
called by initializeIso
Definition: IsolationBuilder.cxx:472
IsolationBuilder::m_phcorIntsExtra
Gaudi::Property< std::vector< std::vector< int > > > m_phcorIntsExtra
Definition: IsolationBuilder.h:191
IsolationBuilder::~IsolationBuilder
virtual ~IsolationBuilder()
Destructor:
Egamma.h
IsolationBuilder::CaloIsoHelpHandles::corrBitsetDeco
SG::WriteDecorHandle< xAOD::IParticleContainer, uint32_t > corrBitsetDeco
Definition: IsolationBuilder.h:332
IsolationBuilder::TrackIsoHelpKey::corrBitsetDeco
SG::WriteDecorHandleKey< xAOD::IParticleContainer > corrBitsetDeco
Definition: IsolationBuilder.h:310
IsolationBuilder::CaloIsoHelpKey::CorrList
xAOD::CaloCorrection CorrList
to keep track of the corrections
Definition: IsolationBuilder.h:270
xAOD::Iso::core57cells
@ core57cells
core 5x7 cells
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:26
IsolationBuilder::m_customConfigPh
Gaudi::Property< std::string > m_customConfigPh
Definition: IsolationBuilder.h:356
xAOD::CaloIsolation
Definition: IsolationCommon.h:22
xAOD::Vertex_v1::setZ
void setZ(float value)
Sets the z position.
EgammaxAODHelpers.h
IsolationBuilder::m_cellsKey
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
Cell container.
Definition: IsolationBuilder.h:105
IsolationBuilder::initializeIso
StatusCode initializeIso(std::set< xAOD::Iso::IsolationFlavour > &runIsoType, std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey >> *caloIsoMap, std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey >> *trackIsoMap, const std::string &containerName, const std::vector< std::vector< int >> &isoInts, const std::vector< std::vector< int >> &corInts, const std::vector< std::vector< int >> &corIntsExtra, const std::string &customConfig)
called by algorithm initialize per object (electron, photon, forward electron, muon)
Definition: IsolationBuilder.cxx:269
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
lumiFormat.i
int i
Definition: lumiFormat.py:85
xAOD::TauJetParameters::caloIso
@ caloIso
Get sum of transvers energy of clusters around jet seed within 0.2 < dR < 0.4
Definition: TauDefs.h:222
xAOD::TrackIsolation::coreCorrections
std::map< Iso::IsolationTrackCorrection, float > coreCorrections
Definition: IsolationCommon.h:39
Photon.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::CaloIsolation::coreCorrections
std::map< Iso::IsolationCaloCorrection, std::map< Iso::IsolationCorrectionParameter, float > > coreCorrections
Definition: IsolationCommon.h:26
xAOD::EgammaHelpers::isElectron
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Definition: EgammaxAODHelpers.cxx:12
xAOD::Iso::IsolationType
IsolationType
Overall enumeration for isolation types in xAOD files.
Definition: IsolationType.h:26
IsolationBuilder::m_feisoInts
Gaudi::Property< std::vector< std::vector< int > > > m_feisoInts
Definition: IsolationBuilder.h:221
IsolationBuilder::TrackIsoHelpKey::isoDecoV
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainer > isoDecoV
Definition: IsolationBuilder.h:296
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
IsolationBuilder::m_phcorInts
Gaudi::Property< std::vector< std::vector< int > > > m_phcorInts
Definition: IsolationBuilder.h:183
IsolationBuilder::CaloIsoHelpHandles::isoDeco
std::vector< SG::WriteDecorHandle< xAOD::IParticleContainer, float > > isoDeco
Definition: IsolationBuilder.h:325
IsolationBuilder::executeTrackIso
StatusCode executeTrackIso(const std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey >> &trackIsoMap) const
Definition: IsolationBuilder.cxx:633
IsolationBuilder::CaloIsoHelpKey::corrBitsetDeco
SG::WriteDecorHandleKey< xAOD::IParticleContainer > corrBitsetDeco
Definition: IsolationBuilder.h:273
TileDCSDataPlotter.pr
pr
Definition: TileDCSDataPlotter.py:922
IsolationBuilder::m_muTrackIso
std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey > > m_muTrackIso
Definition: IsolationBuilder.h:318
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
IsolationBuilder::m_pflowIsolationTool
ToolHandle< xAOD::INeutralEFlowIsolationTool > m_pflowIsolationTool
Tool for neutral pflow isolation calculation.
Definition: IsolationBuilder.h:121
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::Iso::ptcone
@ ptcone
Track isolation.
Definition: IsolationFlavour.h:22
IsolationBuilder::TrackIsoHelpKey::TrackIsoHelpKey
TrackIsoHelpKey(IDataHandleHolder *owningAlg)
constructor
Definition: IsolationBuilder.cxx:207
IsolationBuilder::TrackIsoHelpHandles::coreCorDeco
std::map< xAOD::Iso::IsolationTrackCorrection, SG::WriteDecorHandle< xAOD::IParticleContainer, float > > coreCorDeco
Definition: IsolationBuilder.h:344
IsolationBuilder::CaloIsoHelpHandles::noncoreCorDeco
std::map< xAOD::Iso::IsolationCaloCorrection, std::vector< SG::WriteDecorHandle< xAOD::IParticleContainer, float > > > noncoreCorDeco
Definition: IsolationBuilder.h:331
xAOD::Vertex_v1::trackParticle
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
Definition: Vertex_v1.cxx:249
xAOD::Vertex_v1::z
float z() const
Returns the z position.
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
IsolationBuilder::IsolationBuilder
IsolationBuilder()
Default constructor:
IsolationBuilder::CaloIsoHelpKey::isoTypes
std::vector< xAOD::Iso::IsolationType > isoTypes
the types of isolations to calculate
Definition: IsolationBuilder.h:267
IsolationBuilder::CaloIsoHelpKey::coreCorDeco
std::map< xAOD::Iso::IsolationCaloCorrection, SG::WriteDecorHandleKey< xAOD::IParticleContainer > > coreCorDeco
The corrections (one per flavor)
Definition: IsolationBuilder.h:259
IsolationBuilder::m_useBremAssoc
Gaudi::Property< bool > m_useBremAssoc
Definition: IsolationBuilder.h:140
IsolationBuilder::m_muisoInts
Gaudi::Property< std::vector< std::vector< int > > > m_muisoInts
Definition: IsolationBuilder.h:198
IsolationBuilder::CaloIsoHelpKey
Definition: IsolationBuilder.h:245
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
IsolationBuilder::CaloIsoHelpKey::isoDeco
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainer > isoDeco
The actual isolations.
Definition: IsolationBuilder.h:254
IsolationBuilder::m_fecorIntsExtra
Gaudi::Property< std::vector< std::vector< int > > > m_fecorIntsExtra
Definition: IsolationBuilder.h:237
xAOD::Iso::isolationFlavour
IsolationFlavour isolationFlavour(IsolationType type)
convert Isolation Type into Isolation Flavour
Definition: IsolationHelpers.h:47
IsolationBuilder::executeCaloIso
StatusCode executeCaloIso(const std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey >> &caloIsoMap, const CaloCellContainer *cellColl) const
Definition: IsolationBuilder.cxx:517
xAOD::TrackIsolation
Definition: IsolationCommon.h:33
xAOD::Iso::coreMuon
@ coreMuon
core for muons
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:23
xAOD::Iso::IsolationTrackCorrection
IsolationTrackCorrection
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:61
IsolationBuilder::CaloIsoHelpKey::declare
void declare(IDataHandleHolder *owningAlg)
only to be called after placed in the final location, to propagate dependencies
Definition: IsolationBuilder.cxx:192
IsolationBuilder::m_trackIsolationTool
ToolHandle< xAOD::ITrackIsolationTool > m_trackIsolationTool
Tool for neutral pflow isolation calculation.
Definition: IsolationBuilder.h:129
IsolationBuilder::m_cellIsolationTool
ToolHandle< xAOD::ICaloCellIsolationTool > m_cellIsolationTool
Tool for cell isolation calculation.
Definition: IsolationBuilder.h:97
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
xAOD::CaloIsolation::etcones
std::vector< float > etcones
Definition: IsolationCommon.h:30
xAOD::Iso::coreCone
@ coreCone
core energy (in dR<0.1).
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:29
IsolationBuilder::m_customConfigEl
Gaudi::Property< std::string > m_customConfigEl
Definition: IsolationBuilder.h:349
xAOD::Iso::numIsolationFlavours
@ numIsolationFlavours
Definition: IsolationFlavour.h:49
xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF
const xAOD::TrackParticle * getOriginalTrackParticleFromGSF(const xAOD::TrackParticle *trkPar)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the GSF Track Particle...
Definition: ElectronxAODHelpers.cxx:22
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:172
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
xAOD::Electron_v1
Definition: Electron_v1.h:34
IsolationBuilder::CaloIsoHelpKey::noncoreCorDeco
std::map< xAOD::Iso::IsolationCaloCorrection, SG::WriteDecorHandleKeyArray< xAOD::IParticleContainer > > noncoreCorDeco
The corrections (one per flavor/type combination)
Definition: IsolationBuilder.h:264
xAOD::TrackIsolation::ptcones
std::vector< float > ptcones
Definition: IsolationCommon.h:36
IsolationBuilder::m_PhotonContainerName
Gaudi::Property< std::string > m_PhotonContainerName
Definition: IsolationBuilder.h:84
IsolationBuilder::CaloIsoHelpHandles::CaloIsoHelpHandles
CaloIsoHelpHandles(const CaloIsoHelpKey &keys)
Definition: IsolationBuilder.cxx:228
xAOD::Iso::IsolationCaloCorrection
IsolationCaloCorrection
Enumeration for different ways of correcting isolation in xAOD files.
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:18
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
xAOD::Photon_v1
Definition: Photon_v1.h:37
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IsolationBuilder::m_phTrackIso
std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey > > m_phTrackIso
Definition: IsolationBuilder.h:316
IsolationBuilder::m_feCaloIso
std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey > > m_feCaloIso
Definition: IsolationBuilder.h:281
IsolationBuilder::TrackIsoHelpHandles
Definition: IsolationBuilder.h:336
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Electron.h
IsolationBuilder::isCoreCor
static bool isCoreCor(xAOD::Iso::IsolationCaloCorrection corr)
Definition: IsolationBuilder.cxx:262
xAOD::CaloIsolation::noncoreCorrections
std::map< Iso::IsolationCaloCorrection, std::vector< float > > noncoreCorrections
Definition: IsolationCommon.h:28
IsolationBuilder::m_mucorIntsExtra
Gaudi::Property< std::vector< std::vector< int > > > m_mucorIntsExtra
Definition: IsolationBuilder.h:214
IsolationBuilder::finalize
virtual StatusCode finalize() override final
Definition: IsolationBuilder.cxx:124
IsolationBuilder::CaloIsoHelpHandles::coreCorDeco
std::map< xAOD::Iso::IsolationCaloCorrection, SG::WriteDecorHandle< xAOD::IParticleContainer, float > > coreCorDeco
Definition: IsolationBuilder.h:328
xAOD::Iso::coneSize
float coneSize(IsolationConeSize type)
convert Isolation Size into cone size
Definition: IsolationHelpers.h:27
IsolationBuilder::m_topoIsolationTool
ToolHandle< xAOD::ICaloTopoClusterIsolationTool > m_topoIsolationTool
Tool for topo isolation calculation.
Definition: IsolationBuilder.h:113
IsolationBuilder::TrackIsoHelpHandles::corrBitsetDeco
SG::WriteDecorHandle< xAOD::IParticleContainer, uint32_t > corrBitsetDeco
Definition: IsolationBuilder.h:345
IsolationBuilder::m_elCaloIso
std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey > > m_elCaloIso
Definition: IsolationBuilder.h:277
IsolationBuilder::m_muCaloIso
std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey > > m_muCaloIso
Definition: IsolationBuilder.h:283
xAOD::CaloCorrection::calobitset
Iso::IsolationCaloCorrectionBitset calobitset
Definition: IsolationCommon.h:15
IsolationBuilder::m_elcorInts
Gaudi::Property< std::vector< std::vector< int > > > m_elcorInts
Definition: IsolationBuilder.h:158
xAOD::Iso::pileupCorrection
@ pileupCorrection
fully corrected
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:35
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37