ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
met::METMaker Class Reference

#include <METMaker.h>

Inheritance diagram for met::METMaker:
Collaboration diagram for met::METMaker:

Public Member Functions

 METMaker (const std::string &name)
 Constructor with parameters: More...
 
virtual ~METMaker ()
 Destructor: More...
 
virtual StatusCode initialize () override final
 Dummy implementation of the initialisation function. More...
 
virtual StatusCode rebuildMET (const std::string &metKey, xAOD::Type::ObjectType metType, xAOD::MissingETContainer *metCont, const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, MissingETBase::UsageHandler::Policy objScale) const override final
 
virtual StatusCode rebuildMET (xAOD::MissingET *met, const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, MissingETBase::UsageHandler::Policy objScale) const override final
 
virtual StatusCode rebuildMET (xAOD::MissingET *met, const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, MissingETBase::UsageHandler::Policy p, bool removeOverlap, MissingETBase::UsageHandler::Policy objScale) const override final
 
virtual StatusCode rebuildJetMET (const std::string &metJetKey, const std::string &softClusKey, const std::string &softTrkKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETContainer *metCoreCont, xAOD::MissingETAssociationHelper &helper, bool doJetJVT) const override final
 
virtual StatusCode rebuildJetMET (const std::string &metJetKey, const std::string &metSoftKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETContainer *metCoreCont, xAOD::MissingETAssociationHelper &helper, bool doJetJVT) const override final
 
virtual StatusCode rebuildJetMET (xAOD::MissingET *metJet, const xAOD::JetContainer *jets, xAOD::MissingETAssociationHelper &helper, xAOD::MissingET *metSoftClus, const xAOD::MissingET *coreSoftClus, xAOD::MissingET *metSoftTrk, const xAOD::MissingET *coreSoftTrk, bool doJetJVT, bool tracksForHardJets=false, std::vector< const xAOD::IParticle * > *softConst=0) const override final
 
virtual StatusCode rebuildTrackMET (const std::string &metJetKey, const std::string &softTrkKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETContainer *metCoreCont, xAOD::MissingETAssociationHelper &helper, bool doJetJVT) const override final
 
virtual StatusCode rebuildTrackMET (xAOD::MissingET *metJet, const xAOD::JetContainer *jets, xAOD::MissingETAssociationHelper &helper, xAOD::MissingET *metSoftTrk, const xAOD::MissingET *coreSoftTrk, bool doJetJVT) const override final
 
virtual StatusCode markInvisible (const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, xAOD::MissingETContainer *metCont) const override final
 
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
 
virtual StatusCode evaluateNNMET (const std::string &, xAOD::MissingETContainer *) const
 

Protected Member Functions

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...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

bool acceptTrack (const xAOD::TrackParticle *trk, const xAOD::Vertex *vx) const
 
const xAOD::VertexgetPV () const
 
 METMaker ()
 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::VertexContainerm_PVkey
 
std::unique_ptr< SG::AuxElement::ConstAccessor< char > > m_acc_jetRejectionDec
 
float m_missObjWarningPtThreshold
 
bool m_jetCorrectPhi {}
 
double m_jetMinEfrac {}
 
double m_jetMinWeightedPt {}
 
std::string m_jetConstitScaleMom
 
std::string m_jetRejectionDec
 
double m_CenJetPtCut {}
 
double m_FwdJetPtCut {}
 
double m_JvtCut {}
 
double m_JvtPtMax {}
 
double m_JetEtaMax {}
 
double m_JetEtaForw {}
 
std::string m_jetSelection
 
std::string m_JvtWP
 
double m_customCenJetPtCut {}
 
double m_customFwdJetPtCut {}
 
double m_customJvtPtMax {}
 
std::string m_customJvtWP
 
bool m_doPFlow {}
 
bool m_doSoftTruth {}
 
bool m_doConstJet {}
 
bool m_useGhostMuons {}
 
bool m_doRemoveMuonJets {}
 
bool m_doRemoveElecTrks {}
 
bool m_doRemoveElecTrksEM {}
 
bool m_doSetMuonJetEMScale {}
 
bool m_skipSystematicJetSelection {}
 
bool m_muEloss {}
 
bool m_orCaloTaggedMuon {}
 
bool m_greedyPhotons {}
 
bool m_veryGreedyPhotons {}
 
int m_jetTrkNMuOlap {}
 
double m_jetWidthMuOlap {}
 
double m_jetPsEMuOlap {}
 
double m_jetEmfMuOlap {}
 
double m_jetTrkPtMuPt {}
 
double m_muIDPTJetPtRatioMuOlap {}
 
ToolHandle< InDet::IInDetTrackSelectionToolm_trkseltool
 
ToolHandle< IAsgSelectionToolm_JvtTool
 
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 40 of file METMaker.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

◆ METMaker() [1/2]

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

Constructor with parameters:

Definition at line 88 of file METMaker.cxx.

88  :
89  AsgTool(name),
90  m_PVkey("PrimaryVertices"),
91  m_acc_jetRejectionDec(nullptr),
92  m_trkseltool(""),
93  m_JvtTool("", this)
94  {
95  //
96  // Property declaration
97  //
98  declareProperty("JetRejectionDec", m_jetRejectionDec = "" );
99  declareProperty("JetMinEFrac", m_jetMinEfrac = 0.0 );
100  declareProperty("JetMinWeightedPt", m_jetMinWeightedPt = 20.0e3 );
101  declareProperty("JetConstitScaleMom", m_jetConstitScaleMom = "JetConstitScaleMomentum");
102  declareProperty("CorrectJetPhi", m_jetCorrectPhi = false );
103  declareProperty("DoPFlow", m_doPFlow = false );
104  declareProperty("DoSoftTruth", m_doSoftTruth = false );
105  declareProperty("DoJetTruth", m_doConstJet = false );
106 
107  declareProperty("JetSelection", m_jetSelection = "Tight" );
108  declareProperty("JetEtaMax", m_JetEtaMax = 4.5 );
109  declareProperty("JetEtaForw", m_JetEtaForw = 2.5 );
110  declareProperty("CustomCentralJetPt", m_customCenJetPtCut = 20e3 );
111  declareProperty("CustomForwardJetPt", m_customFwdJetPtCut = 20e3 );
112  declareProperty("CustomJetJvtPtMax", m_customJvtPtMax = 60e3 );
113  declareProperty("CustomJetJvtWP", m_customJvtWP = "FixedEffPt" );
114 
115  declareProperty("DoMuonEloss", m_muEloss = false );
116  declareProperty("ORCaloTaggedMuons", m_orCaloTaggedMuon = true );
117  declareProperty("GreedyPhotons", m_greedyPhotons = false );
118  declareProperty("VeryGreedyPhotons", m_veryGreedyPhotons = false );
119 
120  declareProperty("UseGhostMuons", m_useGhostMuons = false );
121  declareProperty("DoRemoveMuonJets", m_doRemoveMuonJets = true );
122  declareProperty("DoSetMuonJetEMScale", m_doSetMuonJetEMScale = true );
123 
124  declareProperty("DoRemoveElecTrks", m_doRemoveElecTrks = true );
125  declareProperty("DoRemoveElecTrksEM", m_doRemoveElecTrksEM = false );
126 
127  declareProperty("skipSystematicJetSelection", m_skipSystematicJetSelection = false,
128  "EXPERIMENTAL: whether to use simplified OR based on nominal jets "
129  "and for jet-related systematics only. "
130  "WARNING: this property is strictly for doing physics studies of the feasibility "
131  "of this OR scheme, it should not be used in a regular analysis");
132 
133  // muon overlap variables (expert use only)
134  declareProperty("JetTrkNMuOlap", m_jetTrkNMuOlap = 5 );
135  declareProperty("JetWidthMuOlap", m_jetWidthMuOlap = 0.1 );
136  declareProperty("JetPsEMuOlap", m_jetPsEMuOlap = 2.5e3 );
137  declareProperty("JetEmfMuOlap", m_jetEmfMuOlap = 0.9 );
138  declareProperty("JetTrkPtMuPt", m_jetTrkPtMuPt = 0.8 );
139  declareProperty("muIDPTJetPtRatioMuOlap", m_muIDPTJetPtRatioMuOlap = 2.0 );
140 
141  declareProperty("MissingObjWarnThreshold", m_missObjWarningPtThreshold = 7.0e3 );
142 
143  declareProperty("TrackSelectorTool", m_trkseltool );
144  declareProperty("JvtSelTool", m_JvtTool );
145  }

◆ ~METMaker()

met::METMaker::~METMaker ( )
virtualdefault

Destructor:

◆ METMaker() [2/2]

met::METMaker::METMaker ( )
private

Default constructor:

Member Function Documentation

◆ acceptTrack()

bool met::METMaker::acceptTrack ( const xAOD::TrackParticle trk,
const xAOD::Vertex vx 
) const
private

Definition at line 1177 of file METMaker.cxx.

1178  {
1179  return static_cast<bool>(m_trkseltool->accept( *trk, vx ));
1180  }

◆ 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; }

◆ evaluateNNMET()

virtual StatusCode IMETMaker::evaluateNNMET ( const std::string &  ,
xAOD::MissingETContainer  
) const
inlinevirtualinherited

Reimplemented in met::METNet.

Definition at line 115 of file IMETMaker.h.

115  {
116  return StatusCode::FAILURE;
117  }

◆ 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; }

◆ 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

◆ 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.

◆ getPV()

const xAOD::Vertex * met::METMaker::getPV ( ) const
private

Definition at line 1182 of file METMaker.cxx.

1182  {
1183 
1185 
1186  if(!h_PV.isValid()) {
1187  ATH_MSG_WARNING("Unable to retrieve primary vertex container PrimaryVertices");
1188  return nullptr;
1189  }
1190  ATH_MSG_DEBUG("Successfully retrieved primary vertex container");
1191  if(h_PV->empty()) ATH_MSG_WARNING("Event has no primary vertices!");
1192  for(const xAOD::Vertex* vx : *h_PV) {
1193  if(vx->vertexType()==xAOD::VxType::PriVtx) return vx;
1194  }
1195  return nullptr;
1196  }

◆ initialize()

StatusCode met::METMaker::initialize ( )
finaloverridevirtual

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 asg::AsgTool.

Definition at line 154 of file METMaker.cxx.

