CMS 3D CMS Logo

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