Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-27 04:18:05

0001 # -*- coding: utf-8 -*-
0002 import FWCore.ParameterSet.Config as cms
0003 process = cms.Process("L1TMuonEmulation")
0004 import os
0005 import sys
0006 
0007 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0008 
0009 process.MessageLogger = cms.Service("MessageLogger",
0010         # suppressInfo       = cms.untracked.vstring('AfterSource', 'PostModule'),
0011         destinations=cms.untracked.vstring(
0012                                                # 'detailedInfo',
0013                                                # 'critical',
0014                                                #'cout',
0015                                                #'cerr',
0016                                                 'omtfEventPrint'
0017                     ),
0018         categories=cms.untracked.vstring('l1tOmtfEventPrint', 'OMTFReconstruction'), #, 'FwkReport'
0019         # cout=cms.untracked.PSet(
0020         #                  threshold=cms.untracked.string('INFO'),
0021         #                  default=cms.untracked.PSet(limit=cms.untracked.int32(0)),
0022         #                  # INFO   =  cms.untracked.int32(0),
0023         #                  # DEBUG   = cms.untracked.int32(0),
0024         #                  l1tOmtfEventPrint=cms.untracked.PSet(limit=cms.untracked.int32(1000000000)),
0025         #                  OMTFReconstruction=cms.untracked.PSet(limit=cms.untracked.int32(1000000000)),
0026         #                  #FwkReport=cms.untracked.PSet(reportEvery = cms.untracked.int32(50) ),
0027         #                ), 
0028         
0029         omtfEventPrint = cms.untracked.PSet(    
0030                          filename  = cms.untracked.string('log_MuonOverlap_run2_data'),
0031                          extension = cms.untracked.string('.txt'),                
0032                          threshold = cms.untracked.string('INFO'),
0033                          default = cms.untracked.PSet( limit = cms.untracked.int32(0) ), 
0034                          #INFO   =  cms.untracked.int32(0),
0035                          #DEBUG   = cms.untracked.int32(0),
0036                          l1tOmtfEventPrint = cms.untracked.PSet( limit = cms.untracked.int32(1000000000) ),
0037                          OMTFReconstruction = cms.untracked.PSet( limit = cms.untracked.int32(1000000000) )
0038                        ),
0039        debugModules=cms.untracked.vstring('simOmtfDigis') 
0040        # debugModules = cms.untracked.vstring('*')
0041     )
0042 
0043 #process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(50)
0044 process.options = cms.untracked.PSet(wantSummary=cms.untracked.bool(False),
0045                                          # SkipEvent = cms.untracked.vstring('ProductNotFound') 
0046                                      )
0047 
0048 process.source = cms.Source('PoolSource',
0049  #fileNames = cms.untracked.vstring('file:/afs/cern.ch/work/g/gflouris/public/SingleMuPt6180_noanti_10k_eta1.root')
0050  #fileNames = cms.untracked.vstring('file:///afs/cern.ch/work/k/kbunkow/private/omtf_data/SingleMu_15_p_1_1_qtl.root')    
0051  #fileNames = cms.untracked.vstring('file:///eos/user/k/kbunkow/cms_data/mc/PhaseIIFall17D/SingleMu_PU200_32DF01CC-A342-E811-9FE7-48D539F3863E_dump500Events.root')
0052 # fileNames = cms.untracked.vstring("file:///eos/user/k/kbunkow/cms_data/mc/PhaseIITDRSpring19DR/PhaseIITDRSpring19DR_Mu_FlatPt2to100_noPU_v31_E0D5C6A5-B855-D14F-9124-0B2C9B28D0EA_dump4000Ev.root")
0053  fileNames = cms.untracked.vstring(
0054      #'/store/express/Commissioning2021/ExpressCosmics/FEVT/Express-v1/000/342/094/00000/038c179a-d2ce-45f0-a7d5-8b2d40017042.root',
0055      #'/store/express/Commissioning2021/ExpressCosmics/FEVT/Express-v1/000/344/566/00000/19ef107a-4cd9-4df0-ba93-dbfbab8df1cb.root'
0056      'file:///eos/user/k/kbunkow/cms_data/run2_data/Run2018D_ZeroBias_Run_325117_8BAB433D-F822-A64A-BB22-25E18AD5442F_allEv.root'
0057      ),                    
0058  )
0059                         
0060 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1))
0061 
0062 # import of standard configurations
0063 process.load('Configuration.StandardSequences.Services_cff')
0064 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0065 process.load('Configuration.Geometry.GeometryExtended2017Reco_cff')
0066 process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
0067 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0068 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0069 
0070 #process.load('Configuration.StandardSequences.RawToDigi_Data_cff')
0071 #process.load('EventFilter.L1TRawToDigi.omtfStage2Digis_cfi') #unpacker
0072 
0073 #process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0074 from Configuration.AlCa.GlobalTag import GlobalTag
0075 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data', '')
0076 #process.GlobalTag = GlobalTag(process.GlobalTag, '113X_dataRun3_Prompt_v3', '')
0077 #process.GlobalTag = GlobalTag(process.GlobalTag, '102X_upgrade2018_realistic_v16', '')
0078  
0079 
0080 
0081 ####Event Setup Producer
0082 #process.load('L1Trigger.L1TMuonOverlapPhase1.fakeOmtfParams_cff')
0083 #process.omtfParams.configXMLFile =  cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/hwToLogicLayer_0x0006.xml")
0084 
0085 process.esProd = cms.EDAnalyzer("EventSetupRecordDataGetter",
0086    toGet = cms.VPSet(
0087       cms.PSet(record = cms.string('L1TMuonOverlapParamsRcd'),
0088                data = cms.vstring('L1TMuonOverlapParams'))
0089                    ),
0090    verbose = cms.untracked.bool(False)
0091 )
0092 
0093 #process.TFileService = cms.Service("TFileService", fileName = cms.string('omtfAnalysis1.root'), closeFileFast = cms.untracked.bool(True) )
0094                         
0095                         
0096 process.load('Configuration.StandardSequences.RawToDigi_Data_cff')
0097 process.load('EventFilter.L1TRawToDigi.omtfStage2Digis_cfi') #unpacker
0098 
0099         
0100 ####OMTF Emulator
0101 process.load('L1Trigger.L1TMuonOverlapPhase1.simOmtfDigis_cfi')
0102 
0103 process.simOmtfDigis.srcDTPh = cms.InputTag('omtfStage2Digis')
0104 process.simOmtfDigis.srcDTTh = cms.InputTag('omtfStage2Digis')
0105 process.simOmtfDigis.srcCSC = cms.InputTag('omtfStage2Digis')
0106 process.simOmtfDigis.srcRPC = cms.InputTag('omtfStage2Digis')
0107 
0108 process.simOmtfDigis.bxMin = cms.int32(0)
0109 process.simOmtfDigis.bxMax = cms.int32(0)
0110 
0111 process.simOmtfDigis.dumpResultToXML = cms.bool(False)
0112 process.simOmtfDigis.dumpResultToROOT = cms.bool(False)
0113 process.simOmtfDigis.eventCaptureDebug = cms.bool(True)
0114 
0115 
0116 #!!!!!!!!!!!!!!!!!!!!! all possible algorithm configuration parameters, if it is commented, then a defoult value is used
0117 #below is the configuration used for runnig from the autumn of the 2018
0118 
0119 #process.simOmtfDigis.sorterType = cms.string("byLLH")
0120 # process.simOmtfDigis.ghostBusterType = cms.string("GhostBusterPreferRefDt")
0121 #
0122 # process.simOmtfDigis.minDtPhiQuality = cms.int32(2)
0123 # process.simOmtfDigis.minDtPhiBQuality = cms.int32(2)
0124 #
0125 # process.simOmtfDigis.rpcMaxClusterSize = cms.int32(3)
0126 # process.simOmtfDigis.rpcMaxClusterCnt = cms.int32(2)
0127 # process.simOmtfDigis.rpcDropAllClustersIfMoreThanMax = cms.bool(False)
0128 #
0129 # process.simOmtfDigis.goldenPatternResultFinalizeFunction = cms.int32(0) #valid values are 0, 1, 2, 3, 5, 6, but for other then 0 the candidates quality assignemnt must be updated
0130 #
0131 # process.simOmtfDigis.noHitValueInPdf = cms.bool(False)
0132 
0133 process.simOmtfDigis.lctCentralBx = cms.int32(8);#<<<<<<<<<<<<<<<<!!!!!!!!!!!!!!!!!!!!TODO this was changed in CMSSW 10(?) to 8. if the data were generated with the previous CMSSW then you have to use 6
0134 
0135 
0136 
0137 
0138 process.dumpED = cms.EDAnalyzer("EventContentAnalyzer")
0139 process.dumpES = cms.EDAnalyzer("PrintEventSetupContent")
0140 
0141 process.L1TMuonSeq = cms.Sequence(  process.esProd    +      
0142                                     process.omtfStage2Digis + process.simOmtfDigis 
0143                                    #+ process.dumpED
0144                                    #+ process.dumpES
0145 )
0146 
0147 process.L1TMuonPath = cms.Path(process.L1TMuonSeq)
0148 
0149 process.out = cms.OutputModule("PoolOutputModule", 
0150    fileName = cms.untracked.string("l1tomtf_superprimitives1.root")
0151 )
0152 
0153 #process.output_step = cms.EndPath(process.out)
0154 #process.schedule = cms.Schedule(process.L1TMuonPath)
0155 #process.schedule.extend([process.output_step])