ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
jet::ComponentHelper Class Reference

#include <ConfigHelper.h>

Collaboration diagram for jet::ComponentHelper:

Public Member Functions

 ComponentHelper (const TString &name="")
 
 ComponentHelper (TEnv &settings, const TString &compPrefix, const TString &MCtype, const float energyScaleVal)
 
virtual ~ComponentHelper ()
 

Public Attributes

const float energyScale
 
TString name
 
TString desc
 
TString param
 
TString massDefStr
 
TString scale
 
TString topologyStr
 
TString interpolStr
 
TString special
 
TString uncNameList
 
TString validName
 
TString subCompList
 
int splitNum {}
 
int groupNum {}
 
TString combMassStr
 
TString caloMassTerm
 
TString TAMassTerm
 
TString caloMassDef
 
TString TAMassDef
 
TString truthLabelStr
 
TString constrainZresponseStr
 
TString constrainZresponseFunc
 
TString LargeRJetTruthLabelName
 
TString LargeRJetTruthLabelStr
 
TString LargeRJetTruthLabelsForSFstr
 
TString RegionForSFstr
 
TString ResultName
 
CompParametrization::TypeEnum parametrization {}
 
CompMassDef::TypeEnum massDef {}
 
CompScaleVar::TypeEnum scaleVar {}
 
JetTopology::TypeEnum topology {}
 
bool isSpecial {}
 
PileupComp::TypeEnum pileupType {}
 
FlavourComp::TypeEnum flavourType {}
 
CombMassComp::TypeEnum combMassType {}
 
Interpolate::TypeEnum interpolate {}
 
std::vector< TString > uncNames
 
std::vector< TString > subComps
 
std::vector< int > truthLabels
 
bool constrainZresponse {}
 
std::vector< TString > LargeRJetTruthLabelStrs
 
std::vector< LargeRJetTruthLabel::TypeEnumLargeRJetTruthLabels
 
std::vector< TString > LargeRJetTruthLabelsForSFstrs
 
std::vector< CompFlavorLabelVar::TypeEnumLargeRJetTruthLabelsForSF
 
CompTaggerRegionVar::TypeEnum RegionForSF {}
 

Detailed Description

Definition at line 23 of file ConfigHelper.h.

Constructor & Destructor Documentation

◆ ComponentHelper() [1/2]

jet::ComponentHelper::ComponentHelper ( const TString &  name = "")

Definition at line 21 of file ConfigHelper.cxx.

22  : energyScale(0)
23  , name(name)
24 { }

◆ ComponentHelper() [2/2]

jet::ComponentHelper::ComponentHelper ( TEnv &  settings,
const TString &  compPrefix,
const TString &  MCtype,
const float  energyScaleVal 
)

Definition at line 26 of file ConfigHelper.cxx.

