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
Conversation
The code-checks are being triggered in jenkins. |
please test |
code-checks |
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25251/7281 |
The tests are being triggered in jenkins. |
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. cms-bot commands are listed here |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
please test DQM differences are unrelated to this PR and should be gone now |
The tests are being triggered in jenkins. |
@civanch |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
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)