Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:42

0001 ## import skeleton process
0002 from PhysicsTools.PatAlgos.patTemplate_cfg import cms, process, patAlgosToolsTask
0003 #process.Tracer = cms.Service("Tracer")
0004 
0005 process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff")
0006 patAlgosToolsTask.add(process.patCandidatesTask)
0007 
0008 process.load("PhysicsTools.PatAlgos.selectionLayer1.selectedPatCandidates_cff")
0009 patAlgosToolsTask.add(process.selectedPatCandidatesTask)
0010 
0011 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0012 process.load("RecoVertex.AdaptiveVertexFinder.inclusiveVertexing_cff")
0013 patAlgosToolsTask.add(process.inclusiveVertexingTask)
0014 patAlgosToolsTask.add(process.inclusiveCandidateVertexingTask)
0015 patAlgosToolsTask.add(process.inclusiveCandidateVertexingCvsLTask)
0016 
0017 process.load("PhysicsTools.PatAlgos.slimming.slimming_cff")
0018 patAlgosToolsTask.add(process.slimmingTask)
0019 
0020 from PhysicsTools.PatAlgos.slimming.miniAOD_tools import miniAOD_customizeCommon, miniAOD_customizeMC
0021 miniAOD_customizeCommon(process)
0022 miniAOD_customizeMC(process)
0023 
0024 ## add command line parsing for cmsRun
0025 ## ussage is:
0026 ## cmsRun RecoTauTag/Configuration/test/edmTauVariables_slimmed_cfg.py inputFiles_load==RecoTauTag/Configuration/test/ZTT-validation.py \
0027 ## outputFile=MyOutputFile.root maxEvents=100
0028 ##
0029 ## get more inof here: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideAboutPythonConfigFile#Passing_Command_Line_Arguments_T
0030 from FWCore.ParameterSet.VarParsing import VarParsing
0031 
0032 ## define default values
0033 from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValTTbarPileUpGENSIMRECO
0034 process.source.fileNames = filesRelValTTbarPileUpGENSIMRECO
0035 
0036 options = VarParsing ('analysis')
0037 options.inputFiles = filesRelValTTbarPileUpGENSIMRECO
0038 options.outputFile = 'patMiniAOD_standard.root'
0039 options.maxEvents  = 100
0040 ## parse arguments
0041 options.parseArguments()
0042 options.inputFiles.pop(0)
0043 process.source.fileNames = options.inputFiles 
0044 process.out.fileName     = options.outputFile
0045 process.maxEvents.input  = options.maxEvents
0046 
0047 ## ------------------------------------------------------
0048 #  In addition you usually want to change the following
0049 #  parameters:
0050 ## ------------------------------------------------------
0051 #
0052 #   process.GlobalTag.globaltag =  ...    ##  (according to https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions)
0053 #                                         ##
0054 #from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValTTbarPileUpGENSIMRECO
0055 #process.source.fileNames = filesRelValTTbarPileUpGENSIMRECO
0056 
0057 #                                         ##
0058 #process.maxEvents.input = 100
0059 #                                         ##
0060 process.out.outputCommands = process.MicroEventContentMC.outputCommands
0061 from PhysicsTools.PatAlgos.slimming.miniAOD_tools import miniAOD_customizeOutput
0062 miniAOD_customizeOutput(process.out)
0063 #                                         ##
0064 #   process.options.wantSummary = False   ##  (to suppress the long output at the end of the job)
0065 #                                         ##
0066 #process.out.fileName = 'patMiniAOD_standard.root'
0067 #
0068