22 , m_smearOnlyMC(false)
23 , m_ptNomHistData(nullptr)
24 , m_ptNomParamData(CompParametrization::UNKNOWN)
25 , m_ptNomMassDefData(CompMassDef::UNKNOWN)
26 , m_ptNomHistMC(nullptr)
27 , m_ptNomParamMC(CompParametrization::UNKNOWN)
28 , m_ptNomMassDefMC(CompMassDef::UNKNOWN)
29 , m_fvNomHistData(nullptr)
30 , m_fvNomParamData(CompParametrization::UNKNOWN)
31 , m_fvNomMassDefData(CompMassDef::UNKNOWN)
32 , m_fvNomHistMC(nullptr)
33 , m_fvNomParamMC(CompParametrization::UNKNOWN)
34 , m_fvNomMassDefMC(CompMassDef::UNKNOWN)
35 , m_mQCDNomHistData(nullptr)
36 , m_mQCDNomParamData(CompParametrization::UNKNOWN)
37 , m_mQCDNomMassDefData(CompMassDef::UNKNOWN)
38 , m_mQCDNomHistMC(nullptr)
39 , m_mQCDNomParamMC(CompParametrization::UNKNOWN)
40 , m_mQCDNomMassDefMC(CompMassDef::UNKNOWN)
41 , m_mWZNomHistData(nullptr)
42 , m_mWZNomParamData(CompParametrization::UNKNOWN)
43 , m_mWZNomMassDefData(CompMassDef::UNKNOWN)
44 , m_mWZNomHistMC(nullptr)
45 , m_mWZNomParamMC(CompParametrization::UNKNOWN)
46 , m_mWZNomMassDefMC(CompMassDef::UNKNOWN)
47 , m_mHbbNomHistData(nullptr)
48 , m_mHbbNomParamData(CompParametrization::UNKNOWN)
49 , m_mHbbNomMassDefData(CompMassDef::UNKNOWN)
50 , m_mHbbNomHistMC(nullptr)
51 , m_mHbbNomParamMC(CompParametrization::UNKNOWN)
52 , m_mHbbNomMassDefMC(CompMassDef::UNKNOWN)
53 , m_mTopNomHistData(nullptr)
54 , m_mTopNomParamData(CompParametrization::UNKNOWN)
55 , m_mTopNomMassDefData(CompMassDef::UNKNOWN)
56 , m_mTopNomHistMC(nullptr)
57 , m_mTopNomParamMC(CompParametrization::UNKNOWN)
58 , m_mTopNomMassDefMC(CompMassDef::UNKNOWN)
62 :
asg::AsgMessaging(toCopy.m_name)
63 , m_name(toCopy.m_name)
64 , m_jetDef(toCopy.m_jetDef)
65 , m_isInit(toCopy.m_isInit)
66 , m_smearOnlyMC(toCopy.m_smearOnlyMC)
68 , m_ptNomParamData(toCopy.m_ptNomParamData)
69 , m_ptNomMassDefData(toCopy.m_ptNomMassDefData)
71 , m_ptNomParamMC(toCopy.m_ptNomParamMC)
72 , m_ptNomMassDefMC(toCopy.m_ptNomMassDefMC)
74 , m_fvNomParamData(toCopy.m_fvNomParamData)
75 , m_fvNomMassDefData(toCopy.m_fvNomMassDefData)
77 , m_fvNomParamMC(toCopy.m_fvNomParamMC)
78 , m_fvNomMassDefMC(toCopy.m_fvNomMassDefMC)
80 , m_mQCDNomParamData(toCopy.m_mQCDNomParamData)
81 , m_mQCDNomMassDefData(toCopy.m_mQCDNomMassDefData)
83 , m_mQCDNomParamMC(toCopy.m_mQCDNomParamMC)
84 , m_mQCDNomMassDefMC(toCopy.m_mQCDNomMassDefMC)
86 , m_mWZNomParamData(toCopy.m_mWZNomParamData)
87 , m_mWZNomMassDefData(toCopy.m_mWZNomMassDefData)
89 , m_mWZNomParamMC(toCopy.m_mWZNomParamMC)
90 , m_mWZNomMassDefMC(toCopy.m_mWZNomMassDefMC)
92 , m_mHbbNomParamData(toCopy.m_mHbbNomParamData)
93 , m_mHbbNomMassDefData(toCopy.m_mHbbNomMassDefData)
95 , m_mHbbNomParamMC(toCopy.m_mHbbNomParamMC)
96 , m_mHbbNomMassDefMC(toCopy.m_mHbbNomMassDefMC)
98 , m_mTopNomParamData(toCopy.m_mTopNomParamData)
99 , m_mTopNomMassDefData(toCopy.m_mTopNomMassDefData)
101 , m_mTopNomParamMC(toCopy.m_mTopNomParamMC)
102 , m_mTopNomMassDefMC(toCopy.m_mTopNomMassDefMC)
124 TString
value = settings.GetValue(
key,defaultValue);
128 return StatusCode::SUCCESS;
131 if (!
value.Contains(
","))
133 ATH_MSG_ERROR(
"Key of " <<
key.Data() <<
" has an unexpected value format (missing comma): " <<
value.Data());
134 return StatusCode::FAILURE;
138 std::vector<TString> splitValue = utils::vectorize<TString>(
value,
", ");
139 if (splitValue.size() < 3)
141 ATH_MSG_ERROR(
"Key of " <<
key.Data() <<
" has unexpected value format (less than 3 strings): " <<
value.Data());
142 return StatusCode::FAILURE;
144 else if (splitValue.size() > 4)
146 ATH_MSG_ERROR(
"Key of " <<
key.Data() <<
" has unexpected value format (more than 4 strings): " <<
value.Data());
147 return StatusCode::FAILURE;
154 ATH_MSG_ERROR(
"Key of " <<
key.Data() <<
" has unexpected parametrization value: " << splitValue.at(1));
155 return StatusCode::FAILURE;
162 ATH_MSG_ERROR(
"Key of " <<
key.Data() <<
" has unexpected interpolation type: " << splitValue.at(2));
163 return StatusCode::FAILURE;
169 if (splitValue.size() != 4)
171 ATH_MSG_ERROR(
"Key of " <<
key.Data() <<
" has unexpected value format (missing mass definition): " <<
value.Data());
172 return StatusCode::FAILURE;
177 ATH_MSG_ERROR(
"Key of " <<
key.Data() <<
" has unexpected mass definition: " << splitValue.at(3));
178 return StatusCode::FAILURE;
183 TString
histName = splitValue.at(0);
184 histName.ReplaceAll(
"MCTYPE",MCtype);
190 if (
hist->initialize(histFile).isFailure())
191 return StatusCode::FAILURE;
196 return StatusCode::SUCCESS;
204 return StatusCode::FAILURE;
230 return StatusCode::FAILURE;
232 return StatusCode::FAILURE;
235 ATH_MSG_ERROR(
"There should never be a nominal data resolution without a nominal MC resolution (pT)");
236 return StatusCode::FAILURE;
241 return StatusCode::FAILURE;
243 return StatusCode::FAILURE;
246 ATH_MSG_ERROR(
"There should never be a nominal data resolution without a nominal MC resolution (four-vector)");
247 return StatusCode::FAILURE;
256 return StatusCode::FAILURE;
258 return StatusCode::FAILURE;
261 ATH_MSG_ERROR(
"There should never be a nominal data resolution without a nominal MC resolution (four-vector)");
262 return StatusCode::FAILURE;
267 return StatusCode::FAILURE;
269 return StatusCode::FAILURE;
272 ATH_MSG_ERROR(
"There should never be a nominal data resolution without a nominal MC resolution (four-vector)");
273 return StatusCode::FAILURE;
278 return StatusCode::FAILURE;
280 return StatusCode::FAILURE;
283 ATH_MSG_ERROR(
"There should never be a nominal data resolution without a nominal MC resolution (four-vector)");
284 return StatusCode::FAILURE;
289 return StatusCode::FAILURE;
291 return StatusCode::FAILURE;
294 ATH_MSG_ERROR(
"There should never be a nominal data resolution without a nominal MC resolution (four-vector)");
295 return StatusCode::FAILURE;
299 TString smearType = settings.GetValue(
"ResolutionSmearOnlyMC",
"");
302 if (!smearType.CompareTo(
"true",TString::kIgnoreCase))
304 else if (!smearType.CompareTo(
"false",TString::kIgnoreCase))
308 ATH_MSG_ERROR(
"The value of ResolutionSmearOnlyMC doesn't look like the expected boolean: " << smearType.Data());
309 return StatusCode::FAILURE;
319 ATH_MSG_ERROR(
"Requested full smearing correlations (both data and MC), but only provided the MC nominal histogram for pT");
320 return StatusCode::FAILURE;
324 ATH_MSG_ERROR(
"Requested full smearing correlations (both data and MC), but only provided the MC nominal histogram for fourvec");
325 return StatusCode::FAILURE;
329 ATH_MSG_ERROR(
"Requested full smearing correlations (both data and MC), but only provided the MC nominal histogram for mQCD");
330 return StatusCode::FAILURE;
334 ATH_MSG_ERROR(
"Requested full smearing correlations (both data and MC), but only provided the MC nominal histogram for mWZ");
335 return StatusCode::FAILURE;
339 ATH_MSG_ERROR(
"Requested full smearing correlations (both data and MC), but only provided the MC nominal histogram for mHbb");
340 return StatusCode::FAILURE;
344 ATH_MSG_ERROR(
"Requested full smearing correlations (both data and MC), but only provided the MC nominal histogram for mTop");
345 return StatusCode::FAILURE;
351 return StatusCode::SUCCESS;
363 ATH_MSG_ERROR(
"Asking for the nominal resolution before initialization");
437 ATH_MSG_ERROR(
"Mass resolution depends on a single jet topology, not a mixed topology");
443 ATH_MSG_ERROR(
"Mass resolution depends on the jet topology, which was not specified");
484 ATH_MSG_ERROR(
"Asked for the smearing factor for a non-resolution component");
487 return std::tuple<const UncertaintyHistogram*,CompParametrization::TypeEnum,CompMassDef::TypeEnum>(
resolution,param,massDef);
494 throw std::runtime_error(
"Asking for nominal resolution information before initialization");
528 throw std::runtime_error(Form(
"Unexpected topology type, cannot determine if relevant info exists: %s",
JetTopology::enumToString(topology).
Data()));