Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-12-01 23:40:46

0001 #! /usr/bin/env python3
0002 
0003 import ROOT
0004 import sys
0005 from DataFormats.FWLite import Events, Handle
0006 
0007 from FWCore.ParameterSet.VarParsing import VarParsing
0008 options = VarParsing ('python')
0009 options.parseArguments()
0010 
0011 print("maxEvents", options.maxEvents)
0012 
0013 events = Events (options)
0014 conversionHandle  = Handle ('vector<reco::Conversion>')
0015 conversionLabel   = ("conversions")
0016 
0017 for event in events:
0018     aux = event.object().eventAuxiliary()
0019     print("run %6d event %d" % (aux.run(), aux.event()))
0020     event.getByLabel (conversionLabel, conversionHandle)
0021     conversionVector = conversionHandle.product()
0022     for index, conversion in enumerate (conversionVector):
0023         print("  %2d  %8.4f" % (index, conversion.EoverP()))