|
ATLAS Offline Software
|
Go to the documentation of this file.
18 return StatusCode::SUCCESS;
24 if(!mapIdentifierToCalibHitsReadHandle.
isValid()){
25 ATH_MSG_WARNING(
"Could not retrieve map between Identifier and calibraiton hits from Storegae");
26 return StatusCode::FAILURE;
32 for (
const auto *thisCaloCluster : *caloClusterWriteDecorHandleNLeadingTruthParticles){
34 std::vector<std::pair<unsigned int, double > > newBarCodeTruthPairs;
36 if (
sc == StatusCode::FAILURE)
return sc;
38 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());
39 caloClusterWriteDecorHandleNLeadingTruthParticles(*thisCaloCluster) = newBarCodeTruthPairs;
42 return StatusCode::SUCCESS;
46 return StatusCode::SUCCESS;
virtual StatusCode finalize() override
ToolHandle< ICaloCalibClusterTruthAttributerTool > m_truthAttributerTool
ToolHandle to a tool to create the calibration hit truth information that we need for the decoration.
virtual StatusCode initialize() override
SG::ReadHandleKey< std::map< Identifier, std::vector< const CaloCalibrationHit * > > > m_mapIdentifierToCalibHitsReadHandleKey
ReadHandleKey for the map between Identifiers and sets of calibration hits.
virtual StatusCode execute(const EventContext &ctx) const override
::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.
Gaudi::Property< unsigned int > m_numTruthParticles
Allow user to set the number of truth particles per clusterCaloCluster or PFO, in descending pt order...
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?
#define ATH_MSG_WARNING(x)
SG::WriteDecorHandleKey< xAOD::CaloClusterContainer > m_caloClusterWriteDecorHandleKeyNLeadingTruthParticles
Write handle key to decorate CaloCluster with threeN leading truth particle barcode and energy.