Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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 verbose = True
0010 
0011 if verbose: 
0012     process.MessageLogger = cms.Service("MessageLogger",
0013        #suppressInfo       = cms.untracked.vstring('AfterSource', 'PostModule'),
0014        destinations   = cms.untracked.vstring(
0015                                                #'detailedInfo',
0016                                                #'critical',
0017                                                #'cout',
0018                                                #'cerr',
0019                                                'omtfEventPrint'
0020                     ),
0021        categories        = cms.untracked.vstring('l1tOmtfEventPrint', 'OMTFReconstruction'),
0022        omtfEventPrint = cms.untracked.PSet(    
0023                          filename  = cms.untracked.string('log_MuonOverlap_run3_mc'),
0024                          extension = cms.untracked.string('.txt'),                
0025                          threshold = cms.untracked.string('DEBUG'),
0026                          default = cms.untracked.PSet( limit = cms.untracked.int32(0) ), 
0027                          #INFO   =  cms.untracked.int32(0),
0028                          #DEBUG   = cms.untracked.int32(0),
0029                          l1tOmtfEventPrint = cms.untracked.PSet( limit = cms.untracked.int32(1000000000) ),
0030                          OMTFReconstruction = cms.untracked.PSet( limit = cms.untracked.int32(1000000000) )
0031                        ),
0032        debugModules = cms.untracked.vstring('L1MuonAnalyzerOmtf', 'simOmtfDigis') 
0033        #debugModules = cms.untracked.vstring('*')
0034     )
0035 
0036     #process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(100)
0037 if not verbose:
0038     process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(1000)
0039     process.options = cms.untracked.PSet(wantSummary = cms.untracked.bool(False), 
0040                                          #SkipEvent = cms.untracked.vstring('ProductNotFound') 
0041                                      )
0042     
0043     
0044 # PostLS1 geometry used
0045 process.load('Configuration.Geometry.GeometryExtended2015Reco_cff')
0046 process.load('Configuration.Geometry.GeometryExtended2015_cff')
0047 ############################
0048 #process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff')
0049 #from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag
0050 #process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')    
0051     
0052     
0053 # import of standard configurations
0054 process.load('Configuration.StandardSequences.Services_cff')
0055 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0056 process.load('Configuration.EventContent.EventContent_cff')
0057 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0058 #process.load('Configuration.Geometry.GeometryExtended2023D41Reco_cff')
0059 #process.load('Configuration.Geometry.GeometryExtended2023D41_cff')
0060 process.load('Configuration.StandardSequences.MagneticField_cff')
0061 #process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0062 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0063 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0064 
0065 from Configuration.AlCa.GlobalTag import GlobalTag
0066 #process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:upgradePLS3', '')
0067 process.GlobalTag = GlobalTag(process.GlobalTag, '103X_upgrade2023_realistic_v2', '') 
0068 
0069 
0070 process.source = cms.Source('PoolSource',
0071  #fileNames = cms.untracked.vstring('file:/afs/cern.ch/work/g/gflouris/public/SingleMuPt6180_noanti_10k_eta1.root')
0072  #fileNames = cms.untracked.vstring('file:///afs/cern.ch/work/k/kbunkow/private/omtf_data/SingleMu_15_p_1_1_qtl.root')
0073  #fileNames = cms.untracked.vstring('file:///afs/cern.ch/work/k/kbunkow/private/omtf_data/SingleMu_20_p_100_2_B7Z.root')
0074  #fileNames = cms.untracked.vstring('file:///afs/cern.ch/work/k/kbunkow/private/omtf_data/SingleMu_5_p_1_1_Meh.root')
0075  #fileNames = cms.untracked.vstring('file:///afs/cern.ch/work/k/kbunkow/private/omtf_data/SingleMu_7_p_1_1_DkC.root')
0076  #fileNames = cms.untracked.vstring('file:///afs/cern.ch/work/k/kbunkow/private/omtf_data/SingleMu_18_p_1_1_2KD.root')
0077  #fileNames = cms.untracked.vstring('file:///afs/cern.ch/work/k/kbunkow/public/CMSSW/cmssw_10_x_x_l1tOfflinePhase2/CMSSW_10_6_0_pre4/src/L1Trigger/L1TMuonBayes/test/expert/DisplacedMuonGun_Pt30To100_Dxy_0_1000_E68C6334-7F62-E911-8AA5-0025905B8610_dump2000Ev.root')
0078  
0079  #fileNames = cms.untracked.vstring('file:///eos/user/k/kbunkow/cms_data/SingleMuFullEta/721_FullEta_v4/SingleMu_31_p_101_2_DzU.root')
0080  #fileNames = cms.untracked.vstring('file:///eos/user/a/akalinow/Data/SingleMu/9_3_14_FullEta_v2/SingleMu_6_p_1.root'),
0081  #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"),
0082  fileNames = cms.untracked.vstring("file:///eos/user/k/kbunkow/cms_data/mc/PhaseIITDRSpring19DR/JPsiToMuMu_Pt0to100_NoPU_FDA71CB6-4C3B-4540-99EB-803077C6EC2D_dump4000Ev.root",
0083                                    "file:///eos/user/k/kbunkow/cms_data/mc/PhaseIITDRSpring19DR/PhaseIITDRSpring19DR_Mu_FlatPt2to100_noPU_v31_E0D5C6A5-B855-D14F-9124-0B2C9B28D0EA_dump4000Ev.root"
0084                                    ),
0085  #fileNames = cms.untracked.vstring("file:///eos/user/k/kbunkow/cms_data/mc/PhaseIITDRSpring19DR/HSCPppstau_M_871_PU200_v3-v2_1ADE9D9E-8C0C-1948-A405-5DFDA1AF5172_dump100Ev.root"),
0086  #fileNames = cms.untracked.vstring("file:///eos/user/k/kbunkow/cms_data/mc/PhaseIIFall17D/SingleMu_PU200_32DF01CC-A342-E811-9FE7-48D539F3863E_dump500Events.root"),
0087  #fileNames = cms.untracked.vstring("file:///eos/user/k/kbunkow/cms_data/mc/PhaseIITDRSpring19DR/Nu_E10-pythia8-gun_PU250_v3_ext2-v1_FFE07316-3810-6E44-97A1-5753A3070D12_dump100Ev.root"),
0088  #fileNames = cms.untracked.vstring("file:///afs/cern.ch/work/k/kbunkow/public/CMSSW/cmssw_10_x_x_l1tOfflinePhase2/CMSSW_10_6_1_patch2/src/L1Trigger/L1TMuonBayes/test/expert/Nu_E10-pythia8-gun_PU250_v3_ext2-v1_FFE07316-3810-6E44-97A1-5753A3070D12_dump100Ev.root"),
0089 
0090  
0091  
0092  
0093  #fileNames = cms.untracked.vstring('file:///eos/home-k/konec/FFCFF986-ED0B-B74F-B253-C511D19B8249.root'),
0094  #fileNames = cms.untracked.vstring('file:///afs/cern.ch/user/k/konec/work/CMSSW_10_6_1_patch2.displaced/src/UserCode/OmtfAnalysis/jobs/FFCFF986-ED0B-B74F-B253-C511D19B8249.root'),
0095  
0096  
0097         inputCommands=cms.untracked.vstring(
0098         'keep *',
0099         'drop l1tEMTFHit2016Extras_simEmtfDigis_CSC_HLT',
0100         'drop l1tEMTFHit2016Extras_simEmtfDigis_RPC_HLT',
0101         'drop l1tEMTFHit2016s_simEmtfDigis__HLT',
0102         'drop l1tEMTFTrack2016Extras_simEmtfDigis__HLT',
0103         'drop l1tEMTFTrack2016s_simEmtfDigis__HLT')
0104 )
0105                         
0106 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1))
0107 
0108 
0109 ####Event Setup Producer
0110 process.load('L1Trigger.L1TMuonOverlapPhase1.fakeOmtfParams_cff')
0111 process.omtfParams.configXMLFile = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/hwToLogicLayer_0x0008.xml")
0112 # process.omtfParams.patternsXMLFiles = cms.VPSet(
0113 #         cms.PSet(patternsXMLFile = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/Patterns_0x00012_oldSample_3_30Files_grouped1_classProb17_recalib2.xml")),
0114 #         #cms.PSet(patternsXMLFile = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/Patterns_0x0009_oldSample_3_10Files_classProb1.xml") ),
0115 #     ),
0116 
0117 # reding config and patterns from the DB
0118 process.esProd = cms.EDAnalyzer("EventSetupRecordDataGetter",
0119    toGet = cms.VPSet(
0120       cms.PSet(record = cms.string('L1TMuonOverlapParamsRcd'),
0121                data = cms.vstring('L1TMuonOverlapParams'))
0122                    ),
0123    verbose = cms.untracked.bool(False)
0124 )
0125 
0126                                    
0127 ####OMTF Emulator
0128 process.load('L1Trigger.L1TMuonOverlapPhase1.simOmtfDigis_cfi')
0129 
0130 process.simOmtfDigis.bxMin = cms.int32(0)
0131 process.simOmtfDigis.bxMax = cms.int32(0)
0132 
0133 process.simOmtfDigis.dumpResultToXML = cms.bool(True)
0134 process.simOmtfDigis.dumpResultToROOT = cms.bool(False)
0135 process.simOmtfDigis.eventCaptureDebug = cms.bool(True)
0136 
0137 #process.simOmtfDigis.patternsXMLFile = cms.FileInPath("L1Trigger/L1TMuonBayes/test/expert/omtf/Patterns_0x0009_oldSample_3_10Files.xml")
0138 #process.simOmtfDigis.patternsXMLFile = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/Patterns_0x0009_oldSample_3_10Files.xml")
0139 #process.simOmtfDigis.patternsXMLFile = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/Patterns_0x0003.xml")
0140 #process.simOmtfDigis.patternsXMLFiles = cms.VPSet(cms.PSet(patternsXMLFile = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/GPs_parametrised_plus_v1.xml")),
0141 #                                                       cms.PSet(patternsXMLFile = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/GPs_parametrised_minus_v1.xml"))
0142 #)
0143 #process.simOmtfDigis.patternsXMLFile = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/Patterns_0x00012_oldSample_3_30Files_grouped1_classProb1_recalib.xml")
0144 #process.simOmtfDigis.patternsXMLFile = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/Patterns_0x00012_oldSample_3_30Files_grouped1_classProb17_recalib2.xml")
0145 
0146 process.simOmtfDigis.sorterType = cms.string("byLLH")
0147 
0148 process.simOmtfDigis.rpcMaxClusterSize = cms.int32(3)
0149 process.simOmtfDigis.rpcMaxClusterCnt = cms.int32(2)
0150 process.simOmtfDigis.rpcDropAllClustersIfMoreThanMax = cms.bool(True)
0151 
0152 process.simOmtfDigis.goldenPatternResultFinalizeFunction = cms.int32(9) #valid values are 0, 1, 2, 3, 5
0153 
0154 process.simOmtfDigis.noHitValueInPdf = cms.bool(True) #!!!!!!!!!!!!!! cab be true only of the patterns has the noHitValues in the bin 0 of the PDFs
0155 
0156 process.simOmtfDigis.minDtPhiQuality = cms.int32(2)
0157 process.simOmtfDigis.minDtPhiBQuality = cms.int32(2)
0158 
0159 
0160 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
0161 
0162 #process.simOmtfDigis.rpcSimHitsInputTag = cms.InputTag("g4SimHits", "MuonRPCHits")
0163 
0164 #process.dumpED = cms.EDAnalyzer("EventContentAnalyzer")
0165 #process.dumpES = cms.EDAnalyzer("PrintEventSetupContent")
0166 
0167 
0168 process.L1TMuonSeq = cms.Sequence( #process.esProd  +    
0169                                    process.simOmtfDigis 
0170                                    #+ process.dumpED
0171                                    #+ process.dumpES
0172 )
0173 
0174 process.L1TMuonPath = cms.Path(process.L1TMuonSeq)
0175 
0176 #process.load("L1Trigger.TrackFindingTracklet.L1TrackletTracks_cff")
0177 #process.TTTracks = cms.Path(process.L1TrackletTracks)
0178 #process.TTTracksWithTruth = cms.Path(process.L1TrackletTracksWithAssociators)
0179 
0180 process.schedule = cms.Schedule(process.L1TMuonPath)
0181 
0182 #process.out = cms.OutputModule("PoolOutputModule", 
0183 #   fileName = cms.untracked.string("l1tomtf_superprimitives1.root")
0184 #)
0185 
0186 #process.output_step = cms.EndPath(process.out)
0187 #process.schedule = cms.Schedule(process.L1TMuonPath)
0188 #process.schedule.extend([process.output_step])