ATLAS Offline Software
Loading...
Searching...
No Matches
met::ColumnarMETMaker Class Reference

#include <ColumnarMETMaker.h>

Inheritance diagram for met::ColumnarMETMaker:

Public Member Functions

 ColumnarMETMaker (const std::string &name)
 Constructor with parameters:
virtual ~ColumnarMETMaker ()
 Destructor:
virtual StatusCode initialize () override final
 Dummy implementation of the initialisation function.
virtual StatusCode rebuildMET (const std::string &metKey, xAOD::Type::ObjectType metType, xAOD::MissingETContainer *metCont, const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, MissingETBase::UsageHandler::Policy objScale) const override final
StatusCode rebuildMET (const std::string &metKey, xAOD::Type::ObjectType metType, columnar::MutableMetRange metCont, columnar::ParticleRange collection, columnar::MetAssociationHelper<> helper, MissingETBase::UsageHandler::Policy objScale) const
virtual StatusCode rebuildMET (xAOD::MissingET *met, const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, MissingETBase::UsageHandler::Policy objScale) const override final
StatusCode rebuildMET (columnar::MutableMetId met, columnar::ParticleRange collection, columnar::MetAssociationHelper<> helper, MissingETBase::UsageHandler::Policy objScale) const
virtual StatusCode rebuildMET (xAOD::MissingET *met, const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, MissingETBase::UsageHandler::Policy p, bool removeOverlap, MissingETBase::UsageHandler::Policy objScale) const override final
StatusCode rebuildMET (columnar::MutableMetId met, columnar::ParticleRange collection, columnar::MetAssociationHelper<> helper, MissingETBase::UsageHandler::Policy p, bool removeOverlap, MissingETBase::UsageHandler::Policy objScale) const
virtual StatusCode rebuildJetMET (const std::string &metJetKey, const std::string &softClusKey, const std::string &softTrkKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETContainer *metCoreCont, xAOD::MissingETAssociationHelper &helper, bool doJetJVT) const override final
StatusCode rebuildJetMET (const std::string &metJetKey, const std::string &softClusKey, const std::string &softTrkKey, columnar::MutableMetRange metCont, columnar::JetRange jets, columnar::Met1Range metCoreCont, columnar::MetAssociationHelper<> helper, bool doJetJVT) const
virtual StatusCode rebuildJetMET (const std::string &metJetKey, const std::string &metSoftKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETContainer *metCoreCont, xAOD::MissingETAssociationHelper &helper, bool doJetJVT) const override final
StatusCode rebuildJetMET (const std::string &metJetKey, const std::string &metSoftKey, columnar::MutableMetRange metCont, columnar::JetRange jets, columnar::Met1Range metCoreCont, columnar::MetAssociationHelper<> helper, bool doJetJVT) const
virtual StatusCode rebuildJetMET (xAOD::MissingET *metJet, const xAOD::JetContainer *jets, xAOD::MissingETAssociationHelper &helper, xAOD::MissingET *metSoftClus, const xAOD::MissingET *coreSoftClus, xAOD::MissingET *metSoftTrk, const xAOD::MissingET *coreSoftTrk, bool doJetJVT, bool tracksForHardJets=false, std::vector< const xAOD::IParticle * > *softConst=0) const override final
StatusCode rebuildJetMET (columnar::MutableMetId metJet, columnar::MutableMetRange metCont, columnar::JetRange jets, columnar::MetAssociationHelper<> helper, columnar::OptMutableMetId metSoftClus, columnar::OptMet1Id coreSoftClus, columnar::OptMutableMetId metSoftTrk, columnar::OptMet1Id coreSoftTrk, bool doJetJVT, bool tracksForHardJets=false, std::vector< const xAOD::IParticle * > *softConst=0) const
virtual StatusCode rebuildTrackMET (const std::string &metJetKey, const std::string &softTrkKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETContainer *metCoreCont, xAOD::MissingETAssociationHelper &helper, bool doJetJVT) const override final
StatusCode rebuildTrackMET (const std::string &metJetKey, const std::string &softTrkKey, columnar::MutableMetRange metCont, columnar::JetRange jets, columnar::Met1Range metCoreCont, columnar::MetAssociationHelper<> helper, bool doJetJVT) const
virtual StatusCode rebuildTrackMET (xAOD::MissingET *metJet, const xAOD::JetContainer *jets, xAOD::MissingETAssociationHelper &helper, xAOD::MissingET *metSoftTrk, const xAOD::MissingET *coreSoftTrk, bool doJetJVT) const override final
StatusCode rebuildTrackMET (columnar::MutableMetId metJet, columnar::MutableMetRange metCont, columnar::JetRange jets, columnar::MetAssociationHelper<> helper, columnar::MutableMetId metSoftTrk, columnar::Met1Id coreSoftTrk, bool doJetJVT) const
virtual StatusCode markInvisible (const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, xAOD::MissingETContainer *metCont) const override final
StatusCode markInvisible (columnar::ParticleRange collection, columnar::MetAssociationHelper<> helper, columnar::MutableMetRange metCont) const
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
virtual StatusCode evaluateNNMET (const std::string &, xAOD::MissingETContainer *) const
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

bool acceptTrack (const xAOD::TrackParticle *trk, const xAOD::Vertex *vx) const
const xAOD::VertexgetPV () const
 ColumnarMETMaker ()
 Default constructor:
void callEvents (columnar::EventContextRange events) const override
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< xAOD::VertexContainerm_PVkey
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
SG::ReadHandleKey< xAOD::JetContainerm_jetContainer {this, "JetContainer", "", "Name of input jet container (required if JVT decisions computed by internal tool)"}
columnar::MutableMetAccessor< columnar::ObjectColumnm_outputMetHandle {*this, "OutputMET"}
columnar::Met1Accessor< columnar::ObjectColumnm_inputMetHandle {*this, "METCore", {.addMTDependency=true}}
columnar::ColumnAccessor< columnar::MetAssociationDef, columnar::ObjectColumnm_metAssocHandle {*this, "MetAssoc", {.addMTDependency=true}}
columnar::ParticleAccessor< columnar::ObjectColumnm_particlesHandle {*this, "Particles"}
columnar::JetAccessor< columnar::ObjectColumnm_jetsHandle {*this, "Jets"}
columnar::ElectronAccessor< columnar::ObjectColumnm_electronsHandle {*this, "Electrons"}
columnar::PhotonAccessor< columnar::ObjectColumnm_photonsHandle {*this, "Photons"}
columnar::MuonAccessor< columnar::ObjectColumnm_muonsHandle {*this, "Muons"}
columnar::MutableMetAccessor< std::string > m_outputMetNameAcc {*this, "name"}
columnar::MetHelpers::MapLookupAccessor< columnar::MutableMetDefm_outputMetMapAcc {*this}
columnar::MetHelpers::MetMomentumAccessors< columnar::MutableMetDefm_outputMetMomAcc {*this}
columnar::Met1Accessor< std::string > m_inputMetNameAcc {*this, "name"}
columnar::MetHelpers::MapLookupAccessor< columnar::Met1Defm_inputMetMapAcc {*this}
columnar::MetHelpers::MetMomentumAccessors< columnar::Met1Defm_inputMetMomAcc {*this}
columnar::Met1Accessor< MissingETBase::Types::bitmask_tm_inputMetSourceAcc {*this, "source"}
columnar::MetAssocationAccessors m_assocAcc {*this}
columnar::MetHelpers::InputMomentumAccessors m_inputMomAcc {*this}
Gaudi::Property< std::string > m_inputPreselectionName {this, "inputPreselection", ""}
std::optional< columnar::ParticleAccessor< char > > m_inputPreselectionAcc
columnar::ParticleAccessor< columnar::RetypeColumn< xAOD::Muon::MuonType, std::uint16_t > > m_inputMuonTypeAcc {*this, "muonType", {.isOptional = true}}
columnar::MetHelpers::ObjectTypeAccessor< columnar::ParticleDefm_inputObjTypeAcc {*this, "objectType"}
columnar::MetHelpers::ObjectWeightDecorator m_outputMetWeightDecRegular {*this, "", true}
columnar::MetHelpers::InputMomentumAccessors< columnar::JetDefm_jetMomAcc {*this}
columnar::JetAccessor< floatm_acc_emf {*this, "EMFrac"}
columnar::JetAccessor< floatm_acc_psf {*this, "PSFrac"}
columnar::JetAccessor< floatm_acc_width {*this, "Width"}
columnar::JetAccessor< std::vector< int > > m_acc_trkN {*this, "NumTrkPt500"}
columnar::JetAccessor< std::vector< float > > m_acc_trksumpt {*this, "SumPtTrkPt500"}
columnar::JetAccessor< std::vector< float > > m_acc_sampleE {*this, "EnergyPerSampling"}
std::optional< columnar::MetHelpers::InputMomentumAccessors< columnar::JetDef > > m_jetConstitScaleMomAcc
std::optional< columnar::MetHelpers::InputMomentumAccessors< columnar::JetDef > > m_jetConstitScaleMomFixedAcc
std::optional< columnar::JetAccessor< char > > m_acc_jetRejectionDec
columnar::MetHelpers::ObjectWeightDecorator< columnar::MutableMetDef, columnar::JetDefm_jetOutputMetWeightDecRegular {*this, "", true}
columnar::MetHelpers::ObjectWeightDecorator< columnar::MutableMetDef, columnar::JetDefm_jetOutputMetWeightDecSoft {*this, "Soft", false}
columnar::ElectronAccessor< columnar::RetypeColumn< double, float > > m_electronPtAcc {*this, "pt"}
Gaudi::Property< unsignedm_columnarOperation {this, "columnarOperation", 0}
Gaudi::Property< std::string > m_columnarTermName {this, "columnarTermName", ""}
Gaudi::Property< unsignedm_columnarParticleType {this, "columnarParticleType", 0}
Gaudi::Property< std::string > m_columnarJetKey {this, "columnarJetKey", ""}
Gaudi::Property< std::string > m_columnarSoftClusKey {this, "columnarSoftClusKey", ""}
Gaudi::Property< boolm_columnarDoJetJVT {this, "columnarDoJetJVT", false}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 49 of file ColumnarMETMaker.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

◆ ColumnarMETMaker() [1/2]

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

Constructor with parameters:

Definition at line 79 of file ColumnarMETMaker.cxx.

79 :
81 m_PVkey("PrimaryVertices"),
82 m_trkseltool(""),
83 m_JvtTool("", this)
84 {
85 //
86 // Property declaration
87 //
88 declareProperty("JetJvtMomentName", m_jetJvtMomentName = "Jvt" );
89 declareProperty("JetRejectionDec", m_jetRejectionDec = "" );
90 declareProperty("JetMinEFrac", m_jetMinEfrac = 0.0 );
91 declareProperty("JetMinWeightedPt", m_jetMinWeightedPt = 20.0e3 );
92 declareProperty("JetConstitScaleMom", m_jetConstitScaleMom = "JetConstitScaleMomentum");
93 declareProperty("CorrectJetPhi", m_jetCorrectPhi = false );
94 declareProperty("DoPFlow", m_doPFlow = false );
95 declareProperty("DoSoftTruth", m_doSoftTruth = false );
96 declareProperty("DoJetTruth", m_doConstJet = false );
97
98 declareProperty("JetSelection", m_jetSelection = "Tight" );
99 declareProperty("JetEtaMax", m_JetEtaMax = 4.5 );
100 declareProperty("JetEtaForw", m_JetEtaForw = 2.5 );
101 declareProperty("CustomCentralJetPt", m_customCenJetPtCut = 20e3 );
102 declareProperty("CustomForwardJetPt", m_customFwdJetPtCut = 20e3 );
103 declareProperty("CustomJetJvtPtMax", m_customJvtPtMax = 60e3 );
104 declareProperty("CustomJetJvtWP", m_customJvtWP = "FixedEffPt" );
105
106 declareProperty("DoMuonEloss", m_muEloss = false );
107 declareProperty("ORCaloTaggedMuons", m_orCaloTaggedMuon = true );
108 declareProperty("GreedyPhotons", m_greedyPhotons = false );
109 declareProperty("VeryGreedyPhotons", m_veryGreedyPhotons = false );
110
111 declareProperty("UseGhostMuons", m_useGhostMuons = false );
112 declareProperty("DoRemoveMuonJets", m_doRemoveMuonJets = true );
113 declareProperty("DoSetMuonJetEMScale", m_doSetMuonJetEMScale = true );
114
115 declareProperty("DoRemoveElecTrks", m_doRemoveElecTrks = true );
116 declareProperty("DoRemoveElecTrksEM", m_doRemoveElecTrksEM = false );
117
118 declareProperty("skipSystematicJetSelection", m_skipSystematicJetSelection = false,
119 "EXPERIMENTAL: whether to use simplified OR based on nominal jets "
120 "and for jet-related systematics only. "
121 "WARNING: this property is strictly for doing physics studies of the feasibility "
122 "of this OR scheme, it should not be used in a regular analysis");
123
124 // muon overlap variables (expert use only)
125 declareProperty("JetTrkNMuOlap", m_jetTrkNMuOlap = 5 );
126 declareProperty("JetWidthMuOlap", m_jetWidthMuOlap = 0.1 );
127 declareProperty("JetPsEMuOlap", m_jetPsEMuOlap = 2.5e3 );
128 declareProperty("JetEmfMuOlap", m_jetEmfMuOlap = 0.9 );
129 declareProperty("JetTrkPtMuPt", m_jetTrkPtMuPt = 0.8 );
130 declareProperty("muIDPTJetPtRatioMuOlap", m_muIDPTJetPtRatioMuOlap = 2.0 );
131
132 declareProperty("MissingObjWarnThreshold", m_missObjWarningPtThreshold = 7.0e3 );
133
134 declareProperty("TrackSelectorTool", m_trkseltool );
135 declareProperty("JvtSelTool", m_JvtTool );
136 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkseltool
SG::ReadHandleKey< xAOD::VertexContainer > m_PVkey
ToolHandle< IAsgSelectionTool > m_JvtTool

◆ ~ColumnarMETMaker()

met::ColumnarMETMaker::~ColumnarMETMaker ( )
virtualdefault

Destructor:

◆ ColumnarMETMaker() [2/2]

met::ColumnarMETMaker::ColumnarMETMaker ( )
private

Default constructor:

Member Function Documentation

◆ acceptTrack()

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

Definition at line 1224 of file ColumnarMETMaker.cxx.

1225 {
1226 return static_cast<bool>(m_trkseltool->accept( *trk, vx ));
1227 }

◆ callEvents()

void met::ColumnarMETMaker::callEvents ( columnar::EventContextRange events) const
overrideprivate

Definition at line 1247 of file ColumnarMETMaker.cxx.

1248 {
1249 for (columnar::EventContextId event : events)
1250 {
1251 auto met = m_outputMetHandle (event);
1252 auto metcore = m_inputMetHandle (event);
1253 auto metassoc = m_metAssocHandle (event);
1254 if (m_columnarOperation.value() == 0u)
1255 {
1256 auto particles = m_particlesHandle (event);
1258 throw std::runtime_error ("Failed to rebuild MET");
1259 } else if (m_columnarOperation.value() == 1u)
1260 {
1261 auto jets = m_jetsHandle (event);
1262 if (rebuildJetMET (m_columnarJetKey.value(), m_columnarSoftClusKey.value(), met, jets, metcore, m_assocAcc(metassoc), m_columnarDoJetJVT.value()).isFailure())
1263 throw std::runtime_error ("Failed to rebuild jet MET");
1264 } else if (m_columnarOperation.value() == 2u)
1265 {
1266 auto jets = m_jetsHandle (event);
1267 if (rebuildTrackMET (m_columnarJetKey.value(), m_columnarSoftClusKey.value(), met, jets, metcore, m_assocAcc(metassoc), m_columnarDoJetJVT.value()).isFailure())
1268 throw std::runtime_error ("Failed to rebuild track MET");
1269 } else
1270 {
1271 throw std::runtime_error ("Unknown columnar operation");
1272 }
1273 }
1274 }
columnar::ColumnAccessor< columnar::MetAssociationDef, columnar::ObjectColumn > m_metAssocHandle
Gaudi::Property< std::string > m_columnarJetKey
columnar::MetAssocationAccessors m_assocAcc
columnar::Met1Accessor< columnar::ObjectColumn > m_inputMetHandle
columnar::JetAccessor< columnar::ObjectColumn > m_jetsHandle
columnar::MutableMetAccessor< columnar::ObjectColumn > m_outputMetHandle
virtual StatusCode rebuildTrackMET(const std::string &metJetKey, const std::string &softTrkKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETContainer *metCoreCont, xAOD::MissingETAssociationHelper &helper, bool doJetJVT) const override final
Gaudi::Property< bool > m_columnarDoJetJVT
Gaudi::Property< std::string > m_columnarTermName
virtual StatusCode rebuildJetMET(const std::string &metJetKey, const std::string &softClusKey, const std::string &softTrkKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETContainer *metCoreCont, xAOD::MissingETAssociationHelper &helper, bool doJetJVT) const override final
columnar::ParticleAccessor< columnar::ObjectColumn > m_particlesHandle
Gaudi::Property< unsigned > m_columnarOperation
Gaudi::Property< std::string > m_columnarSoftClusKey
Gaudi::Property< unsigned > m_columnarParticleType
virtual StatusCode rebuildMET(const std::string &metKey, xAOD::Type::ObjectType metType, xAOD::MissingETContainer *metCont, const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, MissingETBase::UsageHandler::Policy objScale) const override final
ObjectId< EventContextDef > EventContextId
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition ObjectType.h:32

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

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

◆ evaluateNNMET()

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

Reimplemented in met::METNet.

Definition at line 115 of file IMETMaker.h.

115 {
116 return StatusCode::FAILURE;
117 }

◆ evtStore()

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.

◆ 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::Event 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::Event, 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 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ 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::Event 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::Event, 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::ColumnarMETMaker::getPV ( ) const
private

Definition at line 1229 of file ColumnarMETMaker.cxx.

1229 {
1230
1231 SG::ReadHandle<xAOD::VertexContainer> h_PV(m_PVkey);
1232
1233 if(!h_PV.isValid()) {
1234 ATH_MSG_WARNING("Unable to retrieve primary vertex container PrimaryVertices");
1235 return nullptr;
1236 }
1237 ATH_MSG_DEBUG("Successfully retrieved primary vertex container");
1238 if(h_PV->empty()) ATH_MSG_WARNING("Event has no primary vertices!");
1239 for(const xAOD::Vertex* vx : *h_PV) {
1240 if(vx->vertexType()==xAOD::VxType::PriVtx) return vx;
1241 }
1242 return nullptr;
1243 }
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
@ PriVtx
Primary vertex.
Vertex_v1 Vertex
Define the latest version of the vertex class.

◆ initialize()

StatusCode met::ColumnarMETMaker::initialize ( void )
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 145 of file ColumnarMETMaker.cxx.

146 {
147 ATH_MSG_INFO ("Initializing " << name() << "...");
148
149 ATH_MSG_INFO("Use jet selection criterion: " << m_jetSelection << " PFlow: " << m_doPFlow);
150 if (m_jetSelection == "Loose") { m_CenJetPtCut = 20e3; m_FwdJetPtCut = 20e3; m_JvtWP = "FixedEffPt"; m_JvtPtMax = 60e3; }
151 else if (m_jetSelection == "Tight") { m_CenJetPtCut = 20e3; m_FwdJetPtCut = 30e3; m_JvtWP = "FixedEffPt"; m_JvtPtMax = 60e3; }
152 else if (m_jetSelection == "Tighter"){ m_CenJetPtCut = 20e3; m_FwdJetPtCut = 35e3; m_JvtWP = "FixedEffPt"; m_JvtPtMax = 60e3; }
153 else if (m_jetSelection == "Tenacious"){ m_CenJetPtCut = 20e3; m_FwdJetPtCut = 40e3; m_JvtWP = "FixedEffPt"; m_JvtPtMax = 60e3; }
154 else if (m_jetSelection == "Tier0") { m_CenJetPtCut = 0; m_FwdJetPtCut = 0; m_JvtWP = "None"; }
155 else if (m_jetSelection == "Expert") {
156 ATH_MSG_INFO("Custom jet selection configured. *** FOR EXPERT USE ONLY ***");
161 }
162 else if (m_jetSelection == "HRecoil") {
163 ATH_MSG_INFO("Jet selection for hadronic recoil calculation is configured.");
164 m_CenJetPtCut = 9999e3;
165 m_FwdJetPtCut = 9999e3;
166 m_JetEtaMax = 5;
167 m_JvtWP = "None";
168 }
169 else {
170 if (m_jetSelection == "Default") ATH_MSG_WARNING( "WARNING: Default is now deprecated" );
171 ATH_MSG_ERROR( "Error: No available jet selection found! Please update JetSelection in ColumnarMETMaker. Choose one: Loose, Tight (recommended), Tighter, Tenacious" );
172 return StatusCode::FAILURE;
173 }
174
175 if (!m_trkseltool.empty()) ATH_CHECK( m_trkseltool.retrieve() );
176
177 if (m_JvtWP != "None"){
178 if (m_JvtTool.empty()) {
179 asg::AsgToolConfig config_jvt ("CP::NNJvtSelectionTool/JvtSelTool");
180 ATH_CHECK(config_jvt.setProperty("JetContainer", m_jetContainer.key()));
181 ATH_CHECK(config_jvt.setProperty("WorkingPoint", m_JvtWP));
182 ATH_CHECK(config_jvt.setProperty("JvtMomentName", "NNJvt"));
183 ATH_CHECK(config_jvt.setProperty("MaxPtForJvt", m_JvtPtMax));
184 ATH_CHECK(config_jvt.makePrivateTool(m_JvtTool));
185 }
186 ATH_CHECK(m_JvtTool.retrieve());
187 }
188
189 // ReadHandleKey(s)
190 ATH_CHECK( m_PVkey.initialize() );
191
192 // configurable accessors
193 if (!m_jetRejectionDec.empty()) {
195 ATH_MSG_INFO("Applying additional jet rejection criterium in MET calculation: " << m_jetRejectionDec);
196 }
197
198 ATH_MSG_INFO("Suppressing warnings of objects missing in METAssociationMap for objects with pT < " << m_missObjWarningPtThreshold/1e3 << " GeV.");
199
200 // overlap removal simplification?
202 ATH_MSG_INFO("Requesting simplified overlap removal procedure in MET calculation");
203 }
204
205 if (!m_inputPreselectionName.empty()) {
207 }
208 if (!m_jetConstitScaleMom.empty()) {
210 m_jetConstitScaleMomFixedAcc.emplace(*this, "JetConstitScaleMomentum");
211 }
212 return StatusCode::SUCCESS;
213 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
Gaudi::Property< std::string > m_inputPreselectionName
std::optional< columnar::ParticleAccessor< char > > m_inputPreselectionAcc
std::optional< columnar::MetHelpers::InputMomentumAccessors< columnar::JetDef > > m_jetConstitScaleMomAcc
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainer
std::optional< columnar::MetHelpers::InputMomentumAccessors< columnar::JetDef > > m_jetConstitScaleMomFixedAcc
std::optional< columnar::JetAccessor< char > > m_acc_jetRejectionDec

◆ 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() [1/2]

StatusCode met::ColumnarMETMaker::markInvisible ( columnar::ParticleRange collection,
columnar::MetAssociationHelper<> helper,
columnar::MutableMetRange metCont ) const

Definition at line 1216 of file ColumnarMETMaker.cxx.

1219 {
1220 columnar::MutableMetId met = m_outputMetMapAcc.fillMET (metCont, "Invisibles", invisSource);
1221 return rebuildMET(met,collection,helper,MissingETBase::UsageHandler::PhysicsObject);
1222 }
columnar::MetHelpers::MapLookupAccessor< columnar::MutableMetDef > m_outputMetMapAcc
ObjectId< MutableMetDef > MutableMetId
Definition MetDef.h:65
static const MissingETBase::Types::bitmask_t invisSource
Definition METHelpers.h:38

◆ markInvisible() [2/2]

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

Implements IMETMaker.

Definition at line 1200 of file ColumnarMETMaker.cxx.

1203 {
1204 if (!collection) {
1205 ATH_MSG_ERROR("No object container provided for marking invisible");
1206 return StatusCode::FAILURE;
1207 }
1208 if (!metCont) {
1209 ATH_MSG_ERROR("No MET container provided for marking invisible");
1210 return StatusCode::FAILURE;
1211 }
1212
1213 return markInvisible(columnar::ParticleRange(*collection),m_assocAcc(helper),columnar::MutableMetRange(*metCont));
1214 }
virtual StatusCode markInvisible(const xAOD::IParticleContainer *collection, xAOD::MissingETAssociationHelper &helper, xAOD::MissingETContainer *metCont) const override final
ObjectRange< MutableMetDef > MutableMetRange
Definition MetDef.h:64
ObjectRange< ParticleDef > ParticleRange
Definition ParticleDef.h:32

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

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

◆ rebuildJetMET() [1/6]

StatusCode met::ColumnarMETMaker::rebuildJetMET ( columnar::MutableMetId metJet,
columnar::MutableMetRange metCont,
columnar::JetRange jets,
columnar::MetAssociationHelper<> helper,
columnar::OptMutableMetId metSoftClus,
columnar::OptMet1Id coreSoftClus,
columnar::OptMutableMetId metSoftTrk,
columnar::OptMet1Id coreSoftTrk,
bool doJetJVT,
bool tracksForHardJets = false,
std::vector< const xAOD::IParticle * > * softConst = 0 ) const

Definition at line 627 of file ColumnarMETMaker.cxx.

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

◆ rebuildJetMET() [2/6]

StatusCode met::ColumnarMETMaker::rebuildJetMET ( const std::string & metJetKey,
const std::string & metSoftKey,
columnar::MutableMetRange metCont,
columnar::JetRange jets,
columnar::Met1Range metCoreCont,
columnar::MetAssociationHelper<> helper,
bool doJetJVT ) const

Definition at line 463 of file ColumnarMETMaker.cxx.

470 {
471 ATH_MSG_VERBOSE("Rebuild jet term: " << metJetKey << " and soft term: " << softKey);
472
473 columnar::MutableMetId metJet {m_outputMetMapAcc.fillMET (metCont, metJetKey, MissingETBase::Source::jet())};
474
475 columnar::OptMet1Id coreSoftClus, coreSoftTrk;
476 columnar::OptMutableMetId metSoftClus, metSoftTrk;
477
478 columnar::OptMet1Id coreSoft = m_inputMetMapAcc(metCoreCont,softKey+"Core");
479 if(!coreSoft) {
480 ATH_MSG_WARNING("Invalid soft term key supplied: " << softKey);
481 return StatusCode::FAILURE;
482 }
484 coreSoftTrk = coreSoft;
485
486 metSoftTrk = m_outputMetMapAcc.fillMET (metCont, softKey, coreSoftTrk.value()(m_inputMetSourceAcc));
487 } else {
488 coreSoftClus = coreSoft;
489
490 metSoftClus = m_outputMetMapAcc.fillMET (metCont, softKey, coreSoftClus.value()(m_inputMetSourceAcc));
491 }
492
493 return rebuildJetMET(metJet, metCont, jets, helper,
494 metSoftClus, coreSoftClus,
495 metSoftTrk, coreSoftTrk,
496 doJetJVT);
497 }
columnar::MetHelpers::MapLookupAccessor< columnar::Met1Def > m_inputMetMapAcc
OptObjectId< Met1Def > OptMet1Id
Definition MetDef.h:60
static Types::bitmask_t jet(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed jets.
static bool isTrackTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)

◆ rebuildJetMET() [3/6]

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

Implements IMETMaker.

Definition at line 441 of file ColumnarMETMaker.cxx.

448 {
449 if (!metCont || !metCoreCont)
450 {
451 ATH_MSG_ERROR("No MET container provided");
452 return StatusCode::FAILURE;
453 }
454 if (!jets)
455 {
456 ATH_MSG_ERROR("No input collection provided for MET term \"" << metJetKey << "\" and soft term: " << softKey);
457 return StatusCode::FAILURE;
458 }
459
460 return rebuildJetMET(metJetKey,softKey,columnar::MutableMetRange(*metCont),columnar::JetRange(*jets),columnar::Met1Range(*metCoreCont),m_assocAcc(helper),doJetJVT);
461 }
ObjectRange< Met1Def > Met1Range
Definition MetDef.h:58
ObjectRange< JetDef > JetRange
Definition JetDef.h:22

◆ rebuildJetMET() [4/6]

StatusCode met::ColumnarMETMaker::rebuildJetMET ( const std::string & metJetKey,
const std::string & softClusKey,
const std::string & softTrkKey,
columnar::MutableMetRange metCont,
columnar::JetRange jets,
columnar::Met1Range metCoreCont,
columnar::MetAssociationHelper<> helper,
bool doJetJVT ) const

Definition at line 570 of file ColumnarMETMaker.cxx.

578 {
579
580 ATH_MSG_VERBOSE("Create Jet MET " << metJetKey);
581 columnar::MutableMetId metJet {m_outputMetMapAcc.fillMET (metCont, metJetKey, MissingETBase::Source::jet())};
582 ATH_MSG_VERBOSE("Create SoftClus MET " << softClusKey);
583 auto coreSoftClus = m_inputMetMapAcc(metCoreCont,softClusKey+"Core");
584 ATH_MSG_VERBOSE("Create SoftTrk MET " << softTrkKey);
585 auto coreSoftTrk = m_inputMetMapAcc(metCoreCont,softTrkKey+"Core");
586 if(!coreSoftClus) {
587 ATH_MSG_WARNING("Invalid cluster soft term key supplied: " << softClusKey);
588 return StatusCode::FAILURE;
589 }
590 if(!coreSoftTrk) {
591 ATH_MSG_WARNING("Invalid track soft term key supplied: " << softTrkKey);
592 return StatusCode::FAILURE;
593 }
594 columnar::MutableMetId metSoftClus {m_outputMetMapAcc.fillMET (metCont, softClusKey, m_inputMetSourceAcc(coreSoftClus.value()))};
595
596 columnar::MutableMetId metSoftTrk {m_outputMetMapAcc.fillMET (metCont, softTrkKey, m_inputMetSourceAcc(coreSoftTrk.value()))};
597
598 return rebuildJetMET(metJet, metCont, jets, helper,
599 metSoftClus, coreSoftClus,
600 metSoftTrk, coreSoftTrk,
601 doJetJVT);
602 }

◆ rebuildJetMET() [5/6]

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

Implements IMETMaker.

Definition at line 547 of file ColumnarMETMaker.cxx.

555 {
556 if (!metCont)
557 {
558 ATH_MSG_ERROR("No MET container provided");
559 return StatusCode::FAILURE;
560 }
561 if (!jets)
562 {
563 ATH_MSG_ERROR("No input collection provided for MET term \"" << metJetKey << "\" and soft term: " << softClusKey << " and " << softTrkKey);
564 return StatusCode::FAILURE;
565 }
566
567 return rebuildJetMET(metJetKey,softClusKey,softTrkKey,columnar::MutableMetRange(*metCont),columnar::JetRange(*jets),columnar::Met1Range(*metCoreCont),m_assocAcc(helper),doJetJVT);
568 }

◆ rebuildJetMET() [6/6]

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

Implements IMETMaker.

Definition at line 604 of file ColumnarMETMaker.cxx.

613 {
614 if(!metJet || !jets) {
615 ATH_MSG_ERROR("Invalid pointer supplied for "
616 << "MET (" << metJet << ") or "
617 << "jet collection (" << jets << ").");
618 return StatusCode::FAILURE;
619 }
620 columnar::MutableMetRange metCont (*static_cast<MissingETContainer*>(metJet->container()));
621 return rebuildJetMET(columnar::MutableMetId(*metJet), metCont, columnar::JetRange(*jets), m_assocAcc(helper),
622 columnar::OptMutableMetId(metSoftClus), columnar::OptMet1Id (coreSoftClus),
623 columnar::OptMutableMetId(metSoftTrk), columnar::OptMet1Id (coreSoftTrk),
624 doJetJVT, tracksForHardJets, softConst);
625 }

◆ rebuildMET() [1/6]

StatusCode met::ColumnarMETMaker::rebuildMET ( columnar::MutableMetId met,
columnar::ParticleRange collection,
columnar::MetAssociationHelper<> helper,
MissingETBase::UsageHandler::Policy objScale ) const

Definition at line 300 of file ColumnarMETMaker.cxx.

304 {
306 bool removeOverlap = true;
307 if (m_inputObjTypeAcc(collection) == xAOD::Type::Muon) {
309 removeOverlap = false;
310 }
313 return rebuildMET(met,collection,helper,p,removeOverlap,objScale);
314 }
columnar::MetHelpers::ObjectTypeAccessor< columnar::ParticleDef > m_inputObjTypeAcc
@ OnlyCluster
CaloCluster based only.
@ ParticleFlow
Particle Flow Object based.