155  {
156  ATH_MSG_INFO ("Initializing " << name() << "...");
157 
158  ATH_MSG_INFO("Use jet selection criterion: " << m_jetSelection << " PFlow: " << m_doPFlow);
159  if (m_jetSelection == "Loose") { m_CenJetPtCut = 20e3; m_FwdJetPtCut = 20e3; m_JvtWP = "FixedEffPt"; m_JvtPtMax = 60e3; }
160  else if (m_jetSelection == "Tight") { m_CenJetPtCut = 20e3; m_FwdJetPtCut = 30e3; m_JvtWP = "FixedEffPt"; m_JvtPtMax = 60e3; }
161  else if (m_jetSelection == "Tighter"){ m_CenJetPtCut = 20e3; m_FwdJetPtCut = 35e3; m_JvtWP = "FixedEffPt"; m_JvtPtMax = 60e3; }
162  else if (m_jetSelection == "Tenacious"){ m_CenJetPtCut = 20e3; m_FwdJetPtCut = 40e3; m_JvtWP = "FixedEffPt"; m_JvtPtMax = 60e3; }
163  else if (m_jetSelection == "Tier0") { m_CenJetPtCut = 0; m_FwdJetPtCut = 0; m_JvtWP = "None"; }
164  else if (m_jetSelection == "Expert") {
165  ATH_MSG_INFO("Custom jet selection configured. *** FOR EXPERT USE ONLY ***");
170  }
171  else if (m_jetSelection == "HRecoil") {
172  ATH_MSG_INFO("Jet selection for hadronic recoil calculation is configured.");
173  m_CenJetPtCut = 9999e3;
174  m_FwdJetPtCut = 9999e3;
175  m_JetEtaMax = 5;
176  m_JvtWP = "None";
177  }
178  else {
179  if (m_jetSelection == "Default") ATH_MSG_WARNING( "WARNING: Default is now deprecated" );
180  ATH_MSG_ERROR( "Error: No available jet selection found! Please update JetSelection in METMaker. Choose one: Loose, Tight (recommended), Tighter, Tenacious" );
181  return StatusCode::FAILURE;
182  }
183 
184  if (!m_trkseltool.empty()) ATH_CHECK( m_trkseltool.retrieve() );
185 
186  if (m_JvtWP != "None"){
187  if (m_JvtTool.empty()) {
188  asg::AsgToolConfig config_jvt ("CP::NNJvtSelectionTool/JvtSelTool");
189  ATH_CHECK(config_jvt.setProperty("WorkingPoint", m_JvtWP));
190  ATH_CHECK(config_jvt.setProperty("JvtMomentName", "NNJvt"));
191  ATH_CHECK(config_jvt.setProperty("MaxPtForJvt", m_JvtPtMax));
192  ATH_CHECK(config_jvt.makePrivateTool(m_JvtTool));
193  }
194  ATH_CHECK(m_JvtTool.retrieve());
195  }
196 
197  // ReadHandleKey(s)
198  ATH_CHECK( m_PVkey.initialize() );
199 
200  // configurable accessors
201  if (!m_jetRejectionDec.empty()) {
202  m_acc_jetRejectionDec = std::make_unique<SG::AuxElement::ConstAccessor<char>>(m_jetRejectionDec);
203  ATH_MSG_INFO("Applying additional jet rejection criterium in MET calculation: " << m_jetRejectionDec);
204  }
205 
206  ATH_MSG_INFO("Suppressing warnings of objects missing in METAssociationMap for objects with pT < " << m_missObjWarningPtThreshold/1e3 << " GeV.");
207 
208  // overlap removal simplification?
210  ATH_MSG_INFO("Requesting simplified overlap removal procedure in MET calculation");
211  }
212 
213  return StatusCode::SUCCESS;
214  }

◆ 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.

◆ markInvisible()

StatusCode met::METMaker::markInvisible ( const xAOD::IParticleContainer collection,
xAOD::MissingETAssociationHelper helper,
xAOD::MissingETContainer metCont 
) const
finaloverridevirtual

Implements IMETMaker.

Definition at line 1165 of file METMaker.cxx.

1168  {
1169  MissingET* met = nullptr;
1170  if( fillMET(met,metCont, "Invisibles" , invisSource) != StatusCode::SUCCESS) {
1171  ATH_MSG_ERROR("failed to fill MET term \"Invisibles\"");
1172  return StatusCode::FAILURE;
1173  }
1175  }

◆ 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

◆ rebuildJetMET() [1/3]

StatusCode met::METMaker::rebuildJetMET ( const std::string &  metJetKey,
const std::string &  metSoftKey,
xAOD::MissingETContainer metCont,
const xAOD::JetContainer jets,
const xAOD::MissingETContainer metCoreCont,
xAOD::MissingETAssociationHelper helper,
bool  doJetJVT 
) const
finaloverridevirtual

Implements IMETMaker.

Definition at line 446 of file METMaker.cxx.

453  {
454  ATH_MSG_VERBOSE("Rebuild jet term: " << metJetKey << " and soft term: " << softKey);
455 
456  MissingET* metJet = nullptr;
457  if( fillMET(metJet,metCont, metJetKey, MissingETBase::Source::jet()) != StatusCode::SUCCESS) {
458  ATH_MSG_ERROR("failed to fill MET term \"" << metJetKey << "\"");
459  return StatusCode::FAILURE;
460  }
461 
462  const MissingET *coreSoftClus(nullptr), *coreSoftTrk(nullptr);
463  MissingET *metSoftClus(nullptr), *metSoftTrk(nullptr);
464 
465  const MissingET* coreSoft = (*metCoreCont)[softKey+"Core"];
466  if(!coreSoft) {
467  ATH_MSG_WARNING("Invalid soft term key supplied: " << softKey);
468  return StatusCode::FAILURE;
469  }
470  if(MissingETBase::Source::isTrackTerm(coreSoft->source())) {
471  coreSoftTrk = coreSoft;
472 
473  metSoftTrk = nullptr;
474  if( fillMET(metSoftTrk,metCont, softKey , coreSoftTrk->source() ) != StatusCode::SUCCESS) {
475  ATH_MSG_ERROR("failed to fill MET term \"" << softKey << "\"");
476  return StatusCode::FAILURE;
477  }
478  } else {
479  coreSoftClus = coreSoft;
480 
481  metSoftClus = nullptr;
482  if( fillMET(metSoftClus, metCont, softKey , coreSoftClus->source() ) != StatusCode::SUCCESS) {
483  ATH_MSG_ERROR("failed to fill MET term \"" << softKey << "\"");
484  return StatusCode::FAILURE;
485  }
486  }
487 
488  return rebuildJetMET(metJet, jets, helper,
489  metSoftClus, coreSoftClus,
490  metSoftTrk, coreSoftTrk,
491  doJetJVT);
492  }

◆ rebuildJetMET() [2/3]

StatusCode met::METMaker::rebuildJetMET ( const std::string &  metJetKey,
const std::string &  softClusKey,
const std::string &  softTrkKey,
xAOD::MissingETContainer metCont,
const xAOD::JetContainer jets,
const xAOD::MissingETContainer metCoreCont,
xAOD::MissingETAssociationHelper helper,
bool  doJetJVT 
) const
finaloverridevirtual

Implements IMETMaker.

Definition at line 531 of file METMaker.cxx.

539  {
540 
541  ATH_MSG_VERBOSE("Create Jet MET " << metJetKey);
542  MissingET* metJet = nullptr;
543  if( fillMET(metJet , metCont ,metJetKey , MissingETBase::Source::jet()) != StatusCode::SUCCESS) {
544  ATH_MSG_ERROR("failed to fill MET term \"" << metJetKey << "\"");
545  return StatusCode::FAILURE;
546  }
547  ATH_MSG_VERBOSE("Create SoftClus MET " << softClusKey);
548  const MissingET* coreSoftClus = (*metCoreCont)[softClusKey+"Core"];
549  ATH_MSG_VERBOSE("Create SoftTrk MET " << softTrkKey);
550  const MissingET* coreSoftTrk = (*metCoreCont)[softTrkKey+"Core"];
551  if(!coreSoftClus) {
552  ATH_MSG_WARNING("Invalid cluster soft term key supplied: " << softClusKey);
553  return StatusCode::FAILURE;
554  }
555  if(!coreSoftTrk) {
556  ATH_MSG_WARNING("Invalid track soft term key supplied: " << softTrkKey);
557  return StatusCode::FAILURE;
558  }
559  MissingET* metSoftClus = nullptr;
560  if( fillMET(metSoftClus, metCont, softClusKey, coreSoftClus->source()) != StatusCode::SUCCESS) {
561  ATH_MSG_ERROR("failed to fill MET term \"" << softClusKey << "\"");
562  return StatusCode::FAILURE;
563  }
564 
565  MissingET* metSoftTrk = nullptr;
566  if( fillMET(metSoftTrk, metCont, softTrkKey, coreSoftTrk->source()) != StatusCode::SUCCESS) {
567  ATH_MSG_ERROR("failed to fill MET term \"" << softTrkKey << "\"");
568  return StatusCode::FAILURE;
569  }
570 
571  return rebuildJetMET(metJet, jets, helper,
572  metSoftClus, coreSoftClus,
573  metSoftTrk, coreSoftTrk,
574  doJetJVT);
575  }

◆ rebuildJetMET() [3/3]

StatusCode met::METMaker::rebuildJetMET ( xAOD::MissingET metJet,
const xAOD::JetContainer jets,
xAOD::MissingETAssociationHelper helper,
xAOD::MissingET metSoftClus,
const xAOD::MissingET coreSoftClus,
xAOD::MissingET metSoftTrk,
const xAOD::MissingET coreSoftTrk,
bool  doJetJVT,
bool  tracksForHardJets = false,
std::vector< const xAOD::IParticle * > *  softConst = 0 
) const
finaloverridevirtual

Implements IMETMaker.

Definition at line 577 of file METMaker.cxx.

