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

Fix GenParticles2HepMCConverter to run on herwig samples #21349

Merged
merged 3 commits into from Nov 30, 2017

Conversation

jhgoh
Copy link
Contributor

@jhgoh jhgoh commented Nov 17, 2017

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:

[ParticleListDrawer] analysing particle collection prunedGenParticles
 idx  |    ID -       Name |Stat|  Mo1  Mo2  Da1  Da2 |nMo nDa|    pt       eta     phi   |     px         py         pz        m     |
    0 |     6 -          t | 11 |   42   59   15   15 |  2  1 | 103.091     -2.071 -2.243 |    -64.186    -80.671   -402.211  171.651 |
    1 |    -6 -       tbar | 11 |   42   59   16   16 |  2  1 |  99.332     -0.731  1.018 |     52.164     84.533    -79.272  172.378 |
    2 |    21 -          g | 11 |   42   59   19   19 |  2  1 |  12.628     -0.514 -0.311 |     12.023     -3.862     -6.782   -0.000 |
    3 |  2212 -         p+ |  4 |   -1   -1    4    8 |  0  5 |   0.000  29256.000  0.000 |      0.000      0.000   6500.000    0.938 |
    4 |    82 -   rndmflav | 11 |    3    3   27   27 |  1  1 |   0.000     60.618 -0.000 |      0.000     -0.000   6405.248    0.931 |
    5 |    21 -          g | 11 |    3    3   28   29 |  1  2 |   0.957      6.455  0.459 |      0.858      0.424    304.341    0.000 |

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

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/PR-21349/2043

@cmsbuild
Copy link
Contributor

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.
@alberto-sanchez, @agrohsje, @mkirsano this is something you requested to watch as well.
@davidlange6, @slava77 you are the release manager for this.

cms-bot commands are listed here

@perrozzi
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 17, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/24501/console Started: 2017/11/17 15:51

@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-21349/24501/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 27
  • DQMHistoTests: Total histograms compared: 2833444
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2833265
  • DQMHistoTests: Total skipped: 178
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 1.66999999991 KiB( 23 files compared)
  • Checked 111 log files, 8 edm output root files, 27 DQM output files

@efeyazgan
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/PR-21349/2199

@cmsbuild
Copy link
Contributor

Pull request #21349 was updated. @cmsbuild, @efeyazgan, @perrozzi, @thuer, @govoni can you please check and sign again.

@jhgoh
Copy link
Contributor Author

jhgoh commented Nov 27, 2017

Two additional changes:

@perrozzi
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 27, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/24699/console Started: 2017/11/27 16:12

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

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 ) {
Copy link
Contributor

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...

Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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)

@cmsbuild
Copy link
Contributor

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

There are some workflows for which there are errors in the baseline:
10824.0 step 5
The results for the comparisons for these workflows could be incomplete
This means most likely that the IB is having errors in the relvals.The error does NOT come from this pull request

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 27
  • DQMHistoTests: Total histograms compared: 2605338
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2605166
  • DQMHistoTests: Total skipped: 171
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 1.13000000005 KiB( 23 files compared)
  • Checked 111 log files, 8 edm output root files, 27 DQM output files

@perrozzi
Copy link
Contributor

+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 (and backports should be raised in the release meeting by the corresponding L2)

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 876e7ad into cms-sw:master Nov 30, 2017
@jhgoh jhgoh deleted the FixToRunOnHerwigSample branch December 7, 2017 19:12
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

5 participants