Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-06-03 00:12:19

0001 ################################################################################################
0002 # Run bit-accurate TMTT L1 tracking emulation. 
0003 #
0004 # To run execute do
0005 # cmsRun L1Trigger/L1TTrackerTFP/test/test_cfg.py
0006 # where the arguments take default values if you don't specify them. You can change defaults below.
0007 #################################################################################################
0008 
0009 import FWCore.ParameterSet.Config as cms
0010 
0011 process = cms.Process( "Demo" )
0012 process.load( 'FWCore.MessageService.MessageLogger_cfi' )
0013 process.load( 'Configuration.Geometry.GeometryExtendedRun4D110Reco_cff' ) 
0014 process.load( 'Configuration.Geometry.GeometryExtendedRun4D110_cff' )
0015 process.load( 'Configuration.StandardSequences.MagneticField_cff' )
0016 process.load( 'Configuration.StandardSequences.Services_cff' )
0017 process.load( 'Configuration.EventContent.EventContent_cff' )
0018 process.load( 'Configuration.StandardSequences.EndOfProcess_cff' )
0019 process.load( 'Configuration.StandardSequences.FrontierConditions_GlobalTag_cff' )
0020 process.load( 'L1Trigger.TrackTrigger.TrackTrigger_cff' )
0021 
0022 from Configuration.AlCa.GlobalTag import GlobalTag
0023 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto::phase2_realistic', '')
0024 
0025 # load code that associates stubs with mctruth
0026 process.load( 'SimTracker.TrackTriggerAssociation.StubAssociator_cff' )
0027 # load code that produces DTCStubs
0028 process.load( 'L1Trigger.TrackerDTC.DTC_cff' )
0029 # load code that analyzes DTCStubs
0030 process.load( 'L1Trigger.TrackerDTC.Analyzer_cff' )
0031 # cosutmize TT algorithm
0032 from L1Trigger.TrackerDTC.Customize_cff import *
0033 producerUseTMTT( process )
0034 analyzerUseTMTT( process )
0035 #--- Load code that produces tfp Stubs
0036 process.load( 'L1Trigger.TrackerTFP.Producer_cff' )
0037 from L1Trigger.TrackerTFP.Customize_cff import *
0038 setupUseTMTT( process )
0039 simUseTMTT( process )
0040 #--- Load code that analyzes tfp Stubs
0041 process.load( 'L1Trigger.TrackerTFP.Analyzer_cff' )
0042 
0043 # build schedule
0044 process.mc  = cms.Sequence( process.StubAssociator )
0045 process.dtc = cms.Sequence( process.ProducerDTC + process.AnalyzerDTC )
0046 process.pp  = cms.Sequence( process.ProducerPP                        )
0047 process.gp  = cms.Sequence( process.ProducerGP  + process.AnalyzerGP  )
0048 process.ht  = cms.Sequence( process.ProducerHT  + process.AnalyzerHT  )
0049 process.ctb = cms.Sequence( process.ProducerCTB + process.AnalyzerCTB )
0050 process.kf  = cms.Sequence( process.ProducerKF  + process.AnalyzerKF  )
0051 process.dr  = cms.Sequence( process.ProducerDR  + process.AnalyzerDR  )
0052 process.tq  = cms.Sequence( process.ProducerTQ                        )
0053 process.tfp = cms.Sequence( process.ProducerTFP                       )
0054 process.tt  = cms.Path( process.mc + process.dtc + process.pp + process.gp + process.ht + process.ctb)# + process.kf )#+ process.dr + process.tq )# + process.tfp )
0055 process.schedule = cms.Schedule( process.tt )
0056 
0057 # create options
0058 import FWCore.ParameterSet.VarParsing as VarParsing
0059 options = VarParsing.VarParsing( 'analysis' )
0060 # specify input MC
0061 Samples = [""]
0062 options.register( 'inputMC', Samples, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "Files to be processed" )
0063 # specify number of events to process.
0064 options.register( 'Events',100,VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.int, "Number of Events to analyze" )
0065 options.parseArguments()
0066 
0067 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(False) )
0068 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.Events) )
0069 process.source = cms.Source(
0070   "PoolSource",
0071   fileNames = cms.untracked.vstring( options.inputMC ),
0072   #skipEvents = cms.untracked.uint32( 30 ),
0073   noEventSort = cms.untracked.bool( True ),
0074   secondaryFileNames = cms.untracked.vstring(),
0075   duplicateCheckMode = cms.untracked.string( 'noDuplicateCheck' ),
0076 )
0077 process.Timing = cms.Service( "Timing", summaryOnly = cms.untracked.bool( True ) )
0078 process.MessageLogger.cerr.enableStatistics = False
0079 process.TFileService = cms.Service( "TFileService", fileName = cms.string( "Hist.root" ) )