20 const std::string& name,
21 const IInterface* parent)
26 declareInterface<CaloClusterCollectionProcessor>(
this);
35 return StatusCode::SUCCESS;
44 ATH_MSG_ERROR(
"A null collection was passed, which should never happen");
45 return StatusCode::FAILURE;
64 for (
const auto* cluster : *inputClusters) {
75 if (!cluster->inBarrel() && !cluster->inEndcap()) {
83 sam = CaloSampling::EME2;
88 auto eta = cluster->etaSample(sam);
89 auto phi = cluster->phiSample(sam);
91 if ((
eta == 0. &&
phi == 0.) || std::abs(
eta) > 100) {
100 int sampling_or_module = 0;
114 <<
" phi = " <<
phi);
120 auto deta = dde->
deta();
121 auto dphi = dde->
dphi();
129 calc.fill(*calodetdescrmgr, cellcoll.
ptr(), cluster->etaSample(sam),
132 if (
sc.isFailure()) {
136 double etamax = calc.etarmax();
137 double phimax = calc.phirmax();
153 if (cluster->inBarrel()) {
158 if (cluster->eSample(CaloSampling::EME2) <= 0 &&
159 cluster->eSample(CaloSampling::FCAL0) <= 0){
167 sam = CaloSampling::EME2;
171 auto eta = cluster->etaSample(sam);
172 auto phi = cluster->phiSample(sam);
174 if ((
eta == 0. &&
phi == 0.) || std::abs(
eta) > 100) {
176 <<
eta <<
" phi = " <<
phi <<
" Eeme2 = "
177 << cluster->eSample(CaloSampling::EME2) <<
" Efcal = "
178 << cluster->eSample(CaloSampling::FCAL0));
185 int sampling_or_module = 0;
195 subcalo, sampling_or_module, emec,
eta,
phi);
200 <<
" phi = " <<
phi);
206 auto deta = dde->
deta();
207 auto dphi = dde->
dphi();
221 StatusCode
sc = calc.fill(
222 *calodetdescrmgr, cellcoll.
ptr(), cluster->etaSample(sam),
226 if (
sc.isFailure()) {
230 double etamax = calc.etarmax();
231 double phimax = calc.phirmax();
236 std::map<CaloSampling::CaloSample, double> caloSamV;
238 caloSamV[CaloSampling::FCAL0] =
m_drFWD;
241 caloSamV[CaloSampling::EME1] =
m_drEM;
243 caloSamV[CaloSampling::FCAL0] =
m_drFWD;
245 caloSamV[CaloSampling::EME2] =
m_drFWD;
249 if (!caloSamV.empty()) {
252 std::vector<const CaloCell*> cells;
255 for (
auto s : caloSamV) {
256 myList.
select(cluster->etaSample(sam), cluster->phiSample(sam),
258 cells.insert(cells.end(), myList.
begin(), myList.
end());
260 for (
const auto* cell : cells) {
261 if (!cell || !cell->caloDDE()) {
264 int index = cellcoll.
ptr()->findIndex(cell->caloDDE()->calo_hash());
273 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.
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
list_iterator end() const
void select(double eta, double phi, double deta, double dphi)
list_iterator begin() const
CaloCell_Base_ID::SUBCALO SUBCALO
CaloSampling::CaloSample CaloSample
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...
Object reference supporting deferred reading from StoreGate.
const_pointer_type ptr()
Dereference the pointer.
virtual StatusCode initialize() override final
initialize method
Gaudi::Property< double > m_neta
Gaudi::Property< double > m_nphi
Gaudi::Property< bool > m_addCellsFromOtherSamplings
Et cut on input forward clusters to produce large clusters.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
Gaudi::Property< double > m_netaFWD
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *collection) const override final
execute on container
Gaudi::Property< double > m_nphiFWD
Gaudi::Property< double > m_centEtThr
Et cut on input central clusters to produce large clusters.
Gaudi::Property< double > m_fwdEtThr
Et cut on input forward clusters to produce large clusters.
egammaLargeClusterMaker(const std::string &type, const std::string &name, const IInterface *parent)
@bried constructor
Gaudi::Property< double > m_drEM
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_inputClusterCollection
The name of the cluster container for electrons and photons.
Gaudi::Property< double > m_drFWD
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
Cell container.
Gaudi::Property< bool > m_isFWD
do FWD cell
void setClusterSize(const ClusterSize)
Get cluster size.
void setPhi0(flt_t)
Set raw of cluster seed.
bool addCell(const unsigned index, const double weight)
Method to add a cell to the cluster (Beware: Kinematics not updated!)
bool inBarrel(const xAOD::CaloCluster &cluster, int is)
return boolean to know if we are in barrel/end-cap
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.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.