ATLAS Offline Software
Loading...
Searching...
No Matches
UncertaintyComponent.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef JETUNCERTAINTIES_UNCERTAINTYCOMPONENT_H
6#define JETUNCERTAINTIES_UNCERTAINTYCOMPONENT_H
7
11
12#include "xAODJet/Jet.h"
14
16
17#include "TString.h"
18
19class TFile;
20
21namespace jet
22{
23
25{
26 public:
27 // Constructor/destructor/initialization
28 UncertaintyComponent(const ComponentHelper& component, const size_t numHist = 1);
30 virtual UncertaintyComponent* clone() const = 0;
31 virtual ~UncertaintyComponent();
32 virtual StatusCode initialize(TFile* histFile);
33
34 // Member retrieval methods
35 virtual TString getName() const { return m_uncHistName; }
36 virtual TString getValidName() const { return m_validHistName; }
37 virtual CompScaleVar::TypeEnum getScaleVar() const { return m_scaleVar; }
38 virtual JetTopology::TypeEnum getTopology() const { return m_topology; }
39
40 // Helpers for special situations
41 virtual bool isAlwaysZero() const;
42
43 // Uncertainty/validity retrieval methods
44 virtual bool getValidity(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
45 virtual double getUncertainty(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
46 virtual bool getValidUncertainty(double& unc, const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
47
48 protected:
49 // Protected members
50 bool m_isInit{};
51 const TString m_uncHistName;
52 const TString m_validHistName;
55 const float m_energyScale{};
57 const int m_splitNumber{};
58
62
63 // Methods for derived classes to implement
64 virtual bool getValidityImpl(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const = 0;
65 virtual double getUncertaintyImpl(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const = 0;
66
67 // Helper methods
68 virtual bool getValidBool(const double validity) const;
69 virtual double getSplitFactor(const xAOD::Jet& jet) const;
70 virtual double getAbsMass(const xAOD::Jet& jet, const CompMassDef::TypeEnum massDef) const;
71 virtual double getMassOverPt(const xAOD::Jet& jet, const CompMassDef::TypeEnum massDef) const;
72 virtual double getMassOverE(const xAOD::Jet& jet, const CompMassDef::TypeEnum massDef) const;
73
74 private:
75 UncertaintyComponent(const std::string& name = "");
76};
77
78// Sorting operators
79bool operator < (const UncertaintyComponent& componentA, const UncertaintyComponent& componentB);
80bool operator == (const UncertaintyComponent& componentA, const UncertaintyComponent& componentB);
81
82} // end jet namespace
83
84
85#endif
Class mimicking the AthMessaging class from the offline software.
const JetTopology::TypeEnum m_topology
virtual double getUncertainty(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
const Interpolate::TypeEnum m_interpolate
virtual double getMassOverPt(const xAOD::Jet &jet, const CompMassDef::TypeEnum massDef) const
UncertaintyComponent(const ComponentHelper &component, const size_t numHist=1)
virtual TString getName() const
virtual double getUncertaintyImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const =0
virtual UncertaintyComponent * clone() const =0
virtual CompScaleVar::TypeEnum getScaleVar() const
virtual TString getValidName() const
virtual double getAbsMass(const xAOD::Jet &jet, const CompMassDef::TypeEnum massDef) const
virtual double getSplitFactor(const xAOD::Jet &jet) const
virtual double getMassOverE(const xAOD::Jet &jet, const CompMassDef::TypeEnum massDef) const
virtual JetTopology::TypeEnum getTopology() const
virtual bool getValidity(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
virtual bool getValidBool(const double validity) const
virtual bool getValidUncertainty(double &unc, const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
UncertaintyHistogram * m_validHist
const CompScaleVar::TypeEnum m_scaleVar
virtual bool getValidityImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const =0
UncertaintyHistogram * m_uncHist
bool operator==(const UncertaintyComponent &componentA, const UncertaintyComponent &componentB)
bool operator<(const UncertaintyComponent &componentA, const UncertaintyComponent &componentB)
Jet_v1 Jet
Definition of the current "jet version".
EventInfo_v1 EventInfo
Definition of the latest event info version.
void initialize()