47#include "GaudiKernel/IChronoStatSvc.h"
56 ISvcLocator* pSvcLocator)
100 ATH_MSG_ERROR(
"Failed to retrieve essential tower maker tool"
109 ATH_MSG_ERROR(
"Failed to retrieve requested tower correction tools "
112 ATH_MSG_DEBUG(
"Successfully retrieved tower correction tools "
126 msg(MSG::INFO) <<
"Will use ChronoStatSvc to monitor ClusterMaker and ClusterCorrection tools" <<
endmsg;
140 return StatusCode::SUCCESS;
146 return StatusCode::SUCCESS;
158 std::string chronoName(this->name()+std::string(
"_"));
167 fClus->setRawE (fClus->e() );
168 fClus->setRawEta(fClus->eta());
169 fClus->setRawPhi(fClus->phi());
170 fClus->setRawM (fClus->m() );
181 std::unique_ptr<CaloCellClusterWeights> cellWeights=std::make_unique<CaloCellClusterWeights>(
m_caloCellID->calo_cell_hash_max());
188 fClus->setRawE (fClus->e() );
189 fClus->setRawEta(fClus->eta());
190 fClus->setRawPhi(fClus->phi());
191 fClus->setRawM (fClus->m() );
206 ATH_MSG_DEBUG(
"Created tower container (of type xAOD::CaloClusterContainer) with " << clusColl->size() <<
" towers");
208 ATH_CHECK( cellLinks.
record (std::make_unique<CaloClusterCellLinkContainer>()) );
210 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
Helpers for checking error return status codes and reporting errors.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
An algorithm that can be simultaneously executed in multiple threads.
static void finalizeClusters(const EventContext &ctx, SG::WriteHandle< xAOD::CaloClusterContainer > &outClusterContainer, SG::WriteHandle< CaloClusterCellLinkContainer > &outClusterContainerCellLink)
Finalize clusters (move CaloClusterCellLink to a separate container).
static StatusCode AddContainerWriteHandle(SG::WriteHandle< xAOD::CaloClusterContainer > &clusColl)
Creates a new xAOD::CaloClusterContainer in the given WriteHandle + CaloClusterAuxContainer and recor...
ToolHandle< CaloTowerCollectionProcessor > m_towerCalibratorTool
Tower calibrator(s).
virtual ~CaloTopoTowerMaker() override
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_towerOutput
the name of the key in StoreGate for the output CaloClusterContainer
ToolHandle< CaloTowerCollectionProcessor > m_towerMakerTool
Tower makers.
const CaloCell_ID * m_caloCellID
Identifier helper.
bool m_useLCWCalibration
Use LCW calibration for topo-towers (default is true).
virtual StatusCode initialize() override
SG::WriteHandleKey< CaloClusterCellLinkContainer > m_towerCellLinkOutput
the name of the key in StoreGate for the output CaloClusterCellLinkContainer
const std::string & getOutputContainerName() const
CaloTopoTowerMaker(const std::string &name, ISvcLocator *pSvcLocator)
ToolHandleArray< CaloClusterCollectionProcessor > m_towerCorrectionTools
Tower (cluster) moment makers.
virtual StatusCode finalize() override
bool m_chronoTools
Use ChronotStatSvc to monitor each tool.
virtual StatusCode execute(const EventContext &ctx) const override
bool m_saveSignalState
Keep the individual results of each correction.
ServiceHandle< IChronoStatSvc > m_chrono
Handle to the ChronoStatSvc.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.