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::ContainerId::metAssociation, 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::ContainerId::mutableMetm_outputMetMapAcc {*this}
columnar::MetHelpers::MetMomentumAccessors< columnar::ContainerId::mutableMetm_outputMetMomAcc {*this}
columnar::Met1Accessor< std::string > m_inputMetNameAcc {*this, "name"}
columnar::MetHelpers::MapLookupAccessor< columnar::ContainerId::met1m_inputMetMapAcc {*this}
columnar::MetHelpers::MetMomentumAccessors< columnar::ContainerId::met1m_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::ContainerId::particlem_inputObjTypeAcc {*this, "objectType"}
columnar::MetHelpers::ObjectWeightDecorator m_outputMetWeightDecRegular {*this, "", true}
columnar::MetHelpers::InputMomentumAccessors< columnar::ContainerId::jetm_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::ContainerId::jet > > m_jetConstitScaleMomAcc
std::optional< columnar::MetHelpers::InputMomentumAccessors< columnar::ContainerId::jet > > m_jetConstitScaleMomFixedAcc
std::optional< columnar::JetAccessor< char > > m_acc_jetRejectionDec
columnar::MetHelpers::ObjectWeightDecorator< columnar::ContainerId::mutableMet, columnar::ContainerId::jetm_jetOutputMetWeightDecRegular {*this, "", true}
columnar::MetHelpers::ObjectWeightDecorator< columnar::ContainerId::mutableMet, columnar::ContainerId::jetm_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 1221 of file ColumnarMETMaker.cxx.

1222 {
1223 return static_cast<bool>(m_trkseltool->accept( *trk, vx ));
1224 }

◆ callEvents()

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

Definition at line 1244 of file ColumnarMETMaker.cxx.

1245 {
1246 for (columnar::EventContextId event : events)
1247 {
1248 auto met = m_outputMetHandle (event);
1249 auto metcore = m_inputMetHandle (event);
1250 auto metassoc = m_metAssocHandle (event);
1251 if (m_columnarOperation.value() == 0u)
1252 {
1253 auto particles = m_particlesHandle (event);
1255 throw std::runtime_error ("Failed to rebuild MET");
1256 } else if (m_columnarOperation.value() == 1u)
1257 {
1258 auto jets = m_jetsHandle (event);
1259 if (rebuildJetMET (m_columnarJetKey.value(), m_columnarSoftClusKey.value(), met, jets, metcore, m_assocAcc(metassoc), m_columnarDoJetJVT.value()).isFailure())
1260 throw std::runtime_error ("Failed to rebuild jet MET");
1261 } else if (m_columnarOperation.value() == 2u)
1262 {
1263 auto jets = m_jetsHandle (event);
1264 if (rebuildTrackMET (m_columnarJetKey.value(), m_columnarSoftClusKey.value(), met, jets, metcore, m_assocAcc(metassoc), m_columnarDoJetJVT.value()).isFailure())
1265 throw std::runtime_error ("Failed to rebuild track MET");
1266 } else
1267 {
1268 throw std::runtime_error ("Unknown columnar operation");
1269 }
1270 }
1271 }
Gaudi::Property< std::string > m_columnarJetKey
columnar::MetAssocationAccessors m_assocAcc
columnar::Met1Accessor< columnar::ObjectColumn > m_inputMetHandle
columnar::ColumnAccessor< columnar::ContainerId::metAssociation, columnar::ObjectColumn > m_metAssocHandle
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< ContainerId::eventContext > 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::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

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

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

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::TEvent, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }
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::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

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

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

Definition at line 106 of file AsgTool.cxx.

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

◆ getProperty()

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

Get one of the tool's properties.

◆ getPV()

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

Definition at line 1226 of file ColumnarMETMaker.cxx.

1226 {
1227
1228 SG::ReadHandle<xAOD::VertexContainer> h_PV(m_PVkey);
1229
1230 if(!h_PV.isValid()) {
1231 ATH_MSG_WARNING("Unable to retrieve primary vertex container PrimaryVertices");
1232 return nullptr;
1233 }
1234 ATH_MSG_DEBUG("Successfully retrieved primary vertex container");
1235 if(h_PV->empty()) ATH_MSG_WARNING("Event has no primary vertices!");
1236 for(const xAOD::Vertex* vx : *h_PV) {
1237 if(vx->vertexType()==xAOD::VxType::PriVtx) return vx;
1238 }
1239 return nullptr;
1240 }
#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::ContainerId::jet > > m_jetConstitScaleMomFixedAcc
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainer
std::optional< columnar::MetHelpers::InputMomentumAccessors< columnar::ContainerId::jet > > m_jetConstitScaleMomAcc
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 1213 of file ColumnarMETMaker.cxx.

1216 {
1217 columnar::MutableMetId met = m_outputMetMapAcc.fillMET (metCont, "Invisibles", invisSource);
1218 return rebuildMET(met,collection,helper,MissingETBase::UsageHandler::PhysicsObject);
1219 }
columnar::MetHelpers::MapLookupAccessor< columnar::ContainerId::mutableMet > m_outputMetMapAcc
ObjectId< ContainerId::mutableMet > MutableMetId
Definition MetDef.h:68
static const MissingETBase::Types::bitmask_t invisSource
Definition METHelpers.h:27

◆ markInvisible() [2/2]

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

Implements IMETMaker.

Definition at line 1197 of file ColumnarMETMaker.cxx.

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

◆ 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 626 of file ColumnarMETMaker.cxx.

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

◆ 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 462 of file ColumnarMETMaker.cxx.

469 {
470 ATH_MSG_VERBOSE("Rebuild jet term: " << metJetKey << " and soft term: " << softKey);
471
472 columnar::MutableMetId metJet {m_outputMetMapAcc.fillMET (metCont, metJetKey, MissingETBase::Source::jet())};
473
474 columnar::OptMet1Id coreSoftClus, coreSoftTrk;
475 columnar::OptMutableMetId metSoftClus, metSoftTrk;
476
477 columnar::OptMet1Id coreSoft = m_inputMetMapAcc(metCoreCont,softKey+"Core");
478 if(!coreSoft) {
479 ATH_MSG_WARNING("Invalid soft term key supplied: " << softKey);
480 return StatusCode::FAILURE;
481 }
483 coreSoftTrk = coreSoft;
484
485 metSoftTrk = m_outputMetMapAcc.fillMET (metCont, softKey, coreSoftTrk.value()(m_inputMetSourceAcc));
486 } else {
487 coreSoftClus = coreSoft;
488
489 metSoftClus = m_outputMetMapAcc.fillMET (metCont, softKey, coreSoftClus.value()(m_inputMetSourceAcc));
490 }
491
492 return rebuildJetMET(metJet, metCont, jets, helper,
493 metSoftClus, coreSoftClus,
494 metSoftTrk, coreSoftTrk,
495 doJetJVT);
496 }
columnar::MetHelpers::MapLookupAccessor< columnar::ContainerId::met1 > m_inputMetMapAcc
OptObjectId< ContainerId::met1 > OptMet1Id
Definition MetDef.h:63
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 440 of file ColumnarMETMaker.cxx.

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

◆ 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 569 of file ColumnarMETMaker.cxx.

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

◆ 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 546 of file ColumnarMETMaker.cxx.

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

◆ 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 603 of file ColumnarMETMaker.cxx.

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

◆ 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::ContainerId::particle > 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 && m_inputMuonTypeAcc.getOptional(orig)==xAOD::Muon::CaloTagged) {
409 for (decltype(auto) assoc : assocs) {
410 auto ind = m_assocAcc.overlapIndices(assoc,orig);
411 auto allObjects = m_assocAcc.objects(assoc);
412 for (size_t indi = 0; indi < ind.size(); indi++) if (allObjects[ind[indi]]) {
413 if (allObjects[ind[indi]].isContainer<columnar::ContainerId::electron>()
414 && helper.objSelected(assoc, ind[indi])) {
415 selected = false;
416 break;
417 }
418 }
419 }
420 }
421 // Don't overlap remove muons, but flag the non-overlapping muons to take out their tracks from jets
422 // Removed eloss from here -- clusters already flagged.
423 // To be handled in rebuildJetMET
424 if(selected) {
426 ATH_MSG_VERBOSE("Add object with pt " << m_inputMomAcc.pt(obj));
427 m_outputMetMomAcc.addParticle (met, m_inputMomAcc, obj);
428 } else {
429 MissingETBase::Types::constvec_t constvec = helper.getConstVec(obj,objScale);
430 ATH_MSG_VERBOSE("Add truth object with pt " << constvec.cpt());
431 m_outputMetMomAcc.addParticle (met, constvec.cpx(),constvec.cpy(),constvec.cpt());
432 }
433 metWeights.emplace_back( obj, 1. );
434 }
435 }
436 ATH_MSG_DEBUG("Built met term " << met(m_outputMetNameAcc) << ", with magnitude " << m_outputMetMomAcc.met(met));
437 return StatusCode::SUCCESS;
438 }
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 1186 of file ColumnarMETMaker.cxx.

1192 {
1193 return rebuildJetMET(metJet,metCont,jets,helper,std::nullopt,nullptr,metSoftTrk,coreSoftTrk,doJetJVT,true);
1194 }

◆ 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 520 of file ColumnarMETMaker.cxx.

527 {
528 ATH_MSG_VERBOSE("Rebuild jet term: " << metJetKey << " and soft term: " << softKey);
529
531
532 columnar::OptMet1Id coreSoft = m_inputMetMapAcc(metCoreCont,softKey+"Core");
533 if(!coreSoft) {
534 ATH_MSG_WARNING("Invalid soft term key supplied: " << softKey);
535 return StatusCode::FAILURE;
536 }
537 auto coreSoftTrk = coreSoft.value();
538
539 columnar::MutableMetId metSoftTrk {m_outputMetMapAcc.fillMET (metCont, softKey, coreSoftTrk(m_inputMetSourceAcc))};
540
541 return rebuildTrackMET(metJet, metCont, jets, helper,
542 metSoftTrk, coreSoftTrk,
543 doJetJVT);
544 }
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 498 of file ColumnarMETMaker.cxx.

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

◆ 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 1163 of file ColumnarMETMaker.cxx.

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

◆ 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::ContainerId::met1> met::ColumnarMETMaker::m_inputMetMapAcc {*this}
private

Definition at line 294 of file ColumnarMETMaker.h.

294{*this};

◆ m_inputMetMomAcc

columnar::MetHelpers::MetMomentumAccessors<columnar::ContainerId::met1> 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::ContainerId::particle> 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::ContainerId::jet> > met::ColumnarMETMaker::m_jetConstitScaleMomAcc
private

Definition at line 316 of file ColumnarMETMaker.h.

◆ m_jetConstitScaleMomFixedAcc

std::optional<columnar::MetHelpers::InputMomentumAccessors<columnar::ContainerId::jet> > 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::ContainerId::jet> met::ColumnarMETMaker::m_jetMomAcc {*this}
private

Definition at line 308 of file ColumnarMETMaker.h.

308{*this};

◆ m_jetOutputMetWeightDecRegular

columnar::MetHelpers::ObjectWeightDecorator<columnar::ContainerId::mutableMet,columnar::ContainerId::jet> met::ColumnarMETMaker::m_jetOutputMetWeightDecRegular {*this, "", true}
private

Definition at line 320 of file ColumnarMETMaker.h.

320{*this, "", true};

◆ m_jetOutputMetWeightDecSoft

columnar::MetHelpers::ObjectWeightDecorator<columnar::ContainerId::mutableMet,columnar::ContainerId::jet> 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::ContainerId::metAssociation,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::ContainerId::mutableMet> met::ColumnarMETMaker::m_outputMetMapAcc {*this}
private

Definition at line 290 of file ColumnarMETMaker.h.

290{*this};

◆ m_outputMetMomAcc

columnar::MetHelpers::MetMomentumAccessors<columnar::ContainerId::mutableMet> 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: