hep.physics.particle
Class BasicParticle

java.lang.Object
  extended by hep.physics.particle.BasicParticle
All Implemented Interfaces:
Particle

public class BasicParticle
extends java.lang.Object
implements Particle

Default implementation of Particle.

Version:
$Id: BasicParticle.java 8584 2006-08-10 23:06:37Z duns $
Author:
Gary Bower

Field Summary
 
Fields inherited from interface hep.physics.particle.Particle
DOCUMENTATION, FINAL_STATE, INTERMEDIATE
 
Constructor Summary
BasicParticle(Hep3Vector origin, HepLorentzVector p, ParticleType ptype, int status, double time)
          Create a new BasicParticle
 
Method Summary
 void addDaughter(Particle child)
          Adds a child to this particle.
 HepLorentzVector asFourVector()
          Return this particles momentum and energy as a 4-vector
 double getCharge()
          Returns the particle's charge
 java.util.List getDaughters()
          Returns a list of the decay products of this particle
 double getEnergy()
          Energy
 int getGeneratorStatus()
          Status code, one of FINALSTATE, INTERMEDIATE or DOCUMENTATION
 double getMass()
          Mass
 Hep3Vector getMomentum()
          Momentum
 Hep3Vector getOrigin()
          Point of origin
 double getOriginX()
           
 double getOriginY()
           
 double getOriginZ()
           
 java.util.List getParents()
          Returns a list of the parent(s) of this particle
 int getPDGID()
          Convenience method for getting particles PDGID
 double getProductionTime()
          Production time
 double getPX()
          X component of momentum
 double getPY()
          Y component of momentum
 double getPZ()
          Z component of momentum
 ParticleType getType()
          Particle Type
 void setMass(double mass)
          Overrides the mass obtained from the particle type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicParticle

public BasicParticle(Hep3Vector origin,
                     HepLorentzVector p,
                     ParticleType ptype,
                     int status,
                     double time)
Create a new BasicParticle

Parameters:
origin - The origin of this particle
p - The momentum and energy of this particle
ptype - The type of this particle
status - The status of this particle
time - The production time of this particle
Method Detail

addDaughter

public void addDaughter(Particle child)
Adds a child to this particle. If the child is also an instance of this class this particle will also be added as its parent.

Parameters:
child - The child particle

setMass

public void setMass(double mass)
Overrides the mass obtained from the particle type.


getPX

public double getPX()
Description copied from interface: Particle
X component of momentum

Specified by:
getPX in interface Particle

getPY

public double getPY()
Description copied from interface: Particle
Y component of momentum

Specified by:
getPY in interface Particle

getPZ

public double getPZ()
Description copied from interface: Particle
Z component of momentum

Specified by:
getPZ in interface Particle

getEnergy

public double getEnergy()
Description copied from interface: Particle
Energy

Specified by:
getEnergy in interface Particle

getMass

public double getMass()
Description copied from interface: Particle
Mass

Specified by:
getMass in interface Particle

getOriginX

public double getOriginX()
Specified by:
getOriginX in interface Particle

getOriginY

public double getOriginY()
Specified by:
getOriginY in interface Particle

getOriginZ

public double getOriginZ()
Specified by:
getOriginZ in interface Particle

getProductionTime

public double getProductionTime()
Description copied from interface: Particle
Production time

Specified by:
getProductionTime in interface Particle

getGeneratorStatus

public int getGeneratorStatus()
Description copied from interface: Particle
Status code, one of FINALSTATE, INTERMEDIATE or DOCUMENTATION

Specified by:
getGeneratorStatus in interface Particle

getMomentum

public Hep3Vector getMomentum()
Description copied from interface: Particle
Momentum

Specified by:
getMomentum in interface Particle

getOrigin

public Hep3Vector getOrigin()
Description copied from interface: Particle
Point of origin

Specified by:
getOrigin in interface Particle

getDaughters

public java.util.List getDaughters()
Description copied from interface: Particle
Returns a list of the decay products of this particle

Specified by:
getDaughters in interface Particle

getParents

public java.util.List getParents()
Description copied from interface: Particle
Returns a list of the parent(s) of this particle

Specified by:
getParents in interface Particle

getType

public ParticleType getType()
Description copied from interface: Particle
Particle Type

Specified by:
getType in interface Particle

getCharge

public double getCharge()
Description copied from interface: Particle
Returns the particle's charge

Specified by:
getCharge in interface Particle

getPDGID

public int getPDGID()
Description copied from interface: Particle
Convenience method for getting particles PDGID

Specified by:
getPDGID in interface Particle

asFourVector

public HepLorentzVector asFourVector()
Description copied from interface: Particle
Return this particles momentum and energy as a 4-vector

Specified by:
asFourVector in interface Particle


Copyright © 2000-2010 FreeHEP. All Rights Reserved.