25 StatusCode ObjectCutFlowHistAlg ::
49 return StatusCode::SUCCESS;
52 StatusCode ObjectCutFlowHistAlg ::
60 auto histIter =
m_hist.find (sys);
61 if (histIter ==
m_hist.end())
68 title +=
" (" + sys.name() +
")";
72 histIter =
m_hist.find (sys);
73 assert (histIter !=
m_hist.end());
77 histIter->second->GetXaxis()->SetBinLabel(i + 1,
m_labels[i].c_str());
83 unsigned cutIndex = 1;
84 histIter->second->Fill (0);
88 histIter->second->Fill (cutIndex);
98 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
SysReadSelectionHandleArray m_selections
the input object selections for which to create a cutflow
unsigned m_allCutsNum
the total number of cuts configured (needed to configure histograms)
Gaudi::Property< bool > m_forceCutSequence
force cut sequence
SysReadHandle< xAOD::IParticleContainer > m_inputHandle
the particle collection we run on
Gaudi::Property< std::string > m_histTitle
the histogram title to use
SysReadSelectionHandle m_preselection
the preselection we apply to our input
ServiceHandle< ISelectionNameSvc > m_selectionNameSvc
the selection name service
SysListHandle m_systematicsList
the systematics list we run
std::unordered_map< CP::SystematicSet, TH1 * > m_hist
the created histograms
Gaudi::Property< std::string > m_histPattern
the pattern for histogram names
Class providing the definition of the 4-vector interface.
std::string label(const std::string &format, int i)
Select isolated Photons, Electrons and Muons.
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.