ATLAS Offline Software
Static Public Member Functions | List of all members
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()

static 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  }

The documentation for this class was generated from the following file:
CaloClusterStoreHelper::makeCluster
static std::unique_ptr< xAOD::CaloCluster > makeCluster(const CaloCellContainer *cellCont)
Creates a valid CaloCluster with a private Aux-Store and CellLink container.
Definition: CaloClusterStoreHelper.cxx:13
index
Definition: index.py:1
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
Trk::association
@ association
Definition: TrackingGeometry.h:46
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
xAOD::CaloCluster_v1::addCell
bool addCell(const unsigned index, const double weight)
Method to add a cell to the cluster (Beware: Kinematics not updated!)
Definition: CaloCluster_v1.h:771
CaloCellContainer::findIndex
int findIndex(const IdentifierHash theHash) const
Return index of the cell with a given hash.
Definition: CaloCellContainer.cxx:363