Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-06 06:06:48

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 # It should be copied somewhere like /eos/user/t/tomalin/
0012 # using cp on lxplus. And a link created to it from 
0013 # somewhere like 
0014 # https://cernbox.cern.ch/index.php/apps/files/?dir=/& .
0015 # N.B. The "quicklink" this gives is buggy. Take the encoded 
0016 # string from it and insert it into something like:
0017 #https://cernbox.cern.ch/remote.php/dav/public-files/4wMLEX986bdIs8U/skimmedForCI_14_0_0.root
0018 # The link to the skimmed dataset should be referred to in
0019 # https://gitlab.cern.ch/cms-l1tk/cmssw_CI .
0020 #-----------------------------------------------------------
0021 
0022 ############################################################
0023 # define basic process
0024 ############################################################
0025 
0026 import FWCore.ParameterSet.Config as cms
0027 import FWCore.Utilities.FileUtils as FileUtils
0028 import os
0029 process = cms.Process("SKIM")
0030 
0031  
0032 ############################################################
0033 # import standard configurations
0034 ############################################################
0035 
0036 process.load('Configuration.StandardSequences.Services_cff')
0037 process.load('FWCore.MessageService.MessageLogger_cfi')
0038 process.load('Configuration.EventContent.EventContent_cff')
0039 process.load('Configuration.StandardSequences.MagneticField_cff')
0040 
0041 # D88 geometry (T24 tracker)
0042 process.load('Configuration.Geometry.GeometryExtendedRun4D98Reco_cff')
0043 process.load('Configuration.Geometry.GeometryExtendedRun4D98_cff')
0044 
0045 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0046 
0047 
0048 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1000))
0049 
0050 #--- To use MCsamples scripts, defining functions get*data*() for easy MC access,
0051 #--- follow instructions in https://github.com/cms-L1TK/MCsamples
0052 
0053 from MCsamples.Scripts.getCMSdata_cfi import *
0054 
0055 # Read data from card files (defines getCMSdataFromCards()):
0056 from MCsamples.RelVal_1400_D98.PU0_TTbar_14TeV_cfi import *
0057 inputMC = getCMSdataFromCards()
0058 
0059 process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring(*inputMC))
0060 
0061 process.output = cms.OutputModule("PoolOutputModule",
0062     splitLevel = cms.untracked.int32(0),
0063     eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
0064     outputCommands = cms.untracked.vstring('drop *'),
0065     fileName = cms.untracked.string('/tmp/skimmedForCI.root'),
0066     dataset = cms.untracked.PSet(
0067         filterName = cms.untracked.string(''),
0068         dataTier = cms.untracked.string('GEN-SIM-DIGI-RAW')
0069     )
0070 )
0071 
0072 process.output.outputCommands.append('keep  *_*_*Level1TTTracks*_*')
0073 process.output.outputCommands.append('keep  *_*_*StubAccepted*_*')
0074 process.output.outputCommands.append('keep  *_*_*ClusterAccepted*_*')
0075 process.output.outputCommands.append('keep  *_*_*MergedTrackTruth*_*')
0076 process.output.outputCommands.append('keep  *_genParticles_*_*')
0077 
0078 # Add this if you need to rereconstruct the stubs.
0079 #process.output.outputCommands.append('keep  Phase2TrackerDigi*_mix_Tracker_*')
0080 #process.output.outputCommands.append('keep  PixelDigiSimLinked*_simSiPixelDigis_Tracker_*')
0081 
0082 process.pd = cms.EndPath(process.output)
0083 
0084 process.schedule = cms.Schedule(process.pd)