Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 ################################################################################################
0002 # This script runs DTC + prompt tracklet + KF interface + new KF emulator with analyzer for each step
0003 # allowing to identify problems quickly during developement.
0004 # This script is a specialized and light-weight version of L1TrackNtupleMaker_cfg.py
0005 # To run execute do
0006 # cmsRun L1Trigger/TrackFindingTracklet/test/HybridTracksNewKF_cfg.py
0007 # where the arguments take default values if you don't specify them. You can change defaults below.
0008 #################################################################################################
0009 
0010 import FWCore.ParameterSet.Config as cms
0011 
0012 process = cms.Process( "Demo" )
0013 process.load( 'FWCore.MessageService.MessageLogger_cfi' )
0014 process.load( 'Configuration.EventContent.EventContent_cff' )
0015 process.load( 'Configuration.Geometry.GeometryExtended2026D88Reco_cff' ) 
0016 process.load( 'Configuration.Geometry.GeometryExtended2026D88_cff' )
0017 process.load( 'Configuration.StandardSequences.MagneticField_cff' )
0018 process.load( 'Configuration.StandardSequences.FrontierConditions_GlobalTag_cff' )
0019 process.load( 'L1Trigger.TrackTrigger.TrackTrigger_cff' )
0020 
0021 from Configuration.AlCa.GlobalTag import GlobalTag
0022 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '')
0023 
0024 # load code that associates stubs with mctruth
0025 process.load( 'SimTracker.TrackTriggerAssociation.StubAssociator_cff' )
0026 # load code that produces DTCStubs
0027 process.load( 'L1Trigger.TrackerDTC.ProducerED_cff' )
0028 # load code that analyzes DTCStubs
0029 process.load( 'L1Trigger.TrackerDTC.Analyzer_cff' )
0030 # L1 tracking => hybrid emulation 
0031 process.load("L1Trigger.TrackFindingTracklet.L1HybridEmulationTracks_cff")
0032 from L1Trigger.TrackFindingTracklet.Customize_cff import *
0033 fwConfig( process )
0034 #--- Load code that analyzes hybrid emulation 
0035 process.load( 'L1Trigger.TrackFindingTracklet.Analyzer_cff' )
0036 # load code that fits hybrid tracks
0037 process.load( 'L1Trigger.TrackFindingTracklet.Producer_cff' )
0038 
0039 # load and configure TrackTriggerAssociation
0040 process.load( 'SimTracker.TrackTriggerAssociation.TrackTriggerAssociator_cff' )
0041 process.TTTrackAssociatorFromPixelDigis.TTTracks = cms.VInputTag( cms.InputTag(
0042   process.TrackFindingTrackletProducer_params.LabelTT.value(),
0043   process.TrackFindingTrackletProducer_params.BranchAcceptedTracks.value()
0044 ) )
0045 
0046 # build schedule
0047 process.mc = cms.Sequence( process.StubAssociator )
0048 process.dtc = cms.Sequence( process.TrackerDTCProducer + process.TrackerDTCAnalyzer )
0049 process.tracklet = cms.Sequence( process.L1THybridTracks + process.TrackFindingTrackletAnalyzerTracklet )
0050 process.TBout = cms.Sequence( process.TrackFindingTrackletProducerTBout + process.TrackFindingTrackletAnalyzerTBout )
0051 process.drin = cms.Sequence( process.TrackFindingTrackletProducerDRin + process.TrackFindingTrackletAnalyzerDRin )
0052 process.dr = cms.Sequence( process.TrackFindingTrackletProducerDR + process.TrackFindingTrackletAnalyzerDR )
0053 process.kfin = cms.Sequence( process.TrackFindingTrackletProducerKFin + process.TrackFindingTrackletAnalyzerKFin )
0054 process.kf = cms.Sequence( process.TrackFindingTrackletProducerKF + process.TrackFindingTrackletAnalyzerKF )
0055 #process.TTTracks = cms.Sequence( process.TrackFindingTrackletProducerTT + process.TrackFindingTrackletProducerAS + process.TrackTriggerAssociatorTracks )
0056 #process.interOut = cms.Sequence( process.TrackFindingTrackletProducerKFout + process.TrackFindingTrackletAnalyzerKFout )
0057 process.tt = cms.Path( process.mc + process.dtc + process.tracklet + process.TBout + process.drin + process.dr + process.kfin + process.kf )#+ process.TTTracks + process.interOut )
0058 process.schedule = cms.Schedule( process.tt )
0059 
0060 # create options
0061 import FWCore.ParameterSet.VarParsing as VarParsing
0062 options = VarParsing.VarParsing( 'analysis' )
0063 # specify input MC
0064 #from MCsamples.Scripts.getCMSdata_cfi import *
0065 #from MCsamples.Scripts.getCMSlocaldata_cfi import *
0066 #from MCsamples.RelVal_1260_D88.PU200_TTbar_14TeV_cfi import *
0067 #inputMC = getCMSdataFromCards()
0068 inputMC = ["/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"]
0069 options.register( 'inputMC', inputMC, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "Files to be processed" )
0070 # specify number of events to process.
0071 options.register( 'Events',100,VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.int, "Number of Events to analyze" )
0072 options.parseArguments()
0073 
0074 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(False) )
0075 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.Events) )
0076 process.source = cms.Source(
0077   "PoolSource",
0078   fileNames = cms.untracked.vstring( options.inputMC ),
0079   #skipEvents = cms.untracked.uint32( 250 ),
0080   secondaryFileNames = cms.untracked.vstring(),
0081   duplicateCheckMode = cms.untracked.string( 'noDuplicateCheck' )
0082 )
0083 process.Timing = cms.Service( "Timing", summaryOnly = cms.untracked.bool( True ) )
0084 process.MessageLogger.cerr.enableStatistics = False
0085 process.TFileService = cms.Service( "TFileService", fileName = cms.string( "Hist.root" ) )
0086 
0087 if ( False ):
0088   process.out = cms.OutputModule (
0089     "PoolOutputModule",
0090     fileName = cms.untracked.string("L1Tracks.root"),
0091     fastCloning = cms.untracked.bool( False ),
0092     outputCommands = cms.untracked.vstring('drop *', 'keep *_TTTrack*_*_*', 'keep *_TTStub*_*_*' )
0093   )
0094   process.FEVToutput_step = cms.EndPath( process.out )
0095   process.schedule.append( process.FEVToutput_step )