Class ParticleList

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

public class ParticleList extends Object
Author:
gavalian
  • Constructor Summary

    Constructors
    Constructor
    Description
    creates an empty list of particles.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    adds particle to the list.
    void
    clears the list. resulting list will have zero elements.
    int
    returns number of the particles in the list.
    int
    countByCharge(int charge)
    returns number of particles of given charge
    int
    countByPid(int pid)
    returns number of particles with given particle id (LUND id)
    getByCharge(int charge, int skip)
    returns particles by charge skipping skip particles.
    getByPid(int pid, int skip)
    returns particle with id = pid and skips 'skip' particles
    returns LUND representation string of the list.

    Methods inherited from class java.lang.Object

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

    • ParticleList

      public ParticleList()
      creates an empty list of particles.
  • Method Details

    • add

      public void add(Particle p)
      adds particle to the list.
      Parameters:
      p - new Particle to add to the list.
    • clear

      public void clear()
      clears the list. resulting list will have zero elements.
    • count

      public int count()
      returns number of the particles in the list.
      Returns:
      particle count in the list.
    • countByCharge

      public int countByCharge(int charge)
      returns number of particles of given charge
      Parameters:
      charge - charge of the particle
      Returns:
      count
    • countByPid

      public int countByPid(int pid)
      returns number of particles with given particle id (LUND id)
      Parameters:
      pid - particle id
      Returns:
      count number of particles with given pid
    • getByPid

      public Particle getByPid(int pid, int skip)
      returns particle with id = pid and skips 'skip' particles
      Parameters:
      pid -
      skip -
      Returns:
      Particle class
    • getByCharge

      public Particle getByCharge(int charge, int skip)
      returns particles by charge skipping skip particles.
      Parameters:
      charge -
      skip -
      Returns:
      Particle class
    • toLundString

      public String toLundString()
      returns LUND representation string of the list. For each particle toLundString() method is called.
      Returns:
      string representation of the event.