diff --git a/src/vector/_methods.py b/src/vector/_methods.py index 7511cda6..d8febb3e 100644 --- a/src/vector/_methods.py +++ b/src/vector/_methods.py @@ -206,6 +206,13 @@ def to_xy(self) -> VectorProtocolPlanar: """ raise AssertionError + def to_pxpy(self) -> VectorProtocolPlanar: + """ + Converts to $px$-$py$ coordinates, possibly eliminating dimensions with a + projection. + """ + raise AssertionError + def to_rhophi(self) -> VectorProtocolPlanar: r""" Converts to $\rho$-$\phi$ coordinates, possibly eliminating dimensions with a @@ -213,6 +220,13 @@ def to_rhophi(self) -> VectorProtocolPlanar: """ raise AssertionError + def to_ptphi(self) -> VectorProtocolPlanar: + r""" + Converts to $pt$-$\phi$ coordinates, possibly eliminating dimensions with a + projection. + """ + raise AssertionError + def to_xyz(self) -> VectorProtocolSpatial: """ Converts to $x$-$y$-$z$ coordinates, possibly eliminating or imputing @@ -234,6 +248,27 @@ def to_xyeta(self) -> VectorProtocolSpatial: """ raise AssertionError + def to_pxpypz(self) -> VectorProtocolSpatial: + """ + Converts to $px$-$py$-$pz$ coordinates, possibly eliminating or imputing + dimensions with a projection. + """ + raise AssertionError + + def to_pxpytheta(self) -> VectorProtocolSpatial: + r""" + Converts to $px$-$py$-$\theta$ coordinates, possibly eliminating or imputing + dimensions with a projection. + """ + raise AssertionError + + def to_pxpyeta(self) -> VectorProtocolSpatial: + r""" + Converts to $px$-$py$-$\eta$ coordinates, possibly eliminating or imputing + dimensions with a projection. + """ + raise AssertionError + def to_rhophiz(self) -> VectorProtocolSpatial: r""" Converts to $\rho$-$\phi$-$z$ coordinates, possibly eliminating or imputing @@ -255,6 +290,27 @@ def to_rhophieta(self) -> VectorProtocolSpatial: """ raise AssertionError + def to_ptphipz(self) -> VectorProtocolSpatial: + r""" + Converts to $pt$-$\phi$-$pz$ coordinates, possibly eliminating or imputing + dimensions with a projection. + """ + raise AssertionError + + def to_ptphitheta(self) -> VectorProtocolSpatial: + r""" + Converts to $pt$-$\phi$-$\theta$ coordinates, possibly eliminating or + imputing dimensions with a projection. + """ + raise AssertionError + + def to_ptphieta(self) -> VectorProtocolSpatial: + r""" + Converts to $pt$-$\phi$-$\eta$ coordinates, possibly eliminating or + imputing dimensions with a projection. + """ + raise AssertionError + def to_xyzt(self) -> VectorProtocolLorentz: """ Converts to $x$-$y$-$z$-$t$ coordinates, possibly imputing dimensions with @@ -297,6 +353,48 @@ def to_xyetatau(self) -> VectorProtocolLorentz: """ raise AssertionError + def to_pxpypzenergy(self) -> VectorProtocolLorentz: + r""" + Converts to $px$-$py$-$pz$-$energy$ coordinates, possibly imputing dimensions + with a projection. + """ + raise AssertionError + + def to_pxpythetaenergy(self) -> VectorProtocolLorentz: + r""" + Converts to $px$-$py$-$\theta$-$energy$ coordinates, possibly imputing + dimensions with a projection. + """ + raise AssertionError + + def to_pxpyetaenergy(self) -> VectorProtocolLorentz: + r""" + Converts to $px$-$py$-$\eta$-$energy$ coordinates, possibly imputing dimensions + with a projection. + """ + raise AssertionError + + def to_pxpypzmass(self) -> VectorProtocolLorentz: + r""" + Converts to $px$-$py$-$pz$-$mass$ coordinates, possibly imputing dimensions + with a projection. + """ + raise AssertionError + + def to_pxpythetamass(self) -> VectorProtocolLorentz: + r""" + Converts to $px$-$py$-$\theta$-$energy$ coordinates, possibly imputing dimensions + with a projection. + """ + raise AssertionError + + def to_pxpyetamass(self) -> VectorProtocolLorentz: + r""" + Converts to $px$-$py$-$\eta$-$mass$ coordinates, possibly imputing dimensions + with a projection. + """ + raise AssertionError + def to_rhophizt(self) -> VectorProtocolLorentz: r""" Converts to $\rho$-$\phi$-$z$-$t$ coordinates, possibly imputing dimensions @@ -339,6 +437,48 @@ def to_rhophietatau(self) -> VectorProtocolLorentz: """ raise AssertionError + def to_ptphipzenergy(self) -> VectorProtocolLorentz: + r""" + Converts to $pt$-$\phi$-$pz$-$energy$ coordinates, possibly imputing dimensions + with a projection. + """ + raise AssertionError + + def to_ptphithetaenergy(self) -> VectorProtocolLorentz: + r""" + Converts to $pt$-$\phi$-$\theta$-$energy$ coordinates, possibly imputing + dimensions with a projection. + """ + raise AssertionError + + def to_ptphietaenergy(self) -> VectorProtocolLorentz: + r""" + Converts to $pt$-$\phi$-$\eta$-$energy$ coordinates, possibly imputing dimensions + with a projection. + """ + raise AssertionError + + def to_ptphipzmass(self) -> VectorProtocolLorentz: + r""" + Converts to $pt$-$\phi$-$pz$-$mass$ coordinates, possibly imputing dimensions + with a projection. + """ + raise AssertionError + + def to_ptphithetamass(self) -> VectorProtocolLorentz: + r""" + Converts to $pt$-$\phi$-$\theta$-$mass$ coordinates, possibly imputing dimensions + with a projection. + """ + raise AssertionError + + def to_ptphietamass(self) -> VectorProtocolLorentz: + r""" + Converts to $pt$-$\phi$-$\theta$-$mass$ coordinates, possibly imputing dimensions + with a projection. + """ + raise AssertionError + def unit(self: SameVectorType) -> SameVectorType: """ Returns vector(s) normalized to unit length, which is `rho == 1` for 2D @@ -2656,6 +2796,9 @@ def to_xy(self) -> VectorProtocolPlanar: 1, ) + def to_pxpy(self) -> VectorProtocolPlanar: + return self.to_xy() + def to_rhophi(self) -> VectorProtocolPlanar: from vector._compute import planar @@ -2666,6 +2809,9 @@ def to_rhophi(self) -> VectorProtocolPlanar: 1, ) + def to_ptphi(self) -> VectorProtocolPlanar: + return self.to_rhophi() + def to_xyz(self) -> VectorProtocolSpatial: from vector._compute import planar, spatial @@ -2708,6 +2854,15 @@ def to_xyeta(self) -> VectorProtocolSpatial: 1, ) + def to_pxpypz(self) -> VectorProtocolSpatial: + return self.to_xyz() + + def to_pxpytheta(self) -> VectorProtocolSpatial: + return self.to_xytheta() + + def to_pxpyeta(self) -> VectorProtocolSpatial: + return self.to_xyeta() + def to_rhophiz(self) -> VectorProtocolSpatial: from vector._compute import planar, spatial @@ -2750,6 +2905,15 @@ def to_rhophieta(self) -> VectorProtocolSpatial: 1, ) + def to_ptphipz(self) -> VectorProtocolSpatial: + return self.to_rhophiz() + + def to_ptphitheta(self) -> VectorProtocolSpatial: + return self.to_rhophitheta() + + def to_ptphieta(self) -> VectorProtocolSpatial: + return self.to_rhophieta() + def to_xyzt(self) -> VectorProtocolLorentz: from vector._compute import lorentz, planar, spatial @@ -2852,6 +3016,24 @@ def to_xyetatau(self) -> VectorProtocolLorentz: 1, ) + def to_pxpypzenergy(self) -> VectorProtocolLorentz: + return self.to_xyzt() + + def to_pxpythetaenergy(self) -> VectorProtocolLorentz: + return self.to_xythetat() + + def to_pxpyetaenergy(self) -> VectorProtocolLorentz: + return self.to_xyetat() + + def to_pxpypzmass(self) -> VectorProtocolLorentz: + return self.to_xyztau() + + def to_pxpythetamass(self) -> VectorProtocolLorentz: + return self.to_xythetatau() + + def to_pxpyetamass(self) -> VectorProtocolLorentz: + return self.to_xyetatau() + def to_rhophizt(self) -> VectorProtocolLorentz: from vector._compute import lorentz, planar, spatial @@ -2954,6 +3136,24 @@ def to_rhophietatau(self) -> VectorProtocolLorentz: 1, ) + def to_ptphipzenergy(self) -> VectorProtocolLorentz: + return self.to_rhophizt() + + def to_ptphithetaenergy(self) -> VectorProtocolLorentz: + return self.to_rhophithetat() + + def to_ptphietaenergy(self) -> VectorProtocolLorentz: + return self.to_rhophietat() + + def to_ptphipzmass(self) -> VectorProtocolLorentz: + return self.to_rhophiztau() + + def to_ptphithetamass(self) -> VectorProtocolLorentz: + return self.to_rhophithetatau() + + def to_ptphietamass(self) -> VectorProtocolLorentz: + return self.to_rhophietatau() + class Vector2D(Vector, VectorProtocolPlanar): def to_Vector2D(self) -> VectorProtocolPlanar: