9#include "CaloDetDescr/CaloDetDescrElement.h"
19#include <GaudiKernel/ThreadLocalContext.h>
23 const std::string& name,
24 const IInterface* parent)
26 declareInterface<IegammaLargeClusterCellRecoveryTool>(
this);
30 ATH_MSG_DEBUG(
"Initializing egammaLargeClusterCellRecoveryTool");
36 return StatusCode::SUCCESS;
46 ATH_MSG_DEBUG(
"Cluster Et below threshold for large cluster recovery: " << cluster->
et());
47 return StatusCode::SUCCESS;
51 ATH_MSG_DEBUG(
"Cluster not in EMB or EMEC, skipping large cluster recovery.");
52 return StatusCode::SUCCESS;
59 sam = CaloSampling::EME2;
66 if ((
eta == 0. &&
phi == 0.) || std::abs(
eta) > 100) {
69 return StatusCode::SUCCESS;
75 int sampling_or_module = 0;
89 return StatusCode::SUCCESS;
93 auto deta = dde->
deta();
94 auto dphi = dde->
dphi();
102 calc.fill(*cmgr, cell_container, cluster->
etaSample(sam),
106 if (
sc.isFailure()) {
108 return StatusCode::SUCCESS;
110 double etamax = calc.etarmax();
111 double phimax = calc.phirmax();
114 std::unique_ptr<xAOD::CaloCluster> largeCluster =
123 return StatusCode::SUCCESS;
127 if (largeCluster->size() == 0) {
129 return StatusCode::SUCCESS;
134 for (
const CaloCell* cell : *largeCluster) {
135 info.cells711.push_back(cell);
138 return StatusCode::SUCCESS;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Definition of CaloDetDescrManager.
Calculate total energy, position, etc. for a given layer of a cluster.
Container class for CaloCell.
CaloCell_Base_ID::SUBCALO SUBCALO
CaloSampling::CaloSample CaloSample
Data object for each calorimeter readout cell.
static std::unique_ptr< xAOD::CaloCluster > makeCluster(const CaloCellContainer *cellCont)
Creates a valid CaloCluster with a private Aux-Store and CellLink container.
This class groups all DetDescr information related to a CaloCell.
float dphi() const
cell dphi
float deta() const
cell deta
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
static void decode_sample(CaloCell_ID::SUBCALO &subCalo, bool &barrel, int &sampling_or_module, CaloCell_ID::CaloSample sample)
translate between the 2 ways to label a sub-detector:
This class provides the client interface for accessing the detector description information common to...
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
bool inBarrel() const
Returns true if at least one clustered cell in the barrel.
bool inEndcap() const
Returns true if at least one clustered cell in the endcap.
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
bool inBarrel(const xAOD::CaloCluster &cluster, int is)
return boolean to know if we are in barrel/end-cap
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.