22 {
23
24 SG::ReadHandle<std::map<Identifier,std::vector<const CaloCalibrationHit*> > >
26
27 if (!mapIdentifierToCalibHitsReadHandle.isValid()) {
28 ATH_MSG_WARNING(
"Could not retrieve map between Identifier and calibraiton hits from Storegae");
29 return StatusCode::FAILURE;
30 }
31
33 std::vector<std::pair<unsigned int, double> > >
34 caloClusterWriteDecorHandleNLeadingTruthParticles(
36
37 for (const auto* thisCaloCluster : *caloClusterWriteDecorHandleNLeadingTruthParticles) {
38
39 std::vector<std::pair<unsigned int, double> > newTruthIDTruthPairs;
40
43 *thisCaloCluster,
45 *mapIdentifierToCalibHitsReadHandle,
46 newTruthIDTruthPairs));
47
48 for (const auto& thisPair : newTruthIDTruthPairs) {
50 "Cluster Final loop: Particle with truthID " << thisPair.first
51 << " has truth energy of " << thisPair.second
52 << " for cluster with e, eta " << thisCaloCluster->e()
53 << " and " << thisCaloCluster->eta());
54 }
55
56 caloClusterWriteDecorHandleNLeadingTruthParticles(*thisCaloCluster)
57 = std::move(newTruthIDTruthPairs);
58 }
59
60 return StatusCode::SUCCESS;
61}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.