Skip to content

Commit

Permalink
Option to fallback to default calibration in automatic configuration …
Browse files Browse the repository at this point in the history
…of MC-to-MC b-tagging SFs (#1689)

* adding option to fallback to default calibration in auto configuration the b-tagging MC-to-MC SFs

* make warnings when using fallback option stronger
  • Loading branch information
miholzbo committed May 21, 2024
1 parent 03f2e09 commit 61bc282
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
28 changes: 22 additions & 6 deletions Root/BJetEfficiencyCorrector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,17 @@ EL::StatusCode BJetEfficiencyCorrector :: initialize ()
calibration="700660";
break;
default:
ANA_MSG_ERROR("Cannot determine MC shower type for sample " << gridName << ".");
return EL::StatusCode::FAILURE;
break;
if (m_allowCalibrationFallback) {
ANA_MSG_WARNING("Cannot determine MC shower type for sample " << gridName << ", falling back to 'default'.");
ANA_MSG_WARNING("Please double-check if this is appropriate for your sample, otherwise you have specify the MC-to-MC calibration manually!");
calibration="default";
break;
}
else {
ANA_MSG_ERROR("Cannot determine MC shower type for sample " << gridName << ".");
return EL::StatusCode::FAILURE;
break;
}
}
} else {

Expand Down Expand Up @@ -280,9 +288,17 @@ EL::StatusCode BJetEfficiencyCorrector :: initialize ()
calibration="412116";
break;
case HelperFunctions::Unknown:
ANA_MSG_ERROR("Cannot determine MC shower type for sample " << gridName << ".");
return EL::StatusCode::FAILURE;
break;
if (m_allowCalibrationFallback) {
ANA_MSG_WARNING("Cannot determine MC shower type for sample " << gridName << ", falling back to 'default'.");
ANA_MSG_WARNING("Please double-check if this is appropriate for your sample, otherwise you have specify the MC-to-MC calibration manually!");
calibration="default";
break;
}
else {
ANA_MSG_ERROR("Cannot determine MC shower type for sample " << gridName << ".");
return EL::StatusCode::FAILURE;
break;
}
}
}
} else { makeMCIndexMap(m_EfficiencyCalibration); }
Expand Down
2 changes: 2 additions & 0 deletions xAODAnaHelpers/BJetEfficiencyCorrector.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class BJetEfficiencyCorrector : public xAH::Algorithm
/// @brief Calibration to use for MC (EfficiencyB/C/T/LightCalibrations), "auto" to determine from sample name (multiple samples can be provided as long as they are separated by ';')
/// @brief Example: "410470;410250;410558;410464" (Pythia8,Sherpa22,Herwig7,MG)
std::string m_EfficiencyCalibration = "";
/// @brief Allow to fallback to "default" configuration when the shower type can't be determined automatically
bool m_allowCalibrationFallback = false;

/// @brief To change NP scheme for b-tagging systematics - Loose is the default value in athena
std::string m_EigenvectorReductionB = "Loose";
Expand Down

0 comments on commit 61bc282

Please sign in to comment.