Add boostCM_of to clarify #134, supported by scale*D and neg*D. #135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds the following to 2D vectors:
scale2D
: same asscale
neg2D
: same as scaling/multiplying by-1
Adds the following to 3D vectors:
scale2D
: only scales the azimuthal componentsscale3D
: same asscale
neg2D
: only negates the azimuthal componentsneg3D
: same as scaling/multiplying by-1
Adds the following to 4D vectors:
scale2D
: only scales the azimuthal componentsscale3D
: only scales the azimuthal and longitudinal componentsscale4D
: same asscale
neg2D
: only negates the azimuthal componentsneg3D
: only negates the azimuthal and longitudinal componentsneg4D
: same as scaling/multiplying by-1
boostCM_of_p4(p4)
: boosts to the center-of-mass (CM) frame ofp4
(same asboost_p4(p4.neg3D)
)boostCM_of_beta3(beta3)
: boosts to the center-of-mass (CM) frame ofbeta3
(same asboost_beta3(-beta3)
)boostCM_of(booster)
: uses one of the two above, depending on the dimension of thebooster
The main motivation was for a method that boosts to the center-of-mass frame of a given vector, as that was difficult to do with
boost
(you had to negate the spatial components only, and there wasn't a method/property for that). The rest of this is to support that function, and for consistency.All of the associated Numba methods have been implemented as well. (None of the above involved any new compute kernels; it was just applying the right ones to each type.)