Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:14:03

0001 #-----------------------------------------------------------
0002 # This job skims a MC dataset, selecting only products
0003 # that are needed to run the L1 tracking & measure its
0004 # performance. 
0005 #
0006 # It is typically used to create small datasets that
0007 # the git CI runs on to check new code.
0008 #
0009 # Whenever the L1 tracking group switches to a new default
0010 # MC dataset, this skim should be run on ttbar+0PU MC, 
0011 # and the skimmed dataset placed in
0012 # https://gitlab.cern.ch/cms-l1tk/cmssw_CI .
0013 #-----------------------------------------------------------
0014 
0015 ############################################################
0016 # define basic process
0017 ############################################################
0018 
0019 import FWCore.ParameterSet.Config as cms
0020 import FWCore.Utilities.FileUtils as FileUtils
0021 import os
0022 process = cms.Process("SKIM")
0023 
0024  
0025 ############################################################
0026 # import standard configurations
0027 ############################################################
0028 
0029 process.load('Configuration.StandardSequences.Services_cff')
0030 process.load('FWCore.MessageService.MessageLogger_cfi')
0031 process.load('Configuration.EventContent.EventContent_cff')
0032 process.load('Configuration.StandardSequences.MagneticField_cff')
0033 
0034 # D49 geometry (T15 tracker)
0035 process.load('Configuration.Geometry.GeometryExtended2026D76Reco_cff')
0036 process.load('Configuration.Geometry.GeometryExtended2026D76_cff')
0037 
0038 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0039 
0040 
0041 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1000))
0042 
0043 #--- To use MCsamples scripts, defining functions get*data*() for easy MC access,
0044 #--- follow instructions in https://github.com/cms-L1TK/MCsamples
0045 
0046 from MCsamples.Scripts.getCMSdata_cfi import *
0047 
0048 # Read data from card files (defines getCMSdataFromCards()):
0049 from MCsamples.RelVal_1130_D76.PU0_TTbar_14TeV_cfi import *
0050 inputMC = getCMSdataFromCards()
0051 
0052 process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring(*inputMC))
0053 
0054 process.output = cms.OutputModule("PoolOutputModule",
0055     splitLevel = cms.untracked.int32(0),
0056     eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
0057     outputCommands = cms.untracked.vstring('drop *'),
0058     fileName = cms.untracked.string('/tmp/skimmedForCI.root'),
0059     dataset = cms.untracked.PSet(
0060         filterName = cms.untracked.string(''),
0061         dataTier = cms.untracked.string('GEN-SIM-DIGI-RAW')
0062     )
0063 )
0064 
0065 process.output.outputCommands.append('keep  *_*_*Level1TTTracks*_*')
0066 process.output.outputCommands.append('keep  *_*_*StubAccepted*_*')
0067 process.output.outputCommands.append('keep  *_*_*ClusterAccepted*_*')
0068 process.output.outputCommands.append('keep  *_*_*MergedTrackTruth*_*')
0069 process.output.outputCommands.append('keep  *_genParticles_*_*')
0070 
0071 process.pd = cms.EndPath(process.output)
0072 
0073 process.schedule = cms.Schedule(process.pd)