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
RecoMuon
MuonIdentification
plugins
InterestingEcalDetIdProducer.cc
Go to the documentation of this file.
1
#include "
RecoMuon/MuonIdentification/plugins/InterestingEcalDetIdProducer.h
"
2
3
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
4
#include "
FWCore/Framework/interface/Event.h
"
5
#include "
FWCore/Framework/interface/EventSetup.h
"
6
#include "
FWCore/Framework/interface/ESHandle.h
"
7
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
8
9
#include "
DataFormats/EcalRecHit/interface/EcalRecHitCollections.h
"
10
11
#include "
DataFormats/EcalDetId/interface/EBDetId.h
"
12
#include "
DataFormats/EcalDetId/interface/EEDetId.h
"
13
14
#include "
DataFormats/DetId/interface/DetIdCollection.h
"
15
#include "
DataFormats/EgammaReco/interface/BasicCluster.h
"
16
#include "
DataFormats/EgammaReco/interface/BasicClusterFwd.h
"
17
18
#include "
Geometry/CaloTopology/interface/CaloSubdetectorTopology.h
"
19
20
InterestingEcalDetIdProducer::InterestingEcalDetIdProducer
(
const
edm::ParameterSet
& iConfig) {
21
inputCollection_
= iConfig.
getParameter
<
edm::InputTag
>(
"inputCollection"
);
22
produces<DetIdCollection>();
23
muonToken_
= consumes<reco::MuonCollection>(
inputCollection_
);
24
caloTopoToken_
= esConsumes<CaloTopology, CaloTopologyRecord, edm::Transition::BeginRun>();
25
}
26
27
InterestingEcalDetIdProducer::~InterestingEcalDetIdProducer
() {}
28
29
void
InterestingEcalDetIdProducer::beginRun
(
const
edm::Run
&
run
,
const
edm::EventSetup
& iSetup) {
30
edm::ESHandle<CaloTopology>
theCaloTopology = iSetup.
getHandle
(
caloTopoToken_
);
31
caloTopology_
= &(*theCaloTopology);
32
}
33
34
void
InterestingEcalDetIdProducer::produce
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
35
edm::Handle<reco::MuonCollection>
muons
;
36
iEvent
.getByToken(
muonToken_
,
muons
);
37
38
auto
interestingDetIdCollection
= std::make_unique<DetIdCollection>();
39
40
for
(reco::MuonCollection::const_iterator
muon
=
muons
->begin();
muon
!=
muons
->end(); ++
muon
) {
41
if
(!
muon
->isEnergyValid())
42
continue
;
43
if
(
muon
->calEnergy().ecal_id.rawId() == 0)
44
continue
;
45
const
CaloSubdetectorTopology
* topology =
46
caloTopology_
->
getSubdetectorTopology
(
DetId::Ecal
,
muon
->calEnergy().ecal_id.subdetId());
47
const
std::vector<DetId>& ids = topology->
getWindow
(
muon
->calEnergy().ecal_id, 5, 5);
48
for
(std::vector<DetId>::const_iterator
id
= ids.begin();
id
!= ids.end(); ++
id
)
49
if
(
std::find
(
interestingDetIdCollection
->begin(),
interestingDetIdCollection
->end(), *
id
) ==
50
interestingDetIdCollection
->end())
51
interestingDetIdCollection
->push_back(*
id
);
52
}
53
iEvent
.put(
std::move
(
interestingDetIdCollection
));
54
}
PDWG_BPHSkim_cff.muons
muons
Definition:
PDWG_BPHSkim_cff.py:47
InterestingEcalDetIdProducer::InterestingEcalDetIdProducer
InterestingEcalDetIdProducer(const edm::ParameterSet &)
Definition:
InterestingEcalDetIdProducer.cc:20
MessageLogger.h
ESHandle.h
InterestingEcalDetIdProducer::caloTopoToken_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopoToken_
Definition:
InterestingEcalDetIdProducer.h:26
muon
Definition:
MuonCocktails.h:17
InterestingEcalDetIdProducer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition:
InterestingEcalDetIdProducer.cc:29
edm::Run
Definition:
Run.h:45
BasicCluster.h
EBDetId.h
EEDetId.h
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition:
FindCaloHit.cc:19
edm::Handle< reco::MuonCollection >
EcalRecHitCollections.h
InterestingEcalDetIdProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
InterestingEcalDetIdProducer.cc:34
InterestingEcalDetIdProducer::caloTopology_
const CaloTopology * caloTopology_
Definition:
InterestingEcalDetIdProducer.h:27
BasicClusterFwd.h
HLT_FULL_cff.muon
muon
Definition:
HLT_FULL_cff.py:11710
edm::ESHandle< CaloTopology >
InterestingEcalDetIdProducer::~InterestingEcalDetIdProducer
~InterestingEcalDetIdProducer() override
Definition:
InterestingEcalDetIdProducer.cc:27
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
InterestingEcalDetIdProducer::muonToken_
edm::EDGetTokenT< reco::MuonCollection > muonToken_
Definition:
InterestingEcalDetIdProducer.h:25
CaloTopology::getSubdetectorTopology
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition:
CaloTopology.cc:17
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition:
EventSetup.h:155
edm::EventSetup
Definition:
EventSetup.h:58
CaloSubdetectorTopology
Definition:
CaloSubdetectorTopology.h:17
DetId::Ecal
Definition:
DetId.h:27
CaloSubdetectorTopology::getWindow
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
Definition:
CaloSubdetectorTopology.cc:4
CaloSubdetectorTopology.h
eostools.move
def move(src, dest)
Definition:
eostools.py:511
writedatasetfile.run
run
Definition:
writedatasetfile.py:27
triggerObjects_cff.id
id
Definition:
triggerObjects_cff.py:29
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
InterestingEcalDetIdProducer.h
ParameterSet.h
edm::Event
Definition:
Event.h:73
interestingDetIdCollectionProducer_cfi.interestingDetIdCollection
interestingDetIdCollection
Definition:
interestingDetIdCollectionProducer_cfi.py:11
edm::InputTag
Definition:
InputTag.h:15
DetIdCollection.h
InterestingEcalDetIdProducer::inputCollection_
edm::InputTag inputCollection_
Definition:
InterestingEcalDetIdProducer.h:24
Generated for CMSSW Reference Manual by
1.8.16