Skip to content
Snippets Groups Projects

CPAlgorithms: refactor the object cutflow

Merged Baptiste Ravina requested to merge ravinab/athena:bugfix_cutflows into main
8 files
+ 42
88
Compare changes
  • Side-by-side
  • Inline
Files
8
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
/// @author Nils Krumnack
/// @author Baptiste Ravina
#ifndef ASG_ANALYSIS_ALGORITHMS__OBJECT_CUT_FLOW_HIST_ALG_H
@@ -11,7 +12,6 @@
#include <AnaAlgorithm/AnaAlgorithm.h>
#include <AsgTools/PropertyWrapper.h>
#include <SelectionHelpers/ISelectionNameSvc.h>
#include <SelectionHelpers/ISelectionReadAccessor.h>
#include <SelectionHelpers/SysReadSelectionHandle.h>
#include <SystematicsHandles/SysReadHandle.h>
#include <SystematicsHandles/SysListHandle.h>
@@ -19,19 +19,14 @@
namespace CP
{
/// \brief an algorithm for dumping the kinematics of an IParticle
/// container into histograms
///
/// This is mostly meant as a temporary helper algorithm to debug
/// the common CP algorithms as they get developed.
/// \brief an algorithm for dumping the object-level cutflow
class ObjectCutFlowHistAlg final : public EL::AnaAlgorithm
{
/// \brief the standard constructor
public:
ObjectCutFlowHistAlg (const std::string& name,
ISvcLocator* pSvcLocator);
ISvcLocator* pSvcLocator);
public:
StatusCode initialize () override;
@@ -44,10 +39,10 @@ namespace CP
private:
SysListHandle m_systematicsList {this};
/// \brief the jet collection we run on
/// \brief the particle collection we run on
private:
SysReadHandle<xAOD::IParticleContainer> m_inputHandle {
this, "input", "", "the input collection to run on"};
this, "input", "", "the input particle container to run on"};
/// \brief the preselection we apply to our input
private:
@@ -66,13 +61,10 @@ namespace CP
private:
Gaudi::Property<std::string> m_histTitle {this, "histTitle", "object cut flow", "title for the created histograms"};
private:
std::vector<std::string> m_selection;
/// the list of accessors and cut ignore list
/// \brief the input object selections for which to create a cutflow
private:
std::vector<std::pair<std::unique_ptr<ISelectionReadAccessor>,unsigned> > m_accessors;
SysReadSelectionHandleArray m_selections {
this, "selections", {}, "the inputs to the object cutflow"};
/// \brief the total number of cuts configured (needed to
/// configure histograms)
Loading