Page MenuHomeHEPForge

Improve handling of phase-space generation for cases of decays having e+e- pair to make RareLbToLll model.

Authored by kreps on Jun 9 2022, 2:51 PM.


  • Improve handling of phase-space generation for cases of decays having e+e- pair to make RareLbToLll model useable.
  • Some code modernization of RareLbToLll to make things const where they are constant and pass const references instead of raw pointers in most places.
Test Plan

Tested locally that nothing changes for Lz mu mu final state. In case of Lb --> Lz e+ e-, without this change model is effectively unuseable as maximum probability gets too high and accept-reject fails to find working configuration in 1000 trials. After change code can generate 1M events without any issue and gives expected q2 distribution. I'm not adding test as I will do this directly to new framework.

Diff Detail

rEVTGEN evtgen
Lint Not Applicable
Tests Not Applicable

Event Timeline

kreps requested review of this revision.Jun 9 2022, 2:51 PM
kreps created this revision.
kreps changed the visibility from "All Users" to "Public (No Login Required)".Jun 9 2022, 3:09 PM
kreps changed the edit policy from "All Users" to "Restricted Project (Project)".
kreps added a project: Restricted Project.
  • Add missing call for hadronic amplitudes for spin-3/2

Changes look OK. It is good to see unnecessary pointers being removed. Just have a few minor suggestions.


Need to run clang-formatting to have extra space inside braces?


Should we remove the static here? Hopefully there are no other statics used in this model?


This could be const as well.

Thanks Michal, this indeed looks like a good set of clean-ups as well as the actual physics improvement.

Just a few inline suggestions for further small clean-ups, fixes, etc.


A const member function should not return a non-const pointer to a member since it allows the client to subsequently modify the internal state. As such it is better to have two versions of the function, a const function that returns a const pointer and a non-const function that returns a non-const pointer.


As per comment on the header, we need two versions of the function for const-correctness reasons.


Would be good to at least initialise these to 0 here, or better move their declarations to where they are first used so they are initialised there.


These loop counters should be declared in the loop init-statement not here.

kreps marked 7 inline comments as done.
  • Fix small coding issues from code review
This revision is now accepted and ready to land.Jul 5 2022, 11:19 AM