hephysics.particle
Class LParticle

java.lang.Object
  extended by hephysics.vec.HepLorentzVector
      extended by hephysics.particle.LParticle
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HEParticle

public class LParticle
extends HepLorentzVector
implements Serializable

a light-weight Lorentz-type particle based on four-Lorentz vector. Particle is characterized by either (px,py,pz,E) or (x,y,z,time).

See Also:
Serialized Form

Constructor Summary
LParticle(double px, double py, double pz)
          Define a 3-momentum or X,Y,Z position.
LParticle(double px, double py, double pz, double energy)
          Define a particle in momentum or 4-space time.
LParticle(double px, double py, double pz, double energy, double mass)
          Define a particle in momentum or coordinate space.
LParticle(String name, double mass)
          Define a particle with a name and mass
LParticle(String name, double px, double py, double pz, double energy, double mass)
          Define a Lorentz particle in momentum or coordinate space.
 
Method Summary
 double abs()
          Magnitude
 void add(LParticle another)
          Add 2 particle
 double angle(LParticle momentum)
          Angle between 2 vectors in rad
 void boost(LParticle parent)
          Lorentz Boost
 double calcMass()
          Get calculated mass as sqrt(e*e-px**2-py**2-pz**2)
 LParticle copy()
          Make an exact copy of this particle
 double getCharge()
          Get charge
 double getMass()
          Get a mass
 String getName()
          Get a name
 LParticle getParent()
          Get a parent particle
 Hep3Vector getV3()
          Get a 3-vector woth (Px,Py,Pz) or (X,Y,Z)
 int hashCode()
          Get a hash code
 double mass()
          Get a mass
 void print()
          Print particle
 void setCharge(double charge)
          Set charge
 void setMass(double mass)
          Set a mass
 void setParent(LParticle parent)
          Set a parent particle
 void setPxPyPz(double px, double py, double pz)
          Set Px,Py,Pz (or x,y,z)
 void setPxPyPzE(double px, double py, double pz, double e)
          Set Px,Py,Pz (or x,y,z) and energy
 void setThetaPhiP(double theta, double phi, double P)
          Set HepLorentzVector using theta angle, phi and total momentum.
 String toString()
          Convert to string
 void twoBodyDecay(LParticle prod1, LParticle prod2, boolean randomRotate)
          Evaluates 4-vector of decay product in the rest frame of parent.
 
Methods inherited from class hephysics.vec.HepLorentzVector
add, add, angle, boost, boost, boost, centerOfMass, cosTheta, dot, e, equals, et, et2, getE, getEta, getT, invariantMass, invariantMass2, isLightlike, isSpacelike, m, m2, mag, mag2, mt, mt2, mult, neg, neg, perp, perp2, phi, pseudoRapidity, px, py, pz, rapidity, restMass2, setE, setPx, setPy, setPz, setT, setV3, setV3, skp, sub, t, theta, v3, x, y, z
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LParticle

public LParticle(String name,
                 double mass)
Define a particle with a name and mass

Parameters:
name - particle name
mass - mass

LParticle

public LParticle(double px,
                 double py,
                 double pz)
Define a 3-momentum or X,Y,Z position. Energy is set to 0.

Parameters:
px - Px (or X_)
py - Py (or Y)
pz - Pz (or Z)

LParticle

public LParticle(double px,
                 double py,
                 double pz,
                 double energy,
                 double mass)
Define a particle in momentum or coordinate space.

Parameters:
px - Px (or X position)
py - Py (or Y position)
pz - Pz (or Z position)
energy - energy (or time)
mass - mass

LParticle

public LParticle(double px,
                 double py,
                 double pz,
                 double energy)
Define a particle in momentum or 4-space time. Mass is set to 0

Parameters:
px - Px or X position
py - Py or Y position
pz - Pz or Z postion
energy - energy or time

LParticle

public LParticle(String name,
                 double px,
                 double py,
                 double pz,
                 double energy,
                 double mass)
Define a Lorentz particle in momentum or coordinate space.

Parameters:
name - Name of particle
px - px (or X)
py - py (or Y)
pz - pz (or Z)
energy - energy or time
mass - mass
Method Detail

setPxPyPz

public void setPxPyPz(double px,
                      double py,
                      double pz)
Set Px,Py,Pz (or x,y,z)

Parameters:
px -
py -
pz -

setPxPyPzE

public void setPxPyPzE(double px,
                       double py,
                       double pz,
                       double e)
Set Px,Py,Pz (or x,y,z) and energy

Parameters:
px -
py -
pz -
e - energy

setParent

public void setParent(LParticle parent)
Set a parent particle

Parameters:
parent - parent particle

getParent

public LParticle getParent()
Get a parent particle

Returns:
parent

add

public void add(LParticle another)
Add 2 particle

Parameters:
another - particle to be edded

getMass

public double getMass()
Get a mass

Returns:
mass

mass

public double mass()
Get a mass

Returns:
mass

getName

public String getName()
Get a name

Returns:
name

getV3

public Hep3Vector getV3()
Get a 3-vector woth (Px,Py,Pz) or (X,Y,Z)

Overrides:
getV3 in class HepLorentzVector
Returns:
3-vector

setMass

public void setMass(double mass)
Set a mass

Parameters:
mass - Mass

hashCode

public int hashCode()
Get a hash code

Overrides:
hashCode in class HepLorentzVector

setThetaPhiP

public void setThetaPhiP(double theta,
                         double phi,
                         double P)
Set HepLorentzVector using theta angle, phi and total momentum. e = sqrt(P*P + mass*mass);
pX = P*sin(theta)*cos(phi);
pY =P*sin(theta)*sin(phi);
pZ = P*cos(theta);

Parameters:
theta - theta
phi - phi
P - momentum

abs

public double abs()
Magnitude

Returns:

setCharge

public void setCharge(double charge)
Set charge

Parameters:
charge - charge

getCharge

public double getCharge()
Get charge

Returns:

angle

public double angle(LParticle momentum)
Angle between 2 vectors in rad

Parameters:
momentum - parent particle
Returns:
angle in rad

calcMass

public double calcMass()
Get calculated mass as sqrt(e*e-px**2-py**2-pz**2)

Returns:

twoBodyDecay

public void twoBodyDecay(LParticle prod1,
                         LParticle prod2,
                         boolean randomRotate)
Evaluates 4-vector of decay product in the rest frame of parent.

Parameters:
prod1 - first decay product
prod2 - second decay product
randomRotate - is Phi randomly rotated?

boost

public void boost(LParticle parent)
Lorentz Boost

Parameters:
parent - parent particle

toString

public String toString()
Convert to string

Overrides:
toString in class HepLorentzVector

copy

public LParticle copy()
Make an exact copy of this particle

Overrides:
copy in class HepLorentzVector
Returns:
new copy

print

public void print()
Print particle



jHepWork 3.0 ©