21 return StatusCode::SUCCESS;
31 if(!cells.isValid()) {
33 return StatusCode::SUCCESS;
40 return StatusCode::SUCCESS;
45 ATH_CHECK( clustersOutputHandle.
record(std::make_unique<xAOD::CaloClusterContainer>(), std::make_unique<xAOD::CaloClusterAuxContainer>()) );
47 clustersOutputContainer->
reserve(clustersInput->size());
51 clustersOutputContainer->
push_back(newCluster);
52 *newCluster = *oldCluster;
60 for (;lnk_it!=lnk_it_e;++lnk_it) {
62 const int newIdx=cells->findIndex(cellHash);
70 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
const_iterator to loop over cells belonging to a cluster
weight_t weight() const
Accessor for weight associated to this cell.
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
const_iterator end() const
const end method
size_t size() const
size method
void reserve(const size_t s)
Method to reserve space the underlying vector<pair>
const_iterator begin() const
const begin method
static StatusCode finalizeClusters(SG::WriteHandle< CaloClusterCellLinkContainer > &h, xAOD::CaloClusterContainer *pClusterColl)
Finalize clusters (move CaloClusterCellLink to a separate container).
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clustersInput
virtual StatusCode initialize() override
Gaudi initialize method.
SG::WriteHandleKey< CaloClusterCellLinkContainer > m_cellLinksOutput
SG::ReadHandleKey< CaloCellContainer > m_cells
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_clustersOutput
virtual StatusCode execute(const EventContext &ctx) const override
Execute the algorithm.
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
This is a "hash" representation of an Identifier.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
void addCellLink(CaloClusterCellLink *CCCL)
CaloClusterCellLink * getOwnCellLinks()
Get a pointer to the owned CaloClusterCellLink object (non-const version)
bool addCell(const unsigned index, const double weight)
Method to add a cell to the cluster (Beware: Kinematics not updated!)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.