5#ifndef GENERATORMODULES_GENANALYSIS_H
6#define GENERATORMODULES_GENANALYSIS_H
9#include "GaudiKernel/ITHistSvc.h"
30 GenAnalysis(
const std::string& name, ISvcLocator* pSvcLocator);
40 virtual StatusCode
init() {
return StatusCode::SUCCESS; }
42 virtual StatusCode
finalize() {
return StatusCode::SUCCESS; }
53 TH1D*
bookHisto1D(
const std::string& name,
const std::string& title,
const std::vector<double>& binedges,
54 const std::string& xtitle=
"",
const std::string& ytitle=
"");
55 TH1D*
bookHisto1D(
const std::string& name,
const std::string& title,
size_t numbins,
double low,
double high,
56 const std::string& xtitle=
"",
const std::string& ytitle=
"");
58 TProfile*
bookProfile1D(
const std::string& name,
const std::string& title,
const std::vector<double>& binedges,
59 const std::string& xtitle=
"",
const std::string& ytitle=
"");
60 TProfile*
bookProfile1D(
const std::string& name,
const std::string& title,
size_t numbins,
double low,
double high,
61 const std::string& xtitle=
"",
const std::string& ytitle=
"");
63 TH2D*
bookHisto2D(
const std::string& name,
const std::string& title,
64 const std::vector<double>& binedgesx,
const std::vector<double>& binedgesy,
65 const std::string& xtitle=
"",
const std::string& ytitle=
"",
const std::string& ztitle=
"");
66 TH2D*
bookHisto2D(
const std::string& name,
const std::string& title,
67 size_t numbinsx,
double xlow,
double xhigh,
68 size_t numbinsy,
double ylow,
double yhigh,
69 const std::string& xtitle=
"",
const std::string& ytitle=
"",
const std::string& ztitle=
"");
73 return "/" +
m_histkey +
"/" + name() +
"/" + localpath;
77 TH1*
histo(
const std::string& key);
80 TProfile*
profile(
const std::string& key);
const ServiceHandle< ITHistSvc > histSvc() const
Directly access the histogram service.
TProfile * profile(const std::string &key)
Retrieve a profile histogram.
TProfile * bookProfile1D(const std::string &name, const std::string &title, const std::vector< double > &binedges, const std::string &xtitle="", const std::string &ytitle="")
virtual StatusCode finalize()
TH1 * histo(const std::string &key)
Retrieve a histogram (as TH1* base class pointer)
TH1D * bookHisto1D(const std::string &name, const std::string &title, const std::vector< double > &binedges, const std::string &xtitle="", const std::string &ytitle="")
virtual StatusCode analyze()=0
TH2D * bookHisto2D(const std::string &name, const std::string &title, const std::vector< double > &binedgesx, const std::vector< double > &binedgesy, const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="")
StatusCode execute()
Per-event analysis routine: calls user-supplied analyze()
virtual StatusCode init()
ServiceHandle< ITHistSvc > m_histSvc
std::string m_histkey
Container name for the MC event collection to be analysed.
std::string fullhistopath(const std::string &localpath)
Get a histogram's full path, given the name local to the analysis.
StatusCode initialize()
Setup analysis tools and call user-supplied init()
GenAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
GenBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.