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
Large Refactoring of FastSim propagator #26061
Conversation
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.
I ran both the |
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26061/8617
|
+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:
|
I will consider all previous signatures as valid, given the very minor and localized change. Nevertheless please sign it in case for future reference |
+1 |
+upgrade |
+1 |
+1
|
+1 |
merge L1 acknowledged the PR #26061 (comment) , @rekovic please sign it for reference or comment further in case |
This refactoring is the first step to proper code sharing between FastSim and RECO.