Пример #1
0
if len(options.lumiFile) > 0:
    import FWCore.PythonUtilities.LumiList as LumiList
    process.source.lumisToProcess = LumiList.LumiList(
        filename=options.lumiFile).getVLuminosityBlockRange()

if options.eventList != '':
    process.source.eventsToProcess = cms.untracked.VEventRange(
        re.split(',', options.eventList))

tau_collection = 'slimmedTaus'
if options.rerunTauReco:
    tau_collection = 'selectedPatTaus'

    tauAtMiniTools.addTauReReco(process)
    tauAtMiniTools.adaptTauToMiniAODReReco(process, options.reclusterJets)

    if isData:
        from PhysicsTools.PatAlgos.tools.coreTools import runOnData
        runOnData(process, names=['Taus'], outputModules=[])

    process.combinatoricRecoTaus.builders[0].signalConeSize = cms.string(
        'max(min(0.2, 4.528/(pt()^0.8982)), 0.03)')  ## change to quantile 0.95
    process.selectedPatTaus.cut = cms.string(
        'pt > 18.'
    )  ## remove DMFinding filter (was pt > 18. && tauID(\'decayModeFindingNewDMs\')> 0.5)

# include Phase2 specific configuration only after 11_0_X
if isPhase2:
    tauIdConfig = importlib.import_module(
        'RecoTauTag.RecoTau.tools.runTauIdMVA')
Пример #2
0
#####
# mode = 0: store original MiniAOD and new selectedPatTaus
# mode = 1: store original MiniAOD, new selectedPatTaus, and all PFtau products as in AOD (except of unsuported ones)
process.output = tauAtMiniTools.setOutputModule(mode=outMode)
if runSignal:
    process.output.fileName = 'miniAOD_TauReco_ggH.root'
    if reclusterJets:
        process.output.fileName = 'miniAOD_TauReco_ak4PFJets_ggH.root'
else:
    process.output.fileName = 'miniAOD_TauReco_QCD.root'
    if reclusterJets:
        process.output.fileName = 'miniAOD_TauReco_ak4PFJets_QCD.root'
process.out = cms.EndPath(process.output)

#####
tauAtMiniTools.adaptTauToMiniAODReReco(process, reclusterJets)

#####
process.load('FWCore.MessageService.MessageLogger_cfi')
if process.maxEvents.input.value() > 10:
    process.MessageLogger.cerr.FwkReport.reportEvery = process.maxEvents.input.value()//10
if process.maxEvents.input.value() > 10000 or process.maxEvents.input.value() < 0:
    process.MessageLogger.cerr.FwkReport.reportEvery = 1000

#####
process.options = cms.untracked.PSet(
)
process.options.numberOfThreads = cms.untracked.uint32(4)
# process.options.numberOfThreads=cms.untracked.uint32(1)
process.options.numberOfStreams = cms.untracked.uint32(0)
print('\t No. of threads:', process.options.numberOfThreads.value(), ', no. of streams:', process.options.numberOfStreams.value())