|
ATLAS Offline Software
|
Go to the documentation of this file.
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) {
70 return StatusCode::SUCCESS;
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_clustersOutput
SG::ReadHandleKey< CaloCellContainer > m_cells
static StatusCode finalizeClusters(SG::WriteHandle< CaloClusterCellLinkContainer > &h, xAOD::CaloClusterContainer *pClusterColl)
Finalize clusters (move CaloClusterCellLink to a separate container).
virtual StatusCode execute(const EventContext &ctx) const override
Execute the algorithm.
const_iterator begin() const
const begin method
const std::string & key() const
Return the StoreGate ID for the referenced object.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clustersInput
weight_t weight() const
Accessor for weight associated to this cell.
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
Handle class for recording to StoreGate.
Description of a calorimeter cluster.
void reserve(const size_t s)
Method to reserve space the underlying vector<pair>
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
virtual StatusCode initialize() override
Gaudi initialize method.
SG::WriteHandleKey< CaloClusterCellLinkContainer > m_cellLinksOutput
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
size_t size() const
size method
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const
const end method
void addCellLink(CaloClusterCellLink *CCCL)
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
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!)
Handle class for reading from StoreGate.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
const_iterator to loop over cells belonging to a cluster
size_type size() const noexcept
Returns the number of elements in the collection.