586  {
587  if(!metJet || !jets) {
588  ATH_MSG_ERROR("Invalid pointer supplied for "
589  << "MET (" << metJet << ") or "
590  << "jet collection (" << jets << ").");
591  return StatusCode::FAILURE;
592  }
593  const xAOD::MissingETAssociationMap* map = helper.map();
594  if(!map){
595  ATH_MSG_ERROR("MET Association Helper isn't associated with a MissingETAssociationMap!");
596  return StatusCode::FAILURE;
597  }
598  if(softConst && m_trkseltool.empty() && !m_doPFlow && !m_doSoftTruth) {
599  ATH_MSG_WARNING( "Requested soft track element links, but no track selection tool supplied.");
600  }
601  const xAOD::Vertex *pv = softConst?getPV():nullptr;
602 
603  if(map->empty()) {
604  ATH_MSG_WARNING("Incomplete association map received. Cannot rebuild MET.");
605  ATH_MSG_WARNING("Note: METMaker should only be run on events containing at least one PV");
606  return StatusCode::SUCCESS;
607  }
608 
609  if(doJetJVT && m_JvtWP == "None"){
610  ATH_MSG_WARNING("rebuildJetMET requested JVT, which is inconsistent with jet selection " << m_jetSelection << ". Ignoring JVT.");
611  doJetJVT = false;
612  }
613 
614  ATH_MSG_VERBOSE("Building MET jet term " << metJet->name());
615  if(!metSoftClus && !metSoftTrk) {
616  ATH_MSG_WARNING("Neither soft cluster nor soft track term has been supplied!");
617  return StatusCode::SUCCESS;
618  }
619  static const SG::AuxElement::ConstAccessor<std::vector<ElementLink<IParticleContainer> > > acc_softConst("softConstituents");
620  if(metSoftClus) {
621  dec_constitObjLinks(*metSoftClus) = std::vector<iplink_t>(0);
622  if(!coreSoftClus) {
623  ATH_MSG_ERROR("Soft cluster term provided without a core term!");
624  return StatusCode::FAILURE;
625  }
626  ATH_MSG_VERBOSE("Building MET soft cluster term " << metSoftClus->name());
627  ATH_MSG_VERBOSE("Core soft cluster mpx " << coreSoftClus->mpx()
628  << ", mpy " << coreSoftClus->mpy()
629  << " sumet " << coreSoftClus->sumet());
630  *metSoftClus += *coreSoftClus;
631  // Fill a vector with the soft constituents, if one was provided.
632  // For now, only setting up to work with those corresponding to the jet constituents.
633  // Can expand if needed.
634  if(softConst && acc_softConst.isAvailable(*coreSoftClus)) {
635  for(const auto& constit : acc_softConst(*coreSoftClus)) {
636  softConst->push_back(*constit);
637  }
638  ATH_MSG_DEBUG(softConst->size() << " soft constituents from core term");
639  }
640  }
641  if(metSoftTrk) {
642  dec_constitObjLinks(*metSoftTrk) = std::vector<iplink_t>(0);
643  if(!coreSoftTrk) {
644  ATH_MSG_ERROR("Soft track term provided without a core term!");
645  return StatusCode::FAILURE;
646  }
647  ATH_MSG_VERBOSE("Building MET soft track term " << metSoftTrk->name());
648  ATH_MSG_VERBOSE("Core soft track mpx " << coreSoftTrk->mpx()
649  << ", mpy " << coreSoftTrk->mpy()
650  << " sumet " << coreSoftTrk->sumet());
651  *metSoftTrk += *coreSoftTrk;
652  if(softConst && acc_softConst.isAvailable(*coreSoftTrk) && !m_doPFlow && !m_doSoftTruth) {
653  for(const auto& constit : acc_softConst(*coreSoftTrk)) {
654  softConst->push_back(*constit);
655  }
656  ATH_MSG_DEBUG(softConst->size() << " soft constituents from trk core term");
657  }
658  }
659 
660  dec_constitObjLinks(*metJet) = std::vector<iplink_t>(0);
661  dec_constitObjWeights(*metJet) = std::vector<float>(0);
662  std::vector<iplink_t>& uniqueLinks = dec_constitObjLinks(*metJet);
663  std::vector<float>& uniqueWeights = dec_constitObjWeights(*metJet);
664  uniqueLinks.reserve(jets->size());
665  uniqueWeights.reserve(jets->size());
666  std::vector<iplink_t> softJetLinks;
667  std::vector<float> softJetWeights;
668  bool originalInputs = jets->empty() ? false : !acc_originalObject.isAvailable(*jets->front());
669 
670  // Get the hashed key of this jet, if we can. Though his only works if
671  // 1. the container is an owning container, and not just a view;
672  // 2. the container is in the event store already.
673  // Since we will be creating ElementLink-s to these jets later on in the
674  // code, and it should work in AnalysisBase, only the first one of these
675  // is checked. Since the code can not work otherwise.
676  SG::sgkey_t jetsSgKey = 0;
677  if(jets->ownPolicy() == SG::OWN_ELEMENTS) {
678  jetsSgKey = getKey(jets);
679  if(jetsSgKey == 0) {
680  ATH_MSG_ERROR("Could not find the jets with pointer: " << jets);
681  return StatusCode::FAILURE;
682  }
683  }
684 
685  for(const xAOD::Jet* jet : *jets) {
686  const MissingETAssociation* assoc = nullptr;
687  if(originalInputs) {
689  } else {
690  const IParticle* orig = *acc_originalObject(*jet);
691  assoc = MissingETComposition::getAssociation(map,static_cast<const xAOD::Jet*>(orig));
692  }
693  if(!assoc || assoc->isMisc()){
694  ATH_MSG_WARNING( "Jet without association found!" );
695  continue;
696  }
697 
699  // retrieve nominal calibrated jet
700  if (acc_nominalObject.isAvailable(*jet)){
701  ATH_MSG_VERBOSE( "Jet pt before nominal replacement = " << jet->pt());
702  jet = static_cast<const xAOD::Jet*>(*acc_nominalObject(*jet));
703 
704  }
705  else
706  ATH_MSG_ERROR("No nominal calibrated jet available for jet " << jet->index() << ". Cannot simplify overlap removal!");
707  }
708  ATH_MSG_VERBOSE( "Jet pt = " << jet->pt());
709 
710  bool selected = (std::abs(jet->eta())<m_JetEtaForw && jet->pt()>m_CenJetPtCut) || (std::abs(jet->eta())>=m_JetEtaForw && jet->pt()>m_FwdJetPtCut );
711  bool JVT_reject(false);
712  bool isMuFSRJet(false);
713 
714  // Apply a cut on the maximum jet eta. This restricts jets to those with calibration. Excluding more forward jets was found to have a minimal impact on the MET in Zee events
715  if (m_JetEtaMax > 0.0 && std::abs(jet->eta()) > m_JetEtaMax)
716  JVT_reject = true;
717 
718  if(doJetJVT) {
719  // intrinsically checks that is within range to apply Jvt requirement
720  JVT_reject = !bool(m_JvtTool->accept(jet));
721  ATH_MSG_VERBOSE("Jet " << (JVT_reject ? "fails" : "passes") <<" JVT selection");
722  }
723 
724  // if defined apply additional jet criterium
725  if (m_acc_jetRejectionDec && (*m_acc_jetRejectionDec)(*jet)==0) JVT_reject = true;
726  bool hardJet(false);
727  MissingETBase::Types::constvec_t calvec = assoc->overlapCalVec(helper);
728  bool caloverlap = false;
729  caloverlap = calvec.ce()>0;
730  ATH_MSG_DEBUG("Jet " << jet->index() << " is " << ( caloverlap ? "" : "non-") << "overlapping");
731 
732  if(m_veryGreedyPhotons && caloverlap) {
733  for(const auto& object : assoc->objects()) {
734  // Correctly handle this jet if we're using very greedy photons
735  if (object && object->type() == xAOD::Type::Photon) hardJet = true;
736  }
737  }
738 
739  xAOD::JetFourMom_t constjet;
740  double constSF(1);
741  if(m_jetConstitScaleMom.empty() && assoc->hasAlternateConstVec()){
742  constjet = assoc->getAlternateConstVec();
743  } else {
744  constjet = jet->jetP4(m_jetConstitScaleMom);//grab a constituent scale added by the JetMomentTool/JetConstitFourMomTool.cxx
745  double denom = (assoc->hasAlternateConstVec() ? assoc->getAlternateConstVec() : jet->jetP4("JetConstitScaleMomentum")).E();
746  constSF = denom>1e-9 ? constjet.E()/denom : 0.;
747  ATH_MSG_VERBOSE("Scale const jet by factor " << constSF);
748  calvec *= constSF;
749  }
750  double jpx = constjet.Px();
751  double jpy = constjet.Py();
752  double jpt = constjet.Pt();
753  double opx = jpx - calvec.cpx();
754  double opy = jpy - calvec.cpy();
755 
756  MissingET* met_muonEloss(nullptr);
758  // Get a term to hold the Eloss corrections
759  MissingETContainer* metCont = static_cast<MissingETContainer*>(metJet->container());
760  met_muonEloss = (*metCont)["MuonEloss"];
761  if(!met_muonEloss) {
762  ATH_MSG_WARNING("Attempted to apply muon Eloss correction, but corresponding MET term does not exist!");
763  return StatusCode::FAILURE;
764  }
765  }
766 
767  float total_eloss(0);
768  MissingETBase::Types::bitmask_t muons_selflags(0);
769  std::vector<const xAOD::Muon*> muons_in_jet;
770  std::vector<const xAOD::Electron*> electrons_in_jet;
771  bool passJetForEl=false;
772  if(m_useGhostMuons) { // for backwards-compatibility
773  if(!acc_ghostMuons.isAvailable(*jet)){
774  ATH_MSG_ERROR("Ghost muons requested but not found!");
775  return StatusCode::FAILURE;
776  }
777  for(const auto& el : acc_ghostMuons(*jet)) {
778  if(!el.isValid()){
779  ATH_MSG_ERROR("Invalid element link to ghost muon! Quitting.");
780  return StatusCode::FAILURE;
781  }
782  muons_in_jet.push_back(static_cast<const xAOD::Muon*>(*el));
783  }
784  }
785  for(const auto& obj : assoc->objects()) {
786  if(!obj) continue;
787  if(obj->type()==xAOD::Type::Muon && !m_useGhostMuons) {
788  const xAOD::Muon* mu_test(static_cast<const xAOD::Muon*>(obj));
789  ATH_MSG_VERBOSE("Muon " << mu_test->index() << " found in jet " << jet->index());
791  if(acc_originalObject.isAvailable(*mu_test)) mu_test = static_cast<const xAOD::Muon*>(*acc_originalObject(*mu_test));
792  if(MissingETComposition::objSelected(helper,mu_test)) { //
793  muons_in_jet.push_back(mu_test);
794  ATH_MSG_VERBOSE("Muon is selected by MET.");
795  }
796  }
797  } else if(obj->type()==xAOD::Type::Electron && m_doRemoveElecTrks) {
798  const xAOD::Electron* el_test(static_cast<const xAOD::Electron*>(obj));
799  ATH_MSG_VERBOSE("Electron " << el_test->index() << " found in jet " << jet->index());
800  if(acc_originalObject.isAvailable(*el_test)) el_test = static_cast<const xAOD::Electron*>(*acc_originalObject(*el_test));
801  if(helper.objSelected(assoc,el_test)){
802  if(el_test->pt()>90.0e3) { // only worry about high-pt electrons?
803  electrons_in_jet.push_back(el_test);
804  ATH_MSG_VERBOSE("High-pt electron is selected by MET.");
805  }
806  }
807  }
808  }
809  if(m_doRemoveElecTrks) {
810  MissingETBase::Types::constvec_t initialTrkMom = assoc->jetTrkVec();
811  float jet_ORtrk_sumpt = assoc->overlapTrkVec(helper).sumpt();
812  float jet_all_trk_pt = initialTrkMom.sumpt();
813  float jet_unique_trk_pt = jet_all_trk_pt - jet_ORtrk_sumpt;
816  for(const auto& elec : electrons_in_jet) {
817  el_calvec += assoc->calVec(elec);
818  el_trkvec += assoc->trkVec(elec);
819  }
820  float el_cal_pt = el_calvec.cpt();
821  float el_trk_pt = el_trkvec.cpt();
822  ATH_MSG_VERBOSE("Elec trk: " << el_trk_pt
823  << " jetalltrk: " << jet_all_trk_pt
824  << " jetORtrk: " << jet_ORtrk_sumpt
825  << " electrk-jetORtrk: " << (el_trk_pt-jet_ORtrk_sumpt)
826  << " elec cal: " << el_cal_pt
827  << " jetalltrk-electrk: " << (jet_all_trk_pt-el_trk_pt)
828  << " jetalltrk-jetORtrk: " << (jet_all_trk_pt-jet_ORtrk_sumpt) );
829  // Want to use the jet calo measurement if we had at least one electron
830  // and the jet has a lot of residual track pt
831  // Is the cut appropriate?
832  if(el_trk_pt>1e-9 && jet_unique_trk_pt>10.0e3) passJetForEl=true;
833  } // end ele-track removal
834 
835  for(const xAOD::Muon* mu_in_jet : muons_in_jet) {
836  if (!mu_in_jet) continue;
837  float mu_Eloss = acc_Eloss(*mu_in_jet);
838 
839  if(!JVT_reject) {
840  if (m_doRemoveMuonJets) {
841  // need to investigate how this is affected by the recording of muon clusters in the map
842  float mu_id_pt = mu_in_jet->trackParticle(xAOD::Muon::InnerDetectorTrackParticle) ? mu_in_jet->trackParticle(xAOD::Muon::InnerDetectorTrackParticle)->pt() : 0.;
843  float jet_trk_sumpt = acc_trksumpt.isAvailable(*jet) && this->getPV() ? acc_trksumpt(*jet)[this->getPV()->index()] : 0.;
844 
845  // missed the muon, so we should add it back
846  if(0.9999*mu_id_pt>jet_trk_sumpt)
847  jet_trk_sumpt+=mu_id_pt;
848  float jet_trk_N = acc_trkN.isAvailable(*jet) && this->getPV() ? acc_trkN(*jet)[this->getPV()->index()] : 0.;
849  ATH_MSG_VERBOSE("Muon has ID pt " << mu_id_pt);
850  ATH_MSG_VERBOSE("Jet has pt " << jet->pt() << ", trk sumpt " << jet_trk_sumpt << ", trk N " << jet_trk_N);
851  bool jet_from_muon = mu_id_pt>1e-9 && jet_trk_sumpt>1e-9 && (jet->pt()/mu_id_pt < m_muIDPTJetPtRatioMuOlap && mu_id_pt/jet_trk_sumpt>m_jetTrkPtMuPt) && jet_trk_N<m_jetTrkNMuOlap;
852  if(jet_from_muon) {
853  ATH_MSG_VERBOSE("Jet is from muon -- remove.");
854  JVT_reject = true;
855  }
856  }
857 
858  if (m_doSetMuonJetEMScale) {
859  // need to investigate how this is affected by the recording of muon clusters in the map
860  float mu_id_pt = mu_in_jet->trackParticle(xAOD::Muon::InnerDetectorTrackParticle) ? mu_in_jet->trackParticle(xAOD::Muon::InnerDetectorTrackParticle)->pt() : 0.;
861  float jet_trk_sumpt = acc_trksumpt.isAvailable(*jet) && this->getPV() ? acc_trksumpt(*jet)[this->getPV()->index()] : 0.;
862  // missed the muon, so we should add it back
863  if(0.9999*mu_id_pt>jet_trk_sumpt)
864  jet_trk_sumpt+=mu_id_pt;
865  float jet_trk_N = acc_trkN.isAvailable(*jet) && this->getPV() ? acc_trkN(*jet)[this->getPV()->index()] : 0.;
866 
867  float jet_psE = 0.;
868  if (acc_psf.isAvailable(*jet)){
869  jet_psE = acc_psf(*jet);
870  } else if (acc_sampleE.isAvailable(*jet)){
871  jet_psE = acc_sampleE(*jet)[0] + acc_sampleE(*jet)[4];
872  } else {
873  ATH_MSG_ERROR("Jet PS fraction or sampling energy must be available to calculate MET with doSetMuonJetEMScale");
874  return StatusCode::FAILURE;
875  }
876 
877  bool jet_from_muon = jet_trk_sumpt>1e-9 && jet_trk_N<3 && mu_id_pt / jet_trk_sumpt > m_jetTrkPtMuPt && acc_emf(*jet)>m_jetEmfMuOlap && acc_width(*jet)<m_jetWidthMuOlap && jet_psE>m_jetPsEMuOlap;
878  ATH_MSG_VERBOSE("Muon has ID pt " << mu_id_pt);
879  ATH_MSG_VERBOSE("Jet has trk sumpt " << jet_trk_sumpt << ", trk N " << jet_trk_N << ", PS E " << jet_psE << ", width " << acc_width(*jet) << ", emfrac " << acc_emf(*jet));
880 
881  if(jet_from_muon) {
882  ATH_MSG_VERBOSE("Jet is from muon -- set to EM scale and subtract Eloss.");
883  // Using constjet now because we focus on AntiKt4EMTopo.
884  // Probably not a massive difference to LC, but PF needs some consideration
885  ATH_MSG_VERBOSE("Jet e: " << constjet.E() << ", mu Eloss: " << mu_Eloss);
886  float elosscorr = mu_Eloss >= constjet.e() ? 0. : 1.-mu_Eloss/constjet.e();
887  // Effectively, take the unique fraction of the jet times the eloss-corrected fraction
888  // This might in some cases oversubtract, but should err on the side of undercounting the jet contribution
889  opx *= elosscorr;
890  opy *= elosscorr;
891  ATH_MSG_VERBOSE(" Jet eloss factor " << elosscorr << ", final pt: " << sqrt(opx*opx+opy*opy));
892  // Don't treat this jet normally. Instead, just add to the Eloss term
893  isMuFSRJet = true;
894  }
895  }
896  } // end muon-jet overlap-removal
897 
898  switch(mu_in_jet->energyLossType()) {
899  case xAOD::Muon::Parametrized:
900  case xAOD::Muon::MOP:
901  case xAOD::Muon::Tail:
902  case xAOD::Muon::FSRcandidate:
903  case xAOD::Muon::NotIsolated:
904  // For now don't differentiate the behaviour
905  // Remove the Eloss assuming the parameterised value
906  // The correction is limited to the selected clusters
907  total_eloss += mu_Eloss;
908  muons_selflags |= (1<<assoc->findIndex(mu_in_jet));
909  }
910  }
911  ATH_MSG_VERBOSE("Muon selection flags: " << muons_selflags);
912  ATH_MSG_VERBOSE("Muon total eloss: " << total_eloss);
913 
915  // borrowed from overlapCalVec
916  for(size_t iKey = 0; iKey < assoc->sizeCal(); iKey++) {
917  bool selector = (muons_selflags & assoc->calkey()[iKey]);
918  if(selector) mu_calovec += assoc->calVec(iKey);
919  ATH_MSG_VERBOSE("This key: " << assoc->calkey()[iKey] << ", selector: " << selector);
920  }
921  ATH_MSG_VERBOSE("Mu calovec pt, no Eloss: " << mu_calovec.cpt());
922  if(m_muEloss) mu_calovec *= std::max<float>(0.,1-(total_eloss/mu_calovec.ce()));
923  ATH_MSG_VERBOSE("Mu calovec pt, with Eloss: " << mu_calovec.cpt());
924 
925  // re-add calo components of muons beyond Eloss correction
926  ATH_MSG_VERBOSE("Jet " << jet->index() << " const pT before OR " << jpt);
927  ATH_MSG_VERBOSE("Jet " << jet->index() << " const pT after OR " << sqrt(opx*opx+opy*opy));
928  opx += mu_calovec.cpx();
929  opy += mu_calovec.cpy();
930  double opt = sqrt( opx*opx+opy*opy );
931  ATH_MSG_VERBOSE("Jet " << jet->index() << " const pT diff after OR readding muon clusters " << opt-jpt);
932  double uniquefrac = 1. - (calvec.ce() - mu_calovec.ce()) / constjet.E();
933  ATH_MSG_VERBOSE( "Jet constscale px, py, pt, E = " << jpx << ", " << jpy << ", " << jpt << ", " << constjet.E() );
934  ATH_MSG_VERBOSE( "Jet overlap E = " << calvec.ce() - mu_calovec.ce() );
935  ATH_MSG_VERBOSE( "Jet OR px, py, pt, E = " << opx << ", " << opy << ", " << opt << ", " << constjet.E() - calvec.ce() );
936 
937  if(isMuFSRJet) {
938  if(!met_muonEloss){
939  ATH_MSG_ERROR("Attempted to apply muon Eloss correction, but corresponding MET term does not exist!");
940  return StatusCode::FAILURE;
941  }
942  met_muonEloss->add(opx,opy,opt);
943  continue;
944  }
945 
946  if(selected && !JVT_reject) {
947  if(!caloverlap) {
948  // add jet full four-vector
949  hardJet = true;
950  if (!tracksForHardJets) {
951  if(m_doConstJet)
952  metJet->add(jpx,jpy,jpt);
953  else
954  *metJet += jet;
955  }
956  }
957  else if((uniquefrac>m_jetMinEfrac || passJetForEl) && opt>m_jetMinWeightedPt){
958  // add jet corrected for overlaps if sufficient unique fraction
959  hardJet = true;
960  if(!tracksForHardJets) {
961  if(m_jetCorrectPhi) {
962  if (m_doConstJet)
963  metJet->add(opx,opy,opt);
964  else {
965  double jesF = jet->pt() / jpt;
966  metJet->add(opx*jesF,opy*jesF,opt*jesF);
967  }
968  } else {
969  if (m_doConstJet)
970  metJet->add(uniquefrac*jpx,uniquefrac*jpy,uniquefrac*jpt);
971  else{
972  if(passJetForEl && m_doRemoveElecTrksEM)
973  metJet->add(opx,opy,opt);
974  else
975  metJet->add(uniquefrac*jet->px(),uniquefrac*jet->py(),uniquefrac*jet->pt());
976  }
977  }
978  }
979  }
980  } // hard jet selection
981 
982  // Create the appropriate ElementLink for this jet just the once.
983  iplink_t jetLink;
984  if(jetsSgKey == 0) {
985  const xAOD::IParticleContainer* ipc =
986  static_cast<const xAOD::IParticleContainer*>(jet->container());
987  jetLink = iplink_t(*ipc, jet->index());
988  } else {
989  jetLink = iplink_t(jetsSgKey, jet->index());
990  }
991 
992  if(hardJet){
993  ATH_MSG_VERBOSE("Jet added at full scale");
994  uniqueLinks.push_back( jetLink );
995  uniqueWeights.push_back( uniquefrac );
996  } else {
997  if(metSoftClus && !JVT_reject) {
998  // add fractional contribution
999  ATH_MSG_VERBOSE("Jet added at const scale");
1000  if (std::abs(jet->eta())<2.5 || !(coreSoftClus->source()&MissingETBase::Source::Region::Central)) {
1001  softJetLinks.push_back( jetLink );
1002  softJetWeights.push_back( uniquefrac );
1003  metSoftClus->add(opx,opy,opt);
1004  }
1005 
1006  // Fill a vector with the soft constituents, if one was provided.
1007  // For now, only setting up to work with those corresponding to the jet constituents.
1008  // Can expand if needed.
1009  // This ignores overlap removal.
1010  //
1011  if(softConst) {
1012  for(size_t iConst=0; iConst<jet->numConstituents(); ++iConst) {
1013  const IParticle* constit = jet->rawConstituent(iConst);
1014  softConst->push_back(constit);
1015  }
1016  }
1017  }
1018  } // hard jet or CST
1019 
1020  if(!metSoftTrk || (hardJet && !tracksForHardJets)) continue;
1021 
1022  // use jet tracks
1023  // remove any tracks already used by other objects
1024  MissingETBase::Types::constvec_t trkvec = assoc->overlapTrkVec(helper);
1025  MissingETBase::Types::constvec_t jettrkvec = assoc->jetTrkVec();
1026  if(jettrkvec.ce()>1e-9) {
1027  jpx = jettrkvec.cpx();
1028  jpy = jettrkvec.cpy();
1029  jpt = jettrkvec.sumpt();
1030  jettrkvec -= trkvec;
1031  opx = jettrkvec.cpx();
1032  opy = jettrkvec.cpy();
1033  opt = jettrkvec.sumpt();
1034  ATH_MSG_VERBOSE( "Jet track px, py, sumpt = " << jpx << ", " << jpy << ", " << jpt );
1035  ATH_MSG_VERBOSE( "Jet OR px, py, sumpt = " << opx << ", " << opy << ", " << opt );
1036  } else {
1037  opx = opy = opt = 0;
1038  ATH_MSG_VERBOSE( "This jet has no associated tracks" );
1039  }
1040  if (hardJet) metJet->add(opx,opy,opt);
1041  else if (std::abs(jet->eta())<2.5 || !(coreSoftTrk->source()&MissingETBase::Source::Region::Central)) {
1042  metSoftTrk->add(opx,opy,opt);
1043  // Don't need to add if already done for softclus.
1044  if(!metSoftClus) {
1045  softJetLinks.push_back( jetLink );
1046  softJetWeights.push_back( uniquefrac );
1047  }
1048 
1049  // Fill a vector with the soft constituents, if one was provided.
1050  // For now, only setting up to work with those corresponding to the jet constituents.
1051  // Can expand if needed.
1052  // This ignores overlap removal.
1053  //
1054  if(softConst && !m_doPFlow && !m_doSoftTruth) {
1055  std::vector<const IParticle*> jettracks;
1056  jet->getAssociatedObjects<IParticle>(xAOD::JetAttribute::GhostTrack,jettracks);
1057  for(size_t iConst=0; iConst<jettracks.size(); ++iConst) {
1058  const TrackParticle* pTrk = static_cast<const TrackParticle*>(jettracks[iConst]);
1059  if (acceptTrack(pTrk,pv)) softConst->push_back(pTrk);
1060  }
1061  }
1062  }
1063  } // jet loop
1064 
1065  ATH_MSG_DEBUG("Number of selected jets: " << dec_constitObjLinks(*metJet).size());
1066 
1067  if(metSoftTrk) {
1068  dec_constitObjLinks(*metSoftTrk) = softJetLinks;
1069  ATH_MSG_DEBUG("Number of softtrk jets: " << dec_constitObjLinks(*metSoftTrk).size());
1070  }
1071 
1072  if(metSoftClus) {
1073  dec_constitObjLinks(*metSoftClus) = softJetLinks;
1074  ATH_MSG_DEBUG("Number of softclus jets: " << dec_constitObjLinks(*metSoftClus).size());
1075  }
1076 
1077  if(softConst) ATH_MSG_DEBUG(softConst->size() << " soft constituents from core term + jets");
1078 
1079  const MissingETAssociation* assoc = map->getMiscAssociation();
1080  if(!assoc) return StatusCode::SUCCESS;
1081 
1082  if(metSoftTrk) {
1083  // supplement track term with any tracks associated to isolated muons
1084  // these are recorded in the misc association
1085  MissingETBase::Types::constvec_t trkvec = assoc->overlapTrkVec(helper);
1086  double opx = trkvec.cpx();
1087  double opy = trkvec.cpy();
1088  double osumpt = trkvec.sumpt();
1089  ATH_MSG_VERBOSE( "Misc track px, py, sumpt = " << opx << ", " << opy << ", " << osumpt );
1090  metSoftTrk->add(opx,opy,osumpt);
1091  ATH_MSG_VERBOSE("Final soft track mpx " << metSoftTrk->mpx()
1092  << ", mpy " << metSoftTrk->mpy()
1093  << " sumet " << metSoftTrk->sumet());
1094  }
1095 
1096  if(metSoftClus) {
1097  // supplement cluster term with any clusters associated to isolated e/gamma
1098  // these are recorded in the misc association
1099  float total_eloss(0.);
1100  MissingETBase::Types::bitmask_t muons_selflags(0);
1101  MissingETBase::Types::constvec_t calvec = assoc->overlapCalVec(helper);
1102  double opx = calvec.cpx();
1103  double opy = calvec.cpy();
1104  double osumpt = calvec.sumpt();
1105  for(const auto& obj : assoc->objects()) {
1106  if (!obj || obj->type() != xAOD::Type::Muon) continue;
1107  const xAOD::Muon* mu_test(static_cast<const xAOD::Muon*>(obj));
1108  if(acc_originalObject.isAvailable(*mu_test)) mu_test = static_cast<const xAOD::Muon*>(*acc_originalObject(*mu_test));
1109  if(MissingETComposition::objSelected(helper,mu_test)) { //
1110  float mu_Eloss = acc_Eloss(*mu_test);
1111  switch(mu_test->energyLossType()) {
1112  case xAOD::Muon::Parametrized:
1113  case xAOD::Muon::MOP:
1114  case xAOD::Muon::Tail:
1115  case xAOD::Muon::FSRcandidate:
1116  case xAOD::Muon::NotIsolated:
1117  // For now don't differentiate the behaviour
1118  // Remove the Eloss assuming the parameterised value
1119  // The correction is limited to the selected clusters
1120  total_eloss += mu_Eloss;
1121  muons_selflags |= (1<<assoc->findIndex(mu_test));
1122  }
1123  ATH_MSG_VERBOSE("Mu index " << mu_test->index());
1124  }
1125  }
1126  ATH_MSG_VERBOSE("Mu selection flags " << muons_selflags);
1127  ATH_MSG_VERBOSE("Mu total eloss " << total_eloss);
1128 
1130  // borrowed from overlapCalVec
1131  for(size_t iKey = 0; iKey < assoc->sizeCal(); iKey++) {
1132  bool selector = (muons_selflags & assoc->calkey()[iKey]);
1133  ATH_MSG_VERBOSE("This key: " << assoc->calkey()[iKey] << ", selector: " << selector
1134  << " this calvec E: " << assoc->calVec(iKey).ce());
1135  if(selector) mu_calovec += assoc->calVec(iKey);
1136  }
1137  if(m_muEloss){
1138  mu_calovec *= std::max<float>(0.,1-(total_eloss/mu_calovec.ce()));
1139  opx += mu_calovec.cpx();
1140  opy += mu_calovec.cpy();
1141  osumpt += mu_calovec.sumpt();
1142  }
1143  ATH_MSG_VERBOSE("Mu cluster sumpt " << mu_calovec.sumpt());
1144 
1145  ATH_MSG_VERBOSE( "Misc cluster px, py, sumpt = " << opx << ", " << opy << ", " << osumpt );
1146  metSoftClus->add(opx,opy,osumpt);
1147  ATH_MSG_VERBOSE("Final soft cluster mpx " << metSoftClus->mpx()
1148  << ", mpy " << metSoftClus->mpy()
1149  << " sumet " << metSoftClus->sumet());
1150  }
1151 
1152  return StatusCode::SUCCESS;
1153  }

