28 ISvcLocator* pSvcLocator )
74 return StatusCode::FAILURE;
79 return StatusCode::FAILURE;
84 return StatusCode::FAILURE;
89 return StatusCode::FAILURE;
94 return StatusCode::FAILURE;
105 return StatusCode::SUCCESS;
112 return StatusCode::SUCCESS;
122 ATH_CHECK( metHandle.record (std::make_unique<xAOD::MissingETContainer>(),
123 std::make_unique<xAOD::MissingETAuxContainer>()) );
129 return StatusCode::FAILURE;
139 return StatusCode::FAILURE;
145 if (!
Jets.isValid()) {
147 return StatusCode::FAILURE;
154 return StatusCode::FAILURE;
159 if (!Gamma.isValid()) {
161 return StatusCode::FAILURE;
168 return StatusCode::FAILURE;
173 if (!
Muons.isValid()) {
175 return StatusCode::FAILURE;
185 for(
const auto *
const el : *Electrons) {
193 metHelper, objScale).isFailure() ) {
196 ATH_MSG_DEBUG(
"Selected " << metElectrons.size() <<
" MET electrons. "
203 for(
const auto *
const ph : *Gamma) {
210 metHelper, objScale).isFailure() ) {
213 ATH_MSG_DEBUG(
"Selected " << metPhotons.size() <<
" MET photons. "
220 for(
const auto *
const tau : *TauJets) {
227 metHelper, objScale).isFailure() ){
237 for(
const auto *
const mu : *
Muons) {
246 metHelper, objScale).isFailure() ) {
249 ATH_MSG_DEBUG(
"Selected " << metMuons.size() <<
" MET muons. "
254 Jets.cptr(), coreMet.
cptr(), metHelper,
false ).isFailure() ) {
262 for (
const auto& [
jet, weight] : jets_and_weights) {
264 <<
" contributes with weight " <<weight
271 if(
buildMETSum(
"FinalTrk", newMet, trksource).isFailure() ){
276 if(
buildMETSum(
"FinalClus", newMet, clsource).isFailure() ) {
280 return StatusCode::SUCCESS;
287 if( mu->pt()<2.5e3 || mu->pt()/cosh(mu->eta())<4e3 )
return false;
293 if( fabs(el->eta())>2.47 || el->pt()<10e3 )
return false;
299 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_VERBOSE(x)
#define ATH_MSG_WARNING(x)
size_t size() const
Number of registered mappings.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
An algorithm that can be simultaneously executed in multiple threads.
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
std::string m_softtrkname
SG::WriteHandleKey< xAOD::MissingETContainer > m_metKey
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
virtual StatusCode initialize() override
Athena algorithm's Hooks.
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
METMakerAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
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.