3 #include "GaudiKernel/IMessageSvc.h"
4 #include "GaudiKernel/ISvcLocator.h"
5 #include "GaudiKernel/Bootstrap.h"
9 : AsgMessaging(
"PFSubtractionEnergyRatioCalculator")
14 const std::vector<std::pair<xAOD::CaloCluster*, bool>>&
15 clusterSubtractionList,
16 std::map<xAOD::CaloCluster*, double>& clusterEnergyMap,
17 std::vector<std::pair<float, float>>& clusterSubtractedEnergyRatios)
const
22 for (
auto thisCluster: clusterSubtractionList) {
23 ATH_MSG_DEBUG(
"Cluster energies are " << thisCluster.first->e() <<
" and " << clusterEnergyMap[thisCluster.first]);
29 if (std::abs(thisCluster.first->e() - clusterEnergyMap[thisCluster.first]) > 0.0001) {
30 if ( clusterEnergyMap[thisCluster.first] > 0) {
31 ATH_MSG_DEBUG(
"Subtracted energy ratio is " << thisCluster.first->e()/clusterEnergyMap[thisCluster.first]);
32 clusterSubtractedEnergyRatios.emplace_back(std::pair(thisCluster.first->e()/clusterEnergyMap[thisCluster.first],clusterEnergyMap[thisCluster.first]-thisCluster.first->e()));
36 ATH_MSG_DEBUG(
"Subtracted energy ratio is " << thisCluster.first->e()/0.0001);
37 clusterSubtractedEnergyRatios.emplace_back(std::pair(thisCluster.first->e()/0.0001,clusterEnergyMap[thisCluster.first]-thisCluster.first->e()));
42 clusterSubtractedEnergyRatios.emplace_back(NAN,NAN);
50 const std::vector<std::pair<xAOD::CaloCluster*, bool>>&
51 clusterSubtractionList,
52 std::map<xAOD::CaloCluster*, double>& clusterEnergyMap,
53 std::vector<std::pair<float, float>>& clusterSubtractedEnergyRatios)
const
56 ATH_MSG_DEBUG(
"Setting subtracted energy ratios for annih here");
58 for (
auto thisCluster: clusterSubtractionList) {
59 ATH_MSG_DEBUG(
"Cluster energies are " << thisCluster.first->e() <<
" and " << clusterEnergyMap[thisCluster.first]);
66 if (0 != clusterEnergyMap[thisCluster.first]) {
69 clusterSubtractedEnergyRatios.emplace_back(std::pair(0,clusterEnergyMap[thisCluster.first]));
73 clusterSubtractedEnergyRatios.emplace_back(NAN,NAN);