Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:33:13

0001 # Auto generated configuration file
0002 # using: 
0003 # Revision: 1.19 
0004 # Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v 
0005 # with command line options: miniAOD-prod -s PAT --eventcontent MINIAODSIM --runUnscheduled --mc --conditions 80X_mcRun2_asymptotic_2016_TrancheIV_v4_Tr4GT_v4 --era Run2_2016 --no_exec --filein /store/relval/CMSSW_8_0_20/RelValTTbar_13/MINIAODSIM/PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v4_Tr4GT_v4-v1/00000/A8C282AE-D37A-E611-8603-0CC47A4C8ECE.root
0006 import FWCore.ParameterSet.Config as cms
0007 
0008 from Configuration.StandardSequences.Eras import eras
0009 
0010 process = cms.Process('PAT2',eras.Run2_2016)
0011 
0012 ### Example how to check timing
0013 #process.Timing = cms.Service("Timing",
0014 #  summaryOnly = cms.untracked.bool(False),
0015 #  useJobReport = cms.untracked.bool(True)
0016 #)
0017 
0018 ### Example how to check memory
0019 #process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck",ignoreTotal = cms.untracked.int32(1) )
0020 
0021 # import of standard configurations
0022 process.load('Configuration.StandardSequences.Services_cff')
0023 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0024 process.load('FWCore.MessageService.MessageLogger_cfi')
0025 process.load('Configuration.EventContent.EventContent_cff')
0026 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0027 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0028 process.load('Configuration.StandardSequences.MagneticField_cff')
0029 #process.load('PhysicsTools.PatAlgos.slimming.metFilterPaths_cff')
0030 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0031 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0032 
0033 process.maxEvents = cms.untracked.PSet(
0034     input = cms.untracked.int32(1000)
0035 )
0036 
0037 # Input source
0038 process.source = cms.Source("PoolSource",
0039     fileNames = cms.untracked.vstring(
0040     '/store/relval/CMSSW_11_0_0_pre6/RelValTTbar_13/MINIAODSIM/PU25ns_110X_upgrade2018_realistic_v3-v1/20000/F38B9A9F-4B4B-3D4B-8C9D-9A9B945194EF.root',
0041     ),
0042     secondaryFileNames = cms.untracked.vstring(),
0043     skipEvents = cms.untracked.uint32(145)
0044 )
0045 
0046 process.options = cms.untracked.PSet(
0047     allowUnscheduled = cms.untracked.bool(True)
0048 )
0049 
0050 # Production Info
0051 process.configurationMetadata = cms.untracked.PSet(
0052     annotation = cms.untracked.string('miniAOD-prod nevts:1'),
0053     name = cms.untracked.string('Applications'),
0054     version = cms.untracked.string('$Revision: 1.19 $')
0055 )
0056 
0057 # Output definition
0058 
0059 process.MINIAODSIMoutput = cms.OutputModule("PoolOutputModule",
0060     compressionAlgorithm = cms.untracked.string('LZMA'),
0061     compressionLevel = cms.untracked.int32(4),
0062     dataset = cms.untracked.PSet(
0063         dataTier = cms.untracked.string(''),
0064         filterName = cms.untracked.string('')
0065     ),
0066     dropMetaData = cms.untracked.string('ALL'),
0067     eventAutoFlushCompressedSize = cms.untracked.int32(15728640),
0068     fastCloning = cms.untracked.bool(False),
0069     fileName = cms.untracked.string('NewMiniAOD.root'),
0070     outputCommands = cms.untracked.vstring('keep *'),
0071     overrideInputFileSplitLevels = cms.untracked.bool(True)
0072 )
0073 
0074 # Additional output definition
0075 
0076 # Other statements
0077 from Configuration.AlCa.GlobalTag import GlobalTag
0078 ### Pick a global tag that includes the desired JER-SFs
0079 process.GlobalTag = GlobalTag(process.GlobalTag, '102X_mcRun2_asymptotic_v7', '')
0080 
0081 # Path and EndPath definitions
0082 process.MINIAODSIMoutput_step = cms.EndPath(process.MINIAODSIMoutput)
0083 
0084 process.load('Configuration.StandardSequences.Services_cff')
0085 process.load("JetMETCorrections.Modules.JetResolutionESProducer_cfi")
0086 
0087 ### Example how to read the JER-SF from a db file
0088 #from CondCore.DBCommon.CondDBSetup_cfi import *
0089 #process.jer = cms.ESSource("PoolDBESSource",
0090 #        CondDBSetup,
0091 #        toGet = cms.VPSet(
0092 #            # Resolution
0093 #            cms.PSet(
0094 #                record = cms.string('JetResolutionRcd'),
0095 #                tag    = cms.string('JR_Autumn18_V7_MC_PtResolution_AK4PFchs'),
0096 #                label  = cms.untracked.string('AK4PFchs_pt')
0097 #                ),
0098 #
0099 #            # Scale factors
0100 #            cms.PSet(
0101 #                record = cms.string('JetResolutionScaleFactorRcd'),
0102 #                tag    = cms.string('JR_Autumn18_V7_MC_SF_AK4PFchs'),
0103 #                label  = cms.untracked.string('AK4PFchs')
0104 #                ),
0105 #            ),
0106 #        connect = cms.string('sqlite:Autumn18_V7_MC.db')
0107 #        )
0108 #
0109 #process.es_prefer_jer = cms.ESPrefer('PoolDBESSource', 'jer')
0110 
0111 # example for smearing the jet resolution
0112 process.slimmedJetsSmeared = cms.EDProducer('SmearedPATJetProducer',
0113        src = cms.InputTag('slimmedJets'),
0114        enabled = cms.bool(True),
0115        rho = cms.InputTag("fixedGridRhoFastjetAll"),
0116        algo = cms.string('AK4PFchs'),
0117        algopt = cms.string('AK4PFchs_pt'),
0118        #resolutionFile = cms.FileInPath('Autumn18_V7_MC_PtResolution_AK4PFchs.txt'),
0119        #scaleFactorFile = cms.FileInPath('combined_SFs_uncertSources.txt'),
0120 
0121        genJets = cms.InputTag('slimmedGenJets'),
0122        dRMax = cms.double(0.2),
0123        dPtMaxFactor = cms.double(3),
0124 
0125        debug = cms.untracked.bool(False),
0126    # Systematic variation
0127    # 0: Nominal
0128    # -1: -1 sigma (down variation)
0129    # 1: +1 sigma (up variation)
0130    variation = cms.int32(0),  # If not specified, default to 0
0131    uncertaintySource = cms.string(""), # If not specified, default to Total
0132        )
0133 process.p=cms.Path(process.slimmedJetsSmeared)
0134 
0135 # example for computing total uncertainties on jet resolution
0136 process.slimmedJetsSmearedDown=process.slimmedJetsSmeared.clone(variation=cms.int32(-1))
0137 process.p+=process.slimmedJetsSmearedDown
0138 process.slimmedJetsSmearedUp=process.slimmedJetsSmeared.clone(variation=cms.int32(1))
0139 process.p+=process.slimmedJetsSmearedUp
0140 
0141 # example for cumputing statistical and systematic uncertainties on jet resolution separately
0142 #for source in ["Stat","Jec","Gaus","Rest","Time"]:
0143 #  setattr(process,"slimmedJetsSmeared"+source+"Down",process.slimmedJetsSmeared.clone(uncertaintySource=source,variation=cms.int32(-1)))
0144 #  process.p+=getattr(process,"slimmedJetsSmeared"+source+"Down")
0145 #  setattr(process,"slimmedJetsSmeared"+source+"Up",process.slimmedJetsSmeared.clone(uncertaintySource=source,variation=cms.int32(1)))
0146 #  process.p+=getattr(process,"slimmedJetsSmeared"+source+"Up")
0147 
0148 process.schedule=cms.Schedule(process.p,process.MINIAODSIMoutput_step)