Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 process = cms.Process("OMTFEmulation")
0003 import os
0004 import sys
0005 #import subprocess
0006 
0007 verbose = False
0008 
0009 process.load("FWCore.MessageLogger.MessageLogger_cfi")
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                     ),
0019        categories = cms.untracked.vstring(
0020                                         'CondDBESSource'
0021                                         ,'EventSetupDependency'
0022                                         ,'Geometry'
0023                                         ,'MuonGeom'
0024                                         ,'GetManyWithoutRegistration'
0025                                         ,'GetByLabelWithoutRegistration'
0026                                         ,'Alignment'
0027                                         ,'SiStripBackPlaneCorrectionDepESProducer'
0028                                         ,'SiStripLorentzAngleDepESProducer'
0029                                         ,'SiStripQualityESProducer'
0030                                         ,'TRACKER'
0031                                         ,'HCAL'
0032         ),
0033        critical       = cms.untracked.PSet(
0034                         threshold = cms.untracked.string('ERROR') 
0035         ),
0036        detailedInfo   = cms.untracked.PSet(
0037                       threshold  = cms.untracked.string('INFO'), 
0038                       CondDBESSource  = cms.untracked.PSet (limit = cms.untracked.int32(0) ), 
0039                       EventSetupDependency  = cms.untracked.PSet (limit = cms.untracked.int32(0) ), 
0040                       Geometry  = cms.untracked.PSet (limit = cms.untracked.int32(0) ), 
0041                       MuonGeom  = cms.untracked.PSet (limit = cms.untracked.int32(0) ), 
0042                       Alignment  = cms.untracked.PSet (limit = cms.untracked.int32(0) ), 
0043                       GetManyWithoutRegistration  = cms.untracked.PSet (limit = cms.untracked.int32(0) ), 
0044                       GetByLabelWithoutRegistration  = cms.untracked.PSet (limit = cms.untracked.int32(0) ) 
0045 
0046        ),
0047        cout   = cms.untracked.PSet(
0048                 threshold  = cms.untracked.string('INFO'), 
0049                 CondDBESSource  = cms.untracked.PSet (limit = cms.untracked.int32(0) ), 
0050                 EventSetupDependency  = cms.untracked.PSet (limit = cms.untracked.int32(0) ), 
0051                 Geometry  = cms.untracked.PSet (limit = cms.untracked.int32(0) ), 
0052                 MuonGeom  = cms.untracked.PSet (limit = cms.untracked.int32(0) ), 
0053                 Alignment  = cms.untracked.PSet (limit = cms.untracked.int32(0) ), 
0054                 GetManyWithoutRegistration  = cms.untracked.PSet (limit = cms.untracked.int32(0) ), 
0055                 GetByLabelWithoutRegistration  = cms.untracked.PSet (limit = cms.untracked.int32(0) ) 
0056                 ),
0057                                         )
0058 
0059 if not verbose:
0060     process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(50000)
0061 process.options = cms.untracked.PSet(wantSummary = cms.untracked.bool(True))
0062 
0063 process.source = cms.Source(
0064     'PoolSource',
0065     #fileNames = cms.untracked.vstring('file:///afs/cern.ch/work/a/akalinow/CMS/OverlapTrackFinder/data/Crab/SingleMuFullEtaTestSample/720_FullEta_v1/data/SingleMu_16_p_1_2_TWz.root')
0066     fileNames = cms.untracked.vstring('file:///home/akalinow/scratch/CMS/OverlapTrackFinder/Crab/SingleMuFullEta/721_FullEta_v4/data/SingleMu_25_p_133_2_QJ1.root')
0067    
0068 )
0069 '''
0070 ##Use all available events in a single job.
0071 ##Only for making the connections maps.
0072 process.source.fileNames =  cms.untracked.vstring()
0073 path = "/home/akalinow/scratch/CMS/OverlapTrackFinder/Crab/SingleMuFullEta/721_FullEta_v4/data/"
0074 command = "ls "+path+"/SingleMu_10_?_*"
0075 fileList = subprocess.getoutput(command).split("\n")
0076 process.source.fileNames =  cms.untracked.vstring()
0077 for aFile in fileList:
0078     process.source.fileNames.append('file:'+aFile)
0079 '''
0080 
0081 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1000000))
0082 
0083 ###TEST
0084 '''
0085 process.source = cms.Source(
0086     'PoolSource',
0087     fileNames = cms.untracked.vstring('file:/home/akalinow/scratch/CMS/OverlapTrackFinder/Crab/SingleMuFullEtaTestSample/720_FullEta_v1/data/SingleMu_16_p_1_2_TWz.root'),
0088     #fileNames = cms.untracked.vstring('file:/home/akalinow/scratch/CMS/OverlapTrackFinder/Crab/JPsi_21kEvents.root')
0089     #eventsToProcess = cms.untracked.VEventRange('16:8')
0090     )
0091 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1000))
0092 '''
0093 #######
0094 
0095 ###PostLS1 geometry used
0096 process.load('Configuration.Geometry.GeometryExtended2015_cff')
0097 process.load('Configuration.Geometry.GeometryExtended2015Reco_cff')
0098 ############################
0099 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0100 from Configuration.AlCa.GlobalTag import GlobalTag
0101 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0102 
0103 ####Event Setup Producer
0104 process.load('L1Trigger.L1TMuonOverlap.fakeOmtfParams_cff')
0105 process.esProd = cms.EDAnalyzer("EventSetupRecordDataGetter",
0106    toGet = cms.VPSet(
0107       cms.PSet(record = cms.string('L1TMuonOverlapParamsRcd'),
0108                data = cms.vstring('L1TMuonOverlapParams'))
0109                    ),
0110    verbose = cms.untracked.bool(True)
0111 )
0112 
0113 ###OMTF pattern maker configuration
0114 process.omtfPatternMaker = cms.EDAnalyzer("OMTFPatternMaker",
0115                                           srcDTPh = cms.InputTag('simDtTriggerPrimitiveDigis'),
0116                                           srcDTTh = cms.InputTag('simDtTriggerPrimitiveDigis'),
0117                                           srcCSC = cms.InputTag('simCscTriggerPrimitiveDigis','MPCSORTED'),
0118                                           srcRPC = cms.InputTag('simMuonRPCDigis'),                                              
0119                                           g4SimTrackSrc = cms.InputTag('g4SimHits'),
0120                                           makeGoldenPatterns = cms.bool(True),
0121                                           mergeXMLFiles = cms.bool(False),
0122                                           makeConnectionsMaps = cms.bool(False),                                      
0123                                           dropRPCPrimitives = cms.bool(False),                                    
0124                                           dropDTPrimitives = cms.bool(False),                                    
0125                                           dropCSCPrimitives = cms.bool(False),   
0126                                           ptCode = cms.int32(25),#this is old PAC pt scale.
0127                                           charge = cms.int32(1),
0128                                           omtf = cms.PSet(
0129                                               configFromXML = cms.bool(False),   
0130                                               patternsXMLFiles = cms.VPSet(                                       
0131                                                   cms.PSet(patternsXMLFile = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/Patterns_0x00020007.xml")),
0132                                               ),
0133                                               configXMLFile = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/hwToLogicLayer_0x00020005.xml"),
0134                                           )
0135 )
0136 
0137 ###Gen level filter configuration
0138 process.MuonEtaFilter = cms.EDFilter("SimTrackEtaFilter",
0139                                 minNumber = cms.uint32(1),
0140                                 src = cms.InputTag("g4SimHits"),
0141                                 cut = cms.string("momentum.eta<1.24 && momentum.eta>0.83 &&  momentum.pt>1")
0142                                 )
0143 
0144 process.L1TMuonSeq = cms.Sequence(process.MuonEtaFilter*process.esProd*process.omtfPatternMaker)
0145 
0146 process.L1TMuonPath = cms.Path(process.L1TMuonSeq)
0147 
0148 process.schedule = cms.Schedule(process.L1TMuonPath)