Applies ML corrections to PFO ML corrections are stored in linked CaloClusters as decorations.
More...
#include <NeutralPFOClusterMLCorrectionTool.h>
|
| Gaudi::Property< std::string > | m_clusterMLCorrectedEnergyKey {this, "ClusterMLCorrectedEnergyDecorationKey", "clusterE_ML", "Name of the decoration storing the ML-corrected cluster energy"} |
| Gaudi::Property< float > | 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|"} |
| Gaudi::Property< float > | 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."} |
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 26 of file NeutralPFOClusterMLCorrectionTool.h.
◆ NeutralPFOClusterMLCorrectionTool()
| NeutralPFOClusterMLCorrectionTool::NeutralPFOClusterMLCorrectionTool |
( |
const std::string & | type, |
|
|
const std::string & | name, |
|
|
const IInterface * | parent ) |
◆ ~NeutralPFOClusterMLCorrectionTool()
| virtual NeutralPFOClusterMLCorrectionTool::~NeutralPFOClusterMLCorrectionTool |
( |
| ) |
|
|
virtualdefault |
◆ correctContainer()
◆ correctNeutralFlowElement()
| void NeutralPFOClusterMLCorrectionTool::correctNeutralFlowElement |
( |
xAOD::FlowElement & | pfo | ) |
const |
|
private |
Definition at line 24 of file NeutralPFOClusterMLCorrectionTool.cxx.
25{
26
27
28
29 if (neutral_pfo.isCharged())
30 {
31 throw std::runtime_error("Charged FlowElement found in neutral FlowElementContainer with index " + std::to_string(neutral_pfo.index()));
32 }
34 if (cls == nullptr)
35 { return; }
36
37 const double cluster_EM_energy =
cls->rawE();
38
41 if (apply_ML_correction)
42 {
44 neutral_pfo.setP4(cluster_ML_energy / cosh(neutral_pfo.eta()), neutral_pfo.eta(), neutral_pfo.phi(), neutral_pfo.m());
45 }
46
47}
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
◆ getClusterMLCorrectedEnergy()
Definition at line 69 of file NeutralPFOClusterMLCorrectionTool.cxx.
70{
72 if (!clusterMLCorrectedEnergyAccessor.isAvailable(cls))
73 {
75 +
"' found for cluster with index " + std::to_string(
cls.index())
76 + ". Returning EM energy.");
77 }
78 return clusterMLCorrectedEnergyAccessor(cls);
79}
SG::Accessor< T, ALLOC > Accessor
◆ getLinkedCluster()
Definition at line 50 of file NeutralPFOClusterMLCorrectionTool.cxx.
51{
52
53
54
55 const std::vector<ElementLink<xAOD::IParticleContainer>> &otherObjectLinks = neutral_pfo.otherObjectLinks();
56 if (otherObjectLinks.size() > 1)
57 throw std::runtime_error("NeutralPFOClusterMLCorrectionTool: Multiple links found for neutral FlowElement with index " + std::to_string(neutral_pfo.index()));
58
59 bool hasValidLink = !otherObjectLinks.empty() && otherObjectLinks[0].isValid();
60 if (!hasValidLink)
61 { return nullptr; }
62
64 throw std::runtime_error("NeutralPFOClusterMLCorrectionTool: Link for neutral FlowElement with index " + std::to_string(neutral_pfo.index()) + " is not of type CaloCluster");
65
67}
@ CaloCluster
The object is a calorimeter cluster.
◆ initialize()
| StatusCode NeutralPFOClusterMLCorrectionTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ m_clusterMLCorrectedEnergyKey
| Gaudi::Property<std::string> NeutralPFOClusterMLCorrectionTool::m_clusterMLCorrectedEnergyKey {this, "ClusterMLCorrectedEnergyDecorationKey", "clusterE_ML", "Name of the decoration storing the ML-corrected cluster energy"} |
|
private |
Definition at line 37 of file NeutralPFOClusterMLCorrectionTool.h.
37{this, "ClusterMLCorrectedEnergyDecorationKey", "clusterE_ML", "Name of the decoration storing the ML-corrected cluster energy"};
◆ 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 38 of file NeutralPFOClusterMLCorrectionTool.h.
38{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 39 of file NeutralPFOClusterMLCorrectionTool.h.
39{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: