-
Notifications
You must be signed in to change notification settings - Fork 3
fix!: update PDG values in particle_list #202
Conversation
WARNING: This affects the number of solutions of D0 -> K0S K+ K- tests/channels/test_d0_to_kskpkm.py
Codecov Report
@@ Coverage Diff @@
## master #202 +/- ##
==========================================
+ Coverage 88.28% 88.62% +0.34%
==========================================
Files 22 22
Lines 2851 2858 +7
Branches 663 665 +2
==========================================
+ Hits 2517 2533 +16
+ Misses 190 184 -6
+ Partials 144 141 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@spflueger I'm only worried about 6226f16 because of the required changes in |
Hmm I can take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A faulty definition of the charged a0(980) particles make the D decay test fail. Currently a warning message is print out in such a case (quantum number solutions are found, but no matching particle can be inserted, due to a wrongly defined particle). I opened issue #205 to avoid having faulty particles in general. It would be a good options to include such a test in this PR, to ensure all particle definitions are correct.
Why is it tedious? I propose to:
|
A faulty definition of the charged a0(980) particles make the D decay test fail. Currently a warning message is print out in such a case (quantum number solutions are found, but no matching particle can be inserted, due to a wrongly defined particle). I opened issue #205 to avoid having faulty particles in general. It would be a good options to include such a test in this PR, to ensure all particle definitions are correct.
> QuantumNumbers:
Spin: 0
Charge: -1
Parity: +1
- IsoSpin: { Value: 1, Projection: -1 }
The projection -1 was correct
> QuantumNumbers:
Spin: 0
Charge: 1
Parity: +1
- IsoSpin: { Value: 1, Projection: 1 }
The projection +1 was correct. This is the reason why the `D0 -> K0 K+ K-` only finds 3 solutions now.
hmmm ... consider the decay D0 --> a0(980)+ K- on the quark level:
[c ubar] --> [s ubar] W+ --> [s ubar] [u dbar] ~ K- a0+
the a0+ then decays like this:
[u dbar] --> [u (sbar s) dbar] --> [u sbar] [s dbar] ~ K+ K0_bar
so, the correct decay to consider would be D0 --> K0_bar K+ K-. No?
…-- Wolfgang
--
Prof Dr Wolfgang Gradl University of Mainz
BES-III, BABAR & A2@MAMI Institut für Kernphysik
Tel. +49-6131-39-25871
|
You have to convert the Particle to a dict of Enums etc
Since hypercharge can be calculated from the other QN already, this info is redundant and just adds one more point of inconsistency. Hence I oppose that
That is a good point. |
@wgradl Maybe there is slight misunderstanding. We are currently testing |
> hmmm ... consider the decay D0 --> a0(980)+ K- on the quark level: [c ubar] --> [s ubar] W+ --> [s ubar] [u dbar] ~ K- a0+ the a0+ then decays like this: [u dbar] --> [u (sbar s) dbar] --> [u sbar] [s dbar] ~ K+ K0_bar so, the correct decay to consider would be D0 --> K0_bar K+ K-. No?
@wgradl Maybe there is slight misunderstanding. We are currently testing `D0 --> K0_bar K+ K-`. Just the isospin of a0(980)+/- were defined incorrectly in this PR, which made the test fail. So everything is ok.
@spflueger: ok, I see. Your inital comment mentioned D0 --> K0 K+ K-, so I was a
bit puzzled. Nevertheless, the isospin projection of the a0+ should be
+1, just as for the pi+ (because it has identical quark contents).
If that makes the tests fail, then something else has gone awry.
|
Ah I see, very valuable comment. Currently the test just checks if this is generally possible. Since it will also try pure weak interactions (for both vertices/nodes) it will also work with a K0. Hence I used the terms I conclude two important points from your comment:
|
Needed because code coverage drops in the following commits
@@ -215,6 +216,37 @@ def __repr__(self) -> str: | |||
return f"{self.__class__.__name__}{self.name, self.pid, self.state, self.mass, self.width}" | |||
|
|||
|
|||
def compute_gellmann_nishijima(state: QuantumState) -> Optional[float]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better change this to return a int
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did that at first, but then figured the cast to int
that would be required here is implicit behaviour. Afaik formula itself holds just as well for float
charges.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the charge from the QuantumState
or your tests are using int
. So then a potential cast to int will be done at that point of comparison. Hence I would rather put it in that function. It might hold for float charges, but actually measurable particle has float charge. So you could also filter this problem there. if (charge).is_integer(): return int(charge)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the filtering should take place here:
expertsystem/expertsystem/data.py
Lines 192 to 195 in c0abac0
if ( | |
state.isospin is not None | |
and compute_gellmann_nishijima(state) != state.charge | |
): |
This check will fail if the GM fomula returned a
float
that is not an integer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (charge).is_integer(): return int(charge)
To be clear: this would also mean raising an exception if the charge is not castable to int
. For me that is unexpected behaviour in a function that is just supposed to compute the Gell-Mann–Nishijima formula (as its name states).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, you have a point. So I think you are right, we do not have to put any more assumptions in there. I just want to make sure we are actually catching out the ill defined particles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think because particle.charge
is of type int
, we are on the safe side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Particle
instances with non-castable float
charge raise an exception, even if they comply with the Gell-Mann–Nishijima formula. QuantumState
instances with weird charges are allowed, but there's no check on GM formula there anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And mypy would fish out float charges anyways right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but mypy isn't checked on outside scripts, it's only used as a consistency check for the framework and tests themselves. But for a user running, say, a Jupyter notebook, an exception would be raised for any Particle
that has unphysical charge (as per Gell-Mann–Nishijima formula + cast check). QuantumState
remains an internal matter, however.
No description provided.