예제 #1
0
def loadMCVersion(process, mcVersion, mcInfo):
    #-- To be able to run on 35X input samples ---------------------------------------
    from PhysicsTools.PatAlgos.tools.cmsswVersionTools import run36xOn35xInput
    if not mcVersion:
	return
    elif mcVersion == '35x': 
	run36xOn35xInput(process)
	if mcInfo:
		run36xOnReRecoMC(process)
    	#-- Jet plus tracks are in RECO in 36X, but not in 35X-----------------------
	process.load("RecoJets.Configuration.RecoJPTJets_cff")
    else: raise ValueError, "Unknown MC version: %s" % (mcVersion)
## std sequence for pat
process.load("PhysicsTools.PatAlgos.patSequences_cff")

## remove MC matching, photons, taus and cleaning from PAT default sequence
from PhysicsTools.PatAlgos.tools.coreTools import *
removeMCMatching(process, ['All'])

removeSpecificPATObjects(process,
                         ['Photons','Taus'],
                         outputInProcess=False)
removeCleaning(process,
               outputInProcess=False)

from PhysicsTools.PatAlgos.tools.cmsswVersionTools import run36xOn35xInput
run36xOn35xInput(process)

## use the correct jet energy corrections
process.patJetCorrFactors.corrSample = "Spring10"

#-------------------------------------------------
# muon selection
#-------------------------------------------------

#calculate impact parameter w.r.t beam spot (instead of primary vertex)
process.patMuons.usePV = False

from PhysicsTools.PatAlgos.cleaningLayer1.muonCleaner_cfi import *
process.isolatedMuons010 = cleanPatMuons.clone(preselection =
                                               'isGlobalMuon & isTrackerMuon &'
                                               'pt > 20. &'