Skip to content

Commit

Permalink
Add workflows for Riemann fit and GPU (#20)
Browse files Browse the repository at this point in the history
* add `riemannFit` and `gpu` modifiers and workflows for Riemann fit and GPU modules
* switch GPU modules with `gpu` modifier
  • Loading branch information
makortel authored and fwyzard committed Feb 28, 2018
1 parent 6216240 commit ff49594
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Configuration/ProcessModifiers/python/gpu_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import FWCore.ParameterSet.Config as cms

# This modifier is for replacing CPU modules with GPU counterparts

gpu = cms.Modifier()
5 changes: 5 additions & 0 deletions Configuration/ProcessModifiers/python/riemannFit_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import FWCore.ParameterSet.Config as cms

# This modifier is for replacing the default pixel track "fitting" with Riemann fit

riemannFit = cms.Modifier()
2 changes: 1 addition & 1 deletion Configuration/PyReleaseValidation/python/relval_2017.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
10024.1,10024.2,10024.3,10024.4,10024.5,
10801.0,10802.0,10803.0,10804.0,10805.0,10806.0,10807.0,10808.0,10809.0,10859.0,10871.0,
10842.0,10824.0,10825.0,10826.0,10823.0,11024.0,11025.0,11224.0,
10824.1,10824.5,
10824.1,10824.5,10824.7,10824.8,
10824.6,11024.6,11224.6,
11642.0,11624.0,11625.0,11626.0,11623.0,11824.0,11825.0,12024.0]
for numWF in numWFIB:
Expand Down
16 changes: 16 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,12 @@ def gen2018HiMix(fragment,howMuch):
'--datatier': 'GEN-SIM-RECO,DQMIO',
'--eventcontent': 'RECOSIM,DQM',
}
step3_riemannFit = {
'--procModifiers': 'riemannFit',
}
step3_gpu = {
'--procModifiers': 'gpu',
}
step3_trackingLowPU = {
'--era': 'Run2_2016_trackingLowPU'
}
Expand Down Expand Up @@ -2387,6 +2393,16 @@ def gen2018HiMix(fragment,howMuch):
if 'Reco' in step: upgradeStepDict[stepName][k] = merge([step3_pixelTrackingOnly, upgradeStepDict[step][k]])
elif 'HARVEST' in step: upgradeStepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation'}, upgradeStepDict[step][k]])

for step in upgradeSteps['pixelTrackingOnlyRiemannFit']['steps']:
stepName = step + upgradeSteps['pixelTrackingOnlyRiemannFit']['suffix']
if 'Reco' in step: upgradeStepDict[stepName][k] = merge([step3_riemannFit, step3_pixelTrackingOnly, upgradeStepDict[step][k]])
elif 'HARVEST' in step: upgradeStepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation'}, upgradeStepDict[step][k]])

for step in upgradeSteps['pixelTrackingOnlyGPU']['steps']:
stepName = step + upgradeSteps['pixelTrackingOnlyGPU']['suffix']
if 'Reco' in step: upgradeStepDict[stepName][k] = merge([step3_gpu, step3_pixelTrackingOnly, upgradeStepDict[step][k]])
elif 'HARVEST' in step: upgradeStepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation'}, upgradeStepDict[step][k]])

