Skip to content
Snippets Groups Projects
Commit bc068f43 authored by Tadej Novak's avatar Tadej Novak Committed by Atlas Nightlybuild
Browse files

Merge branch 'cp-ftagfix' into 'master'

CP algs: Only use efficiency SFs in case of Continuous FTag WP

See merge request !57420

(cherry picked from commit 87fcb6c4)

e8778b94 Only use efficiency SFs in case of Continuous FTag WP
parent 9b2d7cb9
5 merge requests!76035Updated rel21 number,!63304adding missing electron iso WPs (Tight_VarRad, Loose_VarRad, TightTrackOnly_VarRad),!61521fix maxPVrefit,!59663fixed a typo in HIGG8D1 format (followup of https://gitlab.cern.ch/atlas/athena/-/merge_requests/59575),!57449Sweeping !57420 from master to 21.2. CP algs: Only use efficiency SFs in case of Continuous FTag WP
Pipeline #4608056 passed
......@@ -71,6 +71,10 @@ namespace CP
SysReadSelectionHandle m_selectionHandle {
this, "selectionDecoration", "", "the decoration for the asg selection"};
/// \brief only run the efficency for all jets
private:
bool m_onlyEfficiency {false};
/// \brief only run the inefficency for all jets
private:
bool m_onlyInefficiency {false};
......
......@@ -25,6 +25,7 @@ namespace CP
, m_efficiencyTool ("BTaggingEfficiencyTool", this)
{
declareProperty ("efficiencyTool", m_efficiencyTool, "the calibration and smearing tool we apply");
declareProperty ("onlyEfficiency", m_onlyEfficiency, "whether only to calculate efficiencies");
declareProperty ("onlyInefficiency", m_onlyInefficiency, "whether only to calculate inefficiencies");
}
......@@ -33,9 +34,9 @@ namespace CP
StatusCode BTaggingEfficiencyAlg ::
initialize ()
{
if (m_onlyInefficiency && m_selectionHandle)
if (m_onlyEfficiency && m_onlyInefficiency)
{
ANA_MSG_ERROR ("can't specify both onlyInefficiency and selectionDecoration");
ANA_MSG_ERROR ("can't specify both onlyEfficiency and onlyInefficiency");
return StatusCode::FAILURE;
}
......@@ -83,7 +84,7 @@ namespace CP
// this selection accessor/decoration has nothing to do with
// it. You do the pre-selection via a view container like
// for all the other CP algorithms.
if (!m_onlyInefficiency && m_selectionHandle.getBool (*jet, sys))
if (m_onlyEfficiency || (!m_onlyInefficiency && m_selectionHandle.getBool (*jet, sys)))
{
ANA_CHECK_CORRECTION (m_outOfValidity, *jet, m_efficiencyTool->getScaleFactor (*jet, sf));
} else
......
......@@ -144,6 +144,7 @@ def makeFTagAnalysisSequence( seq, dataType, jetCollection,
alg.efficiencyTool.EfficiencyLightCalibrations = DSID
alg.scaleFactorDecoration = 'ftag_effSF_' + btagger + '_' + btagWP + '_%SYS%'
alg.selectionDecoration = 'ftag_select_' + btagger + '_' + btagWP + ',as_char'
alg.onlyEfficiency = btagWP == 'Continuous'
alg.outOfValidity = 2
alg.outOfValidityDeco = 'no_ftag_' + btagger + '_' + btagWP
if preselection is not None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment