|
ATLAS Offline Software
|
Go to the documentation of this file.
23 #include "GaudiKernel/ThreadLocalContext.h"
33 const std::string&
name,
34 ISvcLocator* pSvcLocator)
36 , m_nEventsProcessed(0)
37 , m_nCaloClustersProcessed(0)
38 , m_nCaloClustersThinned(0)
53 ATH_MSG_INFO(
"Negative energy CaloClusters thinning not required");
55 ATH_MSG_INFO(
"Negative energy CaloClusters will be thinned");
59 ATH_MSG_ERROR(
"StreamName property has not been initialized.");
60 return StatusCode::FAILURE;
71 return StatusCode::SUCCESS;
81 <<
" negative energy CaloClusters ");
82 return StatusCode::SUCCESS;
93 return StatusCode::SUCCESS;
101 std::vector<bool>
mask;
102 int nCaloClusters = caloClusters->size();
104 mask.assign(nCaloClusters,
false);
107 unsigned long int nCaloClustersThinned = 0;
108 for (
int i = 0;
i < nCaloClusters; ++
i) {
111 if (caloCluster->
rawE() > 0.0) {
114 ++nCaloClustersThinned;
118 std::memory_order_relaxed);
123 return StatusCode::SUCCESS;
BooleanProperty m_doThinning
Should the thinning run?
virtual StatusCode finalize() override final
Athena algorithm's finalize hook.
Handle for requesting thinning for a data object.
ThinNegativeEnergyCaloClustersAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Handle for requesting thinning for a data object.
std::atomic< unsigned long > m_nEventsProcessed
Counters.
An algorithm that can be simultaneously executed in multiple threads.
std::atomic< unsigned long > m_nCaloClustersThinned
void keep(size_t ndx)
Mark that index ndx in the container should be kept (not thinned away).
Description of a calorimeter cluster.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode initialize() override final
Athena algorithm's initalize hook.
SG::ThinningHandleKey< xAOD::CaloClusterContainer > m_caloClustersKey
Names of the containers to thin.
StringProperty m_streamName
StatusCode execute(const EventContext &ctx) const override final
Athena algorithm's execute hook.
std::atomic< unsigned long > m_nCaloClustersProcessed