Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:05

0001 import FWCore.ParameterSet.Config as cms
0002 process = cms.Process("OMTFEmulation")
0003 import os
0004 import sys
0005 
0006 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0007 
0008 process.options = cms.untracked.PSet(wantSummary = cms.untracked.bool(True))
0009 
0010 process.source = cms.Source(
0011     'PoolSource',
0012     fileNames = cms.untracked.vstring('file:/home/akalinow/scratch/CMS/OverlapTrackFinder/Crab/SingleMuFullEtaTestSample/720_FullEta_v1/data/SingleMu_16_p_1_2_TWz.root')
0013     )
0014 
0015 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1))
0016 
0017 ###PostLS1 geometry used
0018 process.load('Configuration.Geometry.GeometryExtended2015_cff')
0019 process.load('Configuration.Geometry.GeometryExtended2015Reco_cff')
0020 ############################
0021 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0022 from Configuration.AlCa.GlobalTag import GlobalTag
0023 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0024 
0025 path = "/home/akalinow/scratch/CMS/OverlapTrackFinder/Emulator/job_3_pat/8_0_9_20_06_2016/"
0026 
0027 # Strip XML files from heading and trailing OMTF tags
0028 sedCommand = "sed '/OMTF/d' "
0029 command = "echo \<OMTF version=\\\"0x0004\\\"\> > mergedPatterns.xml"
0030 os.system(command)
0031 for ipt in xrange(4,32):
0032 
0033     fileName = path+"SingleMu_"+str(ipt)+"_p/GPs.xml"
0034     outputFileName = path+"SingleMu_"+str(ipt)+"_p/GPs_stripped.xml"
0035     command = sedCommand+fileName+" > "+outputFileName
0036     os.system(command)
0037 
0038     command = "cat "+outputFileName+" >> mergedPatterns.xml"
0039     os.system(command)
0040     
0041     fileName = path+"SingleMu_"+str(ipt)+"_m/GPs.xml"
0042     outputFileName = path+"SingleMu_"+str(ipt)+"_m/GPs_stripped.xml"
0043     command = sedCommand+fileName+" > "+outputFileName
0044     os.system(command)
0045 
0046     command = "cat "+outputFileName+" >> mergedPatterns.xml"
0047     os.system(command)
0048 
0049 command = "echo \<\\/OMTF\> >> mergedPatterns.xml"
0050 os.system(command)
0051 
0052 process.load('L1Trigger.L1TMuonOverlap.fakeOmtfParams_cff')
0053 
0054 process.omtfParams.patternsXMLFiles = cms.VPSet(
0055         cms.PSet(patternsXMLFile = cms.FileInPath("L1Trigger/L1TMuonOverlap/test/expert/mergedPatterns.xml")),
0056 )
0057             
0058 ###OMTF pattern maker configuration
0059 process.omtfPatternMaker = cms.EDAnalyzer("OMTFPatternMaker",
0060                                           srcDTPh = cms.InputTag('simDtTriggerPrimitiveDigis'),
0061                                           srcDTTh = cms.InputTag('simDtTriggerPrimitiveDigis'),
0062                                           srcCSC = cms.InputTag('simCscTriggerPrimitiveDigis','MPCSORTED'),
0063                                           srcRPC = cms.InputTag('simMuonRPCDigis'),                                              
0064                                           g4SimTrackSrc = cms.InputTag('g4SimHits'),
0065                                           makeGoldenPatterns = cms.bool(False),
0066                                           mergeXMLFiles = cms.bool(True),
0067                                           makeConnectionsMaps = cms.bool(False),                                      
0068                                           dropRPCPrimitives = cms.bool(False),                                    
0069                                           dropDTPrimitives = cms.bool(False),                                    
0070                                           dropCSCPrimitives = cms.bool(False),   
0071                                           ptCode = cms.int32(25),#this is old PAC pt scale.
0072                                           charge = cms.int32(1),
0073                                           )
0074 
0075 process.p = cms.Path(process.omtfPatternMaker)