27#include "CaloEvent/CaloClusterContainer.h"
38 const std::string& name,
39 const IInterface* parent)
53 std::map<IdentifierHash,double> WeightMap;
56 for (
const CaloCell* cell : *cluster) {
58 WeightMap[myHashId] += cell->e();
65 for( ;cellIter!=cellIterEnd;cellIter++) {
68 double WEIGHT=(cell->e())/WeightMap[myHashId];
74 return StatusCode::SUCCESS;
Data object for each calorimeter readout cell.
void reweight(const weight_t newWeight)
Update the weight.
static void calculateKine(xAOD::CaloCluster *clu, const bool useweight=true, const bool updateLayers=true, const bool useGPUCriteria=false)
Helper class to calculate cluster kinematics based on cells.
CaloComputeSWcellWeights(const std::string &type, const std::string &name, const IInterface *parent)
StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *clusColl) const override
Execute on an entire collection of clusters.
This is a "hash" representation of an Identifier.
CaloClusterCellLink::iterator cell_iterator
Iterator of the underlying CaloClusterCellLink (non-const version)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.