ATLAS Offline Software
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
met::METTruthAssociator Class Referencefinal

#include <METTruthAssociator.h>

Inheritance diagram for met::METTruthAssociator:
Collaboration diagram for met::METTruthAssociator:

Public Member Functions

 METTruthAssociator (const std::string &name)
 
 ~METTruthAssociator ()
 
StatusCode initialize ()
 Dummy implementation of the initialisation function. More...
 
StatusCode finalize ()
 
virtual StatusCode execute (xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const override
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

StatusCode fillAssocMap (xAOD::MissingETAssociationMap *metMap, const xAOD::IParticleContainer *hardObjs) const final
 
StatusCode executeTool (xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const
 
StatusCode associateJets (xAOD::MissingETAssociationMap *metMap) const
 
StatusCode extractTruthParticles (const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist) const
 
StatusCode extractTruthFromElectron (const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist) const
 
StatusCode extractTruthFromPhoton (const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist) const
 
StatusCode extractTruthFromTau (const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist) const
 
StatusCode computeSoftTerms (xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const
 
StatusCode extractPFO (const xAOD::IParticle *, std::vector< const xAOD::IParticle * > &, const met::METAssociator::ConstitHolder &, std::map< const xAOD::IParticle *, MissingETBase::Types::constvec_t > &) const final
 
StatusCode extractFE (const xAOD::IParticle *, std::vector< const xAOD::IParticle * > &, const met::METAssociator::ConstitHolder &, std::map< const xAOD::IParticle *, MissingETBase::Types::constvec_t > &) const final
 
StatusCode extractTracks (const xAOD::IParticle *, std::vector< const xAOD::IParticle * > &, const met::METAssociator::ConstitHolder &) const final
 
StatusCode extractTopoClusters (const xAOD::IParticle *, std::vector< const xAOD::IParticle * > &, const met::METAssociator::ConstitHolder &) const final
 
StatusCode retrieveConstituents (met::METAssociator::ConstitHolder &constits) const
 
bool acceptTrack (const xAOD::TrackParticle *trk, const xAOD::Vertex *pv) const
 
bool isGoodEoverP (const xAOD::TrackParticle *trk) const
 
StatusCode GetUEcorr (const met::METAssociator::ConstitHolder &constits, std::vector< TLorentzVector > &v_clus, TLorentzVector &clus, TLorentzVector &HR, const float Drcone, const float MinDistCone, float &UEcorr) const
 
virtual StatusCode extractFEHR (const xAOD::IParticle *, std::vector< const xAOD::IParticle * >, std::vector< const xAOD::IParticle * > &, const met::METAssociator::ConstitHolder &, std::map< const xAOD::IParticle *, MissingETBase::Types::constvec_t > &, float &) const
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Static Protected Member Functions

static StatusCode extractTruthFromMuon (const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist)
 
static bool greaterPt (const xAOD::IParticle *part1, const xAOD::IParticle *part2)
 
static bool greaterPtPFO (const xAOD::PFO *part1, const xAOD::PFO *part2)
 
static bool greaterPtFE (const xAOD::FlowElement *part1, const xAOD::FlowElement *part2)
 

Protected Attributes

ToolHandle< InDet::IInDetTrackSelectionToolm_trkseltool
 
ToolHandle< xAOD::ITrackIsolationToolm_trkIsolationTool
 
ToolHandle< xAOD::ICaloTopoClusterIsolationToolm_caloIsolationTool
 
std::string m_neutralFELinksKey
 
std::string m_chargedFELinksKey
 
std::string m_neutralPFOLinksKey
 
std::string m_chargedPFOLinksKey
 
bool m_usePFOLinks
 
bool m_useFELinks
 
SG::ReadHandleKey< xAOD::VertexContainerm_pvcollKey {this,"PrimVxColl","PrimaryVertices","Primary Vertex Collection"}
 
SG::ReadHandleKey< xAOD::IParticleContainerm_clcollKey {this,"ClusColl","CaloCalTopoClusters","Topo cluster Collection"}
 
SG::ReadHandleKey< xAOD::TrackParticleContainerm_trkcollKey {this,"TrkColl","InDetTrackParticles","Track particle Collection"}
 
SG::ReadHandleKey< xAOD::PFOContainerm_pfcollKey {this,"PFlowColl","","PFO Collection"}
 
SG::ReadHandleKey< xAOD::FlowElementContainerm_fecollKey {this,"FlowElementCollection","","FlowElement Collection (overrides PFO if not empty)"}
 
SG::ReadHandleKey< xAOD::IParticleContainerm_hybridContKey {this,"HybridKey","","Hybrid Collection"}
 
Gaudi::Property< bool > m_recoil {this, "HRecoil", false, ""}
 
bool m_pflow
 
bool m_useTracks
 
bool m_useRapidity
 
bool m_useIsolationTools = false
 
bool m_useModifiedClus
 
bool m_weight_charged_pfo = false
 
bool m_cleanChargedPFO
 
bool m_skipconst
 
std::string m_forcoll
 
double m_foreta
 
double m_cenTrackPtThr
 
double m_forTrackPtThr
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

 METTruthAssociator ()
 Default constructor: More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< xAOD::ElectronContainerm_recoElKey {this,"RecoElKey","Electrons",""}
 
SG::ReadHandleKey< xAOD::PhotonContainerm_recoGamKey {this,"RecoGamKey","Photons",""}
 
SG::ReadHandleKey< xAOD::TauJetContainerm_recoTauKey {this,"RecoTauKey","TauJets",""}
 
SG::ReadHandleKey< xAOD::MuonContainerm_recoMuKey {this,"RecoMuKey","Muons",""}
 
SG::ReadHandleKey< xAOD::JetContainerm_recoJetKey {this,"RecoJetKey","",""}
 
SG::ReadHandleKey< xAOD::TruthEventContainerm_truthEventKey {this,"TruthEventKey","TruthEvents",""}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 26 of file METTruthAssociator.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ METTruthAssociator() [1/2]

met::METTruthAssociator::METTruthAssociator ( const std::string &  name)

Definition at line 47 of file METTruthAssociator.cxx.

47  :
48  AsgTool(name),
50  {}

◆ ~METTruthAssociator()

met::METTruthAssociator::~METTruthAssociator ( )
default

◆ METTruthAssociator() [2/2]

met::METTruthAssociator::METTruthAssociator ( )
private

Default constructor:

Member Function Documentation

◆ acceptTrack()

bool met::METAssociator::acceptTrack ( const xAOD::TrackParticle trk,
const xAOD::Vertex pv 
) const
protectedinherited

Definition at line 376 of file METAssociator.cxx.

377  {
378 
379  if (!vx) return false;//in events with no pv, we will just reject all tracks, and therefore build only the calo MET
380  return static_cast<bool> (m_trkseltool->accept( *trk, vx ));
381  }

◆ associateJets()

StatusCode met::METTruthAssociator::associateJets ( xAOD::MissingETAssociationMap metMap) const
protected

Definition at line 146 of file METTruthAssociator.cxx.

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  }

◆ computeSoftTerms()

StatusCode met::METTruthAssociator::computeSoftTerms ( xAOD::MissingETContainer metCont,
xAOD::MissingETAssociationMap metMap 
) const
protected

Definition at line 199 of file METTruthAssociator.cxx.

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  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode met::METAssociator::execute ( xAOD::MissingETContainer metCont,
xAOD::MissingETAssociationMap metMap 
) const
overridevirtualinherited

Implements IMETAssocToolBase.

Definition at line 150 of file METAssociator.cxx.

151  {
152  ATH_MSG_DEBUG ("In execute: " << name() << "...");
153  if(!metCont) {
154  ATH_MSG_WARNING("Invalid pointer to MissingETContainer supplied! Abort.");
155  return StatusCode::FAILURE;
156  }
157 
158  if(!metMap) {
159  ATH_MSG_WARNING("Invalid pointer to MissingETAssociationMap supplied! Abort.");
160  return StatusCode::FAILURE;
161  }
162  if(m_pflow && !m_useTracks ){
163  ATH_MSG_WARNING("Attempting to build PFlow MET without a track collection.");
164  return StatusCode::FAILURE;
165  }
166 
167  return this->executeTool(metCont, metMap);
168  }

◆ executeTool()

StatusCode met::METTruthAssociator::executeTool ( xAOD::MissingETContainer metCont,
xAOD::MissingETAssociationMap metMap 
) const
protectedvirtual

Implements met::METAssociator.

Definition at line 82 of file METTruthAssociator.cxx.

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  }

◆ extractFE()

StatusCode met::METTruthAssociator::extractFE ( const xAOD::IParticle ,
std::vector< const xAOD::IParticle * > &  ,
const met::METAssociator::ConstitHolder ,
std::map< const xAOD::IParticle *, MissingETBase::Types::constvec_t > &   
) const
inlinefinalprotectedvirtual

Implements met::METAssociator.

Definition at line 75 of file METTruthAssociator.h.

79  {return StatusCode::FAILURE;} // should not be called

◆ extractFEHR()

virtual StatusCode met::METAssociator::extractFEHR ( const xAOD::IParticle ,
std::vector< const xAOD::IParticle * >  ,
std::vector< const xAOD::IParticle * > &  ,
const met::METAssociator::ConstitHolder ,
std::map< const xAOD::IParticle *, MissingETBase::Types::constvec_t > &  ,
float &   
) const
inlineprotectedvirtualinherited

Reimplemented in met::METEgammaAssociator, and met::METMuonAssociator.

Definition at line 153 of file METAssociator.h.

159  {return StatusCode::FAILURE;}

◆ extractPFO()

StatusCode met::METTruthAssociator::extractPFO ( const xAOD::IParticle ,
std::vector< const xAOD::IParticle * > &  ,
const met::METAssociator::ConstitHolder ,
std::map< const xAOD::IParticle *, MissingETBase::Types::constvec_t > &   
) const
inlinefinalprotectedvirtual

Implements met::METAssociator.

Definition at line 70 of file METTruthAssociator.h.

74  {return StatusCode::FAILURE;} // should not be called

◆ extractTopoClusters()

StatusCode met::METTruthAssociator::extractTopoClusters ( const xAOD::IParticle ,
std::vector< const xAOD::IParticle * > &  ,
const met::METAssociator::ConstitHolder  
) const
inlinefinalprotectedvirtual

Implements met::METAssociator.

Definition at line 84 of file METTruthAssociator.h.

87  {return StatusCode::FAILURE;} // should not be called

◆ extractTracks()

StatusCode met::METTruthAssociator::extractTracks ( const xAOD::IParticle ,
std::vector< const xAOD::IParticle * > &  ,
const met::METAssociator::ConstitHolder  
) const
inlinefinalprotectedvirtual

Implements met::METAssociator.

Definition at line 80 of file METTruthAssociator.h.

83  {return StatusCode::FAILURE;} // should not be called

◆ extractTruthFromElectron()

StatusCode met::METTruthAssociator::extractTruthFromElectron ( const xAOD::IParticle obj,
std::vector< const xAOD::IParticle * > &  truthlist 
) const
protected

Definition at line 276 of file METTruthAssociator.cxx.

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  }

