3 from __future__
import print_function
6 from DataFormats.FWLite
import Events, Handle
8 files = [
"patTuple.root"]
9 events = Events (files)
10 handle = Handle (
"std::vector<pat::Muon>")
14 label = (
"cleanPatMuons")
16 f = ROOT.TFile(
"analyzerPython.root",
"RECREATE")
19 muonPt = ROOT.TH1F(
"muonPt",
"pt", 100, 0.,300.)
20 muonEta = ROOT.TH1F(
"muonEta",
"eta", 100, -3., 3.)
21 muonPhi = ROOT.TH1F(
"muonPhi",
"phi", 100, -5., 5.)
29 event.getByLabel (label, handle)
31 muons = handle.product()
34 muonPt.Fill( muon.pt() )
35 muonEta.Fill( muon.eta() )
36 muonPhi.Fill( muon.phi() )
S & print(S &os, JobReport::InputFile const &f)