◆ rebuildMET() [1/3]

StatusCode met::METMaker::rebuildMET ( const std::string &  metKey,
xAOD::Type::ObjectType  metType,
xAOD::MissingETContainer metCont,
const xAOD::IParticleContainer collection,
xAOD::MissingETAssociationHelper helper,
MissingETBase::UsageHandler::Policy  objScale 
) const
finaloverridevirtual

Implements IMETMaker.

Definition at line 219 of file METMaker.cxx.

225  {
227  switch(metType) {
229  metSource = MissingETBase::Source::electron();
230  break;
231  case xAOD::Type::Photon:
232  metSource = MissingETBase::Source::photon();
233  break;
234  case xAOD::Type::Tau:
235  metSource = MissingETBase::Source::tau();
236  break;
237  case xAOD::Type::Muon:
238  metSource = MissingETBase::Source::muon();
239  break;
240  case xAOD::Type::Jet:
241  ATH_MSG_WARNING("Incorrect use of rebuildMET -- use rebuildJetMET for RefJet term");
242  return StatusCode::FAILURE;
243  default:
244  ATH_MSG_WARNING("Invalid object type provided: " << metType);
245  return StatusCode::FAILURE;
246  }
247 
248  MissingET* met = nullptr;
249  if( fillMET(met,metCont, metKey , metSource) != StatusCode::SUCCESS) {
250  ATH_MSG_ERROR("failed to fill MET term \"" << metKey << "\"");
251  return StatusCode::FAILURE;
252  }
253 
254  // If muon eloss corrections are required, create a new term to hold these if it doesn't already exist
255  if(metType==xAOD::Type::Muon && (m_muEloss || m_doSetMuonJetEMScale) && !(*metCont)["MuonEloss"]) {
256  MissingET* met_muEloss = nullptr;
257  if( fillMET(met_muEloss,metCont,"MuonEloss",
259  ATH_MSG_ERROR("failed to create Muon Eloss MET term");
260  return StatusCode::FAILURE;
261  }
262  }
263 
264  return rebuildMET(met,collection,helper,objScale);
265  }

◆ rebuildMET() [2/3]

StatusCode met::METMaker::rebuildMET ( xAOD::MissingET met,
const xAOD::IParticleContainer collection,
xAOD::MissingETAssociationHelper helper,
MissingETBase::UsageHandler::Policy  objScale 
) const
finaloverridevirtual

Implements IMETMaker.

Definition at line 267 of file METMaker.cxx.

271  {
273  bool removeOverlap = true;
274  if(!collection->empty()) {
275  const IParticle* obj = collection->front();
276  if(obj->type()==xAOD::Type::Muon) {
278  removeOverlap = false;
279  }
280  }
283  return rebuildMET(met,collection,helper,p,removeOverlap,objScale);
284  }

◆ rebuildMET() [3/3]

StatusCode met::METMaker::rebuildMET ( xAOD::MissingET met,
const xAOD::IParticleContainer collection,
xAOD::MissingETAssociationHelper helper,
MissingETBase::UsageHandler::Policy  p,
bool  removeOverlap,
MissingETBase::UsageHandler::Policy  objScale 
) const
finaloverridevirtual

Implements IMETMaker.

Definition at line 286 of file METMaker.cxx.

291  {
292  if(!met || !collection) {
293  ATH_MSG_ERROR("Invalid pointer supplied for "
294  << "MET (" << met << ") or "
295  << "collection (" << collection << ").");
296  return StatusCode::FAILURE;
297  }
298  const xAOD::MissingETAssociationMap* map = helper.map();
299  if(!map){
300  ATH_MSG_ERROR("MET Association Helper isn't associated with a MissingETAssociationMap!");
301  return StatusCode::FAILURE;
302  }
303  if(map->empty()) {
304  ATH_MSG_WARNING("Incomplete association map received. Cannot rebuild MET.");
305  ATH_MSG_WARNING("Note: METMaker should only be run on events containing at least one PV");
306  return StatusCode::SUCCESS;
307  }
308  ATH_MSG_VERBOSE("Building MET term " << met->name());
309  dec_constitObjLinks(*met) = std::vector<iplink_t>(0);
310  dec_constitObjWeights(*met) = std::vector<float>(0);
311  std::vector<iplink_t>& uniqueLinks = dec_constitObjLinks(*met);
312  std::vector<float>& uniqueWeights = dec_constitObjWeights(*met);
313  uniqueLinks.reserve(collection->size());
314  uniqueWeights.reserve(collection->size());
315 
316  // Get the hashed key of this collection, if we can. Though his only works
317  // if
318  // 1. the container is an owning container, and not just a view;
319  // 2. the container is in the event store already.
320  // Since we will be creating ElementLink-s to these objects later on in the
321  // code, and it should work in AnalysisBase, only the first one of these
322  // is checked. Since the code can not work otherwise.
323  SG::sgkey_t collectionSgKey = 0;
324  if(collection->ownPolicy() == SG::OWN_ELEMENTS) {
325  collectionSgKey = getKey(collection);
326  if(collectionSgKey == 0) {
327  ATH_MSG_ERROR("Could not find the collection with pointer: "
328  << collection);
329  return StatusCode::FAILURE;
330  }
331  }
332 
333  if(collection->empty()) return StatusCode::SUCCESS;
334 
335  bool originalInputs = !acc_originalObject.isAvailable(*collection->front());
336  bool isShallowCopy = dynamic_cast<const xAOD::ShallowAuxContainer*>(collection->front()->container()->getConstStore());
337  ATH_MSG_VERBOSE("const store = " << collection->front()->container()->getConstStore());
338  if(isShallowCopy && originalInputs) {
339  ATH_MSG_WARNING("Shallow copy provided without \"originalObjectLinks\" decoration! "
340  << "Overlap removal cannot be done. "
341  << "Will not compute this term.");
342  ATH_MSG_WARNING("Please apply xAOD::setOriginalObjectLink() from xAODBase/IParticleHelpers.h");
343  return StatusCode::SUCCESS;
344  }
345  ATH_MSG_VERBOSE("Original inputs? " << originalInputs);
346  for(const auto *const obj : *collection) {
347  const IParticle* orig = obj;
348  bool selected = false;
349  if(!originalInputs) { orig = *acc_originalObject(*obj); }
350  std::vector<const xAOD::MissingETAssociation*> assocs = xAOD::MissingETComposition::getAssociations(map,orig);
351  if(assocs.empty()) {
352  std::string message = "Object is not in association map. Did you make a deep copy but fail to set the \"originalObjectLinks\" decoration? "
353  "If not, Please apply xAOD::setOriginalObjectLink() from xAODBase/IParticleHelpers.h";
354  // Avoid warnings for leptons with pT below threshold for association map
355  if (orig->pt()>m_missObjWarningPtThreshold) {
357  } else {
359  }
360  // if this is an uncalibrated electron below the threshold, then we put it into the soft term
361  if(orig->type()==xAOD::Type::Electron){
362  iplink_t objLink;
363  if(collectionSgKey == 0) {
364  const xAOD::IParticleContainer* ipc = static_cast<const xAOD::IParticleContainer*>(obj->container());
365  objLink = iplink_t(*ipc, obj->index());
366  } else {
367  objLink = iplink_t(collectionSgKey, obj->index());
368  }
369  uniqueLinks.emplace_back( objLink );
370  uniqueWeights.emplace_back( 0. );
371  message = "Missing an electron from the MET map. Included as a track in the soft term. pT: " + std::to_string(obj->pt()/1e3) + " GeV";
372  if (orig->pt()>m_missObjWarningPtThreshold) {
374  } else {
376  }
377  continue;
378  } else {
379  ATH_MSG_ERROR("Missing an object: " << orig->type() << " pT: " << obj->pt()/1e3 << " GeV, may be duplicated in the soft term.");
380  }
381  }
382 
383  // If the object has already been selected and processed, ignore it.
384  if(MissingETComposition::objSelected(helper,orig)) continue;
385  selected = MissingETComposition::selectIfNoOverlaps(helper,orig,p) || !removeOverlap;
386  ATH_MSG_VERBOSE(obj->type() << " (" << orig <<") with pt " << obj->pt()
387  << " is " << ( selected ? "non-" : "") << "overlapping");
388 
389  // Greedy photon options: set selection flags
390  if ((m_greedyPhotons || m_veryGreedyPhotons) && selected && obj->type() == xAOD::Type::Photon){
391  for(const xAOD::MissingETAssociation* assoc : assocs){
392  std::vector<size_t> indices = assoc->overlapIndices(orig);
393  std::vector<const xAOD::IParticle*> allObjects = assoc->objects();
394  for (size_t index : indices){
395  const xAOD::IParticle* thisObj = allObjects[index];
396  if(!thisObj) continue;
397  if ((thisObj->type() == xAOD::Type::Jet && m_veryGreedyPhotons) ||
398  thisObj->type() == xAOD::Type::Electron)
399  helper.setObjSelectionFlag(assoc, thisObj, true);
400  }
401  }
402  }
403 
404  //Do special overlap removal for calo tagged muons
405  if(m_orCaloTaggedMuon && !removeOverlap && orig->type()==xAOD::Type::Muon && static_cast<const xAOD::Muon*>(orig)->muonType()==xAOD::Muon::CaloTagged) {
406  for (size_t i = 0; i < assocs.size(); i++) {
407  std::vector<size_t> ind = assocs[i]->overlapIndices(orig);
408  std::vector<const xAOD::IParticle*> allObjects = assocs[i]->objects();
409  for (size_t indi = 0; indi < ind.size(); indi++) if (allObjects[ind[indi]]) {
410  if (allObjects[ind[indi]]->type()==xAOD::Type::Electron
411  && helper.objSelected(assocs[i], ind[indi])) {
412  selected = false;
413  break;
414  }
415  }
416  }
417  }
418  // Don't overlap remove muons, but flag the non-overlapping muons to take out their tracks from jets
419  // Removed eloss from here -- clusters already flagged.
420  // To be handled in rebuildJetMET
421  if(selected) {
423  ATH_MSG_VERBOSE("Add object with pt " << obj->pt());
424  *met += obj;
425  } else {
427  ATH_MSG_VERBOSE("Add truth object with pt " << constvec.cpt());
428  met->add(constvec.cpx(),constvec.cpy(),constvec.cpt());
429  }
430  iplink_t objLink;
431  if(collectionSgKey == 0) {
432  const xAOD::IParticleContainer* ipc =
433  static_cast<const xAOD::IParticleContainer*>(obj->container());
434  objLink = iplink_t(*ipc, obj->index());
435  } else {
436  objLink = iplink_t(collectionSgKey, obj->index());
437  }
438  uniqueLinks.push_back( objLink );
439  uniqueWeights.push_back( 1. );
440  }
441  }
442  ATH_MSG_DEBUG("Built met term " << met->name() << ", with magnitude " << met->met());
443  return StatusCode::SUCCESS;
444  }

