|
ATLAS Offline Software
|
class holding res plots for Inner Detector RTT Validation and implementing fill methods
More...
#include <InDetPerfPlot_Resolution.h>
|
| InDetPerfPlot_Resolution (InDetPlotBase *pParent, const std::string &dirName) |
|
void | fill (const xAOD::TrackParticle &trkprt, const xAOD::TruthParticle &truthprt, float weight) |
|
virtual | ~InDetPerfPlot_Resolution () |
|
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. More...
|
|
template<class Htype > |
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. More...
|
|
void | book (TH1 *&pHisto, const SingleHistogramDefinition &hd) |
| Book a TH1 histogram. More...
|
|
void | book (TProfile *&pHisto, const SingleHistogramDefinition &hd) |
| Book a TProfile histogram. More...
|
|
void | book (TProfile2D *&pHisto, const SingleHistogramDefinition &hd) |
| Book a TProfile2D histogram. More...
|
|
void | book (TH2 *&pHisto, const SingleHistogramDefinition &hd) |
| Book a 2D histogram (TH2) More...
|
|
void | book (TEfficiency *&pHisto, const SingleHistogramDefinition &hd) |
| Book a (1-D) TEfficiency. More...
|
|
void | initialize () |
|
void | finalize () |
|
void | setDetailLevel (int iDetailLevel) |
|
void | RegisterSubPlot (PlotBase *pPlotBase) |
|
std::vector< HistData > | retrieveBookedHistograms () |
| Retrieve all booked histograms. More...
|
|
std::vector< TreeData > | retrieveBookedTrees () |
| Retrieve all booked trees. More...
|
|
std::vector< EfficiencyData > | retrieveBookedEfficiencies () |
| Retrieve all booked efficiency objects. More...
|
|
TTree * | BookTree (const std::string &name, bool prependDir=true) |
| Book a TTree. More...
|
|
const std::string & | getDirectory () |
|
bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. More...
|
|
MsgStream & | msg () const |
| The standard message stream. More...
|
|
MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. More...
|
|
void | setLevel (MSG::Level lvl) |
| Change the current logging level. More...
|
|
|
static void | fillHisto (TProfile *pTprofile, const float bin, const float weight, const float weight2=1.0) |
|
static void | fillHisto (TProfile2D *pTprofile, const float xval, const float yval, const float weight, const float weight2=1.0) |
|
static void | fillHisto (TH1 *pTh1, const float value) |
|
static void | fillHisto (TH1 *pTh1, const float value, const float weight) |
|
static void | fillHisto (TH2 *pTh2, const float xval, const float yval) |
|
static void | fillHisto (TH2 *pTh2, const float xval, const float yval, const float weight) |
|
static void | fillHisto (TH3 *pTh3, const float xval, const float yval, const float zval) |
|
static void | fillHisto (TEfficiency *pTeff, const float value, const bool accepted, float weight) |
|
static void | fillHisto (TEfficiency *eff2d, const float xvalue, const float yvalue, const bool accepted, const float weight) |
|
|
template<class T > |
void | mBook (T &pHisto, const std::string &histoIdentifier) |
| book, for use by macro More...
|
|
class holding res plots for Inner Detector RTT Validation and implementing fill methods
Definition at line 40 of file InDetPerfPlot_Resolution.h.
◆ Param
◆ InDetPerfPlot_Resolution()
InDetPerfPlot_Resolution::InDetPerfPlot_Resolution |
( |
InDetPlotBase * |
pParent, |
|
|
const std::string & |
dirName |
|
) |
| |
Definition at line 29 of file InDetPerfPlot_Resolution.cxx.
101 TString tsDir = (TString)
sDir;
103 if (tsDir.Contains(
"Primary")) {
105 }
else if (tsDir.Contains(
"Secondary")) {
114 for (
int ipt = 0; ipt <=
m_nPtBins; ipt++) {
◆ ~InDetPerfPlot_Resolution()
virtual InDetPerfPlot_Resolution::~InDetPerfPlot_Resolution |
( |
| ) |
|
|
inlinevirtual |
◆ book() [1/6]
template<class Htype >
void InDetPlotBase::book |
( |
Htype *& |
pHisto, |
|
|
const std::string & |
histoIdentifier, |
|
|
const std::string & |
nameOverride = "" , |
|
|
const std::string & |
folder = "default" |
|
) |
| |
|
inherited |
Helper method to book histograms using an identifier string.
- Parameters
-
pHisto | Pointer to the histogram to be booked (assumed to be initialized to nullptr) |
histoIdentifier | Identifier (looked up in the XML file) |
nameOverride | Allows to override the histo name w.r.t the identifier. Leave empty for no override. This can be used to instantiate multiple, identically binned plots from a single entry in the XML. |
folder | Folder to place the plot (if any) |
◆ book() [2/6]
◆ book() [3/6]
◆ book() [4/6]
◆ book() [5/6]
◆ book() [6/6]
◆ Book1D() [1/2]
TH1D * PlotBase::Book1D |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
int |
nBins, |
|
|
float |
start, |
|
|
float |
end, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH1D histogram.
Definition at line 94 of file PlotBase.cxx.
97 Bool_t oldstat = TH1::AddDirectoryStatus();
98 TH1::AddDirectory(
false);
100 TH1::AddDirectory(oldstat);
◆ Book1D() [2/2]
TH1D * PlotBase::Book1D |
( |
const std::string & |
name, |
|
|
TH1 * |
refHist, |
|
|
const std::string & |
labels, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH1D histogram using refHist as reference for number of bins and axis range.
Definition at line 108 of file PlotBase.cxx.
110 Bool_t oldstat = TH1::AddDirectoryStatus();
111 TH1::AddDirectory(
false);
113 refHist->GetXaxis()->GetXbins()->GetArray());
115 TH1::AddDirectory(oldstat);
◆ Book2D() [1/3]
TH2F * PlotBase::Book2D |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
int |
nBinsX, |
|
|
Double_t * |
binsX, |
|
|
int |
nBinsY, |
|
|
Double_t |
startY, |
|
|
Double_t |
endY, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH2F histogram with variable x axis binning.
Definition at line 144 of file PlotBase.cxx.
147 Bool_t oldstat = TH2::AddDirectoryStatus();
148 TH2::AddDirectory(
false);
151 TH2::AddDirectory(oldstat);
◆ Book2D() [2/3]
TH2F * PlotBase::Book2D |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
int |
nBinsX, |
|
|
float |
startX, |
|
|
float |
endX, |
|
|
int |
nBinsY, |
|
|
float |
startY, |
|
|
float |
endY, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH2F histogram.
Definition at line 123 of file PlotBase.cxx.
126 Bool_t oldstat = TH2::AddDirectoryStatus();
127 TH2::AddDirectory(
false);
130 TH2::AddDirectory(oldstat);
◆ Book2D() [3/3]
TH2F * PlotBase::Book2D |
( |
const std::string & |
name, |
|
|
TH2 * |
refHist, |
|
|
const std::string & |
labels, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH2D histogram using refHist as reference for number of bins and axis range.
Definition at line 138 of file PlotBase.cxx.
139 return Book2D(
name,
labels, refHist->GetNbinsX(), refHist->GetXaxis()->GetXmin(), refHist->GetXaxis()->GetXmax(),
140 refHist->GetNbinsY(), refHist->GetYaxis()->GetXmin(), refHist->GetYaxis()->GetXmax(), prependDir);
◆ Book3D() [1/2]
TH3F * PlotBase::Book3D |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
int |
nBinsX, |
|
|
float |
startX, |
|
|
float |
endX, |
|
|
int |
nBinsY, |
|
|
float |
startY, |
|
|
float |
endY, |
|
|
int |
nBinsZ, |
|
|
float |
startZ, |
|
|
float |
endZ, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH3F histogram.
Definition at line 157 of file PlotBase.cxx.
160 Bool_t oldstat = TH3::AddDirectoryStatus();
161 TH3::AddDirectory(
false);
163 labels.c_str(), nBinsX, startX, endX, nBinsY, startY, endY, nBinsZ, startZ, endZ);
165 TH3::AddDirectory(oldstat);
◆ Book3D() [2/2]
TH3F * PlotBase::Book3D |
( |
const std::string & |
name, |
|
|
TH3 * |
refHist, |
|
|
const std::string & |
labels, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TH3F histogram using refHist as reference for number of bins and axis range.
Definition at line 171 of file PlotBase.cxx.
173 Bool_t oldstat = TH3::AddDirectoryStatus();
174 TH3::AddDirectory(
false);
176 refHist->GetXaxis()->GetXbins()->GetArray(), refHist->GetNbinsY(),
177 refHist->GetYaxis()->GetXbins()->GetArray(), refHist->GetNbinsZ(),
178 refHist->GetZaxis()->GetXbins()->GetArray());
179 TH3::AddDirectory(oldstat);
◆ BookTEfficiency() [1/2]
TEfficiency * PlotBase::BookTEfficiency |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
const int |
nBinsX, |
|
|
const float |
xlo, |
|
|
const float |
xhi, |
|
|
const bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a (1-D) TEfficiency histogram.
Definition at line 257 of file PlotBase.cxx.
263 hist->SetDirectory(
nullptr);
◆ BookTEfficiency() [2/2]
TEfficiency * PlotBase::BookTEfficiency |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
const int |
nBinsX, |
|
|
const float |
xlo, |
|
|
const float |
xhi, |
|
|
const int |
nBinsy, |
|
|
const float |
ylo, |
|
|
const float |
yhi, |
|
|
const bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a (2-D) TEfficiency histogram.
Definition at line 270 of file PlotBase.cxx.
274 hist->SetDirectory(
nullptr);
◆ BookTProfile() [1/2]
TProfile * PlotBase::BookTProfile |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
int |
nBinsX, |
|
|
float * |
binsX, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TProfile histogram with variable binning in x-axis.
Definition at line 204 of file PlotBase.cxx.
207 Bool_t oldstat = TProfile::AddDirectoryStatus();
208 TProfile::AddDirectory(
false);
211 TProfile::AddDirectory(oldstat);
◆ BookTProfile() [2/2]
TProfile * PlotBase::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 |
|
) |
| |
|
inherited |
Book a TProfile histogram.
Definition at line 186 of file PlotBase.cxx.
190 Bool_t oldstat = TProfile::AddDirectoryStatus();
191 TProfile::AddDirectory(
false);
192 std::string
opt = useRMS ?
"S" :
"";
193 if ((startY == -1) and (endY == -1)) {
198 TProfile::AddDirectory(oldstat);
◆ BookTProfile2D() [1/2]
TProfile2D * PlotBase::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 |
|
) |
| |
|
inherited |
Book a TProfile 2D histogram with variable binning in x-axis and limits in y-values.
Definition at line 231 of file PlotBase.cxx.
235 Bool_t oldstat = TProfile2D::AddDirectoryStatus();
236 TProfile2D::AddDirectory(
false);
237 std::string
opt = useRMS ?
"S" :
"";
239 TProfile2D::AddDirectory(oldstat);
◆ BookTProfile2D() [2/2]
TProfile2D * PlotBase::BookTProfile2D |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
const int |
nBinsX, |
|
|
double * |
binsX, |
|
|
const int |
nBinsY, |
|
|
double * |
binsY, |
|
|
bool |
prependDir = true , |
|
|
bool |
useRMS = false |
|
) |
| |
|
inherited |
Book a TProfile 2D histogram with variable binning in x-axis and limits in y-values.
Definition at line 245 of file PlotBase.cxx.
247 Bool_t oldstat = TProfile2D::AddDirectoryStatus();
248 TProfile2D::AddDirectory(
false);
249 std::string
opt = useRMS ?
"S" :
"";
251 TProfile2D::AddDirectory(oldstat);
◆ BookTProfileRangeY()
TProfile * PlotBase::BookTProfileRangeY |
( |
const std::string & |
name, |
|
|
const std::string & |
labels, |
|
|
int |
nBinsX, |
|
|
double * |
binsX, |
|
|
double |
startY, |
|
|
double |
endY, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TProfile histogram with variable binning in x-axis and limits in y-values.
Definition at line 217 of file PlotBase.cxx.
221 Bool_t oldstat = TProfile::AddDirectoryStatus();
222 TProfile::AddDirectory(
false);
225 TProfile::AddDirectory(oldstat);
◆ BookTree()
TTree * PlotBase::BookTree |
( |
const std::string & |
name, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TTree.
Definition at line 281 of file PlotBase.cxx.
285 tree->SetAutoSave(0);
286 tree->SetAutoFlush(0);
287 tree->SetDirectory(
nullptr);
◆ constructPrefix()
std::string PlotBase::constructPrefix |
( |
std::string |
dir, |
|
|
bool |
prependDir |
|
) |
| |
|
staticprivateinherited |
◆ fill()
◆ fillHisto() [1/9]
void InDetPlotBase::fillHisto |
( |
TEfficiency * |
eff2d, |
|
|
const float |
xvalue, |
|
|
const float |
yvalue, |
|
|
const bool |
accepted, |
|
|
const float |
weight |
|
) |
| |
|
staticinherited |
Definition at line 142 of file InDetPlotBase.cxx.
143 if (eff2d and validArguments(xvalue, yvalue)) {
144 if(
weight==1.) eff2d->Fill(accepted, xvalue, yvalue);
145 else eff2d->FillWeighted(accepted,
weight, xvalue, yvalue);
◆ fillHisto() [2/9]
void InDetPlotBase::fillHisto |
( |
TEfficiency * |
pTeff, |
|
|
const float |
value, |
|
|
const bool |
accepted, |
|
|
float |
weight |
|
) |
| |
|
staticinherited |
◆ fillHisto() [3/9]
void InDetPlotBase::fillHisto |
( |
TH1 * |
pTh1, |
|
|
const float |
value |
|
) |
| |
|
staticinherited |
◆ fillHisto() [4/9]
void InDetPlotBase::fillHisto |
( |
TH1 * |
pTh1, |
|
|
const float |
value, |
|
|
const float |
weight |
|
) |
| |
|
staticinherited |
◆ fillHisto() [5/9]
void InDetPlotBase::fillHisto |
( |
TH2 * |
pTh2, |
|
|
const float |
xval, |
|
|
const float |
yval |
|
) |
| |
|
staticinherited |
◆ fillHisto() [6/9]
void InDetPlotBase::fillHisto |
( |
TH2 * |
pTh2, |
|
|
const float |
xval, |
|
|
const float |
yval, |
|
|
const float |
weight |
|
) |
| |
|
staticinherited |
◆ fillHisto() [7/9]
void InDetPlotBase::fillHisto |
( |
TH3 * |
pTh3, |
|
|
const float |
xval, |
|
|
const float |
yval, |
|
|
const float |
zval |
|
) |
| |
|
staticinherited |
◆ fillHisto() [8/9]
void InDetPlotBase::fillHisto |
( |
TProfile * |
pTprofile, |
|
|
const float |
bin, |
|
|
const float |
weight, |
|
|
const float |
weight2 = 1.0 |
|
) |
| |
|
staticinherited |
◆ fillHisto() [9/9]
void InDetPlotBase::fillHisto |
( |
TProfile2D * |
pTprofile, |
|
|
const float |
xval, |
|
|
const float |
yval, |
|
|
const float |
weight, |
|
|
const float |
weight2 = 1.0 |
|
) |
| |
|
staticinherited |
◆ finalize()
void PlotBase::finalize |
( |
| ) |
|
|
inherited |
◆ finalizePlots()
void InDetPerfPlot_Resolution::finalizePlots |
( |
| ) |
|
|
privatevirtual |
◆ getDirectory()
const std::string& PlotBase::getDirectory |
( |
| ) |
|
|
inlineinherited |
◆ getPlotParameters()
void InDetPerfPlot_Resolution::getPlotParameters |
( |
| ) |
|
|
private |
Definition at line 362 of file InDetPerfPlot_Resolution.cxx.
363 for (
unsigned int iparam = 0; iparam <
NPARAMS; iparam++) {
370 if (not saneQoverPt){
375 bool saneQoverPtrec = std::abs(
m_trkP[
QOVERPT]) > smallestAllowableQoverPt;
376 if (not saneQoverPtrec){
◆ getPlots()
void InDetPerfPlot_Resolution::getPlots |
( |
float |
weight = 1.0 | ) |
|
|
private |
Definition at line 324 of file InDetPerfPlot_Resolution.cxx.
326 const bool tanThetaIsSane = std::abs(tanHalfTheta) > smallestAllowableTan;
327 float eta = undefinedValue;
329 for (
unsigned int iparam = 0; iparam <
NPARAMS; iparam++) {
330 if(iparam ==
PT)
continue;
◆ getTrackParameters() [1/2]
Definition at line 384 of file InDetPerfPlot_Resolution.cxx.
389 const float sinTheta{
std::sin(trkprt.theta())};
390 const float cosTheta{
std::cos(trkprt.theta())};
391 const bool saneSineValue = (std::abs(sinTheta) > smallestAllowableSin);
392 const float inverseSinTheta = saneSineValue ? 1./sinTheta : undefinedValue;
401 m_trkErrP[
D0] = trkprt.definingParametersCovMatrix()(0, 0) < 0 ? 0 : std::sqrt(trkprt.definingParametersCovMatrix()(0, 0));
402 m_trkErrP[
Z0] = trkprt.definingParametersCovMatrix()(1, 1) < 0 ? 0 : std::sqrt(trkprt.definingParametersCovMatrix()(1, 1));
403 m_trkErrP[
PHI] = trkprt.definingParametersCovMatrix()(2, 2) < 0 ? 0 : std::sqrt(trkprt.definingParametersCovMatrix()(2, 2));
404 m_trkErrP[
THETA] = trkprt.definingParametersCovMatrix()(3, 3) < 0 ? 0 : std::sqrt(trkprt.definingParametersCovMatrix()(3, 3));
406 float qOverPT_err2 = trkprt.definingParametersCovMatrix()(4, 4) *
std::pow(inverseSinTheta, 2)
407 + trkprt.definingParametersCovMatrix()(3, 3) *
std::pow(trkprt.qOverP() * cosTheta *
std::pow(inverseSinTheta, 2), 2)
408 - 2 * trkprt.qOverP() * cosTheta * trkprt.definingParametersCovMatrix()(3, 4) *
std::pow(inverseSinTheta, 3);
415 if (trkprt.definingParametersCovMatrixVec().size() < 15) {
416 throw std::runtime_error(
417 "TrackParticle without covariance matrix for defining parameters or the covariance matrix is wrong dimensionality.");
419 if (std::abs(trkprt.qOverP()) < 0) {
421 throw std::runtime_error(
"q/p is zero");
423 double pt = trkprt.pt();
424 double diff_qp = -
pt / std::abs(trkprt.qOverP());
425 double diff_theta = trkprt.theta() == 0 ? 0 :
pt /
std::tan(trkprt.theta());
426 const std::vector<float>&
cov = trkprt.definingParametersCovMatrixVec();
427 double pt_err2 = diff_qp * (diff_qp *
cov[14] + diff_theta *
cov[13]) + diff_theta * diff_theta *
cov[9];
◆ getTrackParameters() [2/2]
Definition at line 435 of file InDetPerfPlot_Resolution.cxx.
438 for (
int iParams = 0; iParams <
NPARAMS; iParams++) {
441 if (
acc.isAvailable(truthprt)) {
451 const float qOverP = qOverPAcc.isAvailable(truthprt) ? qOverPAcc(truthprt) : undefinedValue;
454 if (std::abs(sinTheta) > smallestAllowableSin){
◆ initialize()
void PlotBase::initialize |
( |
| ) |
|
|
inherited |
◆ initializePlots()
void InDetPerfPlot_Resolution::initializePlots |
( |
| ) |
|
|
privatevirtual |
Reimplemented from PlotBase.
Definition at line 128 of file InDetPerfPlot_Resolution.cxx.
130 for (
unsigned int iparam = 0; iparam <
NPARAMS; iparam++) {
135 if(iparam ==
PT)
continue;
234 std::string tmpName, tmpTitle;
240 std::shared_ptr<TH1D> refHistEta {
m_pullHelpereta[iparam]->ProjectionY(
"refEta")};
241 std::shared_ptr<TH1D> refHistPt {
m_pullHelperpt[iparam]->ProjectionY(
"refPt")};
242 std::shared_ptr<TH1D> refHistLowPt {
m_pullHelperlowpt[iparam]->ProjectionY(
"refLowPt")};
246 for (
int ibins = 0; ibins < nPtBins; ibins++) {
258 for (
int ibins = 0; ibins < nLowPtBins; ibins++) {
270 for (
int ibins = 0; ibins <
nEtaBins; ibins++) {
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ mBook()
template<class T >
void InDetPlotBase::mBook |
( |
T & |
pHisto, |
|
|
const std::string & |
histoIdentifier |
|
) |
| |
|
inlineprotectedinherited |
book, for use by macro
Definition at line 83 of file InDetPlotBase.h.
84 return book(pHisto, histoIdentifier.substr(2));
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ RegisterSubPlot()
void PlotBase::RegisterSubPlot |
( |
PlotBase * |
pPlotBase | ) |
|
|
inlineinherited |
◆ retrieveBookedEfficiencies()
std::vector< EfficiencyData > PlotBase::retrieveBookedEfficiencies |
( |
| ) |
|
|
inherited |
Retrieve all booked efficiency objects.
Definition at line 83 of file PlotBase.cxx.
86 std::vector<EfficiencyData> subNodeHists = subNode->retrieveBookedEfficiencies();
87 vBookedEfficiencies.insert(vBookedEfficiencies.end(), subNodeHists.begin(), subNodeHists.end());
89 return vBookedEfficiencies;
◆ retrieveBookedHistograms()
std::vector< HistData > PlotBase::retrieveBookedHistograms |
( |
| ) |
|
|
inherited |
Retrieve all booked histograms.
Definition at line 63 of file PlotBase.cxx.
66 std::vector<HistData> subNodeHists = subNode->retrieveBookedHistograms();
67 vBookedHistograms.insert(vBookedHistograms.end(), subNodeHists.begin(), subNodeHists.end());
69 return vBookedHistograms;
◆ retrieveBookedTrees()
std::vector< TreeData > PlotBase::retrieveBookedTrees |
( |
| ) |
|
|
inherited |
Retrieve all booked trees.
Definition at line 73 of file PlotBase.cxx.
76 std::vector<TreeData> subNodeTrees = subNode->retrieveBookedTrees();
77 vBookedTrees.insert(vBookedTrees.end(), subNodeTrees.begin(), subNodeTrees.end());
◆ retrieveDefinition()
Retrieve a single histogram definition, given the unique string identifier.
Definition at line 151 of file InDetPlotBase.cxx.
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;
◆ setDetailLevel()
void PlotBase::setDetailLevel |
( |
int |
iDetailLevel | ) |
|
|
inherited |
Definition at line 55 of file PlotBase.cxx.
57 subNode->setDetailLevel(iDetailLevel);
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_allTrk
bool InDetPerfPlot_Resolution::m_allTrk |
|
private |
◆ m_histoDefSvc
◆ m_iDetailLevel
int PlotBase::m_iDetailLevel |
|
protectedinherited |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_LowPtBins
float InDetPerfPlot_Resolution::m_LowPtBins[m_nLowPtBins+1] {} |
|
private |
◆ m_lowPtMax
const double InDetPerfPlot_Resolution::m_lowPtMax = 1.0 |
|
private |
◆ m_lowPtMin
const double InDetPerfPlot_Resolution::m_lowPtMin = 0.01 |
|
private |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nEtaBins
const int InDetPerfPlot_Resolution::m_nEtaBins = 64 |
|
staticprivate |
◆ m_nLowPtBins
const int InDetPerfPlot_Resolution::m_nLowPtBins = 99 |
|
staticprivate |
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_nPtBins
const int InDetPerfPlot_Resolution::m_nPtBins = 49 |
|
staticprivate |
◆ m_nResHist
const int InDetPerfPlot_Resolution::m_nResHist = 4 |
|
staticprivate |
◆ m_paramProp
std::string InDetPerfPlot_Resolution::m_paramProp[NPARAMS] = { "d0", "z0", "qoverp", "ptqopt", "theta", "phi", "pt", "z0sin" } |
|
private |
◆ m_primTrk
bool InDetPerfPlot_Resolution::m_primTrk |
|
private |
◆ m_PtBins
float InDetPerfPlot_Resolution::m_PtBins[m_nPtBins+1] {} |
|
private |
◆ m_ptMax
const double InDetPerfPlot_Resolution::m_ptMax = 1000.0 |
|
private |
◆ m_ptMin
const double InDetPerfPlot_Resolution::m_ptMin = 0.745 |
|
private |
◆ m_pull
TH1* InDetPerfPlot_Resolution::m_pull[NPARAMS] |
|
private |
◆ m_pullHelpereta
TH2* InDetPerfPlot_Resolution::m_pullHelpereta[NPARAMS] |
|
private |
◆ m_pullHelperlowpt
TH2* InDetPerfPlot_Resolution::m_pullHelperlowpt[NPARAMS] |
|
private |
◆ m_pullHelperpt
TH2* InDetPerfPlot_Resolution::m_pullHelperpt[NPARAMS] |
|
private |
◆ m_pullmean_vs_eta
TH1* InDetPerfPlot_Resolution::m_pullmean_vs_eta[NPARAMS] |
|
private |
◆ m_pullmean_vs_lowpt
TH1* InDetPerfPlot_Resolution::m_pullmean_vs_lowpt[NPARAMS] |
|
private |
◆ m_pullmean_vs_pt
TH1* InDetPerfPlot_Resolution::m_pullmean_vs_pt[NPARAMS] |
|
private |
◆ m_pullP
float InDetPerfPlot_Resolution::m_pullP[NPARAMS] |
|
private |
◆ m_pullProjections_vs_eta
◆ m_pullProjections_vs_lowpt
◆ m_pullProjections_vs_pt
◆ m_pullwidth_vs_eta
TH1* InDetPerfPlot_Resolution::m_pullwidth_vs_eta[NPARAMS] |
|
private |
◆ m_pullwidth_vs_lowpt
TH1* InDetPerfPlot_Resolution::m_pullwidth_vs_lowpt[NPARAMS] |
|
private |
◆ m_pullwidth_vs_pt
TH1* InDetPerfPlot_Resolution::m_pullwidth_vs_pt[NPARAMS] |
|
private |
◆ m_res
TH1* InDetPerfPlot_Resolution::m_res[NPARAMS] |
|
private |
◆ m_resHelpereta
TH2* InDetPerfPlot_Resolution::m_resHelpereta[NPARAMS] |
|
private |
◆ m_resHelpereta_neg
TH2* InDetPerfPlot_Resolution::m_resHelpereta_neg[NPARAMS] |
|
private |
◆ m_resHelpereta_pos
TH2* InDetPerfPlot_Resolution::m_resHelpereta_pos[NPARAMS] |
|
private |
◆ m_resHelperlowpt
TH2* InDetPerfPlot_Resolution::m_resHelperlowpt[NPARAMS] |
|
private |
◆ m_resHelperlowpt_neg
TH2* InDetPerfPlot_Resolution::m_resHelperlowpt_neg[NPARAMS] |
|
private |
◆ m_resHelperlowpt_pos
TH2* InDetPerfPlot_Resolution::m_resHelperlowpt_pos[NPARAMS] |
|
private |
◆ m_resHelperpt
TH2* InDetPerfPlot_Resolution::m_resHelperpt[NPARAMS] |
|
private |
◆ m_resHelperpt_neg
TH2* InDetPerfPlot_Resolution::m_resHelperpt_neg[NPARAMS] |
|
private |
◆ m_resHelperpt_pos
TH2* InDetPerfPlot_Resolution::m_resHelperpt_pos[NPARAMS] |
|
private |
◆ m_resmean_vs_eta
TH1* InDetPerfPlot_Resolution::m_resmean_vs_eta[NPARAMS] |
|
private |
◆ m_resmean_vs_eta_neg
TH1* InDetPerfPlot_Resolution::m_resmean_vs_eta_neg[NPARAMS] |
|
private |
◆ m_resmean_vs_eta_pos
TH1* InDetPerfPlot_Resolution::m_resmean_vs_eta_pos[NPARAMS] |
|
private |
◆ m_resmean_vs_lowpt
TH1* InDetPerfPlot_Resolution::m_resmean_vs_lowpt[NPARAMS] |
|
private |
◆ m_resmean_vs_lowpt_neg
TH1* InDetPerfPlot_Resolution::m_resmean_vs_lowpt_neg[NPARAMS] |
|
private |
◆ m_resmean_vs_lowpt_pos
TH1* InDetPerfPlot_Resolution::m_resmean_vs_lowpt_pos[NPARAMS] |
|
private |
◆ m_resmean_vs_pt
TH1* InDetPerfPlot_Resolution::m_resmean_vs_pt[NPARAMS] |
|
private |
◆ m_resmean_vs_pt_neg
TH1* InDetPerfPlot_Resolution::m_resmean_vs_pt_neg[NPARAMS] |
|
private |
◆ m_resmean_vs_pt_pos
TH1* InDetPerfPlot_Resolution::m_resmean_vs_pt_pos[NPARAMS] |
|
private |
◆ m_resolutionHelper
◆ m_resolutionMethod
◆ m_resP
float InDetPerfPlot_Resolution::m_resP[NPARAMS] |
|
private |
◆ m_resProjections_vs_eta
◆ m_resProjections_vs_lowpt
◆ m_resProjections_vs_pt
◆ m_reswidth_vs_eta
TH1* InDetPerfPlot_Resolution::m_reswidth_vs_eta[NPARAMS] |
|
private |
◆ m_reswidth_vs_eta_neg
TH1* InDetPerfPlot_Resolution::m_reswidth_vs_eta_neg[NPARAMS] |
|
private |
◆ m_reswidth_vs_eta_pos
TH1* InDetPerfPlot_Resolution::m_reswidth_vs_eta_pos[NPARAMS] |
|
private |
◆ m_reswidth_vs_lowpt
TH1* InDetPerfPlot_Resolution::m_reswidth_vs_lowpt[NPARAMS] |
|
private |
◆ m_reswidth_vs_lowpt_neg
TH1* InDetPerfPlot_Resolution::m_reswidth_vs_lowpt_neg[NPARAMS] |
|
private |
◆ m_reswidth_vs_lowpt_pos
TH1* InDetPerfPlot_Resolution::m_reswidth_vs_lowpt_pos[NPARAMS] |
|
private |
◆ m_reswidth_vs_pt
TH1* InDetPerfPlot_Resolution::m_reswidth_vs_pt[NPARAMS] |
|
private |
◆ m_reswidth_vs_pt_neg
TH1* InDetPerfPlot_Resolution::m_reswidth_vs_pt_neg[NPARAMS] |
|
private |
◆ m_reswidth_vs_pt_pos
TH1* InDetPerfPlot_Resolution::m_reswidth_vs_pt_pos[NPARAMS] |
|
private |
◆ m_sDirectory
std::string PlotBase::m_sDirectory |
|
protectedinherited |
◆ m_secdTrk
bool InDetPerfPlot_Resolution::m_secdTrk |
|
private |
◆ m_sigma
TH1* InDetPerfPlot_Resolution::m_sigma[NPARAMS] |
|
private |
◆ m_sigma_vs_eta
TProfile* InDetPerfPlot_Resolution::m_sigma_vs_eta[NPARAMS] |
|
private |
◆ m_sigma_vs_lowpt
TProfile* InDetPerfPlot_Resolution::m_sigma_vs_lowpt[NPARAMS] |
|
private |
◆ m_sigma_vs_pt
TProfile* InDetPerfPlot_Resolution::m_sigma_vs_pt[NPARAMS] |
|
private |
◆ m_sigP
float InDetPerfPlot_Resolution::m_sigP[NPARAMS] |
|
private |
◆ m_trkErrP
float InDetPerfPlot_Resolution::m_trkErrP[NPARAMS] |
|
private |
◆ m_trkP
float InDetPerfPlot_Resolution::m_trkP[NPARAMS] |
|
private |
◆ m_truetrkP
float InDetPerfPlot_Resolution::m_truetrkP[NPARAMS] |
|
private |
◆ m_vBookedEfficiencies
◆ m_vBookedHistograms
std::vector<HistData> PlotBase::m_vBookedHistograms |
|
protectedinherited |
◆ m_vBookedTrees
std::vector<TreeData> PlotBase::m_vBookedTrees |
|
protectedinherited |
◆ m_vSubNodes
std::vector<PlotBase*> PlotBase::m_vSubNodes |
|
protectedinherited |
The documentation for this class was generated from the following files:
std::atomic< MSG::Level > m_lvl
Current logging level.
static std::string constructPrefix(std::string dir, bool prependDir)
std::string replace(std::string s, const std::string &s2, const std::string &s3)
TH2 * m_resHelperlowpt_pos[NPARAMS]
std::vector< HistData > m_vBookedHistograms
TH2 * m_resHelpereta_pos[NPARAMS]
TProfile * m_sigma_vs_lowpt[NPARAMS]
TH1 * m_pullwidth_vs_eta[NPARAMS]
TH2 * m_pullHelpereta[NPARAMS]
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.
TH2 * m_pullHelperpt[NPARAMS]
constexpr unsigned nEtaBins
TH1 * m_pullmean_vs_eta[NPARAMS]
TH1 * m_resmean_vs_pt_neg[NPARAMS]
TH1 * m_reswidth_vs_pt_neg[NPARAMS]
float m_PtBins[m_nPtBins+1]
void makeResolutions(const TH2 *h_input2D, TH1 *hwidth, TH1 *hmean, TH1 *hproj[], bool saveProjections, IDPVM::ResolutionHelper::methods theMethod=IDPVM::ResolutionHelper::iterRMS_convergence)
extract 1D resolution plots from a 2D "residual vs observable" histogram.
TH1 * m_reswidth_vs_pt_pos[NPARAMS]
Scalar eta() const
pseudorapidity method
static const int m_nLowPtBins
virtual void initializePlots()
TH1 * m_resProjections_vs_pt[NPARAMS][m_nPtBins]
void getTrackParameters(const xAOD::TruthParticle &truthprt)
TH2 * m_resHelperlowpt[NPARAMS]
std::vector< EfficiencyData > m_vBookedEfficiencies
IDPVM::ResolutionHelper::methods m_resolutionMethod
TH1 * m_pullwidth_vs_lowpt[NPARAMS]
TH2 * m_resHelperpt_pos[NPARAMS]
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.
TH1 * m_pullProjections_vs_pt[NPARAMS][m_nPtBins]
TH1 * m_resProjections_vs_lowpt[NPARAMS][m_nLowPtBins]
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.
float m_truetrkP[NPARAMS]
TH1 * m_pullmean_vs_lowpt[NPARAMS]
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
TH2 * m_resHelpereta[NPARAMS]
IDPVM::ResolutionHelper m_resolutionHelper
TH1 * m_resmean_vs_lowpt_pos[NPARAMS]
TH1 * m_pullmean_vs_pt[NPARAMS]
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
TH2 * m_resHelperpt[NPARAMS]
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
IMessageSvc * getMessageSvc(bool quiet=false)
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.
float m_LowPtBins[m_nLowPtBins+1]
std::vector< double > logLinearBinning(const unsigned int nBins, const double absXmin, const double absXmax, const bool symmetriseAroundZero)
TH1 * m_pullProjections_vs_eta[NPARAMS][m_nEtaBins]
IHistogramDefinitionSvc::axesLimits_t xAxis
std::vector< PlotBase * > m_vSubNodes
TH2 * m_resHelperlowpt_neg[NPARAMS]
TH1 * m_resmean_vs_pt_pos[NPARAMS]
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
TH1 * m_reswidth_vs_eta[NPARAMS]
std::string m_paramProp[NPARAMS]
def TProfile(*args, **kwargs)
TH1 * m_resmean_vs_eta[NPARAMS]
TH1 * m_reswidth_vs_pt[NPARAMS]
static const int m_nPtBins
TH1 * m_resmean_vs_lowpt[NPARAMS]
TH2 * m_pullHelperlowpt[NPARAMS]
TH2 * m_resHelperpt_neg[NPARAMS]
TProfile * m_sigma_vs_pt[NPARAMS]
TH1 * m_resmean_vs_eta_neg[NPARAMS]
MsgStream & msg() const
The standard message stream.
Almost-a-struct for holding the single histogram definition.
ServiceHandle< IHistogramDefinitionSvc > m_histoDefSvc
TH1 * m_resmean_vs_pt[NPARAMS]
std::string to_string(const DetectorType &type)
TProfile * m_sigma_vs_eta[NPARAMS]
TH1 * m_reswidth_vs_eta_pos[NPARAMS]
TH1 * m_reswidth_vs_lowpt_pos[NPARAMS]
InDetPlotBase(InDetPlotBase *pParent, const std::string &dirName)
Constructor taking parent node and directory name for plots.
TH1 * m_resProjections_vs_eta[NPARAMS][m_nEtaBins]
TH1 * m_pullwidth_vs_pt[NPARAMS]
void getPlots(float weight=1.0)
TH1 * m_resmean_vs_eta_pos[NPARAMS]
TH1 * m_pullProjections_vs_lowpt[NPARAMS][m_nLowPtBins]
#define ATH_MSG_WARNING(x)
std::string m_nm
Message source name.
TH1 * m_resmean_vs_lowpt_neg[NPARAMS]
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
virtual double pt() const override final
The transverse momentum ( ) of the particle.
bool isValid() const
Is the histogram definition valid.
TH1 * m_reswidth_vs_lowpt[NPARAMS]
void initMessaging() const
Initialize our message level and MessageSvc.
TH1 * m_reswidth_vs_eta_neg[NPARAMS]
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
TH1 * m_reswidth_vs_lowpt_neg[NPARAMS]
virtual void finalizePlots()
std::vector< TreeData > m_vBookedTrees
TH2 * m_resHelpereta_neg[NPARAMS]