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

Conversation

srimanob
Copy link
Contributor

@srimanob srimanob commented May 26, 2021

PR description:

Currently, Phase-2 prod-like workflow uses DIGI:pdigi_valid instead of DIGI. This PR is to make a clear cut between production and relvals with DIGI and DIGI:pdigi_valid respectively. To run in production mode, we need to adapt digitizers_cfi.py to include Calo MCTruth for HGCAL in DIGI.

No change is expected for relvals as pdigi_valid will be used as before. The change is only the size of events in production mode. With PU200 ttbar, it can save more than 30MB/events as MergeTrackTruth will not be stored.

PR validation:

Get proper cmsDriver(s) when use
runTheMatrix.py --what upgrade -l 23234.0,23234.21,23434.21,23434.9921 --dryRun

if this PR is a backport please specify the original PR and why you need to backport that PR:

Not a backport, and no need for backport

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33847/22869

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @srimanob (Phat Srimanobhas) for master.

It involves the following packages:

Configuration/PyReleaseValidation

@jordan-martins, @chayanit, @wajidalikhan, @kpedro88, @cmsbuild, @srimanob can you please review it and eventually sign? Thanks.
@makortel, @Martin-Grunewald, @fabiocos, @slomeo this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@srimanob
Copy link
Contributor Author

Please test

@kpedro88
Copy link
Contributor

@srimanob this was a deliberate choice to match the Phase 2 production campaigns which also use DIGI:pdigi_valid, e.g. https://twiki.cern.ch/twiki/bin/view/CMS/Phase2HLTTDRWinter20DR

d = merge([stepDict[self.getStepName(step)][k]])
tmpsteps = []
for s in d["-s"].split(","):
if s == "DIGI:pdigi_valid" in s:
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this condition is correct

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm.. Could you please guide? I get -s DIGI,DATAMIX,L1TrackTrigger,L1,DIGI2RAW,HLT:@fake2 as expected.

Copy link
Contributor

Choose a reason for hiding this comment

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

Either if s == "DIGI:pdigi_valid" or if "DIGI:pdigi_valid" in s would potentially make sense. Right now, this is comparing a string to a bool at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, Fixed.

@srimanob
Copy link
Contributor Author

srimanob commented May 26, 2021

@srimanob this was a deliberate choice to match the Phase 2 production campaigns which also use DIGI:pdigi_valid, e.g. https://twiki.cern.ch/twiki/bin/view/CMS/Phase2HLTTDRWinter20DR

I understand that was a (my) mistake in the campaign setting. I think we should keep the proper cmsDriver, and no clue on the need of pdigi_valid in the production (with MC truth information). Is it really need for Phase-2 currently?

@kpedro88
Copy link
Contributor

There are a number of Phase 2 customizations in theDigitizersValid, and I'm not sure if we can go without these yet:

theDigitizersValid = cms.PSet(theDigitizers)
theDigitizers.mergedtruth.select.signalOnlyTP = True
from Configuration.ProcessModifiers.run3_ecalclustering_cff import run3_ecalclustering
(run3_ecalclustering | phase2_hgcal).toModify( theDigitizersValid,
calotruth = cms.PSet( caloParticles ) ) # Doesn't HGCal need these also without validation?
(premix_stage2 & phase2_hgcal).toModify(theDigitizersValid, calotruth = dict(premixStage1 = True))
phase2_timing.toModify( theDigitizersValid.mergedtruth,
createInitialVertexCollection = cms.bool(True) )
from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
def _customizePremixStage1(mod):
# To avoid this if-else structure we'd need an "_InverseModifier"
# to customize pixel/strip for everything else than fastSim.
if hasattr(mod, "pixel"):
if hasattr(mod.pixel, "AlgorithmCommon"):
mod.pixel.AlgorithmCommon.makeDigiSimLinks = True
else:
mod.pixel.makeDigiSimLinks = True
if hasattr(mod, "strip"):
mod.strip.makeDigiSimLinks = True
mod.mergedtruth.select.signalOnlyTP = False
premix_stage1.toModify(theDigitizersValid, _customizePremixStage1)

@srimanob
Copy link
Contributor Author

There are a number of Phase 2 customizations in theDigitizersValid, and I'm not sure if we can go without these yet:

theDigitizersValid = cms.PSet(theDigitizers)
theDigitizers.mergedtruth.select.signalOnlyTP = True
from Configuration.ProcessModifiers.run3_ecalclustering_cff import run3_ecalclustering
(run3_ecalclustering | phase2_hgcal).toModify( theDigitizersValid,
calotruth = cms.PSet( caloParticles ) ) # Doesn't HGCal need these also without validation?
(premix_stage2 & phase2_hgcal).toModify(theDigitizersValid, calotruth = dict(premixStage1 = True))
phase2_timing.toModify( theDigitizersValid.mergedtruth,
createInitialVertexCollection = cms.bool(True) )
from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
def _customizePremixStage1(mod):
# To avoid this if-else structure we'd need an "_InverseModifier"
# to customize pixel/strip for everything else than fastSim.
if hasattr(mod, "pixel"):
if hasattr(mod.pixel, "AlgorithmCommon"):
mod.pixel.AlgorithmCommon.makeDigiSimLinks = True
else:
mod.pixel.makeDigiSimLinks = True
if hasattr(mod, "strip"):
mod.strip.makeDigiSimLinks = True
mod.mergedtruth.select.signalOnlyTP = False
premix_stage1.toModify(theDigitizersValid, _customizePremixStage1)

OK, thanks. I will look into it.

@cmsbuild
Copy link
Contributor

-1

Failed Tests: RelVals
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-61760c/15321/summary.html
COMMIT: c84e36f
CMSSW: CMSSW_12_0_X_2021-05-26-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/33847/15321/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-61760c/15411/summary.html
COMMIT: d1a025c
CMSSW: CMSSW_12_0_X_2021-05-28-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/33847/15411/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-61760c/23234.21_TTbar_14TeV+2026D49_ProdLike+TTbar_14TeV_TuneCP5_GenSimHLBeamSpot14+DigiTrigger+RecoGlobal+MiniAOD
  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-61760c/23434.9921_TTbar_14TeV+2026D49PU_PMXS1S2ProdLike+TTbar_14TeV_TuneCP5_GenSimHLBeamSpot14+PREMIX_PremixHLBeamSpot14PU+DigiTriggerPU+RecoGlobalPU+MiniAODPU

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 10 differences found in the comparisons
  • DQMHistoTests: Total files compared: 37
  • DQMHistoTests: Total histograms compared: 2650486
  • DQMHistoTests: Total failures: 18
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2650445
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 36 files compared)
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 155 log files, 37 edm output root files, 37 DQM output files
  • TriggerResults: no differences found

@civanch
Copy link
Contributor

civanch commented May 30, 2021

+1

I think, that saving of MC truth volume for HGCal is necessary.

@srimanob
Copy link
Contributor Author

+Upgrade

Plan to backport to 11_3.

@qliphy
Copy link
Contributor

qliphy commented May 31, 2021

@cms-sw/pdmv-l2 do you have any comment?

@chayanit
Copy link

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented May 31, 2021

+1

@@ -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)

@@ -104,10 +106,9 @@

from Configuration.ProcessModifiers.run3_ecalclustering_cff import run3_ecalclustering
(run3_ecalclustering | phase2_hgcal).toModify( theDigitizersValid,
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

(premix_stage2 & phase2_hgcal).toModify(theDigitizersValid, calotruth = dict(premixStage1 = True))


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

@srimanob
Copy link
Contributor Author

srimanob commented Jun 1, 2021

Thanks @kpedro88
I will make a fix PR on top of it. It should not affect production. Will wait for feedback from @cms-sw/mtd-dpg-l2 first if in production mode, will they need MC Truth.

@fabiocos
Copy link
Contributor

fabiocos commented Jun 3, 2021

@srimanob @kpedro88 MC Truth is needed for vertex validation, so for any study concerning quality of vertices its presence should be welcome. We are not normally running these studies on large production samples to my knowledge, for smaller test production I believe one should define the target of the test to decide.

@srimanob
Copy link
Contributor Author

srimanob commented Jun 3, 2021

@srimanob @kpedro88 MC Truth is needed for vertex validation, so for any study concerning quality of vertices its presence should be welcome. We are not normally running these studies on large production samples to my knowledge, for smaller test production I believe one should define the target of the test to decide.

Thanks @fabiocos, I propose to keep it for pdigi_valid only, as it is, then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants