Skip to content

Commit

Permalink
Merge pull request #15 from nsahoo/pull-request-oct24
Browse files Browse the repository at this point in the history
Pull request oct24-changes done to run over 2011 mc and data samples
  • Loading branch information
xshi committed Oct 27, 2014
2 parents f229b68 + 25c9975 commit 6748d4b
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 25 deletions.
38 changes: 13 additions & 25 deletions python/btokstarmumu_MC.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# variables
################
runMC = True
run2012not2011 = True # True for 2012 and False for 2011
run2012not2011 = False # True for 2012 and False for 2011

print "\n@@@ CMSSW run configuration flags @@@"

Expand All @@ -25,18 +25,19 @@
import FWCore.ParameterSet.Config as cms
from btokstarmumu_cfi import process

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(500) )
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1000) )

process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring('root://eoscms//store/user/pchen/BToKstarMuMu/dat/AOD/BuToKstarMuMu_EtaPtFilter_8TeV-pythia6-evtgen_PU_RD2_START53_V19F-v2_AODSIM_FC45B39F-A5BC-E311-B2F8-0025901D4864.root' )
# fileNames = cms.untracked.vstring('root://eoscms//store/user/pchen/BToKstarMuMu/dat/AOD/BuToKstarMuMu_EtaPtFilter_8TeV-pythia6-evtgen_PU_RD2_START53_V19F-v2_AODSIM_FC45B39F-A5BC-E311-B2F8-0025901D4864.root' )
fileNames = cms.untracked.vstring('/store/mc/Summer11LegDR/BuToKstarMuMuV2_EtaPtFilter_7TeV-pythia6-evtgen/AODSIM/PU_S13_START53_LV6-v1/00000/000043B3-0E0B-E411-B2FE-0026189438E9.root')
)

if (run2012not2011 == True):
process.GlobalTag.globaltag = cms.string('START53_V19F::All')
print "\nGlobalTag : START53_V19F::All\n"
process.GlobalTag.globaltag = cms.string('START53_V19F::All') # run dependent MC: START53_V19F , Jpsi X MC: START53_V7G
print "\n=> Global Tag : START53_V19F::All\n"
else:
process.GlobalTag.globaltag = cms.string('START42_V14B::All')
print "\nGlobalTag : START42_V14B::All\n"
process.GlobalTag.globaltag = cms.string('START53_LV6A1::All') # GT for 7TeV legacy samples reprocessed in cmssw_5_3_X
print "\n=> Global Tag : START53_LV6A1::All\n"

# do trigger matching for muons
triggerProcessName = 'HLT'
Expand All @@ -57,27 +58,17 @@
# take best match found per reco object (by DeltaR here, see above)
resolveByMatchQuality = cms.bool(False))
else:
process.cleanMuonTriggerMatchHLT0 = cms.EDProducer(
# match by DeltaR only (best match by DeltaR)
'PATTriggerMatcherDRLessByR',
src = cms.InputTag('cleanPatMuons'),
# default producer label as defined in
# PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
matched = cms.InputTag('patTrigger'),
matchedCuts = cms.string('path("HLT_Dimuon6p5_LowMass_Displaced_v*",0,0)'),
maxDeltaR = cms.double(0.1),
# only one match per trigger object
resolveAmbiguities = cms.bool(True),
# take best match found per reco object (by DeltaR here, see above)
resolveByMatchQuality = cms.bool(False))

process.cleanMuonTriggerMatchHLT1 = cms.EDProducer(
'PATTriggerMatcherDRLessByR',
src = cms.InputTag('cleanPatMuons'),
# default producer label as defined in
# PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
matched = cms.InputTag('patTrigger'),
matchedCuts = cms.string('path("HLT_Dimuon7_LowMass_Displaced_v*")'),
maxDeltaR = cms.double(0.1),
# only one match per trigger object
resolveAmbiguities = cms.bool(True),
# take best match found per reco object (by DeltaR here, see above)
resolveByMatchQuality = cms.bool(False))

process.cleanMuonTriggerMatchHLT2 = cms.EDProducer(
Expand Down Expand Up @@ -119,12 +110,9 @@
]

else:
switchOnTriggerMatchEmbedding(process, triggerMatchers = ['cleanMuonTriggerMatchHLT0','cleanMuonTriggerMatchHLT1','cleanMuonTriggerMatchHLT2','cleanMuonTriggerMatchHLT3','cleanMuonTriggerMatchHLT4'], hltProcess = triggerProcessName, outputModule = '')
switchOnTriggerMatchEmbedding(process, triggerMatchers = ['cleanMuonTriggerMatchHLT1','cleanMuonTriggerMatchHLT2','cleanMuonTriggerMatchHLT3','cleanMuonTriggerMatchHLT4'], hltProcess = triggerProcessName, outputModule = '')

