scikit-hep / particle

Package to deal with particles, the PDG particle data table, PDGIDs, etc.
BSD 3-Clause "New" or "Revised" License
151 stars 24 forks source link

Tests for Lepton number, Baryon number and a function for R-parity #498

Open amanmdesai opened 1 year ago

amanmdesai commented 1 year ago

As per discussion in #494 with @eduardo-rodrigues

c.c. @eduardo-rodrigues @redeboer

redeboer commented 1 year ago

To write tests for lepton number and baryon number

Is the idea to check with Gell-Mann–Nishijima? Particle instances in QRules only carry quantum numbers, not data like quark content, and they can only be constructed if their numbers agree with NNG. It is probably too strict to implement as a runtime check for the particle package, but we could write an NNG check that is run through the test suite, e.g. for PDG particles.

eduardo-rodrigues commented 1 year ago

I was not originally thinking about that, as it would require several new quantum numbers to be added to the code here in Particle. That is not to say that it is totally wild. But it would require some (more) work. What do you think?

In the first instance one would add lepton and baryon numbers for the particles, and would take it from there.

Kindly comment and help out :-).

redeboer commented 1 year ago

as it would require several new quantum numbers to be added to the code here in Particle

If the check is implemented in a test, the quantum numbers can be computed from existing data in a Particle instance, see code here. Not sure if it works for all definitions, but should work for most.

eduardo-rodrigues commented 2 months ago

Hello @redeboer, you linked above to code from you. Is this something you would like to port to Particle? It could be very neat. It's not a tiny piece of work. I thought I would ask anyway :-).

redeboer commented 2 months ago

Yes this could be ported, though parts have to be rewritten for particle's implementation. I'm tagging @grayson-helmholz, who is currently reworking QRules. Maybe something you could look into? On the road myself the next few weeks

eduardo-rodrigues commented 2 months ago

Hi. Sounds cool. Let's keep in touch.

And happy trips to you :)!