Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:30:42

0001 # Imports
0002 import FWCore.ParameterSet.Config as cms
0003 import os 
0004 
0005 # Create a new CMS process
0006 from Configuration.Eras.Era_Run2_2017_cff import Run2_2017
0007 process = cms.Process('assocTest',Run2_2017)
0008 
0009 # Import all the necessary files
0010 process.load('Configuration.StandardSequences.Services_cff')
0011 process.load('FWCore.MessageService.MessageLogger_cfi')
0012 
0013 ### "Run2"
0014 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0015 process.load('Configuration.StandardSequences.MagneticField_cff')
0016 
0017 process.load('Configuration.EventContent.EventContent_cff')
0018 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0019 process.load('Configuration.StandardSequences.RawToDigi_cff')
0020 process.load('Configuration.StandardSequences.L1Reco_cff')
0021 process.load('Configuration.StandardSequences.Reconstruction_cff')
0022 
0023 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0024 from Configuration.AlCa.GlobalTag import GlobalTag
0025 # (See /Configuration/AlCa/python/autoCond.py)
0026 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2017_realistic', '')
0027 # Process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0028 
0029 # Input source
0030 process.source = cms.Source('PoolSource',
0031   fileNames = cms.untracked.vstring(
0032 '/store/relval/CMSSW_9_4_0_pre1/RelValSingleMuPt100/GEN-SIM-DIGI-RAW/93X_mc2017_realistic_v3-v1/00000/409345CD-F79C-E711-8383-0CC47A4D76C8.root',
0033 '/store/relval/CMSSW_9_4_0_pre1/RelValSingleMuPt100/GEN-SIM-DIGI-RAW/93X_mc2017_realistic_v3-v1/00000/9C783844-F79C-E711-96E3-0CC47A4D76AA.root',
0034 '/store/relval/CMSSW_9_4_0_pre1/RelValSingleMuPt100/GEN-SIM-DIGI-RAW/93X_mc2017_realistic_v3-v1/00000/DC94E5C6-F79C-E711-B3EC-0CC47A4D7606.root'
0035 
0036 # '/store/relval/CMSSW_9_0_0/RelValSingleMuPt100_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/90X_mcRun2_asymptotic_v5-v1/00000/00C6B64E-4B0F-E711-B45F-0CC47A7C3410.root',
0037 # '/store/relval/CMSSW_9_0_0/RelValSingleMuPt100_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/90X_mcRun2_asymptotic_v5-v1/00000/52E12C5D-4A0F-E711-8ACE-0025905A6104.root' 
0038 
0039         #'file:/batch/handies/testFile.root'
0040         #'file:/tmp/emiglior/step3.root'
0041         #'file:'+os.environ.get('REMOTEDIR')+'/step3.root'
0042   )
0043 )
0044 
0045 # Output
0046 process.TFileService = cms.Service('TFileService',
0047     fileName = cms.string('file:Run2_Trk_rechits_validation.root')
0048 )
0049 
0050 process.mix.playback = True
0051 process.mix.digitizers = cms.PSet()
0052 for a in process.aliases: delattr(process, a)
0053 
0054 
0055 # RecHits are not persistent... re-create them on-the-fly
0056 process.load("RecoLocalTracker.SiPixelRecHits.SiPixelRecHits_cfi")
0057 
0058 # Insert this in path to see what products the event contains
0059 process.content = cms.EDAnalyzer("EventContentAnalyzer")
0060 
0061 # Analyzer
0062 process.testassociator = cms.EDAnalyzer("TestAssociator",
0063    siPixelRecHits = cms.InputTag("siPixelRecHits"),
0064    matchedRecHit = cms.InputTag("siStripMatchedRecHits", "matchedRecHit"),
0065    rphiRecHit = cms.InputTag("siStripMatchedRecHits", "rphiRecHit"),
0066    stereoRecHit = cms.InputTag("siStripMatchedRecHits", "stereoRecHit"),
0067    siPhase2RecHits = cms.InputTag("siPhase2RecHits"),
0068    ### for using track hit association
0069    #
0070    associateRecoTracks = cms.bool(False),
0071    associateHitbySimTrack = cms.bool(False),
0072    associatePixel = cms.bool(True),       
0073    associateStrip = cms.bool(True),
0074    usePhase2Tracker = cms.bool(False),
0075    pixelSimLinkSrc = cms.InputTag("simSiPixelDigis"),
0076    stripSimLinkSrc = cms.InputTag("simSiStripDigis"),
0077    phase2TrackerSimLinkSrc = cms.InputTag("simSiPixelDigis", "Tracker"),
0078    ROUList = cms.vstring('TrackerHitsPixelBarrelLowTof',
0079                          'TrackerHitsPixelBarrelHighTof',
0080                          'TrackerHitsPixelEndcapLowTof',
0081                          'TrackerHitsPixelEndcapHighTof',
0082                          'TrackerHitsTIBLowTof',
0083                          'TrackerHitsTIBHighTof',
0084                          'TrackerHitsTIDLowTof',
0085                          'TrackerHitsTIDHighTof',
0086                          'TrackerHitsTOBLowTof',
0087                          'TrackerHitsTOBHighTof',
0088                          'TrackerHitsTECLowTof',
0089                          'TrackerHitsTECHighTof')
0090 )
0091 
0092 # To enable debugging:
0093 # [scram b clean ;] scram b USER_CXXFLAGS="-DEDM_ML_DEBUG"
0094 
0095 # process.load("SimTracker.TrackerHitAssociation.test.messageLoggerDebug_cff")
0096 
0097 process.MessageLogger.cerr.FwkReport.reportEvery = 1
0098 
0099 # Number of events (-1 = all)
0100 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )
0101 
0102 # Processes to run
0103 
0104 process.raw2digi_step = cms.Path(process.RawToDigi)
0105 process.L1Reco_step = cms.Path(process.L1Reco)
0106 process.reconstruction_step = cms.Path(process.reconstruction)
0107 
0108 # process.validation_step = cms.Path(process.content*process.testassociator)
0109 process.validation_step = cms.Path(process.testassociator)
0110 
0111 process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step,process.reconstruction_step,process.validation_step)