-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Do not update HepMCProduct in place (producer implementation) #10858
Conversation
A new Pull Request was created by @wmtan for CMSSW_7_6_X. Do not update HepMCProduct in place (producer implementation) It involves the following packages: Alignment/LaserAlignmentSimulation @diguida, @lveldere, @cerminar, @covarell, @bendavid, @civanch, @cmsbuild, @davidlange6, @vciulli, @smuzaffar, @Dr15Jones, @cvuosalo, @mdhildreth, @deguio, @slava77, @vadler, @mmusich, @ssekmen, @danduggan, @thuer, @monttj, @franzoni can you please review it and eventually sign? Thanks. |
@cmsbuild please test |
The tests are being triggered in jenkins. |
-1 Tested at: 7a4f54f ---> test runtestPhysicsToolsPatAlgos had ERRORS you can see the results of the tests here: |
@cmsbuild @davidlange6 the unit test that fails also fails in the base IB. The failure is not caused by this PR. |
+1 fastsim edits look ok, |
class HepMCProduct; | ||
} | ||
|
||
class GeneratorSmearedProducer : public edm::EDProducer { |
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.
why is this one not thread-aware? (edm::one, stream )
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.
Yes, this new producer, as well as the modified vertex smeared producer, should be thread aware (e.g. one, stream, or global), just as all other modules should be. That should happen in due course.
+1
|
Do not update HepMCProduct in place (producer implementation)
@wmtan, this PR has broken the jet flavor code. In CMSSW_7_6_X_2015-10-07-2300 I now get a bunch of warnings like the following one
when running PAT tests. How did this go unnoticed? Anyways, the hadron and parton selector defined in |
@ferencek This PR should not have affected the GenEventInfoProduct in any way. |
@wmtan, evidence is the printout I provided above. The problem can be reproduced by runnning pretty much any of the PAT unit tests. For instance, running The problem originates from the change made in src = cms.InputTag("generatorSmeared"), back to src = cms.InputTag("generator"), should fix the issue. |
@ferencek 1) The reason this problem was not found is that it does not cause any tests to fail. The PR approval process does not scan all output files for new warning messages. |
@wmtan, ok, it sounds like the problem will be fixed once the input RelVals are updated to a version that contains this PR. In that case, I don't think any fixes are needed. |
@ferencek That is correct, assuming that the relvals in question smear the vertices in HepMCProduct, which they should. |
@wmtan, I had a look at one of the files from /RelValProdTTbar_13/CMSSW_7_6_0_pre7-76X_mcRun2_asymptotic_v5-v1/AODSIM and here is what I see
and
and I don't see any GenEventInfoProducts called "generatorSmeared". I'm not sure if that was expected but if so, then the changes made in |
@ferencek The label "generatorSmeared" only applies to HepMCProduct, not to GenEventInfoProduct. |
@wmtan, thanks for the reply. Then my comment stands. The change done in |
@ferencek Yes, you are right. It does refer to a GenEventInfoProduct. The change to that one file should be reverted. |
This PR is the chosen implementation for avoiding modifying HepMCProduct in place (aka smearing the vertices in place). The smearers (aka vertex generators) still run as EDProducers, but they copy the HepMCProduct, smear the copy, and put the copy into the event with module label "VtxSmeared".
In order to make this PR backward compatible (see below) another producer with label "generatorSmeared"copies the HepMCProduct, and the HepMCProduct with label "generatorSmeared" is the one that is kept on output.
The consumers of the smeared HepMCProduct are modified to use the module label "generatorSmeared" instead of "generator". Also, the generators now create the HepMCProduct with the product instance name "unsmeared", so consumers of the unsmeared HepMCProduct must explicitly use "unsmeared" as the product instance name, in addition to the "generator" module label. This is a defensive measure to ensure that consumers always get the smeared HepMCProduct unless they explicitly specify "unsmeared".
For backward compatibility, the producer of HepMCProduct with label "generatorSmeared" also runs at the beginning of the digitization step. If it finds a HepMCproduct with label "generator" or "VtxSmeared", it copies it, creating a HepMCProduct with module label "generatorSmeared". In this way, files containing GEN-SIM written prior to this PR can still be read.