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_Phase2_cff import Phase2
0007 process = cms.Process('assocTest',Phase2)
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 
0016 ### uncomment next fragment for "D17" 
0017 process.load('Configuration.Geometry.GeometryExtended2023D17Reco_cff')
0018 # temporary: use fake conditions for LA 
0019 process.load('SLHCUpgradeSimulations.Geometry.fakeConditions_phase2TkTilted4025_cff')
0020 ### end of "D17"
0021 
0022 process.load('Configuration.StandardSequences.MagneticField_cff')
0023 
0024 process.load('Configuration.EventContent.EventContent_cff')
0025 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0026 process.load('Configuration.StandardSequences.RawToDigi_cff')
0027 process.load('Configuration.StandardSequences.L1Reco_cff')
0028 process.load('Configuration.StandardSequences.Reconstruction_cff')
0029 
0030 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0031 from Configuration.AlCa.GlobalTag import GlobalTag
0032 # (See /Configuration/AlCa/python/autoCond.py)
0033 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '')
0034 
0035 # Input source
0036 process.source = cms.Source("PoolSource",
0037     fileNames = cms.untracked.vstring(
0038 '/store/relval/CMSSW_9_3_0/RelValSingleMuPt100Extended/GEN-SIM-RECO/93X_upgrade2023_realistic_v2_2023D17noPU-v1/00000/1C1AFFEE-429B-E711-9127-0CC47A7C345E.root',
0039 '/store/relval/CMSSW_9_3_0/RelValSingleMuPt100Extended/GEN-SIM-RECO/93X_upgrade2023_realistic_v2_2023D17noPU-v1/00000/362A31F1-3E9B-E711-8BCB-0025905B8598.root',
0040 '/store/relval/CMSSW_9_3_0/RelValSingleMuPt100Extended/GEN-SIM-RECO/93X_upgrade2023_realistic_v2_2023D17noPU-v1/00000/3C136CC9-4B9B-E711-A423-0025905AA9F0.root',
0041 '/store/relval/CMSSW_9_3_0/RelValSingleMuPt100Extended/GEN-SIM-RECO/93X_upgrade2023_realistic_v2_2023D17noPU-v1/00000/8E16441D-489B-E711-B6A7-0025905B8576.root',
0042 '/store/relval/CMSSW_9_3_0/RelValSingleMuPt100Extended/GEN-SIM-RECO/93X_upgrade2023_realistic_v2_2023D17noPU-v1/00000/A81F36AA-469B-E711-B45A-0CC47A4C8ECA.root'
0043     )
0044 #     , secondaryFileNames = cms.untracked.vstring(
0045 # '/store/relval/CMSSW_9_3_0/RelValSingleMuPt100Extended/GEN-SIM-DIGI-RAW/93X_upgrade2023_realistic_v2_2023D17noPU-v1/00000/14F04A4A-3C9B-E711-9509-0CC47A4D764A.root',
0046 # '/store/relval/CMSSW_9_3_0/RelValSingleMuPt100Extended/GEN-SIM-DIGI-RAW/93X_upgrade2023_realistic_v2_2023D17noPU-v1/00000/18A33AC5-389B-E711-A7EA-0025905A60CE.root',
0047 # '/store/relval/CMSSW_9_3_0/RelValSingleMuPt100Extended/GEN-SIM-DIGI-RAW/93X_upgrade2023_realistic_v2_2023D17noPU-v1/00000/5C456E4D-3C9B-E711-8E08-0025905B8594.root',
0048 # '/store/relval/CMSSW_9_3_0/RelValSingleMuPt100Extended/GEN-SIM-DIGI-RAW/93X_upgrade2023_realistic_v2_2023D17noPU-v1/00000/C88F4190-339B-E711-B773-0025905B858A.root'
0049 #     )
0050 )
0051 
0052 # Output
0053 process.TFileService = cms.Service('TFileService',
0054     fileName = cms.string('file:phase2Trk_rechits_validation.root')
0055 )
0056 
0057 process.mix.playback = True
0058 process.mix.digitizers = cms.PSet()
0059 for a in process.aliases: delattr(process, a)
0060 
0061 
0062 # RecHits are not persistent... re-create them on-the-fly
0063 process.load("RecoLocalTracker.SiPixelRecHits.SiPixelRecHits_cfi")
0064 process.load('RecoLocalTracker.SiPhase2Clusterizer.phase2TrackerClusterizer_cfi')
0065 process.load('RecoLocalTracker.Phase2TrackerRecHits.Phase2StripCPEESProducer_cfi')
0066 process.load('RecoLocalTracker.Phase2TrackerRecHits.Phase2TrackerRecHits_cfi')
0067 # process.siPhase2RecHits.Phase2StripCPE = cms.ESInputTag("phase2StripCPEESProducer", "Phase2StripCPE")
0068 
0069 # Insert this in path to see what products the event contains
0070 process.content = cms.EDAnalyzer("EventContentAnalyzer")
0071 
0072 # Analyzer
0073 process.testassociator = cms.EDAnalyzer("TestAssociator",
0074    siPixelRecHits = cms.InputTag("siPixelRecHits"),
0075    matchedRecHit = cms.InputTag("siStripMatchedRecHits", "matchedRecHit"),
0076    rphiRecHit = cms.InputTag("siStripMatchedRecHits", "rphiRecHit"),
0077    stereoRecHit = cms.InputTag("siStripMatchedRecHits", "stereoRecHit"),
0078    siPhase2RecHits = cms.InputTag("siPhase2RecHits"),
0079    ### for using track hit association
0080    #
0081    associateRecoTracks = cms.bool(False),
0082    associateHitbySimTrack = cms.bool(False),
0083    associatePixel = cms.bool(True),       
0084    associateStrip = cms.bool(True),
0085    usePhase2Tracker = cms.bool(False),
0086    pixelSimLinkSrc = cms.InputTag("simSiPixelDigis"),
0087    stripSimLinkSrc = cms.InputTag("simSiStripDigis"),
0088    phase2TrackerSimLinkSrc = cms.InputTag("simSiPixelDigis", "Tracker"),
0089    ROUList = cms.vstring('TrackerHitsPixelBarrelLowTof',
0090                          'TrackerHitsPixelBarrelHighTof',
0091                          'TrackerHitsPixelEndcapLowTof',
0092                          'TrackerHitsPixelEndcapHighTof',
0093                          'TrackerHitsTIBLowTof',
0094                          'TrackerHitsTIBHighTof',
0095                          'TrackerHitsTIDLowTof',
0096                          'TrackerHitsTIDHighTof',
0097                          'TrackerHitsTOBLowTof',
0098                          'TrackerHitsTOBHighTof',
0099                          'TrackerHitsTECLowTof',
0100                          'TrackerHitsTECHighTof')
0101 )
0102 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
0103 phase2_tracker.toModify(process.testassociator,
0104    usePhase2Tracker = cms.bool(True),
0105    siPhase2RecHits = cms.InputTag("siPhase2RecHits"),
0106    pixelSimLinkSrc = cms.InputTag("simSiPixelDigis", "Pixel"),
0107    phase2TrackerSimLinkSrc = cms.InputTag("simSiPixelDigis", "Tracker"),
0108 )
0109 
0110 # To enable debugging:
0111 # [scram b clean ;] scram b USER_CXXFLAGS="-DEDM_ML_DEBUG"
0112 
0113 # process.load("SimTracker.TrackerHitAssociation.test.messageLoggerDebug_cff")
0114 
0115 process.MessageLogger.cerr.FwkReport.reportEvery = 1
0116 
0117 # Number of events (-1 = all)
0118 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )
0119 
0120 # Processes to run
0121 
0122 process.rechits_step = cms.Path(process.siPixelRecHits*process.siPhase2Clusters*process.siPhase2RecHits)
0123 
0124 # process.validation_step = cms.Path(process.content*process.testassociator)
0125 process.validation_step = cms.Path(process.testassociator)
0126 
0127 process.schedule = cms.Schedule(process.rechits_step, process.validation_step)