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) override final
 
virtual StatusCode rebuildMET (xAOD::MissingET *met, const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, MissingETBase::UsageHandler::Policy objScale) 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) 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) 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) 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) 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) override final
 
virtual StatusCode rebuildTrackMET (xAOD::MissingET *metJet, const xAOD::JetContainer *jets, xAOD::MissingETAssociationHelper &helper, xAOD::MissingET *metSoftTrk, const xAOD::MissingET *coreSoftTrk, bool doJetJVT) override final
 
virtual StatusCode markInvisible (const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, xAOD::MissingETContainer *metCont) 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 > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

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 > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &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_jetJvtMomentName
 
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("JetJvtMomentName", m_jetJvtMomentName = "Jvt" );
99  declareProperty("JetRejectionDec", m_jetRejectionDec = "" );
100  declareProperty("JetMinEFrac", m_jetMinEfrac = 0.0 );
101  declareProperty("JetMinWeightedPt", m_jetMinWeightedPt = 20.0e3 );
102  declareProperty("JetConstitScaleMom", m_jetConstitScaleMom = "JetConstitScaleMomentum");
103  declareProperty("CorrectJetPhi", m_jetCorrectPhi = false );
104  declareProperty("DoPFlow", m_doPFlow = false );
105  declareProperty("DoSoftTruth", m_doSoftTruth = false );
106  declareProperty("DoJetTruth", m_doConstJet = false );
107 
108  declareProperty("JetSelection", m_jetSelection = "Tight" );
109  declareProperty("JetEtaMax", m_JetEtaMax = 4.5 );
110  declareProperty("JetEtaForw", m_JetEtaForw = 2.5 );
111  declareProperty("CustomCentralJetPt", m_customCenJetPtCut = 20e3 );
112  declareProperty("CustomForwardJetPt", m_customFwdJetPtCut = 20e3 );
113  declareProperty("CustomJetJvtPtMax", m_customJvtPtMax = 60e3 );
114  declareProperty("CustomJetJvtWP", m_customJvtWP = "FixedEffPt" );
115 
116  declareProperty("DoMuonEloss", m_muEloss = false );
117  declareProperty("ORCaloTaggedMuons", m_orCaloTaggedMuon = true );
118  declareProperty("GreedyPhotons", m_greedyPhotons = false );
119  declareProperty("VeryGreedyPhotons", m_veryGreedyPhotons = false );
120 
121  declareProperty("UseGhostMuons", m_useGhostMuons = false );
122  declareProperty("DoRemoveMuonJets", m_doRemoveMuonJets = true );
123  declareProperty("DoSetMuonJetEMScale", m_doSetMuonJetEMScale = true );
124 
125  declareProperty("DoRemoveElecTrks", m_doRemoveElecTrks = true );
126  declareProperty("DoRemoveElecTrksEM", m_doRemoveElecTrksEM = false );
127 
128  declareProperty("skipSystematicJetSelection", m_skipSystematicJetSelection = false,
129  "EXPERIMENTAL: whether to use simplified OR based on nominal jets "
130  "and for jet-related systematics only. "
131  "WARNING: this property is strictly for doing physics studies of the feasibility "
132  "of this OR scheme, it should not be used in a regular analysis");
133 
134  // muon overlap variables (expert use only)
135  declareProperty("JetTrkNMuOlap", m_jetTrkNMuOlap = 5 );
136  declareProperty("JetWidthMuOlap", m_jetWidthMuOlap = 0.1 );
137  declareProperty("JetPsEMuOlap", m_jetPsEMuOlap = 2.5e3 );
138  declareProperty("JetEmfMuOlap", m_jetEmfMuOlap = 0.9 );
139  declareProperty("JetTrkPtMuPt", m_jetTrkPtMuPt = 0.8 );
140  declareProperty("muIDPTJetPtRatioMuOlap", m_muIDPTJetPtRatioMuOlap = 2.0 );
141 
142  declareProperty("MissingObjWarnThreshold", m_missObjWarningPtThreshold = 7.0e3 );
143 
144  declareProperty("TrackSelectorTool", m_trkseltool );
145  declareProperty("JvtSelTool", m_JvtTool );
146  }

◆ ~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 1178 of file METMaker.cxx.

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

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  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 > &  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 > &  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 > &  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 > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

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

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

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

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

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ 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 1183 of file METMaker.cxx.

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

◆ 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 155 of file METMaker.cxx.

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

◆ 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 
)
finaloverridevirtual

Implements IMETMaker.

Definition at line 1166 of file METMaker.cxx.

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

