PageRenderTime 22ms CodeModel.GetById 11ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/ElectroWeakAnalysis/Utilities/test/muonsWithPFIso.py

https://github.com/aivanov-cern/cmssw
Python | 60 lines | 42 code | 8 blank | 10 comment | 0 complexity | 2fe263c246aaeb737d045fa4a3296963 MD5 | raw file
 1import FWCore.ParameterSet.Config as cms
 2
 3# Process, how many events, inout files, ...
 4process = cms.Process("muonsWithPFIso")
 5
 6process.maxEvents = cms.untracked.PSet(
 7      input = cms.untracked.int32(-1)
 8      #input = cms.untracked.int32(100)
 9)
10process.source = cms.Source("PoolSource",
11      fileNames = cms.untracked.vstring("file:/ciet3b/data4/Spring10_10invpb_AODRED/Wmunu_1.root")
12)
13
14# Debug/info printouts
15process.MessageLogger = cms.Service("MessageLogger",
16      debugModules = cms.untracked.vstring('muonsWithPFIso'),
17      cout = cms.untracked.PSet(
18            default = cms.untracked.PSet( limit = cms.untracked.int32(100) ),
19            #threshold = cms.untracked.string('INFO')
20            threshold = cms.untracked.string('DEBUG')
21      ),
22      destinations = cms.untracked.vstring('cout')
23)
24
25# Create a new reco::Muon collection with PFLow Iso information
26process.muonsWithPFIso = cms.EDFilter("MuonWithPFIsoProducer",
27        MuonTag = cms.untracked.InputTag("muons")
28      , PfTag = cms.untracked.InputTag("particleFlow")
29      , UsePfMuonsOnly = cms.untracked.bool(False)
30      , TrackIsoVeto = cms.untracked.double(0.01)
31      , GammaIsoVeto = cms.untracked.double(0.07)
32      , NeutralHadronIsoVeto = cms.untracked.double(0.1)
33)
34
35# WMN fast selector (use W candidates in this example)
36process.load("ElectroWeakAnalysis.WMuNu.WMuNuSelection_cff")
37process.pfMetWMuNus.MuonTag = cms.untracked.InputTag("muonsWithPFIso")
38process.selpfMet.MuonTag = cms.untracked.InputTag("muonsWithPFIso")
39# Use the following line only for old Summer09 samples (new: "ak5", old "antikt5")
40#process.selpfMet.JetTag = cms.untracked.InputTag("antikt5PFJets") 
41
42# Output
43process.load("Configuration.EventContent.EventContent_cff")
44process.AODSIMEventContent.outputCommands.append('keep *_muonsWithPFIso_*_*')
45process.myEventContent = process.AODSIMEventContent
46process.wmnOutput = cms.OutputModule("PoolOutputModule",
47      process.myEventContent,
48      SelectEvents = cms.untracked.PSet(
49            SelectEvents = cms.vstring('muonsWithPFIsoSelection')
50      ),
51      fileName = cms.untracked.string('selectedEvents.root')
52)
53
54# Steering the process
55process.muonsWithPFIsoSelection = cms.Path(
56       process.muonsWithPFIso*
57       process.selectPfMetWMuNus
58)
59
60process.end = cms.EndPath(process.wmnOutput)