src
DQMOffline
L1Trigger
src
L1TFillWithinLimits.cc
Go to the documentation of this file.
1
#include "
DQMOffline/L1Trigger/interface/L1TFillWithinLimits.h
"
2
3
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
4
5
namespace
dqmoffline
{
6
namespace
l1t
{
7
12
void
fillWithinLimits
(
MonitorElement
*
mon
,
double
value
,
double
weight
) {
13
double
min
(
mon
->getAxisMin(1));
14
double
max
(
mon
->getAxisMax(1));
15
16
double
fillValue =
getFillValueWithinLimits
(
value
,
min
,
max
);
17
mon
->Fill(fillValue,
weight
);
18
}
19
void
fill2DWithinLimits
(
MonitorElement
*
mon
,
double
valueX,
double
valueY,
double
weight
) {
20
double
minX
(
mon
->getAxisMin(1));
21
double
minY
(
mon
->getAxisMin(2));
22
23
double
maxX
(
mon
->getAxisMax(1));
24
double
maxY
(
mon
->getAxisMax(2));
25
26
double
fillValueX =
getFillValueWithinLimits
(valueX,
minX
,
maxX
);
27
double
fillValueY =
getFillValueWithinLimits
(valueY,
minY
,
maxY
);
28
mon
->Fill(fillValueX, fillValueY,
weight
);
29
}
30
31
double
getFillValueWithinLimits
(
double
value
,
double
min
,
double
max
) {
32
if
(
value
<
min
)
33
return
min
;
34
35
// histograms are [min, max), hence fill with a slightly smaller value
36
if
(
value
>
max
)
37
return
max
- 1
e
-6 *
max
;
38
39
return
value
;
40
}
41
42
}
// namespace l1t
43
}
// namespace dqmoffline
dqmoffline::l1t::getFillValueWithinLimits
double getFillValueWithinLimits(double value, double min, double max)
Definition:
L1TFillWithinLimits.cc:31
HGVHistoProducerAlgoBlock_cfi.minY
minY
Definition:
HGVHistoProducerAlgoBlock_cfi.py:173
L1TFillWithinLimits.h
MessageLogger.h
WZElectronSkims53X_cff.max
max
Definition:
WZElectronSkims53X_cff.py:197
HGVHistoProducerAlgoBlock_cfi.maxY
maxY
Definition:
HGVHistoProducerAlgoBlock_cfi.py:174
weight
Definition:
weight.py:1
l1t
delete x;
Definition:
CaloConfig.h:22
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
LaserDQM_cfi.mon
mon
Definition:
LaserDQM_cfi.py:3
SiStripPI::min
Definition:
SiStripPayloadInspectorHelper.h:178
dqm::impl::MonitorElement
Definition:
MonitorElement.h:101
HGVHistoProducerAlgoBlock_cfi.maxX
maxX
Definition:
HGVHistoProducerAlgoBlock_cfi.py:169
value
Definition:
value.py:1
relativeConstraints.value
value
Definition:
relativeConstraints.py:53
dqmoffline::l1t::fill2DWithinLimits
void fill2DWithinLimits(MonitorElement *mon, double valueX, double valueY, double weight=1.)
Definition:
L1TFillWithinLimits.cc:19
dqmoffline::l1t::fillWithinLimits
void fillWithinLimits(MonitorElement *mon, double value, double weight=1.)
Definition:
L1TFillWithinLimits.cc:12
HGVHistoProducerAlgoBlock_cfi.minX
minX
Definition:
HGVHistoProducerAlgoBlock_cfi.py:168
dqmoffline
Definition:
HistDefinition.h:48
Generated for CMSSW Reference Manual by
1.8.14