PageRenderTime 23ms CodeModel.GetById 9ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 1ms

/ElectroWeakAnalysis/Skimming/test/EWK_ElectronSkim_NoDrop.py

https://github.com/aivanov-cern/cmssw
Python | 75 lines | 63 code | 9 blank | 3 comment | 0 complexity | ba836fc1333622cc96a88ed96f8503f4 MD5 | raw file
 1import FWCore.ParameterSet.Config as cms
 2
 3process = cms.Process("EWKElectronSkim")
 4
 5process.load("FWCore.MessageLogger.MessageLogger_cfi")
 6process.load("Configuration.StandardSequences.MagneticField_cff")
 7process.load("Configuration.StandardSequences.Geometry_cff")
 8process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
 9process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
10
11process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
12
13# source
14process.source = cms.Source("PoolSource", 
15     fileNames = cms.untracked.vstring(
16    'rfio:/tmp/ikesisog/3E541A7B-EE86-DE11-BA46-001E682F273A.root'
17    )
18)
19
20process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
21
22process.GlobalTag.globaltag = cms.string('MC_31X_V3::All')
23
24
25# HLT filter
26import HLTrigger.HLTfilters.hltHighLevel_cfi
27process.EWK_ElectronHLTFilter = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone()
28
29# Uncomment this to access 8E29 menu and filter on it
30process.EWK_ElectronHLTFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","HLT8E29")
31process.EWK_ElectronHLTFilter.HLTPaths = ["HLT_Ele15_LW_L1R"]
32
33
34# Electron filter
35process.goodElectrons = cms.EDFilter("CandViewSelector",
36  src = cms.InputTag("gsfElectrons"),
37  cut = cms.string('pt > 30.0'),
38  filter = cms.bool(True)                                
39)
40
41# Skim path
42process.EWK_ElectronSkimPath = cms.Path(
43  process.EWK_ElectronHLTFilter +
44  process.goodElectrons
45)
46
47
48# Output module configuration
49from Configuration.EventContent.EventContent_cff import *
50
51EWK_ElectronSkimEventContent = cms.PSet(
52    outputCommands = cms.untracked.vstring()
53)
54EWK_ElectronSkimEventContent.outputCommands.extend(AODEventContent.outputCommands)
55
56EWK_ElectronSkimEventSelection = cms.PSet(
57    SelectEvents = cms.untracked.PSet(
58        SelectEvents = cms.vstring(
59           'EWK_ElectronSkimPath')
60    )
61)
62
63process.EWK_ElectronSkimOutputModule = cms.OutputModule("PoolOutputModule",
64    EWK_ElectronSkimEventContent,
65    EWK_ElectronSkimEventSelection,
66    dataset = cms.untracked.PSet(
67        filterName = cms.untracked.string('EWKSKIMESEL'),
68        dataTier = cms.untracked.string('USER')
69   ),
70   fileName = cms.untracked.string('EWKElectronSkim.root')
71)
72
73process.outpath = cms.EndPath(process.EWK_ElectronSkimOutputModule)
74
75