Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix prodlike workflow to use DIGI instead of DIGI:pdigi_valid #33847

Merged
merged 3 commits into from May 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -547,6 +547,8 @@ class UpgradeWorkflow_ProdLike(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
if 'Digi' in step and 'Trigger' not in step:
stepDict[stepName][k] = merge([{'-s': 'DIGI,L1,DIGI2RAW,HLT:@relval2021', '--datatier':'GEN-SIM-DIGI-RAW', '--eventcontent':'RAWSIM'}, stepDict[step][k]])
elif 'DigiTrigger' in step: # for Phase-2
stepDict[stepName][k] = merge([{'-s': 'DIGI,L1TrackTrigger,L1,DIGI2RAW,HLT:@fake2'}, stepDict[step][k]])
elif 'Reco' in step:
stepDict[stepName][k] = merge([{'-s': 'RAW2DIGI,L1Reco,RECO,RECOSIM', '--datatier':'AODSIM', '--eventcontent':'AODSIM'}, stepDict[step][k]])
elif 'MiniAOD' in step:
Expand All @@ -562,6 +564,7 @@ def condition(self, fragment, stepList, key, hasHarvest):
upgradeWFs['ProdLike'] = UpgradeWorkflow_ProdLike(
steps = [
'Digi',
'DigiTrigger',
'Reco',
'RecoGlobal',
'HARVEST',
Expand All @@ -572,6 +575,7 @@ def condition(self, fragment, stepList, key, hasHarvest):
],
PU = [
'Digi',
'DigiTrigger',
'Reco',
'RecoGlobal',
'HARVEST',
Expand Down Expand Up @@ -906,6 +910,17 @@ def setup_(self, step, stepName, stepDict, k, properties):
# copy steps, then apply specializations
UpgradeWorkflowPremix.setup_(self, step, stepName, stepDict, k, properties)
UpgradeWorkflow_ProdLike.setup_(self, step, stepName, stepDict, k, properties)
#
if 'Digi' in step:
d = merge([stepDict[self.getStepName(step)][k]])
tmpsteps = []
for s in d["-s"].split(","):
if "DIGI:pdigi_valid" in s:
tmpsteps.append("DIGI")
else:
tmpsteps.append(s)
d = merge([{"-s" : ",".join(tmpsteps)},d])
stepDict[stepName][k] = d
def condition(self, fragment, stepList, key, hasHarvest):
# use both conditions
return UpgradeWorkflowPremix.condition(self, fragment, stepList, key, hasHarvest) and UpgradeWorkflow_ProdLike.condition(self, fragment, stepList, key, hasHarvest)
Expand Down
5 changes: 3 additions & 2 deletions SimGeneral/MixingModule/python/digitizers_cfi.py
Expand Up @@ -58,6 +58,7 @@
hgceeDigitizer = cms.PSet(hgceeDigitizer),
hgchebackDigitizer = cms.PSet(hgchebackDigitizer),
hgchefrontDigitizer = cms.PSet(hgchefrontDigitizer),
calotruth = cms.PSet(caloParticles), #HGCAL still needs calotruth for production mode
)

from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import hfnoseDigitizer
Expand Down Expand Up @@ -88,6 +89,7 @@
hgceeDigitizer = dict(premixStage1 = True),
hgchebackDigitizer = dict(premixStage1 = True),
hgchefrontDigitizer = dict(premixStage1 = True),
calotruth = dict(premixStage1 = True), #HGCAL still needs calotruth for production mode
)
(premix_stage2 & phase2_hfnose).toModify(theDigitizers,
hfnoseDigitizer = dict(premixStage1 = True),
Expand All @@ -104,10 +106,9 @@

from Configuration.ProcessModifiers.run3_ecalclustering_cff import run3_ecalclustering
(run3_ecalclustering | phase2_hgcal).toModify( theDigitizersValid,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could just be run3_ecalclustering now (phase2_hgcal modification is now redundant)

calotruth = cms.PSet( caloParticles ) ) # Doesn't HGCal need these also without validation?
calotruth = cms.PSet( caloParticles ) )
(premix_stage2 & phase2_hgcal).toModify(theDigitizersValid, calotruth = dict(premixStage1 = True))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is also now redundant with the above changes



phase2_timing.toModify( theDigitizersValid.mergedtruth,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should check with @cms-sw/mtd-dpg-l2 if this behavior is needed for non-pdigi_valid workflow

createInitialVertexCollection = cms.bool(True) )

Expand Down