◆ rebuildTrackMET() [1/2]

StatusCode met::METMaker::rebuildTrackMET ( const std::string &  metJetKey,
const std::string &  softTrkKey,
xAOD::MissingETContainer metCont,
const xAOD::JetContainer jets,
const xAOD::MissingETContainer metCoreCont,
xAOD::MissingETAssociationHelper helper,
bool  doJetJVT 
) const
finaloverridevirtual

Implements IMETMaker.

Definition at line 494 of file METMaker.cxx.

501  {
502  ATH_MSG_VERBOSE("Rebuild jet term: " << metJetKey << " and soft term: " << softKey);
503 
504  MissingET* metJet = nullptr;
505  if( fillMET(metJet , metCont, metJetKey , MissingETBase::Source::jet() | MissingETBase::Source::track() ) != StatusCode::SUCCESS) {
506  ATH_MSG_ERROR("failed to fill MET term \"" << metJetKey << "\"");
507  return StatusCode::FAILURE;
508  }
509 
510  const MissingET *coreSoftTrk(nullptr);
511  MissingET *metSoftTrk(nullptr);
512 
513  const MissingET* coreSoft = (*metCoreCont)[softKey+"Core"];
514  if(!coreSoft) {
515  ATH_MSG_WARNING("Invalid soft term key supplied: " << softKey);
516  return StatusCode::FAILURE;
517  }
518  coreSoftTrk = coreSoft;
519 
520  metSoftTrk = nullptr;
521  if( fillMET(metSoftTrk , metCont, softKey , coreSoftTrk->source()) != StatusCode::SUCCESS) {
522  ATH_MSG_ERROR("failed to fill MET term \"" << softKey << "\"");
523  return StatusCode::FAILURE;
524  }
525 
526  return rebuildTrackMET(metJet, jets, helper,
527  metSoftTrk, coreSoftTrk,
528  doJetJVT);
529  }

