Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("Test")
0004 
0005 process.source = cms.Source("PoolSource",
0006   fileNames = cms.untracked.vstring(
0007     "file:patTuple.root"
0008 #"file:store/patTuple.root"
0009   )
0010 )
0011 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
0012 
0013 process.MessageLogger = cms.Service("MessageLogger")
0014 
0015 #################
0016 #               #
0017 # EXERCISE 1    #
0018 #               #
0019 #################
0020 
0021 process.jecAnalyzer = cms.EDAnalyzer("WrappedEDAnalysisTasksAnalyzerJEC",
0022   Jets = cms.InputTag("cleanPatJets"), 
0023   jecLevel=cms.string("SomeWrongName"), 
0024 #  jecLevel=cms.string("L3Absolute"),
0025   patJetCorrFactors= cms.string('SomeWrongName'),
0026 #  patJetCorrFactors= cms.string('patJetCorrFactors'),
0027   help=cms.bool(False)
0028 )
0029 
0030 process.p = cms.Path(process.jecAnalyzer)
0031 
0032 
0033 #################
0034 #               #
0035 # EXERCISE 2    #
0036 #               #
0037 #################
0038 
0039 process.TFileService = cms.Service("TFileService",
0040   fileName = cms.string('TFileServiceOutput.root')
0041 )
0042 
0043 
0044 process.jecAnalyzerRel=process.jecAnalyzer.clone(jecLevel="L2Relative")
0045 process.jecAnalyzerNon=process.jecAnalyzer.clone(jecLevel="Uncorrected")
0046 process.p.replace(process.jecAnalyzer, process.jecAnalyzer * process.jecAnalyzerRel * process.jecAnalyzerNon)
0047 
0048 
0049 #################
0050 #               #
0051 # EXERCISE 3.2  #
0052 #               #
0053 #################
0054 ## Geometry and Detector Conditions (needed for a Scaling up and down the JEC)
0055 process.load("Configuration.StandardSequences.Geometry_cff")
0056 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0057 from Configuration.AlCa.autoCond import autoCond
0058 process.GlobalTag.globaltag = cms.string( autoCond[ 'startup' ] )
0059 process.load("Configuration.StandardSequences.MagneticField_cff")
0060 
0061 # load the standard PAT config
0062 process.load("PhysicsTools.PatAlgos.patSequences_cff")
0063 from PhysicsTools.PatUtils.tools.metUncertaintyTools import runMEtUncertainties
0064 runMEtUncertainties(process)
0065 
0066 #process.shiftedPatJets=process.shiftedPatJetsEnUp.clone(src = cms.InputTag("cleanPatJets"),shiftBy=cms.double(1))
0067 
0068 #process.jecAnalyzerEnUp=process.jecAnalyzer.clone(Jets = cms.InputTag("shiftedPatJets"))
0069 #process.p.replace(process.jecAnalyzer,  process.shiftedPatJets * process.jecAnalyzerEnUp)
0070 
0071 #################
0072 #               #
0073 # EXERCISE 3.3  #
0074 #               #
0075 #################
0076 
0077 #process.btagAnalyzer = cms.EDAnalyzer("WrappedEDAnalysisTasksAnalyzerBTag",
0078 #  Jets = cms.InputTag("cleanPatJets"),    
0079 #   bTagAlgo=cms.string('trackCountingHighEffBJetTags'),
0080 #   bins=cms.uint32(100),
0081 #   lowerbin=cms.double(0.),
0082 #   upperbin=cms.double(10.)
0083 #)
0084 
0085 #process.btagAnalyzerTCHP=process.btagAnalyzer.clone(bTagAlgo="trackCountingHighPurBJetTags")
0086 
0087 #process.p.replace(process.jecAnalyzer, process.jecAnalyzer * process.btagAnalyzer * process.btagAnalyzerTCHP)
0088 
0089 
0090 
0091