|
ATLAS Offline Software
|
Go to the documentation of this file.
16 bool getBinContentAndError(
const TH2 &
h,
float x,
float y,
float &
content,
float &
error) {
24 content =
h.GetBinContent(xBin, yBin);
25 error =
h.GetBinError(xBin, yBin);
34 ATH_MSG_WARNING(
"No truth requirement will be performed, which is not recommended.");
44 return StatusCode::SUCCESS;
89 return StatusCode::SUCCESS;
92 if (resolved.empty()) {
94 return StatusCode::FAILURE;
96 std::unique_ptr<TFile>
fIn(TFile::Open(resolved.c_str(),
"READ"));
99 return StatusCode::FAILURE;
102 std::string jvtName =
"Jvt" +
wp;
106 "Could not open SF histogram "
107 << jvtName <<
". Please check the supported working points.");
108 return StatusCode::FAILURE;
111 std::string effName =
"Eff" +
wp;
115 "Could not open efficiency histogram "
116 << jvtName <<
". Please check the supported working points.");
117 return StatusCode::FAILURE;
121 return StatusCode::SUCCESS;
125 float baseFactor = 1;
128 if (!getBinContentAndError(*
m_jvtHist,
x,
y, baseFactor, errorTerm)) {
142 float baseFactor, errorTerm, effFactor, errorEffTerm;
143 if (!getBinContentAndError(*
m_jvtHist,
x,
y, baseFactor, errorTerm) ||
144 !getBinContentAndError(*
m_effHist,
x,
y, effFactor, errorEffTerm)) {
151 sf = (1 - baseFactor * effFactor) / (1 - effFactor);
int getBin(double x, double min, double step, int clamp_max)
Select isolated Photons, Electrons and Muons.
@ OutOfValidityRange
Input object is out of validity range.
@ Error
Some error happened during the object correction.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
@ Ok
The correction was done successfully.
#define ATH_MSG_WARNING(x)
Return value from object correction CP tools.