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

Large Refactoring of FastSim propagator #26061

Merged
merged 18 commits into from Mar 14, 2019

Conversation

Dr15Jones
Copy link
Contributor

  • Made FastSimulation/BaseParticlePropagator the lowest level of the dependency hierarchy with no dependency on HepPDT. This reduced dependencies for RECO packages using this package.
  • Removed poor use of inheritance
  • Removed the need for the ParticleTable singleton. Needed information is propagated via FSimEvent (which was already present) and ParticlePropagator (which needs the info itself).

This refactoring is the first step to proper code sharing between FastSim and RECO.

The propagator operates on a RawParticle but is not itself a
RawParticle.
Can now fully initialize a RawParticle at construction time.
Added helper makeMuon method to allow more meaningful mechanism
to create a particular particle type. This will be used in the future
to decouple reconstruction from Geant.
The container size is known at compile time. Using a std::array
avoids a heap allocation.
The RawParticle no longer indirectly holds information about PDG
quantities. These now must come explicitly from ParticleTable.

This avoids dependency on Geant code from RawParticle and no longer
requires access to a singleton each time a RawParticle is constructed.
The RawParticle has previously behind the scenes used ParticleTable
to lookup the particle info for a given PDG id. Now one must
explicitly call a function of ParticleTable.
This will allow RawParticle to not be coupled to Geant.
RawParticle contains a XYZTLorentzVector for the momentum, it is
not itself a 4 vector.
Now ParticleTable and RawParticle no longer have any coupling.
Also moved makeMuon to its own header and source file.
makeMuon now has hard-coded value of the muon mass.
NOTE: testing revealed that the value of energy returned from
RawParticle has never been constrained by the mass value.
Use modern member data initialization mechanisms instead.
-Moved pdg related functions to own header and only make dependent
 on HepPDT::ParticleDataTable
-Prefer using already held HepPDT::ParticleDataTable over the
 ParticleTable singleton.
The HepPDT::ParticleDataTable object is now transported to where
it is needed either directly or via FSimEvent or ParticlePropagator.
Particle package depends upon HepPDT while BaseParticlePropagator
does not. Neither RawParticle nor makeMuon need HepPDT.
@Dr15Jones
Copy link
Contributor Author

I ran both the scram b runtests and runTheMatrix.py -t 4 -l limited on this change.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 5, 2019

The code-checks are being triggered in jenkins.

@Dr15Jones
Copy link
Contributor Author

@makortel @wddgit could you both review this code?

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 5, 2019

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26061/8617

  • This PR adds an extra 316KB to repository

  • Found files with invalid states:

    • FastSimulation/Particle/interface/makeMuon.h:
    • FastSimulation/Particle/test/makeMuon_catch2.cc:
    • FastSimulation/Particle/test/BuildFile.xml:
    • FastSimulation/Particle/src/makeMuon.cc:

@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-26061/33552/summary.html

Comparison Summary:

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

@fabiocos
Copy link
Contributor

I will consider all previous signatures as valid, given the very minor and localized change. Nevertheless please sign it in case for future reference

@ssekmen
Copy link
Contributor

ssekmen commented Mar 13, 2019

+1

@kpedro88
Copy link
Contributor

+upgrade

@alberto-sanchez
Copy link
Member

+1

@perrotta
Copy link
Contributor

+1

@fabiocos
Copy link
Contributor

+1

@fabiocos
Copy link
Contributor

merge

L1 acknowledged the PR #26061 (comment) , @rekovic please sign it for reference or comment further in case

@cmsbuild cmsbuild merged commit 1efe7cf into cms-sw:master Mar 14, 2019
@Dr15Jones Dr15Jones deleted the refactorBaseParticlePropagator branch March 15, 2019 16:02
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

10 participants