◆ rebuildMET() [2/6]

StatusCode met::ColumnarMETMaker::rebuildMET ( columnar::MutableMetId met,
columnar::ParticleRange collection,
columnar::MetAssociationHelper<> helper,
MissingETBase::UsageHandler::Policy p,
bool removeOverlap,
MissingETBase::UsageHandler::Policy objScale ) const

Definition at line 332 of file ColumnarMETMaker.cxx.

337 {
338 if(helper.map().empty()) {
339 ATH_MSG_WARNING("Incomplete association map received. Cannot rebuild MET.");
340 ATH_MSG_WARNING("Note: ColumnarMETMaker should only be run on events containing at least one PV");
341 return StatusCode::SUCCESS;
342 }
343 ATH_MSG_VERBOSE("Building MET term " << met(m_outputMetNameAcc));
344 columnar::MetHelpers::ObjectWeightHandle<> metWeights(*this,m_outputMetWeightDecRegular,met,collection);
345
346 if(collection.empty()) return StatusCode::SUCCESS;
347 columnar::MetHelpers::OriginalObjectHandle collectionOriginals(*this,collection);
348
349 if(collectionOriginals.isShallowCopy() && collectionOriginals.originalInputs()) {
350 ATH_MSG_WARNING("Shallow copy provided without \"originalObjectLinks\" decoration! "
351 << "Overlap removal cannot be done. "
352 << "Will not compute this term.");
353 ATH_MSG_WARNING("Please apply xAOD::setOriginalObjectLink() from xAODBase/IParticleHelpers.h");
354 return StatusCode::SUCCESS;
355 }
356 ATH_MSG_VERBOSE("Original inputs? " << collectionOriginals.originalInputs());
357 for(const auto obj : collection) {
358 if (m_inputPreselectionAcc&&!(*m_inputPreselectionAcc)(obj)) continue;
359 bool selected = false;
360 auto orig = collectionOriginals.getOriginal(obj);
361 auto assocs = helper.getAssociations(orig);
362 if(assocs.empty()) {
363 std::string message = "Object is not in association map. Did you make a deep copy but fail to set the \"originalObjectLinks\" decoration? "
364 "If not, Please apply xAOD::setOriginalObjectLink() from xAODBase/IParticleHelpers.h";
365 // Avoid warnings for leptons with pT below threshold for association map
367 ATH_MSG_WARNING(message);
368 } else {
369 ATH_MSG_DEBUG(message);
370 }
371 // if this is an uncalibrated electron below the threshold, then we put it into the soft term
373 metWeights.emplace_back( obj, 0 );
374 message = "Missing an electron from the MET map. Included as a track in the soft term. pT: " + std::to_string(m_inputMomAcc.pt(obj)/1e3) + " GeV";
376 ATH_MSG_WARNING(message);
377 } else {
378 ATH_MSG_DEBUG(message);
379 }
380 continue;
381 } else {
382 ATH_MSG_ERROR("Missing an object: " << m_inputObjTypeAcc(orig) << " pT: " << m_inputMomAcc.pt(obj)/1e3 << " GeV, may be duplicated in the soft term.");
383 }
384 }
385
386 // If the object has already been selected and processed, ignore it.
387 if(helper.objSelected(orig)) continue;
388 selected = helper.selectIfNoOverlaps(orig,p) || !removeOverlap;
389 ATH_MSG_VERBOSE(m_inputObjTypeAcc(obj) << " (" << orig <<") with pt " << m_inputMomAcc.pt(obj)
390 << " is " << ( selected ? "non-" : "") << "overlapping");
391
392 // Greedy photon options: set selection flags
394 for(auto assoc : assocs){
395 auto indices = m_assocAcc.overlapIndices(assoc,orig);
396 auto allObjects = m_assocAcc.objects(assoc);
397 for (size_t index : indices){
398 const xAOD::IParticle* thisObj = allObjects[index].getXAODObject();
399 if(!thisObj) continue;
400 if ((thisObj->type() == xAOD::Type::Jet && m_veryGreedyPhotons) ||
401 thisObj->type() == xAOD::Type::Electron)
402 helper.setObjSelectionFlag(assoc, thisObj, true);
403 }
404 }
405 }
406
407 //Do special overlap removal for calo tagged muons
408 if(m_orCaloTaggedMuon && !removeOverlap && m_inputObjTypeAcc(orig)==xAOD::Type::Muon &&
409 m_inputMuonTypeAcc.getOptional(orig)==xAOD::Muon::MuonType::CaloTagged) {
410 for (decltype(auto) assoc : assocs) {
411 auto ind = m_assocAcc.overlapIndices(assoc,orig);
412 auto allObjects = m_assocAcc.objects(assoc);
413 for (size_t indi = 0; indi < ind.size(); indi++) if (allObjects[ind[indi]]) {
414 if (allObjects[ind[indi]].isContainer<columnar::ElectronDef>()
415 && helper.objSelected(assoc, ind[indi])) {
416 selected = false;
417 break;
418 }
419 }
420 }
421 }
422 // Don't overlap remove muons, but flag the non-overlapping muons to take out their tracks from jets
423 // Removed eloss from here -- clusters already flagged.
424 // To be handled in rebuildJetMET
425 if(selected) {
427 ATH_MSG_VERBOSE("Add object with pt " << m_inputMomAcc.pt(obj));
428 m_outputMetMomAcc.addParticle (met, m_inputMomAcc, obj);
429 } else {
430 MissingETBase::Types::constvec_t constvec = helper.getConstVec(obj,objScale);
431 ATH_MSG_VERBOSE("Add truth object with pt " << constvec.cpt());
432 m_outputMetMomAcc.addParticle (met, constvec.cpx(),constvec.cpy(),constvec.cpt());
433 }
434 metWeights.emplace_back( obj, 1. );
435 }
436 }
437 ATH_MSG_DEBUG("Built met term " << met(m_outputMetNameAcc) << ", with magnitude " << m_outputMetMomAcc.met(met));
438 return StatusCode::SUCCESS;
439 }
columnar::ParticleAccessor< columnar::RetypeColumn< xAOD::Muon::MuonType, std::uint16_t > > m_inputMuonTypeAcc
columnar::MetHelpers::InputMomentumAccessors m_inputMomAcc
columnar::MetHelpers::ObjectWeightDecorator m_outputMetWeightDecRegular
virtual Type::ObjectType type() const =0
The type of the object as a simple enumeration.
str index
Definition DeMoScan.py:362
std::pair< long int, long int > indices
@ Jet
The object is a jet.
Definition ObjectType.h:40
@ Electron
The object is an electron.
Definition ObjectType.h:46

◆ rebuildMET() [3/6]

StatusCode met::ColumnarMETMaker::rebuildMET ( const std::string & metKey,
xAOD::Type::ObjectType metType,
columnar::MutableMetRange metCont,
columnar::ParticleRange collection,
columnar::MetAssociationHelper<> helper,
MissingETBase::UsageHandler::Policy objScale ) const

Definition at line 239 of file ColumnarMETMaker.cxx.

