ATLAS Offline Software
METTruthAssociator.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 // METTruthAssociator.cxx
8 // Implementation file for class METTruthAssociator
9 //
10 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
11 //
12 // Author: P Loch, S Resconi, TJ Khoo, AS Mete, MA Klein
14 
15 // METReconstruction includes
17 
18 #include "StoreGate/DataHandle.h"
19 
20 // xAOD EDM
22 #include "xAODJet/JetContainer.h"
23 #include "xAODMuon/MuonContainer.h"
29 
30 // Helpers
32 //#include "xAODEgamma/EgammaTruthxAODHelpers.h"
35 
36 // DeltaR calculation
38 
39 namespace met {
40 
41  using namespace xAOD;
42 
43  static const SG::AuxElement::ConstAccessor<std::vector<ElementLink<IParticleContainer> > > cacc_ghosttruth("GhostTruth");
44 
45  // Constructors
48  AsgTool(name),
50  {}
51 
52  // Destructor
55  = default;
56 
57  // Athena algtool's Hooks
60  {
62  ATH_MSG_VERBOSE ("Initializing " << name() << "...");
63  //initialise ReadHandleKeys
65  ATH_CHECK( m_recoJetKey.initialize());
66  ATH_CHECK( m_recoMuKey.initialize());
67  ATH_CHECK( m_recoGamKey.initialize());
68  ATH_CHECK( m_recoTauKey.initialize());
69  ATH_CHECK( m_truthEventKey.initialize());
70 
71  return StatusCode::SUCCESS;
72  }
73 
75  {
76  ATH_MSG_VERBOSE ("Finalizing " << name() << "...");
77  return StatusCode::SUCCESS;
78  }
79 
80  // executeTool
83  {
84  ATH_MSG_VERBOSE ("In execute: " << name() << "...");
85 
86  ATH_CHECK( associateJets(metMap) );
87 
89  if (!electronCont.isValid()) {
90  ATH_MSG_WARNING("Unable to retrieve input electron container " << m_recoElKey.key());
91  return StatusCode::FAILURE;
92  }
93 
94  ATH_MSG_DEBUG("Successfully retrieved electron collection");
95  if(fillAssocMap(metMap,electronCont.cptr()).isFailure()) {
96  ATH_MSG_WARNING("Unable to fill map with electron container " << m_recoElKey.key());
97  return StatusCode::FAILURE;
98  }
99 
101  if (!photonCont.isValid()) {
102  ATH_MSG_WARNING("Unable to retrieve input photon container " << m_recoGamKey.key());
103  return StatusCode::FAILURE;
104  }
105 
106  ATH_MSG_DEBUG("Successfully retrieved photon collection");
107  if(fillAssocMap(metMap,photonCont.cptr()).isFailure()) {
108  ATH_MSG_WARNING("Unable to fill map with photon container " << m_recoGamKey.key());
109  return StatusCode::FAILURE;
110  }
111 
113  if (!muonCont.isValid()) {
114  ATH_MSG_WARNING("Unable to retrieve input muon container " << m_recoMuKey.key());
115  return StatusCode::FAILURE;
116  }
117 
118  ATH_MSG_DEBUG("Successfully retrieved muon collection");
119  if(fillAssocMap(metMap,muonCont.cptr()).isFailure()) {
120  ATH_MSG_WARNING("Unable to fill map with muon container " << m_recoMuKey.key());
121  return StatusCode::FAILURE;
122  }
123 
125  if (!tauCont.isValid()) {
126  ATH_MSG_WARNING("Unable to retrieve input tau container " << m_recoTauKey.key());
127  return StatusCode::FAILURE;
128  }
129  ATH_MSG_DEBUG("Successfully retrieved tau collection");
130  if(fillAssocMap(metMap,tauCont.cptr()).isFailure()) {
131  ATH_MSG_WARNING("Unable to fill map with tau container " << m_recoTauKey.key());
132  return StatusCode::FAILURE;
133  }
134 
135  if( computeSoftTerms(metCont,metMap).isFailure() ) {
136  ATH_MSG_WARNING("Unable to build truth core soft terms.");
137  return StatusCode::FAILURE;
138  }
139 
140  return StatusCode::SUCCESS;
141  }
142 
143  //*********************************************************************************************************
144  // Build jet and soft contributions
145 
147  {
148  // Retrieve the jet container
150  if (!jetCont.isValid()) {
151  ATH_MSG_WARNING("Unable to retrieve input jet container " << m_recoJetKey.key());
152  return StatusCode::FAILURE;
153  }
154  ATH_MSG_DEBUG("Successfully retrieved jet collection");
155 
156  // Create jet associations
157  std::vector<const IParticle*> chargedTruth;
158  std::vector<const IParticle*> jetTruth;
159  std::vector<ElementLink<IParticleContainer> > jetconst;
160  jetTruth.reserve(20);
161  for(const auto *const jet : *jetCont) {
162  jetTruth.clear();
163  jetconst.clear();
166  if(!cacc_ghosttruth.isAvailable(*jet)) {
167  ATH_MSG_WARNING("Failed to extract ghost truth particles from jet");
168  } else {
169  for (const auto& el : cacc_ghosttruth(*jet)) {
170  if(el.isValid()) {
171  const xAOD::TruthParticle *truth = static_cast<const xAOD::TruthParticle*>(*el);
172  ATH_MSG_VERBOSE("Jet contains truth particle " << truth);
173  if(fabs(truth->charge())>1e-6) {
174  trkvec += *truth;
175  }
176  if(!truth->isMuon()) {
177  jetconst.push_back(el);
178  jetTruth.push_back(truth);
179  truthvec += *truth;
180  }
181  }
182  }
183  }
184 
185  MissingETComposition::add(metMap,jet,jetconst,trkvec);
186  MissingETComposition::insert(metMap,jet,jet,jetTruth);
187  ATH_MSG_VERBOSE("Added association " << metMap->findIndex(jet) << " pointing to jet " << jet);
188  ATH_MSG_VERBOSE("Jet pt, eta, phi = " << jet->pt() << ", " << jet->eta() << "," << jet->phi() );
189  ATH_MSG_VERBOSE("Jet truthvec pt = " << truthvec.cpt() );
190  ATH_MSG_VERBOSE("Jet trkvec pt = " << trkvec.cpt() );
191  }
192 
194  ATH_MSG_DEBUG("Added miscellaneous association");
195 
196  return StatusCode::SUCCESS;
197  }
198 
200  {
201  // Add MET terms to the container
202  // Always do this in order that the terms exist even if the method fails
204  metCont->push_back(metCoreAllTruth);
205  MissingET* metCoreChargedTruth = new MissingET(0.,0.,0.,"SoftTruthChargedCore",MissingETBase::Source::softEvent() | MissingETBase::Source::truthInt() | MissingETBase::Source::Category::ID);
206  metCont->push_back(metCoreChargedTruth);
208  metCont->push_back(metCoreChargedCentralTruth);
209 
210  ATH_MSG_VERBOSE("Added core terms.");
211 
212  // Retrieve the truth container
214  if (!truthEventCont.isValid()) {
215  ATH_MSG_WARNING("Unable to retrieve input truthEvent container " << m_truthEventKey.key());
216  return StatusCode::FAILURE;
217  }
218 
219  // First truth event is the hard scatter
220  const TruthEvent* hsevent = truthEventCont->front();
222  for(size_t itp=0; itp<hsevent->nTruthParticles(); ++itp) {
223  const xAOD::TruthParticle* tp = hsevent->truthParticle(itp);
224  if(tp) {
225  truthParticleCont.push_back(tp);
226  ATH_MSG_VERBOSE("Extracted truth particle with index " << tp->index() );
227  }
228  }
229 
230  const IParticleContainer* uniqueTruth = metMap->getUniqueSignals(truthParticleCont.asDataVector(),MissingETBase::UsageHandler::TruthParticle);
231  ATH_MSG_VERBOSE("Extracted " << uniqueTruth->size() << "/" << truthParticleCont.size()
232  << " unique truth particles.");
233  for(const auto *const part : *uniqueTruth) {
234  const xAOD::TruthParticle* truth = static_cast<const xAOD::TruthParticle*>(part);
235  // stable
236  if(!truth->isGenStable()) continue;
237  // interacting
238  if(!MC::isInteracting(truth->pdgId())) continue;
239  if(truth->pt()<1 || fabs(truth->eta())>5) continue;
240  ATH_MSG_VERBOSE("Accepted soft truth particle with pt " << truth->pt()
241  << " status " << truth->status()
242  << " pdgId " << truth->pdgId() );
243  if(fabs(truth->charge())>1e-6) {
244  // in ID acceptance
245  if(fabs(truth->eta())<2.5) *metCoreChargedCentralTruth += truth;
246  *metCoreChargedTruth += truth;
247  }
248  if(!truth->isMuon()) *metCoreAllTruth += truth;
249  }
250  delete uniqueTruth;
251  return StatusCode::SUCCESS;
252  }
253 
254  //*********************************************************************************************************
255  // Get constituents
257  std::vector<const xAOD::IParticle*>& truthlist) const
258  {
259  switch(obj->type()) {
261  return extractTruthFromElectron(obj,truthlist);
262  case xAOD::Type::Photon:
263  return extractTruthFromPhoton(obj,truthlist);
264  case xAOD::Type::Muon:
265  return extractTruthFromMuon(obj,truthlist);
266  case xAOD::Type::Tau:
267  return extractTruthFromTau(obj,truthlist);
268  default:
269  ATH_MSG_WARNING("Invalid object type " << obj->type() << " passed to extractTruthParticle");
270  break;
271  }
272 
273  return StatusCode::FAILURE;
274  }
275 
277  std::vector<const xAOD::IParticle*>& truthlist) const
278  {
279  const xAOD::Electron* el = static_cast<const xAOD::Electron*>(obj);
280  // El --> TruthParticles
282  if(eltruth && eltruth->isGenStable())
283  truthlist.push_back(eltruth);
284 
285  // for(size_t iTrk=0; iTrk<el->nTrackParticles(); ++iTrk) {
286  // const TrackParticle* eltrk = EgammaHelpers::getOriginalTrackParticleFromGSF(el->trackParticle(iTrk));
287  // const xAOD::IParticle* truth(0);
288  // if(eltrk) truth = TruthHelpers::getTruthParticle( *eltrk );
289  // if(truth && truth!=eltruth) truthlist.push_back(truth);
290  // }
291 
292  // Retrieve the truth container
294  if (!truthEventCont.isValid()) {
295  ATH_MSG_WARNING("Unable to retrieve input truthEvent container " << m_truthEventKey.key());
296  return StatusCode::SUCCESS;
297  }
298 
299 
300  // First truth event is the hard scatter
301  const TruthEvent* hsevent = truthEventCont->front();
303  for(size_t itp=0; itp<hsevent->nTruthParticles(); ++itp) {
304  const xAOD::TruthParticle* tp = hsevent->truthParticle(itp);
305  if(tp) {
306  truthParticleCont.push_back(tp);
307  }
308  }
309 
310  for(const auto truth : truthParticleCont) {
311  if(truth->pt()<1) continue;
312  // stable
313  if(!truth->isGenStable()) continue;
314  // interacting
315  if(!MC::isInteracting(truth->pdgId())) continue;
316  float etasize = 0.025/2;
317  float phisize = 0.025/2;
318  bool isSuperCluster = false;
319  float Rsize = 0.;
320  switch(el->caloCluster()->clusterSize()) {
322  etasize *= 5; phisize *=5;
323  break;
325  etasize *= 3; phisize *=5;
326  break;
328  etasize *= 3; phisize *=7;
329  break;
331  isSuperCluster = true;
332  Rsize = el->caloCluster()->getMomentValue( xAOD::CaloCluster::SECOND_R );
333  if (Rsize<0.) {ATH_MSG_VERBOSE("Invalid SECOND_R moment retrieved!");}
334  break;
335  default:
336  ATH_MSG_WARNING("Unexpected electron cluster size " << el->caloCluster()->clusterSize() << " received!");
337  continue;
338  }
339  float deltaEta(fabs(truth->eta()-el->caloCluster()->eta()));
340  float deltaPhi(fabs(truth->p4().DeltaPhi(el->caloCluster()->p4())));
341  if( (isSuperCluster && (deltaEta*deltaEta+deltaPhi*deltaPhi)<Rsize*Rsize ) ||
342  (deltaEta<etasize && deltaPhi<phisize) ) {
343  bool skip(false);
344  for(const auto& truthobj : truthlist) {
345  const xAOD::TruthParticle *truth2 = static_cast<const xAOD::TruthParticle*>(truthobj);
346  if(truth==truth2) { skip = true; break;}
347  }
348  if(!skip) {
349  truthlist.push_back(truth);
350  }
351  }
352  }
353 
354  return StatusCode::SUCCESS;
355  }
356 
358  std::vector<const xAOD::IParticle*>& truthlist) const
359  {
360  const xAOD::Photon* ph = static_cast<const xAOD::Photon*>(obj);
361  // Ph --> TruthParticles
362  const xAOD::TruthParticle* phtruth = TruthHelpers::getTruthParticle( *ph );
363  if(phtruth && phtruth->isGenStable())
364  truthlist.push_back(phtruth);
365 
366  // std::vector<const xAOD::TrackParticle*> phtrks;
367  // for(size_t iVtx=0; iVtx<ph->nVertices(); ++iVtx) {
368  // const xAOD::Vertex* phvx = ph->vertex(iVtx);
369  // for(size_t iTrk=0; iTrk<phvx->nTrackParticles(); ++iTrk) {
370  // const xAOD::TrackParticle* phtrk = EgammaHelpers::getOriginalTrackParticleFromGSF(phvx->trackParticle(iTrk));
371  // bool duplicate = false;
372  // for(const auto& gamtrk : phtrks) {
373  // if( (duplicate = (phtrk == gamtrk)) ) {
374  // ATH_MSG_VERBOSE("Veto duplicate track");
375  // break;
376  // }
377  // }
378  // if(!duplicate) {
379  // const xAOD::IParticle* truth(0);
380  // if(phtrk) truth = TruthHelpers::getTruthParticle( *phtrk );
381  // if(truth && truth!=phtruth) truthlist.push_back(truth);
382  // }
383  // }
384  // }
385 
386  // Retrieve the truth container
388  if (!truthEventCont.isValid()) {
389  ATH_MSG_WARNING("Unable to retrieve input truthEvent container " << m_truthEventKey.key());
390  return StatusCode::SUCCESS;
391  }
392 
393  // First truth event is the hard scatter
394  const TruthEvent* hsevent = truthEventCont->front();
396  for(size_t itp=0; itp<hsevent->nTruthParticles(); ++itp) {
397  const xAOD::TruthParticle* tp = hsevent->truthParticle(itp);
398  if(tp) {
399  truthParticleCont.push_back(tp);
400  }
401  }
402 
403  for(const auto truth : truthParticleCont) {
404  if(!truth || truth->pt()<1) continue;
405  // stable
406  if(!truth->isGenStable()) continue;
407  // interacting
408  if(!MC::isInteracting(truth->pdgId())) continue;
409  float etasize(0.025/2);
410  float phisize(0.025/2);
411  bool isSuperCluster = false;
412  float Rsize = 0.;
413  switch(ph->caloCluster()->clusterSize()) {
416  etasize *= 5; phisize *=5;
417  break;
421  etasize *= 3; phisize *=5;
422  break;
425  etasize *= 3; phisize *=7;
426  break;
428  isSuperCluster = true;
430  if (Rsize<0.) {ATH_MSG_VERBOSE("Invalid SECOND_R moment retrieved!");}
431  break;
432  default:
433  ATH_MSG_WARNING("Unexpected photon cluster size " << ph->caloCluster()->clusterSize() << " received!");
434  continue;
435  }
436  float deltaEta(fabs(truth->eta()-ph->caloCluster()->eta()));
437  float deltaPhi(fabs(truth->p4().DeltaPhi(ph->caloCluster()->p4())));
438  if( (isSuperCluster && (deltaEta*deltaEta+deltaPhi*deltaPhi)<Rsize*Rsize ) ||
439  (deltaEta<etasize && deltaPhi<phisize) ) {
440  bool skip(false);
441  for(const auto& truthobj : truthlist) {
442  const xAOD::TruthParticle *truth2 = static_cast<const xAOD::TruthParticle*>(truthobj);
443  if(truth==truth2) { skip = true; break;}
444  }
445  if(!skip) {
446  truthlist.push_back(truth);
447  }
448  }
449  }
450 
451  return StatusCode::SUCCESS;
452  }
453 
455  std::vector<const xAOD::IParticle*>& truthlist)
456  {
457  const xAOD::Muon* mu = static_cast<const xAOD::Muon*>(obj);
458  const TrackParticle* trk = mu->primaryTrackParticle();
459  const xAOD::TruthParticle* truth(nullptr);
460  if(trk) truth = TruthHelpers::getTruthParticle( *trk );
461  if(truth && truth->isGenStable())
462  truthlist.push_back(truth);
463  return StatusCode::SUCCESS;
464  }
465 
467  std::vector<const xAOD::IParticle*>& truthlist) const
468  {
469  const TauJet* tau = static_cast<const TauJet*>(obj);
470  const Jet* seedjet = *tau->jetLink();
471  std::vector<ElementLink<IParticleContainer> > jetconst = cacc_ghosttruth(*seedjet);
472  for(const auto& truth : jetconst) {
473  if(truth) {
474  // TEMP: use jet seed axis
475  // taus will provide an accessor
476  if(!xAOD::P4Helpers::isInDeltaR(*seedjet,**truth,0.2,m_useRapidity)) continue;
477  truthlist.push_back(*truth);
478  }
479  }
480  return StatusCode::SUCCESS;
481  }
482 
483  //*********************************************************************************************************
484  // Override fill map method to use the extracted truth particles
485 
487  const xAOD::IParticleContainer* hardObjs) const
488  // std::vector<const xAOD::IParticle*>& mutracks)
489  {
490  std::vector<const IParticle*> constlist;
491  constlist.reserve(20);
492  std::vector<const IParticle*> hardObjs_tmp;
493  for(const auto *const obj : *hardObjs) {
494  hardObjs_tmp.push_back(obj);
495  }
496  std::sort(hardObjs_tmp.begin(),hardObjs_tmp.end(),greaterPt);
497 
498  for(const auto& obj : hardObjs_tmp) {
499  if(obj->pt()<5e3 && obj->type()!=xAOD::Type::Muon) continue;
500  constlist.clear();
501  ATH_MSG_VERBOSE( "Object type, pt, eta, phi = " << obj->type() << ", " << obj->pt() << ", " << obj->eta() << "," << obj->phi() );
502  ATH_CHECK( this->extractTruthParticles(obj,constlist) );
503 
504  // MissingETBase::Types::constvec_t chrgvec;
505  // MissingETBase::Types::constvec_t truthvec;
506 
507  for(const auto& truthobj : constlist) {
508  const xAOD::TruthParticle *truth = static_cast<const xAOD::TruthParticle*>(truthobj);
509  ATH_MSG_VERBOSE("Matched truth particle with pt " << truth->pt()
510  << " status " << truth->status()
511  << " pdgId " << truth->pdgId()
512  << " charge " << truth->charge());
513  ATH_MSG_VERBOSE("DeltaR to hard object: " << xAOD::P4Helpers::deltaR(*truth,*obj,m_useRapidity));
514 
515  // if(fabs(truth->charge())>1e-9)
516  // chrgvec += MissingETBase::Types::constvec_t(*truth);
517  // if(!truth->isMuon())
518  // truthvec += MissingETBase::Types::constvec_t(*truth);
519  }
520  // ATH_MSG_VERBOSE("Charged truth constvec: sumpt " << chrgvec.sumpt());
521  // ATH_MSG_VERBOSE("Calo truth constvec: sumpt " << truthvec.sumpt());
522 
523  MissingETComposition::insert(metMap,obj,constlist);
524  ATH_MSG_VERBOSE("\n\n");
525  }
526  return StatusCode::SUCCESS;
527  }
528 
529 }
xAOD::CaloCluster_v1::SECOND_R
@ SECOND_R
Second Moment in .
Definition: CaloCluster_v1.h:123
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
met::METTruthAssociator::fillAssocMap
StatusCode fillAssocMap(xAOD::MissingETAssociationMap *metMap, const xAOD::IParticleContainer *hardObjs) const final
Definition: METTruthAssociator.cxx:486
TruthTest.itp
itp
Definition: TruthTest.py:46
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
met::METTruthAssociator::m_recoGamKey
SG::ReadHandleKey< xAOD::PhotonContainer > m_recoGamKey
Definition: METTruthAssociator.h:92
MissingETBase::UsageHandler::TruthParticle
@ TruthParticle
Truth particle based.
Definition: MissingETCompositionBase.h:189
xAOD::CaloCluster_v1::getMomentValue
double getMomentValue(MomentType type) const
Retrieve individual moment - no check for existance! Returns -999 on error.
Definition: CaloCluster_v1.h:906
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
met::METTruthAssociator::extractTruthParticles
StatusCode extractTruthParticles(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist) const
Definition: METTruthAssociator.cxx:256
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
xAODP4Helpers.h
xAOD::MissingETComposition::addMiscAssociation
static bool addMiscAssociation(MissingETAssociationMap *pMap)
Add an association to hold objects not associated to any jet.
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:227
xAOD::CaloCluster_v1::SW_37Econv
@ SW_37Econv
Definition: CaloCluster_v1.h:98
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
xAOD::TruthEventBase_v1::truthParticle
const TruthParticle * truthParticle(size_t index) const
Get a pointer to one of the truth particles.
Definition: TruthEventBase_v1.cxx:50
xAOD::TruthParticle_v1::isGenStable
bool isGenStable() const
Check if this is generator stable particle.
Definition: TruthParticle_v1.cxx:316
xAOD::CaloCluster_v1::SuperCluster
@ SuperCluster
Definition: CaloCluster_v1.h:107
xAOD::CaloCluster_v1::SW_55gam
@ SW_55gam
Definition: CaloCluster_v1.h:92
ParticleTest.tp
tp
Definition: ParticleTest.py:25
MissingETBase::Source::Region::Central
@ Central
Indicator for MET contribution from the central region.
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
met::METTruthAssociator::m_recoJetKey
SG::ReadHandleKey< xAOD::JetContainer > m_recoJetKey
Definition: METTruthAssociator.h:95
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
met::METTruthAssociator::extractTruthFromElectron
StatusCode extractTruthFromElectron(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist) const
Definition: METTruthAssociator.cxx:276
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
xAODTruthHelpers.h
DataHandle.h
met::METAssociator::m_useRapidity
bool m_useRapidity
Definition: METAssociator.h:105
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
xAOD::MissingETAssociation_v1::ConstVec
Vector sum of constituents for subtractive overlap removal.
Definition: MissingETAssociation_v1.h:36
met::METTruthAssociator::m_truthEventKey
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventKey
Definition: METTruthAssociator.h:96
xAOD::CaloCluster_v1::SW_37gam
@ SW_37gam
Definition: CaloCluster_v1.h:94
xAOD::MissingETAssociationMap_v1
Definition: MissingETAssociationMap_v1.h:29
ConstDataVector::asDataVector
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
met::METTruthAssociator::finalize
StatusCode finalize()
Definition: METTruthAssociator.cxx:74
xAOD::CaloCluster_v1::SW_37ele
@ SW_37ele
Definition: CaloCluster_v1.h:90
xAOD::CaloCluster_v1::clusterSize
ClusterSize clusterSize() const
Get cluster size.
Definition: CaloCluster_v1.cxx:364
MissingETBase::Source::truthInt
static Types::bitmask_t truthInt(Region reg=Region::FullAcceptance)
Standard bit pattern indicating effective true MET.
Definition: MissingETBase.h:328
xAOD::MissingETComposition::insert
static bool insert(MissingETComponentMap *pMap, const MissingET *pMET, const IParticle *pPart, MissingETBase::Types::weight_t weight=MissingETBase::Types::weight_t())
Insert contributing signal or physics object by pointer, with optional kinematic weight object.
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:42
xAOD::CaloCluster_v1::SW_55Econv
@ SW_55Econv
Definition: CaloCluster_v1.h:96
met::METTruthAssociator::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: METTruthAssociator.cxx:59
EgammaxAODHelpers.h
met
Definition: IMETSignificance.h:24
met::METAssociator::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: METAssociator.cxx:85
xAOD::MissingETAssociationMap_v1::findIndex
size_t findIndex(const Jet *pJet) const
Definition: MissingETAssociationMap_v1.cxx:60
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
ElectronContainer.h
xAOD::TauHelpers::getTruthParticle
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle *, bool debug=false)
return the truthParticle associated to the given IParticle (if any)
Definition: TauxAODHelpers.cxx:10
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:53
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
MissingETBase::Source::Category::ID
@ ID
Indicator for MET terms reconstructed from inner detector (ID) tracks alone.
xAOD::P4Helpers::deltaR
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
Definition: xAODP4Helpers.h:150
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::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
xAOD::MissingETAssociationMap_v1::getUniqueSignals
const IParticleContainer * getUniqueSignals(const IParticleContainer *signals, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::TrackCluster) const
Extract a container of constituents that are not in jets.
Definition: MissingETAssociationMap_v1.cxx:218
xAOD::CaloCluster_v1::SW_35gam
@ SW_35gam
Definition: CaloCluster_v1.h:93
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
xAOD::TauJet_v3::jetLink
const JetLink_t & jetLink() const
xAOD::Egamma_v1::caloCluster
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
Definition: Egamma_v1.cxx:388
DataVector::front
const T * front() const
Access the first element in the collection as an rvalue.
MissingETBase::Source::Category::Calo
@ Calo
Indicator for MET terms reconstructed from calorimeter signals alone.
xAOD::MissingET_v1
Principal data object for Missing ET.
Definition: MissingET_v1.h:25
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
xAOD::TruthEvent_v1
Class describing a signal truth event in the MC record.
Definition: TruthEvent_v1.h:35
METTruthAssociator.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
met::METTruthAssociator::m_recoTauKey
SG::ReadHandleKey< xAOD::TauJetContainer > m_recoTauKey
Definition: METTruthAssociator.h:93
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
TauJetContainer.h
MissingET
Athena::TPCnvVers::Old Athena::TPCnvVers::Old MissingET
Definition: RecTPCnv.cxx:64
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
met::METTruthAssociator::~METTruthAssociator
~METTruthAssociator()
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
xAOD::CaloCluster_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: CaloCluster_v1.cxx:465
met::METAssociator
Definition: METAssociator.h:55
xAOD::MissingETContainer_v1
Container for xAOD::MissingET_v1 objects.
Definition: MissingETContainer_v1.h:21
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
xAOD::TruthEventBase_v1::nTruthParticles
size_t nTruthParticles() const
Get the number of truth particles.
ConstDataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAOD::CaloCluster_v1::SW_55ele
@ SW_55ele
Definition: CaloCluster_v1.h:88
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAOD::MissingETComposition::add
static bool add(MissingETComponentMap *pMap, const MissingET *pMET, MissingETBase::Types::bitmask_t sw=MissingETBase::Status::clearedStatus())
Adding a MissingET object to the map.
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:29
xAOD::CaloCluster_v1::SW_35Econv
@ SW_35Econv
Definition: CaloCluster_v1.h:97
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TruthParticle_v1.cxx:174
met::METTruthAssociator::extractTruthFromMuon
static StatusCode extractTruthFromMuon(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist)
Definition: METTruthAssociator.cxx:454
xAOD::Electron_v1
Definition: Electron_v1.h:34
met::METTruthAssociator::extractTruthFromTau
StatusCode extractTruthFromTau(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist) const
Definition: METTruthAssociator.cxx:466
MuonContainer.h
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
Muon
struct TBPatternUnitContext Muon
met::METTruthAssociator::associateJets
StatusCode associateJets(xAOD::MissingETAssociationMap *metMap) const
Definition: METTruthAssociator.cxx:146
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
met::METTruthAssociator::m_recoElKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_recoElKey
Definition: METTruthAssociator.h:91
xAOD::TruthParticle_v1::status
int status() const
Status code.
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
met::METTruthAssociator::METTruthAssociator
METTruthAssociator()
Default constructor:
JetContainer.h
xAOD::Photon_v1
Definition: Photon_v1.h:37
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition: ConstDataVector.h:76
xAOD::MissingETAssociation_v1::ConstVec::cpt
float cpt() const
Returns .
Definition: MissingETAssociation_v1.cxx:87
xAOD::TruthParticle_v1::isMuon
bool isMuon() const
Whether the particle is a muon (or antimuon)
met::METTruthAssociator::m_recoMuKey
SG::ReadHandleKey< xAOD::MuonContainer > m_recoMuKey
Definition: METTruthAssociator.h:94
met::METTruthAssociator::executeTool
StatusCode executeTool(xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const
Definition: METTruthAssociator.cxx:82
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:166
met::METTruthAssociator::extractTruthFromPhoton
StatusCode extractTruthFromPhoton(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist) const
Definition: METTruthAssociator.cxx:357
xAODType::Tau
@ Tau
The object is a tau (jet)
Definition: ObjectType.h:49
MC::isInteracting
bool isInteracting(const T &p)
Identify if the particle with given PDG ID would not interact with the detector, i....
Definition: HepMCHelpers.h:23
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
xAOD::P4Helpers::isInDeltaR
bool isInDeltaR(const xAOD::IParticle &p1, const xAOD::IParticle &p2, double dR, bool useRapidity=true)
Check if 2 xAOD::IParticle are in a cone.
Definition: xAODP4Helpers.h:174
skip
bool skip
Definition: TrigGlobEffCorrValidation.cxx:190
xAOD::CaloCluster_v1::SW_35ele
@ SW_35ele
Definition: CaloCluster_v1.h:89
TruthEventContainer.h
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
python.PyAthena.obj
obj
Definition: PyAthena.py:135
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
MissingETBase::Source::softEvent
static Types::bitmask_t softEvent(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed soft event.
Definition: MissingETBase.h:264
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
PhotonContainer.h
MissingETComposition.h
xAOD::TruthParticle_v1::charge
double charge() const
Physical charge.
HepMCHelpers.h
met::METTruthAssociator::computeSoftTerms
StatusCode computeSoftTerms(xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const
Definition: METTruthAssociator.cxx:199