Skip to content
Snippets Groups Projects
Commit 108d26fe authored by Nils Krumnack's avatar Nils Krumnack
Browse files

update BTaggingEfficiencyAlg to use ISelectionAccessor

This wasn't available when I created that merge request, adding it
now.


Former-commit-id: 7bd48fdee689e35c32b670e24009123c6d5c40f9
parent 69ea84ca
No related branches found
No related tags found
No related merge requests found
......@@ -11,10 +11,12 @@
#include <AnaAlgorithm/AnaAlgorithm.h>
#include <FTagAnalysisInterfaces/IBTaggingEfficiencyTool.h>
#include <SelectionHelpers/OutOfValidityHelper.h>
#include <SelectionHelpers/ISelectionAccessor.h>
#include <SystematicsHandles/SysCopyHandle.h>
#include <SystematicsHandles/SysListHandle.h>
#include <SystematicsHandles/SysReadHandle.h>
#include <xAODJet/JetContainer.h>
#include <memory>
namespace CP
{
......@@ -67,7 +69,7 @@ namespace CP
/// \brief the accessor for \ref m_selectionDecoration
private:
std::unique_ptr<const SG::AuxElement::Accessor<SelectionType> > m_selectionAccessor;
std::unique_ptr<ISelectionAccessor> m_selectionAccessor;
/// \brief only run the inefficency for all jets
private:
......
......@@ -42,7 +42,7 @@ namespace CP
ANA_MSG_ERROR ("can't specify both onlyInefficiency and selectionDecoration");
return StatusCode::FAILURE;
}
m_selectionAccessor = std::make_unique<SG::AuxElement::Accessor<SelectionType> > (m_selectionDecoration);
ANA_CHECK (makeSelectionAccessor (m_selectionDecoration, m_selectionAccessor));
}
if (m_efficiencyDecoration.empty())
......@@ -84,8 +84,7 @@ namespace CP
// it. You do the pre-selection via a view container like
// for all the other CP algorithms.
if (!m_onlyInefficiency &&
(!m_selectionAccessor ||
(*m_selectionAccessor) (*jet) == selectionAccept()))
(!m_selectionAccessor || m_selectionAccessor->getBool (*jet)))
{
ANA_CHECK_CORRECTION (m_outOfValidity, *jet, m_efficiencyTool->getScaleFactor (*jet, eff));
} else
......
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