◆ extractTruthFromMuon()

StatusCode met::METTruthAssociator::extractTruthFromMuon ( const xAOD::IParticle obj,
std::vector< const xAOD::IParticle * > &  truthlist 
)
staticprotected

Definition at line 454 of file METTruthAssociator.cxx.

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  }

◆ extractTruthFromPhoton()

StatusCode met::METTruthAssociator::extractTruthFromPhoton ( const xAOD::IParticle obj,
std::vector< const xAOD::IParticle * > &  truthlist 
) const
protected

Definition at line 357 of file METTruthAssociator.cxx.

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  }

◆ extractTruthFromTau()

StatusCode met::METTruthAssociator::extractTruthFromTau ( const xAOD::IParticle obj,
std::vector< const xAOD::IParticle * > &  truthlist 
) const
protected

Definition at line 466 of file METTruthAssociator.cxx.

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  }

◆ extractTruthParticles()

StatusCode met::METTruthAssociator::extractTruthParticles ( const xAOD::IParticle obj,
std::vector< const xAOD::IParticle * > &  truthlist 
) const
protected

Definition at line 256 of file METTruthAssociator.cxx.

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  }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ fillAssocMap()

StatusCode met::METTruthAssociator::fillAssocMap ( xAOD::MissingETAssociationMap metMap,
const xAOD::IParticleContainer hardObjs 
) const
finalprotectedvirtual

