Loading [MathJax]/jax/input/TeX/config.js
 |
ATLAS Offline Software
|
#include <SummaryPlots.h>
|
| SummaryPlots (PlotMgr *pParent, const std::string &dirName, const std::string &anaTag, bool doTrigger=false) |
| Constructor. More...
|
|
virtual | ~SummaryPlots ()=default |
| Destructor. More...
|
|
StatusCode | fillPlots (const std::vector< size_t > &testTrackCounts, const std::vector< size_t > &refTrackCounts, bool isNewEvent, float weight) |
| Dedicated fill method. More...
|
|
void | initializePlots () |
| Book the histograms. More...
|
|
StatusCode | bookPlots () |
|
void | finalizePlots () |
| Print out final stats on histograms. More...
|
|
StatusCode | initialize () |
| initialize More...
|
|
SinglePlotDefinition | retrieveDefinition (const std::string &identifier, const std::string &folderOverride="", const std::string &nameOverride="") const |
| Retrieve a single histogram definition, given the unique string identifier. More...
|
|
template<class P > |
StatusCode | retrieveAndBook (P *&pHisto, const std::string &identifier, const std::string &folderOverride="", const std::string &nameOverride="") |
|
StatusCode | book (TH1 *&pHisto, const SinglePlotDefinition &def) |
| Book a TH1 histogram. More...
|
|
StatusCode | book (TH2 *&pHisto, const SinglePlotDefinition &def) |
| Book a TH2 histogram. More...
|
|
StatusCode | book (TH3 *&pHisto, const SinglePlotDefinition &def) |
| Book a TH3 histogram. More...
|
|
StatusCode | book (TProfile *&pHisto, const SinglePlotDefinition &def) |
| Book a TProfile histogram. More...
|
|
StatusCode | book (TProfile2D *&pHisto, const SinglePlotDefinition &def) |
| Book a TProfile2D histogram. More...
|
|
StatusCode | book (TEfficiency *&pHisto, const SinglePlotDefinition &def) |
| Book a (1D or 2D) TEfficiency histogram. More...
|
|
StatusCode | fill (TH1 *pTh1, float value, float weight=1.) const |
|
StatusCode | fill (TH2 *pTh2, float xval, float yval, float weight=1.) const |
| Fill a TH2 histogram. More...
|
|
StatusCode | fill (TH3 *pTh3, float xval, float yval, float zval, float weight=1.) const |
| Fill a TH3 histogram. More...
|
|
StatusCode | fill (TProfile *pTprofile, float xval, float yval, float weight=1.) const |
| Fill a TProfile histogram weight allows weighted-averaging in the profile. More...
|
|
StatusCode | fill (TProfile2D *pTprofile, float xval, float yval, float zval, float weight=1.) const |
| Fill a TProfile2D histogram weight allows weighted-averaging in the profile. More...
|
|
StatusCode | fill (TEfficiency *pTeff, float value, bool accepted, float weight=1.) const |
| Fill a (1D) TEfficiency histogram. More...
|
|
StatusCode | fill (TEfficiency *pTeff2d, float xvalue, float yvalue, bool accepted, float weight=1.) const |
| Fill a (2D) TEfficiency histogram. More...
|
|
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...
|
|
|
template<class P > |
StatusCode | setVariableBins (P *&pHisto, const std::vector< float > &binning, char axis) |
| SetVariableBins. More...
|
|
template<class P > |
StatusCode | setVariableBinsEff (P *&pHisto, const std::vector< float > &binning, char axis) |
| SetVariableBins (for Efficiencies) More...
|
|
template<class P > |
StatusCode | setLogLinearBins (P *&pHisto, unsigned int nBins, float absMin, float absMax, char axis) |
| Set Log-Linear axis. More...
|
|
template<class P > |
StatusCode | setLogLinearBinsEff (P *&pHisto, unsigned int nBins, float absMin, float absMax, char axis) |
| Set Log-Linear axis (for Efficiencies) More...
|
|
std::vector< float > | getLogLinearBins (unsigned int nBins, float absMin, float absMax, bool symmetriseAroundZero=false) |
| Get Log-Linear binning vector inherited from InDetPhysValMonitoring/src/logLinearBinning.h. More...
|
|
template<class P > |
StatusCode | setBinLabels (P *&pHisto, const std::vector< std::string > &binLabels, char axis) |
| SetBinLabels (for TH* and TProfile* only) More...
|
|
|
enum | Counter : size_t {
ALL = TrackAnalysisCollections::ALL,
SELECTED = TrackAnalysisCollections::SELECTED,
INROI = TrackAnalysisCollections::INROI,
MATCHED = TrackAnalysisCollections::MATCHED,
NCOUNTERS = TrackAnalysisCollections::NCOUNTERS
} |
| Importing Counter enum. More...
|
|
enum | SummaryBin : size_t {
Nevents,
NtotTest,
NselTest,
NmatchTest,
NtotRef,
NselRef,
NmatchRef,
Nbins
} |
|
enum | SummaryBin_trig : size_t {
Nevents_trig,
Nrois_trig,
NtotTest_trig,
NselTest_trig,
NinRoiTest_trig,
NmatchTest_trig,
NtotRef_trig,
NselRef_trig,
NinRoiRef_trig,
NmatchRef_trig,
Nbins_trig
} |
|
Definition at line 20 of file SummaryPlots.h.
◆ Counter
Importing Counter enum.
Enumerator |
---|
ALL | |
SELECTED | |
INROI | |
MATCHED | |
NCOUNTERS | |
Definition at line 53 of file SummaryPlots.h.
◆ SummaryBin
Enumerator |
---|
Nevents | |
NtotTest | |
NselTest | |
NmatchTest | |
NtotRef | |
NselRef | |
NmatchRef | |
Nbins | |
Definition at line 61 of file SummaryPlots.h.
◆ SummaryBin_trig
Enumerator |
---|
Nevents_trig | |
Nrois_trig | |
NtotTest_trig | |
NselTest_trig | |
NinRoiTest_trig | |
NmatchTest_trig | |
NtotRef_trig | |
NselRef_trig | |
NinRoiRef_trig | |
NmatchRef_trig | |
Nbins_trig | |
Definition at line 72 of file SummaryPlots.h.
◆ SummaryPlots()
IDTPM::SummaryPlots::SummaryPlots |
( |
PlotMgr * |
pParent, |
|
|
const std::string & |
dirName, |
|
|
const std::string & |
anaTag, |
|
|
bool |
doTrigger = false |
|
) |
| |
Constructor.
local include(s)
--— Constructor --—
Definition at line 17 of file SummaryPlots.cxx.
◆ ~SummaryPlots()
virtual IDTPM::SummaryPlots::~SummaryPlots |
( |
| ) |
|
|
virtualdefault |
◆ book() [1/6]
Book a (1D or 2D) TEfficiency histogram.
Definition at line 276 of file PlotMgr.cxx.
279 if( not def.isValid() ) {
280 ATH_MSG_ERROR(
"Non-valid TEfficiency plot : " << def.identifier() );
281 return StatusCode::FAILURE;
284 pHisto = ( def.nBinsY() == 0 ) ?
286 def.nBinsX(), def.xLow(), def.xHigh(),
289 def.nBinsX(), def.xLow(), def.xHigh(),
290 def.nBinsY(), def.yLow(), def.yHigh(),
293 if( def.doLogLinBinsX() ) {
297 if( def.doLogLinBinsY() and def.nBinsY() != 0 ) {
301 if( def.doVarBinsX() ) {
305 if( def.doVarBinsY() and def.nBinsY() != 0 ) {
309 return StatusCode::SUCCESS;
◆ book() [2/6]
Book a TH1 histogram.
— Book histograms methods —
Book a TH1 histogram
Definition at line 78 of file PlotMgr.cxx.
81 if( not def.isValid() ) {
83 return StatusCode::FAILURE;
86 pHisto =
Book1D( def.name(), def.titleDigest(),
87 def.nBinsX(), def.xLow(), def.xHigh(),
90 if( def.doLogLinBinsX() ) {
94 if( def.doVarBinsX() ) {
98 if( not def.xBinLabelsVec().empty() ) {
102 return StatusCode::SUCCESS;
◆ book() [3/6]
Book a TH2 histogram.
Definition at line 107 of file PlotMgr.cxx.
110 if( not def.isValid() ) {
111 ATH_MSG_ERROR(
"Non-valid TH2 plot : " << def.identifier() );
112 return StatusCode::FAILURE;
115 pHisto =
Book2D( def.name(), def.titleDigest(),
116 def.nBinsX(), def.xLow(), def.xHigh(),
117 def.nBinsY(), def.yLow(), def.yHigh(),
120 if( def.doLogLinBinsX() ) {
124 if( def.doLogLinBinsY() ) {
128 if( def.doVarBinsX() ) {
132 if( def.doVarBinsY() ) {
136 if( not def.xBinLabelsVec().empty() ) {
140 if( not def.yBinLabelsVec().empty() ) {
144 return StatusCode::SUCCESS;
◆ book() [4/6]
Book a TH3 histogram.
Definition at line 149 of file PlotMgr.cxx.
152 if( not def.isValid() ) {
153 ATH_MSG_ERROR(
"Non-valid TH3 plot : " << def.identifier() );
154 return StatusCode::FAILURE;
157 pHisto =
Book3D( def.name(), def.titleDigest(),
158 def.nBinsX(), def.xLow(), def.xHigh(),
159 def.nBinsY(), def.yLow(), def.yHigh(),
160 def.nBinsZ(), def.zLow(), def.zHigh(),
163 if( def.doLogLinBinsX() ) {
167 if( def.doLogLinBinsY() ) {
171 if( def.doLogLinBinsZ() ) {
175 if( def.doVarBinsX() ) {
179 if( def.doVarBinsY() ) {
183 if( def.doVarBinsZ() ) {
187 if( not def.xBinLabelsVec().empty() ) {
191 if( not def.yBinLabelsVec().empty() ) {
195 if( not def.zBinLabelsVec().empty() ) {
199 return StatusCode::SUCCESS;
◆ book() [5/6]
Book a TProfile histogram.
Definition at line 204 of file PlotMgr.cxx.
207 if( not def.isValid() ) {
208 ATH_MSG_ERROR(
"Non-valid TProfile plot : " << def.identifier() );
209 return StatusCode::FAILURE;
213 def.nBinsX(), def.xLow(), def.xHigh(),
214 def.yLow(), def.yHigh(),
217 if( def.doLogLinBinsX() ) {
221 if( def.doVarBinsX() ) {
225 if( not def.xBinLabelsVec().empty() ) {
229 return StatusCode::SUCCESS;
◆ book() [6/6]
Book a TProfile2D histogram.
Definition at line 234 of file PlotMgr.cxx.
237 if( not def.isValid() ) {
238 ATH_MSG_ERROR(
"Non-valid TProfile2D plot : " << def.identifier() );
239 return StatusCode::FAILURE;
243 def.nBinsX(), def.xLow(), def.xHigh(),
244 def.nBinsY(), def.yLow(), def.yHigh(),
247 if( def.doLogLinBinsX() ) {
251 if( def.doLogLinBinsY() ) {
255 if( def.doVarBinsX() ) {
259 if( def.doVarBinsY() ) {
263 if( not def.xBinLabelsVec().empty() ) {
267 if( not def.yBinLabelsVec().empty() ) {
271 return StatusCode::SUCCESS;
◆ 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);
◆ bookPlots()
StatusCode IDTPM::SummaryPlots::bookPlots |
( |
| ) |
|
◆ 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() [1/7]
StatusCode IDTPM::PlotMgr::fill |
( |
TEfficiency * |
pTeff, |
|
|
float |
value, |
|
|
bool |
accepted, |
|
|
float |
weight = 1. |
|
) |
| const |
|
inherited |
Fill a (1D) TEfficiency histogram.
fill the plot To get proper error estimate when possible
Definition at line 420 of file PlotMgr.cxx.
424 ATH_MSG_ERROR(
"Trying to fill non-definded 1D TEfficiency" );
425 return StatusCode::FAILURE;
428 if( std::isnan(
value ) or std::isnan(
weight ) ) {
429 ATH_MSG_ERROR(
"Non-valid fill arguments for 1D TEfficiency:" << pTeff->GetName() );
430 return StatusCode::FAILURE;
436 else pTeff->FillWeighted( accepted,
weight,
value );
437 return StatusCode::SUCCESS;
◆ fill() [2/7]
StatusCode IDTPM::PlotMgr::fill |
( |
TEfficiency * |
pTeff2d, |
|
|
float |
xvalue, |
|
|
float |
yvalue, |
|
|
bool |
accepted, |
|
|
float |
weight = 1. |
|
) |
| const |
|
inherited |
Fill a (2D) TEfficiency histogram.
fill the plot To get proper error estimate when possible
Definition at line 442 of file PlotMgr.cxx.
446 ATH_MSG_ERROR(
"Trying to fill non-definded 2D TEfficiency" );
447 return StatusCode::FAILURE;
450 if( std::isnan( xvalue ) or std::isnan( yvalue ) or std::isnan(
weight ) ) {
451 ATH_MSG_ERROR(
"Non-valid fill arguments for 2D TEfficiency:" << pTeff2d->GetName() );
452 return StatusCode::FAILURE;
457 if(
weight==1.) pTeff2d->Fill( accepted, xvalue, yvalue );
458 else pTeff2d->FillWeighted( accepted,
weight, xvalue, yvalue );
459 return StatusCode::SUCCESS;
◆ fill() [3/7]
StatusCode IDTPM::PlotMgr::fill |
( |
TH1 * |
pTh1, |
|
|
float |
value, |
|
|
float |
weight = 1. |
|
) |
| const |
|
inherited |
— Fill plots methods —
Fill a TH1 histogram
— Fill histograms methods —
Fill a TH1 histogram
fill the plot
Definition at line 317 of file PlotMgr.cxx.
322 return StatusCode::FAILURE;
325 if( std::isnan(
value ) or std::isnan(
weight ) ) {
326 ATH_MSG_ERROR(
"Non-valid fill arguments for TH1:" << pTh1->GetName() );
327 return StatusCode::FAILURE;
332 return StatusCode::SUCCESS;
◆ fill() [4/7]
StatusCode IDTPM::PlotMgr::fill |
( |
TH2 * |
pTh2, |
|
|
float |
xval, |
|
|
float |
yval, |
|
|
float |
weight = 1. |
|
) |
| const |
|
inherited |
Fill a TH2 histogram.
fill the plot
Definition at line 337 of file PlotMgr.cxx.
342 return StatusCode::FAILURE;
345 if( std::isnan(
xval ) or std::isnan(
yval ) or std::isnan(
weight ) ) {
346 ATH_MSG_ERROR(
"Non-valid fill arguments for TH2:" << pTh2->GetName() );
347 return StatusCode::FAILURE;
352 return StatusCode::SUCCESS;
◆ fill() [5/7]
StatusCode IDTPM::PlotMgr::fill |
( |
TH3 * |
pTh3, |
|
|
float |
xval, |
|
|
float |
yval, |
|
|
float |
zval, |
|
|
float |
weight = 1. |
|
) |
| const |
|
inherited |
Fill a TH3 histogram.
fill the plot
Definition at line 357 of file PlotMgr.cxx.
362 return StatusCode::FAILURE;
365 if( std::isnan(
xval ) or std::isnan(
yval ) or
366 std::isnan( zval ) or std::isnan(
weight ) ) {
367 ATH_MSG_ERROR(
"Non-valid fill arguments for TH3:" << pTh3->GetName() );
368 return StatusCode::FAILURE;
374 return StatusCode::SUCCESS;
◆ fill() [6/7]
StatusCode IDTPM::PlotMgr::fill |
( |
TProfile * |
pTprofile, |
|
|
float |
xval, |
|
|
float |
yval, |
|
|
float |
weight = 1. |
|
) |
| const |
|
inherited |
Fill a TProfile histogram weight allows weighted-averaging in the profile.
Fill a TProfile histogram.
fill the plot
Definition at line 379 of file PlotMgr.cxx.
382 if( not pTprofile ) {
384 return StatusCode::FAILURE;
387 if( std::isnan(
xval ) or std::isnan(
yval ) or std::isnan(
weight ) ) {
388 ATH_MSG_ERROR(
"Non-valid fill arguments for TProfile:" << pTprofile->GetName() );
389 return StatusCode::FAILURE;
394 return StatusCode::SUCCESS;
◆ fill() [7/7]
StatusCode IDTPM::PlotMgr::fill |
( |
TProfile2D * |
pTprofile, |
|
|
float |
xval, |
|
|
float |
yval, |
|
|
float |
zval, |
|
|
float |
weight = 1. |
|
) |
| const |
|
inherited |
Fill a TProfile2D histogram weight allows weighted-averaging in the profile.
Fill a TProfile2D histogram.
fill the plot
Definition at line 399 of file PlotMgr.cxx.
402 if( not pTprofile ) {
404 return StatusCode::FAILURE;
407 if( std::isnan(
xval ) or std::isnan(
yval ) or
408 std::isnan( zval ) or std::isnan(
weight ) ) {
409 ATH_MSG_ERROR(
"Non-valid fill arguments for TProfile2D:" << pTprofile->GetName() );
410 return StatusCode::FAILURE;
415 return StatusCode::SUCCESS;
◆ fillPlots()
StatusCode IDTPM::SummaryPlots::fillPlots |
( |
const std::vector< size_t > & |
testTrackCounts, |
|
|
const std::vector< size_t > & |
refTrackCounts, |
|
|
bool |
isNewEvent, |
|
|
float |
weight |
|
) |
| |
Dedicated fill method.
— Dedicated fill method —
Filling summary plot bins (trigger navigation case)
bins only filled once per events, to avoid double-counting
bins filled for every RoI
Filling summary plot bins (full-scan/offline-like case)
For offline analysis isNewEvent, is always true by construction, so this condition is redundant. Still kept it for consistency/robustness
Definition at line 54 of file SummaryPlots.cxx.
91 return StatusCode::SUCCESS;
◆ finalize()
void PlotBase::finalize |
( |
| ) |
|
|
inherited |
◆ finalizePlots()
void IDTPM::SummaryPlots::finalizePlots |
( |
| ) |
|
|
virtual |
Print out final stats on histograms.
--— finalizePlots --—
print stat here if needed
Reimplemented from PlotBase.
Definition at line 98 of file SummaryPlots.cxx.
◆ getDirectory()
const std::string& PlotBase::getDirectory |
( |
| ) |
|
|
inlineinherited |
◆ getLogLinearBins()
std::vector< float > IDTPM::PlotMgr::getLogLinearBins |
( |
unsigned int |
nBins, |
|
|
float |
absMin, |
|
|
float |
absMax, |
|
|
bool |
symmetriseAroundZero = false |
|
) |
| |
|
protectedinherited |
Get Log-Linear binning vector inherited from InDetPhysValMonitoring/src/logLinearBinning.h.
Get Log-Linear binning vector.
some checks to ensure the user is requesting something sensible
reserve the vector space
define our starting bin edge and step size in log space
then populate the bin array
FIXME: currently disabled
Definition at line 464 of file PlotMgr.cxx.
467 std::vector<float> emptyVec;
469 if( absMin<=0 or absMax<=0 ) {
470 ATH_MSG_WARNING(
"absMin or absMax argument to getLogLinearBins is out of range" );
472 }
else if(
nBins==0 ) {
477 unsigned int asymVecSize =
nBins + 1;
478 std::vector<float> theBinning( asymVecSize, 0.);
480 float logStart =
std::log( absMin );
481 float logDist =
std::log( absMax ) - logStart;
484 float thisLog{ logStart };
485 for(
float& thisBin : theBinning ) {
489 if( symmetriseAroundZero ) {
◆ initialize()
StatusCode IDTPM::PlotMgr::initialize |
( |
| ) |
|
|
inherited |
initialize
— initialize —
intialize PlotBase
Definition at line 37 of file PlotMgr.cxx.
41 return StatusCode::SUCCESS;
◆ initializePlots()
void IDTPM::SummaryPlots::initializePlots |
( |
| ) |
|
|
virtual |
Book the histograms.
— Book the histograms —
Reimplemented from PlotBase.
Definition at line 28 of file SummaryPlots.cxx.
31 if(
sc.isFailure() ) {
◆ 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.
◆ 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 |
◆ retrieveAndBook()
template<class P >
StatusCode IDTPM::PlotMgr::retrieveAndBook |
( |
P *& |
pHisto, |
|
|
const std::string & |
identifier, |
|
|
const std::string & |
folderOverride = "" , |
|
|
const std::string & |
nameOverride = "" |
|
) |
| |
|
inlineinherited |
— Book plots methods —
Helper method to book plots using an identifier string
- Parameters
-
pHisto | Pointer to the histogram to be booked (assumed to be initialized to nullptr) |
histoIdentifier | string identifier of the plot (looked up from PlotsDefinitionSvc) |
nameOverride | Allows to override the histo name |
folderOverride | Allows to override the folder of the histo |
Definition at line 64 of file PlotMgr.h.
70 const SinglePlotDefinition& def =
72 if( def.isEmpty() or not def.isValid() ) {
74 return StatusCode::RECOVERABLE;
77 return StatusCode::SUCCESS;
◆ 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.
— retrieveDefinition —
Loading PlotsDefinitionSvc
retrieve a copy of the plot definition
Check if definition is empty or non-valid
Override directory?
Override name?
Definition at line 48 of file PlotMgr.cxx.
54 ISvcLocator* svcLoc = Gaudi::svcLocator();
55 SmartIF<IPlotsDefinitionSvc> plotsDefSvc(svcLoc->service(
"PlotsDefSvc"+
m_anaTag ));
59 SinglePlotDefinition sDef = plotsDefSvc->definition(
identifier );
62 if( sDef.isEmpty() or not sDef.isValid() )
return sDef;
65 if( not folderOverride.empty() ) sDef.folder( folderOverride );
68 if( not nameOverride.empty() ) sDef.name( nameOverride );
◆ setBinLabels()
template<class P >
StatusCode IDTPM::PlotMgr::setBinLabels |
( |
P *& |
pHisto, |
|
|
const std::vector< std::string > & |
binLabels, |
|
|
char |
axis |
|
) |
| |
|
inlineprotectedinherited |
SetBinLabels (for TH* and TProfile* only)
Definition at line 196 of file PlotMgr.h.
200 size_t nBinsX = pHisto->GetXaxis()->GetNbins();
201 if( nBinsX != binLabels.size() ) {
202 ATH_MSG_ERROR(
"Mismstch in number of X bin labels for : " << pHisto->GetName() );
203 return StatusCode::FAILURE;
205 for(
size_t bin = 0;
bin < nBinsX;
bin++ ) {
206 pHisto->GetXaxis()->SetBinLabel(
bin+1, binLabels[
bin ].c_str() );
210 size_t nBinsY = pHisto->GetYaxis()->GetNbins();
211 if( nBinsY != binLabels.size() ) {
212 ATH_MSG_ERROR(
"Mismstch in number of Y bin labels for : " << pHisto->GetName() );
213 return StatusCode::FAILURE;
215 for(
size_t bin = 0;
bin < nBinsY;
bin++ ) {
216 pHisto->GetYaxis()->SetBinLabel(
bin+1, binLabels[
bin ].c_str() );
220 size_t nBinsZ = pHisto->GetZaxis()->GetNbins();
221 if( nBinsZ != binLabels.size() ) {
222 ATH_MSG_ERROR(
"Mismstch in number of Z bin labels for : " << pHisto->GetName() );
223 return StatusCode::FAILURE;
225 for(
size_t bin = 0;
bin < nBinsZ;
bin++ ) {
226 pHisto->GetZaxis()->SetBinLabel(
bin+1, binLabels[
bin ].c_str() );
229 return StatusCode::SUCCESS;
◆ 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 |
◆ setLogLinearBins()
template<class P >
StatusCode IDTPM::PlotMgr::setLogLinearBins |
( |
P *& |
pHisto, |
|
|
unsigned int |
nBins, |
|
|
float |
absMin, |
|
|
float |
absMax, |
|
|
char |
axis |
|
) |
| |
|
inlineprotectedinherited |
Set Log-Linear axis.
Definition at line 170 of file PlotMgr.h.
175 return StatusCode::SUCCESS;
◆ setLogLinearBinsEff()
template<class P >
StatusCode IDTPM::PlotMgr::setLogLinearBinsEff |
( |
P *& |
pHisto, |
|
|
unsigned int |
nBins, |
|
|
float |
absMin, |
|
|
float |
absMax, |
|
|
char |
axis |
|
) |
| |
|
inlineprotectedinherited |
Set Log-Linear axis (for Efficiencies)
Definition at line 180 of file PlotMgr.h.
185 return StatusCode::SUCCESS;
◆ setVariableBins()
template<class P >
StatusCode IDTPM::PlotMgr::setVariableBins |
( |
P *& |
pHisto, |
|
|
const std::vector< float > & |
binning, |
|
|
char |
axis |
|
) |
| |
|
inlineprotectedinherited |
SetVariableBins.
Definition at line 135 of file PlotMgr.h.
139 ATH_MSG_ERROR(
"Non-valid variable plot binning : " << pHisto->GetName() );
140 return StatusCode::FAILURE;
145 return StatusCode::SUCCESS;
◆ setVariableBinsEff()
template<class P >
StatusCode IDTPM::PlotMgr::setVariableBinsEff |
( |
P *& |
pHisto, |
|
|
const std::vector< float > & |
binning, |
|
|
char |
axis |
|
) |
| |
|
inlineprotectedinherited |
SetVariableBins (for Efficiencies)
Definition at line 150 of file PlotMgr.h.
154 ATH_MSG_ERROR(
"Non-valid variable plot binning : " << pHisto->GetName() );
155 return StatusCode::FAILURE;
158 if(
axis ==
'X' ) pHisto->SetBins( binningD.size()-1, binningD.data() );
161 pHisto->GetTotalHistogram()->GetNbinsX(),
162 pHisto->GetTotalHistogram()->GetXaxis()->GetXbins()->GetArray(),
163 binningD.size()-1, binningD.data() );
165 return StatusCode::SUCCESS;
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_anaTag
std::string IDTPM::PlotMgr::m_anaTag |
|
protectedinherited |
◆ m_doTrigger
bool IDTPM::SummaryPlots::m_doTrigger {} |
|
private |
◆ m_iDetailLevel
int PlotBase::m_iDetailLevel |
|
protectedinherited |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ 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_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_sDirectory
std::string PlotBase::m_sDirectory |
|
protectedinherited |
◆ m_summary
TH1* IDTPM::SummaryPlots::m_summary {} |
|
private |
◆ m_summary_trig
TH1* IDTPM::SummaryPlots::m_summary_trig {} |
|
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)
StatusCode book(TH1 *&pHisto, const SinglePlotDefinition &def)
Book a TH1 histogram.
std::vector< HistData > m_vBookedHistograms
const std::string & getDirectory()
std::vector< float > getLogLinearBins(unsigned int nBins, float absMin, float absMax, bool symmetriseAroundZero=false)
Get Log-Linear binning vector inherited from InDetPhysValMonitoring/src/logLinearBinning....
StatusCode setVariableBinsEff(P *&pHisto, const std::vector< float > &binning, char axis)
SetVariableBins (for Efficiencies)
StatusCode setLogLinearBinsEff(P *&pHisto, unsigned int nBins, float absMin, float absMax, char axis)
Set Log-Linear axis (for Efficiencies)
std::vector< EfficiencyData > m_vBookedEfficiencies
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.
SinglePlotDefinition retrieveDefinition(const std::string &identifier, const std::string &folderOverride="", const std::string &nameOverride="") const
Retrieve a single histogram definition, given the unique string identifier.
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
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.
std::vector< PlotBase * > m_vSubNodes
def TProfile(*args, **kwargs)
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode setBinLabels(P *&pHisto, const std::vector< std::string > &binLabels, char axis)
SetBinLabels (for TH* and TProfile* only)
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...
MsgStream & msg() const
The standard message stream.
TH3F * 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)
Book a TH3F histogram.
StatusCode fill(TH1 *pTh1, float value, float weight=1.) const
StatusCode setVariableBins(P *&pHisto, const std::vector< float > &binning, char axis)
SetVariableBins.
StatusCode setLogLinearBins(P *&pHisto, unsigned int nBins, float absMin, float absMax, char axis)
Set Log-Linear axis.
StatusCode retrieveAndBook(P *&pHisto, const std::string &identifier, const std::string &folderOverride="", const std::string &nameOverride="")
#define ATH_MSG_WARNING(x)
std::string m_nm
Message source name.
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.
void initMessaging() const
Initialize our message level and MessageSvc.
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
virtual void finalizePlots()
std::vector< TreeData > m_vBookedTrees