27  : energyScale(energyScaleVal),
28  // Read in information on the uncertainty component
29  // - Name: component name
30  // - Param: parametrization
31  // - MassDef: mass definition (default, calo, TA, comb)
32  // - Scale: the variable to scale (fourvec, pt, D12, etc), default fourvec
33  // - Interp: If false, uses fixed bin content insted of interpolation
34  // - Special: Whether this component requires special treatment, "false" if not specified
35  // - Hists: histogram name(s), comma/space-separated list (if not specified, uses name)
36  // - VHist: validity histogram name (optional)
37  // - SubComp: sub-components for simple groups
38  // - Group: the number of the group this component belongs to (0 == single-component group)
39  // Overwrite MCTYPE with the specified type if applicable
40  name (TString(settings.GetValue(compPrefix+"Name","")).ReplaceAll("MCTYPE",MCtype)),
41  param (settings.GetValue(compPrefix+"Param","")),
42  massDefStr (settings.GetValue(compPrefix+"MassDef","")),
43  scale (settings.GetValue(compPrefix+"Scale","FourVec")),
44  topologyStr (settings.GetValue(compPrefix+"Topology","")),
45  interpolStr (settings.GetValue(compPrefix+"Interp","true")),
46  special (settings.GetValue(compPrefix+"Special","")),
47  uncNameList (TString(settings.GetValue(compPrefix+"Hists","")).ReplaceAll("MCTYPE",MCtype)),
48  validName (TString(settings.GetValue(compPrefix+"VHist","")).ReplaceAll("MCTYPE",MCtype)),
49  subCompList (TString(settings.GetValue(compPrefix+"SubComp","")).ReplaceAll("MCTYPE",MCtype)),
50  splitNum (settings.GetValue(compPrefix+"Split",0)),
51  groupNum (settings.GetValue(compPrefix+"Group",0)),
52  combMassStr (settings.GetValue(compPrefix+"CombMassType","")),
53  caloMassTerm(settings.GetValue(compPrefix+"CaloMassTerm","")),
54  TAMassTerm (settings.GetValue(compPrefix+"TAMassTerm","")),
55  caloMassDef (settings.GetValue(compPrefix+"CaloMassDef","")),
56  TAMassDef (settings.GetValue(compPrefix+"TAMassDef","")),
57  truthLabelStr (settings.GetValue(compPrefix+"TruthLabels","")),
58  constrainZresponseStr (settings.GetValue(compPrefix+"ConstrainZresponse","")),
59  constrainZresponseFunc (settings.GetValue(compPrefix+"ConstrainZresponseFunc","")),
60  LargeRJetTruthLabelName (settings.GetValue(compPrefix+"LargeRJetTruthLabelName","R10TruthLabel_R21Consolidated")),
61  LargeRJetTruthLabelsForSFstr (settings.GetValue(compPrefix+"LargeRJetTruthLabelForSF","")),
62  RegionForSFstr (settings.GetValue(compPrefix+"RegionForSF","")),
63  ResultName (settings.GetValue(compPrefix+"ResultName","")),
64 
65  // Get enums where appropriate
66  // Leave interpreting/checking the enums to others
71  isSpecial ((!special.CompareTo("true",TString::kIgnoreCase)) || (!special.CompareTo("yes",TString::kIgnoreCase))),
76  uncNames (utils::vectorize<TString>(uncNameList,", ")),
77  subComps (utils::vectorize<TString>(subCompList,", ")),
78  truthLabels (utils::vectorize<int>(truthLabelStr,", ")),
79  constrainZresponse ((!constrainZresponseStr.CompareTo("true",TString::kIgnoreCase)) || (!constrainZresponseStr.CompareTo("yes",TString::kIgnoreCase)))
80 {
81  TString LargeRJetTruthLabelStrOld (settings.GetValue(compPrefix+"FatjetTruthLabels",""));
82  TString LargeRJetTruthLabelStrNew = settings.GetValue(compPrefix+"LargeRJetTruthLabels","");
83  if (LargeRJetTruthLabelStrOld != "" && LargeRJetTruthLabelStrNew != "")
84  throw std::runtime_error("ERROR: double-specification of the LargeRJetTruthLabels/FatjetTruthLabels property");
85  else if (LargeRJetTruthLabelStrNew != "")
86  LargeRJetTruthLabelStr = LargeRJetTruthLabelStrNew;
87  else
88  LargeRJetTruthLabelStr = LargeRJetTruthLabelStrOld;
89 
90  LargeRJetTruthLabelStrs = utils::vectorize<TString>(LargeRJetTruthLabelStr,",");
91  for (const TString& aVal : LargeRJetTruthLabelStrs)
92  {
94  {
95  // Note: throwing an exception here because we can't return StatusCode::FAILURE or similar and this doesn't inherit from a class with such functionality
96  // This error message should anyways only occur if the CP group provides a bad config file, so this error will only be printed when we are debugging our inputs and before it gets to users
97  throw std::runtime_error(Form("ERROR: Unable to convert specified LargeRJetTruthLabel to a recognized enum value, please check the configuration file for mistakes: %s",aVal.Data()));
98  }
99  else
101  }
102  LargeRJetTruthLabelsForSFstrs = utils::vectorize<TString>(LargeRJetTruthLabelsForSFstr, ",");
103  for (const TString& aVal : LargeRJetTruthLabelsForSFstrs)
104  {
106  {
107  throw std::runtime_error(Form("ERROR: Unable to convert specified LargeRJetTruthLabelForSF to a recognized enum value, please check the configuration file for mistakes: %s",aVal.Data()));
108  }
109  else
111  }
113 }