g_TriggerNames_LastFilterNames = [
('HLT_Dimuon6p5_LowMass_Displaced',
'hltDisplacedmumuFilterLowMass'), #5E32

('HLT_Dimuon7_LowMass_Displaced',
'hltDisplacedmumuFilterLowMass'), #1E33, 1.4E33

Expand Down
81 changes: 81 additions & 0 deletions python/btokstarmumu_Run2011_12oct2013.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import FWCore.ParameterSet.Config as cms
from btokstarmumu_cfi import process

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(2000))

process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring(
'/store/data/Run2011A/MuOnia/AOD/12Oct2013-v1/00000/002104A5-2A44-E311-B69F-00304867918A.root')
)
process.GlobalTag.globaltag = cms.string('FT_53_LV5_AN1::All') # GT for 2011AB legacy ReReco in cmssw_5_3_X

print "\n=> Global Tag: FT_53_LV5_AN1::All \n"

# do trigger matching for muons
triggerProcessName = 'HLT'


process.cleanMuonTriggerMatchHLT1 = cms.EDProducer(
'PATTriggerMatcherDRLessByR',
src = cms.InputTag('cleanPatMuons'),
# default producer label as defined in
# PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
matched = cms.InputTag('patTrigger'),
matchedCuts = cms.string('path("HLT_Dimuon7_LowMass_Displaced_v*")'),
maxDeltaR = cms.double(0.1),
# only one match per trigger object
resolveAmbiguities = cms.bool(True),
# take best match found per reco object (by DeltaR here, see above)
resolveByMatchQuality = cms.bool(False)) #####

process.cleanMuonTriggerMatchHLT2 = cms.EDProducer(
'PATTriggerMatcherDRLessByR',
src = cms.InputTag('cleanPatMuons'),
matched = cms.InputTag('patTrigger'),
matchedCuts = cms.string('path("HLT_DoubleMu4_LowMass_Displaced_v*")'),
maxDeltaR = cms.double(0.1),
resolveAmbiguities = cms.bool(True),
resolveByMatchQuality = cms.bool(False)) #####

process.cleanMuonTriggerMatchHLT3 = cms.EDProducer(
'PATTriggerMatcherDRLessByR',
src = cms.InputTag('cleanPatMuons'),
matched = cms.InputTag('patTrigger'),
matchedCuts = cms.string('path("HLT_DoubleMu4p5_LowMass_Displaced_v*")'),
maxDeltaR = cms.double(0.1),
resolveAmbiguities = cms.bool(True),
resolveByMatchQuality = cms.bool(False)) #####

process.cleanMuonTriggerMatchHLT4 = cms.EDProducer(
'PATTriggerMatcherDRLessByR',
src = cms.InputTag('cleanPatMuons'),
matched = cms.InputTag('patTrigger'),
matchedCuts = cms.string('path("HLT_DoubleMu5_LowMass_Displaced_v*")'),
maxDeltaR = cms.double(0.1),
resolveAmbiguities = cms.bool(True),
resolveByMatchQuality = cms.bool(False)) #####

from PhysicsTools.PatAlgos.tools.trigTools import *

switchOnTriggerMatchEmbedding(process, triggerMatchers = ['cleanMuonTriggerMatchHLT1','cleanMuonTriggerMatchHLT2','cleanMuonTriggerMatchHLT3','cleanMuonTriggerMatchHLT4'], hltProcess = triggerProcessName, outputModule = '')

g_TriggerNames_LastFilterNames = [
('HLT_Dimuon7_LowMass_Displaced',
'hltDisplacedmumuFilterLowMass'), #1E33, 1.4E33

('HLT_DoubleMu4_LowMass_Displaced',
'hltDisplacedmumuFilterLowMass'), #2E33

('HLT_DoubleMu4p5_LowMass_Displaced',
'hltDisplacedmumuFilterDoubleMu4p5LowMass'), #3E33, 5E33

('HLT_DoubleMu5_LowMass_Displaced',
'hltDisplacedmumuFilterDoubleMu5LowMass'), #3E33, 5E33
]

g_TriggerNames = [i[0] for i in g_TriggerNames_LastFilterNames]
g_LastFilterNames = [i[1] for i in g_TriggerNames_LastFilterNames]

process.ntuple.TriggerNames = cms.vstring(g_TriggerNames)
process.ntuple.LastFilterNames = cms.vstring(g_LastFilterNames)

0 comments on commit 6748d4b

Please sign in to comment.