Documentation of 'hephysics.vec.HepLorentzVector' Java class.
HepLorentzVector
hephysics.vec

Class HepLorentzVector

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    LParticle


    public class HepLorentzVector
    extends java.lang.Object
    implements java.io.Serializable
    a HepLorentzVector (4-vector). It can hold either space-coordinate and time (x,y,z,t) or 4-momentum (px,py,pz,energy).
    See Also:
    Serialized Form
    • Constructor Detail

      • HepLorentzVector

        public HepLorentzVector()
        Default Lorentz vector constructor
      • HepLorentzVector

        public HepLorentzVector(double x,
                                double y,
                                double z,
                                double t)
        Define a Lorentz vector This can either be (x,y,z,time) or (px,py,pz,energy)
        Parameters:
        x - X position (or Px)
        y - Y position (or Py)
        z - Z position (or Pz)
        t - time or energy
      • HepLorentzVector

        public HepLorentzVector(double[] x,
                                double t)
        Define a Lorentz vector
        Parameters:
        x - 3-vector position or momentum
        t - time or energy
      • HepLorentzVector

        public HepLorentzVector(float[] x,
                                double t)
        Define a Lorentz vector
        Parameters:
        x - 3-vector with position or 3-momentum
        t - time or energy
      • HepLorentzVector

        public HepLorentzVector(Hep3Vector v,
                                double t)
        Define Lorentz vector
        Parameters:
        x - 3-vector with position or 3-momentum
        t - time or energy
    • Method Detail

      • setV3

        public void setV3(Hep3Vector v)
        Set 3-vector
        Parameters:
        v - position 9x,y,z)
      • setV3

        public void setV3(double x,
                          double y,
                          double z)
        Set 3-vector position or Px,Py,Pz
        Parameters:
        x - X
        y - Y
        z - Z
      • px

        public double px()
        Get X position or (Px,Py,Pz)
        Returns:
        X
      • py

        public double py()
        Get Y position or Py
        Returns:
        Y
      • pz

        public double pz()
        Get Z position ot Pz
        Returns:
        Z
      • x

        public double x()
        Get X position or Px
        Returns:
        X
      • y

        public double y()
        Get Y
        Returns:
        Y
      • z

        public double z()
        Get Z position or Pz
        Returns:
        Z
      • e

        public double e()
        Get energy
        Returns:
      • getE

        public double getE()
        Get energy (as e())
        Returns:
      • setPx

        public void setPx(double px)
        Set Px
        Parameters:
        px -
      • setPy

        public void setPy(double py)
        Set Py
        Parameters:
        py -
      • setPz

        public void setPz(double pz)
        Set Pz
        Parameters:
        pz -
      • setX

        public void setX(double x)
        Set X position.
        Parameters:
        x - position.
      • setY

        public void setY(double y)
        Set Y position.
        Parameters:
        y - Y position.
      • setZ

        public void setZ(double z)
        Set Z position.
        Parameters:
        z - X position.
      • add

        public void add(HepLorentzVector parent)
        Add 2 Lorentz vectors
        Parameters:
        parent -
      • mt2

        public double mt2()
        Transverse mass: e()*e() - pz()*pz()
        Returns:
      • mag2

        public double mag2()
        Magnitude squared: t()*t() - v.mag2() or e()*e() - v.mag2(). This corresponds to the invariant mass squared
        Returns:
      • boost

        public void boost(double bx,
                          double by,
                          double bz)
        Lorentz Boost using 3-vector
        Parameters:
        bx - X
        by - Y
        bz - Z
      • setE

        public void setE(double e)
        Set energy
        Parameters:
        e - energy
      • setT

        public void setT(double t)
        Set time
        Parameters:
        t - time
      • t

        public double t()
        Get time
        Returns:
        time
      • getT

        public double getT()
        Get time (as t())
        Returns:
      • v3

        public Hep3Vector v3()
        Get 3-vector
        Returns:
        3-vector
      • et2

        public double et2()
        Transverse energy squared.
      • et

        public double et()
        Transverse energy.
        Returns:
      • restMass2

        public double restMass2()
        Rest mass squared -- same as m2()
        Returns:
      • mt

        public double mt()
        Transverse mass.
        Returns:
      • invariantMass2

        public double invariantMass2()
        Same as m2().
        Returns:
      • m2

        public double m2()
        Invariant mass squared
        Returns:
        t**2 - x**2-y**2-z**2
      • invariantMass

        public double invariantMass()
        Same as m(). If m2() is negative then -sqrt(-m2()) is returned.
        Returns:
      • m

        public double m()
        Invariant mass. If m2() is negative then -sqrt(-m2()) is returned.
        Returns:
        invariant mass
      • isSpacelike

        public boolean isSpacelike()
        Is particle spacelike (i.e restMass2() smaller than 0)
        Returns:
        true if spacelike
      • isLightlike

        public boolean isLightlike(double epsilon)
        is spacelike?
        Parameters:
        epsilon - precision
        Returns:
      • centerOfMass

        public Hep3Vector centerOfMass(java.util.List<HepLorentzVector> vecSet)
        Return a center mass vector
        Parameters:
        vecSet -
        Returns:
      • cosTheta

        public double cosTheta()
        cosTheta
        Returns:
      • phi

        public double phi()
        Phi
        Returns:
      • perp

        public double perp()
        Transverse momentum.
        Returns:
        pt
      • perp2

        public double perp2()
        Transverse momentum squared
        Returns:
        pt*pt
      • angle

        public double angle(HepLorentzVector momentum)
        Angle between 2 vectors
        Parameters:
        momentum -
        Returns:
      • theta

        public double theta()
        Get theta angle
        Returns:
      • pseudoRapidity

        public double pseudoRapidity()
        Pseudorapidity. eta=-ln (tan (theta/2)) )
        Returns:
      • rapidity

        public double rapidity()
        Rapidity. 0.5*log( (m+z)/(m-z) );
        Returns:
      • getEta

        public double getEta()
        Get a pseudorapidity: eta=-ln (tan (theta/2)) )
        Returns:
        pseudorapidity
      • getV3

        public Hep3Vector getV3()
        Get 3-vector
        Returns:
        3-vector
      • mag

        public double mag()
        Magnitude sqrt(x**2+y**2+z**2)
        Returns:
      • skp

        public double skp(HepLorentzVector momentum)
        Useful: for x1*x2+y1*y2+z1*z2
        Parameters:
        momentum -
        Returns:
      • equals

        public boolean equals(java.lang.Object obj)
        Compre 2 vectors
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Hash code
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Convert to string
        Overrides:
        toString in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG