25 using iplink_t = ElementLink<xAOD::IParticleContainer>;
31 ISvcLocator* pSvcLocator )
77 return StatusCode::FAILURE;
82 return StatusCode::FAILURE;
87 return StatusCode::FAILURE;
92 return StatusCode::FAILURE;
97 return StatusCode::FAILURE;
108 return StatusCode::SUCCESS;
115 return StatusCode::SUCCESS;
124 auto ctx = getContext();
126 ATH_CHECK( metHandle.record (std::make_unique<xAOD::MissingETContainer>(), std::make_unique<xAOD::MissingETAuxContainer>()) );
132 return StatusCode::FAILURE;
142 return StatusCode::FAILURE;
148 if (!
Jets.isValid()) {
150 return StatusCode::FAILURE;
157 return StatusCode::FAILURE;
162 if (!Gamma.isValid()) {
164 return StatusCode::FAILURE;
171 return StatusCode::FAILURE;
176 if (!
Muons.isValid()) {
178 return StatusCode::FAILURE;
188 for(
const auto *
const el : *Electrons) {
196 metHelper, objScale).isFailure() ) {
199 ATH_MSG_DEBUG(
"Selected " << metElectrons.size() <<
" MET electrons. "
206 for(
const auto *
const ph : *Gamma) {
213 metHelper, objScale).isFailure() ) {
216 ATH_MSG_DEBUG(
"Selected " << metPhotons.size() <<
" MET photons. "
223 for(
const auto *
const tau : *TauJets) {
230 metHelper, objScale).isFailure() ){
240 for(
const auto *
const mu : *
Muons) {
249 metHelper, objScale).isFailure() ) {
252 ATH_MSG_DEBUG(
"Selected " << metMuons.size() <<
" MET muons. "
257 Jets.cptr(), coreMet.
cptr(), metHelper,
false ).isFailure() ) {
266 if(
buildMETSum(
"FinalTrk", newMet, trksource).isFailure() ){
271 if(
buildMETSum(
"FinalClus", newMet, clsource).isFailure() ) {
275 return StatusCode::SUCCESS;
282 if( mu->pt()<2.5e3 || mu->pt()/cosh(mu->eta())<4e3 )
return false;
288 if( fabs(el->eta())>2.47 || el->pt()<10e3 )
return false;
294 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)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
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.
SG::ConstAccessor< T, ALLOC > ConstAccessor
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:
SG::ReadHandleKey< xAOD::TauJetContainer > m_TauJetContainerKey
virtual bool accept(const xAOD::Electron *el)
std::string m_softtrkname
SG::WriteHandleKey< xAOD::MissingETContainer > m_metKey
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
METMakerAlg()
Default constructor:
SG::ReadHandleKey< xAOD::MissingETAssociationMap > m_metMapKey
ToolHandle< IAsgPhotonIsEMSelector > m_photonSelIsEMTool
SG::ReadHandleKey< xAOD::PhotonContainer > m_PhotonContainerKey
virtual StatusCode execute() override
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())
ElementLink< xAOD::IParticleContainer > iplink_t
StatusCode buildMETSum(const std::string &totalName, xAOD::MissingETContainer *metCont)
static const SG::AuxElement::ConstAccessor< std::vector< iplink_t > > acc_constitObjLinks("ConstitObjectLinks")
@ 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.