11 base_class(
type, name, parent)
28 return StatusCode::SUCCESS;
40 if (!caloClustersReadHandle.
isValid()){
41 ATH_MSG_WARNING(
" Invalid ReadHandle for xAOD::CaloCluster with key: " << caloClustersReadHandle.
key());
42 return StatusCode::SUCCESS;
48 calclusters = caloCalClustersReadHandle.
get();
55 unsigned int nClusters = caloClustersReadHandle->size();
56 for (
unsigned int iCluster = 0; iCluster < nClusters; ++iCluster) {
61 std::map<IdentifierHash,double> cellsWeightMap;
62 retrieveLCCalCellWeight(caloClustersReadHandle->at(iCluster)->e(), iCluster, cellsWeightMap, *calclusters,**caloMgrHandle);
64 thisEFRecCluster->setCellsWeight(std::move(cellsWeightMap));
70 std::string::size_type pos = decorHandleName.find(
".");
71 std::string decorName = decorHandleName.substr(pos+1);
74 accessor(*theCaloClusterContainer[iCluster]) = accessor(*caloClustersReadHandle->at(iCluster));
77 thisEFRecCluster->setClusterId(iCluster);
78 theEFlowRecClusterContainer.
push_back(std::move(thisEFRecCluster));
81 return StatusCode::SUCCESS;
85 return StatusCode::SUCCESS;
91 const unsigned&
index,
92 std::map<IdentifierHash, double>& cellsWeight,
102 if (matchedCalCluster){
103 if (!(fabs(energy - matchedCalCluster->
rawE()) < 0.001)) {
104 matchedCalCluster =
nullptr;
105 for (
const auto *iCalCalCluster : caloCalClustersContainer) {
106 matchedCalCluster = iCalCalCluster;
107 if (fabs(energy - matchedCalCluster->
rawE()) < 0.001) {
111 if (!matchedCalCluster)
ATH_MSG_WARNING(
"Invalid pointer to matched cluster - failed to find cluster match");
113 if (not matchedCalCluster){
114 throw std::runtime_error(
"matchedCluster is a null pointer in PFClusterSelectorTool::retrieveLCCalCellWeight");
120 for (; itCell != endCell; ++itCell) {
124 cellsWeight[myHashId] = itCell.
weight();
126 }
else ATH_MSG_WARNING(
"Invalid pointer to matched cluster - could not look up local hadron cell weights");
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
Helper class for offline cell identifiers.
Data object for each calorimeter readout cell.
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
weight_t weight() const
Accessor for weight associated to this cell.
This class provides the client interface for accessing the detector description information common to...
const CaloCell_ID * getCaloCell_ID() const
get calo cell ID helper
const T * at(size_type n) const
Access an element, as an rvalue.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
ElementLink implementation for ROOT usage.
This is a "hash" representation of an Identifier.
SG::Accessor< T, ALLOC > Accessor
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
CaloClusterCellLink::const_iterator const_cell_iterator
Iterator of the underlying CaloClusterCellLink (explicitly 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.