ATLAS Offline Software
Loading...
Searching...
No Matches
Rec::CrossedCaloCellHelper Class Reference

#include <CrossedCaloCellHelper.h>

Collaboration diagram for Rec::CrossedCaloCellHelper:

Static Public Member Functions

static xAOD::CaloClustercrossedCells (const Rec::ParticleCellAssociation &association, const CaloCellContainer &cellContainer, xAOD::CaloClusterContainer &clusterContainer)

Detailed Description

Definition at line 16 of file CrossedCaloCellHelper.h.

Member Function Documentation

◆ crossedCells()

xAOD::CaloCluster * Rec::CrossedCaloCellHelper::crossedCells ( const Rec::ParticleCellAssociation & association,
const CaloCellContainer & cellContainer,
xAOD::CaloClusterContainer & clusterContainer )
inlinestatic

Definition at line 18 of file CrossedCaloCellHelper.h.

19 {
20 // create cluster
21 xAOD::CaloCluster* cluster = CaloClusterStoreHelper::makeCluster(&clusterContainer, &cellContainer);
22 if (!cluster) { return nullptr; }
23
24 // loop over intersections and add cells to cluster
25 for (auto entry : association.cellIntersections()) {
26 if (!entry.first || !entry.first->caloDDE()) continue;
27 int index = cellContainer.findIndex(entry.first->caloDDE()->calo_hash());
28 if (index == -1) continue;
29 cluster->addCell(index, 1.);
30 }
31 return cluster;
32 }
int findIndex(const IdentifierHash theHash) const
Return index of the cell with a given hash.
static std::unique_ptr< xAOD::CaloCluster > makeCluster(const CaloCellContainer *cellCont)
Creates a valid CaloCluster with a private Aux-Store and CellLink container.
bool addCell(const unsigned index, const double weight)
Method to add a cell to the cluster (Beware: Kinematics not updated!)
str index
Definition DeMoScan.py:362
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

The documentation for this class was generated from the following file: