Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 ############################################################
0002 # define basic process
0003 ############################################################
0004 
0005 import FWCore.ParameterSet.Config as cms
0006 import FWCore.Utilities.FileUtils as FileUtils
0007 import os
0008 
0009 ############################################################
0010 # edit options here
0011 ############################################################
0012 L1TRK_INST ="L1TrackMET" ### if not in input DIGRAW then we make them in the above step
0013 process = cms.Process(L1TRK_INST)
0014 
0015 ReRunTracking = True
0016 GTTInput = True
0017 
0018 
0019 ############################################################
0020 # import standard configurations
0021 ############################################################
0022 
0023 process.load('Configuration.StandardSequences.Services_cff')
0024 process.load('Configuration.EventContent.EventContent_cff')
0025 process.load('Configuration.StandardSequences.MagneticField_cff')
0026 process.load('Configuration.Geometry.GeometryExtendedRun4D49Reco_cff')
0027 process.load('Configuration.Geometry.GeometryExtendedRun4D49_cff')
0028 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0029 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0030 
0031 from Configuration.AlCa.GlobalTag import GlobalTag
0032 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '')
0033 
0034 ############################################################
0035 # input and output
0036 ############################################################
0037 
0038 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(10))
0039 
0040 readFiles = cms.untracked.vstring(
0041   '/store/relval/CMSSW_11_0_0/RelValTTbar_14TeV/GEN-SIM-RECO/PU25ns_110X_mcRun4_realistic_v3_2026D49PU200-v2/10000/53F7C2B0-F6CF-C544-AFF4-3EAAF66DF18B.root',
0042 )
0043 secFiles = cms.untracked.vstring()
0044 
0045 process.source = cms.Source ("PoolSource",
0046                             fileNames = readFiles,
0047                             secondaryFileNames = secFiles,
0048                             duplicateCheckMode = cms.untracked.string('noDuplicateCheck'),
0049                             )
0050 
0051 
0052 process.TFileService = cms.Service("TFileService", fileName = cms.string('TrackMET_Emulation.root'), closeFileFast = cms.untracked.bool(True))
0053 
0054 if ReRunTracking:
0055   process.load("L1Trigger.TrackFindingTracklet.L1HybridEmulationTracks_cff")
0056   producerSum = process.L1THybridTracks + process.L1THybridTracksWithAssociators
0057 else:
0058   producerSum = None
0059 
0060 if GTTInput:
0061   process.load('L1Trigger.L1TTrackMatch.l1tGTTInputProducer_cfi')
0062   producerSum = producerSum + process.L1GTTInputProducer
0063 
0064 
0065 
0066 process.load("L1Trigger.L1TTrackMatch.l1tTrackerEtMiss_cfi")
0067 process.load("L1Trigger.L1TTrackMatch.l1tTrackerEmuEtMiss_cfi")
0068 process.load("L1Trigger.L1TTrackMatch.L1TkMETAnalyser_cfi")
0069 
0070 ############################################################
0071 # Primary vertex
0072 ############################################################
0073 
0074 process.load('L1Trigger.L1TTrackMatch.l1tTrackSelectionProducer_cfi')
0075 process.load('L1Trigger.VertexFinder.l1tVertexProducer_cfi')
0076 process.l1tVertexProducer.l1TracksInputTag = cms.InputTag("l1tTTTracksFromTrackletEmulation", "Level1TTTracks")  
0077 
0078 producerSum += process.l1tTrackSelectionProducer
0079 producerSum += process.l1tVertexProducer
0080 
0081 producerName = 'VertexProducer{0}'.format("fastHisto")
0082 producerName = producerName.replace(".","p") # legalize the name
0083 producer = process.l1tVertexProducer.clone()
0084 producer.VertexReconstruction.Algorithm = cms.string("fastHisto")
0085 process.l1tTrackerEtMiss.L1VertexInputTag = cms.InputTag(producerName,"L1Vertices")
0086 
0087 
0088 setattr(process, producerName, producer)
0089 producerSum += producer
0090 producerSum += process.l1tTrackerEtMiss
0091 
0092 process.l1tTrackerEmuEtMiss.useGTTinput = GTTInput
0093 
0094 if GTTInput:
0095   process.l1tTrackerEmuEtMiss.L1TrackInputTag = cms.InputTag("l1tGTTInputProducer","Level1TTTracksConverted")
0096 else:
0097   process.l1tTrackerEmuEtMiss.L1TrackInputTag = cms.InputTag("l1tTTTracksFromTrackletEmulation", "Level1TTTracks")  
0098 
0099 EmuproducerName = 'VertexProducer{0}'.format("fastHistoEmulation")
0100 EmuproducerName = EmuproducerName.replace(".","p") # legalize the name
0101 Emuproducer = process.l1tVertexProducer.clone()
0102 Emuproducer.VertexReconstruction.Algorithm = cms.string("fastHistoEmulation")
0103 process.l1tTrackerEmuEtMiss.L1VertexInputTag = cms.InputTag(EmuproducerName,"L1VerticesEmulation")
0104 
0105 if GTTInput:
0106   Emuproducer.l1TracksInputTag = cms.InputTag("l1tGTTInputProducer","Level1TTTracksConverted")
0107 else:
0108   Emuproducer.l1TracksInputTag =  cms.InputTag("l1tTTTracksFromTrackletEmulation", "Level1TTTracks")  
0109 
0110 setattr(process, EmuproducerName, Emuproducer)
0111 producerSum += Emuproducer
0112 producerSum += process.l1tTrackerEmuEtMiss
0113   
0114 process.p = cms.Path(producerSum + process.L1TkMETAnalyser)