◆ rebuildTrackMET() [2/2]

StatusCode met::METMaker::rebuildTrackMET ( xAOD::MissingET metJet,
const xAOD::JetContainer jets,
xAOD::MissingETAssociationHelper helper,
xAOD::MissingET metSoftTrk,
const xAOD::MissingET coreSoftTrk,
bool  doJetJVT 
) const
finaloverridevirtual

Implements IMETMaker.

Definition at line 1155 of file METMaker.cxx.

1160  {
1161  return rebuildJetMET(metJet,jets,helper,nullptr,nullptr,metSoftTrk,coreSoftTrk,doJetJVT,true);
1162  }

◆ 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  }

◆ 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_acc_jetRejectionDec

std::unique_ptr<SG::AuxElement::ConstAccessor<char > > met::METMaker::m_acc_jetRejectionDec
private

Definition at line 150 of file METMaker.h.

◆ m_CenJetPtCut

double met::METMaker::m_CenJetPtCut {}
private

Definition at line 161 of file METMaker.h.

◆ m_customCenJetPtCut

double met::METMaker::m_customCenJetPtCut {}
private

Definition at line 170 of file METMaker.h.

◆ m_customFwdJetPtCut

double met::METMaker::m_customFwdJetPtCut {}
private

Definition at line 170 of file METMaker.h.

