ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetValidation
InDetPhysValMonitoring
src
InDetPlotBase.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef INDETPHYSVALMONITORING_INDETPLOTBASE
6
#define INDETPHYSVALMONITORING_INDETPLOTBASE
12
#include "
TrkValHistUtils/PlotBase.h
"
13
#include "
AthenaBaseComps/AthMessaging.h
"
14
#include "GaudiKernel/ServiceHandle.h"
15
#include "
InDetPhysValMonitoring/SingleHistogramDefinition.h
"
// to make available to children
16
#include "
InDetPhysValMonitoring/IHistogramDefinitionSvc.h
"
17
18
#include <string>
19
#include <string_view>
20
21
#define IDPVM_BOOK(name) mBook(name, #name)
22
23
class
IHistogramDefinitionSvc
;
24
class
TEfficiency;
25
26
34
class
InDetPlotBase
:
public
PlotBase
,
public
AthMessaging
{
35
public
:
37
InDetPlotBase
(
InDetPlotBase
* pParent,
const
std::string& dirName);
38
40
SingleHistogramDefinition
retrieveDefinition
(std::string_view histoIdentifier,
41
std::string_view folder =
"default"
,
42
std::string_view nameOverride=
""
);
43
49
template
<
class
Htype>
void
book
(Htype* & pHisto,
50
std::string_view histoIdentifier,
51
std::string_view nameOverride=
""
,
52
std::string_view folder =
"default"
);
53
55
void
book
(TH1*& pHisto,
const
SingleHistogramDefinition
& hd);
57
void
book
(TProfile*& pHisto,
const
SingleHistogramDefinition
& hd);
59
void
book
(TProfile2D*& pHisto,
const
SingleHistogramDefinition
& hd);
61
void
book
(TH2*& pHisto,
const
SingleHistogramDefinition
& hd);
63
void
book
(TEfficiency*& pHisto,
const
SingleHistogramDefinition
& hd);
64
65
// weight2 allows us to weight averaging in the profile
66
static
void
fillHisto
(TProfile* pTprofile,
const
float
bin
,
const
float
weight,
const
float
weight2=1.0);
67
static
void
fillHisto
(TProfile2D* pTprofile,
const
float
xval,
const
float
yval,
const
float
weight,
const
float
weight2=1.0);
68
//
69
static
void
fillHisto
(TH1* pTh1,
const
float
value);
70
static
void
fillHisto
(TH1* pTh1,
const
float
value,
const
float
weight);
71
//
72
static
void
fillHisto
(TH2* pTh2,
const
float
xval,
const
float
yval);
73
static
void
fillHisto
(TH2* pTh2,
const
float
xval,
const
float
yval,
const
float
weight);
74
//
75
static
void
fillHisto
(TH3* pTh3,
const
float
xval,
const
float
yval,
const
float
zval);
76
//
77
static
void
fillHisto
(TEfficiency* pTeff,
const
float
value,
const
bool
accepted,
float
weight);
78
static
void
fillHisto
(TEfficiency* eff2d,
const
float
xvalue,
const
float
yvalue,
const
bool
accepted,
const
float
weight);
79
//
80
protected
:
82
template
<
class
T>
83
void
84
mBook
(T& pHisto,
const
std::string& histoIdentifier) {
85
return
book
(pHisto, histoIdentifier.substr(2));
86
}
87
88
private
:
89
ServiceHandle<IHistogramDefinitionSvc>
m_histoDefSvc
;
90
};
91
92
93
#include "
InDetPlotBase.icc
"
94
95
96
#endif
AthMessaging.h
IHistogramDefinitionSvc.h
InDetPlotBase.icc
PlotBase.h
SingleHistogramDefinition.h
AthMessaging::AthMessaging
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Definition
AthMessaging.cxx:13
IHistogramDefinitionSvc
Interface class to get the histogram definition for a named histogram in a given directory.
Definition
IHistogramDefinitionSvc.h:20
InDetPlotBase::fillHisto
static void fillHisto(TProfile *pTprofile, const float bin, const float weight, const float weight2=1.0)
Definition
InDetPlotBase.cxx:82
InDetPlotBase::m_histoDefSvc
ServiceHandle< IHistogramDefinitionSvc > m_histoDefSvc
Definition
InDetPlotBase.h:89
InDetPlotBase::mBook
void mBook(T &pHisto, const std::string &histoIdentifier)
book, for use by macro
Definition
InDetPlotBase.h:84
InDetPlotBase::retrieveDefinition
SingleHistogramDefinition retrieveDefinition(std::string_view histoIdentifier, std::string_view folder="default", std::string_view nameOverride="")
Retrieve a single histogram definition, given the unique string identifier.
Definition
InDetPlotBase.cxx:151
InDetPlotBase::InDetPlotBase
InDetPlotBase(InDetPlotBase *pParent, const std::string &dirName)
Constructor taking parent node and directory name for plots.
Definition
InDetPlotBase.cxx:35
InDetPlotBase::book
void book(Htype *&pHisto, std::string_view histoIdentifier, std::string_view nameOverride="", std::string_view folder="default")
Helper method to book histograms using an identifier string.
PlotBase::PlotBase
PlotBase(PlotBase *parent, std::string_view sDir)
Definition
PlotBase.cxx:29
ServiceHandle
Definition
ClusterMakerTool.h:36
SingleHistogramDefinition
Almost-a-struct for holding the single histogram definition.
Definition
SingleHistogramDefinition.h:18
bin
Definition
BinsDiffFromStripMedian.h:43
Generated on
for ATLAS Offline Software by
1.17.0