3#ifndef CALOREC_CALOTOPOTOWERFROMCLUSTERMAKER_H
4#define CALOREC_CALOTOPOTOWERFROMCLUSTERMAKER_H
10#include "GaudiKernel/ServiceHandle.h"
22#include "CaloGeoHelpers/CaloSampling.h"
33#ifndef _CALOTOPOTOWERFROMCLUSTERMAKER_BITSET_SIZE
34#define _CALOTOPOTOWERFROMCLUSTERMAKER_BITSET_SIZE 28
46 virtual StatusCode
execute(
const EventContext& ctx,
49 virtual StatusCode
finalize()
override;
Base class for cluster processing tools called from CaloClusterMaker.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Hash lookup of calibration weights for calorimeter cells.
Container class for CaloCell.
Data object for each calorimeter readout cell.
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
This class provides the client interface for accessing the detector description information common to...
static const double m_energyThresholdDef
Default energy threshold.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
double m_clusterRange
Range where topo-clusters are used when m_buildCombinedSignal = true
static const double m_clusterRangeDef
Default cluster range.
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *pClusCont, CaloCellClusterWeights *cellWeights) const override
Execute the tool and fill the xAOD::CaloClusterContainer pointed to by pClusCont.
uint_t m_numberOfSamplings
Number of samplings.
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
Calorimeter cell container.
bool checkCellIndices(const CaloTowerGeometry *towerGeo, const CaloDetDescrManager *caloDDM, const CaloCellContainer *pCellCont) const
Checks consistency between cell indices and hash identifiers.
bool m_buildCombinedSignal
Build topo-clusters within given range, else topo-towers.
uint_t badIndexValue() const
Returns value indicating a bad index.
static const uint_t m_errorValueUINT
Error value for uint_t type values.
double m_energyThreshold
Cell energy threshold, default is set in m_energyThresholdDef.
std::bitset< _CALOTOPOTOWERFROMCLUSTERMAKER_BITSET_SIZE > m_excludedSamplingsPattern
Bit pattern indicates if sampling is excluded.
std::vector< std::string > m_excludedSamplingsName
List of excluded samplings (human-readable names)
bool addCellToProtoCluster(const CaloTowerGeometry *towerGeo, const CaloCell *cptr, protocont_t &pProtoCont, double weight=1.) const
Adding cells to proto-clusters.
bool m_useCellsFromClusters
Use cells from topo-clusters if true, else use all cells, default is true.
std::vector< CaloProtoCluster > protocont_t
Container for CaloProtoCluster objects.
static xAOD::CaloCluster::ClusterSize getClusterSize(uint_t etaBins, uint_t phiBins)
Returns a cluster size tag from number of eta and phi bins in tower grid.
bool m_prepareLCW
Prepare LCW calibration, default is false.
bool m_doCellIndexCheck
Check cell hash index consistency if true (default false)
uint_t buildInclTowers(const CaloTowerGeometry *towerGeo, const CaloCellContainer &pCellCont, protocont_t &pProtoCont) const
Inclusive towers.
std::vector< CaloSampling::CaloSample > m_excludedSamplings
List of excluded samplings (CaloSampling::CaloSample enumerators)
bool isValidIndex(uint_t idx) const
Checks if argument is a valid index value.
bool m_removeSamplingData
Remove sampling data for towers.
CaloTopoTowerFromClusterMaker(const std::string &type, const std::string &name, const IInterface *pParent)
Tool constructor.
uint_t buildExclTowers(const CaloTowerGeometry *towerGeo, const CaloCellContainer &pCellCont, protocont_t &pProtoCont) const
Exclusive towers.
uint_t buildLCWTopoTowers(const CaloTowerGeometry *towerGeo, const xAOD::CaloClusterContainer &clusCont, protocont_t &protoCont, CaloCellClusterWeights *cellWeights) const
LCW topo-towers.
std::size_t uint_t
Unsigned integral type.
bool m_applyCellEnergyThreshold
Apply cell energy threshold, default is false.
SG::ReadCondHandleKey< CaloTowerGeometry > m_towerGeoKey
the name of the key of the CaloTowerGeometry object in the ConditonsStore
virtual StatusCode initialize() override
Setting up the operational mode and corresponding parameters.
virtual StatusCode finalize() override
Finalize the tool (no action)
static bool filterProtoCluster(const CaloClusterCellLink &clnk)
Checks for and removes invalid cell links.
uint_t buildEMTopoTowers(const CaloTowerGeometry *towerGeo, const xAOD::CaloClusterContainer &clusCont, protocont_t &protoCont) const
EM topo-towers.
bool m_orderByPt
Orders cluster container by , default true.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterContainerKey
Topo-cluster container key.
int cleanupCells(const CaloTowerGeometry *towerGeo, CaloClusterCellLink *clk, uint_t nclus) const
Checks CaloClusterCellLink for consistency.
Retrieve the list of towers associated with a calorimeter cell referenced by its hash identifier.
Property holding a SG store/key/clid from which a ReadHandle is made.
ClusterSize
Enumeration to identify different cluster sizes.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.