Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
RecoParticleFlow
PFClusterProducer
plugins
ECALPFSeedCleaner.cc
Go to the documentation of this file.
1
#include "
CondFormats/DataRecord/interface/EcalPFSeedingThresholdsRcd.h
"
2
#include "
CondFormats/EcalObjects/interface/EcalPFSeedingThresholds.h
"
3
#include "
RecoParticleFlow/PFClusterProducer/interface/RecHitTopologicalCleanerBase.h
"
4
5
class
ECALPFSeedCleaner
:
public
RecHitTopologicalCleanerBase
{
6
public
:
7
ECALPFSeedCleaner
(
const
edm::ParameterSet
& conf,
edm::ConsumesCollector
&
cc
);
8
ECALPFSeedCleaner
(
const
ECALPFSeedCleaner
&) =
delete
;
9
ECALPFSeedCleaner
&
operator=
(
const
ECALPFSeedCleaner
&) =
delete
;
10
11
void
update
(
const
edm::EventSetup
&)
override
;
12
13
void
clean
(
const
edm::Handle<reco::PFRecHitCollection>
&
input
, std::vector<bool>& mask)
override
;
14
15
private
:
16
edm::ESHandle<EcalPFSeedingThresholds>
ths_
;
17
edm::ESGetToken<EcalPFSeedingThresholds, EcalPFSeedingThresholdsRcd>
thsToken_
;
18
};
19
20
DEFINE_EDM_PLUGIN
(
RecHitTopologicalCleanerFactory
,
ECALPFSeedCleaner
,
"ECALPFSeedCleaner"
);
21
22
ECALPFSeedCleaner::ECALPFSeedCleaner
(
const
edm::ParameterSet
& conf,
edm::ConsumesCollector
&
cc
)
23
:
RecHitTopologicalCleanerBase
(conf,
cc
), thsToken_(
cc
.
esConsumes
<
edm
::
Transition
::BeginLuminosityBlock>()) {}
24
25
void
ECALPFSeedCleaner::update
(
const
edm::EventSetup
& iSetup) {
ths_
= iSetup.
getHandle
(
thsToken_
); }
26
27
void
ECALPFSeedCleaner::clean
(
const
edm::Handle<reco::PFRecHitCollection>
&
input
, std::vector<bool>& mask) {
28
//need to run over energy sorted rechits, as this is order used in seeding step
29
// this can cause ambiguity, isn't it better to index by detid ?
30
auto
const
&
hits
= *
input
;
31
std::vector<unsigned> ordered_hits(
hits
.size());
32
for
(
unsigned
i
= 0;
i
<
hits
.size(); ++
i
)
33
ordered_hits[
i
] =
i
;
34
35
std::sort
(ordered_hits.begin(), ordered_hits.end(), [&](
unsigned
i
,
unsigned
j
) {
36
return
hits
[
i
].energy() >
hits
[
j
].energy();
37
});
38
39
for
(
const
auto
&
idx
: ordered_hits) {
40
if
(!mask[
idx
])
41
continue
;
// is it useful ?
42
const
reco::PFRecHit
& rechit =
hits
[
idx
];
43
44
float
threshold
= (*ths_)[rechit.
detId
()];
45
if
(rechit.
energy
() <
threshold
)
46
mask[
idx
] =
false
;
47
48
}
// rechit loop
49
}
ECALPFSeedCleaner::ECALPFSeedCleaner
ECALPFSeedCleaner(const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
Definition:
ECALPFSeedCleaner.cc:22
mps_fire.i
i
Definition:
mps_fire.py:428
input
static const std::string input
Definition:
EdmProvDump.cc:48
hfClusterShapes_cfi.hits
hits
Definition:
hfClusterShapes_cfi.py:5
reco::PFRecHit::energy
float energy() const
rechit energy
Definition:
PFRecHit.h:99
ECALPFSeedCleaner::update
void update(const edm::EventSetup &) override
Definition:
ECALPFSeedCleaner.cc:25
edm
HLT enums.
Definition:
AlignableModifier.h:19
EcalPFSeedingThresholdsRcd.h
edm::Handle< reco::PFRecHitCollection >
ECALPFSeedCleaner
Definition:
ECALPFSeedCleaner.cc:5
heavyIonCSV_trainingSettings.idx
idx
Definition:
heavyIonCSV_trainingSettings.py:5
EcalPFSeedingThresholds.h
ECALPFSeedCleaner::ths_
edm::ESHandle< EcalPFSeedingThresholds > ths_
Definition:
ECALPFSeedCleaner.cc:16
edm::ESHandle
Definition:
DTSurvey.h:22
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
RecHitTopologicalCleanerBase.h
ECALPFSeedCleaner::thsToken_
edm::ESGetToken< EcalPFSeedingThresholds, EcalPFSeedingThresholdsRcd > thsToken_
Definition:
ECALPFSeedCleaner.cc:17
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::Transition
Transition
Definition:
Transition.h:12
ECALPFSeedCleaner::clean
void clean(const edm::Handle< reco::PFRecHitCollection > &input, std::vector< bool > &mask) override
Definition:
ECALPFSeedCleaner.cc:27
jetUpdater_cfi.sort
sort
Definition:
jetUpdater_cfi.py:29
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition:
EventSetup.h:155
edm::EventSetup
Definition:
EventSetup.h:58
cc
edm::ESGetToken
Definition:
EventSetup.h:48
reco::PFRecHit::detId
unsigned detId() const
rechit detId
Definition:
PFRecHit.h:93
reco::PFRecHit
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
Definition:
PFRecHit.h:31
RecHitTopologicalCleanerBase
Definition:
RecHitTopologicalCleanerBase.h:13
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition:
remoteMonitoring_LED_IterMethod_cfg.py:430
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition:
DeDxTools.cc:283
ECALPFSeedCleaner::operator=
ECALPFSeedCleaner & operator=(const ECALPFSeedCleaner &)=delete
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.16