|
ATLAS Offline Software
|
Go to the documentation of this file.
24 float toLinGeV(
float x,
float fallback=0,
float epsilon=1
e-6)
27 if (std::fabs(xGeV) < epsilon)
33 float toLog10GeV(
float x,
float fallback=0,
float epsilon=1
e-6)
36 if (absXGeV < epsilon)
38 return std::copysign(std::log10(absXGeV),
x);
42 namespace HLT {
namespace MET {
49 const std::vector<std::string>& componentNames)
57 return StatusCode::SUCCESS;
63 ATH_MSG_ERROR(
"Base class was not initialised! This means that the "
64 <<
"derived class was not correctly written!");
65 return StatusCode::FAILURE;
70 auto metCont = std::make_unique<xAOD::TrigMissingETContainer>();
71 auto metContAux = std::make_unique<xAOD::TrigMissingETAuxContainer>();
72 metCont->setStore(metContAux.get() );
75 metCont->push_back(std::make_unique<xAOD::TrigMissingET>());
105 for (std::size_t ii = 0; ii <
met->getNumberOfComponents(); ++ii)
107 <<
met->nameOfComponent(ii) <<
", "
108 <<
met->statusComponent(ii) <<
", "
114 CHECK( handle.record( std::move(metCont), std::move(metContAux) ) );
115 return StatusCode::SUCCESS;
123 for (std::size_t ii = 0; ii <
met.getNumberOfComponents(); ++ii) {
125 if (component.
sumEt > 0 &&
130 met.setStatusComponent(ii, component.
status);
134 if (total.
sumEt > 0 &&
138 return StatusCode::SUCCESS;
164 "EF_XS", toLinGeV(metComponent.
met() ) / toLinGeV(metComponent.
sumEt, 1) ) );
166 return StatusCode::SUCCESS;
virtual StatusCode execute(const EventContext &context) const override
Run the algorithm.
float mpx
Momentum components x momentum.
FexBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
float sumEt
And the sumEt.
bool msgLvl(const MSG::Level lvl) const
std::vector< std::string > m_componentNames
The names of the output MET components.
Gaudi::Property< float > m_maxComponentMETSumEtRatio
int status
The status flag.
virtual StatusCode fillMET(xAOD::TrigMissingET &met, const EventContext &context, MonGroupBuilder &monitors) const =0
Calculate and fill the output MET value.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
float sumE
Also store the sumE.
bool m_baseInitialised
Whether or not this class has been correctly initialised.
ToolHandle< GenericMonitoringTool > m_monTool
The monitoring tool.
virtual StatusCode monitor(const xAOD::TrigMissingET &met, MonGroupBuilder &monitors) const
Add monitor variables from an xAOD::TrigMissingET object.
float magnitude() const
The magnitude of the missing 3-vector.
Monitored::Group build(const ToolHandle< GenericMonitoringTool > &tool) const
Build the monitored group.
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
SG::WriteHandleKey< xAOD::TrigMissingETContainer > m_metContainerKey
The output MET object.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< float > m_maxGlobalMETSumEtRatio
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode flagMET(xAOD::TrigMissingET &met) const
Flag suspicious values in the output MET.
float phi() const
The direction.
void add(Monitored::IMonitoredVariable &variable)
Add a new monitored variable.
Header file to be included by clients of the Monitored infrastructure.
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.
@ ComponentBigMEtSEtRatio
void increaseCapacity(std::size_t value, bool owned=false)
Increase the internal capacity.
float met() const
The actual met.
Class holding the Missing ET trigger fex results.
Declare a monitored scalar variable.