17#include "CaloGeoHelpers/CaloSampling.h"
33 static constexpr std::size_t N_SAMPLINGS{CaloSampling::FCAL2+1};
36namespace HLT {
namespace MET {
47 std::vector<std::string> componentNames;
48 componentNames.reserve(N_SAMPLINGS);
49 for (std::size_t ii = 0; ii < N_SAMPLINGS; ++ii)
56 const EventContext& context,
64 return StatusCode::FAILURE;
71 return StatusCode::FAILURE;
75 std::array<METComponent, N_SAMPLINGS> sums;
77 for (
const CaloCell* icell : *cells) {
82 noiseCDO->getEffectiveSigma(icell->ID(), icell->gain(), icell->energy() ) :
83 noiseCDO->getNoise(icell->ID(), icell->gain() );
97 icell->energy(), dde->eta(), dde->phi() );
100 auto id = icell->ID();
107 std::accumulate(sums.begin(), sums.end(),
METComponent{}).fillMET(
met);
109 for (std::size_t ii = 0; ii < N_SAMPLINGS; ++ii)
110 sums.at(ii).fillMETComponent(ii,
met);
112 return StatusCode::SUCCESS;
#define CHECK(...)
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
Data object for each calorimeter readout cell.
This class groups all DetDescr information related to a CaloCell.
static std::string getSamplingName(CaloSample theSample)
Returns a string (name) for each CaloSampling.
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Calorimeter noise CDO (conditions data object)
virtual StatusCode fillMET(xAOD::TrigMissingET &met, const EventContext &context, MonGroupBuilder &monitors) const override
Calculate and fill the output MET value.
Gaudi::Property< float > m_absNoiseThreshold
The threshold on the magnitude of the cell energy.
const CaloCell_ID * m_caloCellID
Fallback option for calo cells which don't have a detector description.
Gaudi::Property< float > m_negNoiseThreshold
The maximum negative cell energy.
virtual StatusCode initialize() override
Initialize the fex.
CellFex(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
Input cells.
Gaudi::Property< bool > m_doTwoGaussianNoise
Use the 'two-gaussian' noise calculation for the TileCal.
FexBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
StatusCode initializeBase(const std::vector< std::string > &componentNames)
Initialize the base class.
Helper struct to build up MET values before moving them into the EDM.
static SignedKinematics fromEnergyEtaPhi(double energy, double eta, double phi)
Factory function to construct from energy, eta, phi (massless)
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
TrigMissingET_v1 TrigMissingET
Define the most recent version of the TrigMissingET class.