Applies ML corrections to PFO ML corrections are stored in linked CaloClusters as decorations.
More...
#include <NeutralPFOClusterMLCorrectionTool.h>
Applies ML corrections to PFO ML corrections are stored in linked CaloClusters as decorations.
The correction is applied as a scale factor to the PFO.
Definition at line 29 of file NeutralPFOClusterMLCorrectionTool.h.
◆ NeutralPFOClusterMLCorrectionTool()
| NeutralPFOClusterMLCorrectionTool::NeutralPFOClusterMLCorrectionTool |
( |
const std::string & | type, |
|
|
const std::string & | name, |
|
|
const IInterface * | parent ) |
◆ ~NeutralPFOClusterMLCorrectionTool()
| virtual NeutralPFOClusterMLCorrectionTool::~NeutralPFOClusterMLCorrectionTool |
( |
| ) |
|
|
virtualdefault |
◆ correctContainer()
Definition at line 22 of file NeutralPFOClusterMLCorrectionTool.cxx.
23{
24
26 if (!clusterMLReadHandle.isValid()) {
27 throw std::runtime_error("Invalid decoration handle: " +
29 }
30
33}
FlowElement_v1 FlowElement
Definition of the current "pfo version".
◆ correctNeutralFlowElement()
Definition at line 36 of file NeutralPFOClusterMLCorrectionTool.cxx.
37{
38
39
40
41 if (neutral_pfo.isCharged())
42 {
43 throw std::runtime_error("Charged FlowElement found in neutral FlowElementContainer with index " + std::to_string(neutral_pfo.index()));
44 }
46 if (cls == nullptr)
47 { return; }
48
49 const double cluster_EM_energy =
cls->rawE();
50
53 if (apply_ML_correction)
54 {
55 const double cluster_ML_energy = clusterMLReadHandle(*cls);
56 neutral_pfo.setP4(cluster_ML_energy / cosh(neutral_pfo.eta()), neutral_pfo.eta(), neutral_pfo.phi(), neutral_pfo.m());
57 }
58
59}
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
◆ getLinkedCluster()
Definition at line 62 of file NeutralPFOClusterMLCorrectionTool.cxx.
63{
64
65
66
67 const std::vector<ElementLink<xAOD::IParticleContainer>> &otherObjectLinks = neutral_pfo.otherObjectLinks();
68 if (otherObjectLinks.size() > 1)
69 throw std::runtime_error("NeutralPFOClusterMLCorrectionTool: Multiple links found for neutral FlowElement with index " + std::to_string(neutral_pfo.index()));
70
71 bool hasValidLink = !otherObjectLinks.empty() && otherObjectLinks[0].isValid();
72 if (!hasValidLink)
73 { return nullptr; }
74
76 throw std::runtime_error("NeutralPFOClusterMLCorrectionTool: Link for neutral FlowElement with index " + std::to_string(neutral_pfo.index()) + " is not of type CaloCluster");
77
79}
@ CaloCluster
The object is a calorimeter cluster.
◆ initialize()
| StatusCode NeutralPFOClusterMLCorrectionTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ m_clusterMLCorrectedEnergyKey
Initial value:{
this,
"ClusterMLCorrectedEnergyDecorationKey",
"CaloCalTopoClusters.clusterE_ML",
"Decoration storing ML-corrected cluster energy"
}
Definition at line 40 of file NeutralPFOClusterMLCorrectionTool.h.
40 {
41 this,
42 "ClusterMLCorrectedEnergyDecorationKey",
43 "CaloCalTopoClusters.clusterE_ML",
44 "Decoration storing ML-corrected cluster energy"
45 };
◆ m_max_allowed_charged_correction_fraction
| Gaudi::Property<float> NeutralPFOClusterMLCorrectionTool::m_max_allowed_charged_correction_fraction {this, "MaxAllowedChargedCorrectionFraction", 0.001, "ClusterML correction will be applied only if |npfo_E - cls_EM_E| <= |MaxAllowedChargedCorrectionFraction * cls_EM_E|"} |
|
private |
Definition at line 47 of file NeutralPFOClusterMLCorrectionTool.h.
47{this, "MaxAllowedChargedCorrectionFraction", 0.001, "ClusterML correction will be applied only if |npfo_E - cls_EM_E| <= |MaxAllowedChargedCorrectionFraction * cls_EM_E|"};
◆ m_min_allowed_em_energy
| Gaudi::Property<float> NeutralPFOClusterMLCorrectionTool::m_min_allowed_em_energy {this,"MinAllowedEMEnergyMeV", 300, "Minimum allowed energy in MeV of matched cluster at EM scale. ClusterML correction will not be applied below this limit."} |
|
private |
Definition at line 48 of file NeutralPFOClusterMLCorrectionTool.h.
48{this,"MinAllowedEMEnergyMeV", 300, "Minimum allowed energy in MeV of matched cluster at EM scale. ClusterML correction will not be applied below this limit."};
The documentation for this class was generated from the following files: