Commit efa2f2da authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'cp/read-master' into 'master'

CP algs: move more algorithms to use SysReadHandle

See merge request atlas/athena!47268
parents a5e8835d e2dc034e
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#define ASG_ANALYSIS_ALGORITHMS__ASG_CLASSIFICATION_DECORATION_ALG_H #define ASG_ANALYSIS_ALGORITHMS__ASG_CLASSIFICATION_DECORATION_ALG_H
#include <AnaAlgorithm/AnaAlgorithm.h> #include <AnaAlgorithm/AnaAlgorithm.h>
#include <SystematicsHandles/SysCopyHandle.h>
#include <SystematicsHandles/SysListHandle.h> #include <SystematicsHandles/SysListHandle.h>
#include <SystematicsHandles/SysReadHandle.h>
#include <xAODBase/IParticle.h> #include <xAODBase/IParticle.h>
#include <xAODBase/IParticleContainer.h> #include <xAODBase/IParticleContainer.h>
...@@ -46,7 +46,7 @@ private: ...@@ -46,7 +46,7 @@ private:
/// \brief particles container handle /// \brief particles container handle
private: private:
CP::SysCopyHandle<xAOD::IParticleContainer> m_particlesHandle { CP::SysReadHandle<xAOD::IParticleContainer> m_particlesHandle {
this, "particles", "", "the container to use"}; this, "particles", "", "the container to use"};
/// \brief the decoration for the truth classification /// \brief the decoration for the truth classification
...@@ -55,7 +55,7 @@ private: ...@@ -55,7 +55,7 @@ private:
/// \brief the accessor for \ref m_truthClassificationDecoration /// \brief the accessor for \ref m_truthClassificationDecoration
private: private:
std::unique_ptr<const SG::AuxElement::Accessor<unsigned int> > m_classificationAccessor {}; std::unique_ptr<const SG::AuxElement::Decorator<unsigned int> > m_classificationDecorator {};
}; };
} // namespace CP } // namespace CP
......
...@@ -13,8 +13,9 @@ ...@@ -13,8 +13,9 @@
#include <PATCore/IAsgSelectionTool.h> #include <PATCore/IAsgSelectionTool.h>
#include <SelectionHelpers/ISelectionAccessor.h> #include <SelectionHelpers/ISelectionAccessor.h>
#include <SelectionHelpers/SelectionReadHandle.h> #include <SelectionHelpers/SelectionReadHandle.h>
#include <SystematicsHandles/SysCopyHandle.h>
#include <SystematicsHandles/SysListHandle.h> #include <SystematicsHandles/SysListHandle.h>
#include <SystematicsHandles/SysReadHandle.h>
#include <xAODBase/IParticleContainer.h>
namespace CP namespace CP
{ {
...@@ -69,7 +70,7 @@ namespace CP ...@@ -69,7 +70,7 @@ namespace CP
/// \brief the particle continer we run on /// \brief the particle continer we run on
private: private:
SysCopyHandle<xAOD::IParticleContainer> m_particlesHandle { SysReadHandle<xAOD::IParticleContainer> m_particlesHandle {
this, "particles", "", "the asg collection to run on"}; this, "particles", "", "the asg collection to run on"};
/// \brief the preselection we apply to our input /// \brief the preselection we apply to our input
......
...@@ -29,7 +29,7 @@ StatusCode AsgClassificationDecorationAlg::initialize() ...@@ -29,7 +29,7 @@ StatusCode AsgClassificationDecorationAlg::initialize()
return StatusCode::FAILURE; return StatusCode::FAILURE;
} }
m_classificationAccessor = std::make_unique<SG::AuxElement::Accessor<unsigned int> > (m_classificationDecoration); m_classificationDecorator = std::make_unique<SG::AuxElement::Decorator<unsigned int> > (m_classificationDecoration);
ANA_CHECK (m_particlesHandle.initialize (m_systematicsList)); ANA_CHECK (m_particlesHandle.initialize (m_systematicsList));
ANA_CHECK(m_systematicsList.initialize()); ANA_CHECK(m_systematicsList.initialize());
...@@ -45,13 +45,14 @@ StatusCode AsgClassificationDecorationAlg::execute() ...@@ -45,13 +45,14 @@ StatusCode AsgClassificationDecorationAlg::execute()
{ {
for (const auto& sys : m_systematicsList.systematicsVector()) for (const auto& sys : m_systematicsList.systematicsVector())
{ {
xAOD::IParticleContainer *particles{}; const xAOD::IParticleContainer *particles{};
ANA_CHECK(m_particlesHandle.getCopy(particles, sys)); ANA_CHECK(m_particlesHandle.retrieve(particles, sys));
for (xAOD::IParticle *particle : *particles) { for (const xAOD::IParticle *particle : *particles)
{
unsigned int classification{}; unsigned int classification{};
ANA_CHECK(m_tool->classify(*particle, classification)); ANA_CHECK(m_tool->classify(*particle, classification));
(*m_classificationAccessor)(*particle) = classification; (*m_classificationDecorator)(*particle) = classification;
} }
} }
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
......
...@@ -116,9 +116,9 @@ namespace CP ...@@ -116,9 +116,9 @@ namespace CP
for (const auto& sys : m_systematicsList.systematicsVector()) for (const auto& sys : m_systematicsList.systematicsVector())
{ {
xAOD::IParticleContainer *particles = nullptr; const xAOD::IParticleContainer *particles = nullptr;
ANA_CHECK (m_particlesHandle.getCopy (particles, sys)); ANA_CHECK (m_particlesHandle.retrieve (particles, sys));
for (xAOD::IParticle *particle : *particles) for (const xAOD::IParticle *particle : *particles)
{ {
asg::AcceptData acceptData (&m_accept); asg::AcceptData acceptData (&m_accept);
...@@ -127,9 +127,9 @@ namespace CP ...@@ -127,9 +127,9 @@ namespace CP
std::size_t cutIndex {0}; std::size_t cutIndex {0};
const xAOD::TrackParticle *track {nullptr}; const xAOD::TrackParticle *track {nullptr};
if (const xAOD::Muon *muon = dynamic_cast<xAOD::Muon*>(particle)) if (const xAOD::Muon *muon = dynamic_cast<const xAOD::Muon *>(particle))
track = muon->primaryTrackParticle(); track = muon->primaryTrackParticle();
else if (const xAOD::Electron *electron = dynamic_cast<xAOD::Electron*>(particle)) else if (const xAOD::Electron *electron = dynamic_cast<const xAOD::Electron *>(particle))
track = electron->trackParticle(); track = electron->trackParticle();
else else
{ {
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
#include <SelectionHelpers/ISelectionAccessor.h> #include <SelectionHelpers/ISelectionAccessor.h>
#include <SelectionHelpers/OutOfValidityHelper.h> #include <SelectionHelpers/OutOfValidityHelper.h>
#include <SelectionHelpers/SelectionReadHandle.h> #include <SelectionHelpers/SelectionReadHandle.h>
#include <SystematicsHandles/SysCopyHandle.h>
#include <SystematicsHandles/SysListHandle.h> #include <SystematicsHandles/SysListHandle.h>
#include <SystematicsHandles/SysReadHandle.h>
namespace CP namespace CP
{ {
...@@ -53,7 +53,7 @@ namespace CP ...@@ -53,7 +53,7 @@ namespace CP
/// \brief the particle continer we run on /// \brief the particle continer we run on
private: private:
SysCopyHandle<xAOD::EgammaContainer> m_egammasHandle { SysReadHandle<xAOD::EgammaContainer> m_egammasHandle {
this, "egammas", "Electrons", "the egamma collection to run on"}; this, "egammas", "Electrons", "the egamma collection to run on"};
/// \brief the decoration for the asg selection /// \brief the decoration for the asg selection
......
...@@ -58,9 +58,9 @@ namespace CP ...@@ -58,9 +58,9 @@ namespace CP
{ {
for (const auto& sys : m_systematicsList.systematicsVector()) for (const auto& sys : m_systematicsList.systematicsVector())
{ {
xAOD::EgammaContainer *egammas = nullptr; const xAOD::EgammaContainer *egammas = nullptr;
ANA_CHECK (m_egammasHandle.getCopy (egammas, sys)); ANA_CHECK (m_egammasHandle.retrieve (egammas, sys));
for (xAOD::Egamma *egamma : *egammas) for (const xAOD::Egamma *egamma : *egammas)
{ {
if (m_preselection.getBool (*egamma)) if (m_preselection.getBool (*egamma))
{ {
......
...@@ -94,7 +94,6 @@ def makePhotonAnalysisSequence( dataType, workingPoint, ...@@ -94,7 +94,6 @@ def makePhotonAnalysisSequence( dataType, workingPoint,
addPrivateTool( alg, 'selectionTool', 'CP::EgammaIsGoodOQSelectionTool' ) addPrivateTool( alg, 'selectionTool', 'CP::EgammaIsGoodOQSelectionTool' )
alg.selectionTool.Mask = xAOD.EgammaParameters.BADCLUSPHOTON alg.selectionTool.Mask = xAOD.EgammaParameters.BADCLUSPHOTON
seq.append( alg, inputPropName = 'particles', seq.append( alg, inputPropName = 'particles',
outputPropName = 'particlesOut',
stageName = 'calibration', stageName = 'calibration',
metaConfig = {'selectionDecorNames' : [alg.selectionDecoration], metaConfig = {'selectionDecorNames' : [alg.selectionDecoration],
'selectionDecorCount' : [1]}, 'selectionDecorCount' : [1]},
...@@ -154,7 +153,7 @@ def makePhotonAnalysisSequence( dataType, workingPoint, ...@@ -154,7 +153,7 @@ def makePhotonAnalysisSequence( dataType, workingPoint,
alg.selectionDecoration = 'isolated' + postfix alg.selectionDecoration = 'isolated' + postfix
addPrivateTool( alg, 'selectionTool', 'CP::IsolationSelectionTool' ) addPrivateTool( alg, 'selectionTool', 'CP::IsolationSelectionTool' )
alg.selectionTool.PhotonWP = isolationWP alg.selectionTool.PhotonWP = isolationWP
seq.append( alg, inputPropName = 'egammas', outputPropName = 'egammasOut', seq.append( alg, inputPropName = 'egammas',
stageName = 'selection', stageName = 'selection',
metaConfig = {'selectionDecorNames' : [alg.selectionDecoration], metaConfig = {'selectionDecorNames' : [alg.selectionDecoration],
'selectionDecorCount' : [1]} ) 'selectionDecorCount' : [1]} )
......
...@@ -84,15 +84,14 @@ def makeFTagAnalysisSequence( seq, dataType, jetCollection, ...@@ -84,15 +84,14 @@ def makeFTagAnalysisSequence( seq, dataType, jetCollection,
addPrivateTool( alg, 'selectionTool', 'CP::AsgPtEtaSelectionTool' ) addPrivateTool( alg, 'selectionTool', 'CP::AsgPtEtaSelectionTool' )
alg.selectionTool.minPt = minPt alg.selectionTool.minPt = minPt
alg.selectionTool.maxEta = 2.5 alg.selectionTool.maxEta = 2.5
alg.selectionDecoration = 'ftag_kin_select' alg.selectionDecoration = 'ftag_kin_select_' + btagger + '_' + btagWP
seq.append( alg, inputPropName = 'particles', seq.append( alg, inputPropName = 'particles' )
outputPropName = 'particlesOut' )
# Set up an algorithm that makes a view container using the selections # Set up an algorithm that makes a view container using the selections
# performed previously: # performed previously:
alg = createAlgorithm( 'CP::AsgViewFromSelectionAlg', alg = createAlgorithm( 'CP::AsgViewFromSelectionAlg',
'FTagKinViewFromSelectionAlg'+postfix ) 'FTagKinViewFromSelectionAlg'+postfix )
alg.selection = [ 'ftag_kin_select' ] alg.selection = [ 'ftag_kin_select_' + btagger + '_' + btagWP ]
seq.append( alg, inputPropName = 'input', outputPropName = 'output', seq.append( alg, inputPropName = 'input', outputPropName = 'output',
stageName = 'selection' ) stageName = 'selection' )
...@@ -108,7 +107,6 @@ def makeFTagAnalysisSequence( seq, dataType, jetCollection, ...@@ -108,7 +107,6 @@ def makeFTagAnalysisSequence( seq, dataType, jetCollection,
alg.preselection = preselection alg.preselection = preselection
alg.selectionDecoration = 'ftag_select_' + btagger + '_' + btagWP + ',as_char' alg.selectionDecoration = 'ftag_select_' + btagger + '_' + btagWP + ',as_char'
seq.append( alg, inputPropName = 'particles', seq.append( alg, inputPropName = 'particles',
outputPropName = 'particlesOut',
stageName = 'selection' ) stageName = 'selection' )
if not noEfficiency and dataType != 'data': if not noEfficiency and dataType != 'data':
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
#include <JetInterface/IJetSelector.h> #include <JetInterface/IJetSelector.h>
#include <SelectionHelpers/ISelectionAccessor.h> #include <SelectionHelpers/ISelectionAccessor.h>
#include <SelectionHelpers/SelectionReadHandle.h> #include <SelectionHelpers/SelectionReadHandle.h>
#include <SystematicsHandles/SysCopyHandle.h>
#include <SystematicsHandles/SysListHandle.h> #include <SystematicsHandles/SysListHandle.h>
#include <SystematicsHandles/SysReadHandle.h>
#include <xAODJet/JetContainer.h> #include <xAODJet/JetContainer.h>
namespace CP namespace CP
...@@ -46,7 +46,7 @@ namespace CP ...@@ -46,7 +46,7 @@ namespace CP
/// \brief the jet collection we run on /// \brief the jet collection we run on
private: private:
SysCopyHandle<xAOD::JetContainer> m_jetHandle { SysReadHandle<xAOD::JetContainer> m_jetHandle {
this, "jets", "AntiKt4EMTopoJets", "the jet collection to run on"}; this, "jets", "AntiKt4EMTopoJets", "the jet collection to run on"};
/// \brief the preselection we apply to our input /// \brief the preselection we apply to our input
......
...@@ -56,9 +56,9 @@ namespace CP ...@@ -56,9 +56,9 @@ namespace CP
{ {
for (const auto& sys : m_systematicsList.systematicsVector()) for (const auto& sys : m_systematicsList.systematicsVector())
{ {
xAOD::JetContainer *jets = nullptr; const xAOD::JetContainer *jets = nullptr;
ANA_CHECK (m_jetHandle.getCopy (jets, sys)); ANA_CHECK (m_jetHandle.retrieve (jets, sys));
for (xAOD::Jet *jet : *jets) for (const xAOD::Jet *jet : *jets)
{ {
if (m_preselection.getBool (*jet)) if (m_preselection.getBool (*jet))
{ {
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
#include <IsolationSelection/IIsolationSelectionTool.h> #include <IsolationSelection/IIsolationSelectionTool.h>
#include <SelectionHelpers/ISelectionAccessor.h> #include <SelectionHelpers/ISelectionAccessor.h>
#include <SelectionHelpers/SelectionReadHandle.h> #include <SelectionHelpers/SelectionReadHandle.h>
#include <SystematicsHandles/SysCopyHandle.h>
#include <SystematicsHandles/SysListHandle.h> #include <SystematicsHandles/SysListHandle.h>
#include <SystematicsHandles/SysReadHandle.h>
#include <xAODMuon/MuonContainer.h> #include <xAODMuon/MuonContainer.h>
namespace CP namespace CP
...@@ -47,7 +47,7 @@ namespace CP ...@@ -47,7 +47,7 @@ namespace CP
/// \brief the muon collection we run on /// \brief the muon collection we run on
private: private:
SysCopyHandle<xAOD::MuonContainer> m_muonHandle { SysReadHandle<xAOD::MuonContainer> m_muonHandle {
this, "muons", "Muons", "the muon collection to run on"}; this, "muons", "Muons", "the muon collection to run on"};
/// \brief the preselection we apply to our input /// \brief the preselection we apply to our input
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
#include <MuonAnalysisInterfaces/IMuonSelectionTool.h> #include <MuonAnalysisInterfaces/IMuonSelectionTool.h>
#include <SelectionHelpers/ISelectionAccessor.h> #include <SelectionHelpers/ISelectionAccessor.h>
#include <SelectionHelpers/SelectionReadHandle.h> #include <SelectionHelpers/SelectionReadHandle.h>
#include <SystematicsHandles/SysCopyHandle.h>
#include <SystematicsHandles/SysListHandle.h> #include <SystematicsHandles/SysListHandle.h>
#include <SystematicsHandles/SysReadHandle.h>
#include <xAODMuon/MuonContainer.h> #include <xAODMuon/MuonContainer.h>
namespace CP namespace CP
...@@ -50,7 +50,7 @@ namespace CP ...@@ -50,7 +50,7 @@ namespace CP
/// \brief the particle continer we run on /// \brief the particle continer we run on
private: private:
SysCopyHandle<xAOD::MuonContainer> m_muonsHandle { SysReadHandle<xAOD::MuonContainer> m_muonsHandle {
this, "muons", "Muons", "the muons collection to run on"}; this, "muons", "Muons", "the muons collection to run on"};
/// \brief the decoration for the quality selection /// \brief the decoration for the quality selection
......
...@@ -60,9 +60,9 @@ namespace CP ...@@ -60,9 +60,9 @@ namespace CP
{ {
for (const auto& sys : m_systematicsList.systematicsVector()) for (const auto& sys : m_systematicsList.systematicsVector())
{ {
xAOD::MuonContainer *muons = nullptr; const xAOD::MuonContainer *muons = nullptr;
ANA_CHECK (m_muonHandle.getCopy (muons, sys)); ANA_CHECK (m_muonHandle.retrieve (muons, sys));
for (xAOD::Muon *muon : *muons) for (const xAOD::Muon *muon : *muons)
{ {
if (m_preselection.getBool (*muon)) if (m_preselection.getBool (*muon))
{ {
......
...@@ -65,9 +65,9 @@ namespace CP ...@@ -65,9 +65,9 @@ namespace CP
{ {
for (const auto& sys : m_systematicsList.systematicsVector()) for (const auto& sys : m_systematicsList.systematicsVector())
{ {
xAOD::MuonContainer *muons = nullptr; const xAOD::MuonContainer *muons = nullptr;
ANA_CHECK (m_muonsHandle.getCopy (muons, sys)); ANA_CHECK (m_muonsHandle.retrieve (muons, sys));
for (xAOD::Muon *muon : *muons) for (const xAOD::Muon *muon : *muons)
{ {
if (m_preselection.getBool (*muon)) if (m_preselection.getBool (*muon))
{ {
......
...@@ -152,7 +152,7 @@ def makeMuonAnalysisSequence( dataType, workingPoint, ...@@ -152,7 +152,7 @@ def makeMuonAnalysisSequence( dataType, workingPoint,
'MuonIsolationAlg' + postfix ) 'MuonIsolationAlg' + postfix )
addPrivateTool( alg, 'isolationTool', 'CP::IsolationSelectionTool' ) addPrivateTool( alg, 'isolationTool', 'CP::IsolationSelectionTool' )
alg.isolationDecoration = 'isolated_muon' + postfix + ',as_bits' alg.isolationDecoration = 'isolated_muon' + postfix + ',as_bits'
seq.append( alg, inputPropName = 'muons', outputPropName = 'muonsOut', seq.append( alg, inputPropName = 'muons',
stageName = 'selection', stageName = 'selection',
metaConfig = {'selectionDecorNames' : [alg.isolationDecoration], metaConfig = {'selectionDecorNames' : [alg.isolationDecoration],
'selectionDecorNamesOutput' : [alg.isolationDecoration], 'selectionDecorNamesOutput' : [alg.isolationDecoration],
......
...@@ -25,7 +25,6 @@ namespace CP ...@@ -25,7 +25,6 @@ namespace CP
, m_efficiencyCorrectionsTool ("TauAnalysisTools::DiTauEfficiencyCorrectionsTool", this) , m_efficiencyCorrectionsTool ("TauAnalysisTools::DiTauEfficiencyCorrectionsTool", this)
{ {
declareProperty ("efficiencyCorrectionsTool", m_efficiencyCorrectionsTool, "the calibration and smearing tool we apply"); declareProperty ("efficiencyCorrectionsTool", m_efficiencyCorrectionsTool, "the calibration and smearing tool we apply");
declareProperty ("scaleFactorDecoration", m_scaleFactorDecoration, "the decoration for the tau scale factor");
} }
...@@ -38,10 +37,10 @@ namespace CP ...@@ -38,10 +37,10 @@ namespace CP
ANA_MSG_ERROR ("no scale factor decoration name set"); ANA_MSG_ERROR ("no scale factor decoration name set");
return StatusCode::FAILURE; return StatusCode::FAILURE;
} }
m_scaleFactorAccessor = std::make_unique<SG::AuxElement::Accessor<float> > (m_scaleFactorDecoration);
ANA_CHECK (m_efficiencyCorrectionsTool.retrieve()); ANA_CHECK (m_efficiencyCorrectionsTool.retrieve());
ANA_CHECK (m_tauHandle.initialize (m_systematicsList)); ANA_CHECK (m_tauHandle.initialize (m_systematicsList));
ANA_CHECK (m_scaleFactorDecoration.initialize (m_systematicsList, m_tauHandle));
ANA_CHECK (m_systematicsList.addSystematics (*m_efficiencyCorrectionsTool)); ANA_CHECK (m_systematicsList.addSystematics (*m_efficiencyCorrectionsTool));
ANA_CHECK (m_systematicsList.initialize()); ANA_CHECK (m_systematicsList.initialize());
ANA_CHECK (m_preselection.initialize()); ANA_CHECK (m_preselection.initialize());
...@@ -57,15 +56,17 @@ namespace CP ...@@ -57,15 +56,17 @@ namespace CP
for (const auto& sys : m_systematicsList.systematicsVector()) for (const auto& sys : m_systematicsList.systematicsVector())
{ {
ANA_CHECK (m_efficiencyCorrectionsTool->applySystematicVariation (sys)); ANA_CHECK (m_efficiencyCorrectionsTool->applySystematicVariation (sys));
xAOD::DiTauJetContainer *taus = nullptr; const xAOD::DiTauJetContainer *taus = nullptr;
ANA_CHECK (m_tauHandle.getCopy (taus, sys)); ANA_CHECK (m_tauHandle.retrieve (taus, sys));
for (xAOD::DiTauJet *tau : *taus) for (const xAOD::DiTauJet *tau : *taus)
{ {
if (m_preselection.getBool (*tau)) if (m_preselection.getBool (*tau))
{ {
double sf = 0; double sf = 0;
ANA_CHECK_CORRECTION (m_outOfValidity, *tau, m_efficiencyCorrectionsTool->getEfficiencyScaleFactor (*tau, sf)); ANA_CHECK_CORRECTION (m_outOfValidity, *tau, m_efficiencyCorrectionsTool->getEfficiencyScaleFactor (*tau, sf));
(*m_scaleFactorAccessor) (*tau) = sf; m_scaleFactorDecoration.set (*tau, sf, sys);
} else {
m_scaleFactorDecoration.set (*tau, invalidScaleFactor(), sys);
} }
} }
} }
......
...@@ -46,9 +46,9 @@ namespace CP ...@@ -46,9 +46,9 @@ namespace CP
{ {
for (const auto& sys : m_systematicsList.systematicsVector()) for (const auto& sys : m_systematicsList.systematicsVector())
{ {
xAOD::DiTauJetContainer *taus = nullptr; const xAOD::DiTauJetContainer *taus = nullptr;
ANA_CHECK (m_tauHandle.getCopy (taus, sys)); ANA_CHECK (m_tauHandle.retrieve (taus, sys));
for (xAOD::DiTauJet *tau : *taus) for (const xAOD::DiTauJet *tau : *taus)
{ {
if (m_preselection.getBool (*tau)) if (m_preselection.getBool (*tau))
{ {
......
...@@ -46,9 +46,9 @@ namespace CP ...@@ -46,9 +46,9 @@ namespace CP
{ {
for (const auto& sys : m_systematicsList.systematicsVector()) for (const auto& sys : m_systematicsList.systematicsVector())
{ {
xAOD::TauJetContainer *taus = nullptr; const xAOD::TauJetContainer *taus = nullptr;
ANA_CHECK (m_tauHandle.getCopy (taus, sys)); ANA_CHECK (m_tauHandle.retrieve (taus, sys));
for (xAOD::TauJet *tau : *taus) for (const xAOD::TauJet *tau : *taus)
{ {
if (m_preselection.getBool (*tau)) if (m_preselection.getBool (*tau))
{ {
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
#include <TauAnalysisTools/IDiTauEfficiencyCorrectionsTool.h> #include <TauAnalysisTools/IDiTauEfficiencyCorrectionsTool.h>
#include <SelectionHelpers/OutOfValidityHelper.h> #include <SelectionHelpers/OutOfValidityHelper.h>
#include <SelectionHelpers/SelectionReadHandle.h> #include <SelectionHelpers/SelectionReadHandle.h>
#include <SystematicsHandles/SysCopyHandle.h>
#include <SystematicsHandles/SysListHandle.h> #include <SystematicsHandles/SysListHandle.h>
#include <SystematicsHandles/SysReadHandle.h> #include <SystematicsHandles/SysReadHandle.h>
#include <SystematicsHandles/SysWriteDecorHandle.h>
#include <xAODTau/DiTauJetContainer.h> #include <xAODTau/DiTauJetContainer.h>
namespace CP namespace CP
...@@ -47,7 +47,7 @@ namespace CP ...@@ -47,7 +47,7 @@ namespace CP
/// \brief the tau collection we run on /// \brief the tau collection we run on
private: private:
SysCopyHandle<xAOD::DiTauJetContainer> m_tauHandle { SysReadHandle<xAOD::DiTauJetContainer> m_tauHandle {
this, "taus", "DiTauJets", "the tau collection to run on"}; this, "taus", "DiTauJets", "the tau collection to run on"};
/// \brief the preselection we apply to our input /// \brief the preselection we apply to our input
...@@ -59,13 +59,10 @@ namespace CP ...@@ -59,13 +59,10 @@ namespace CP
private: private:
OutOfValidityHelper m_outOfValidity {this};