9#include <CLHEP/Units/SystemOfUnits.h>
16 const std::string& name,
17 const IInterface* parent) :
18 base_class(
type, name, parent)
42 return StatusCode::SUCCESS;
47 return StatusCode::SUCCESS;
65 const double eta2 = std::abs(cluster->
etaBE(2));
82 constexpr double EM2ENERGY_CUT = 50 * MeV;
83 if (cluster->
energyBE(2) < EM2ENERGY_CUT){
89 const double emFrac = acc.isAvailable(*cluster) ? acc(*cluster) : 0.;
90 const double EMEnergy = cluster->
e() * emFrac;
91 double EMEt = EMEnergy / std::cosh(eta2);
106 ATH_MSG_DEBUG(
"Cluster failed EM Fraction cut: don't make ROI");
118 if (
sc.isFailure()) {
122 if (info.e277<0 || info.e237<0) {
126 if (info.e277 != 0. && info.e237/info.e277 <
m_RetaCut) {
136 if (
sc.isFailure() ) {
140 const double ethad1 = info.ethad1;
141 const double ethad = info.ethad;
142 const double raphad1 = EMEt != 0. ? ethad1 / EMEt : 0.;
143 const double raphad = EMEt != 0. ? ethad / EMEt : 0.;
144 if (eta2 >= 0.8 && eta2 < 1.37) {
146 ATH_MSG_DEBUG(
"Cluster failed Hadronic Leakage test: dont make ROI");
151 ATH_MSG_DEBUG(
"Cluster failed Hadronic Leakage test: dont make ROI");
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Definition of CaloDetDescrManager.
This class provides the client interface for accessing the detector description information common to...
SG::ConstAccessor< T, ALLOC > ConstAccessor
ToolHandle< IegammaIso > m_HadronicLeakageTool
Tool for hadronic leakage calculation; onlud used if cuts needing are defined.
Gaudi::Property< double > m_RetaCut
virtual StatusCode initialize() override final
Gaudi::Property< double > m_EMEtSplittingFraction
virtual StatusCode finalize() override final
Gaudi::Property< double > m_HadLeakCut
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
Name of the cluster intput collection.
static constexpr double HAD_LEAK_DEFAULT_NO_CUT
egammaCaloClusterSelector(const std::string &type, const std::string &name, const IInterface *parent)
ToolHandle< IegammaCheckEnergyDepositTool > m_egammaCheckEnergyDepositTool
Pointer to the egammaCheckEnergyDepositTool.
bool passSelection(const xAOD::CaloCluster *cluster, const CaloDetDescrManager &cmgr) const override final
pass the selection described in the class egammaCaloClusterSelector
Gaudi::Property< double > m_EMEtCut
Gaudi::Property< double > m_EMFCut
static constexpr double RETA_DEFAULT_NO_CUT
Gaudi::Property< double > m_ClusterEtCut
virtual double e() const
The total energy of the particle.
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 energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
bool isFCAL(const xAOD::CaloCluster *cluster)
return true if the cluster (or the majority of its energy) is in the FCAL0
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
static StatusCode execute(const xAOD::CaloCluster &cluster, const CaloDetDescrManager &cmgr, const CaloCellContainer &cell_container, Info &info, bool doRetaOnly=false)