◆ ~ComponentHelper()

virtual jet::ComponentHelper::~ComponentHelper ( )
inlinevirtual

Definition at line 28 of file ConfigHelper.h.

28 {}

Member Data Documentation

◆ caloMassDef

TString jet::ComponentHelper::caloMassDef

Definition at line 50 of file ConfigHelper.h.

◆ caloMassTerm

TString jet::ComponentHelper::caloMassTerm

Definition at line 48 of file ConfigHelper.h.

◆ combMassStr

TString jet::ComponentHelper::combMassStr

Definition at line 47 of file ConfigHelper.h.

◆ combMassType

CombMassComp::TypeEnum jet::ComponentHelper::combMassType {}

Definition at line 70 of file ConfigHelper.h.

◆ constrainZresponse

bool jet::ComponentHelper::constrainZresponse {}

Definition at line 75 of file ConfigHelper.h.

◆ constrainZresponseFunc

TString jet::ComponentHelper::constrainZresponseFunc

Definition at line 54 of file ConfigHelper.h.

◆ constrainZresponseStr

TString jet::ComponentHelper::constrainZresponseStr

Definition at line 53 of file ConfigHelper.h.

◆ desc

TString jet::ComponentHelper::desc

Definition at line 35 of file ConfigHelper.h.

◆ energyScale

const float jet::ComponentHelper::energyScale

Definition at line 31 of file ConfigHelper.h.

◆ flavourType

FlavourComp::TypeEnum jet::ComponentHelper::flavourType {}

Definition at line 69 of file ConfigHelper.h.

◆ groupNum

int jet::ComponentHelper::groupNum {}

Definition at line 46 of file ConfigHelper.h.

◆ interpolate

Interpolate::TypeEnum jet::ComponentHelper::interpolate {}

Definition at line 71 of file ConfigHelper.h.

◆ interpolStr

TString jet::ComponentHelper::interpolStr

Definition at line 40 of file ConfigHelper.h.

◆ isSpecial

bool jet::ComponentHelper::isSpecial {}

Definition at line 67 of file ConfigHelper.h.

◆ LargeRJetTruthLabelName

TString jet::ComponentHelper::LargeRJetTruthLabelName

Definition at line 55 of file ConfigHelper.h.

◆ LargeRJetTruthLabels

std::vector<LargeRJetTruthLabel::TypeEnum> jet::ComponentHelper::LargeRJetTruthLabels

Definition at line 77 of file ConfigHelper.h.

◆ LargeRJetTruthLabelsForSF

std::vector<CompFlavorLabelVar::TypeEnum> jet::ComponentHelper::LargeRJetTruthLabelsForSF

Definition at line 79 of file ConfigHelper.h.

◆ LargeRJetTruthLabelsForSFstr

TString jet::ComponentHelper::LargeRJetTruthLabelsForSFstr

Definition at line 57 of file ConfigHelper.h.

◆ LargeRJetTruthLabelsForSFstrs

std::vector<TString> jet::ComponentHelper::LargeRJetTruthLabelsForSFstrs

Definition at line 78 of file ConfigHelper.h.

◆ LargeRJetTruthLabelStr

TString jet::ComponentHelper::LargeRJetTruthLabelStr

Definition at line 56 of file ConfigHelper.h.

◆ LargeRJetTruthLabelStrs

std::vector<TString> jet::ComponentHelper::LargeRJetTruthLabelStrs

Definition at line 76 of file ConfigHelper.h.

◆ massDef

CompMassDef::TypeEnum jet::ComponentHelper::massDef {}

Definition at line 64 of file ConfigHelper.h.

◆ massDefStr

TString jet::ComponentHelper::massDefStr

Definition at line 37 of file ConfigHelper.h.

◆ name

TString jet::ComponentHelper::name

Definition at line 34 of file ConfigHelper.h.

◆ param

TString jet::ComponentHelper::param

