Skip to content

Commit

Permalink
Merge pull request cms-sw#25 from gpetruc/80X
Browse files Browse the repository at this point in the history
Update top-level CFG files to run in CMSSW 8.0.1
  • Loading branch information
gpetruc committed Mar 8, 2016
2 parents fa68b92 + 3a07c50 commit 2cd9d5c
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 17 deletions.
10 changes: 10 additions & 0 deletions python/fakerate_jetPlusProbe_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
checkCharge = cms.bool(False),
checkOverlap = cms.bool(False)
)
jetPlusPseudoProbe = jetPlusProbe.clone(decay ="leadingJet muons")

jetPlusProbeFilter = cms.EDFilter("CandViewCountFilter",
src = cms.InputTag("jetPlusProbe"),
minNumber = cms.uint32(1),
)
jetPlusPseudoProbeFilter = jetPlusProbeFilter.clone(src = 'jetPlusPseudoProbe')

diLepVetoForJets = cms.EDFilter("CandViewSelector",
src = cms.InputTag("diMuPairs"),
Expand All @@ -41,6 +43,14 @@

jetPlusProbeVetoSequence = cms.Sequence(~diLepVetoForJets + wMuNuForVeto * ~wMuNuVeto)

wMuNuForVetoPseudo = wMuNuForVeto.clone(decay = 'muons pfMet')
wMuNuVetoPseudo = wMuNuVeto.clone(src = 'wMuNuForVetoPseudo')

jetPlusProbeSequenceFast = cms.Sequence(
realJets * leadingJet * jetPlusPseudoProbe * jetPlusPseudoProbeFilter + wMuNuForVetoPseudo * ~wMuNuVetoPseudo
)


jetPlusProbeSequence = cms.Sequence(
probeRecoMuons * diMuPairs +
jetPlusProbeVetoSequence +
Expand Down
46 changes: 39 additions & 7 deletions test/zmumu/tp_from_aod_Data.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
# to add following runs: 251491, 251493, 251496, ..., 251500
print process.source.fileNames
#print process.source.fileNames, dataSummary

if "CMSSW_7_6_" in os.environ['CMSSW_VERSION']:
elif "CMSSW_7_6_" in os.environ['CMSSW_VERSION']:
process.GlobalTag.globaltag = cms.string('76X_dataRun2_v15')
process.source.fileNames = [
'/store/data/Run2015D/SingleMuon/AOD/16Dec2015-v1/10000/00A3E567-75A8-E511-AD0D-0CC47A4D769E.root',
Expand All @@ -61,7 +60,11 @@
'/store/data/Run2015D/SingleMuon/AOD/16Dec2015-v1/10000/18D542EB-FAA7-E511-A011-00259073E4E8.root',
'/store/data/Run2015D/SingleMuon/AOD/16Dec2015-v1/10000/24537A2D-0BA8-E511-8D7C-20CF300E9ECF.root',
]

elif "CMSSW_8_0_"in os.environ['CMSSW_VERSION']:
process.GlobalTag.globaltag = cms.string('80X_dataRun2_v4')
process.source.fileNames = [
'/store/relval/CMSSW_8_0_0_pre6/SingleMuon/RECO/80X_dataRun2_v4_RelVal_sigMu2015HLHT-v1/10000/00574F9E-85D5-E511-A29D-0025905964A2.root'
]
else: raise RuntimeError, "Unknown CMSSW version %s" % os.environ['CMSSW_VERSION']

## SELECT WHAT DATASET YOU'RE RUNNING ON
Expand All @@ -86,7 +89,6 @@

if TRIGGER == "SingleMu":
process.triggerResultsFilter.triggerConditions = cms.vstring( 'HLT_Mu45_eta2p1_v*', 'HLT_Mu50_v*',
'HLT_IsoMu24_eta2p1_v*', 'HLT_IsoMu20_eta2p1_v*',
'HLT_IsoMu27_v*', 'HLT_IsoMu20_v*' )
elif TRIGGER == "DoubleMu":
process.triggerResultsFilter.triggerConditions = cms.vstring( 'HLT_Mu8_v*', 'HLT_Mu17_v*',
Expand Down Expand Up @@ -148,6 +150,10 @@
" && !triggerObjectMatchesByCollection('hltL3MuonCandidates').empty()"+
" && pfIsolationR04().sumChargedHadronPt/pt < 0.2"),
)
process.pseudoTag = cms.EDFilter("MuonSelector",
src = cms.InputTag("muons"),
cut = cms.string("pt > 15 && isGlobalMuon && numberOfMatchedStations >= 2 && pfIsolationR04().sumChargedHadronPt/pt < 0.2")
)
if TRIGGER == "DoubleMu":
process.tagMuons.cut = ("pt > 6 && (isGlobalMuon || isTrackerMuon) && isPFMuon "+
" && !triggerObjectMatchesByCollection('hltL3MuonCandidates').empty()"+
Expand Down Expand Up @@ -330,6 +336,8 @@
## Match to trigger, to measure the efficiency of HLT tracking
from PhysicsTools.PatAlgos.tools.helpers import *
process.patMuonsWithTriggerSequenceSta = cloneProcessingSnippet(process, process.patMuonsWithTriggerSequence, "Sta")
process.patMuonsWithTriggerSequenceSta.replace(process.patTriggerFullSta, process.patTriggerFull)
process.patTriggerSta.src = 'patTriggerFull'
process.muonMatchHLTL2Sta.maxDeltaR = 0.5
process.muonMatchHLTL3Sta.maxDeltaR = 0.5
massSearchReplaceAnyInputTag(process.patMuonsWithTriggerSequenceSta, "mergedMuons", "muonsSta")
Expand All @@ -339,11 +347,20 @@
src = cms.InputTag("patMuonsWithTriggerSta"),
cut = cms.string("outerTrack.isNonnull"), # no real cut now
)
process.pseudoProbeSta = cms.EDFilter("MuonSelector",
src = cms.InputTag("muonsSta"),
cut = cms.string("outerTrack.isNonnull"),
)


process.tpPairsSta = process.tpPairs.clone(decay = "tagMuons@+ probeMuonsSta@-", cut = '40 < mass < 150')

process.onePairSta = cms.EDFilter("CandViewCountFilter", src = cms.InputTag("tpPairsSta"), minNumber = cms.uint32(1))

process.pseudoPairsSta = process.tpPairsSta.clone(decay = "pseudoTag@+ pseudoProbeSta@-")
process.onePseudoPairSta = process.onePairSta.clone(src = 'pseudoPairsSta')
process.fastPseudoTnPSta = cms.Sequence(process.pseudoTag + process.muonsSta + process.pseudoProbeSta + process.pseudoPairsSta + process.onePseudoPairSta)

process.staToTkMatch.maxDeltaR = 0.3
process.staToTkMatch.maxDeltaPtRel = 2.
process.staToTkMatchNoZ.maxDeltaR = 0.3
Expand Down Expand Up @@ -443,6 +460,8 @@

process.tagAndProbeSta = cms.Path(
process.fastFilter +
process.fastPseudoTnPSta +
process.mergedMuons * process.patMuonsWithTriggerSequence +
process.muonsSta +
process.patMuonsWithTriggerSequenceSta +
process.tnpSimpleSequenceSta
Expand All @@ -455,6 +474,7 @@
cut = cms.string("pt >= 5 && abs(eta) < 2.4"),
)
process.tpPairsTkL1 = process.tpPairs.clone(decay = "tagMuons@+ probeL1@-", cut = 'mass > 30')
process.onePairTkL1 = process.onePair.clone(src = 'tpPairsTkL1')
process.l1ToTkMatch = process.staToTkMatch.clone(src = "probeL1", srcTrack="none")
process.l1ToTkMatchNoZ = process.staToTkMatchNoZ.clone(src = "probeL1", srcTrack="none")
process.l1ToTkMatch0 = process.staToTkMatch0.clone(src = "probeL1", srcTrack="none")
Expand Down Expand Up @@ -499,10 +519,18 @@
pairFlags = cms.PSet(),
allProbes = cms.InputTag("probeL1"),
)
process.pseudoPairsTkL1 = process.tpPairsSta.clone(decay = "pseudoTag@+ probeL1@-", cut = 'mass > 30')
process.onePseudoPairTkL1 = process.onePairSta.clone(src = 'pseudoPairsTkL1')
process.fastPseudoTnPTkL1 = cms.Sequence(process.pseudoTag + process.probeL1 + process.pseudoPairsTkL1 + process.onePseudoPairTkL1)
process.tagAndProbeTkL1 = cms.Path(
process.fastFilter +
process.fastPseudoTnPTkL1 +
process.mergedMuons * process.patMuonsWithTriggerSequence +
process.tagMuons +
process.oneTag +
process.probeL1 +
process.tpPairsTkL1 +
process.onePairTkL1 +
process.preTkMatchSequenceZ +
process.l1ToTkMatch + process.l1ToTkMatchNoZ +
process.l1ToTkMatch0 + process.l1ToTkMatchNoZ0 +
Expand Down Expand Up @@ -547,23 +575,27 @@

process.fakeRateJetPlusProbe = cms.Path(
#process.fastFilterFake +
process.jetPlusProbeSequenceFast +
process.mergedMuons * process.patMuonsWithTriggerSequence +
process.tagMuons + process.probeMuons + process.extraProbeVariablesSeq +
process.tagMuons + process.probeMuons +
process.jetPlusProbeSequence +
process.extraProbeVariablesSeq +
process.fakeRateJetPlusProbeTree
)
process.fakeRateWPlusProbe = cms.Path(
process.fastFilter +
process.mergedMuons * process.patMuonsWithTriggerSequence +
process.tagMuons + process.probeMuons + process.extraProbeVariablesSeq +
process.tagMuons + process.probeMuons +
process.wPlusProbeSequence +
process.extraProbeVariablesSeq +
process.fakeRateWPlusProbeTree
)
process.fakeRateZPlusProbe = cms.Path(
process.fastFilter +
process.mergedMuons * process.patMuonsWithTriggerSequence +
process.tagMuons + process.probeMuons + process.extraProbeVariablesSeq +
process.tagMuons + process.probeMuons +
process.zPlusProbeSequence +
process.extraProbeVariablesSeq +
process.fakeRateZPlusProbeTree
)

Expand Down
19 changes: 9 additions & 10 deletions test/zmumu/tp_from_aod_MC.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@
process.load("Configuration.StandardSequences.Reconstruction_cff")

import os
if "CMSSW_7_6_" in os.environ['CMSSW_VERSION']:
process.GlobalTag.globaltag = cms.string('76X_mcRun2_asymptotic_v12')
if "CMSSW_8_0_" in os.environ['CMSSW_VERSION']:
process.GlobalTag.globaltag = cms.string('80X_mcRun2_asymptotic_v4')
process.source.fileNames = [
'/store/relval/CMSSW_7_6_2/RelValZMM_13/GEN-SIM-RECO/PU25ns_76X_mcRun2_asymptotic_v12-v1/00000/56C948BE-CD9C-E511-9349-002590596468.root',
'/store/relval/CMSSW_7_6_2/RelValZMM_13/GEN-SIM-RECO/PU25ns_76X_mcRun2_asymptotic_v12-v1/00000/56F71722-CC9C-E511-9FCF-0CC47A4D7668.root',
'/store/relval/CMSSW_7_6_2/RelValZMM_13/GEN-SIM-RECO/PU25ns_76X_mcRun2_asymptotic_v12-v1/00000/6090AA28-CC9C-E511-931E-003048FFD756.root',
'/store/relval/CMSSW_7_6_2/RelValZMM_13/GEN-SIM-RECO/PU25ns_76X_mcRun2_asymptotic_v12-v1/00000/942C06FC-CC9C-E511-BD1B-0CC47A4D765E.root',
'/store/relval/CMSSW_7_6_2/RelValZMM_13/GEN-SIM-RECO/PU25ns_76X_mcRun2_asymptotic_v12-v1/00000/A68E95F5-CF9C-E511-9F00-0CC47A4D7668.root',
'/store/relval/CMSSW_7_6_2/RelValZMM_13/GEN-SIM-RECO/PU25ns_76X_mcRun2_asymptotic_v12-v1/00000/CCD157ED-CA9C-E511-A54E-0CC47A78A446.root',
'/store/relval/CMSSW_7_6_2/RelValZMM_13/GEN-SIM-RECO/PU25ns_76X_mcRun2_asymptotic_v12-v1/00000/F44985F2-CA9C-E511-A9F3-0CC47A4C8E2A.root',
'/store/relval/CMSSW_7_6_2/RelValZMM_13/GEN-SIM-RECO/PU25ns_76X_mcRun2_asymptotic_v12-v1/00000/F453A13A-D09C-E511-9A18-0CC47A4D765E.root',
'/store/relval/CMSSW_8_0_0/RelValZMM_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_v4-v1/10000/382BADA2-A3DA-E511-9E07-0CC47A4D769E.root',
'/store/relval/CMSSW_8_0_0/RelValZMM_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_v4-v1/10000/6200B483-9EDA-E511-A354-0CC47A4D7636.root',
'/store/relval/CMSSW_8_0_0/RelValZMM_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_v4-v1/10000/70B70BFF-32DB-E511-A4C6-0CC47A4C8E1C.root',
'/store/relval/CMSSW_8_0_0/RelValZMM_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_v4-v1/10000/80CC4165-9FDA-E511-815B-0CC47A78A4A0.root',
'/store/relval/CMSSW_8_0_0/RelValZMM_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_v4-v1/10000/80F7131A-33DB-E511-A2B5-0CC47A4D75F6.root',
'/store/relval/CMSSW_8_0_0/RelValZMM_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_v4-v1/10000/8AC339C5-A0DA-E511-9B02-0CC47A4C8E96.root',
'/store/relval/CMSSW_8_0_0/RelValZMM_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_v4-v1/10000/D279741B-9EDA-E511-A88D-0025905A6110.root',
]
else: raise RuntimeError, "Unknown CMSSW version %s" % os.environ['CMSSW_VERSION']

Expand Down

0 comments on commit 2cd9d5c

Please sign in to comment.