245 {
247 switch(metType) {
250 break;
252 metSource = MissingETBase::Source::photon();
253 break;
254 case xAOD::Type::Tau:
255 metSource = MissingETBase::Source::tau();
256 break;
257 case xAOD::Type::Muon:
258 metSource = MissingETBase::Source::muon();
259 break;
260 case xAOD::Type::Jet:
261 ATH_MSG_WARNING("Incorrect use of rebuildMET -- use rebuildJetMET for RefJet term");
262 return StatusCode::FAILURE;
263 default:
264 ATH_MSG_WARNING("Invalid object type provided: " << metType);
265 return StatusCode::FAILURE;
266 }
267
268 columnar::MutableMetId met = m_outputMetMapAcc.fillMET (metCont, metKey, metSource);
269
270 // If muon eloss corrections are required, create a new term to hold these if it doesn't already exist
272 if (m_outputMetMapAcc.tryCreateIfMissing (metCont, "MuonEloss", MissingETBase::Source::Type::Muon | MissingETBase::Source::Category::Calo) != StatusCode::SUCCESS) {
273 ATH_MSG_ERROR("failed to create Muon Eloss MET term");
274 return StatusCode::FAILURE;
275 }
276 }
277
278 return rebuildMET(met,collection,helper,objScale);
279 }
@ Tau
The object is a tau (jet).
Definition ObjectType.h:49
static Types::bitmask_t muon(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed muons.
@ Calo
Indicator for MET terms reconstructed from calorimeter signals alone.
static Types::bitmask_t tau(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed tau leptons.
static Types::bitmask_t electron(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed electrons.
static Types::bitmask_t photon(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed photons.

◆ rebuildMET() [4/6]

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

Implements IMETMaker.

Definition at line 218 of file ColumnarMETMaker.cxx.

224 {
225 if (!metCont)
226 {
227 ATH_MSG_ERROR("No MET container provided");
228 return StatusCode::FAILURE;
229 }
230 if (!collection)
231 {
232 ATH_MSG_ERROR("No input collection provided for MET term \"" << metKey << "\"");
233 return StatusCode::FAILURE;
234 }
235
236 return rebuildMET(metKey,metType,columnar::MutableMetRange (*metCont),columnar::ParticleRange (*collection),m_assocAcc(helper),objScale);
237 }

◆ rebuildMET() [5/6]

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

Implements IMETMaker.

Definition at line 281 of file ColumnarMETMaker.cxx.

285 {
286 if (!met)
287 {
288 ATH_MSG_ERROR("No MET object provided");
289 return StatusCode::FAILURE;
290 }
291 if (!collection)
292 {
293 ATH_MSG_ERROR("No input collection provided for MET term \"" << met->name() << "\"");
294 return StatusCode::FAILURE;
295 }
296
297 return rebuildMET(columnar::MutableMetId(*met), columnar::ParticleRange(*collection), m_assocAcc(helper), objScale);
298 }
const std::string & name() const
Identifier getters.

◆ rebuildMET() [6/6]

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

Implements IMETMaker.

Definition at line 316 of file ColumnarMETMaker.cxx.

321 {
322 if(!met || !collection) {
323 ATH_MSG_ERROR("Invalid pointer supplied for "
324 << "MET (" << met << ") or "
325 << "collection (" << collection << ").");
326 return StatusCode::FAILURE;
327 }
328
329 return rebuildMET(columnar::MutableMetId(*met),columnar::ParticleRange (*collection),m_assocAcc(helper),p,removeOverlap,objScale);
330 }

◆ rebuildTrackMET() [1/4]

StatusCode met::ColumnarMETMaker::rebuildTrackMET ( columnar::MutableMetId metJet,
columnar::MutableMetRange metCont,
columnar::JetRange jets,
columnar::MetAssociationHelper<> helper,
columnar::MutableMetId metSoftTrk,
columnar::Met1Id coreSoftTrk,
bool doJetJVT ) const

Definition at line 1189 of file ColumnarMETMaker.cxx.

1195 {
1196 return rebuildJetMET(metJet,metCont,jets,helper,std::nullopt,nullptr,metSoftTrk,coreSoftTrk,doJetJVT,true);
1197 }

◆ rebuildTrackMET() [2/4]

StatusCode met::ColumnarMETMaker::rebuildTrackMET ( const std::string & metJetKey,
const std::string & softTrkKey,
columnar::MutableMetRange metCont,
columnar::JetRange jets,
columnar::Met1Range metCoreCont,
columnar::MetAssociationHelper<> helper,
bool doJetJVT ) const

Definition at line 521 of file ColumnarMETMaker.cxx.

528 {
529 ATH_MSG_VERBOSE("Rebuild jet term: " << metJetKey << " and soft term: " << softKey);
530
532
533 columnar::OptMet1Id coreSoft = m_inputMetMapAcc(metCoreCont,softKey+"Core");
534 if(!coreSoft) {
535 ATH_MSG_WARNING("Invalid soft term key supplied: " << softKey);
536 return StatusCode::FAILURE;
537 }
538 auto coreSoftTrk = coreSoft.value();
539
540 columnar::MutableMetId metSoftTrk {m_outputMetMapAcc.fillMET (metCont, softKey, coreSoftTrk(m_inputMetSourceAcc))};
541
542 return rebuildTrackMET(metJet, metCont, jets, helper,
543 metSoftTrk, coreSoftTrk,
544 doJetJVT);
545 }
static Types::bitmask_t track(Region reg=Region::FullAcceptance)
Bit mask for MET term from Track signal objects.

◆ rebuildTrackMET() [3/4]

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

Implements IMETMaker.

Definition at line 499 of file ColumnarMETMaker.cxx.

506 {
507 if (!metCont)
508 {
509 ATH_MSG_ERROR("No MET container provided");
510 return StatusCode::FAILURE;
511 }
512 if (!jets)
513 {
514 ATH_MSG_ERROR("No input collection provided for MET term \"" << metJetKey << "\" and soft term: " << softKey);
515 return StatusCode::FAILURE;
516 }
517
518 return rebuildTrackMET(metJetKey,softKey,columnar::MutableMetRange(*metCont),columnar::JetRange(*jets),columnar::Met1Range(*metCoreCont),m_assocAcc(helper),doJetJVT);
519 }

◆ rebuildTrackMET() [4/4]

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

Implements IMETMaker.

Definition at line 1166 of file ColumnarMETMaker.cxx.

1171 {
1172 if (!metJet) {
1173 ATH_MSG_ERROR("No MET object provided for track MET rebuilding");
1174 return StatusCode::FAILURE;
1175 }
1176 if (!metSoftTrk) {
1177 ATH_MSG_ERROR("No MET object provided for soft track MET rebuilding");
1178 return StatusCode::FAILURE;
1179 }
1180 if (!jets) {
1181 ATH_MSG_ERROR("No jet container provided for track MET rebuilding");
1182 return StatusCode::FAILURE;
1183 }
1184
1185 columnar::MutableMetRange metCont (*static_cast<MissingETContainer*>(metJet->container()));
1186 return rebuildJetMET(columnar::MutableMetId(*metJet),metCont,columnar::JetRange(*jets),m_assocAcc(helper),std::nullopt,nullptr,columnar::MutableMetId(*metSoftTrk),coreSoftTrk,doJetJVT,true);
1187 }

◆ 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();
384 }
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)

◆ 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 {
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 asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ 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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_acc_emf

columnar::JetAccessor<float> met::ColumnarMETMaker::m_acc_emf {*this, "EMFrac"}
private

Definition at line 309 of file ColumnarMETMaker.h.

309{*this, "EMFrac"};

◆ m_acc_jetRejectionDec

std::optional<columnar::JetAccessor<char> > met::ColumnarMETMaker::m_acc_jetRejectionDec
private

Definition at line 318 of file ColumnarMETMaker.h.

◆ m_acc_psf

columnar::JetAccessor<float> met::ColumnarMETMaker::m_acc_psf {*this, "PSFrac"}
private

Definition at line 310 of file ColumnarMETMaker.h.

310{*this, "PSFrac"};

◆ m_acc_sampleE

columnar::JetAccessor<std::vector<float> > met::ColumnarMETMaker::m_acc_sampleE {*this, "EnergyPerSampling"}
private

Definition at line 314 of file ColumnarMETMaker.h.

314{*this, "EnergyPerSampling"};

◆ m_acc_trkN

columnar::JetAccessor<std::vector<int> > met::ColumnarMETMaker::m_acc_trkN {*this, "NumTrkPt500"}
private

Definition at line 312 of file ColumnarMETMaker.h.

312{*this, "NumTrkPt500"};

◆ m_acc_trksumpt

columnar::JetAccessor<std::vector<float> > met::ColumnarMETMaker::m_acc_trksumpt {*this, "SumPtTrkPt500"}
private

Definition at line 313 of file ColumnarMETMaker.h.

313{*this, "SumPtTrkPt500"};

◆ m_acc_width

columnar::JetAccessor<float> met::ColumnarMETMaker::m_acc_width {*this, "Width"}
private

Definition at line 311 of file ColumnarMETMaker.h.

311{*this, "Width"};

◆ m_assocAcc

columnar::MetAssocationAccessors met::ColumnarMETMaker::m_assocAcc {*this}
private

Definition at line 298 of file ColumnarMETMaker.h.

298{*this};

◆ m_CenJetPtCut

double met::ColumnarMETMaker::m_CenJetPtCut {}
private

Definition at line 235 of file ColumnarMETMaker.h.

235{}, m_FwdJetPtCut{} ; // jet pt cut for central/forward jets

◆ m_columnarDoJetJVT

Gaudi::Property<bool> met::ColumnarMETMaker::m_columnarDoJetJVT {this, "columnarDoJetJVT", false}
private

Definition at line 330 of file ColumnarMETMaker.h.

330{this, "columnarDoJetJVT", false};

◆ m_columnarJetKey

Gaudi::Property<std::string> met::ColumnarMETMaker::m_columnarJetKey {this, "columnarJetKey", ""}
private

Definition at line 328 of file ColumnarMETMaker.h.

328{this, "columnarJetKey", ""};

◆ m_columnarOperation

Gaudi::Property<unsigned> met::ColumnarMETMaker::m_columnarOperation {this, "columnarOperation", 0}
private

Definition at line 325 of file ColumnarMETMaker.h.

325{this, "columnarOperation", 0};

◆ m_columnarParticleType

Gaudi::Property<unsigned> met::ColumnarMETMaker::m_columnarParticleType {this, "columnarParticleType", 0}
private

Definition at line 327 of file ColumnarMETMaker.h.

327{this, "columnarParticleType", 0};

◆ m_columnarSoftClusKey

Gaudi::Property<std::string> met::ColumnarMETMaker::m_columnarSoftClusKey {this, "columnarSoftClusKey", ""}
private

Definition at line 329 of file ColumnarMETMaker.h.

329{this, "columnarSoftClusKey", ""};

◆ m_columnarTermName

Gaudi::Property<std::string> met::ColumnarMETMaker::m_columnarTermName {this, "columnarTermName", ""}
private

Definition at line 326 of file ColumnarMETMaker.h.

326{this, "columnarTermName", ""};

◆ m_customCenJetPtCut

double met::ColumnarMETMaker::m_customCenJetPtCut {}
private

Definition at line 244 of file ColumnarMETMaker.h.

◆ m_customFwdJetPtCut

double met::ColumnarMETMaker::m_customFwdJetPtCut {}
private

Definition at line 244 of file ColumnarMETMaker.h.

◆ m_customJvtPtMax

double met::ColumnarMETMaker::m_customJvtPtMax {}
private

Definition at line 245 of file ColumnarMETMaker.h.

245{};

◆ m_customJvtWP

std::string met::ColumnarMETMaker::m_customJvtWP
private

Definition at line 246 of file ColumnarMETMaker.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::ColumnarMETMaker::m_doConstJet {}
private

Definition at line 250 of file ColumnarMETMaker.h.

250{};

◆ m_doPFlow

bool met::ColumnarMETMaker::m_doPFlow {}
private

Definition at line 248 of file ColumnarMETMaker.h.

248{};

◆ m_doRemoveElecTrks

bool met::ColumnarMETMaker::m_doRemoveElecTrks {}
private

Definition at line 254 of file ColumnarMETMaker.h.

254{};

◆ m_doRemoveElecTrksEM

bool met::ColumnarMETMaker::m_doRemoveElecTrksEM {}
private

Definition at line 255 of file ColumnarMETMaker.h.

255{};

◆ m_doRemoveMuonJets

bool met::ColumnarMETMaker::m_doRemoveMuonJets {}
private

Definition at line 253 of file ColumnarMETMaker.h.

253{};

◆ m_doSetMuonJetEMScale

bool met::ColumnarMETMaker::m_doSetMuonJetEMScale {}
private

Definition at line 256 of file ColumnarMETMaker.h.

256{};

◆ m_doSoftTruth

bool met::ColumnarMETMaker::m_doSoftTruth {}
private

Definition at line 249 of file ColumnarMETMaker.h.

249{};

◆ m_electronPtAcc

columnar::ElectronAccessor<columnar::RetypeColumn<double,float> > met::ColumnarMETMaker::m_electronPtAcc {*this, "pt"}
private

Definition at line 323 of file ColumnarMETMaker.h.

323{*this, "pt"};

◆ m_electronsHandle

columnar::ElectronAccessor<columnar::ObjectColumn> met::ColumnarMETMaker::m_electronsHandle {*this, "Electrons"}
private

Definition at line 285 of file ColumnarMETMaker.h.

285{*this, "Electrons"};

◆ 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::ColumnarMETMaker::m_FwdJetPtCut {}
private

Definition at line 235 of file ColumnarMETMaker.h.

235{}, m_FwdJetPtCut{} ; // jet pt cut for central/forward jets

◆ m_greedyPhotons

bool met::ColumnarMETMaker::m_greedyPhotons {}
private

Definition at line 261 of file ColumnarMETMaker.h.

261{};

◆ m_inputMetHandle

columnar::Met1Accessor<columnar::ObjectColumn> met::ColumnarMETMaker::m_inputMetHandle {*this, "METCore", {.addMTDependency=true}}
private

Definition at line 281 of file ColumnarMETMaker.h.

281{*this, "METCore", {.addMTDependency=true}};

◆ m_inputMetMapAcc

columnar::MetHelpers::MapLookupAccessor<columnar::Met1Def> met::ColumnarMETMaker::m_inputMetMapAcc {*this}
private

Definition at line 294 of file ColumnarMETMaker.h.

294{*this};

◆ m_inputMetMomAcc

columnar::MetHelpers::MetMomentumAccessors<columnar::Met1Def> met::ColumnarMETMaker::m_inputMetMomAcc {*this}
private

Definition at line 295 of file ColumnarMETMaker.h.

295{*this};

◆ m_inputMetNameAcc

columnar::Met1Accessor<std::string> met::ColumnarMETMaker::m_inputMetNameAcc {*this, "name"}
private

Definition at line 293 of file ColumnarMETMaker.h.

293{*this, "name"};

◆ m_inputMetSourceAcc

columnar::Met1Accessor<MissingETBase::Types::bitmask_t> met::ColumnarMETMaker::m_inputMetSourceAcc {*this, "source"}
private

Definition at line 296 of file ColumnarMETMaker.h.

296{*this, "source"};

◆ m_inputMomAcc

columnar::MetHelpers::InputMomentumAccessors met::ColumnarMETMaker::m_inputMomAcc {*this}
private

Definition at line 300 of file ColumnarMETMaker.h.

300{*this};

◆ m_inputMuonTypeAcc

columnar::ParticleAccessor<columnar::RetypeColumn<xAOD::Muon::MuonType,std::uint16_t> > met::ColumnarMETMaker::m_inputMuonTypeAcc {*this, "muonType", {.isOptional = true}}
private

Definition at line 303 of file ColumnarMETMaker.h.

303{*this, "muonType", {.isOptional = true}};

◆ m_inputObjTypeAcc

columnar::MetHelpers::ObjectTypeAccessor<columnar::ParticleDef> met::ColumnarMETMaker::m_inputObjTypeAcc {*this, "objectType"}
private

Definition at line 304 of file ColumnarMETMaker.h.

304{*this, "objectType"};

◆ m_inputPreselectionAcc

std::optional<columnar::ParticleAccessor<char> > met::ColumnarMETMaker::m_inputPreselectionAcc
private

Definition at line 302 of file ColumnarMETMaker.h.

◆ m_inputPreselectionName

Gaudi::Property<std::string> met::ColumnarMETMaker::m_inputPreselectionName {this, "inputPreselection", ""}
private

Definition at line 301 of file ColumnarMETMaker.h.

301{this, "inputPreselection", ""};

◆ m_jetConstitScaleMom

std::string met::ColumnarMETMaker::m_jetConstitScaleMom
private

Definition at line 231 of file ColumnarMETMaker.h.

◆ m_jetConstitScaleMomAcc

std::optional<columnar::MetHelpers::InputMomentumAccessors<columnar::JetDef> > met::ColumnarMETMaker::m_jetConstitScaleMomAcc
private

Definition at line 316 of file ColumnarMETMaker.h.

◆ m_jetConstitScaleMomFixedAcc

std::optional<columnar::MetHelpers::InputMomentumAccessors<columnar::JetDef> > met::ColumnarMETMaker::m_jetConstitScaleMomFixedAcc
private

Definition at line 317 of file ColumnarMETMaker.h.

◆ m_jetContainer

SG::ReadHandleKey<xAOD::JetContainer> met::ColumnarMETMaker::m_jetContainer {this, "JetContainer", "", "Name of input jet container (required if JVT decisions computed by internal tool)"}
private

Definition at line 275 of file ColumnarMETMaker.h.

275{this, "JetContainer", "", "Name of input jet container (required if JVT decisions computed by internal tool)"};

◆ m_jetCorrectPhi

bool met::ColumnarMETMaker::m_jetCorrectPhi {}
private

Definition at line 228 of file ColumnarMETMaker.h.

228{};

◆ m_jetEmfMuOlap

double met::ColumnarMETMaker::m_jetEmfMuOlap {}
private

Definition at line 268 of file ColumnarMETMaker.h.

268{};

◆ m_JetEtaForw

double met::ColumnarMETMaker::m_JetEtaForw {}
private

Definition at line 238 of file ColumnarMETMaker.h.

238{};

◆ m_JetEtaMax

double met::ColumnarMETMaker::m_JetEtaMax {}
private

Definition at line 237 of file ColumnarMETMaker.h.

237{};

◆ m_jetJvtMomentName

std::string met::ColumnarMETMaker::m_jetJvtMomentName
private

Definition at line 232 of file ColumnarMETMaker.h.

◆ m_jetMinEfrac

double met::ColumnarMETMaker::m_jetMinEfrac {}
private

Definition at line 229 of file ColumnarMETMaker.h.

229{};

◆ m_jetMinWeightedPt

double met::ColumnarMETMaker::m_jetMinWeightedPt {}
private

Definition at line 230 of file ColumnarMETMaker.h.

230{};

◆ m_jetMomAcc

columnar::MetHelpers::InputMomentumAccessors<columnar::JetDef> met::ColumnarMETMaker::m_jetMomAcc {*this}
private

Definition at line 308 of file ColumnarMETMaker.h.

308{*this};

◆ m_jetOutputMetWeightDecRegular

columnar::MetHelpers::ObjectWeightDecorator<columnar::MutableMetDef,columnar::JetDef> met::ColumnarMETMaker::m_jetOutputMetWeightDecRegular {*this, "", true}
private

Definition at line 320 of file ColumnarMETMaker.h.

320{*this, "", true};

◆ m_jetOutputMetWeightDecSoft

columnar::MetHelpers::ObjectWeightDecorator<columnar::MutableMetDef,columnar::JetDef> met::ColumnarMETMaker::m_jetOutputMetWeightDecSoft {*this, "Soft", false}
private

Definition at line 321 of file ColumnarMETMaker.h.

321{*this, "Soft", false};

◆ m_jetPsEMuOlap

double met::ColumnarMETMaker::m_jetPsEMuOlap {}
private

Definition at line 267 of file ColumnarMETMaker.h.

267{};

◆ m_jetRejectionDec

std::string met::ColumnarMETMaker::m_jetRejectionDec
private

Definition at line 233 of file ColumnarMETMaker.h.

◆ m_jetSelection

std::string met::ColumnarMETMaker::m_jetSelection
private

Definition at line 240 of file ColumnarMETMaker.h.

◆ m_jetsHandle

columnar::JetAccessor<columnar::ObjectColumn> met::ColumnarMETMaker::m_jetsHandle {*this, "Jets"}
private

Definition at line 284 of file ColumnarMETMaker.h.

284{*this, "Jets"};

◆ m_jetTrkNMuOlap

int met::ColumnarMETMaker::m_jetTrkNMuOlap {}
private

Definition at line 265 of file ColumnarMETMaker.h.

265{};

◆ m_jetTrkPtMuPt

double met::ColumnarMETMaker::m_jetTrkPtMuPt {}
private

Definition at line 269 of file ColumnarMETMaker.h.

269{};

◆ m_jetWidthMuOlap

double met::ColumnarMETMaker::m_jetWidthMuOlap {}
private

Definition at line 266 of file ColumnarMETMaker.h.

266{};

◆ m_JvtCut

double met::ColumnarMETMaker::m_JvtCut {}
private

Definition at line 236 of file ColumnarMETMaker.h.

236{}, m_JvtPtMax{}; // JVT cut and pt region of jets to apply a JVT selection

◆ m_JvtPtMax

double met::ColumnarMETMaker::m_JvtPtMax {}
private

Definition at line 236 of file ColumnarMETMaker.h.

236{}, m_JvtPtMax{}; // JVT cut and pt region of jets to apply a JVT selection

◆ m_JvtTool

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

Definition at line 273 of file ColumnarMETMaker.h.

◆ m_JvtWP

std::string met::ColumnarMETMaker::m_JvtWP
private

Definition at line 241 of file ColumnarMETMaker.h.

◆ m_metAssocHandle

columnar::ColumnAccessor<columnar::MetAssociationDef,columnar::ObjectColumn> met::ColumnarMETMaker::m_metAssocHandle {*this, "MetAssoc", {.addMTDependency=true}}
private

Definition at line 282 of file ColumnarMETMaker.h.

282{*this, "MetAssoc", {.addMTDependency=true}};

◆ m_missObjWarningPtThreshold

float met::ColumnarMETMaker::m_missObjWarningPtThreshold
private

Definition at line 226 of file ColumnarMETMaker.h.

◆ m_muEloss

bool met::ColumnarMETMaker::m_muEloss {}
private

Definition at line 259 of file ColumnarMETMaker.h.

259{};

◆ m_muIDPTJetPtRatioMuOlap

double met::ColumnarMETMaker::m_muIDPTJetPtRatioMuOlap {}
private

Definition at line 270 of file ColumnarMETMaker.h.

270{};

◆ m_muonsHandle

columnar::MuonAccessor<columnar::ObjectColumn> met::ColumnarMETMaker::m_muonsHandle {*this, "Muons"}
private

Definition at line 287 of file ColumnarMETMaker.h.

287{*this, "Muons"};

◆ m_orCaloTaggedMuon

bool met::ColumnarMETMaker::m_orCaloTaggedMuon {}
private

Definition at line 260 of file ColumnarMETMaker.h.

260{};

◆ m_outputMetHandle

columnar::MutableMetAccessor<columnar::ObjectColumn> met::ColumnarMETMaker::m_outputMetHandle {*this, "OutputMET"}
private

Definition at line 280 of file ColumnarMETMaker.h.

280{*this, "OutputMET"};

◆ m_outputMetMapAcc

columnar::MetHelpers::MapLookupAccessor<columnar::MutableMetDef> met::ColumnarMETMaker::m_outputMetMapAcc {*this}
private

Definition at line 290 of file ColumnarMETMaker.h.

290{*this};

◆ m_outputMetMomAcc

columnar::MetHelpers::MetMomentumAccessors<columnar::MutableMetDef> met::ColumnarMETMaker::m_outputMetMomAcc {*this}
private

Definition at line 291 of file ColumnarMETMaker.h.

291{*this};

◆ m_outputMetNameAcc

columnar::MutableMetAccessor<std::string> met::ColumnarMETMaker::m_outputMetNameAcc {*this, "name"}
private

Definition at line 289 of file ColumnarMETMaker.h.

289{*this, "name"};

◆ m_outputMetWeightDecRegular

columnar::MetHelpers::ObjectWeightDecorator met::ColumnarMETMaker::m_outputMetWeightDecRegular {*this, "", true}
private

Definition at line 306 of file ColumnarMETMaker.h.

306{*this, "", true};

◆ m_particlesHandle

columnar::ParticleAccessor<columnar::ObjectColumn> met::ColumnarMETMaker::m_particlesHandle {*this, "Particles"}
private

Definition at line 283 of file ColumnarMETMaker.h.

283{*this, "Particles"};

◆ m_photonsHandle

columnar::PhotonAccessor<columnar::ObjectColumn> met::ColumnarMETMaker::m_photonsHandle {*this, "Photons"}
private

Definition at line 286 of file ColumnarMETMaker.h.

286{*this, "Photons"};

◆ m_PVkey

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

Definition at line 223 of file ColumnarMETMaker.h.

◆ m_skipSystematicJetSelection

bool met::ColumnarMETMaker::m_skipSystematicJetSelection {}
private

Definition at line 257 of file ColumnarMETMaker.h.

257{};

◆ m_trkseltool

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

Definition at line 272 of file ColumnarMETMaker.h.

◆ m_useGhostMuons

bool met::ColumnarMETMaker::m_useGhostMuons {}
private

Definition at line 252 of file ColumnarMETMaker.h.

252{};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_veryGreedyPhotons

bool met::ColumnarMETMaker::m_veryGreedyPhotons {}
private

Definition at line 262 of file ColumnarMETMaker.h.

262{};

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