question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discussion on new PDGID qualifiers such as is_quarkonium

See original GitHub issue

Hi @HDembinski and @henryiii. I’m working towards a version 1.0 of the package, dealing with outstanding issues and committing various things I’ve had in the pipeline.

While producing for inspection a series of tables per particle “category” I realised that it might be neat to make the several “helpers” (I had to write) readily available to the user - OK, some are trivial, but not all. So I would enhance the PDGID class with several boolean functions beyond what we already have, such as is_lepton or is_diquark. This is the kind of list I’m thinking about:

- is_sm_quark
- is_sm_lepton
- is_gauge_boson_or_higgs
- is_special_particle
- is_heavy_flavor
- is_light_meson = is_meson and not is_heavy_flavor
- is_strange_meson
- is_charmed_meson
- is_charmed_strange_meson
- is_bottom_meson
- is_bottom_strange_meson
- is_bottom_charmed_meson
- is_quarkonium or is_heavy_qqbar_meson
- is_light_baryon
- is_strange_baryon
- is_charmed_baryon
- is_bottom_baryon

It’s basically giving the class a means to straightforwardly provide the classification the PDG uses in their MC numbering scheme document https://pdg.lbl.gov/2020/reviews/rpp2020-rev-monte-carlo-numbering.pdf. This can be used as usual in searches with Particle.findall(...). Adding this ensures the user does not have to implement it itself and may also prevent silly bugs …

What do you think? Thanks.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
HDembinskicommented, Aug 20, 2020

I am on the fence on this. I can see how these are useful, but if you add these, you are adding a lot of redundant interface. Users should be empowered to compose these filters by themselves. The consensus in books on design and programming is that redundancy should generally be avoided, because it easily gets out of hand and it adds “noise” to an otherwise clear and concise interface. More interface requires more documentation and testing. Plus, it can make it overwhelming to learn a tool which has a lot of interface that is actually redundant (you won’t realize this on first glance).

I would rather spend a section in the docs to teach users how to compose these queries instead of adding pre-defined filters.

0reactions
henryiiicommented, Aug 20, 2020

(I agree too)

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found