Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-26 02:43:43

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.GeometryExtended2026D49Reco_cff')
0027 process.load('Configuration.Geometry.GeometryExtended2026D49_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.L1HybridTracks + process.L1HybridTracksWithAssociators
0057 else:
0058   producerSum = None
0059 
0060 if GTTInput:
0061   process.load('L1Trigger.L1TTrackMatch.L1GTTInputProducer_cfi')
0062   producerSum = producerSum + process.L1GTTInputProducer
0063 
0064 
0065 
0066 process.load("L1Trigger.L1TTrackMatch.L1TrackerEtMissProducer_cfi")
0067 process.load("L1Trigger.L1TTrackMatch.L1TrackerEtMissEmulatorProducer_cfi")
0068 process.load("L1Trigger.L1TTrackMatch.L1TkMETAnalyser_cfi")
0069 
0070 ############################################################
0071 # Primary vertex
0072 ############################################################
0073 
0074 process.load('L1Trigger.VertexFinder.VertexProducer_cff')
0075 process.VertexProducer.l1TracksInputTag = cms.InputTag("TTTracksFromTrackletEmulation", "Level1TTTracks")  
0076 
0077 
0078 producerSum += process.VertexProducer
0079 
0080 producerName = 'VertexProducer{0}'.format("fastHisto")
0081 producerName = producerName.replace(".","p") # legalize the name
0082 producer = process.VertexProducer.clone()
0083 producer.VertexReconstruction.Algorithm = cms.string("fastHisto")
0084 process.L1TrackerEtMiss.L1VertexInputTag = cms.InputTag(producerName,"l1vertices")
0085 
0086 
0087 setattr(process, producerName, producer)
0088 producerSum += producer
0089 producerSum += process.L1TrackerEtMiss
0090 
0091 process.L1TrackerEmuEtMiss.useGTTinput = GTTInput
0092 
0093 if GTTInput:
0094   process.L1TrackerEmuEtMiss.L1TrackInputTag = cms.InputTag("L1GTTInputProducer","Level1TTTracksConverted")
0095 else:
0096   process.L1TrackerEmuEtMiss.L1TrackInputTag = cms.InputTag("TTTracksFromTrackletEmulation", "Level1TTTracks")  
0097 
0098 EmuproducerName = 'VertexProducer{0}'.format("fastHistoEmulation")
0099 EmuproducerName = EmuproducerName.replace(".","p") # legalize the name
0100 Emuproducer = process.VertexProducer.clone()
0101 Emuproducer.VertexReconstruction.Algorithm = cms.string("fastHistoEmulation")
0102 process.L1TrackerEmuEtMiss.L1VertexInputTag = cms.InputTag(EmuproducerName,"l1verticesEmulation")
0103 
0104 if GTTInput:
0105   Emuproducer.l1TracksInputTag = cms.InputTag("L1GTTInputProducer","Level1TTTracksConverted")
0106 else:
0107   Emuproducer.l1TracksInputTag =  cms.InputTag("TTTracksFromTrackletEmulation", "Level1TTTracks")  
0108 
0109 setattr(process, EmuproducerName, Emuproducer)
0110 producerSum += Emuproducer
0111 producerSum += process.L1TrackerEmuEtMiss
0112   
0113 process.p = cms.Path(producerSum + process.L1TkMETAnalyser)