◆ m_customJvtPtMax

double met::METMaker::m_customJvtPtMax {}
private

Definition at line 171 of file METMaker.h.

◆ m_customJvtWP

std::string met::METMaker::m_customJvtWP
private

Definition at line 172 of file METMaker.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_doConstJet

bool met::METMaker::m_doConstJet {}
private

Definition at line 176 of file METMaker.h.

◆ m_doPFlow

bool met::METMaker::m_doPFlow {}
private

Definition at line 174 of file METMaker.h.

◆ m_doRemoveElecTrks

bool met::METMaker::m_doRemoveElecTrks {}
private

Definition at line 180 of file METMaker.h.

◆ m_doRemoveElecTrksEM

bool met::METMaker::m_doRemoveElecTrksEM {}
private

Definition at line 181 of file METMaker.h.

◆ m_doRemoveMuonJets

bool met::METMaker::m_doRemoveMuonJets {}
private

Definition at line 179 of file METMaker.h.

◆ m_doSetMuonJetEMScale

bool met::METMaker::m_doSetMuonJetEMScale {}
private

Definition at line 182 of file METMaker.h.

◆ m_doSoftTruth

bool met::METMaker::m_doSoftTruth {}
private

Definition at line 175 of file METMaker.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_FwdJetPtCut

double met::METMaker::m_FwdJetPtCut {}
private

Definition at line 161 of file METMaker.h.

◆ m_greedyPhotons

bool met::METMaker::m_greedyPhotons {}
private

Definition at line 187 of file METMaker.h.

◆ m_jetConstitScaleMom

std::string met::METMaker::m_jetConstitScaleMom
private

Definition at line 158 of file METMaker.h.

◆ m_jetCorrectPhi

bool met::METMaker::m_jetCorrectPhi {}
private

Definition at line 155 of file METMaker.h.

◆ m_jetEmfMuOlap

double met::METMaker::m_jetEmfMuOlap {}
private

Definition at line 194 of file METMaker.h.

◆ m_JetEtaForw

double met::METMaker::m_JetEtaForw {}
private

Definition at line 164 of file METMaker.h.

◆ m_JetEtaMax

double met::METMaker::m_JetEtaMax {}
private

Definition at line 163 of file METMaker.h.

◆ m_jetMinEfrac

double met::METMaker::m_jetMinEfrac {}
private

Definition at line 156 of file METMaker.h.

◆ m_jetMinWeightedPt

double met::METMaker::m_jetMinWeightedPt {}
private

Definition at line 157 of file METMaker.h.

◆ m_jetPsEMuOlap

double met::METMaker::m_jetPsEMuOlap {}
private

Definition at line 193 of file METMaker.h.

◆ m_jetRejectionDec

std::string met::METMaker::m_jetRejectionDec
private

Definition at line 159 of file METMaker.h.

◆ m_jetSelection

std::string met::METMaker::m_jetSelection
private

Definition at line 166 of file METMaker.h.

◆ m_jetTrkNMuOlap

int met::METMaker::m_jetTrkNMuOlap {}
private

Definition at line 191 of file METMaker.h.

◆ m_jetTrkPtMuPt

double met::METMaker::m_jetTrkPtMuPt {}
private

Definition at line 195 of file METMaker.h.

◆ m_jetWidthMuOlap

double met::METMaker::m_jetWidthMuOlap {}
private

Definition at line 192 of file METMaker.h.

◆ m_JvtCut

double met::METMaker::m_JvtCut {}
private

Definition at line 162 of file METMaker.h.

◆ m_JvtPtMax

double met::METMaker::m_JvtPtMax {}
private

Definition at line 162 of file METMaker.h.

◆ m_JvtTool

ToolHandle<IAsgSelectionTool> met::METMaker::m_JvtTool
private

Definition at line 199 of file METMaker.h.

◆ m_JvtWP

std::string met::METMaker::m_JvtWP
private

Definition at line 167 of file METMaker.h.

◆ m_missObjWarningPtThreshold

float met::METMaker::m_missObjWarningPtThreshold
private

Definition at line 153 of file METMaker.h.

◆ m_muEloss

bool met::METMaker::m_muEloss {}
private

Definition at line 185 of file METMaker.h.

◆ m_muIDPTJetPtRatioMuOlap

double met::METMaker::m_muIDPTJetPtRatioMuOlap {}
private

Definition at line 196 of file METMaker.h.

◆ m_orCaloTaggedMuon

bool met::METMaker::m_orCaloTaggedMuon {}
private

Definition at line 186 of file METMaker.h.

◆ m_PVkey

SG::ReadHandleKey<xAOD::VertexContainer> met::METMaker::m_PVkey
private

Definition at line 147 of file METMaker.h.

◆ m_skipSystematicJetSelection

bool met::METMaker::m_skipSystematicJetSelection {}
private

Definition at line 183 of file METMaker.h.

◆ m_trkseltool

ToolHandle<InDet::IInDetTrackSelectionTool> met::METMaker::m_trkseltool
private

Definition at line 198 of file METMaker.h.

◆ m_useGhostMuons

bool met::METMaker::m_useGhostMuons {}
private

Definition at line 178 of file METMaker.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_veryGreedyPhotons

bool met::METMaker::m_veryGreedyPhotons {}
private