◆ 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 
)
finaloverridevirtual

Implements IMETMaker.

Definition at line 447 of file METMaker.cxx.

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

◆ 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 
)
finaloverridevirtual

Implements IMETMaker.

Definition at line 532 of file METMaker.cxx.

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

◆ 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 
)
finaloverridevirtual

Implements IMETMaker.

Definition at line 578 of file METMaker.cxx.

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

◆ 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 
)
finaloverridevirtual

Implements IMETMaker.

Definition at line 220 of file METMaker.cxx.

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

◆ rebuildMET() [2/3]

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

Implements IMETMaker.

Definition at line 268 of file METMaker.cxx.

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

◆ 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 
)
finaloverridevirtual

Implements IMETMaker.

Definition at line 287 of file METMaker.cxx.

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

◆ 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 
)
finaloverridevirtual

Implements IMETMaker.

Definition at line 495 of file METMaker.cxx.

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

◆ 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 
)
finaloverridevirtual

Implements IMETMaker.

Definition at line 1156 of file METMaker.cxx.

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

◆ 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 162 of file METMaker.h.

◆ m_customCenJetPtCut

double met::METMaker::m_customCenJetPtCut {}
private

Definition at line 171 of file METMaker.h.

◆ m_customFwdJetPtCut

double met::METMaker::m_customFwdJetPtCut {}
private

Definition at line 171 of file METMaker.h.

◆ m_customJvtPtMax

double met::METMaker::m_customJvtPtMax {}
private

Definition at line 172 of file METMaker.h.

◆ m_customJvtWP

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

Definition at line 173 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 177 of file METMaker.h.

◆ m_doPFlow

bool met::METMaker::m_doPFlow {}
private

Definition at line 175 of file METMaker.h.

◆ m_doRemoveElecTrks

bool met::METMaker::m_doRemoveElecTrks {}
private

Definition at line 181 of file METMaker.h.

◆ m_doRemoveElecTrksEM

bool met::METMaker::m_doRemoveElecTrksEM {}
private

Definition at line 182 of file METMaker.h.

◆ m_doRemoveMuonJets

bool met::METMaker::m_doRemoveMuonJets {}
private

Definition at line 180 of file METMaker.h.

◆ m_doSetMuonJetEMScale

bool met::METMaker::m_doSetMuonJetEMScale {}
private

Definition at line 183 of file METMaker.h.

◆ m_doSoftTruth

bool met::METMaker::m_doSoftTruth {}
private

Definition at line 176 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 162 of file METMaker.h.

◆ m_greedyPhotons

bool met::METMaker::m_greedyPhotons {}
private

Definition at line 188 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 195 of file METMaker.h.

◆ m_JetEtaForw

double met::METMaker::m_JetEtaForw {}
private

Definition at line 165 of file METMaker.h.

◆ m_JetEtaMax

double met::METMaker::m_JetEtaMax {}
private

Definition at line 164 of file METMaker.h.

◆ m_jetJvtMomentName

std::string met::METMaker::m_jetJvtMomentName
private

Definition at line 159 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 194 of file METMaker.h.

◆ m_jetRejectionDec

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

Definition at line 160 of file METMaker.h.

◆ m_jetSelection

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

Definition at line 167 of file METMaker.h.

◆ m_jetTrkNMuOlap

int met::METMaker::m_jetTrkNMuOlap {}
private

Definition at line 192 of file METMaker.h.

◆ m_jetTrkPtMuPt

double met::METMaker::m_jetTrkPtMuPt {}
private

Definition at line 196 of file METMaker.h.

◆ m_jetWidthMuOlap

double met::METMaker::m_jetWidthMuOlap {}
private

Definition at line 193 of file METMaker.h.

◆ m_JvtCut

double met::METMaker::m_JvtCut {}
private

Definition at line 163 of file METMaker.h.

◆ m_JvtPtMax

double met::METMaker::m_JvtPtMax {}
private

Definition at line 163 of file METMaker.h.

◆ m_JvtTool

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

Definition at line 200 of file METMaker.h.

◆ m_JvtWP

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

Definition at line 168 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 186 of file METMaker.h.

◆ m_muIDPTJetPtRatioMuOlap

double met::METMaker::m_muIDPTJetPtRatioMuOlap {}
private

Definition at line 197 of file METMaker.h.

◆ m_orCaloTaggedMuon

bool met::METMaker::m_orCaloTaggedMuon {}
private

Definition at line 187 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 184 of file METMaker.h.

◆ m_trkseltool

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

Definition at line 199 of file METMaker.h.

