Class Particle

java.lang.Object
org.jlab.clas.physics.Particle

public class Particle extends Object
Author:
gavalian
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Particle(int pid, double mass, byte charge, double px, double py, double pz, double vx, double vy, double vz)
     
    Particle(int pid, double px, double py, double pz)
     
    Particle(int pid, double px, double py, double pz, double vx, double vy, double vz)
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    changePid(int pid)
     
    int
    returns charge of the particle.
    void
     
    void
    combine(Particle cpart, int sign)
     
    void
    copy(Particle part)
     
    void
    Sets the content of this particle to the particle passed as an argument.
    double
     
    static Particle
    createWithMassCharge(double mass, int charge, double px, double py, double pz, double vx, double vy, double vz)
     
    static Particle
    createWithPid(int pid, double px, double py, double pz, double vx, double vy, double vz)
     
    double
    e()
     
    double
     
    double
    get(String pname)
    returns property of a particle by string, used by string parser.
    double
    returns the value of the property with given name.
    int
    gid()
    returns GEANT ID of the particle.
    boolean
    Checks if the particle has property with given name.
    inFrame(Particle parent)
    transforms particle into the frame of parent particle given as and argument.
    final void
    initParticle(int pid, double px, double py, double pz, double vx, double vy, double vz)
     
    final void
    initParticleWithMass(double mass, double px, double py, double pz, double vx, double vy, double vz)
     
    void
    initParticleWithPidMassSquare(int pid, int charge, double mass2, double px, double py, double pz, double vx, double vy, double vz)
     
    double
    returns mass of the particle. short cat to Particle.vector().mass()
    double
    returns squared mass of the particle. shortcut to Particle.vector().mass2()
    double
    p()
     
     
    double
    phi()
     
    int
    pid()
    returns Lund ID for the particle.
    returns string containing string representation of key,value pairs of properties.
    double
    px()
     
    double
    py()
     
    double
    pz()
     
    void
    setP(double mom)
    Change the particle momenta from it's original value to new value
    void
    setParticleWithMass(double mass, byte charge, double px, double py, double pz, double vx, double vy, double vz)
     
    void
    setProperty(String pname, double value)
    adds property to the property list of the particle
    void
    setTheta(double theta)
     
    void
    setVector(int pid, double px, double py, double pz, double vx, double vy, double vz)
     
    void
    setVector(int pid, Vector3 nvect, Vector3 nvert)
     
    void
     
    double
     
    returns a string representing the particle in LUND format.
    returns string representation of the particle.
    returns reference to particle lorentz vector.
    returns the vertex of the particle.
    double
    vx()
     
    double
    vy()
     
    double
    vz()
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Particle

      public Particle()
    • Particle

      public Particle(Particle p)
    • Particle

      public Particle(int pid, double px, double py, double pz, double vx, double vy, double vz)
    • Particle

      public Particle(int pid, double px, double py, double pz)
    • Particle

      public Particle(int pid, double mass, byte charge, double px, double py, double pz, double vx, double vy, double vz)
  • Method Details

    • createWithMassCharge

      public static Particle createWithMassCharge(double mass, int charge, double px, double py, double pz, double vx, double vy, double vz)
    • createWithPid

      public static Particle createWithPid(int pid, double px, double py, double pz, double vx, double vy, double vz)
    • initParticleWithMass

      public final void initParticleWithMass(double mass, double px, double py, double pz, double vx, double vy, double vz)
    • initParticle

      public final void initParticle(int pid, double px, double py, double pz, double vx, double vy, double vz)
    • setP

      public void setP(double mom)
      Change the particle momenta from it's original value to new value
      Parameters:
      mom - new particle momenta
    • setTheta

      public void setTheta(double theta)
    • changePid

      public void changePid(int pid)
    • setParticleWithMass

      public void setParticleWithMass(double mass, byte charge, double px, double py, double pz, double vx, double vy, double vz)
    • setVector

      public void setVector(int pid, double px, double py, double pz, double vx, double vy, double vz)
    • px

      public double px()
    • py

      public double py()
    • pz

      public double pz()
    • p

      public double p()
    • theta

      public double theta()
    • phi

      public double phi()
    • e

      public double e()
    • vx

      public double vx()
    • vy

      public double vy()
    • vz

      public double vz()
    • clearProperties

      public void clearProperties()
    • setVector

      public void setVector(int pid, Vector3 nvect, Vector3 nvert)
    • euclideanDistance

      public double euclideanDistance(Particle part)
    • cosTheta

      public double cosTheta(Particle part)
    • initParticleWithPidMassSquare

      public void initParticleWithPidMassSquare(int pid, int charge, double mass2, double px, double py, double pz, double vx, double vy, double vz)
    • setVector

      public void setVector(LorentzVector nvec, Vector3 nvert)
    • mass

      public double mass()
      returns mass of the particle. short cat to Particle.vector().mass()
      Returns:
      mass of the particle
    • mass2

      public double mass2()
      returns squared mass of the particle. shortcut to Particle.vector().mass2()
      Returns:
      mass squared
    • charge

      public int charge()
      returns charge of the particle.
      Returns:
      charge
    • pid

      public int pid()
      returns Lund ID for the particle.
      Returns:
      Lund id
    • gid

      public int gid()
      returns GEANT ID of the particle.
      Returns:
      GEANT id
    • vector

      public LorentzVector vector()
      returns reference to particle lorentz vector.
      Returns:
      lorentz vector
    • vertex

      public Vector3 vertex()
      returns the vertex of the particle.
      Returns:
      vector object
    • getProperty

      public double getProperty(String pname)
      returns the value of the property with given name. If property does not exist, 0.0 will be returned. No warning message is printed.
      Parameters:
      pname - property name
      Returns:
      property value
    • inFrame

      public Particle inFrame(Particle parent)
      transforms particle into the frame of parent particle given as and argument.
      Parameters:
      parent - particle frame
      Returns:
      same particle in a parent frame
    • get

      public double get(String pname)
      returns property of a particle by string, used by string parser.
      Parameters:
      pname -
      Returns:
    • hasProperty

      public boolean hasProperty(String pname)
      Checks if the particle has property with given name.
      Parameters:
      pname - property name
      Returns:
      ture is exists, false otherwise
    • setProperty

      public void setProperty(String pname, double value)
      adds property to the property list of the particle
      Parameters:
      pname - property name
      value - property value
    • propertyString

      public String propertyString()
      returns string containing string representation of key,value pairs of properties.
      Returns:
      string printout of properties map
    • toLundString

      public String toLundString()
      returns a string representing the particle in LUND format. Used in The PhysicsEvent class to output into LUND file.
      Returns:
      LUND string of the particle
    • toString

      public String toString()
      returns string representation of the particle. Unlike LUND string, this string contains particle momentum, and angles in degrees, it is more readable.
      Overrides:
      toString in class Object
      Returns:
      string representation for particle
    • copyParticle

      public void copyParticle(Particle part)
      Sets the content of this particle to the particle passed as an argument.
      Parameters:
      part - particle to copy from.
    • copy

      public void copy(Particle part)
    • combine

      public void combine(Particle cpart, int sign)
    • particleDoca

      public Vector3 particleDoca(Particle cpart)