|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #include "TEfficiency.h"
19 validArguments(
const float arg) {
20 return not (std::isnan(
arg));
24 validArguments(
const float arg,
const float arg2) {
25 return not (std::isnan(
arg) or std::isnan(arg2));
29 validArguments(
const float arg,
const float arg2,
const float arg3) {
30 return not (std::isnan(
arg) or std::isnan(arg2) or std::isnan(arg3));
38 m_histoDefSvc(
"HistogramDefinitionSvc",
"InDetPlotBase")
52 hd.
yAxis.second,
false);
59 hd.
yAxis.second,
false);
66 hd.
yAxis.second,
false);
83 if (pTprofile and validArguments(
bin,
weight)) {
90 if (pTprofile and validArguments(
xval,
yval,
weight) and validArguments(weight2)) {
98 if (pTh1 and validArguments(
value)) {
105 if (pTh1 and validArguments(
value)) {
113 if (pTh2 and validArguments(
xval,
yval)) {
121 if (pTh2 and validArguments(
xval,
yval)) {
128 if (pTh3 and validArguments(
xval,
yval, zval)) {
135 if (pTeff and validArguments(
value)) {
143 if (eff2d and validArguments(xvalue, yvalue)) {
144 if(
weight==1.) eff2d->Fill(accepted, xvalue, yvalue);
145 else eff2d->FillWeighted(accepted,
weight, xvalue, yvalue);
155 bool folderDefault = (
folder.empty() or
folder ==
"default");
158 if (folderDefault and
s.empty()) {
159 const std::string otherDefault = (
folder.empty()) ? (
"default") :
"";
163 ATH_MSG_WARNING(
"Histogram definition is empty for identifier " << histoIdentifier);
165 if (!nameOverride.empty()){
166 s.name = nameOverride;
void book(Htype *&pHisto, const std::string &histoIdentifier, const std::string &nameOverride="", const std::string &folder="default")
Helper method to book histograms using an identifier string.
TEfficiency * BookTEfficiency(const std::string &name, const std::string &labels, const int nBinsX, const float xlo, const float xhi, const bool prependDir=true)
Book a (1-D) TEfficiency histogram.
TH2F * Book2D(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2F histogram.
TProfile2D * BookTProfile2D(const std::string &name, const std::string &labels, const int nBinsX, const double xlo, const double xhi, const int nBinsY, const double ylo, const double yhi, bool prependDir=true, bool useRMS=false)
Book a TProfile 2D histogram with variable binning in x-axis and limits in y-values.
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Mixin class to give extra capabilities to plots such as ATH_MSG and an easier booking interface,...
IHistogramDefinitionSvc::axesLimits_t xAxis
def TProfile(*args, **kwargs)
Class to provide easy MsgStream access and capabilities.
Almost-a-struct for holding the single histogram definition.
ServiceHandle< IHistogramDefinitionSvc > m_histoDefSvc
InDetPlotBase(InDetPlotBase *pParent, const std::string &dirName)
Constructor taking parent node and directory name for plots.
#define ATH_MSG_WARNING(x)
TProfile * BookTProfile(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, float startY=-1, float endY=-1, bool prependDir=true, bool useRMS=false)
Book a TProfile histogram.
IHistogramDefinitionSvc::axesLimits_t yAxis
bool isValid() const
Is the histogram definition valid.
static void fillHisto(TProfile *pTprofile, const float bin, const float weight, const float weight2=1.0)
SingleHistogramDefinition retrieveDefinition(const std::string &histoIdentifier, const std::string &folder="default", const std::string &nameOverride="")
Retrieve a single histogram definition, given the unique string identifier.