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

Added possibility to disable eta/p cut for Geant4 primary #25251

Merged
merged 1 commit into from Nov 20, 2018

Conversation

civanch
Copy link
Contributor

@civanch civanch commented Nov 15, 2018

This PR allows to use particle gun in any point in space if eta, phi and momentum cuts are disable in interface between generator and OscarProducer.

Should not affect any mainstream result.

To disable these cuts following lines should be customised:
process.g4SimHits.Generator.ApplyPCuts = cms.bool(False)
process.g4SimHits.Generator.ApplyEtaCuts = cms.bool(False)

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@civanch
Copy link
Contributor Author

civanch commented Nov 15, 2018

please test

@civanch
Copy link
Contributor Author

civanch commented Nov 16, 2018

code-checks

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 16, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/31691/console Started: 2018/11/16 09:26

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @civanch (Vladimir Ivantchenko) for master.

It involves the following packages:

SimG4Core/Generators

@cmsbuild, @civanch, @mdhildreth can you please review it and eventually sign? Thanks.
@makortel this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-25251/31691/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 3 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3013311
  • DQMHistoTests: Total failures: 20
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3013094
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 134 log files, 14 edm output root files, 32 DQM output files

@civanch
Copy link
Contributor Author

civanch commented Nov 18, 2018

+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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

<< " ApplyEtaCuts: " << fEtaCuts
<< " ApplyPhiCuts: " << fPhiCuts
<< " ApplyLumiMonitorCuts: " << lumi;
<< " ApplyCuts: " << fFiductialCuts
Copy link
Contributor

Choose a reason for hiding this comment

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

@civanch trivial issue, why this space?

Copy link
Contributor Author

@civanch civanch Nov 20, 2018

Choose a reason for hiding this comment

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

@fabiocos , it is formatting a new line to have clear printout - just before is "\n" symbol.

@@ -275,7 +275,8 @@ void Generator::HepMC2G4(const HepMC::GenEvent * evt_orig, G4Event * g4evt)
decay_length = std::sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)+(z2-z1)*(z2-z1));
}

bool toBeAdded = false;
bool toBeAdded = (fFiductialCuts) ? false : true;
Copy link
Contributor

Choose a reason for hiding this comment

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

@civanch with the default g4SimHits settings this should preserve the standard behaviour...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fabiocos , no differences in all tests is observed. Normally we have eta/p cuts, so the code behaves in the same way as before.

@@ -130,13 +133,9 @@ void Generator::HepMC2G4(const HepMC::GenEvent * evt_orig, G4Event * g4evt)
(*(evt->vertices_begin()))->position().z(),
(*(evt->vertices_begin()))->position().t());

if(verbose > 0) {
edm::LogVerbatim("SimG4CoreGenerator") << &evt;
Copy link
Contributor

Choose a reason for hiding this comment

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

@civanch this might help in understanding the generator structure to be imported, was it disturbing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fabiocos , when we debug various problems it become useful to enable edm::LogVerbatim to see list of primary vertexes/particles. Here I tried make the printout to be easier to find in a long log and more convenient for reading. The old style "verbose" variable requires change of g4SimHits parameter (but save a drop of CPU). With this change debugging is a bit easier, however, this is a minor thing.

@fabiocos
Copy link
Contributor

please test

DQM differences are unrelated to this PR and should be gone now

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 19, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/31727/console Started: 2018/11/19 12:58

@abdoulline
Copy link

@civanch
Thanks a lot, Vladimir!
Now, with this PR I've got reasonable HF rechits from a special vertex (at HF surface, important for electrons) and angular/momentum settings (particle direction perpendicuar to HF surface) of the particle gun to mimic HF TestBeam setup.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-25251/31727/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 5 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3013311
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3013111
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 134 log files, 14 edm output root files, 32 DQM output files

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 6aa740f into cms-sw:master Nov 20, 2018
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

4 participants