Main Page
Namespaces
Classes
Package Documentation
PhysicsTools
Heppy
python
analyzers
examples
SimpleMuonAnalyzer.py
Go to the documentation of this file.
1
from
PhysicsTools.Heppy.analyzers.core.Analyzer
import
Analyzer
2
from
PhysicsTools.Heppy.analyzers.core.AutoHandle
import
AutoHandle
3
from
PhysicsTools.Heppy.physicsobjects.Muon
import
Muon
4
5
6
class
SimpleMuonAnalyzer
(Analyzer):
7
'''Just a simple jet analyzer, to be used in tutorials.'''
8
9
def
declareHandles
(self):
10
super(SimpleMuonAnalyzer, self).
declareHandles
()
11
self.handles[
'muons'
] = AutoHandle(
'slimmedMuons'
,
12
'std::vector<pat::Muon>'
)
13
def
process
(self, event):
14
super(SimpleMuonAnalyzer, self).readCollections(event.input)
15
event.muons =
map
(Muon, self.handles[
'muons'
].product())
16
SimpleMuonAnalyzer.SimpleMuonAnalyzer.process
def process(self, event)
Definition:
SimpleMuonAnalyzer.py:13
SimpleMuonAnalyzer.SimpleMuonAnalyzer
Definition:
SimpleMuonAnalyzer.py:6
genParticles_cff.map
map
Definition:
genParticles_cff.py:11
SimpleMuonAnalyzer.SimpleMuonAnalyzer.declareHandles
def declareHandles(self)
Definition:
SimpleMuonAnalyzer.py:9
Generated for CMSSW Reference Manual by
1.8.11