|
ATLAS Offline Software
|
#include <OfflineElectronPlots.h>
|
| OfflineElectronPlots (PlotMgr *pParent, const std::string &dirName, const std::string &anaTag, bool doEfficiency=false) |
| Constructor. More...
|
|
virtual | ~OfflineElectronPlots ()=default |
| Destructor. More...
|
|
void | initializePlots () |
| Book the histograms. More...
|
|
StatusCode | bookPlots () |
|
StatusCode | fillPlots (const xAOD::TrackParticle &track, bool isMatched, float weight) |
| Dedicated fill methods. More...
|
|
StatusCode | fillPlots (const xAOD::TruthParticle &, bool, float) |
|
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...
|
|
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...
|
|
Definition at line 23 of file OfflineElectronPlots.h.
◆ OfflineElectronPlots()
IDTPM::OfflineElectronPlots::OfflineElectronPlots |
( |
PlotMgr * |
pParent, |
|
|
const std::string & |
dirName, |
|
|
const std::string & |
anaTag, |
|
|
bool |
doEfficiency = false |
|
) |
| |
◆ ~OfflineElectronPlots()
virtual IDTPM::OfflineElectronPlots::~OfflineElectronPlots |
( |
| ) |
|
|
virtualdefault |
◆ book() [1/6]
Book a (1D or 2D) TEfficiency histogram.
Definition at line 164 of file PlotMgr.cxx.
167 if( not def.isValid() ) {
168 ATH_MSG_ERROR(
"Non-valid TEfficiency plot : " << def.identifier() );
169 return StatusCode::FAILURE;
171 pHisto = ( def.nBinsY() == 0 ) ?
173 def.nBinsX(), def.xLow(), def.xHigh(),
176 def.nBinsX(), def.xLow(), def.xHigh(),
177 def.nBinsY(), def.yLow(), def.yHigh(),
179 return StatusCode::SUCCESS;
◆ book() [2/6]
Book a TH1 histogram.
— Book histograms methods —
Book a TH1 histogram
Definition at line 83 of file PlotMgr.cxx.
86 if( not def.isValid() ) {
88 return StatusCode::FAILURE;
90 pHisto =
Book1D( def.name(), def.titleDigest(),
91 def.nBinsX(), def.xLow(), def.xHigh(),
94 return StatusCode::SUCCESS;
◆ book() [3/6]
Book a TH2 histogram.
Definition at line 99 of file PlotMgr.cxx.
102 if( not def.isValid() ) {
103 ATH_MSG_ERROR(
"Non-valid TH2 plot : " << def.identifier() );
104 return StatusCode::FAILURE;
106 pHisto =
Book2D( def.name(), def.titleDigest(),
107 def.nBinsX(), def.xLow(), def.xHigh(),
108 def.nBinsY(), def.yLow(), def.yHigh(),
110 return StatusCode::SUCCESS;
◆ book() [4/6]
Book a TH3 histogram.
Definition at line 115 of file PlotMgr.cxx.
118 if( not def.isValid() ) {
119 ATH_MSG_ERROR(
"Non-valid TH3 plot : " << def.identifier() );
120 return StatusCode::FAILURE;
122 pHisto =
Book3D( def.name(), def.titleDigest(),
123 def.nBinsX(), def.xLow(), def.xHigh(),
124 def.nBinsY(), def.yLow(), def.yHigh(),
125 def.nBinsZ(), def.zLow(), def.zHigh(),
127 return StatusCode::SUCCESS;
◆ book() [5/6]
Book a TProfile histogram.
Definition at line 132 of file PlotMgr.cxx.
135 if( not def.isValid() ) {
136 ATH_MSG_ERROR(
"Non-valid TProfile plot : " << def.identifier() );
137 return StatusCode::FAILURE;
140 def.nBinsX(), def.xLow(), def.xHigh(),
141 def.yLow(), def.yHigh(),
143 return StatusCode::SUCCESS;
◆ book() [6/6]
Book a TProfile2D histogram.
Definition at line 148 of file PlotMgr.cxx.
151 if( not def.isValid() ) {
152 ATH_MSG_ERROR(
"Non-valid TProfile2D plot : " << def.identifier() );
153 return StatusCode::FAILURE;
156 def.nBinsX(), def.xLow(), def.xHigh(),
157 def.nBinsY(), def.yLow(), def.yHigh(),
159 return StatusCode::SUCCESS;
◆ Book1D() [1/2]
TH1F * 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 88 of file PlotBase.cxx.
91 Bool_t oldstat = TH1::AddDirectoryStatus();
92 TH1::AddDirectory(
false);
94 TH1::AddDirectory(oldstat);
◆ Book1D() [2/2]
TH1F * 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 102 of file PlotBase.cxx.
104 Bool_t oldstat = TH1::AddDirectoryStatus();
105 TH1::AddDirectory(
false);
107 refHist->GetXaxis()->GetXbins()->GetArray());
109 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 TH2D histogram with variable x axis binning.
Definition at line 138 of file PlotBase.cxx.
141 Bool_t oldstat = TH2::AddDirectoryStatus();
142 TH2::AddDirectory(
false);
145 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 TH2D histogram.
Definition at line 117 of file PlotBase.cxx.
120 Bool_t oldstat = TH2::AddDirectoryStatus();
121 TH2::AddDirectory(
false);
124 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 132 of file PlotBase.cxx.
133 return Book2D(
name,
labels, refHist->GetNbinsX(), refHist->GetXaxis()->GetXmin(), refHist->GetXaxis()->GetXmax(),
134 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 TH3D histogram.
Definition at line 151 of file PlotBase.cxx.
154 Bool_t oldstat = TH3::AddDirectoryStatus();
155 TH3::AddDirectory(
false);
157 labels.c_str(), nBinsX, startX, endX, nBinsY, startY, endY, nBinsZ, startZ, endZ);
159 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 TH3D histogram using refHist as reference for number of bins and axis range.
Definition at line 165 of file PlotBase.cxx.
167 Bool_t oldstat = TH3::AddDirectoryStatus();
168 TH3::AddDirectory(
false);
170 refHist->GetXaxis()->GetXbins()->GetArray(), refHist->GetNbinsY(),
171 refHist->GetYaxis()->GetXbins()->GetArray(), refHist->GetNbinsZ(),
172 refHist->GetZaxis()->GetXbins()->GetArray());
173 TH3::AddDirectory(oldstat);
◆ bookPlots()
StatusCode IDTPM::OfflineElectronPlots::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 251 of file PlotBase.cxx.
257 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 264 of file PlotBase.cxx.
268 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 198 of file PlotBase.cxx.
201 Bool_t oldstat = TProfile::AddDirectoryStatus();
202 TProfile::AddDirectory(
false);
205 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 180 of file PlotBase.cxx.
184 Bool_t oldstat = TProfile::AddDirectoryStatus();
185 TProfile::AddDirectory(
false);
186 std::string
opt = useRMS ?
"S" :
"";
187 if ((startY == -1) and (endY == -1)) {
192 TProfile::AddDirectory(oldstat);
◆ BookTProfile2D() [1/2]
Book a TProfile 2D histogram with variable binning in x-axis and limits in y-values.
Definition at line 225 of file PlotBase.cxx.
229 Bool_t oldstat = TProfile2D::AddDirectoryStatus();
230 TProfile2D::AddDirectory(
false);
231 std::string
opt = useRMS ?
"S" :
"";
233 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 239 of file PlotBase.cxx.
241 Bool_t oldstat = TProfile2D::AddDirectoryStatus();
242 TProfile2D::AddDirectory(
false);
243 std::string
opt = useRMS ?
"S" :
"";
245 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 211 of file PlotBase.cxx.
215 Bool_t oldstat = TProfile::AddDirectoryStatus();
216 TProfile::AddDirectory(
false);
219 TProfile::AddDirectory(oldstat);
◆ BookTree()
TTree * PlotBase::BookTree |
( |
const std::string & |
name, |
|
|
bool |
prependDir = true |
|
) |
| |
|
inherited |
Book a TTree.
Definition at line 275 of file PlotBase.cxx.
279 tree->SetAutoSave(0);
280 tree->SetAutoFlush(0);
281 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 290 of file PlotMgr.cxx.
294 ATH_MSG_ERROR(
"Trying to fill non-definded 1D TEfficiency" );
295 return StatusCode::FAILURE;
298 if( std::isnan(
value ) or std::isnan(
weight ) ) {
299 ATH_MSG_ERROR(
"Non-valid fill arguments for 1D TEfficiency:" << pTeff->GetName() );
300 return StatusCode::FAILURE;
306 else pTeff->FillWeighted( accepted,
weight,
value );
307 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 312 of file PlotMgr.cxx.
316 ATH_MSG_ERROR(
"Trying to fill non-definded 2D TEfficiency" );
317 return StatusCode::FAILURE;
320 if( std::isnan( xvalue ) or std::isnan( yvalue ) or std::isnan(
weight ) ) {
321 ATH_MSG_ERROR(
"Non-valid fill arguments for 2D TEfficiency:" << pTeff2d->GetName() );
322 return StatusCode::FAILURE;
327 if(
weight==1.) pTeff2d->Fill( accepted, xvalue, yvalue );
328 else pTeff2d->FillWeighted( accepted,
weight, xvalue, yvalue );
329 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 187 of file PlotMgr.cxx.
192 return StatusCode::FAILURE;
195 if( std::isnan(
value ) or std::isnan(
weight ) ) {
196 ATH_MSG_ERROR(
"Non-valid fill arguments for TH1:" << pTh1->GetName() );
197 return StatusCode::FAILURE;
202 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 207 of file PlotMgr.cxx.
212 return StatusCode::FAILURE;
215 if( std::isnan(
xval ) or std::isnan(
yval ) or std::isnan(
weight ) ) {
216 ATH_MSG_ERROR(
"Non-valid fill arguments for TH2:" << pTh2->GetName() );
217 return StatusCode::FAILURE;
222 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 227 of file PlotMgr.cxx.
232 return StatusCode::FAILURE;
235 if( std::isnan(
xval ) or std::isnan(
yval ) or
236 std::isnan( zval ) or std::isnan(
weight ) ) {
237 ATH_MSG_ERROR(
"Non-valid fill arguments for TH3:" << pTh3->GetName() );
238 return StatusCode::FAILURE;
244 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 249 of file PlotMgr.cxx.
252 if( not pTprofile ) {
254 return StatusCode::FAILURE;
257 if( std::isnan(
xval ) or std::isnan(
yval ) or std::isnan(
weight ) ) {
258 ATH_MSG_ERROR(
"Non-valid fill arguments for TProfile:" << pTprofile->GetName() );
259 return StatusCode::FAILURE;
264 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 269 of file PlotMgr.cxx.
272 if( not pTprofile ) {
274 return StatusCode::FAILURE;
277 if( std::isnan(
xval ) or std::isnan(
yval ) or
278 std::isnan( zval ) or std::isnan(
weight ) ) {
279 ATH_MSG_ERROR(
"Non-valid fill arguments for TProfile2D:" << pTprofile->GetName() );
280 return StatusCode::FAILURE;
285 return StatusCode::SUCCESS;
◆ fillPlots() [1/2]
Dedicated fill methods.
— Dedicated fill methods —
Compute track parameters - TODO: add more...
Fill the histograms
Definition at line 58 of file OfflineElectronPlots.cxx.
66 return StatusCode::FAILURE;
82 return StatusCode::SUCCESS;
◆ fillPlots() [2/2]
◆ finalize()
void PlotBase::finalize |
( |
| ) |
|
|
inherited |
◆ finalizePlots()
void IDTPM::OfflineElectronPlots::finalizePlots |
( |
| ) |
|
|
virtual |
◆ getDirectory()
std::string PlotBase::getDirectory |
( |
| ) |
|
|
inlineinherited |
◆ 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::OfflineElectronPlots::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 63 of file PlotMgr.h.
69 const SinglePlotDefinition& def =
71 if( def.isEmpty() or not def.isValid() ) {
73 return StatusCode::RECOVERABLE;
76 return StatusCode::SUCCESS;
◆ retrieveBookedEfficiencies()
std::vector< EfficiencyData > PlotBase::retrieveBookedEfficiencies |
( |
| ) |
|
|
inherited |
Retrieve all booked efficiency objects.
Definition at line 77 of file PlotBase.cxx.
80 std::vector<EfficiencyData> subNodeHists = subNode->retrieveBookedEfficiencies();
81 vBookedEfficiencies.insert(vBookedEfficiencies.end(), subNodeHists.begin(), subNodeHists.end());
83 return vBookedEfficiencies;
◆ retrieveBookedHistograms()
std::vector< HistData > PlotBase::retrieveBookedHistograms |
( |
| ) |
|
|
inherited |
Retrieve all booked histograms.
Definition at line 57 of file PlotBase.cxx.
60 std::vector<HistData> subNodeHists = subNode->retrieveBookedHistograms();
61 vBookedHistograms.insert(vBookedHistograms.end(), subNodeHists.begin(), subNodeHists.end());
63 return vBookedHistograms;
◆ retrieveBookedTrees()
std::vector< TreeData > PlotBase::retrieveBookedTrees |
( |
| ) |
|
|
inherited |
Retrieve all booked trees.
Definition at line 67 of file PlotBase.cxx.
70 std::vector<TreeData> subNodeTrees = subNode->retrieveBookedTrees();
71 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.
55 ISvcLocator* svcLoc = Gaudi::svcLocator();
57 if(
sc.isFailure() ) {
59 SinglePlotDefinition nullDef;
67 if( sDef.isEmpty() or not sDef.isValid() )
return sDef;
70 if( not folderOverride.empty() ) sDef.
folder( folderOverride );
73 if( not nameOverride.empty() ) sDef.name( nameOverride );
◆ setDetailLevel()
void PlotBase::setDetailLevel |
( |
int |
iDetailLevel | ) |
|
|
inherited |
Definition at line 49 of file PlotBase.cxx.
51 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_anaTag
std::string IDTPM::PlotMgr::m_anaTag |
|
protectedinherited |
◆ m_doEfficiency
bool IDTPM::OfflineElectronPlots::m_doEfficiency |
|
private |
◆ m_eff_vs_Et
TEfficiency* IDTPM::OfflineElectronPlots::m_eff_vs_Et |
|
private |
◆ m_eff_vs_EtOverPt
TEfficiency* IDTPM::OfflineElectronPlots::m_eff_vs_EtOverPt |
|
private |
◆ m_Et
TH1* IDTPM::OfflineElectronPlots::m_Et |
|
private |
◆ m_EtOverPt
TH1* IDTPM::OfflineElectronPlots::m_EtOverPt |
|
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_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
TH1F * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
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 TH2D histogram.
const xAOD::Electron * getLinkedElectron(const xAOD::TrackParticle &track, const std::string &quality)
getLinkedElectron
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.
bool isMatched(int matchInfo)
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.
TEfficiency * m_eff_vs_EtOverPt
std::vector< PlotBase * > m_vSubNodes
float eT(const U &p)
Accessor utility function for getting the value of Tranverse energy.
def TProfile(*args, **kwargs)
::StatusCode StatusCode
StatusCode definition for legacy code.
float pT(const U &p)
Accessor utility function for getting the value of pT.
virtual const IDTPM::SinglePlotDefinition & definition(const std::string &identifier) const =0
Get the plot definition.
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 TH3D histogram.
StatusCode fill(TH1 *pTh1, float value, float weight=1.) const
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_eff_vs_Et
TODO - include more plots.
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.
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
void initMessaging() const
Initialize our message level and MessageSvc.
const std::string & folder() const
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
std::string getDirectory()
virtual void finalizePlots()
std::vector< TreeData > m_vBookedTrees