36 return StatusCode::FAILURE;
41 return StatusCode::FAILURE;
46 return StatusCode::FAILURE;
51 return StatusCode::FAILURE;
56 return StatusCode::FAILURE;
67 return StatusCode::SUCCESS;
74 return StatusCode::SUCCESS;
84 ATH_CHECK( metHandle.record (std::make_unique<xAOD::MissingETContainer>(),
85 std::make_unique<xAOD::MissingETAuxContainer>()) );
91 return StatusCode::FAILURE;
101 return StatusCode::FAILURE;
107 if (!
Jets.isValid()) {
109 return StatusCode::FAILURE;
116 return StatusCode::FAILURE;
121 if (!Gamma.isValid()) {
123 return StatusCode::FAILURE;
130 return StatusCode::FAILURE;
135 if (!
Muons.isValid()) {
137 return StatusCode::FAILURE;
147 for(
const auto *
const el : *Electrons) {
155 metHelper, objScale).isFailure() ) {
158 ATH_MSG_DEBUG(
"Selected " << metElectrons.size() <<
" MET electrons. "
165 for(
const auto *
const ph : *Gamma) {
172 metHelper, objScale).isFailure() ) {
175 ATH_MSG_DEBUG(
"Selected " << metPhotons.size() <<
" MET photons. "
182 for(
const auto *
const tau : *TauJets) {
189 metHelper, objScale).isFailure() ){
199 for(
const auto *
const mu : *
Muons) {
208 metHelper, objScale).isFailure() ) {
211 ATH_MSG_DEBUG(
"Selected " << metMuons.size() <<
" MET muons. "
216 Jets.cptr(), coreMet.
cptr(), metHelper,
false ).isFailure() ) {
224 for (
const auto& [
jet, weight] : jets_and_weights) {
226 <<
" contributes with weight " <<weight
233 if(
buildMETSum(
"FinalTrk", newMet, trksource).isFailure() ){
238 if(
buildMETSum(
"FinalClus", newMet, clsource).isFailure() ) {
242 return StatusCode::SUCCESS;
249 if( mu->pt()<2.5e3 || mu->pt()/cosh(mu->eta())<4e3 )
return false;
255 if( fabs(el->eta())>2.47 || el->pt()<10e3 )
return false;
261 if( !(ph->
author()&20) || fabs(ph->
eta())>2.47 || ph->
pt()<10e3 )
return false;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_VERBOSE(x,...)
#define ATH_MSG_INFO(x,...)
size_t size() const
Number of registered mappings.
DataVector adapter that acts like it holds const pointers.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
virtual ~METMakerAlg()
Destructor:
virtual bool accept(const xAOD::Electron *el) const
SG::ReadHandleKey< xAOD::TauJetContainer > m_TauJetContainerKey
Gaudi::Property< bool > m_doTruthLep
SG::WriteHandleKey< xAOD::MissingETContainer > m_metKey
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
Gaudi::Property< std::string > m_softclname
virtual StatusCode initialize() override
Athena algorithm's Hooks.
Gaudi::Property< std::string > m_softtrkname
ToolHandle< IMETMaker > m_metmaker
Athena configured tools.
ToolHandle< CP::IMuonSelectionTool > m_muonSelTool
SG::ReadHandleKey< xAOD::MissingETAssociationMap > m_metMapKey
ToolHandle< IAsgPhotonIsEMSelector > m_photonSelIsEMTool
SG::ReadHandleKey< xAOD::PhotonContainer > m_PhotonContainerKey
SG::ReadHandleKey< xAOD::JetContainer > m_JetContainerKey
ToolHandle< IAsgElectronLikelihoodTool > m_elecSelLHTool
ToolHandle< TauAnalysisTools::ITauSelectionTool > m_tauSelTool
virtual StatusCode finalize() override
SG::ReadHandleKey< xAOD::ElectronContainer > m_ElectronContainerKey
SG::ReadHandleKey< xAOD::MissingETContainer > m_CoreMetKey
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
uint16_t author(uint16_t bitmask=EgammaParameters::AuthorALL) const
Get author.
uint64_t bitmask_t
Type for status word bit mask.
Policy
Policies on usage checks.
@ OnlyTrack
Track based only.
@ TruthParticle
Truth particle based.
@ PhysicsObject
Physics object based.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
template std::vector< std::pair< const xAOD::Jet *, float > > getMETElementsWeights< xAOD::Jet >(const xAOD::MissingET &met)
StatusCode buildMETSum(const std::string &totalName, xAOD::MissingETContainer *metCont)
std::vector< const T * > getMETElements(const xAOD::MissingET &met)
@ Photon
The object is a photon.
@ Muon
The object is a muon.
@ Electron
The object is an electron.
@ Tau
The object is a tau (jet).
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
TauJet_v3 TauJet
Definition of the current "tau version".
MissingETContainer_v1 MissingETContainer
Muon_v1 Muon
Reference the current persistent version:
Photon_v1 Photon
Definition of the current "egamma version".
Electron_v1 Electron
Definition of the current "egamma version".
@ LCTopo
Indicator for MET contribution from TopoClusters with LCW calibration applied.
@ Track
Indicator for MET contribution from reconstructed charged particle tracks.