SimCalorimetry
HcalZeroSuppressionProducers
src
HcalZeroSuppressionAlgo.cc
Go to the documentation of this file.
1
#include "
HcalZeroSuppressionAlgo.h
"
2
3
HcalZeroSuppressionAlgo::HcalZeroSuppressionAlgo
(
bool
mp) : m_markAndPass(mp) {
m_dbService
=
nullptr
; }
4
5
void
HcalZeroSuppressionAlgo::suppress
(
const
HBHEDigiCollection
&
input
,
HBHEDigiCollection
&
output
) {
6
HBHEDigiCollection::const_iterator
i
;
7
8
for
(
i
=
input
.begin();
i
!=
input
.end(); ++
i
) {
9
if
(
shouldKeep
((*
i
))) {
10
if
(!
m_markAndPass
) {
11
output
.push_back(*
i
);
12
}
else
{
13
HBHEDataFrame
df
(*
i
);
14
df
.setZSInfo(
true
,
false
);
15
output
.push_back(
df
);
16
}
17
}
else
if
(
m_markAndPass
) {
18
HBHEDataFrame
df
(*
i
);
19
df
.setZSInfo(
true
,
true
);
20
output
.push_back(
df
);
21
}
22
}
23
}
24
25
void
HcalZeroSuppressionAlgo::suppress
(
const
HFDigiCollection
&
input
,
HFDigiCollection
&
output
) {
26
HFDigiCollection::const_iterator
i
;
27
28
for
(
i
=
input
.begin();
i
!=
input
.end(); ++
i
) {
29
if
(
shouldKeep
((*
i
))) {
30
if
(!
m_markAndPass
) {
31
output
.push_back(*
i
);
32
}
else
{
33
HFDataFrame
df
(*
i
);
34
df
.setZSInfo(
true
,
false
);
35
output
.push_back(
df
);
36
}
37
}
else
if
(
m_markAndPass
) {
38
HFDataFrame
df
(*
i
);
39
df
.setZSInfo(
true
,
true
);
40
output
.push_back(
df
);
41
}
42
}
43
}
44
45
void
HcalZeroSuppressionAlgo::suppress
(
const
HODigiCollection
&
input
,
HODigiCollection
&
output
) {
46
HODigiCollection::const_iterator
i
;
47
48
for
(
i
=
input
.begin();
i
!=
input
.end(); ++
i
) {
49
if
(
shouldKeep
((*
i
))) {
50
if
(!
m_markAndPass
) {
51
output
.push_back(*
i
);
52
}
else
{
53
HODataFrame
df
(*
i
);
54
df
.setZSInfo(
true
,
false
);
55
output
.push_back(
df
);
56
}
57
}
else
if
(
m_markAndPass
) {
58
HODataFrame
df
(*
i
);
59
df
.setZSInfo(
true
,
true
);
60
output
.push_back(
df
);
61
}
62
}
63
}
64
65
void
HcalZeroSuppressionAlgo::suppress
(
const
QIE10DigiCollection
&
input
,
QIE10DigiCollection
&
output
) {
66
for
(
QIE10DigiCollection::const_iterator
i
=
input
.begin();
i
!=
input
.end(); ++
i
) {
67
QIE10DataFrame
df
(*
i
);
68
if
(
shouldKeep
(
df
)) {
69
if
(!
m_markAndPass
) {
70
output
.push_back(
df
);
71
}
else
{
72
df
.setZSInfo(
false
);
73
output
.push_back(
df
);
74
}
75
}
else
if
(
m_markAndPass
) {
76
df
.setZSInfo(
true
);
77
output
.push_back(
df
);
78
}
79
}
80
}
81
82
void
HcalZeroSuppressionAlgo::suppress
(
const
QIE11DigiCollection
&
input
,
QIE11DigiCollection
&
output
) {
83
for
(
QIE11DigiCollection::const_iterator
i
=
input
.begin();
i
!=
input
.end(); ++
i
) {
84
QIE11DataFrame
df
(*
i
);
85
if
(
shouldKeep
(
df
)) {
86
if
(!
m_markAndPass
) {
87
output
.push_back(
df
);
88
}
else
{
89
df
.setZSInfo(
false
);
90
output
.push_back(
df
);
91
}
92
}
else
if
(
m_markAndPass
) {
93
df
.setZSInfo(
true
);
94
output
.push_back(
df
);
95
}
96
}
97
}
HcalZeroSuppressionAlgo::shouldKeep
virtual bool shouldKeep(const HBHEDataFrame &digi) const =0
mps_fire.i
i
Definition:
mps_fire.py:428
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition:
SortedCollection.h:80
input
static const std::string input
Definition:
EdmProvDump.cc:48
HcalDataFrameContainer
Definition:
HcalDigiCollections.h:35
edm::DataFrameContainer::const_iterator
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Definition:
DataFrameContainer.h:61
convertSQLitetoXML_cfg.output
output
Definition:
convertSQLitetoXML_cfg.py:72
edm::SortedCollection
Definition:
SortedCollection.h:49
HcalZeroSuppressionAlgo.h
HBHEDataFrame
Definition:
HBHEDataFrame.h:14
HFDataFrame
Definition:
HFDataFrame.h:14
HcalZeroSuppressionAlgo::m_markAndPass
bool m_markAndPass
Definition:
HcalZeroSuppressionAlgo.h:37
HcalZeroSuppressionAlgo::HcalZeroSuppressionAlgo
HcalZeroSuppressionAlgo(bool markAndPass)
Definition:
HcalZeroSuppressionAlgo.cc:3
hgcalPerformanceValidation.df
df
Definition:
hgcalPerformanceValidation.py:733
QIE10DataFrame
Definition:
QIE10DataFrame.h:11
HODataFrame
Definition:
HODataFrame.h:14
QIE11DataFrame
Definition:
QIE11DataFrame.h:11
HcalZeroSuppressionAlgo::m_dbService
const HcalDbService * m_dbService
Definition:
HcalZeroSuppressionAlgo.h:34
HcalZeroSuppressionAlgo::suppress
void suppress(const HBHEDigiCollection &input, HBHEDigiCollection &output)
Definition:
HcalZeroSuppressionAlgo.cc:5
Generated for CMSSW Reference Manual by
1.8.16