Reimplemented from met::METAssociator.

Definition at line 486 of file METTruthAssociator.cxx.

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  }

◆ finalize()

StatusCode met::METTruthAssociator::finalize ( )

Definition at line 74 of file METTruthAssociator.cxx.

75  {
76  ATH_MSG_VERBOSE ("Finalizing " << name() << "...");
77  return StatusCode::SUCCESS;
78  }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ GetUEcorr()

StatusCode met::METAssociator::GetUEcorr ( const met::METAssociator::ConstitHolder constits,
std::vector< TLorentzVector > &  v_clus,
TLorentzVector &  clus,
TLorentzVector &  HR,
const float  Drcone,
const float  MinDistCone,
float &  UEcorr 
) const
protectedinherited

Definition at line 446 of file METAssociator.cxx.

453  {
454  // 1. Get random phi
455  unsigned int seed = 0;
456  TRandom3 hole;
457  if( !v_clus.empty() ){
458  seed = floor( v_clus.back().Pt() * Gaudi::Units::GeV );
459  hole.SetSeed(seed);
460  }
461 
462  bool isNextToPart(true);
463  bool isNextToHR(true);
464  double phiRnd(0.);
465 
466  int numOfRndTrials = 0; // Counter for trials to find random cone without overlaps
467  const int maxNumOfRndTrials = 100; // Max. number of trials to find random cone without overlaps
468 
469  while(isNextToPart || isNextToHR ){
470  isNextToPart = false;
471  isNextToHR = true;
472 
473  phiRnd = hole.Uniform( -std::numbers::pi, std::numbers::pi);
474  double dR = P4Helpers::deltaR( HR.Eta(), HR.Phi(), clus.Eta(), phiRnd );
475  if(dR > MinDistCone){
476  isNextToHR = false;
477  }
478 
479  for(const auto& clus_j : v_clus) { // loop over leptons
480  dR = P4Helpers::deltaR( clus.Eta(), phiRnd, clus_j.Eta(), clus_j.Phi() );
481  if(dR < MinDistCone){
482  isNextToPart = true;
483  break;
484  }
485  } // swclus_j
486 
487  numOfRndTrials++;
488  if(numOfRndTrials == maxNumOfRndTrials){ // check number of trials
489  UEcorr = 0.;
490  return StatusCode::SUCCESS;
491  }
492  } // while isNextToPart, isNextToHR
493 
494  ATH_MSG_DEBUG("Found rnd phi: " << phiRnd);
495 
496 
497  // 2. Calculete UE correction
498  TLorentzVector tv_UEcorr; // TLV of UE correction (initialized with 0,0,0,0 automatically)
499  std::pair <double, double> eta_rndphi = std::make_pair(clus.Eta(), phiRnd); // pair of current cluser eta and random phi
500 
501 
502  // Calculate delta phi -> always the same angle so its sufficient to calculate it only once
503  float dphi_angle=P4Helpers::deltaPhi(clus.Phi(),eta_rndphi.second);
504 
505  for(const auto fe_itr : *constits.feCont){ // loop over PFOs
506  if(fe_itr->pt() < 0 || fe_itr->e() < 0){ //sanity check
507  continue;
508  }
509 
510  //remove charged FE that are not matched to the PV
511  const static SG::ConstAccessor<char> PVMatchedAcc("matchedToPV");
512  if(fe_itr->isCharged() && !PVMatchedAcc(*fe_itr)){
513  continue;
514  }
515 
516  double dR = P4Helpers::deltaR( fe_itr->eta(), fe_itr->phi(), eta_rndphi.first, eta_rndphi.second );
517  if( dR < Drcone ){
518  // Rotate on dphi_angle
519  TLorentzVector tv_fe = fe_itr->p4();
520  tv_fe.RotateZ(dphi_angle);
521  tv_UEcorr += tv_fe; // summing PFOs of UE for correction
522  } // cone requirement
523  } // loop over PFOs
524 
525  UEcorr = tv_UEcorr.Pt(); // Pt of UE correction
526 
527  return StatusCode::SUCCESS;
528  }

