ATLAS Offline Software
FlavourUncertaintyComponent.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef JETUNCERTAINTIES_FLAVOURUNCERTAINTYCOMPONENT_H
6 #define JETUNCERTAINTIES_FLAVOURUNCERTAINTYCOMPONENT_H
7 
9 
10 namespace jet
11 {
12 
14 {
15  public:
16  // Constructor/destructor
18  const TString& jetType,
19  const TString& analysisRootFileName,
20  const TString& defaultAnalysisRootFileName,
21  const TString& path,
22  const TString& calibArea,
23  const bool absEtaGluonFraction,
24  const TString& analysisHistPattern=""
25  );
27  virtual FlavourUncertaintyComponent* clone() const;
29  virtual StatusCode initialize(TFile* histFile);
30 
31  // Extra information retrieval methods
33 
34  protected:
35 
36  // Uncertainty/validity retrieval helper methods
37  virtual bool getValidityImpl(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
38  virtual double getUncertaintyImpl(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
39 
40  private:
41  // Default constructor is forbidden
42  FlavourUncertaintyComponent(const std::string& name = "");
43 
45 
46  // Additional private members
48  const TString m_jetType;
49  const TString m_analysisFileName;
50  const TString m_analysisHistPattern;
51  const TString m_defAnaFileName;
52  const TString m_path;
53  const TString m_calibArea;
54  const bool m_absEta;
56  const TString m_secondUncName;
57 
59 
60  // Large-R flags to only apply to specific jet types (as other jet types handled by topology uncertainties)
61  std::vector<LargeRJetTruthLabel::TypeEnum> m_largeRJetTruthLabels;
62 
69 
70  // Analysis histograms from analysis root file
71  std::vector<UncertaintyHistogram*> m_gluonFractionHists;
72  std::vector<UncertaintyHistogram*> m_gluonFractionErrorHists;
73 
74  // Wrappers for special flavour histograms
75  double getFlavourResponseUncertainty(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
76  double getFlavourCompositionUncertainty(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
77  double getBJESUncertainty(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
78 
79  double getGluonFraction(const double pT, const double eta, const int nJets) const;
80  double getGluonFractionError(const double pT, const double eta, const int nJets) const;
81  double getGluonResponseDifference(const double pT, const double eta) const;
82  double getGluonResponseBaseline(const double pT, const double eta) const;
83  double getQuarkResponseBaseline(const double pT, const double eta) const;
84 
85  // Private helper indices and functions
86  StatusCode readNjetsHistograms(std::vector<UncertaintyHistogram*>& hists, const std::vector<TString>& histKeys);
87  StatusCode getNjetFromKey(const TString& key, int& nJets) const;
88  StatusCode checkNjetsInput(int& nJets) const;
89  bool isBjet(const xAOD::Jet& jet) const;
90  void getGluonKeys(TFile* analysisFile, std::vector<TString>& gluonFractionKeys, std::vector<TString>& gluonFractionErrorKeys) const;
91 };
92 
93 } // end jet namespace
94 
95 #endif
jet::FlavourUncertaintyComponent::FlavourResp_UNKNOWN
@ FlavourResp_UNKNOWN
Definition: FlavourUncertaintyComponent.h:44
CalculateHighPtTerm.pT
pT
Definition: ICHEP2016/CalculateHighPtTerm.py:57
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
jet::FlavourUncertaintyComponent::FlavourResp_QUARK
@ FlavourResp_QUARK
Definition: FlavourUncertaintyComponent.h:44
jet::FlavourUncertaintyComponent::m_calibArea
const TString m_calibArea
Definition: FlavourUncertaintyComponent.h:53
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
jet::FlavourUncertaintyComponent::m_flavourType
const FlavourComp::TypeEnum m_flavourType
Definition: FlavourUncertaintyComponent.h:47
jet::ComponentHelper
Definition: ConfigHelper.h:24
jet::FlavourUncertaintyComponent::clone
virtual FlavourUncertaintyComponent * clone() const
Definition: FlavourUncertaintyComponent.cxx:120
jet::FlavourUncertaintyComponent::getBJESUncertainty
double getBJESUncertainty(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: FlavourUncertaintyComponent.cxx:515
jet::FlavourUncertaintyComponent::m_NjetAccessor
SG::AuxElement::Accessor< int > m_NjetAccessor
Definition: FlavourUncertaintyComponent.h:67
jet::FlavourUncertaintyComponent::m_path
const TString m_path
Definition: FlavourUncertaintyComponent.h:52
jet::FlavourUncertaintyComponent::FlavourResp_GLUON
@ FlavourResp_GLUON
Definition: FlavourUncertaintyComponent.h:44
jet::FlavourUncertaintyComponent::m_largeRJetTruthLabelAccessor
SG::AuxElement::Accessor< int > m_largeRJetTruthLabelAccessor
Definition: FlavourUncertaintyComponent.h:68
jet::UncertaintyComponent
Definition: UncertaintyComponent.h:25
jet::FlavourUncertaintyComponent::FlavourRespType
FlavourRespType
Definition: FlavourUncertaintyComponent.h:44
jet::FlavourUncertaintyComponent::getGluonFraction
double getGluonFraction(const double pT, const double eta, const int nJets) const
Definition: FlavourUncertaintyComponent.cxx:530
jet::FlavourUncertaintyComponent::m_gluonFractionErrorHists
std::vector< UncertaintyHistogram * > m_gluonFractionErrorHists
Definition: FlavourUncertaintyComponent.h:72
jet::FlavourUncertaintyComponent::m_respType
FlavourRespType m_respType
Definition: FlavourUncertaintyComponent.h:64
jet::FlavourUncertaintyComponent::m_gluonFractionHists
std::vector< UncertaintyHistogram * > m_gluonFractionHists
Definition: FlavourUncertaintyComponent.h:71
jet::FlavourUncertaintyComponent::getUncertaintyImpl
virtual double getUncertaintyImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: FlavourUncertaintyComponent.cxx:367
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
jet::FlavourUncertaintyComponent::isBjet
bool isBjet(const xAOD::Jet &jet) const
Definition: FlavourUncertaintyComponent.cxx:659
jet::FlavourUncertaintyComponent::m_analysisFileName
const TString m_analysisFileName
Definition: FlavourUncertaintyComponent.h:49
jet::FlavourUncertaintyComponent::getFlavourCompositionUncertainty
double getFlavourCompositionUncertainty(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: FlavourUncertaintyComponent.cxx:456
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
jet::FlavourUncertaintyComponent::getFlavourType
virtual FlavourComp::TypeEnum getFlavourType() const
Definition: FlavourUncertaintyComponent.h:32
jet::FlavourUncertaintyComponent::m_largeRJetTruthLabels
std::vector< LargeRJetTruthLabel::TypeEnum > m_largeRJetTruthLabels
Definition: FlavourUncertaintyComponent.h:61
jet::FlavourUncertaintyComponent::m_secondUncHist
UncertaintyHistogram * m_secondUncHist
Definition: FlavourUncertaintyComponent.h:63
jet::FlavourUncertaintyComponent::readNjetsHistograms
StatusCode readNjetsHistograms(std::vector< UncertaintyHistogram * > &hists, const std::vector< TString > &histKeys)
Definition: FlavourUncertaintyComponent.cxx:590
MakeTH3DFromTH2Ds.hists
hists
Definition: MakeTH3DFromTH2Ds.py:72
jet::FlavourUncertaintyComponent::m_secondUncName
const TString m_secondUncName
Definition: FlavourUncertaintyComponent.h:56
jet::FlavourUncertaintyComponent::initialize
virtual StatusCode initialize(TFile *histFile)
Definition: FlavourUncertaintyComponent.cxx:140
jet::FlavourUncertaintyComponent::m_largeRJetTruthLabelName
std::string m_largeRJetTruthLabelName
Definition: FlavourUncertaintyComponent.h:58
jet::FlavourUncertaintyComponent::getGluonResponseBaseline
double getGluonResponseBaseline(const double pT, const double eta) const
Definition: FlavourUncertaintyComponent.cxx:552
jet::FlavourUncertaintyComponent::getGluonResponseDifference
double getGluonResponseDifference(const double pT, const double eta) const
Definition: FlavourUncertaintyComponent.cxx:542
jet::FlavourUncertaintyComponent::getFlavourResponseUncertainty
double getFlavourResponseUncertainty(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: FlavourUncertaintyComponent.cxx:420
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
jet::FlavourUncertaintyComponent::FlavourUncertaintyComponent
FlavourUncertaintyComponent(const ComponentHelper &component, const TString &jetType, const TString &analysisRootFileName, const TString &defaultAnalysisRootFileName, const TString &path, const TString &calibArea, const bool absEtaGluonFraction, const TString &analysisHistPattern="")
Definition: FlavourUncertaintyComponent.cxx:45
jet::UncertaintyHistogram
Definition: UncertaintyHistogram.h:25
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
jet::FlavourUncertaintyComponent::m_analysisHistPattern
const TString m_analysisHistPattern
Definition: FlavourUncertaintyComponent.h:50
jet::FlavourUncertaintyComponent::getGluonKeys
void getGluonKeys(TFile *analysisFile, std::vector< TString > &gluonFractionKeys, std::vector< TString > &gluonFractionErrorKeys) const
Definition: FlavourUncertaintyComponent.cxx:669
ConvertOldUJHistosToNewHistos.jetType
string jetType
Definition: ConvertOldUJHistosToNewHistos.py:121
jet::FlavourUncertaintyComponent::getGluonFractionError
double getGluonFractionError(const double pT, const double eta, const int nJets) const
Definition: FlavourUncertaintyComponent.cxx:536
jet::FlavourUncertaintyComponent::m_secondRespType
FlavourRespType m_secondRespType
Definition: FlavourUncertaintyComponent.h:65
jet::FlavourUncertaintyComponent::getQuarkResponseBaseline
double getQuarkResponseBaseline(const double pT, const double eta) const
Definition: FlavourUncertaintyComponent.cxx:568
jet::FlavourUncertaintyComponent::getNjetFromKey
StatusCode getNjetFromKey(const TString &key, int &nJets) const
Definition: FlavourUncertaintyComponent.cxx:613
jet::FlavourUncertaintyComponent::m_absEta
const bool m_absEta
Definition: FlavourUncertaintyComponent.h:54
jet::FlavourUncertaintyComponent::m_jetType
const TString m_jetType
Definition: FlavourUncertaintyComponent.h:48
UncertaintyComponent.h
jet::FlavourUncertaintyComponent::getValidityImpl
virtual bool getValidityImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: FlavourUncertaintyComponent.cxx:344
jet::FlavourUncertaintyComponent::m_defAnaFileName
const TString m_defAnaFileName
Definition: FlavourUncertaintyComponent.h:51
jet::FlavourUncertaintyComponent::checkNjetsInput
StatusCode checkNjetsInput(int &nJets) const
Definition: FlavourUncertaintyComponent.cxx:630
jet::FlavourUncertaintyComponent::~FlavourUncertaintyComponent
virtual ~FlavourUncertaintyComponent()
Definition: FlavourUncertaintyComponent.cxx:125
jet::FlavourComp::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:177
jet::FlavourUncertaintyComponent::m_BjetAccessor
SG::AuxElement::Accessor< char > m_BjetAccessor
Definition: FlavourUncertaintyComponent.h:66
jet::FlavourUncertaintyComponent
Definition: FlavourUncertaintyComponent.h:14
jet::FlavourUncertaintyComponent::m_absEtaGluonFraction
const bool m_absEtaGluonFraction
Definition: FlavourUncertaintyComponent.h:55
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37