API documentation of the 'hephysics.jet.ParticleD' Java class
ParticleD
hephysics.jet

Class ParticleD

ParticleD
hephysics.jet

Class ParticleD

  • All Implemented Interfaces:
    Serializable, Comparable<ParticleD>


    public class ParticleDextends Objectimplements Comparable<ParticleD>, Serializable
    A class representing a jet or particle with pre-computed px,py,pz,e (double precision). It uses double types to keep information on 4-meomenta. The merging is done in the 4-momentum space. The class has a minimum dynamic computation to minimize CPU usage.
    See Also:
    Serialized Form
    • Constructor Detail

      • ParticleD

        public ParticleD()
        Initialize pseudoparticle.
      • ParticleD

        public ParticleD(double px,                 double py,                 double pz,                 double energy)
        Initialize from 4-momenta.
        Parameters:
        px -
        py -
        pz -
        energy -
    • Method Detail

      • setPxPyPzE

        public void setPxPyPzE(double px,                       double py,                       double pz,                       double energy)
        Initialize from 4-momenta.
        Parameters:
        px -
        py -
        pz -
        energy -
      • setPtEtaPhiM

        public void setPtEtaPhiM(double pt,                         double eta,                         double phi,                         double m)
        Set 4-momentum of a particle using transverse momentum (pt), pseudorapidity (eta) and azimuthal angle (phi) and mass (m). In this case, the energy is FastMath.sqrt(px*px+py*py+pz*pz-m*m).

        Parameters:
        pt - transverse momentum of a particle.
        eta - eta (pseudorapidity) .
        phi - azimuthal angle
        m - mass
      • eta

        public double eta()
        Compute pseudorapidity.
        Returns:
        pseudorapidity.
      • et2

        public double et2()
        Compute transverse energy squared.
        Returns:
        transverse energy squared.
      • et

        public double et()
        Compute transverse energy.
        Returns:
        transverse energy.
      • mass

        public double mass()
        Compute mass.
        Returns:
        mass
      • m

        public double m()
        Compute mass.
        Returns:
        mass
      • rapidity

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

        public double mag()
        Compute magnitude sqrt(px**2+py**2+pz**2)
        Returns:
        mag
      • perp2

        public double perp2()
        Compute pT**2.
        Returns:
        pt**2
      • perp

        public double perp()
        Compute transverse momentum (pT).
        Returns:
        Transverse momentum (pt)
      • setEnergy

        public void setEnergy(double energy)
        Set energy.
      • compareTo

        public int compareTo(ParticleD o)
        Comparator. Use pT2 for comparison (in increasing order)
        Specified by:
        compareTo in interface Comparable<ParticleD>
        Parameters:
        o - particle
        Returns:
      • copy

        public ParticleD copy(ParticleD o)
        Copy a particle.
        Parameters:
        o -
        Returns:
        a copy of particle
      • toString

        public String toString()
        Convert a particle to a string.
        Overrides:
        toString in class Object
        Returns:
        a string with the particle
      • px

        public double px()
        Get px.
        Returns:
        px component
      • py

        public double py()
        Get py.
        Returns:
        py component
      • pz

        public double pz()
        Get pz.
        Returns:
        pz component
      • getRapidity

        public double getRapidity()
        Get cached rapidity
        Returns:
        rapidity
      • getPt2

        public double getPt2()
        Get cached perp**2.
        Returns:
        perp2.
      • getPt

        public double getPt()
        Get cached Pt.
        Returns:
        et transverse energy
      • getPhi

        public double getPhi()
        Get cached phi
        Returns:
        cached phi
      • getConstituentsList

        public List<Integer> getConstituentsList()
        Get indexes of constituents, iff filled with the "add" method
        Returns:
        list of constituents.
      • addConstituent

        public void addConstituent(int i)
      • getConstituents

        public int[] getConstituents()
        Get indexes of constituents, iff filled with the "add" method
        Returns:
        array of constituents.
      • phi

        public double phi()
        Compute Phi
        Returns:
      • e

        public double e()
        Get energy.
        Returns:
        energy component
      • setPx

        public void setPx(double px)
      • setPy

        public void setPy(double py)
      • setPz

        public void setPz(double pz)
      • setRapidity

        public void setRapidity(double rapidity)
      • setPhi

        public void setPhi(double phi)
      • setPt2

        public void setPt2(double pt2)
      • cachePhiRapidity

        public void cachePhiRapidity()
        The method precomputers Phi, Rapidity and Pt2 and store them. Such caching makes faster computations. Use getRapidity(), getPhi(), getPt2() methods to return such values.
      • add

        public void add(ParticleD a)
        Add to this particle another particle. The method also precomputes rapidity, phi and pt2 for fast retrival using getPhi, getRapidity methods.
        Parameters:
        a -
      • add

        public void add(ParticleD a,                int index)
        Add to this particle another particle. Also add index of the added particle, which will be stored as an array. The method also precomputes rapidity, phi and et2 for fast retrival using getPhi, getRapidity methods.
        Parameters:
        a -
        index - index of the particle to be stored
      • hashCode

        public int hashCode()
        Get a hash code
        Overrides:
        hashCode in class Object

DMelt 2.0 © DataMelt by jWork.ORG