◆ greaterPt()

static bool met::METAssociator::greaterPt ( const xAOD::IParticle part1,
const xAOD::IParticle part2 
)
inlinestaticprotectedinherited

Definition at line 167 of file METAssociator.h.

167  {
168  return part1->pt()>part2->pt();
169  }

◆ greaterPtFE()

static bool met::METAssociator::greaterPtFE ( const xAOD::FlowElement part1,
const xAOD::FlowElement part2 
)
inlinestaticprotectedinherited

Definition at line 176 of file METAssociator.h.

176  {
177  if (!(part1->isCharged()) && part2->isCharged()) return false;
178  if (part1->isCharged() && !(part2->isCharged())) return true;
179  return part1->pt() > part2->pt();
180  }

◆ greaterPtPFO()

static bool met::METAssociator::greaterPtPFO ( const xAOD::PFO part1,
const xAOD::PFO part2 
)
inlinestaticprotectedinherited

Definition at line 170 of file METAssociator.h.

170  {
171  if (part1->charge()==0 && part2->charge()!=0) return false;
172  if (part1->charge()!=0 && part2->charge()==0) return true;
173  if (part1->charge()==0 && part2->charge()==0) return part1->ptEM()>part2->ptEM();
174  return part1->pt()>part2->pt();
175  }

◆ initialize()

StatusCode met::METTruthAssociator::initialize ( )
virtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from met::METAssociator.

Definition at line 59 of file METTruthAssociator.cxx.

60  {
62  ATH_MSG_VERBOSE ("Initializing " << name() << "...");
63  //initialise ReadHandleKeys
67  ATH_CHECK( m_recoGamKey.initialize());
68  ATH_CHECK( m_recoTauKey.initialize());
69  ATH_CHECK( m_truthEventKey.initialize());
70 
71  return StatusCode::SUCCESS;
72  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isGoodEoverP()

bool met::METAssociator::isGoodEoverP ( const xAOD::TrackParticle trk) const
protectedinherited

Definition at line 384 of file METAssociator.cxx.

385  {
386 
387  if( (fabs(trk->eta())<1.5 && trk->pt()>m_cenTrackPtThr) ||
388  (fabs(trk->eta())>=1.5 && trk->pt()>m_forTrackPtThr) ) {
389 
390  // Get relative error on qoverp
391  float Rerr = Amg::error(trk->definingParametersCovMatrix(),4)/fabs(trk->qOverP());
392  ATH_MSG_VERBOSE( "Track momentum error (%): " << Rerr*100 );
393 
394  // first compute track and calo isolation variables
395  float ptcone20 = 0., isolfrac = 0., etcone10 = 0., EoverP = 0.;
396  // ptcone
397  TrackIsolation trkIsoResult;
398  std::vector<Iso::IsolationType> trkIsoCones;
399  trkIsoCones.push_back(xAOD::Iso::IsolationType::ptcone20);
400  xAOD::TrackCorrection trkIsoCorr;
402  m_trkIsolationTool->trackIsolation(trkIsoResult,
403  *trk,
404  trkIsoCones,
405  trkIsoCorr);
406  ptcone20 = !trkIsoResult.ptcones.empty() ? trkIsoResult.ptcones[0] : 0;
407  isolfrac = ptcone20/trk->pt();
408  // etcone
409  CaloIsolation caloIsoResult;
410  std::vector<Iso::IsolationType> caloIsoCones;
411  // We can't actually configure the tool to give etcone10, so instead we have to compute etcone20,
412  // applying the core cone correction.
413  // Then, we retrieve the correction value, which is etcone10, rather than the isolation value
414  caloIsoCones.push_back(xAOD::Iso::IsolationType::etcone20);
415  xAOD::CaloCorrection caloIsoCorr_coreCone;
416  caloIsoCorr_coreCone.calobitset.set(xAOD::Iso::IsolationCaloCorrection::coreCone); // this is etcone10
417  m_caloIsolationTool->caloTopoClusterIsolation(caloIsoResult,
418  *trk,
419  caloIsoCones,
420  caloIsoCorr_coreCone);
421  if(!caloIsoResult.etcones.empty()) {
422  // retrieve the correction value for the core cone
424  } else {
425  ATH_MSG_WARNING("isGoodEoverP: Failed to retrieve the isolation core correction (etcone10)! Setting etcone10=0");
426  etcone10 = 0.;
427  }
428  EoverP = etcone10/trk->pt();
430  ATH_MSG_VERBOSE( "Track isolation fraction: " << isolfrac );
431  ATH_MSG_VERBOSE( "Track E/P = " << EoverP );
432 
433  if(isolfrac<0.1) {
434  // isolated track cuts
435  if(Rerr>0.4) return false;
436  else if (EoverP<0.65 && ((EoverP>0.1 && Rerr>0.05) || Rerr>0.1)) return false;
437  } else {
438  // non-isolated track cuts
439  float trkptsum = ptcone20+trk->pt();
440  if(etcone10/trkptsum<0.6 && trk->pt()/trkptsum>0.6) return false;
441  }
442  }
443  return true;
444  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ retrieveConstituents()

StatusCode met::METAssociator::retrieveConstituents ( met::METAssociator::ConstitHolder constits) const
protectedinherited

Definition at line 170 of file METAssociator.cxx.

171  {
172  ATH_MSG_DEBUG ("In execute: " << name() << "...");
173  if (!m_skipconst || m_forcoll.empty()) {
174 
176  if (!topoclusterCont.isValid()) {
177  ATH_MSG_WARNING("Unable to retrieve topocluster container " << m_clcollKey.key() << " for overlap removal");
178  return StatusCode::FAILURE;
179  }
180  constits.tcCont=topoclusterCont.cptr();
181  ATH_MSG_DEBUG("Successfully retrieved topocluster collection");
182  } else {
183  std::string hybridname = "Etmiss";
184  hybridname += m_clcollKey.key();
185  hybridname += m_foreta;
186  hybridname += m_forcoll;
187 
189  if( hybridCont.isValid()) {
190  constits.tcCont=hybridCont.cptr();
191  } else {
192  ATH_MSG_WARNING("Trying to do something currently unsupported- lets abort");
193  return StatusCode::FAILURE;
194  // Trying to do this using write handles (need to get some input here)
195  /*std::unique_ptr<ConstDataVector<IParticleContainer>> hybridCont = std::make_unique<ConstDataVector<IParticleContainer>>();
196  SG::WriteHandle<ConstDataVector<IParticleContainer>> hybridContHandle(hybridname);
197 
198  StatusCode sc = hybridContHandle.record(std::make_unique<ConstDataVector<IParticleContainer>>(*hybridCont));
199 
200  if (sc.isFailure()) {
201  ATH_MSG_WARNING("Unable to record container");
202  return StatusCode::SUCCESS;
203 
204  }*/
205 
206  /*SG::ReadHandle<IParticleContainer> centCont(m_clcoll);
207  if (!centCont.isValid()) {
208  ATH_MSG_WARNING("Unable to retrieve central container " << m_clcoll << " for overlap removal");
209  return StatusCode::FAILURE;
210  }
211 
212  SG::ReadHandle<IParticleContainer> forCont(m_forcoll);
213  if (!forCont.isValid()) {
214  ATH_MSG_WARNING("Unable to retrieve forward container " << m_forcoll << " for overlap removal");
215  return StatusCode::FAILURE;
216  }
217  ConstDataVector<IParticleContainer> *hybridCont = new ConstDataVector<IParticleContainer>(SG::VIEW_ELEMENTS);
218 
219  const IParticleContainer* centCont=0;
220  if( evtStore()->retrieve(centCont, m_clcoll).isFailure() ) {
221  ATH_MSG_WARNING("Unable to retrieve central container " << m_clcoll << " for overlap removal");
222  return StatusCode::FAILURE;
223  }
224 
225  const IParticleContainer* forCont=0;
226  if( evtStore()->retrieve(forCont, m_forcoll).isFailure() ) {
227  ATH_MSG_WARNING("Unable to retrieve forward container " << m_forcoll << " for overlap removal");
228  return StatusCode::FAILURE;
229  }
230 
231  for(const auto clus : *centCont) if (fabs(clus->eta())<m_foreta) hybridCont->push_back(clus);
232  for(const auto clus : *forCont) if (fabs(clus->eta())>=m_foreta) hybridCont->push_back(clus);
233  ATH_CHECK( evtStore()->record(hybridCont,hybridname));
234  constits.tcCont = hybridCont->asDataVector();
235  */
236  }
237  }
238 
239  if( !m_useTracks){
240  //if you want to skip tracks, set the track collection empty manually
241  ATH_MSG_DEBUG("Skipping tracks");
242  }else{
244  if (!vxCont.isValid()) {
245  ATH_MSG_WARNING("Unable to retrieve primary vertex container " << m_pvcollKey.key());
246  //this is actually really bad. If it's empty that's okay
247  return StatusCode::FAILURE;
248  }
249 
250  ATH_MSG_DEBUG("Successfully retrieved primary vertex container");
251  ATH_MSG_DEBUG("Container holds " << vxCont->size() << " vertices");
252 
253  for(const auto *const vx : *vxCont) {
254  ATH_MSG_VERBOSE( "Testing vertex " << vx->index() );
255  if(vx->vertexType()==VxType::PriVtx)
256  {constits.pv = vx; break;}
257  }
258  if(!constits.pv) {
259  ATH_MSG_DEBUG("Failed to find primary vertex! Reject all tracks.");
260  } else {
261  ATH_MSG_VERBOSE("Primary vertex has z = " << constits.pv->z());
262  }
263 
264  constits.trkCont=nullptr;
265  ATH_MSG_DEBUG("Retrieving Track collection " << m_trkcollKey.key());
267  if (!trCont.isValid()) {
268  ATH_MSG_WARNING("Unable to retrieve track particle container");
269  return StatusCode::FAILURE;
270  }
271  constits.trkCont=trCont.cptr();
272 
273  if(m_pflow){
274  if(!m_fecollKey.key().empty()){
275  ATH_MSG_DEBUG("Retrieving FlowElement collection " << m_fecollKey.key());
276  constits.feCont = nullptr;
278  if (!feCont.isValid()) {
279  ATH_MSG_ERROR("Unable to retrieve FlowElement container "<< m_fecollKey.key());
280  return StatusCode::FAILURE;
281  }
282  constits.feCont=feCont.cptr();
283  }
284  else{
285  ATH_MSG_DEBUG("Retrieving PFlow collection " << m_pfcollKey.key());
286  constits.pfoCont = nullptr;
288  if (!pfCont.isValid()) {
289  ATH_MSG_WARNING("Unable to PFlow object container");
290  return StatusCode::FAILURE;
291  }
292  constits.pfoCont=pfCont.cptr();
293  }
294  }//pflow
295  }//retrieve track/pfo containers
296 
297  return StatusCode::SUCCESS;
298  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_caloIsolationTool

ToolHandle<xAOD::ICaloTopoClusterIsolationTool> met::METAssociator::m_caloIsolationTool
protectedinherited

Definition at line 87 of file METAssociator.h.

◆ m_cenTrackPtThr

double met::METAssociator::m_cenTrackPtThr
protectedinherited

Definition at line 118 of file METAssociator.h.

◆ m_chargedFELinksKey

std::string met::METAssociator::m_chargedFELinksKey
protectedinherited

Definition at line 90 of file METAssociator.h.

◆ m_chargedPFOLinksKey

std::string met::METAssociator::m_chargedPFOLinksKey
protectedinherited

Definition at line 92 of file METAssociator.h.

◆ m_clcollKey

SG::ReadHandleKey<xAOD::IParticleContainer> met::METAssociator::m_clcollKey {this,"ClusColl","CaloCalTopoClusters","Topo cluster Collection"}
protectedinherited

Definition at line 97 of file METAssociator.h.

◆ m_cleanChargedPFO

bool met::METAssociator::m_cleanChargedPFO
protectedinherited

Definition at line 112 of file METAssociator.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_fecollKey

SG::ReadHandleKey<xAOD::FlowElementContainer> met::METAssociator::m_fecollKey {this,"FlowElementCollection","","FlowElement Collection (overrides PFO if not empty)"}
protectedinherited

Definition at line 100 of file METAssociator.h.

◆ m_forcoll

std::string met::METAssociator::m_forcoll
protectedinherited

Definition at line 115 of file METAssociator.h.

◆ m_foreta

double met::METAssociator::m_foreta
protectedinherited

Definition at line 116 of file METAssociator.h.

◆ m_forTrackPtThr

double met::METAssociator::m_forTrackPtThr
protectedinherited

Definition at line 119 of file METAssociator.h.

◆ m_hybridContKey

SG::ReadHandleKey<xAOD::IParticleContainer> met::METAssociator::m_hybridContKey {this,"HybridKey","","Hybrid Collection"}
protectedinherited

Definition at line 101 of file METAssociator.h.

◆ m_neutralFELinksKey

std::string met::METAssociator::m_neutralFELinksKey
protectedinherited

Definition at line 89 of file METAssociator.h.

◆ m_neutralPFOLinksKey

std::string met::METAssociator::m_neutralPFOLinksKey
protectedinherited

Definition at line 91 of file METAssociator.h.

◆ m_pfcollKey

SG::ReadHandleKey<xAOD::PFOContainer> met::METAssociator::m_pfcollKey {this,"PFlowColl","","PFO Collection"}
protectedinherited

Definition at line 99 of file METAssociator.h.

◆ m_pflow

bool met::METAssociator::m_pflow
protectedinherited

Definition at line 106 of file METAssociator.h.

◆ m_pvcollKey

SG::ReadHandleKey<xAOD::VertexContainer> met::METAssociator::m_pvcollKey {this,"PrimVxColl","PrimaryVertices","Primary Vertex Collection"}
protectedinherited

Definition at line 96 of file METAssociator.h.

◆ m_recoElKey

SG::ReadHandleKey<xAOD::ElectronContainer> met::METTruthAssociator::m_recoElKey {this,"RecoElKey","Electrons",""}
private

Definition at line 91 of file METTruthAssociator.h.

◆ m_recoGamKey

SG::ReadHandleKey<xAOD::PhotonContainer> met::METTruthAssociator::m_recoGamKey {this,"RecoGamKey","Photons",""}
private

Definition at line 92 of file METTruthAssociator.h.

◆ m_recoil

Gaudi::Property<bool> met::METAssociator::m_recoil {this, "HRecoil", false, ""}
protectedinherited

Definition at line 104 of file METAssociator.h.

◆ m_recoJetKey

SG::ReadHandleKey<xAOD::JetContainer> met::METTruthAssociator::m_recoJetKey {this,"RecoJetKey","",""}
private

Definition at line 95 of file METTruthAssociator.h.

◆ m_recoMuKey

SG::ReadHandleKey<xAOD::MuonContainer> met::METTruthAssociator::m_recoMuKey {this,"RecoMuKey","Muons",""}
private

Definition at line 94 of file METTruthAssociator.h.

◆ m_recoTauKey

SG::ReadHandleKey<xAOD::TauJetContainer> met::METTruthAssociator::m_recoTauKey {this,"RecoTauKey","TauJets",""}
private

Definition at line 93 of file METTruthAssociator.h.

◆ m_skipconst

bool met::METAssociator::m_skipconst
protectedinherited

Definition at line 114 of file METAssociator.h.

◆ m_trkcollKey

SG::ReadHandleKey<xAOD::TrackParticleContainer> met::METAssociator::m_trkcollKey {this,"TrkColl","InDetTrackParticles","Track particle Collection"}
protectedinherited

Definition at line 98 of file METAssociator.h.

◆ m_trkIsolationTool

ToolHandle<xAOD::ITrackIsolationTool> met::METAssociator::m_trkIsolationTool
protectedinherited

Definition at line 86 of file METAssociator.h.

◆ m_trkseltool

ToolHandle<InDet::IInDetTrackSelectionTool> met::METAssociator::m_trkseltool
protectedinherited

Definition at line 85 of file METAssociator.h.

◆ m_truthEventKey

SG::ReadHandleKey<xAOD::TruthEventContainer> met::METTruthAssociator::m_truthEventKey {this,"TruthEventKey","TruthEvents",""}
private

Definition at line 96 of file METTruthAssociator.h.

◆ m_useFELinks

bool met::METAssociator::m_useFELinks
protectedinherited

Definition at line 94 of file METAssociator.h.

◆ m_useIsolationTools

bool met::METAssociator::m_useIsolationTools = false
protectedinherited

Definition at line 109 of file METAssociator.h.

◆ m_useModifiedClus

bool met::METAssociator::m_useModifiedClus
protectedinherited

Definition at line 110 of file METAssociator.h.

◆ m_usePFOLinks

bool met::METAssociator::m_usePFOLinks
protectedinherited

Definition at line 93 of file METAssociator.h.

◆ m_useRapidity

bool met::METAssociator::m_useRapidity
protectedinherited

Definition at line 108 of file METAssociator.h.

◆ m_useTracks

bool met::METAssociator::m_useTracks
protectedinherited

Definition at line 107 of file METAssociator.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_weight_charged_pfo

bool met::METAssociator::m_weight_charged_pfo = false
protectedinherited

Definition at line 111 of file METAssociator.h.


The documentation for this class was generated from the following files:
met::METAssociator::m_forcoll
std::string m_forcoll
Definition: METAssociator.h:115
xAOD::CaloCluster_v1::SECOND_R
@ SECOND_R
Second Moment in .
Definition: CaloCluster_v1.h:126
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
met::METAssociator::greaterPt
static bool greaterPt(const xAOD::IParticle *part1, const xAOD::IParticle *part2)
Definition: METAssociator.h:167
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:74
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
met::METAssociator::m_foreta
double m_foreta
Definition: METAssociator.h:116
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
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:18
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:407
met::METTruthAssociator::m_recoGamKey
SG::ReadHandleKey< xAOD::PhotonContainer > m_recoGamKey
Definition: METTruthAssociator.h:92
xAOD::TrackCorrection
Definition: IsolationCommon.h:18
MissingETBase::UsageHandler::TruthParticle
@ TruthParticle
Truth particle based.
Definition: MissingETCompositionBase.h:189
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::CaloCluster_v1::getMomentValue
double getMomentValue(MomentType type) const
Retrieve individual moment - no check for existance! Returns -999 on error.
Definition: CaloCluster_v1.h:897
xAOD::Iso::coreEnergy
@ coreEnergy
energy stored for this correction
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:93
Jet
Basic data class defines behavior for all Jet objects The Jet class is the principal data class for...
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:47
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
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
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:101
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:78
xAOD::Iso::coreTrackPtr
@ coreTrackPtr
tracks pointer
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:66
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:161
met::METAssociator::m_forTrackPtThr
double m_forTrackPtThr
Definition: METAssociator.h:119
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
met::METAssociator::m_trkcollKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trkcollKey
Definition: METAssociator.h:98
xAOD::TruthParticle_v1::isGenStable
bool isGenStable() const
Check if this is generator stable particle.
Definition: TruthParticle_v1.cxx:311
xAOD::TrackCorrection::trackbitset
Iso::IsolationTrackCorrectionBitset trackbitset
Definition: IsolationCommon.h:19
met::METAssociator::m_trkseltool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkseltool
Definition: METAssociator.h:85
test_pyathena.pt
pt
Definition: test_pyathena.py:11
xAOD::Iso::ptcone20
@ ptcone20
Track isolation.
Definition: IsolationType.h:40
xAOD::CaloCluster_v1::SuperCluster
@ SuperCluster
Definition: CaloCluster_v1.h:110
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::CaloCluster_v1::SW_55gam
@ SW_55gam
Definition: CaloCluster_v1.h:95
ParticleTest.tp
tp
Definition: ParticleTest.py:25
MissingETBase::Source::Region::Central
@ Central
Indicator for MET contribution from the central region.
met::METAssociator::m_clcollKey
SG::ReadHandleKey< xAOD::IParticleContainer > m_clcollKey
Definition: METAssociator.h:97
met::METAssociator::ConstitHolder::pfoCont
const xAOD::PFOContainer * pfoCont
Definition: METAssociator.h:66
met::METAssociator::ConstitHolder::feCont
const xAOD::FlowElementContainer * feCont
Definition: METAssociator.h:67
met::METAssociator::m_pfcollKey
SG::ReadHandleKey< xAOD::PFOContainer > m_pfcollKey
Definition: METAssociator.h:99
SG::ConstAccessor< char >
met::METTruthAssociator::m_recoJetKey
SG::ReadHandleKey< xAOD::JetContainer > m_recoJetKey
Definition: METTruthAssociator.h:95
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
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
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
met::METTruthAssociator::extractTruthFromElectron
StatusCode extractTruthFromElectron(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist) const
Definition: METTruthAssociator.cxx:276
met::METAssociator::m_useRapidity
bool m_useRapidity
Definition: METAssociator.h:108
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:32
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:97
pi
#define pi
Definition: TileMuonFitter.cxx:65
met::METAssociator::m_fecollKey
SG::ReadHandleKey< xAOD::FlowElementContainer > m_fecollKey
Definition: METAssociator.h:100
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
met::METAssociator::METAssociator
METAssociator()
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
met::METAssociator::m_useTracks
bool m_useTracks
Definition: METAssociator.h:107
xAOD::CaloCluster_v1::SW_37ele
@ SW_37ele
Definition: CaloCluster_v1.h:93
met::METAssociator::m_pvcollKey
SG::ReadHandleKey< xAOD::VertexContainer > m_pvcollKey
Definition: METAssociator.h:96
met::METAssociator::m_cenTrackPtThr
double m_cenTrackPtThr
Definition: METAssociator.h:118
met::METAssociator::ConstitHolder::pv
const xAOD::Vertex * pv
Definition: METAssociator.h:68
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
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
part1
Definition: part1.py:1
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:99
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
met::METAssociator::ConstitHolder::tcCont
const xAOD::IParticleContainer * tcCont
Definition: METAssociator.h:65
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition: AsgTool.cxx:58
xAOD::CaloIsolation
Definition: IsolationCommon.h:22
P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: P4Helpers.h:34
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
met::METAssociator::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: METAssociator.cxx:95
xAOD::MissingETAssociationMap_v1::findIndex
size_t findIndex(const Jet *pJet) const
Definition: MissingETAssociationMap_v1.cxx:60
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
met::METAssociator::m_trkIsolationTool
ToolHandle< xAOD::ITrackIsolationTool > m_trkIsolationTool
Definition: METAssociator.h:86
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
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:66
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
xAOD::Iso::etcone20
@ etcone20
Calorimeter isolation.
Definition: IsolationType.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
xAOD::CaloIsolation::coreCorrections
std::map< Iso::IsolationCaloCorrection, std::map< Iso::IsolationCorrectionParameter, float > > coreCorrections
Definition: IsolationCommon.h:26
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
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:96
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
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:572
CalibDbCompareRT.dummy
dummy
Definition: CalibDbCompareRT.py:59
MissingETBase::Source::Category::Calo
@ Calo
Indicator for MET terms reconstructed from calorimeter signals alone.
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
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
met::METTruthAssociator::m_recoTauKey
SG::ReadHandleKey< xAOD::TauJetContainer > m_recoTauKey
Definition: METTruthAssociator.h:93
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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
P4Helpers::deltaR
double deltaR(const I4Momentum &p4, double eta, double phi)
from 1 I4Momentum
Definition: P4Helpers.h:209
MissingET
Athena::TPCnvVers::Old Athena::TPCnvVers::Old MissingET
Definition: RecTPCnv.cxx:64
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
part2
Definition: part2.py:1
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
xAOD::CaloCluster_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: CaloCluster_v1.cxx:465
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
xAOD::TrackIsolation
Definition: IsolationCommon.h:33
xAOD::TrackParticle_v1::qOverP
float qOverP() const
Returns the parameter.
xAOD::TrackParticle_v1::definingParametersCovMatrix
const ParametersCovMatrix_t definingParametersCovMatrix() const
Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.
Definition: TrackParticle_v1.cxx:247
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
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
xAOD::TruthEventBase_v1::nTruthParticles
size_t nTruthParticles() const
Get the number of truth particles.
xAOD::CaloCluster_v1::SW_55ele
@ SW_55ele
Definition: CaloCluster_v1.h:91
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:100
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TruthParticle_v1.cxx:169
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
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
xAOD::TrackIsolation::ptcones
std::vector< float > ptcones
Definition: IsolationCommon.h:36
Muon
struct TBPatternUnitContext Muon
met::METTruthAssociator::associateJets
StatusCode associateJets(xAOD::MissingETAssociationMap *metMap) const
Definition: METTruthAssociator.cxx:146
met::METTruthAssociator::m_recoElKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_recoElKey
Definition: METTruthAssociator.h:91
xAOD::TruthParticle_v1::status
int status() const
Status code.
met::METAssociator::executeTool
virtual StatusCode executeTool(xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const =0
a
TList * a
Definition: liststreamerinfos.cxx:10
h
met::METAssociator::m_hybridContKey
SG::ReadHandleKey< xAOD::IParticleContainer > m_hybridContKey
Definition: METAssociator.h:101
xAOD::Photon_v1
Definition: Photon_v1.h:37
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
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:85
MissingET
Definition: Reconstruction/MissingETEvent/MissingETEvent/MissingET.h:23
xAOD::CaloCorrection
Definition: IsolationCommon.h:14
xAOD::TruthParticle_v1::isMuon
bool isMuon() const
Whether the particle is a muon (or antimuon)
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
met::METAssociator::m_pflow
bool m_pflow
Definition: METAssociator.h:106
met::METTruthAssociator::m_recoMuKey
SG::ReadHandleKey< xAOD::MuonContainer > m_recoMuKey
Definition: METTruthAssociator.h:94
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:161
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
Trk::hole
@ hole
Definition: MeasurementType.h:36
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:33
met::METAssociator::m_skipconst
bool m_skipconst
Definition: METAssociator.h:114
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
AllowedVariables::EoverP
@ EoverP
Definition: AsgElectronSelectorTool.cxx:56
met::METAssociator::ConstitHolder::trkCont
const xAOD::TrackParticleContainer * trkCont
Definition: METAssociator.h:63
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:92
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
python.PyAthena.obj
obj
Definition: PyAthena.py:132
SG::DataProxy
Definition: DataProxy.h:45
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:51
python.Dumpers.etcone10
int etcone10
Definition: Dumpers.py:40
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.
xAOD::TruthParticle_v1::charge
double charge() const
Physical charge.
xAOD::CaloCorrection::calobitset
Iso::IsolationCaloCorrectionBitset calobitset
Definition: IsolationCommon.h:15
fitman.k
k
Definition: fitman.py:528
met::METTruthAssociator::computeSoftTerms
StatusCode computeSoftTerms(xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const
Definition: METTruthAssociator.cxx:199
met::METAssociator::m_caloIsolationTool
ToolHandle< xAOD::ICaloTopoClusterIsolationTool > m_caloIsolationTool
Definition: METAssociator.h:87