|
ATLAS Offline Software
|
Go to the documentation of this file.
17 #include "AthLinks/ElementLink.h"
19 #include <unordered_set>
24 return fabs(ijet->
eta() ) < 2.4;
28 namespace HLT {
namespace MET {
42 if (
m_jvtKey.key().find(
".") == std::string::npos)
47 return StatusCode::FAILURE;
53 {
"JETB1",
"JETB2",
"JETE1",
"JETE2",
"TrackSoftTerm"});
58 const EventContext& context,
66 return StatusCode::FAILURE;
69 if (!tracks.isValid())
72 return StatusCode::FAILURE;
75 if (!vertices.isValid())
78 return StatusCode::FAILURE;
81 auto jvtAcc = SG::makeHandle<float>(
m_jvtKey, context);
96 std::array<METComponent, 4> mhtSums;
102 std::vector<const xAOD::TrackParticle*> tstTracks;
103 tstTracks.reserve(tracks->size() );
105 if (tva->associatedVertex(itrk) == priVtx &&
108 tstTracks.push_back(itrk);
110 std::unordered_set<std::size_t> jetTrackIndices;
113 if (isCentral(ijet) ) {
128 std::size_t componentIdx = 0;
131 if (!isCentral(ijet) )
134 mhtSums.at(componentIdx) += ijet->p4();
136 for (
const auto& link : trackLinksAcc(*ijet) ) {
137 if (link.getDataPtr() != tracks.ptr() ) {
139 <<
"' do not match tracks retrieved with '"
141 return StatusCode::FAILURE;
143 jetTrackIndices.insert(link.index() );
148 if (jetTrackIndices.count(itrk->index() ) == 0)
150 tstSum += itrk->p4();
155 for (std::size_t ii = 0; ii < 4; ++ii)
156 mhtSums.at(ii).fillMETComponent(ii,
met);
164 return StatusCode::SUCCESS;
std::string contKeyFromKey(const std::string &key)
Extract the container part of key.
virtual StatusCode initialize() override
Initialise the fex.
Gaudi::Property< float > m_maxJvtJetPt
Maximum pt selection for JVT on central jets.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_jvtKey
The Jvt selection name.
Gaudi::Property< float > m_forwardJetPt
Pt selection on forward jets.
TrkMHTFex(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackKey
Input tracks.
SG::ReadHandleKey< xAOD::JetContainer > m_jetKey
Input jets and jvt.
Some common helper functions used by decoration handles.
Gaudi::Property< std::string > m_trackGAName
The ghost-association aux element name.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
virtual StatusCode fillMET(xAOD::TrigMissingET &met, const EventContext &context, MonGroupBuilder &monitors) const override
Calculate and fill the output MET value.
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey
Input vertices.
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
::StatusCode StatusCode
StatusCode definition for legacy code.
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelTool
The track selection tool.
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
void fillMETComponent(std::size_t idx, xAOD::TrigMissingET &met) const
Fill a component of the MET with this.
StatusCode initializeBase(const std::vector< std::string > &componentNames)
Initialize the base class.
virtual double eta() const
The pseudorapidity ( ) of the particle.
Helper struct to build up MET values before moving them into the EDM.
Gaudi::Property< float > m_jvtSelection
The JVT selection.
Gaudi::Property< float > m_tstPtCeil
The maximum pT for tracks in the soft term.
deferred_t< SG::AuxElement::ConstAccessor< std::vector< ElementLink< xAOD::IParticleContainer > > > > m_trackGA
Class describing a Vertex.
SG::ReadHandleKey< jet::TrackVertexAssociation > m_tvaKey
The track-vertex assocation name.
Class holding the Missing ET trigger fex results.
Handle class for reading a decoration on an object.
Class describing a TrackParticle.
Gaudi::Property< float > m_minJvtJetPt
Minimum pt selection for JVT on central jets.