ATLAS Offline Software
Loading...
Searching...
No Matches
ConstantUncertaintyComponent.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef JETUNCERTAINTIES_CONSTANTUNCERTAINTYCOMPONENT_H
6#define JETUNCERTAINTIES_CONSTANTUNCERTAINTYCOMPONENT_H
7
8/*
9 ConstantUncertaintyComponent
10
11 A flat fractional uncertainty, taken straight from the configuration file
12 rather than from a histogram:
13
14 JESComponent.N.Param: Constant
15 JESComponent.N.Value: 0.01
16
17 Every other component in the package loads a histogram and fails if it is
18 absent, so a genuinely flat uncertainty previously had to be faked with a
19 histogram filled with a constant. This class covers that case directly, which
20 keeps the value visible in the config instead of buried in a ROOT file.
21*/
22
24
25namespace jet
26{
27
29{
30 public:
31 // Constructor/destructor/initialization
34 virtual ConstantUncertaintyComponent* clone() const;
36
38 virtual StatusCode initialize(TFile* histFile);
39
41 virtual TString getName() const { return m_name; }
42
43 virtual bool isAlwaysZero() const;
44
45 protected:
46
47 // Uncertainty/validity retrieval helper methods
48 virtual bool getValidityImpl(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
49 virtual double getUncertaintyImpl(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
50
51 private:
52 ConstantUncertaintyComponent(const std::string& name = "");
53
54 const TString m_name;
55 const double m_value{};
57 const bool m_histSpecified{};
58
59};
60
61} // end jet namespace
62
63#endif
virtual ConstantUncertaintyComponent * clone() const
virtual double getUncertaintyImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
virtual bool getValidityImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
const bool m_histSpecified
Set if the config also asked for a histogram, which is a configuration error.
virtual TString getName() const
The base class reports the histogram name, which this component does not have.
ConstantUncertaintyComponent(const ComponentHelper &component)
UncertaintyComponent(const ComponentHelper &component, const size_t numHist=1)
Jet_v1 Jet
Definition of the current "jet version".
EventInfo_v1 EventInfo
Definition of the latest event info version.
void initialize()