|
ATLAS Offline Software
|
#include <PFClusterSelectorTool.h>
Definition at line 16 of file PFClusterSelectorTool.h.
◆ PFClusterSelectorTool()
PFClusterSelectorTool::PFClusterSelectorTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~PFClusterSelectorTool()
PFClusterSelectorTool::~PFClusterSelectorTool |
( |
| ) |
|
|
inline |
◆ execute()
Definition at line 32 of file PFClusterSelectorTool.cxx.
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);
70 std::string::size_type
pos = decorHandleName.find(
".");
71 std::string decorName = decorHandleName.substr(
pos+1);
74 accessor(*theCaloClusterContainer[iCluster]) =
accessor(*caloClustersReadHandle->at(iCluster));
78 theEFlowRecClusterContainer.
push_back(std::move(thisEFRecCluster));
81 return StatusCode::SUCCESS;
◆ finalize()
StatusCode PFClusterSelectorTool::finalize |
( |
| ) |
|
◆ initialize()
StatusCode PFClusterSelectorTool::initialize |
( |
| ) |
|
◆ retrieveLCCalCellWeight()
for EM mode, LC weight for cells are retrieved before doing any subtraction; they will be used after subtraction
Definition at line 89 of file PFClusterSelectorTool.cxx.
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");
◆ m_caloCalClustersReadHandleKey
Initial value:{
this,
"calClustersName",
"CaloCalTopoClusters",
"ReadHandleKey for the CaloClusterContainer, at LC scale, to be used as "
"input"
}
ReadHandleKey for the CaloClusterContainer, at LC scale, to be used as input.
Definition at line 50 of file PFClusterSelectorTool.h.
◆ m_caloClusterReadDecorHandleKeyNLeadingTruthParticles
◆ m_caloClustersReadHandleKey
Initial value:{
this,
"clustersName",
"CaloTopoClusters",
"ReadHandleKey for the CaloClusterContainer to be used as input"
}
ReadHandleKey for the CaloClusterContainer to be used as input.
Definition at line 41 of file PFClusterSelectorTool.h.
◆ m_caloMgrKey
Initial value:{
this,
"CaloDetDescrManager",
"CaloDetDescrManager",
"SG Key for CaloDetDescrManager in the Condition Store"
}
ReadCondHandleKey for CaloDetDescrManager.
Definition at line 62 of file PFClusterSelectorTool.h.
The documentation for this class was generated from the following files:
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
Helper class to provide type-safe access to aux data.
const T * get(size_type n) const
Access an element, as an rvalue.
const std::string & key() const
Return the StoreGate ID for the referenced object.
weight_t weight() const
Accessor for weight associated to this cell.
Description of a calorimeter cluster.
void setCellsWeight(std::map< IdentifierHash, double > &&cellsWeight)
Helper class for offline cell identifiers.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ElementLink implementation for ROOT usage.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
Data object for each calorimeter readout cell.
#define ATH_MSG_WARNING(x)
const CaloCell_ID * getCaloCell_ID() const
get calo cell ID helper
const T * at(size_type n) const
Access an element, as an rvalue.
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
void setClusterId(int clusterId)