ATLAS Offline Software
Loading...
Searching...
No Matches
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{ }
const float energyScale

◆ 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))),
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
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 }
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}
PileupComp::TypeEnum pileupType
std::vector< TString > LargeRJetTruthLabelStrs
CompTaggerRegionVar::TypeEnum RegionForSF
std::vector< int > truthLabels
CompScaleVar::TypeEnum scaleVar
CompMassDef::TypeEnum massDef
TString constrainZresponseFunc
std::vector< CompFlavorLabelVar::TypeEnum > LargeRJetTruthLabelsForSF
JetTopology::TypeEnum topology
std::vector< TString > uncNames
std::vector< LargeRJetTruthLabel::TypeEnum > LargeRJetTruthLabels
FlavourComp::TypeEnum flavourType
CompParametrization::TypeEnum parametrization
CombMassComp::TypeEnum combMassType
TString constrainZresponseStr
std::vector< TString > subComps
TString LargeRJetTruthLabelStr
TString LargeRJetTruthLabelName
std::vector< TString > LargeRJetTruthLabelsForSFstrs
Interpolate::TypeEnum interpolate
TString LargeRJetTruthLabelsForSFstr
TypeEnum stringToEnum(const TString &name)
TypeEnum stringToEnum(const TString &type)
TypeEnum stringToEnum(const TString &type)
TypeEnum stringToEnum(const TString &type)
TypeEnum stringToEnum(const TString &type)
TypeEnum stringToEnum(const TString &type)
TypeEnum stringToEnum(const TString &type)
TypeEnum stringToEnum(const TString &type)
TypeEnum stringToEnum(const TString &type)
TypeEnum stringToEnum(const TString &type)
TypeEnum stringToEnum(const TString &type)
bool vectorize(const TString &str, const TString &sep, std::vector< T > &result)

◆ ~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.

70{};

◆ constrainZresponse

bool jet::ComponentHelper::constrainZresponse {}

Definition at line 75 of file ConfigHelper.h.

75{};

◆ 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.

69{};

◆ groupNum

int jet::ComponentHelper::groupNum {}

Definition at line 46 of file ConfigHelper.h.

46{};

◆ interpolate

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

Definition at line 71 of file ConfigHelper.h.

71{};

◆ 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.

67{};

◆ 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.

64{};

◆ 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.

63{};

◆ pileupType

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

Definition at line 68 of file ConfigHelper.h.

68{};

◆ RegionForSF

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

Definition at line 80 of file ConfigHelper.h.

80{};

◆ 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.

65{};

◆ 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.

45{};

◆ 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.

66{};

◆ 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: