Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:30:40

0001 ################################################################################################
0002 # To run execute do
0003 # cmsRun L1Trigger/TrackerDTC/test/test.py
0004 # where the arguments take default values if you don't specify them. You can change defaults below.
0005 #################################################################################################
0006 
0007 import FWCore.ParameterSet.Config as cms
0008 
0009 process = cms.Process( "Demo" )
0010 process.load( 'Configuration.Geometry.GeometryExtended2026D49Reco_cff' )
0011 process.load( 'Configuration.StandardSequences.MagneticField_cff' )
0012 process.load( 'Configuration.StandardSequences.FrontierConditions_GlobalTag_cff' )
0013 process.load( 'Configuration.StandardSequences.L1TrackTrigger_cff' )
0014 process.load( "FWCore.MessageLogger.MessageLogger_cfi" )
0015 
0016 from Configuration.AlCa.GlobalTag import GlobalTag
0017 process.GlobalTag = GlobalTag( process.GlobalTag, 'auto:phase2_realistic', '' )
0018 
0019 # load code that produces DTCStubs
0020 process.load( 'L1Trigger.TrackerDTC.ProducerED_cff' )
0021 # load code that analyzes DTCStubs
0022 process.load( 'L1Trigger.TrackerDTC.Analyzer_cff' )
0023 # cosutmize TT algorithm
0024 from L1Trigger.TrackerDTC.Customize_cff import *
0025 #producerUseTMTT(process)
0026 #analyzerUseTMTT(process)
0027 
0028 # build schedule
0029 process.produce = cms.Path( process.TrackerDTCProducer )
0030 process.analyze = cms.Path( process.TrackerDTCAnalyzer )
0031 process.schedule = cms.Schedule( process.produce, process.analyze )
0032 
0033 # create options
0034 import FWCore.ParameterSet.VarParsing as VarParsing
0035 options = VarParsing.VarParsing( 'analysis' )
0036 # specify input MC
0037 Samples = {
0038   '/store/relval/CMSSW_11_2_0_pre6/RelValSingleMuFlatPt1p5To8/GEN-SIM-DIGI-RAW/112X_mcRun4_realistic_v2_2026D49noPU_L1T-v1/20000/4E15C795-152F-A040-8AF4-5AF5F97EB996.root'
0039 }
0040 options.register( 'inputMC', Samples, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "Files to be processed" )
0041 # specify number of events to process.
0042 options.register( 'Events',100,VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.int, "Number of Events to analyze" )
0043 options.parseArguments()
0044 
0045 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(False) )
0046 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.Events) )
0047 process.source = cms.Source(
0048   "PoolSource",
0049   fileNames = cms.untracked.vstring( options.inputMC ),
0050   #skipEvents = cms.untracked.uint32( 47 ),
0051   secondaryFileNames = cms.untracked.vstring(),
0052   duplicateCheckMode = cms.untracked.string( 'noDuplicateCheck' )
0053 )
0054 process.Timing = cms.Service( "Timing", summaryOnly = cms.untracked.bool( True ) )
0055 process.TFileService = cms.Service( "TFileService", fileName = cms.string( "Hist.root" ) )
0056 
0057 # uncomment next 8 lines to use local cabling map
0058 #process.load("CondCore.CondDB.CondDB_cfi")
0059 #process.CondDB.connect = 'sqlite_file:__PATH_TO_DB__/__FILE_NAME__.db'
0060 #process.PoolDBESSource = cms.ESSource(
0061 #  "PoolDBESSource", process.CondDB, toGet = cms.VPSet( cms.PSet(
0062 #    record = cms.string( 'TrackerDetToDTCELinkCablingMapRcd' ),
0063 #    tag    = cms.string( "__CHOSEN_TAG__"                    )
0064 #) ) )
0065 #process.es_prefer_local_TrackerDetToDTCELinkCablingMapRcd = cms.ESPrefer( "PoolDBESSource", "" )