|
ATLAS Offline Software
|
Go to the documentation of this file.
18 return StatusCode::SUCCESS;
27 for (
auto thisFE : *pfoWriteDecorHandle){
31 if (not thisCaloCluster){
32 ATH_MSG_ERROR(
"Dynamic cast failed in PFlowCalibPFODecoratorAlgorithm::LinkCalibHitPFO");
33 return StatusCode::FAILURE;
35 std::vector<std::pair<unsigned int, double > > newBarCodeTruthPairs;
37 if (
sc == StatusCode::FAILURE)
return sc;
39 for (
const auto& thisPair : newBarCodeTruthPairs)
ATH_MSG_DEBUG(
"Cluster Final loop: Particle with barcode " << thisPair.first <<
" has truth energy of " << thisPair.second <<
" for cluster with e, eta " << thisCaloCluster->e() <<
" and " << thisCaloCluster->eta());
41 pfoWriteDecorHandle(*thisFE) = newBarCodeTruthPairs;
43 return StatusCode::SUCCESS;
49 if(!mapIdentifierToCalibHitsReadHandle.
isValid()){
50 ATH_MSG_WARNING(
"Could not retrieve map between Identifier and calibraiton hits from Storegate");
51 return StatusCode::FAILURE;
58 pfoWriteDecorHandleNLeadingTruthParticles,
59 mapIdentifierToCalibHitsReadHandle));
61 return StatusCode::SUCCESS;
65 return StatusCode::SUCCESS;
StatusCode LinkCalibHitPFO(SG::WriteDecorHandle< xAOD::FlowElementContainer, std::vector< std::pair< unsigned int, double > > > &pfoWriteDecorHandle, SG::ReadHandle< std::map< Identifier, std::vector< const CaloCalibrationHit * > > > &CalibHitHandle) const
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< std::map< Identifier, std::vector< const CaloCalibrationHit * > > > m_mapIdentifierToCalibHitsReadHandleKey
ReadHandleKey for the map between Identifiers and sets of calibration hits.
Class providing the definition of the 4-vector interface.
ToolHandle< ICaloCalibClusterTruthAttributerTool > m_truthAttributerTool
ToolHandle to a tool to create the calibration hit truth information that we need for the decoration.
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_pfoWriteDecorHandleKeyNLeadingTruthParticles
Write handle key to decorate PFO with threeN leading truth particle barcode and energy.
Description of a calorimeter cluster.
Gaudi::Property< unsigned int > m_numTruthParticles
Allow user to set the number of truth particles per clusterCaloCluster or PFO, in descending pt order...
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
Handle class for adding a decoration to an object.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual StatusCode initialize() override
#define ATH_MSG_WARNING(x)
virtual StatusCode finalize() override