Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-12-12 02:57:14

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.GeometryExtended2026D88Reco_cff' ) 
0014 process.load( 'Configuration.Geometry.GeometryExtended2026D88_cff' )
0015 process.load( 'Configuration.StandardSequences.MagneticField_cff' )
0016 process.load( 'Configuration.StandardSequences.FrontierConditions_GlobalTag_cff' )
0017 process.load( 'L1Trigger.TrackTrigger.TrackTrigger_cff' )
0018 
0019 from Configuration.AlCa.GlobalTag import GlobalTag
0020 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '')
0021 
0022 # load code that associates stubs with mctruth
0023 process.load( 'SimTracker.TrackTriggerAssociation.StubAssociator_cff' )
0024 # load code that produces DTCStubs
0025 process.load( 'L1Trigger.TrackerDTC.ProducerED_cff' )
0026 # load code that analyzes DTCStubs
0027 process.load( 'L1Trigger.TrackerDTC.Analyzer_cff' )
0028 # cosutmize TT algorithm
0029 from L1Trigger.TrackerDTC.Customize_cff import *
0030 producerUseTMTT( process )
0031 analyzerUseTMTT( process )
0032 #--- Load code that produces tfp Stubs
0033 process.load( 'L1Trigger.TrackerTFP.Producer_cff' )
0034 from L1Trigger.TrackerTFP.Customize_cff import *
0035 setupUseTMTT( process )
0036 #--- Load code that analyzes tfp Stubs
0037 process.load( 'L1Trigger.TrackerTFP.Analyzer_cff' )
0038 
0039 # build schedule
0040 process.mc = cms.Sequence( process.StubAssociator )
0041 process.dtc = cms.Sequence( process.TrackerDTCProducer + process.TrackerDTCAnalyzer )
0042 process.gp = cms.Sequence( process.TrackerTFPProducerGP + process.TrackerTFPAnalyzerGP )
0043 process.ht = cms.Sequence( process.TrackerTFPProducerHT + process.TrackerTFPAnalyzerHT )
0044 process.mht = cms.Sequence( process.TrackerTFPProducerMHT + process.TrackerTFPAnalyzerMHT )
0045 process.zht = cms.Sequence( process.TrackerTFPProducerZHT + process.TrackerTFPAnalyzerZHT )
0046 process.interIn = cms.Sequence( process.TrackerTFPProducerZHTout + process.TrackerTFPProducerKFin + process.TrackerTFPAnalyzerKFin )
0047 process.kf = cms.Sequence( process.TrackerTFPProducerKF + process.TrackerTFPAnalyzerKF )
0048 process.interOut = cms.Sequence( process.TrackerTFPProducerTT + process.TrackerTFPProducerAS )#+ process.TrackerTFPAnalyzerTT )
0049 process.tt = cms.Path( process.mc + process.dtc + process.gp + process.ht + process.mht + process.zht + process.interIn + process.kf )#+ process.interOut )
0050 process.schedule = cms.Schedule( process.tt )
0051 
0052 # create options
0053 import FWCore.ParameterSet.VarParsing as VarParsing
0054 options = VarParsing.VarParsing( 'analysis' )
0055 # specify input MC
0056 Samples = [
0057 '/store/mc/CMSSW_12_6_0/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/PU_125X_mcRun4_realistic_v5_2026D88PU200RV183v2-v1/30000/0959f326-3f52-48d8-9fcf-65fc41de4e27.root'
0058 ]
0059 options.register( 'inputMC', Samples, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "Files to be processed" )
0060 # specify number of events to process.
0061 options.register( 'Events',100,VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.int, "Number of Events to analyze" )
0062 options.parseArguments()
0063 
0064 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(False) )
0065 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.Events) )
0066 process.source = cms.Source(
0067   "PoolSource",
0068   fileNames = cms.untracked.vstring( options.inputMC ),
0069   #skipEvents = cms.untracked.uint32( 3 + 8 ),
0070   noEventSort = cms.untracked.bool( True ),
0071   secondaryFileNames = cms.untracked.vstring(),
0072   duplicateCheckMode = cms.untracked.string( 'noDuplicateCheck' )
0073 )
0074 #process.Timing = cms.Service( "Timing", summaryOnly = cms.untracked.bool( True ) )
0075 process.MessageLogger.cerr.enableStatistics = False
0076 process.TFileService = cms.Service( "TFileService", fileName = cms.string( "Hist.root" ) )