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

[HGCAL] Closeby Particle gun - uniform eta generation #36554

Merged
merged 6 commits into from Jan 28, 2022

Conversation

waredjeb
Copy link
Contributor

@waredjeb waredjeb commented Dec 20, 2021

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36554/27492

  • This PR adds an extra 32KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @waredjeb (Wahid Redjeb) for master.

It involves the following packages:

  • Configuration/Generator (generators)
  • IOMC/ParticleGuns (generators)

@SiewYan, @mkirsano, @Saptaparna, @cmsbuild, @GurpreetSinghChahal, @agrohsje, @alberto-sanchez can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @missirol, @fabiocos, @grzanka this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@rovere
Copy link
Contributor

rovere commented Dec 20, 2021

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bd6456/21406/summary.html
COMMIT: ae1f104
CMSSW: CMSSW_12_3_X_2021-12-20-1100/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/36554/21406/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 6 differences found in the comparisons
  • DQMHistoTests: Total files compared: 43
  • DQMHistoTests: Total histograms compared: 3461688
  • DQMHistoTests: Total failures: 11
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 3461654
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 42 files compared)
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 181 log files, 42 edm output root files, 43 DQM output files
  • TriggerResults: no differences found

fEnMax = pgun_params.getParameter<double>("EnMax");
fEnMin = pgun_params.getParameter<double>("EnMin");
fMaxEnSpread = pgun_params.getParameter<bool>("MaxEnSpread");
fEtaMax = pgun_params.getParameter<double>("MinEta");
fEtaMin = pgun_params.getParameter<double>("MaxEta");
Copy link
Contributor

Choose a reason for hiding this comment

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

@waredjeb Min is max and max is min here. Maybe they should be flipped? Also, could you please add a line in the description about the bug that PR #36460 introduced?

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! I fixed the names and added a description of the bug introduced

Copy link
Contributor

@perrotta perrotta left a comment

Choose a reason for hiding this comment

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

Thank you @waredjeb for fixing a bug that was originally introduced from a comment of mine in #36460
Since you are cleaning, could you please consider also the following suggestions?

