ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetValidation
InDetTrackPerfMon
src
plots
SummaryPlots.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
9
11
#include "
SummaryPlots.h
"
12
13
17
IDTPM::SummaryPlots::SummaryPlots
(
18
PlotMgr
* pParent,
const
std::string& dirName,
19
const
std::string& anaTag,
20
bool
doTrigger ) :
21
PlotMgr
( dirName, anaTag, pParent ),
22
m_doTrigger
( doTrigger ) { }
23
24
28
void
IDTPM::SummaryPlots::initializePlots
()
29
{
30
StatusCode
sc
=
bookPlots
();
31
if
(
sc
.isFailure() ) {
32
ATH_MSG_ERROR
(
"Failed to book summary plots"
);
33
}
34
}
35
36
37
StatusCode
IDTPM::SummaryPlots::bookPlots
()
38
{
39
ATH_MSG_DEBUG
(
"Booking Summary plots in "
<<
getDirectory
() );
40
41
if
(
m_doTrigger
) {
42
ATH_CHECK
(
retrieveAndBook
(
m_summary_trig
,
"summary_trigNav"
) );
43
}
else
{
44
ATH_CHECK
(
retrieveAndBook
(
m_summary
,
"summary"
) );
45
}
46
47
return
StatusCode::SUCCESS;
48
}
49
50
54
StatusCode
IDTPM::SummaryPlots::fillPlots
(
55
const
std::vector< size_t >& testTrackCounts,
56
const
std::vector< size_t >& refTrackCounts,
57
bool
isNewEvent,
58
float
weight )
59
{
60
if
(
m_doTrigger
) {
62
if
( isNewEvent ) {
64
ATH_CHECK
(
fill
(
m_summary_trig
,
Nevents_trig
+0.5, weight ) );
65
ATH_CHECK
(
fill
(
m_summary_trig
,
NtotTest_trig
+0.5, weight * testTrackCounts[
ALL
] ) );
66
ATH_CHECK
(
fill
(
m_summary_trig
,
NselTest_trig
+0.5, weight * testTrackCounts[
SELECTED
] ) );
67
ATH_CHECK
(
fill
(
m_summary_trig
,
NtotRef_trig
+0.5, weight * refTrackCounts[
ALL
] ) );
68
ATH_CHECK
(
fill
(
m_summary_trig
,
NselRef_trig
+0.5, weight * refTrackCounts[
SELECTED
] ) );
69
}
71
ATH_CHECK
(
fill
(
m_summary_trig
,
Nrois_trig
+0.5, weight ) );
72
ATH_CHECK
(
fill
(
m_summary_trig
,
NinRoiTest_trig
+0.5, weight * testTrackCounts[
INROI
] ) );
73
ATH_CHECK
(
fill
(
m_summary_trig
,
NmatchTest_trig
+0.5, weight * testTrackCounts[
MATCHED
] ) );
74
ATH_CHECK
(
fill
(
m_summary_trig
,
NinRoiRef_trig
+0.5, weight * refTrackCounts[
INROI
] ) );
75
ATH_CHECK
(
fill
(
m_summary_trig
,
NmatchRef_trig
+0.5, weight * refTrackCounts[
MATCHED
] ) );
76
}
else
{
78
if
( isNewEvent ) {
81
ATH_CHECK
(
fill
(
m_summary
,
Nevents
+0.5, weight ) );
82
ATH_CHECK
(
fill
(
m_summary
,
NtotTest
+0.5, weight * testTrackCounts[
ALL
] ) );
83
ATH_CHECK
(
fill
(
m_summary
,
NselTest
+0.5, weight * testTrackCounts[
SELECTED
] ) );
84
ATH_CHECK
(
fill
(
m_summary
,
NtotRef
+0.5, weight * refTrackCounts[
ALL
] ) );
85
ATH_CHECK
(
fill
(
m_summary
,
NselRef
+0.5, weight * refTrackCounts[
SELECTED
] ) );
86
}
87
ATH_CHECK
(
fill
(
m_summary
,
NmatchTest
+0.5, weight * testTrackCounts[
MATCHED
] ) );
88
ATH_CHECK
(
fill
(
m_summary
,
NmatchRef
+0.5, weight * refTrackCounts[
MATCHED
] ) );
89
}
90
91
return
StatusCode::SUCCESS;
92
}
93
94
98
void
IDTPM::SummaryPlots::finalizePlots
()
99
{
100
ATH_MSG_DEBUG
(
"Finalising Summary plots"
);
102
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
SummaryPlots.h
IDTPM::PlotMgr::retrieveAndBook
StatusCode retrieveAndBook(P *&pHisto, const std::string &identifier, std::string_view folderOverride="", std::string_view nameOverride="")
Definition
PlotMgr.h:65
IDTPM::PlotMgr::PlotMgr
PlotMgr(const std::string &dirName, const std::string &anaTag, PlotMgr *pParent=nullptr)
Constructor taking parent node and directory name for plots pParent = nullptr by default to book plot...
Definition
PlotMgr.cxx:25
IDTPM::SummaryPlots::finalizePlots
void finalizePlots()
Print out final stats on histograms.
Definition
SummaryPlots.cxx:98
IDTPM::SummaryPlots::m_summary
TH1 * m_summary
Definition
SummaryPlots.h:86
IDTPM::SummaryPlots::fillPlots
StatusCode fillPlots(const std::vector< size_t > &testTrackCounts, const std::vector< size_t > &refTrackCounts, bool isNewEvent, float weight)
Dedicated fill method.
Definition
SummaryPlots.cxx:54
IDTPM::SummaryPlots::m_doTrigger
bool m_doTrigger
Definition
SummaryPlots.h:50
IDTPM::SummaryPlots::SummaryPlots
SummaryPlots(PlotMgr *pParent, const std::string &dirName, const std::string &anaTag, bool doTrigger=false)
Constructor.
Definition
SummaryPlots.cxx:17
IDTPM::SummaryPlots::initializePlots
void initializePlots()
Book the histograms.
Definition
SummaryPlots.cxx:28
IDTPM::SummaryPlots::m_summary_trig
TH1 * m_summary_trig
Definition
SummaryPlots.h:87
IDTPM::SummaryPlots::bookPlots
StatusCode bookPlots()
Definition
SummaryPlots.cxx:37
IDTPM::SummaryPlots::SELECTED
@ SELECTED
Definition
SummaryPlots.h:55
IDTPM::SummaryPlots::MATCHED
@ MATCHED
Definition
SummaryPlots.h:57
IDTPM::SummaryPlots::INROI
@ INROI
Definition
SummaryPlots.h:56
IDTPM::SummaryPlots::ALL
@ ALL
Definition
SummaryPlots.h:54
IDTPM::SummaryPlots::Nevents
@ Nevents
Definition
SummaryPlots.h:62
IDTPM::SummaryPlots::NmatchTest
@ NmatchTest
Definition
SummaryPlots.h:65
IDTPM::SummaryPlots::NselRef
@ NselRef
Definition
SummaryPlots.h:67
IDTPM::SummaryPlots::NmatchRef
@ NmatchRef
Definition
SummaryPlots.h:68
IDTPM::SummaryPlots::NtotRef
@ NtotRef
Definition
SummaryPlots.h:66
IDTPM::SummaryPlots::NtotTest
@ NtotTest
Definition
SummaryPlots.h:63
IDTPM::SummaryPlots::NselTest
@ NselTest
Definition
SummaryPlots.h:64
IDTPM::SummaryPlots::NselRef_trig
@ NselRef_trig
Definition
SummaryPlots.h:80
IDTPM::SummaryPlots::NmatchTest_trig
@ NmatchTest_trig
Definition
SummaryPlots.h:78
IDTPM::SummaryPlots::NselTest_trig
@ NselTest_trig
Definition
SummaryPlots.h:76
IDTPM::SummaryPlots::NinRoiTest_trig
@ NinRoiTest_trig
Definition
SummaryPlots.h:77
IDTPM::SummaryPlots::NmatchRef_trig
@ NmatchRef_trig
Definition
SummaryPlots.h:82
IDTPM::SummaryPlots::Nrois_trig
@ Nrois_trig
Definition
SummaryPlots.h:74
IDTPM::SummaryPlots::NtotTest_trig
@ NtotTest_trig
Definition
SummaryPlots.h:75
IDTPM::SummaryPlots::NtotRef_trig
@ NtotRef_trig
Definition
SummaryPlots.h:79
IDTPM::SummaryPlots::NinRoiRef_trig
@ NinRoiRef_trig
Definition
SummaryPlots.h:81
IDTPM::SummaryPlots::Nevents_trig
@ Nevents_trig
Definition
SummaryPlots.h:73
PlotBase::getDirectory
const std::string & getDirectory()
Definition
PlotBase.h:89
fill
void fill(H5::Group &out_file, size_t iterations)
Definition
test-half-precision.cxx:64
Generated on
for ATLAS Offline Software by
1.17.0