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 GenParticles2HepMCConverter to run on herwig samples #21349
Conversation
The code-checks are being triggered in jenkins. |
+code-checks |
A new Pull Request was created by @jhgoh (Junghwan John Goh) for master. It involves the following packages: GeneratorInterface/RivetInterface @cmsbuild, @efeyazgan, @perrozzi, @thuer, @govoni can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
94ec44a
to
7f1c6e1
Compare
please test |
The tests are being triggered in jenkins. |
+1 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
The code-checks are being triggered in jenkins. |
+code-checks |
Two additional changes:
|
please test |
The tests are being triggered in jenkins. |
+1 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
Comparison job queued. |
@@ -109,27 +111,38 @@ void GenParticles2HepMCConverter::produce(edm::Event& event, const edm::EventSet | |||
|
|||
hepmc_particles.push_back(hepmc_particle); | |||
genCandToHepMCMap[p] = hepmc_particle; | |||
|
|||
// Find incident proton pair | |||
if ( p->mother() == nullptr and std::abs(p->eta()) > 5 and std::abs(p->pz()) > 1000 ) { |
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.
would it be worth putting a check on the pt fraction of the beam energy (if it is stored anywhere) ?
we have anyway 900 GeV data and Rivet plugins...
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.
I'm ignorant - are there really particles with p->mother() == nullptr that are not the initial particles?
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.
I think this is true for pruned/packed collections at MINIAOD level
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 some intermediate/final state particles loose mother during the MiniAOD pruning.
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.
Thanks (though perhaps it should be possible to distinguish true motherless and pruned motherless in the future as to avoid the sort of fragile checks done here)
Comparison is ready There are some workflows for which there are errors in the baseline: 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 (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
The GenParticles2HepMCConverter was written assuming the first two particles in the event record are incident protons. This is is not true for Herwig samples and can introduce crash while invoking RivetAnalysis in the ParticleLevelProducer.
For an example, GenParticles list from a 80X TTbar herwig sample appears like below:
With this PR, GenParticles2HepMCConverter searches for protons with large |eta| and |pz| to assign incident particles and the first vertices in the HepMC.
This will not affect the standard production.
NanoAOD was crashing to process herwig samples, and this PR solves the problem.
@intrepid42 @gpetruc