Definition at line 188 of file METMaker.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
MissingETContainer
Definition: Reconstruction/MissingETEvent/MissingETEvent/MissingETContainer.h:22
met::METMaker::m_muEloss
bool m_muEloss
Definition: METMaker.h:185
met::METMaker::m_jetTrkNMuOlap
int m_jetTrkNMuOlap
Definition: METMaker.h:191
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
met::METMaker::m_skipSystematicJetSelection
bool m_skipSystematicJetSelection
Definition: METMaker.h:183
MissingETBase::Source::muon
static Types::bitmask_t muon(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed muons.
Definition: MissingETBase.h:250
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:407
MissingETBase::UsageHandler::PhysicsObject
@ PhysicsObject
Physics object based.
Definition: MissingETCompositionBase.h:187
met::METMaker::m_customFwdJetPtCut
double m_customFwdJetPtCut
Definition: METMaker.h:170
MissingETBase::UsageHandler::TruthParticle
@ TruthParticle
Truth particle based.
Definition: MissingETCompositionBase.h:189
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
met::METMaker::m_jetPsEMuOlap
double m_jetPsEMuOlap
Definition: METMaker.h:193
met::METMaker::m_JvtPtMax
double m_JvtPtMax
Definition: METMaker.h:162
met::METMaker::m_missObjWarningPtThreshold
float m_missObjWarningPtThreshold
Definition: METMaker.h:153
make_coralServer_rep.opt
opt
Definition: make_coralServer_rep.py:19
xAOD::MissingETAssociation_v1
MET association descriptor contains object links and corresponding parameters.
Definition: MissingETAssociation_v1.h:25
xAOD::MissingET_v1::sumet
float sumet() const
Returns.
met::METMaker::m_doSetMuonJetEMScale
bool m_doSetMuonJetEMScale
Definition: METMaker.h:182
met::METMaker::m_doPFlow
bool m_doPFlow
Definition: METMaker.h:174
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
index
Definition: index.py:1
met::METMaker::m_jetConstitScaleMom
std::string m_jetConstitScaleMom
Definition: METMaker.h:158
Trk::indices
std::pair< long int, long int > indices
Definition: AlSymMatBase.h:24
MissingETBase::Source::electron
static Types::bitmask_t electron(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed electrons.
Definition: MissingETBase.h:229
met::METMaker::m_jetCorrectPhi
bool m_jetCorrectPhi
Definition: METMaker.h:155
met::METMaker::m_jetSelection
std::string m_jetSelection
Definition: METMaker.h:166
xAOD::MissingETComposition::objSelected
static bool objSelected(const MissingETAssociationHelper &helper, const IParticle *obj)
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:375
xAOD::ShallowAuxContainer
Class creating a shallow copy of an existing auxiliary container.
Definition: ShallowAuxContainer.h:50
MissingETBase::Source::track
static Types::bitmask_t track(Region reg=Region::FullAcceptance)
Bit mask for MET term from Track signal objects.
Definition: MissingETBase.h:291
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
defineDB.jets
jets
Definition: JetTagCalibration/share/defineDB.py:24
met::METMaker::m_CenJetPtCut
double m_CenJetPtCut
Definition: METMaker.h:161
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::IParticle::type
virtual Type::ObjectType type() const =0
The type of the object as a simple enumeration.
met::METMaker::m_JetEtaForw
double m_JetEtaForw
Definition: METMaker.h:164
MissingETBase::Source::Region::Central
@ Central
Indicator for MET contribution from the central region.
met::METMaker::m_jetEmfMuOlap
double m_jetEmfMuOlap
Definition: METMaker.h:194
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
met::METMaker::rebuildJetMET
virtual StatusCode rebuildJetMET(const std::string &metJetKey, const std::string &softClusKey, const std::string &softTrkKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETContainer *metCoreCont, xAOD::MissingETAssociationHelper &helper, bool doJetJVT) const override final
Definition: METMaker.cxx:531
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
met::METMaker::m_FwdJetPtCut
double m_FwdJetPtCut
Definition: METMaker.h:161
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
MuonR4::to_string
std::string to_string(const SectorProjector proj)
Definition: MsTrackSeeder.cxx:66
MissingETBase::Types::bitmask_t
uint64_t bitmask_t
Type for status word bit mask.
Definition: MissingETBase.h:39
xAOD::MissingETAssociation
MissingETAssociation_v1 MissingETAssociation
Version control by type definition.
Definition: MissingETAssociation.h:15
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
MissingETBase::UsageHandler::OnlyCluster
@ OnlyCluster
CaloCluster based only.
Definition: MissingETCompositionBase.h:184
MissingETBase::Source::isTrackTerm
static bool isTrackTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
Definition: MissingETBase.h:404
met::METMaker::m_muIDPTJetPtRatioMuOlap
double m_muIDPTJetPtRatioMuOlap
Definition: METMaker.h:196
I4Momentum::pt
virtual double pt() const =0
transverse momentum
ReweightUtils.message
message
Definition: ReweightUtils.py:15
met::METMaker::m_customCenJetPtCut
double m_customCenJetPtCut
Definition: METMaker.h:170
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
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
MissingETBase::Source::Type::Muon
@ Muon
Indicator for the MET term from reconstructed or MC truth muons.
xAOD::MissingETAssociationMap_v1
Definition: MissingETAssociationMap_v1.h:29
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
met::METMaker::m_doRemoveMuonJets
bool m_doRemoveMuonJets
Definition: METMaker.h:179
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:115
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
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
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::METMaker::m_JetEtaMax
double m_JetEtaMax
Definition: METMaker.h:163
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition: AsgTool.cxx:58
met::METMaker::rebuildMET
virtual StatusCode rebuildMET(const std::string &metKey, xAOD::Type::ObjectType metType, xAOD::MissingETContainer *metCont, const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, MissingETBase::UsageHandler::Policy objScale) const override final
Definition: METMaker.cxx:219
met
Definition: IMETSignificance.h:24
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
xAOD::MissingETComposition::getConstVec
static MissingETBase::Types::constvec_t getConstVec(const MissingETAssociationMap *pMap, const IParticle *pPart, MissingETBase::UsageHandler::Policy p)
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:361
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
asg::AsgTool::getKey
SG::sgkey_t getKey(const void *ptr) const
Get the (hashed) key of an object that is in the event store.
Definition: AsgTool.cxx:119
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
asg::AsgToolConfig
an object that can create a AsgTool
Definition: AsgToolConfig.h:22
lumiFormat.i
int i
Definition: lumiFormat.py:85
SG::OWN_ELEMENTS
@ OWN_ELEMENTS
this data object owns its elements
Definition: OwnershipPolicy.h:17
met::METMaker::m_JvtWP
std::string m_JvtWP
Definition: METMaker.h:167
met::METMaker::m_doSoftTruth
bool m_doSoftTruth
Definition: METMaker.h:175
MissingETBase::Source::jet
static Types::bitmask_t jet(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed jets.
Definition: MissingETBase.h:257
met::METMaker::m_jetTrkPtMuPt
double m_jetTrkPtMuPt
Definition: METMaker.h:195
met::METMaker::m_customJvtPtMax
double m_customJvtPtMax
Definition: METMaker.h:171
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
met::METMaker::m_jetMinEfrac
double m_jetMinEfrac
Definition: METMaker.h:156
met::METMaker::rebuildTrackMET
virtual StatusCode rebuildTrackMET(const std::string &metJetKey, const std::string &softTrkKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETContainer *metCoreCont, xAOD::MissingETAssociationHelper &helper, bool doJetJVT) const override final
Definition: METMaker.cxx:494
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
xAOD::MissingETAssociation_v1::ConstVec::cpy
float cpy() const
Returns .
xAOD::MissingETAssociation_v1::ConstVec::sumpt
float sumpt() const
Returns sum of component pt.
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:572
met::METMaker::m_useGhostMuons
bool m_useGhostMuons
Definition: METMaker.h:178
CalibDbCompareRT.dummy
dummy
Definition: CalibDbCompareRT.py:59
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.
met::METMaker::m_PVkey
SG::ReadHandleKey< xAOD::VertexContainer > m_PVkey
Definition: METMaker.h:147
xAOD::MissingET_v1::mpx
float mpx() const
Returns .
met::METMaker::m_customJvtWP
std::string m_customJvtWP
Definition: METMaker.h:172
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
python.getProblemFolderFromLogs.el
dictionary el
Definition: getProblemFolderFromLogs.py:48
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::MissingETAssociationMap_v1::getMiscAssociation
const MissingETAssociation_v1 * getMiscAssociation() const
Get an association for miscellaneous objects not associated to jets.
Definition: MissingETAssociationMap_v1.cxx:186
met::METMaker::m_doConstJet
bool m_doConstJet
Definition: METMaker.h:176
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
xAOD::MissingET_v1::name
const std::string & name() const
Identifier getters.
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
met::METMaker::m_doRemoveElecTrksEM
bool m_doRemoveElecTrksEM
Definition: METMaker.h:181
compute_lumi.denom
denom
Definition: compute_lumi.py:76
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
MissingETBase::UsageHandler::Policy
Policy
Policies on usage checks.
Definition: MissingETCompositionBase.h:182
xAOD::MissingET_v1::add
void add(const IParticle *particle)
Add particle kinematics to MET.
Definition: MissingET_v1.cxx:77
xAOD::JetFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition: JetTypes.h:17
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
MissingETBase::Source::tau
static Types::bitmask_t tau(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed tau leptons.
Definition: MissingETBase.h:243
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
MissingETBase::UsageHandler::OnlyTrack
@ OnlyTrack
Track based only.
Definition: MissingETCompositionBase.h:185
xAOD::MissingET_v1::source
MissingETBase::Types::bitmask_t source() const
MET object source tag.
xAOD::MissingETComposition::getAssociation
static const MissingETAssociation * getAssociation(const MissingETAssociationMap *pMap, const Jet *pJet)
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:415
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: sgkey_t.h:32
met::METMaker::m_acc_jetRejectionDec
std::unique_ptr< SG::AuxElement::ConstAccessor< char > > m_acc_jetRejectionDec
Definition: METMaker.h:150
xAOD::Electron_v1
Definition: Electron_v1.h:34
met::METMaker::m_jetMinWeightedPt
double m_jetMinWeightedPt
Definition: METMaker.h:157
MissingETBase::UsageHandler::ParticleFlow
@ ParticleFlow
Particle Flow Object based.
Definition: MissingETCompositionBase.h:188
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
met::METMaker::m_doRemoveElecTrks
bool m_doRemoveElecTrks
Definition: METMaker.h:180
Muon
struct TBPatternUnitContext Muon
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
met::METMaker::m_jetWidthMuOlap
double m_jetWidthMuOlap
Definition: METMaker.h:192
DeMoScan.index
string index
Definition: DeMoScan.py:362
a
TList * a
Definition: liststreamerinfos.cxx:10
python.selector.AtlRunQuerySelectorLhcOlc.selector
selector
Definition: AtlRunQuerySelectorLhcOlc.py:610
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
met::METMaker::getPV
const xAOD::Vertex * getPV() const
Definition: METMaker.cxx:1182
xAOD::MissingETAssociation_v1::ConstVec::cpt
float cpt() const
Returns .
Definition: MissingETAssociation_v1.cxx:85
met::METMaker::acceptTrack
bool acceptTrack(const xAOD::TrackParticle *trk, const xAOD::Vertex *vx) const
Definition: METMaker.cxx:1177
MissingET
Definition: Reconstruction/MissingETEvent/MissingETEvent/MissingET.h:23
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
python.changerun.pv
pv
Definition: changerun.py:79
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
DataVector::ownPolicy
SG::OwnershipPolicy ownPolicy() const
Return the ownership policy setting for this container.
xAODType::Tau
@ Tau
The object is a tau (jet)
Definition: ObjectType.h:49
MissingETBase::Source::photon
static Types::bitmask_t photon(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed photons.
Definition: MissingETBase.h:236
pickleTool.object
object
Definition: pickleTool.py:29
met::METMaker::m_veryGreedyPhotons
bool m_veryGreedyPhotons
Definition: METMaker.h:188
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
met::fillMET
StatusCode fillMET(xAOD::MissingET *&met, xAOD::MissingETContainer *metCont, const std::string &metKey, const MissingETBase::Types::bitmask_t metSource)
Definition: METHelpers.cxx:123
SG::AuxElement::container
const SG::AuxVectorData * container() const
Return the container holding this element.
xAOD::MissingETAssociation_v1::ConstVec::cpx
float cpx() const
Returns .
met::METMaker::m_greedyPhotons
bool m_greedyPhotons
Definition: METMaker.h:187
xAOD::MissingET_v1::mpy
float mpy() const
Returns .
xAOD::JetAttribute::GhostTrack
@ GhostTrack
Definition: JetAttributes.h:252
python.PyAthena.obj
obj
Definition: PyAthena.py:132
SG::DataProxy
Definition: DataProxy.h:45
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
IParticle
Definition: Event/EventKernel/EventKernel/IParticle.h:43
xAOD::MissingETComposition::selectIfNoOverlaps
static bool selectIfNoOverlaps(MissingETAssociationHelper &helper, const IParticle *obj, MissingETBase::UsageHandler::Policy p)
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:382
met::METMaker::m_JvtTool
ToolHandle< IAsgSelectionTool > m_JvtTool
Definition: METMaker.h:199
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
xAOD::MissingETAssociation_v1::ConstVec::ce
float ce() const
Returns .
met::METMaker::m_orCaloTaggedMuon
bool m_orCaloTaggedMuon
Definition: METMaker.h:186
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition: Event/xAOD/xAODJet/xAODJet/Jet.h:17
met::METMaker::m_jetRejectionDec
std::string m_jetRejectionDec
Definition: METMaker.h:159
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
fitman.k
k
Definition: fitman.py:528
xAOD::MissingETComposition::getAssociations
static std::vector< const MissingETAssociation * > getAssociations(const MissingETAssociationMap *pMap, const IParticle *pPart)
Access non-modifiable contribution object.
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:391
xAOD::Muon_v1::muonType
MuonType muonType() const
met::METMaker::m_trkseltool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkseltool
Definition: METMaker.h:198
met::iplink_t
ElementLink< xAOD::IParticleContainer > iplink_t
Definition: ColumnarMETMaker.cxx:63