File indexing completed on 2024-04-06 12:23:27
0001 from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer
0002 from PhysicsTools.Heppy.analyzers.core.AutoHandle import AutoHandle
0003 from PhysicsTools.Heppy.physicsobjects.Muon import Muon
0004
0005
0006 class SimpleMuonAnalyzer(Analyzer):
0007 '''Just a simple jet analyzer, to be used in tutorials.'''
0008
0009 def declareHandles(self):
0010 super(SimpleMuonAnalyzer, self).declareHandles()
0011 self.handles['muons'] = AutoHandle( 'slimmedMuons',
0012 'std::vector<pat::Muon>' )
0013 def process(self, event):
0014 super(SimpleMuonAnalyzer, self).readCollections(event.input)
0015 event.muons = map(Muon, self.handles['muons'].product())
0016