Skip to content
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

Add boostCM_of to clarify #134, supported by scale*D and neg*D. #135

Merged
merged 3 commits into from
Aug 12, 2021

Conversation

jpivarski
Copy link
Member

@jpivarski jpivarski commented Aug 12, 2021

Adds the following to 2D vectors:

  • scale2D: same as scale
  • neg2D: same as scaling/multiplying by -1

Adds the following to 3D vectors:

  • scale2D: only scales the azimuthal components
  • scale3D: same as scale
  • neg2D: only negates the azimuthal components
  • neg3D: same as scaling/multiplying by -1

Adds the following to 4D vectors:

  • scale2D: only scales the azimuthal components
  • scale3D: only scales the azimuthal and longitudinal components
  • scale4D: same as scale
  • neg2D: only negates the azimuthal components
  • neg3D: only negates the azimuthal and longitudinal components
  • neg4D: same as scaling/multiplying by -1
  • boostCM_of_p4(p4): boosts to the center-of-mass (CM) frame of p4 (same as boost_p4(p4.neg3D))
  • boostCM_of_beta3(beta3): boosts to the center-of-mass (CM) frame of beta3 (same as boost_beta3(-beta3))
  • boostCM_of(booster): uses one of the two above, depending on the dimension of the booster

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.)

@jpivarski jpivarski linked an issue Aug 12, 2021 that may be closed by this pull request
@jpivarski jpivarski merged commit e39ddb1 into main Aug 12, 2021
@jpivarski jpivarski deleted the jpivarski/boostCM_of-scalenD-negnD branch August 12, 2021 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to boost to the center of mass?
1 participant