|
ATLAS Offline Software
|
Go to the documentation of this file.
24 #include "Gaudi/Property.h"
25 #include "GaudiKernel/ThreadLocalContext.h"
35 const std::string&
name,
36 ISvcLocator* pSvcLocator)
38 , m_nEventsProcessed(0)
39 , m_nNeutralPFOsProcessed(0)
40 , m_nNeutralPFOsThinned(0)
56 ATH_MSG_INFO(
"Negative energy NeutralPFO thinning not required");
58 ATH_MSG_INFO(
"Negative energy NeutralPFOs will be thinned");
62 ATH_MSG_ERROR(
"StreamName property has not been initialized.");
63 return StatusCode::FAILURE;
77 return StatusCode::SUCCESS;
87 <<
" negative energy NeutralPFOs ");
88 return StatusCode::SUCCESS;
99 return StatusCode::SUCCESS;
104 std::vector<bool>
mask;
105 int nNeutralFEs = neutralFEs->size();
107 mask.assign(nNeutralFEs,
false);
109 unsigned long int nNeutralPFOsThinned = 0;
110 for (
int i = 0;
i < nNeutralFEs;
i++) {
112 if (neutralFE->
pt() > 0.0)
115 ++nNeutralPFOsThinned;
120 std::memory_order_relaxed);
129 return StatusCode::SUCCESS;
std::atomic< unsigned long > m_nEventsProcessed
Counters.
Handle for requesting thinning for a data object.
virtual StatusCode execute(const EventContext &ctx) const override final
Athena algorithm's execute hook.
virtual double pt() const override
SG::ThinningHandleKey< xAOD::FlowElementContainer > m_LCNeutralPFOsKey
virtual StatusCode finalize() override final
Athena algorithm's finalize hook.
ThinNegativeEnergyNeutralPFOsAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Handle for requesting thinning for a data object.
StringProperty m_streamName
SG::ThinningHandleKey< xAOD::FlowElementContainer > m_neutralPFOsKey
Names of the containers to thin.
An algorithm that can be simultaneously executed in multiple threads.
void keep(size_t ndx)
Mark that index ndx in the container should be kept (not thinned away).
::StatusCode StatusCode
StatusCode definition for legacy code.
std::atomic< unsigned long > m_nNeutralPFOsThinned
BooleanProperty m_doThinning
Should the thinning run?
std::atomic< unsigned long > m_nNeutralPFOsProcessed
virtual StatusCode initialize() override final
Athena algorithm's initalize hook.
A detector object made of other lower level object(s)