-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Feature] expose weight calculation of events as method #20
Comments
It's interesting, but I'm not sure exposing PDK is the correct way. PDK is internal, and doesn't give a full answer to things directly. Maybe it's better to add a method in |
Not the pdk itself, but the recursively called. Because the generation of the events and the weights are actually independent, knowing the masses is enough, right? But yes, we can also have this directly, even |
I am not sure how to implement |
I think given the 4-mom of all the final state particle, P_i, that are all calculated in the mother rest frame. We just need to ensure sum{P_i} = P_{mother} = (Mass_{mother}, 0, 0, 0). |
Yup, that would be nice because it would open the door to doing nice things with Dalitz. But for example, in the Dalitz it's enough to have the masses, so I'm not sure how I would deal with that... |
For Dalitz, if you want to just uses masses then you can ensure they are within phase space using Eq48.23a and 48.23b: http://pdg.lbl.gov/2017/reviews/rpp2017-rev-kinematics.pdf And you can also build the 4-mom of the final state particles in the mother rest frame. Here you can calculate the mag of particle 3-mom in mother rest frame using 48.21b for all final states and since it is Dalitz where oreintation does not matter you can set the angle between each of the particles in the mother rest frame to be 120 degrees. |
It could be useful to have a method that returns the event weights, or more direct, that tells whether something is inside or outside the phasespace (as @abhijitm08 asked for). I think it goes well into the scope of phasespace, most of all since the
Particle
knows everything it has to know.My idea: extract the pdk function, expose it (https://github.com/zfit/phasespace/blob/master/phasespace/phasespace.py#L343). Make sure it returns something negative (or 0) if it is not allowed. The selection (a
tf.where(weights > 0, ...)
itself may be done on the user site and does not have to be part ofParticle
.What do you think, @apuignav?
The text was updated successfully, but these errors were encountered: