Filler for TEfficiency graphs.
More...
#include <HistogramFillerEfficiency.h>
Filler for TEfficiency graphs.
Definition at line 17 of file HistogramFillerEfficiency.h.
◆ HistogramFillerEfficiency()
◆ fill() [1/2]
Method that actually fills the ROOT object.
- Returns
- number of fills performed
Implements Monitored::HistogramFiller.
Definition at line 22 of file HistogramFillerEfficiency.h.
24 if (
ATH_UNLIKELY( vars[0] ==
nullptr or vars[1] ==
nullptr ) )
return 0;
27 const size_t maskSize = vars.cut->size();
32 log << MSG::ERROR <<
"CutMask does not match the size of plotted variable: "
37 TEfficiency*
efficiency = this->histogram<TEfficiency>();
38 const TH1* efftot =
efficiency->GetTotalHistogram();
40 const unsigned nMonVar = vars.size();
41 const size_t var0Size = vars[0]->size();
43 for (
unsigned i = 0;
i < var0Size; ++
i) {
44 if (vars.cut==
nullptr || vars.cut->get(
i)) {
46 detail::getFillValue<Axis::X>(efftot, vars[1],
i));
50 }
else if ( nMonVar==3 ) {
51 for (
unsigned i = 0;
i < var0Size; ++
i) {
52 if (vars.cut==
nullptr || vars.cut->get(
i)) {
54 detail::getFillValue<Axis::X>(efftot, vars[1],
i),
55 detail::getFillValue<Axis::Y>(efftot, vars[2],
i));
59 }
else if ( nMonVar==4 ) {
60 for (
unsigned i = 0;
i < var0Size; ++
i) {
61 if (vars.cut==
nullptr || vars.cut->get(
i)) {
63 detail::getFillValue<Axis::X>(efftot, vars[1],
i),
64 detail::getFillValue<Axis::Y>(efftot, vars[2],
i),
65 detail::getFillValue<Axis::Z>(efftot, vars[3],
i));
◆ fill() [2/2]
template<class H , typename W , typename C , typename ... Ms>
unsigned Monitored::HistogramFiller::fill |
( |
W |
weight, |
|
|
C |
cut, |
|
|
const Ms &... |
m |
|
) |
| const |
|
inlineprotectedinherited |
Fill histogram from IMonitoredVariable.
Supports arbitrary dimensions and double/string representation.
- Template Parameters
-
H | histogram type (TH1, TH2, ...) |
- Parameters
-
Definition at line 168 of file HistogramFiller.h.
169 auto hist = this->histogram<H>();
◆ getLock()
const std::unique_lock<std::mutex> Monitored::HistogramFiller::getLock |
( |
| ) |
const |
|
inlineinherited |
◆ histogram()
template<class H >
H* Monitored::HistogramFiller::histogram |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ histogramCutMaskName()
const std::string& Monitored::HistogramFiller::histogramCutMaskName |
( |
| ) |
const |
|
inlineinherited |
◆ histogramVariablesNames()
const std::vector<std::string>& Monitored::HistogramFiller::histogramVariablesNames |
( |
| ) |
const |
|
inlineinherited |
◆ histogramWeightName()
const std::string& Monitored::HistogramFiller::histogramWeightName |
( |
| ) |
const |
|
inlineinherited |
◆ touch()
void Monitored::HistogramFiller::touch |
( |
| ) |
const |
|
inlineinherited |
◆ m_histDef
std::shared_ptr<HistogramDef> Monitored::HistogramFiller::m_histDef |
|
protectedinherited |
◆ m_histogramProvider
◆ m_lock
std::mutex Monitored::HistogramFiller::m_lock |
|
mutableprotectedinherited |
The documentation for this class was generated from the following file:
void doFill(H *hist, W weight, size_t i, const M &m1, const Ms &... m)
Perform (arbitrary dimension) histogram fill with weight.
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")