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

Class Hep3Vector

  • All Implemented Interfaces:
    java.io.Serializable


    public class Hep3Vector
    extends java.lang.Object
    implements java.io.Serializable
    Basic implementation of a Hep3Vector
    See Also:
    Serialized Form
    • Constructor Detail

      • Hep3Vector

        public Hep3Vector()
        New 3-vector
      • Hep3Vector

        public Hep3Vector(double dx,
                          double dy,
                          double dz)
        Define a 3-vector
        Parameters:
        dx -
        dy -
        dz -
      • Hep3Vector

        public Hep3Vector(double[] d)
        Create a BasicHep3Vector from a double array
        Parameters:
        d - An array {x,y,z}
      • Hep3Vector

        public Hep3Vector(float[] f)
        Define a new vector
        Parameters:
        f -
    • Method Detail

      • abs

        public double abs()
        Magnitude
        Returns:
      • cosTheta

        public double cosTheta()
        cosTheta
        Returns:
      • phi

        public double phi()
        Phi
        Returns:
      • add

        public void add(Hep3Vector v)
        Add a vector
        Parameters:
        v -
      • sub

        public void sub(Hep3Vector v)
        Subtract
        Parameters:
        v -
      • mult

        public Hep3Vector mult(double scalar,
                               Hep3Vector v)
        Multiply by a scaler
        Parameters:
        scalar -
        v -
        Returns:
      • mult

        public void mult(double scalar)
        Multiply by a scaler
        Parameters:
        scalar -
      • centerOfMass

        public Hep3Vector centerOfMass(java.util.List<Hep3Vector> vecSet)
        Return a center of mass of a list of vectors
        Parameters:
        vecSet -
        Returns:
      • cross

        public Hep3Vector cross(Hep3Vector v,
                                Hep3Vector w)
        Cross product of 2 vectors
        Parameters:
        v - vector 1
        w - vector 2
        Returns:
        cross product
      • dot

        public double dot(Hep3Vector v,
                          Hep3Vector w)
        Dot product of 2 vectors
        Parameters:
        v - vector 1
        w - vector 2
        Returns:
        product
      • perp

        public double perp()
        Transverse
        Returns:
      • dot

        public double dot(Hep3Vector p)
        Dot operation
        Parameters:
        p -
        Returns:
      • perp2

        public double perp2()
        Transverse
        Returns:
      • angle

        public double angle(Hep3Vector momentum)
        Angle between 2 vectors
        Parameters:
        momentum -
        Returns:
      • setV

        public void setV(double dx,
                         double dy,
                         double dz)
        Set vector
        Parameters:
        dx -
        dy -
        dz -
      • x

        public double x()
      • y

        public double y()
      • z

        public double z()
      • setX

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

        public void setY(double y)
        Y component
        Parameters:
        y -
      • setZ

        public void setZ(double z)
        Set Z component
        Parameters:
        z -
      • mag2

        public double mag2()
      • theta

        public double theta()
        angle theta (=atan2(perp(),z)
        Returns:
      • cosTheta

        public double cosTheta(Hep3Vector vector)
        Cosine Theta
        Parameters:
        vector -
        Returns:
      • setPhi

        public void setPhi(double ph)
        Set phi
        Parameters:
        ph - phi in radians
      • 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()
      • mag

        public double mag()
      • magnitudeSquared

        public double magnitudeSquared()
      • v

        public double[] v()
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG