|
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 27 of file PFClusterSelectorTool.cxx.
35 if (!caloClustersReadHandle.isValid()){
36 ATH_MSG_WARNING(
" Invalid ReadHandle for xAOD::CaloCluster with key: " << caloClustersReadHandle.key());
37 return StatusCode::SUCCESS;
43 calclusters = caloCalClustersReadHandle.
get();
50 unsigned int nClusters = caloClustersReadHandle->size();
51 for (
unsigned int iCluster = 0; iCluster < nClusters; ++iCluster) {
56 std::map<IdentifierHash,double> cellsWeightMap;
57 retrieveLCCalCellWeight(caloClustersReadHandle->at(iCluster)->e(), iCluster, cellsWeightMap, *calclusters,**caloMgrHandle);
63 theEFlowRecClusterContainer.
push_back(std::move(thisEFRecCluster));
66 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 74 of file PFClusterSelectorTool.cxx.
87 if (matchedCalCluster){
88 if (!(fabs(
energy - matchedCalCluster->
rawE()) < 0.001)) {
89 matchedCalCluster =
nullptr;
90 for (
const auto *iCalCalCluster : caloCalClustersContainer) {
91 matchedCalCluster = iCalCalCluster;
92 if (fabs(
energy - matchedCalCluster->
rawE()) < 0.001) {
96 if (!matchedCalCluster)
ATH_MSG_WARNING(
"Invalid pointer to matched cluster - failed to find cluster match");
98 if (not matchedCalCluster){
99 throw std::runtime_error(
"matchedCluster is a null pointer in PFClusterSelectorTool::retrieveLCCalCellWeight");
105 for (; itCell != endCell; ++itCell) {
109 cellsWeight[myHashId] = itCell.
weight();
111 }
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_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 59 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
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
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.
const_iterator to loop over cells belonging to a cluster
void setClusterId(int clusterId)