24 StatusCode EventCutFlowHistAlg ::
48 return StatusCode::SUCCESS;
51 StatusCode EventCutFlowHistAlg ::
59 auto histIter =
m_hist.find (sys);
60 if (histIter ==
m_hist.end())
67 title +=
" (" + sys.name() +
")";
71 histIter =
m_hist.find (sys);
72 assert (histIter !=
m_hist.end());
76 histIter->second->GetXaxis()->SetBinLabel(i + 1,
m_labels[i].c_str());
81 unsigned cutIndex = 1;
82 histIter->second->Fill (0);
85 histIter->second->Fill (cutIndex);
91 return StatusCode::SUCCESS;
StatusCode book(const TH1 &hist, const std::string &tDir="", const std::string &stream="")
Simplify the booking and registering (into THistSvc) of histograms.
TH1 * hist(const std::string &histName, const std::string &tDir="", const std::string &stream="")
Simplify the retrieval of registered histograms of any type.
std::vector< std::string > m_labels
histogram bin labels
SysListHandle m_systematicsList
the systematics list we run
Gaudi::Property< std::string > m_histTitle
the histogram title to use
SysReadSelectionHandleArray m_selections
the input object selections for which to create a cutflow
std::unordered_map< CP::SystematicSet, TH1 * > m_hist
the created histograms
SysReadHandle< xAOD::EventInfo > m_eventInfoHandle
the jet collection we run on
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Gaudi::Property< std::string > m_histPattern
the pattern for histogram names
ServiceHandle< ISelectionNameSvc > m_selectionNameSvc
the selection name service
unsigned m_allCutsNum
the total number of cuts configured (needed to configure histograms)
std::string label(const std::string &format, int i)
Select isolated Photons, Electrons and Muons.
EventInfo_v1 EventInfo
Definition of the latest event info version.