if (!fControlledByEta) {
fR = CLHEP::RandFlat::shoot(engine, fRMin, fRMax);
} else {
fEta = CLHEP::RandFlat::shoot(engine, fEtaMin, fEtaMax);
Copy link
Contributor

@perrotta perrotta Dec 27, 2021

Choose a reason for hiding this comment

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

Not fundamental, but fEta could have been more conveniently defined as a local variable only inside this scope...

fEnMax = pgun_params.getParameter<double>("EnMax");
fEnMin = pgun_params.getParameter<double>("EnMin");
fMaxEnSpread = pgun_params.getParameter<bool>("MaxEnSpread");
fEtaMax = pgun_params.getParameter<double>("MaxEta");
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you are (also) cleaning, the same style could be used for all Min/Max parameters: here EtaMin / EtaMax (and below also PhiMin / PhiMax)

Copy link
Contributor Author

@waredjeb waredjeb Dec 28, 2021

Choose a reason for hiding this comment

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

Hi! I tried to change from MinEta/MaxEta to EtaMin/EtaMax, I modified also the _cfi.py files, but when I try to test the workflow, I get

----- Begin Fatal Exception 28-Dec-2021 13:07:11 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Constructing module: class=CloseByParticleGunProducer label='generator'
Exception Message:
MissingParameter: Parameter 'MinEta' not found.
----- End Fatal Exception -------------------------------------------------

Same thing with Phi.
Am I missing something?

Copy link
Contributor

Choose a reason for hiding this comment

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

@waredjeb the message says that it looks from a "MinEta" parameter which is not able to find in the configuration. This makes me think that you did not modify in your patch the fillDescriptions method with the new parameter' names

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@perrotta The point is that there is not a fillDescription in the CloseByParticleGunProducer, that's why I modified the cfi.py manually

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, ok. Then you did not modify the pgun_params.getParameter<double>("MinEta") call in the .cc code (or you did it but you did not recompile before testing)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found the problem, I had to change the parameter name in IOMC/ParticleGuns/src/BaseFlatGunProducer.cc as well.

@@ -25,9 +25,12 @@ CloseByParticleGunProducer::CloseByParticleGunProducer(const ParameterSet& pset)
ParameterSet defpset;
Copy link
Contributor

Choose a reason for hiding this comment

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

This defpset doesn't look to be used anywhere, and it can be removed

Comment on lines 32 to 35
fEtaMax = pgun_params.getParameter<double>("MaxEta");
fEtaMin = pgun_params.getParameter<double>("MinEta");
fRMax = pgun_params.getParameter<double>("RMax");
fRMin = pgun_params.getParameter<double>("RMin");
Copy link
Contributor

@perrotta perrotta Dec 27, 2021

Choose a reason for hiding this comment

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

Suggested change
fEtaMax = pgun_params.getParameter<double>("MaxEta");
fEtaMin = pgun_params.getParameter<double>("MinEta");
fRMax = pgun_params.getParameter<double>("RMax");
fRMin = pgun_params.getParameter<double>("RMin");
if (fControlledByEta) {
fEtaMax = pgun_params.getParameter<double>("EtaMax");
fEtaMin = pgun_params.getParameter<double>("EtaMin");
if (fEtaMax <= fEtaMin)
LogError("CloseByParticleGunProducer") << " Please fix EtaMin and EtaMax values in the configuration";
} else {
fRMax = pgun_params.getParameter<double>("RMax");
fRMin = pgun_params.getParameter<double>("RMin");
if (fRMax <= fRMin)
LogError("CloseByParticleGunProducer") << " Please fix RMin and RMax values in the configuration";
}

could avoid mistakes while configuring

Copy link
Contributor

Choose a reason for hiding this comment

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

Please also remove the useless << endl at the end of the two LogDebug statements in this code

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36554/27580

  • This PR adds an extra 36KB to repository

@cmsbuild
Copy link
Contributor

Pull request #36554 was updated. @SiewYan, @mkirsano, @Saptaparna, @cmsbuild, @GurpreetSinghChahal, @agrohsje, @alberto-sanchez can you please check and sign again.

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

-1

Failed Tests: RelVals RelVals-INPUT
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bd6456/21491/summary.html
COMMIT: af35508
CMSSW: CMSSW_12_3_X_2021-12-28-1100/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/36554/21491/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals

----- Begin Fatal Exception 28-Dec-2021 20:26:01 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Constructing module: class=FlatRandomEGunProducer label='generator'
Exception Message:
MissingParameter: Parameter 'EtaMin' not found.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 28-Dec-2021 20:29:43 CET-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Constructing module: class=FlatRandomEGunProducer label='generator'
Exception Message:
MissingParameter: Parameter 'EtaMin' not found.
----- End Fatal Exception -------------------------------------------------

RelVals-INPUT

  • 11834.9911834.99_TTbar_14TeV+2021PU_PMXS1S2+TTbar_14TeV_TuneCP5_GenSimINPUT+PREMIX_PremixPU+DigiPU+RecoNanoPU+HARVESTNanoPU/step2_TTbar_14TeV+2021PU_PMXS1S2+TTbar_14TeV_TuneCP5_GenSimINPUT+PREMIX_PremixPU+DigiPU+RecoNanoPU+HARVESTNanoPU.log
  • 12634.9912634.99_TTbar_14TeV+2023PU_PMXS1S2+TTbar_14TeV_TuneCP5_GenSimINPUT+PREMIX_PremixPU+DigiPU+RecoNanoPU+HARVESTNanoPU/step2_TTbar_14TeV+2023PU_PMXS1S2+TTbar_14TeV_TuneCP5_GenSimINPUT+PREMIX_PremixPU+DigiPU+RecoNanoPU+HARVESTNanoPU.log
  • 13034.9913034.99_TTbar_14TeV+2024PU_PMXS1S2+TTbar_14TeV_TuneCP5_GenSimINPUT+PREMIX_PremixPU+DigiPU+RecoNanoPU+HARVESTNanoPU/step2_TTbar_14TeV+2024PU_PMXS1S2+TTbar_14TeV_TuneCP5_GenSimINPUT+PREMIX_PremixPU+DigiPU+RecoNanoPU+HARVESTNanoPU.log
Expand to see more relval errors ...

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bd6456/21736/summary.html
COMMIT: b28d61a
CMSSW: CMSSW_12_3_X_2022-01-14-1100/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/36554/21736/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 43
  • DQMHistoTests: Total histograms compared: 3461659
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3461631
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 42 files compared)
  • Checked 181 log files, 42 edm output root files, 43 DQM output files
  • TriggerResults: no differences found

@rovere
Copy link
Contributor

rovere commented Jan 17, 2022

Since this PR is modifying the behaviour of the CloseByParticleGun, it would be nice to have this tested with some workflow actually using that generator snippet.
Any authoritative suggestion for how to properly do that?

@rovere
Copy link
Contributor

rovere commented Jan 19, 2022

ping....

@SiewYan
Copy link
Contributor

SiewYan commented Jan 24, 2022

Hello @rovere , I am not sure how to trigger user specific workflow on the PR interface. @perrotta do you know the command? I cannot find it in the cmssw documentation.

@rovere
Copy link
Contributor

rovere commented Jan 27, 2022

test parameters:

  • workflow = 38696
  • relvals_opt = --what upgrade,standard,highstats,pileup,generator,extendedgen,production,ged,machine,premix

@rovere
Copy link
Contributor

rovere commented Jan 27, 2022

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bd6456/22049/summary.html
COMMIT: b28d61a
CMSSW: CMSSW_12_3_X_2022-01-26-2300/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/36554/22049/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-bd6456/38696.0_CloseByPGun_CE_E_Front_120um+2026D86+CE_E_Front_120um_GenSimHLBeamSpotHGCALCloseBy+DigiTrigger+RecoGlobal+HARVESTGlobal

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 43
  • DQMHistoTests: Total histograms compared: 3449324
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3449302
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 42 files compared)
  • Checked 181 log files, 42 edm output root files, 43 DQM output files
  • TriggerResults: no differences found

@rovere
Copy link
Contributor

rovere commented Jan 27, 2022

The special workflow 38696 is using the CloseByPGun generator. It ran fine.
From my side, I have no further check I'd like to perform.
It would be nice to have this PR integrated ASAP.

@SiewYan
Copy link
Contributor

SiewYan commented Jan 28, 2022

+1

@rovere , thank you for the test. I looked into the log file, its fine by me.

@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. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

+1

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

6 participants