 |
ATLAS Offline Software
|
Go to the documentation of this file.
13 #ifndef CALOTOWER_MAX_CELL_COUNT
14 #define CALOTOWER_MAX_CELL_COUNT 200000
20 , m_inputClusterContainerKey(
"CaloCalTopoClusters")
31 return StatusCode::SUCCESS;
37 if(cellToTower.empty()) {
39 return StatusCode::FAILURE;
46 if (!caloTowerContainer.
isValid())
47 return StatusCode::FAILURE;
49 auto addedCellsMap = std::make_unique<std::bitset< CALOTOWER_MAX_CELL_COUNT> >();
54 ATH_MSG_ERROR(
"Cluster without cell links found in collection: " << inputClusterContainer.name());
55 return StatusCode::FAILURE;
62 if (!addedCellsMap->test(
cellHash)) {
65 const auto& c2ts=cellToTower[
cellHash];
68 (*caloTowerContainer)[c2t.m_towerIdx]->addEnergy(
cell->e()*c2t.m_weight);
73 return StatusCode::SUCCESS;
77 {
return StatusCode::SUCCESS; }
virtual ~CaloTowerxAODFromClusters()
Baseclass destructor.
const CellToTowerVec & getIndexCache(const EventContext &ctx) const
CaloTowerxAODFromClusters(const std::string &name, ISvcLocator *pSvcLocator)
Default algorithm constructor.
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
Description of a calorimeter cluster.
std::vector< std::vector< cellToTower_t > > CellToTowerVec
virtual StatusCode initialize() override
Initialize algorithm.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
SG::WriteHandle< xAOD::CaloTowerContainer > makeContainer(const EventContext &ctx) const
Intialize m_cellToTower cache.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual StatusCode finalize() override
Finalize algorithm.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_inputClusterContainerKey
virtual StatusCode execute(const EventContext &) const override
Execute algorithm.
Data object for each calorimeter readout cell.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...