-
Notifications
You must be signed in to change notification settings - Fork 2
/
ConfFile_cfg.py
105 lines (85 loc) · 4.61 KB
/
ConfFile_cfg.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import FWCore.ParameterSet.Config as cms
import HLTrigger.HLTfilters.hltHighLevel_cfi
from FWCore.ParameterSet.VarParsing import VarParsing
options = VarParsing ('analysis')
options.maxEvents = -1
options.parseArguments()
muonID =' userInt("highPtID") == 1'
process = cms.Process("Analysis")
process.load('Configuration.StandardSequences.Services_cff')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.EventContent.EventContent_cff')
process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
process.load('Configuration.StandardSequences.MagneticField_38T_cff')
process.load('Configuration.StandardSequences.EndOfProcess_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff')
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) )
process.source = cms.Source ("PoolSource",
fileNames = cms.untracked.vstring (options.inputFiles),
)
process.options = cms.untracked.PSet(
SkipEvent = cms.untracked.vstring('ProductNotFound')
)
process.TFileService = cms.Service("TFileService",
fileName = cms.string(options.outputFile)
)
process.TriggerFilter = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone(
TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
#HLTPaths = ['HLT_Mu9', 'HLT_Mu15_v*'],
#HLTPaths = ['HLT_IsoMu17_v*'],
HLTPaths = ['HLT_Mu50_v*', 'HLT_TkMu50_v*'], # # provide list of HLT paths (or patterns) you want
#HLTPaths = ['@'],
andOr = cms.bool(True), # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
throw = False, ## throw exception on unknown path names
)
process.badGlobalMuonTagger = cms.EDFilter("BadGlobalMuonTagger",
muons = cms.InputTag("slimmedMuons"),
vtx = cms.InputTag("offlineSlimmedPrimaryVertices"),
muonPtCut = cms.double(20),
selectClones = cms.bool(False),
taggingMode = cms.bool(True),
verbose = cms.untracked.bool(False)
)
process.cloneGlobalMuonTagger = process.badGlobalMuonTagger.clone(
selectClones = cms.bool(True)
)
process.removeBadAndCloneGlobalMuons = cms.EDProducer("MuonRefPruner",
input = cms.InputTag("slimmedMuons"),
toremove = cms.InputTag("badGlobalMuonTagger", "bad"),
toremove2 = cms.InputTag("cloneGlobalMuonTagger", "bad")
)
process.tunePMuons = cms.EDProducer("TunePMuonProducer",
src = cms.InputTag("removeBadAndCloneGlobalMuons")
#src = cms.InputTag("slimmedMuons")
)
### muon ID and isolation
# make a collection of TuneP muons which pass isHighPt ID
process.tuneIDMuons = cms.EDFilter("PATMuonSelector",
src = cms.InputTag("tunePMuons"),
cut = cms.string(muonID),
)
process.muonSelectionSeq = cms.Sequence(process.TriggerFilter * process.badGlobalMuonTagger * process.cloneGlobalMuonTagger * process.removeBadAndCloneGlobalMuons * process.tunePMuons * process.tuneIDMuons)
process.analysis = cms.EDAnalyzer('cmsWRextension',
genJets = cms.InputTag("slimmedGenJets"),
AK8genJets = cms.InputTag("slimmedGenJetsAK8"),
genParticles = cms.InputTag("prunedGenParticles"),
highLeptons = cms.InputTag("tuneIDMuons"),
regMuons = cms.InputTag("removeBadAndCloneGlobalMuons"),
recoJets = cms.InputTag("slimmedJets"),
AK8recoJets = cms.InputTag("slimmedJetsAK8"),
vertices = cms.InputTag("offlineSlimmedPrimaryVertices"),
genInfo = cms.InputTag("generator"),
met = cms.InputTag("slimmedMETsPuppi"),
trigResults = cms.InputTag("TriggerResults","","HLT"),
trigObjs = cms.InputTag("selectedPatTrigger"),
pathsToPass = cms.vstring("HLT_Mu50_v*", "HLT_TkMu50_v*"),
filtersToPass = cms.vstring(""),
doTrig = cms.untracked.bool(False),
wantHardProcessMuons = cms.untracked.bool(True),
doGen = cms.untracked.bool(True),
isMC = cms.untracked.bool(True),
MCL = cms.untracked.double(100),
MCU = cms.untracked.double(8000),
flavorSideband = cms.untracked.bool(False)
)
process.p = cms.Path(process.muonSelectionSeq * process.analysis)