33 return StatusCode::SUCCESS;
47 if(!clusters.isValid()){
49 return StatusCode::SUCCESS;
63 <<
" ===> cells cannot be written in AOD as requested ! " );
70 <<
" which is different from the cell container being thinned: "
71 <<
m_cells.key() <<
"; cluster skipped.");
79 for (; it != end; ++it) {
80 if (it.index() >= cells->size()) {
82 <<
" is larger than the number of cells in "
83 <<
m_cells.key() <<
" (" << cells->size() <<
")" );
86 cells.keep (it.index());
91 double eta = clust->eta();
92 double phi = clust->phi();
93 double deta = clust->getClusterEtaSize() * 0.025;
94 double dphi = clust->getClusterPhiSize() * 0.025;
101 <<
", size of list = " << cell_list.
ncells()
104 <<
", deta = " << deta
105 <<
", dphi = " << dphi );
107 for (
const CaloCell* cell : cell_list) {
109 int index = cells->findIndex (cellHash);
112 <<
" not found in cell container "
122 return StatusCode::SUCCESS;
133 if (samp == CaloSampling::Unknown) {
135 <<
" is not a valid Calorimeter sampling name and will be ignored! " );
146 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)
Thin calorimeter cells not associated with clusters.
Handle class for reading from StoreGate.
Handle for requesting thinning for a data object.
void select(double eta, double phi, double deta, double dphi)
Data object for each calorimeter readout cell.
const_iterator to loop over cells belonging to a cluster
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
const_iterator end() const
const end method
const DataLink< CaloCellContainer > & getCellContainerLink() const
const_iterator begin() const
const begin method
This class provides the client interface for accessing the detector description information common to...
static CaloSample getSampling(const std::string &name)
Return the sampling code for a given name.
std::vector< int > m_validSamplings
Decoded list of samplings.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusters
Clusters to read.
SG::ThinningHandleKey< CaloClusterCellLinkContainer > m_clusterCellLinks
Calo Cell links for the clusters we keep cells for.
SG::ThinningHandleKey< CaloCellContainer > m_cells
Cell container to thin.
StringProperty m_streamName
Name of the stream being thinned.
virtual StatusCode initialize() override
Gaudi initialize method.
StatusCode decodeSamplings()
Decode the provided list of calorimeter samplings.
virtual StatusCode execute(const EventContext &ctx) const override
Execute the algorithm.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
StringArrayProperty m_samplingNames
const ID_type & dataID() const
Get the key that we reference, as a string.
This is a "hash" representation of an Identifier.
void keepAll()
Mark that all elements should be kept (not thinned).
Handle for requesting thinning for a data object.
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.