Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:02

0001 import FWCore.ParameterSet.Config as cms
0002 import copy
0003 
0004 process = cms.Process('analyzePatTau')
0005 
0006 process.load('Configuration.StandardSequences.Services_cff')
0007 process.load('FWCore.MessageService.MessageLogger_cfi')
0008 process.MessageLogger.cerr.FwkReport.reportEvery = 100
0009 #process.MessageLogger.cerr.threshold = cms.untracked.string('INFO')
0010 process.load('Configuration.StandardSequences.GeometryDB_cff')
0011 process.load('Configuration.StandardSequences.MagneticField_cff')
0012 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0013 process.GlobalTag.globaltag = cms.string( autoCond[ 'phase1_2022_realistic' ] )
0014 process.load('PhysicsTools.PatAlgos.patSequences_cff')
0015 
0016 process.maxEvents = cms.untracked.PSet(
0017     input = cms.untracked.int32(-1)
0018 )
0019 
0020 process.source = cms.Source("PoolSource",
0021     fileNames = cms.untracked.vstring()
0022 )
0023 
0024 from PhysicsTools.PatAlgos.tools.cmsswVersionTools import pickRelValInputFiles
0025 process.source = cms.Source("PoolSource",
0026     fileNames = cms.untracked.vstring(
0027     pickRelValInputFiles( cmsswVersion  = 'CMSSW_4_2_8'
0028                         , relVal        = 'RelValTTbar'
0029                         , globalTag     = 'START42_V12'
0030                         , numberOfFiles = 1
0031                         )
0032     )
0033 )
0034 
0035 process.maxEvents = cms.untracked.PSet(
0036     input = cms.untracked.int32(-1)
0037 )
0038 
0039 # switch to HPS + TaNC combined tau id. algorithm
0040 from PhysicsTools.PatAlgos.tools.tauTools import *
0041 switchToPFTauHPSpTaNC(process)
0042 
0043 process.analyzePatTau = cms.EDAnalyzer("PatTauAnalyzer",
0044     src = cms.InputTag('cleanPatTaus'),
0045     requireGenTauMatch = cms.bool(True),
0046     discrByLeadTrack = cms.string("leadingTrackPtCut"),
0047     discrByIso = cms.string("byHPSloose"),
0048     discrByTaNC = cms.string("byTaNCmedium")
0049 )
0050 
0051 # disable preselection on pat::Tau objects
0052 # (neccessary in order to make efficiency plots)
0053 process.cleanPatTaus.preselection = cms.string('')
0054 
0055 process.TFileService = cms.Service("TFileService",
0056     fileName = cms.string('patTau_Histograms.root')
0057 )
0058 
0059 process.p = cms.Path( process.patDefaultSequence + process.analyzePatTau )
0060 
0061 # print-out all python configuration parameter information
0062 #print process.dumpPython()