Package org.jlab.clas.physics
Class ParticleList
java.lang.Object
org.jlab.clas.physics.ParticleList
- Author:
- gavalian
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadds particle to the list.voidclear()clears the list. resulting list will have zero elements.intcount()returns number of the particles in the list.intcountByCharge(int charge) returns number of particles of given chargeintcountByPid(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' particlesreturns LUND representation string of the list.
-
Constructor Details
-
ParticleList
public ParticleList()creates an empty list of particles.
-
-
Method Details
-
add
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
returns particle with id = pid and skips 'skip' particles- Parameters:
pid-skip-- Returns:
- Particle class
-
getByCharge
returns particles by charge skipping skip particles.- Parameters:
charge-skip-- Returns:
- Particle class
-
toLundString
returns LUND representation string of the list. For each particle toLundString() method is called.- Returns:
- string representation of the event.
-