Definition at line 36 of file ConfigHelper.h.

◆ parametrization

CompParametrization::TypeEnum jet::ComponentHelper::parametrization {}

Definition at line 63 of file ConfigHelper.h.

◆ pileupType

PileupComp::TypeEnum jet::ComponentHelper::pileupType {}

Definition at line 68 of file ConfigHelper.h.

◆ RegionForSF

CompTaggerRegionVar::TypeEnum jet::ComponentHelper::RegionForSF {}

Definition at line 80 of file ConfigHelper.h.

◆ RegionForSFstr

TString jet::ComponentHelper::RegionForSFstr

Definition at line 58 of file ConfigHelper.h.

◆ ResultName

TString jet::ComponentHelper::ResultName

Definition at line 59 of file ConfigHelper.h.

◆ scale

TString jet::ComponentHelper::scale

Definition at line 38 of file ConfigHelper.h.

◆ scaleVar

CompScaleVar::TypeEnum jet::ComponentHelper::scaleVar {}

Definition at line 65 of file ConfigHelper.h.

◆ special

TString jet::ComponentHelper::special

Definition at line 41 of file ConfigHelper.h.

◆ splitNum

int jet::ComponentHelper::splitNum {}

Definition at line 45 of file ConfigHelper.h.

◆ subCompList

TString jet::ComponentHelper::subCompList

Definition at line 44 of file ConfigHelper.h.

◆ subComps

std::vector<TString> jet::ComponentHelper::subComps

Definition at line 73 of file ConfigHelper.h.

◆ TAMassDef

TString jet::ComponentHelper::TAMassDef

Definition at line 51 of file ConfigHelper.h.

◆ TAMassTerm

TString jet::ComponentHelper::TAMassTerm

Definition at line 49 of file ConfigHelper.h.

◆ topology

JetTopology::TypeEnum jet::ComponentHelper::topology {}

Definition at line 66 of file ConfigHelper.h.

◆ topologyStr

TString jet::ComponentHelper::topologyStr

Definition at line 39 of file ConfigHelper.h.

◆ truthLabels

std::vector<int> jet::ComponentHelper::truthLabels

Definition at line 74 of file ConfigHelper.h.

◆ truthLabelStr

TString jet::ComponentHelper::truthLabelStr

Definition at line 52 of file ConfigHelper.h.

◆ uncNameList

TString jet::ComponentHelper::uncNameList

Definition at line 42 of file ConfigHelper.h.

◆ uncNames

std::vector<TString> jet::ComponentHelper::uncNames

Definition at line 72 of file ConfigHelper.h.

◆ validName

TString jet::ComponentHelper::validName

Definition at line 43 of file ConfigHelper.h.