for step in upgradeSteps['trackingRun2']['steps']:
stepName = step + upgradeSteps['trackingRun2']['suffix']
if 'Reco' in step and upgradeStepDict[step][k]['--era']=='Run2_2017':
Expand Down
7 changes: 5 additions & 2 deletions Configuration/PyReleaseValidation/python/relval_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,18 @@ def makeStepName(key,frag,step,suffix):
# special workflows for tracker
if (upgradeDatasetFromFragment[frag]=="TTbar_13" or upgradeDatasetFromFragment[frag]=="TTbar_14TeV") and not 'PU' in key and hasHarvest:
# skip ALCA
trackingVariations = ['trackingOnly','trackingRun2','trackingOnlyRun2','trackingLowPU','pixelTrackingOnly']
trackingVariations = ['trackingOnly','trackingRun2','trackingOnlyRun2','trackingLowPU','pixelTrackingOnly','pixelTrackingOnlyRiemannFit','pixelTrackingOnlyGPU']
for tv in trackingVariations:
stepList[tv] = filter(lambda s : "ALCA" not in s, stepList[tv])
workflows[numWF+upgradeSteps['trackingOnly']['offset']] = [ upgradeDatasetFromFragment[frag], stepList['trackingOnly']]
if '2017' in key:
for tv in trackingVariations[1:]:
workflows[numWF+upgradeSteps[tv]['offset']] = [ upgradeDatasetFromFragment[frag], stepList[tv]]
elif '2018' in key:
workflows[numWF+upgradeSteps['pixelTrackingOnly']['offset']] = [ upgradeDatasetFromFragment[frag], stepList['pixelTrackingOnly']]
for tv in trackingVariations:
if not "pixelTrackingOnly" in tv:
continue
workflows[numWF+upgradeSteps[tv]['offset']] = [ upgradeDatasetFromFragment[frag], stepList[tv]]

# special workflows for HE
if upgradeDatasetFromFragment[frag]=="TTbar_13" and '2018' in key:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,28 @@
'suffix' : '_pixelTrackingOnly',
'offset' : 0.5,
}
upgradeSteps['pixelTrackingOnlyRiemannFit'] = {
'steps' : [
'RecoFull',
'HARVESTFull',
'RecoFullGlobal',
'HARVESTFullGlobal',
],
'PU' : [],
'suffix' : '_pixelTrackingOnlyRiemannFit',
'offset' : 0.7,
}
upgradeSteps['pixelTrackingOnlyGPU'] = {
'steps' : [
'RecoFull',
'HARVESTFull',
'RecoFullGlobal',
'HARVESTFullGlobal',
],
'PU' : [],
'suffix' : '_pixelTrackingOnlyGPU',
'offset' : 0.8,
}
upgradeSteps['Timing'] = {
'steps' : upgradeSteps['baseline']['steps'],
'PU' : upgradeSteps['baseline']['PU'],
Expand Down
5 changes: 5 additions & 0 deletions EventFilter/SiPixelRawToDigi/python/SiPixelRawToDigi_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,8 @@
phase1Pixel.toModify(siPixelDigis, UsePhase1=True)
phase1Pixel.toModify(siPixelDigisGPU, UsePhase1=True)

# In principle I would like to hide the name 'siPixelDigisGPU', but it
# is used in test/runRawToDigi_GPU_phase1.py which I also don't want
# to break
from Configuration.ProcessModifiers.gpu_cff import gpu
gpu.toReplaceWith(siPixelDigis, siPixelDigisGPU)
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@
MissCalibrate = False,
ElectronPerADCGain = cms.double(600.) # it can be changed to something else (e.g. 135e) if needed
)

# to ensure reproducibility
from Configuration.ProcessModifiers.gpu_cff import gpu
gpu.toModify(siPixelClusters, payloadType = "HLT")
4 changes: 4 additions & 0 deletions RecoLocalTracker/SiPixelRecHits/python/SiPixelRecHits_cfi.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import FWCore.ParameterSet.Config as cms

from RecoLocalTracker.SiPixelRecHits.SiPixelRecHitsGPU_cfi import siPixelRecHits as _siPixelRecHitsGPU
siPixelRecHits = cms.EDProducer("SiPixelRecHitConverter",
src = cms.InputTag("siPixelClusters"),
CPE = cms.string('PixelCPEGeneric'),
VerboseLevel = cms.untracked.int32(0),

)

from Configuration.ProcessModifiers.gpu_cff import gpu
gpu.toReplaceWith(siPixelRecHits, _siPixelRecHitsGPU)

siPixelRecHitsPreSplitting = siPixelRecHits.clone(
src = 'siPixelClustersPreSplitting'
)

0 comments on commit ff49594

Please sign in to comment.