ATLAS Offline Software
ConfigHelper.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_CONFIGHELPER_H
6 #define JETUNCERTAINTIES_CONFIGHELPER_H
7 
10 
13 
14 #include "TString.h"
15 #include <string>
16 #include <vector>
17 
18 class TEnv;
19 
20 namespace jet
21 {
22 
24 {
25  public:
26  ComponentHelper(const TString& name = "");
27  ComponentHelper(TEnv& settings, const TString& compPrefix, const TString& MCtype, const float energyScaleVal);
28  virtual ~ComponentHelper() {}
29 
30  // Values fixed by arguments
31  const float energyScale;
32 
33  // Raw component values to read from a file
34  TString name;
35  TString desc;
36  TString param;
37  TString massDefStr;
38  TString scale;
39  TString topologyStr;
40  TString interpolStr;
41  TString special;
42  TString uncNameList;
43  TString validName;
44  TString subCompList;
45  int splitNum{};
46  int groupNum{};
47  TString combMassStr;
48  TString caloMassTerm;
49  TString TAMassTerm;
50  TString caloMassDef;
51  TString TAMassDef;
52  TString truthLabelStr;
58  TString RegionForSFstr;
59  TString ResultName;
60 
61  // Derived values to parse from the raw values
62  // defaults are zero, "UNKNOWN" in the enums
67  bool isSpecial{};
72  std::vector<TString> uncNames;
73  std::vector<TString> subComps;
74  std::vector<int> truthLabels;
76  std::vector<TString> LargeRJetTruthLabelStrs;
77  std::vector<LargeRJetTruthLabel::TypeEnum> LargeRJetTruthLabels;
78  std::vector<TString> LargeRJetTruthLabelsForSFstrs;
79  std::vector<CompFlavorLabelVar::TypeEnum> LargeRJetTruthLabelsForSF;
81 };
82 
84 {
85  public:
86  GroupHelper(const TString& name = "");
87  GroupHelper(TEnv& settings, const TString& groupPrefix, const TString& MCtype);
88  virtual ~GroupHelper() {}
89 
90  // Raw component values to read from a file
91  TString name;
92  TString desc;
93  TString cat;
94  TString corr;
95  TString isRed;
96  int groupNum{};
97  int subgroupNum{};
98 
99  // Derived values to parse from the raw values
102  bool reducible{};
103 };
104 
106 {
107  public:
108  ConfigHelper(const TString& confPrefix, const TString& MCtype, const float energyScaleVal);
109  virtual StatusCode initialize(TEnv& settings);
110  virtual ~ConfigHelper();
111 
112  // Classification support
113  bool isCompGroup() const;
114  bool isComponent() const;
115  bool isGroup() const;
116 
117  // Information retrieval
118  const ComponentHelper* getComponentInfo() const;
119  const GroupHelper* getGroupInfo() const;
120 
121  // Modification methods
122  void enforceGroupNamePrefix(const std::string& prefix);
123  void enforceGroupNamePrefix(const TString& prefix);
124  void setComponentJetDefSuffix(const std::string& suffix);
125  void setComponentJetDefSuffix(const TString& suffix);
126  void addValidityHistogram(const std::string& histName);
127  void addValidityHistogram(const TString& histName);
128 
129  private:
130  ConfigHelper();
131 
132  bool m_isInit{};
133 
134  // Values fixed by arguments
135  const TString m_confPrefix;
136  const TString m_MCtype;
137  const float m_energyScale{};
138 
139  // Values filled through initialize
142 };
143 
144 } // end jet namespace
145 
146 #endif
jet::CompMassDef::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:71
jet::GroupHelper::name
TString name
Definition: ConfigHelper.h:91
jet::GroupHelper
Definition: ConfigHelper.h:84
jet::ComponentHelper::scale
TString scale
Definition: ConfigHelper.h:38
jet::ComponentHelper::scaleVar
CompScaleVar::TypeEnum scaleVar
Definition: ConfigHelper.h:65
jet::CompCorrelation::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:32
jet::ConfigHelper::setComponentJetDefSuffix
void setComponentJetDefSuffix(const std::string &suffix)
Definition: ConfigHelper.cxx:304
jet::ComponentHelper::groupNum
int groupNum
Definition: ConfigHelper.h:46
jet::ComponentHelper::splitNum
int splitNum
Definition: ConfigHelper.h:45
hotSpotInTAG.suffix
string suffix
Definition: hotSpotInTAG.py:186
jet::Interpolate::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:241
AddEmptyComponent.histName
string histName
Definition: AddEmptyComponent.py:64
jet::ConfigHelper::m_cInfo
ComponentHelper * m_cInfo
Definition: ConfigHelper.h:140
jet::ComponentHelper::caloMassDef
TString caloMassDef
Definition: ConfigHelper.h:50
jet::ComponentHelper::energyScale
const float energyScale
Definition: ConfigHelper.h:31
jet::GroupHelper::correlation
CompCorrelation::TypeEnum correlation
Definition: ConfigHelper.h:101
LargeRJetLabelEnum.h
jet::ComponentHelper::TAMassDef
TString TAMassDef
Definition: ConfigHelper.h:51
jet::ComponentHelper::~ComponentHelper
virtual ~ComponentHelper()
Definition: ConfigHelper.h:28
jet::ComponentHelper::topology
JetTopology::TypeEnum topology
Definition: ConfigHelper.h:66
jet::PileupComp::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:163
jet::ComponentHelper::LargeRJetTruthLabelsForSF
std::vector< CompFlavorLabelVar::TypeEnum > LargeRJetTruthLabelsForSF
Definition: ConfigHelper.h:79
jet::ComponentHelper::special
TString special
Definition: ConfigHelper.h:41
jet::ComponentHelper::LargeRJetTruthLabelName
TString LargeRJetTruthLabelName
Definition: ConfigHelper.h:55
jet::GroupHelper::subgroupNum
int subgroupNum
Definition: ConfigHelper.h:97
jet::ComponentHelper
Definition: ConfigHelper.h:24
jet::GroupHelper::category
CompCategory::TypeEnum category
Definition: ConfigHelper.h:100
jet::ComponentHelper::combMassStr
TString combMassStr
Definition: ConfigHelper.h:47
jet::ConfigHelper::ConfigHelper
ConfigHelper()
Definition: ConfigHelper.cxx:160
jet::ComponentHelper::uncNames
std::vector< TString > uncNames
Definition: ConfigHelper.h:72
jet::ComponentHelper::massDef
CompMassDef::TypeEnum massDef
Definition: ConfigHelper.h:64
jet::ComponentHelper::truthLabels
std::vector< int > truthLabels
Definition: ConfigHelper.h:74
jet::ConfigHelper::getGroupInfo
const GroupHelper * getGroupInfo() const
Definition: ConfigHelper.cxx:270
jet::ComponentHelper::desc
TString desc
Definition: ConfigHelper.h:35
jet::ComponentHelper::constrainZresponse
bool constrainZresponse
Definition: ConfigHelper.h:75
jet::ComponentHelper::LargeRJetTruthLabelStrs
std::vector< TString > LargeRJetTruthLabelStrs
Definition: ConfigHelper.h:76
jet::ComponentHelper::topologyStr
TString topologyStr
Definition: ConfigHelper.h:39
jet::ComponentHelper::constrainZresponseStr
TString constrainZresponseStr
Definition: ConfigHelper.h:53
UncertaintyEnum.h
jet::GroupHelper::reducible
bool reducible
Definition: ConfigHelper.h:102
jet::ConfigHelper::isCompGroup
bool isCompGroup() const
Definition: ConfigHelper.cxx:214
AsgMessaging.h
jet::ComponentHelper::ResultName
TString ResultName
Definition: ConfigHelper.h:59
jet::ComponentHelper::ComponentHelper
ComponentHelper(const TString &name="")
Definition: ConfigHelper.cxx:21
jet::ComponentHelper::caloMassTerm
TString caloMassTerm
Definition: ConfigHelper.h:48
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
jet::ConfigHelper::isGroup
bool isGroup() const
Definition: ConfigHelper.cxx:246
jet::GroupHelper::corr
TString corr
Definition: ConfigHelper.h:94
jet::ComponentHelper::massDefStr
TString massDefStr
Definition: ConfigHelper.h:37
jet::ComponentHelper::flavourType
FlavourComp::TypeEnum flavourType
Definition: ConfigHelper.h:69
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
jet::ComponentHelper::param
TString param
Definition: ConfigHelper.h:36
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
jet::ComponentHelper::LargeRJetTruthLabels
std::vector< LargeRJetTruthLabel::TypeEnum > LargeRJetTruthLabels
Definition: ConfigHelper.h:77
jet::ComponentHelper::TAMassTerm
TString TAMassTerm
Definition: ConfigHelper.h:49
jet::ComponentHelper::LargeRJetTruthLabelsForSFstrs
std::vector< TString > LargeRJetTruthLabelsForSFstrs
Definition: ConfigHelper.h:78
jet::ConfigHelper::m_MCtype
const TString m_MCtype
Definition: ConfigHelper.h:136
jet::GroupHelper::cat
TString cat
Definition: ConfigHelper.h:93
jet::GroupHelper::isRed
TString isRed
Definition: ConfigHelper.h:95
jet::ComponentHelper::validName
TString validName
Definition: ConfigHelper.h:43
jet::ConfigHelper::enforceGroupNamePrefix
void enforceGroupNamePrefix(const std::string &prefix)
Definition: ConfigHelper.cxx:280
jet::ComponentHelper::constrainZresponseFunc
TString constrainZresponseFunc
Definition: ConfigHelper.h:54
jet::GroupHelper::groupNum
int groupNum
Definition: ConfigHelper.h:96
jet::GroupHelper::desc
TString desc
Definition: ConfigHelper.h:92
jet::ComponentHelper::name
TString name
Definition: ConfigHelper.h:34
jet::ConfigHelper::m_confPrefix
const TString m_confPrefix
Definition: ConfigHelper.h:135
StatusCode.h
jet::ConfigHelper::addValidityHistogram
void addValidityHistogram(const std::string &histName)
Definition: ConfigHelper.cxx:324
jet::ConfigHelper::m_isInit
bool m_isInit
Definition: ConfigHelper.h:132
jet::CombMassComp::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:195
jet::ComponentHelper::LargeRJetTruthLabelStr
TString LargeRJetTruthLabelStr
Definition: ConfigHelper.h:56
jet::ConfigHelper::m_energyScale
const float m_energyScale
Definition: ConfigHelper.h:137
jet::CompParametrization::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:45
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
jet::ConfigHelper
Definition: ConfigHelper.h:106
jet::ComponentHelper::uncNameList
TString uncNameList
Definition: ConfigHelper.h:42
jet::ComponentHelper::isSpecial
bool isSpecial
Definition: ConfigHelper.h:67
jet::ConfigHelper::getComponentInfo
const ComponentHelper * getComponentInfo() const
Definition: ConfigHelper.cxx:260
jet::ConfigHelper::~ConfigHelper
virtual ~ConfigHelper()
Definition: ConfigHelper.cxx:182
jet::ComponentHelper::LargeRJetTruthLabelsForSFstr
TString LargeRJetTruthLabelsForSFstr
Definition: ConfigHelper.h:57
jet::ComponentHelper::truthLabelStr
TString truthLabelStr
Definition: ConfigHelper.h:52
jet::CompScaleVar::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:91
jet::ComponentHelper::subCompList
TString subCompList
Definition: ConfigHelper.h:44
jet::CompTaggerRegionVar::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:149
jet::CompCategory::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:16
jet::ComponentHelper::RegionForSFstr
TString RegionForSFstr
Definition: ConfigHelper.h:58
jet::ConfigHelper::initialize
virtual StatusCode initialize(TEnv &settings)
Definition: ConfigHelper.cxx:188
jet::ComponentHelper::interpolStr
TString interpolStr
Definition: ConfigHelper.h:40
jet::ConfigHelper::m_gInfo
GroupHelper * m_gInfo
Definition: ConfigHelper.h:141
jet::GroupHelper::GroupHelper
GroupHelper(const TString &name="")
Definition: ConfigHelper.cxx:122
jet::ComponentHelper::parametrization
CompParametrization::TypeEnum parametrization
Definition: ConfigHelper.h:63
jet::ComponentHelper::interpolate
Interpolate::TypeEnum interpolate
Definition: ConfigHelper.h:71
jet::JetTopology::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:208
jet::ComponentHelper::RegionForSF
CompTaggerRegionVar::TypeEnum RegionForSF
Definition: ConfigHelper.h:80
jet::ConfigHelper::isComponent
bool isComponent() const
Definition: ConfigHelper.cxx:232
jet::FlavourComp::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:177
jet::GroupHelper::~GroupHelper
virtual ~GroupHelper()
Definition: ConfigHelper.h:88
jet::ComponentHelper::pileupType
PileupComp::TypeEnum pileupType
Definition: ConfigHelper.h:68
jet::ComponentHelper::subComps
std::vector< TString > subComps
Definition: ConfigHelper.h:73
jet::ComponentHelper::combMassType
CombMassComp::TypeEnum combMassType
Definition: ConfigHelper.h:70