The documentation for this class was generated from the following files:
jet::ComponentHelper::scale
TString scale
Definition: ConfigHelper.h:38
jet::ComponentHelper::scaleVar
CompScaleVar::TypeEnum scaleVar
Definition: ConfigHelper.h:65
jet::ComponentHelper::groupNum
int groupNum
Definition: ConfigHelper.h:46
jet::ComponentHelper::splitNum
int splitNum
Definition: ConfigHelper.h:45
LargeRJetTruthLabel::UNKNOWN
@ UNKNOWN
Definition: LargeRJetLabelEnum.h:15
jet::ComponentHelper::caloMassDef
TString caloMassDef
Definition: ConfigHelper.h:50
jet::ComponentHelper::energyScale
const float energyScale
Definition: ConfigHelper.h:31
jet::ComponentHelper::TAMassDef
TString TAMassDef
Definition: ConfigHelper.h:51
jet::CombMassComp::stringToEnum
TypeEnum stringToEnum(const TString &type)
Definition: UncertaintyEnum.cxx:588
jet::ComponentHelper::topology
JetTopology::TypeEnum topology
Definition: ConfigHelper.h:66
jet::ComponentHelper::LargeRJetTruthLabelsForSF
std::vector< CompFlavorLabelVar::TypeEnum > LargeRJetTruthLabelsForSF
Definition: ConfigHelper.h:79
jet::ComponentHelper::special
TString special
Definition: ConfigHelper.h:41
jet::CompTaggerRegionVar::stringToEnum
TypeEnum stringToEnum(const TString &type)
Definition: UncertaintyEnum.cxx:462
LargeRJetTruthLabel::stringToEnum
TypeEnum stringToEnum(const TString &name)
Definition: LargeRJetLabelEnum.h:81
jet::ComponentHelper::LargeRJetTruthLabelName
TString LargeRJetTruthLabelName
Definition: ConfigHelper.h:55
jet::ComponentHelper::combMassStr
TString combMassStr
Definition: ConfigHelper.h:47
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::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
jet::PileupComp::stringToEnum
TypeEnum stringToEnum(const TString &type)
Definition: UncertaintyEnum.cxx:500
jet::CompScaleVar::stringToEnum
TypeEnum stringToEnum(const TString &type)
Definition: UncertaintyEnum.cxx:278
jet::ComponentHelper::ResultName
TString ResultName
Definition: ConfigHelper.h:59
jet::CompMassDef::stringToEnum
TypeEnum stringToEnum(const TString &type)
Definition: UncertaintyEnum.cxx:203
jet::ComponentHelper::caloMassTerm
TString caloMassTerm
Definition: ConfigHelper.h:48
jet::CompFlavorLabelVar::stringToEnum
TypeEnum stringToEnum(const TString &type)
Definition: UncertaintyEnum.cxx:419
jet::ComponentHelper::massDefStr
TString massDefStr
Definition: ConfigHelper.h:37
jet::ComponentHelper::flavourType
FlavourComp::TypeEnum flavourType
Definition: ConfigHelper.h:69
jet::ComponentHelper::param
TString param
Definition: ConfigHelper.h:36
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::ComponentHelper::validName
TString validName
Definition: ConfigHelper.h:43
jet::ComponentHelper::constrainZresponseFunc
TString constrainZresponseFunc
Definition: ConfigHelper.h:54
jet::ComponentHelper::name
TString name
Definition: ConfigHelper.h:34
jet::Interpolate::stringToEnum
TypeEnum stringToEnum(const TString &type)
Definition: UncertaintyEnum.cxx:657
jet::ComponentHelper::LargeRJetTruthLabelStr
TString LargeRJetTruthLabelStr
Definition: ConfigHelper.h:56
jet::ComponentHelper::uncNameList
TString uncNameList
Definition: ConfigHelper.h:42
jet::ComponentHelper::isSpecial
bool isSpecial
Definition: ConfigHelper.h:67
jet::FlavourComp::stringToEnum
TypeEnum stringToEnum(const TString &type)
Definition: UncertaintyEnum.cxx:542
jet::ComponentHelper::LargeRJetTruthLabelsForSFstr
TString LargeRJetTruthLabelsForSFstr
Definition: ConfigHelper.h:57
jet::CompParametrization::stringToEnum
TypeEnum stringToEnum(const TString &type)
Definition: UncertaintyEnum.cxx:112
jet::ComponentHelper::truthLabelStr
TString truthLabelStr
Definition: ConfigHelper.h:52
jet::ComponentHelper::subCompList
TString subCompList
Definition: ConfigHelper.h:44
jet::ComponentHelper::RegionForSFstr
TString RegionForSFstr
Definition: ConfigHelper.h:58
jet::ComponentHelper::interpolStr
TString interpolStr
Definition: ConfigHelper.h:40
jet::CompFlavorLabelVar::UNKNOWN
@ UNKNOWN
Definition: UncertaintyEnum.h:132
jet::ComponentHelper::parametrization
CompParametrization::TypeEnum parametrization
Definition: ConfigHelper.h:63
jet::ComponentHelper::interpolate
Interpolate::TypeEnum interpolate
Definition: ConfigHelper.h:71
jet::JetTopology::stringToEnum
TypeEnum stringToEnum(const TString &type)
Definition: UncertaintyEnum.cxx:622
jet::ComponentHelper::RegionForSF
CompTaggerRegionVar::TypeEnum RegionForSF
Definition: ConfigHelper.h:80
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