◆ m_useGhostMuons

bool met::METMaker::m_useGhostMuons {}
private

Definition at line 179 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 189 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:186
met::METMaker::m_jetTrkNMuOlap
int m_jetTrkNMuOlap
Definition: METMaker.h:192
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:184
MissingETBase::Source::muon
static Types::bitmask_t muon(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed muons.
Definition: MissingETBase.h:250
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) override final
Definition: METMaker.cxx:532
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
MissingETBase::UsageHandler::PhysicsObject
@ PhysicsObject
Physics object based.
Definition: MissingETCompositionBase.h:187
met::METMaker::m_customFwdJetPtCut
double m_customFwdJetPtCut
Definition: METMaker.h:171
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::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) override final
Definition: METMaker.cxx:495
met::METMaker::m_jetPsEMuOlap
double m_jetPsEMuOlap
Definition: METMaker.h:194
met::METMaker::m_JvtPtMax
double m_JvtPtMax
Definition: METMaker.h:163
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:29
xAOD::MissingET_v1::sumet
float sumet() const
Returns.
met::METMaker::m_doSetMuonJetEMScale
bool m_doSetMuonJetEMScale
Definition: METMaker.h:183
met::METMaker::m_doPFlow
bool m_doPFlow
Definition: METMaker.h:175
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
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:167
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:54
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
met::METMaker::m_CenJetPtCut
double m_CenJetPtCut
Definition: METMaker.h:162
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:165
MissingETBase::Source::Region::Central
@ Central
Indicator for MET contribution from the central region.
met::METMaker::m_jetEmfMuOlap
double m_jetEmfMuOlap
Definition: METMaker.h:195
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
met::METMaker::m_FwdJetPtCut
double m_FwdJetPtCut
Definition: METMaker.h:162
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
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:197
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:171
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
xAOD::MissingETAssociation_v1::ConstVec
Vector sum of constituents for subtractive overlap removal.
Definition: MissingETAssociation_v1.h:36
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:180
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
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:164
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition: AsgTool.cxx:58
met
Definition: IMETSignificance.h:24
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
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:168
met::METMaker::m_doSoftTruth
bool m_doSoftTruth
Definition: METMaker.h:176
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:196
met::METMaker::m_customJvtPtMax
double m_customJvtPtMax
Definition: METMaker.h:172
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
met::METMaker::m_jetMinEfrac
double m_jetMinEfrac
Definition: METMaker.h:156
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:571
met::METMaker::m_useGhostMuons
bool m_useGhostMuons
Definition: METMaker.h:179
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
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
xAOD::MissingET_v1::mpx
float mpx() const
Returns .
met::METMaker::m_customJvtWP
std::string m_customJvtWP
Definition: METMaker.h:173
python.xAODType.dummy
dummy
Definition: xAODType.py:4
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
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:177
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:794
met::METMaker::m_doRemoveElecTrksEM
bool m_doRemoveElecTrksEM
Definition: METMaker.h:182
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:228
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
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
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: CxxUtils/CxxUtils/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
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) override final
Definition: METMaker.cxx:220
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:181
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:193
DeMoScan.index
string index
Definition: DeMoScan.py:364
a
TList * a
Definition: liststreamerinfos.cxx:10
python.selector.AtlRunQuerySelectorLhcOlc.selector
selector
Definition: AtlRunQuerySelectorLhcOlc.py:611
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:1183
xAOD::MissingETAssociation_v1::ConstVec::cpt
float cpt() const
Returns .
Definition: MissingETAssociation_v1.cxx:87
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
met::METMaker::acceptTrack
bool acceptTrack(const xAOD::TrackParticle *trk, const xAOD::Vertex *vx) const
Definition: METMaker.cxx:1178
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:81
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
DataVector::ownPolicy
SG::OwnershipPolicy ownPolicy() const
Return the ownership policy setting for this container.
met::METMaker::m_jetJvtMomentName
std::string m_jetJvtMomentName
Definition: METMaker.h:159
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:30
met::METMaker::m_veryGreedyPhotons
bool m_veryGreedyPhotons
Definition: METMaker.h:189
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
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:188
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:200
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::MissingETAssociation_v1::ConstVec::ce
float ce() const
Returns .
met::METMaker::m_orCaloTaggedMuon
bool m_orCaloTaggedMuon
Definition: METMaker.h:187
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:160
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
checkFileSG.ind
list ind
Definition: checkFileSG.py:118
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:199
met::iplink_t
ElementLink< xAOD::IParticleContainer > iplink_t
Definition: METMaker.cxx:63