|
ATLAS Offline Software
|
#include <DuplicateRatePlots.h>
|
| DuplicateRatePlots (PlotMgr *pParent, const std::string &dirName, const std::string &anaTag, const std::string &trackType, bool doGlobalPlots=false, bool doTruthMuPlots=false) |
| Constructor. More...
|
|
virtual | ~DuplicateRatePlots ()=default |
| Destructor. More...
|
|
template<typename PARTICLE > |
StatusCode | fillPlots (const PARTICLE &particle, unsigned int nMatched, float truthMu, float actualMu, float weight) |
| Dedicated fill method (for tracks and/or truth particles) 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...
|
|
Definition at line 19 of file DuplicateRatePlots.h.
◆ DuplicateRatePlots()
IDTPM::DuplicateRatePlots::DuplicateRatePlots |
( |
PlotMgr * |
pParent, |
|
|
const std::string & |
dirName, |
|
|
const std::string & |
anaTag, |
|
|
const std::string & |
trackType, |
|
|
bool |
doGlobalPlots = false , |
|
|
bool |
doTruthMuPlots = false |
|
) |
| |
◆ ~DuplicateRatePlots()
virtual IDTPM::DuplicateRatePlots::~DuplicateRatePlots |
( |
| ) |
|
|
virtualdefault |
◆ book() [1/6]
Book a (1D or 2D) TEfficiency histogram.
Definition at line 240 of file PlotMgr.cxx.
243 if( not def.isValid() ) {
244 ATH_MSG_ERROR(
"Non-valid TEfficiency plot : " << def.identifier() );
245 return StatusCode::FAILURE;
248 pHisto = ( def.nBinsY() == 0 ) ?
250 def.nBinsX(), def.xLow(), def.xHigh(),
253 def.nBinsX(), def.xLow(), def.xHigh(),
254 def.nBinsY(), def.yLow(), def.yHigh(),
257 if( def.doLogLinBinsX() ) {
261 if( def.doLogLinBinsY() and def.nBinsY() != 0 ) {
265 if( def.doVarBinsX() ) {
269 if( def.doVarBinsY() and def.nBinsY() != 0 ) {
273 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 return StatusCode::SUCCESS;
◆ book() [3/6]
Book a TH2 histogram.
Definition at line 103 of file PlotMgr.cxx.
106 if( not def.isValid() ) {
107 ATH_MSG_ERROR(
"Non-valid TH2 plot : " << def.identifier() );
108 return StatusCode::FAILURE;
111 pHisto =
Book2D( def.name(), def.titleDigest(),
112 def.nBinsX(), def.xLow(), def.xHigh(),
113 def.nBinsY(), def.yLow(), def.yHigh(),
116 if( def.doLogLinBinsX() ) {
120 if( def.doLogLinBinsY() ) {
124 if( def.doVarBinsX() ) {
128 if( def.doVarBinsY() ) {
132 return StatusCode::SUCCESS;
◆ book() [4/6]
Book a TH3 histogram.
Definition at line 137 of file PlotMgr.cxx.
140 if( not def.isValid() ) {
141 ATH_MSG_ERROR(
"Non-valid TH3 plot : " << def.identifier() );
142 return StatusCode::FAILURE;
145 pHisto =
Book3D( def.name(), def.titleDigest(),
146 def.nBinsX(), def.xLow(), def.xHigh(),
147 def.nBinsY(), def.yLow(), def.yHigh(),
148 def.nBinsZ(), def.zLow(), def.zHigh(),
151 if( def.doLogLinBinsX() ) {
155 if( def.doLogLinBinsY() ) {
159 if( def.doLogLinBinsZ() ) {
163 if( def.doVarBinsX() ) {
167 if( def.doVarBinsY() ) {
171 if( def.doVarBinsZ() ) {
175 return StatusCode::SUCCESS;
◆ book() [5/6]
Book a TProfile histogram.
Definition at line 180 of file PlotMgr.cxx.
183 if( not def.isValid() ) {
184 ATH_MSG_ERROR(
"Non-valid TProfile plot : " << def.identifier() );
185 return StatusCode::FAILURE;
189 def.nBinsX(), def.xLow(), def.xHigh(),
190 def.yLow(), def.yHigh(),
193 if( def.doLogLinBinsX() ) {
197 if( def.doVarBinsX() ) {
201 return StatusCode::SUCCESS;
◆ book() [6/6]
Book a TProfile2D histogram.
Definition at line 206 of file PlotMgr.cxx.
209 if( not def.isValid() ) {
210 ATH_MSG_ERROR(
"Non-valid TProfile2D plot : " << def.identifier() );
211 return StatusCode::FAILURE;
215 def.nBinsX(), def.xLow(), def.xHigh(),
216 def.nBinsY(), def.yLow(), def.yHigh(),
219 if( def.doLogLinBinsX() ) {
223 if( def.doLogLinBinsY() ) {
227 if( def.doVarBinsX() ) {
231 if( def.doVarBinsY() ) {
235 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::DuplicateRatePlots::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 384 of file PlotMgr.cxx.
388 ATH_MSG_ERROR(
"Trying to fill non-definded 1D TEfficiency" );
389 return StatusCode::FAILURE;
392 if( std::isnan(
value ) or std::isnan(
weight ) ) {
393 ATH_MSG_ERROR(
"Non-valid fill arguments for 1D TEfficiency:" << pTeff->GetName() );
394 return StatusCode::FAILURE;
400 else pTeff->FillWeighted( accepted,
weight,
value );
401 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 406 of file PlotMgr.cxx.
410 ATH_MSG_ERROR(
"Trying to fill non-definded 2D TEfficiency" );
411 return StatusCode::FAILURE;
414 if( std::isnan( xvalue ) or std::isnan( yvalue ) or std::isnan(
weight ) ) {
415 ATH_MSG_ERROR(
"Non-valid fill arguments for 2D TEfficiency:" << pTeff2d->GetName() );
416 return StatusCode::FAILURE;
421 if(
weight==1.) pTeff2d->Fill( accepted, xvalue, yvalue );
422 else pTeff2d->FillWeighted( accepted,
weight, xvalue, yvalue );
423 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 281 of file PlotMgr.cxx.
286 return StatusCode::FAILURE;
289 if( std::isnan(
value ) or std::isnan(
weight ) ) {
290 ATH_MSG_ERROR(
"Non-valid fill arguments for TH1:" << pTh1->GetName() );
291 return StatusCode::FAILURE;
296 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 301 of file PlotMgr.cxx.
306 return StatusCode::FAILURE;
309 if( std::isnan(
xval ) or std::isnan(
yval ) or std::isnan(
weight ) ) {
310 ATH_MSG_ERROR(
"Non-valid fill arguments for TH2:" << pTh2->GetName() );
311 return StatusCode::FAILURE;
316 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 321 of file PlotMgr.cxx.
326 return StatusCode::FAILURE;
329 if( std::isnan(
xval ) or std::isnan(
yval ) or
330 std::isnan( zval ) or std::isnan(
weight ) ) {
331 ATH_MSG_ERROR(
"Non-valid fill arguments for TH3:" << pTh3->GetName() );
332 return StatusCode::FAILURE;
338 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 343 of file PlotMgr.cxx.
346 if( not pTprofile ) {
348 return StatusCode::FAILURE;
351 if( std::isnan(
xval ) or std::isnan(
yval ) or std::isnan(
weight ) ) {
352 ATH_MSG_ERROR(
"Non-valid fill arguments for TProfile:" << pTprofile->GetName() );
353 return StatusCode::FAILURE;
358 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 363 of file PlotMgr.cxx.
366 if( not pTprofile ) {
368 return StatusCode::FAILURE;
371 if( std::isnan(
xval ) or std::isnan(
yval ) or
372 std::isnan( zval ) or std::isnan(
weight ) ) {
373 ATH_MSG_ERROR(
"Non-valid fill arguments for TProfile2D:" << pTprofile->GetName() );
374 return StatusCode::FAILURE;
379 return StatusCode::SUCCESS;
◆ fillPlots()
template<typename PARTICLE >
StatusCode IDTPM::DuplicateRatePlots::fillPlots |
( |
const PARTICLE & |
particle, |
|
|
unsigned int |
nMatched, |
|
|
float |
truthMu, |
|
|
float |
actualMu, |
|
|
float |
weight |
|
) |
| |
Dedicated fill method (for tracks and/or truth particles)
— Dedicated fill method —
Compute track parameters
Fill the histograms
Definition at line 82 of file DuplicateRatePlots.cxx.
129 return StatusCode::SUCCESS;
◆ finalize()
void PlotBase::finalize |
( |
| ) |
|
|
inherited |
◆ finalizePlots()
void IDTPM::DuplicateRatePlots::finalizePlots |
( |
| ) |
|
|
virtual |
Print out final stats on histograms.
--— finalizePlots --—
print stat here if needed
Reimplemented from PlotBase.
Definition at line 142 of file DuplicateRatePlots.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 428 of file PlotMgr.cxx.
431 std::vector<float> emptyVec;
433 if( absMin<=0 or absMax<=0 ) {
434 ATH_MSG_WARNING(
"absMin or absMax argument to getLogLinearBins is out of range" );
436 }
else if(
nBins==0 ) {
441 unsigned int asymVecSize =
nBins + 1;
442 std::vector<float> theBinning( asymVecSize, 0.);
444 float logStart =
std::log( absMin );
445 float logDist =
std::log( absMax ) - logStart;
448 float thisLog{ logStart };
449 for(
float& thisBin : theBinning ) {
453 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::DuplicateRatePlots::initializePlots |
( |
| ) |
|
|
virtual |
◆ 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 );
◆ 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_doGlobalPlots
bool IDTPM::DuplicateRatePlots::m_doGlobalPlots |
|
private |
◆ m_doTruthMuPlots
bool IDTPM::DuplicateRatePlots::m_doTruthMuPlots |
|
private |
◆ m_duplnum_nonzero_vs_actualMu
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_nonzero_vs_actualMu |
|
private |
◆ m_duplnum_nonzero_vs_d0
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_nonzero_vs_d0 |
|
private |
◆ m_duplnum_nonzero_vs_eta
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_nonzero_vs_eta |
|
private |
◆ m_duplnum_nonzero_vs_phi
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_nonzero_vs_phi |
|
private |
◆ m_duplnum_nonzero_vs_pt
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_nonzero_vs_pt |
|
private |
◆ m_duplnum_nonzero_vs_truthMu
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_nonzero_vs_truthMu |
|
private |
◆ m_duplnum_nonzero_vs_z0
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_nonzero_vs_z0 |
|
private |
◆ m_duplnum_vs_actualMu
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_vs_actualMu |
|
private |
◆ m_duplnum_vs_d0
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_vs_d0 |
|
private |
◆ m_duplnum_vs_eta
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_vs_eta |
|
private |
◆ m_duplnum_vs_phi
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_vs_phi |
|
private |
◆ m_duplnum_vs_pt
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_vs_pt |
|
private |
◆ m_duplnum_vs_truthMu
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_vs_truthMu |
|
private |
◆ m_duplnum_vs_z0
TProfile* IDTPM::DuplicateRatePlots::m_duplnum_vs_z0 |
|
private |
◆ m_duplrate_vs_actualMu
TEfficiency* IDTPM::DuplicateRatePlots::m_duplrate_vs_actualMu |
|
private |
◆ m_duplrate_vs_d0
TEfficiency* IDTPM::DuplicateRatePlots::m_duplrate_vs_d0 |
|
private |
◆ m_duplrate_vs_eta
TEfficiency* IDTPM::DuplicateRatePlots::m_duplrate_vs_eta |
|
private |
◆ m_duplrate_vs_phi
TEfficiency* IDTPM::DuplicateRatePlots::m_duplrate_vs_phi |
|
private |
◆ m_duplrate_vs_pt
TEfficiency* IDTPM::DuplicateRatePlots::m_duplrate_vs_pt |
|
private |
◆ m_duplrate_vs_truthMu
TEfficiency* IDTPM::DuplicateRatePlots::m_duplrate_vs_truthMu |
|
private |
◆ m_duplrate_vs_z0
TEfficiency* IDTPM::DuplicateRatePlots::m_duplrate_vs_z0 |
|
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_trackType
std::string IDTPM::DuplicateRatePlots::m_trackType |
|
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()
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
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)
TProfile * m_duplnum_nonzero_vs_truthMu
TProfile * m_duplnum_nonzero_vs_z0
StatusCode setLogLinearBinsEff(P *&pHisto, unsigned int nBins, float absMin, float absMax, char axis)
Set Log-Linear axis (for Efficiencies)
TProfile * m_duplnum_nonzero_vs_phi
TProfile * m_duplnum_vs_d0
TEfficiency * m_duplrate_vs_z0
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.
TEfficiency * m_duplrate_vs_eta
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.
TProfile * m_duplnum_nonzero_vs_actualMu
TProfile * m_duplnum_nonzero_vs_d0
TEfficiency * m_duplrate_vs_phi
TProfile * m_duplnum_nonzero_vs_eta
std::vector< PlotBase * > m_vSubNodes
TEfficiency * m_duplrate_vs_actualMu
float eta(const U &p)
Accessor utility function for getting the value of eta.
def TProfile(*args, **kwargs)
::StatusCode StatusCode
StatusCode definition for legacy code.
TProfile * m_duplnum_vs_eta
TProfile * m_duplnum_vs_phi
float pT(const U &p)
Accessor utility function for getting the value of pT.
TEfficiency * m_duplrate_vs_truthMu
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.
TProfile * m_duplnum_vs_z0
StatusCode setLogLinearBins(P *&pHisto, unsigned int nBins, float absMin, float absMax, char axis)
Set Log-Linear axis.
TEfficiency * m_duplrate_vs_d0
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.
TEfficiency * m_duplrate_vs_pt
TProfile * m_duplnum_nonzero_vs_pt
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.
TProfile * m_duplnum_vs_pt
TProfile * m_duplnum_vs_actualMu
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)
TProfile * m_duplnum_vs_truthMu
virtual void finalizePlots()
std::vector< TreeData > m_vBookedTrees