24 StatusCode ObjectCutFlowHistAlg ::
48 return StatusCode::SUCCESS;
51 StatusCode ObjectCutFlowHistAlg ::
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());
82 unsigned cutIndex = 1;
83 histIter->second->Fill (0);
87 histIter->second->Fill (cutIndex);
97 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.