|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hep.physics.event.generator.diagnostic.DiagnosticEventGenerator
public class DiagnosticEventGenerator
Generates user specified particle type events with user specified ranges.
Constructor Summary | |
---|---|
DiagnosticEventGenerator()
Create a diagnostic event generator with default particle property provider and object factory. |
|
DiagnosticEventGenerator(ParticlePropertyProvider ppp)
Create a diagnostic event generator with the default object factory. |
|
DiagnosticEventGenerator(ParticlePropertyProvider ppp,
GeneratorFactory factory)
Create a diagnostic event generator with user supplied particle property provider and object factory. |
|
DiagnosticEventGenerator(ParticlePropertyProvider ppp,
GeneratorFactory factory,
java.util.Random random)
Create a diagnostic event generator with user supplied particle property provider and object factory. |
Method Summary | |
---|---|
MCEvent |
generate()
Generate a single event with nparts particles or nparts pairs of particles if angres is selected. |
int |
getNumberOfParticles()
|
ParticlePropertyProvider |
getParticlePropertyProvider()
Get the particle property provider being used by this generator |
ParticleType |
getParticleType()
|
int |
getRunNumber()
|
long |
getSeed()
|
double |
getTwoParticleRes()
|
double |
getXRange()
|
double |
getYRange()
|
double |
getZRange()
|
boolean |
isRandomParticleAntiParticle()
|
void |
printParameters()
Print the parameters. |
void |
reset()
|
protected double |
selectCosth()
|
protected double |
selectMom()
|
protected Hep3Vector |
selectOrigin()
|
protected HepLorentzVector |
selectP()
|
protected double |
selectPhi()
|
void |
setCosthRange(double lowcosth,
double highcosth)
Select the cosine theta range between -1 and 1. |
void |
setMomentumRange(double lowp,
double highp)
Select the momentum range in GeV. |
void |
setNumberOfParticles(int nparts)
Set the number of particles to generate in a single event. |
void |
setOrigin(double x,
double y,
double z)
Select an origin for the particle. |
void |
setParticleType(ParticleType ptype)
Set the particle type using a Java particle type. |
void |
setPhiRange(double lowphi,
double highphi)
Select the phi range between 0 and 2*PI in radians. |
void |
setRandomParticleAntiParticle(boolean ppbar)
Randomly change between generating particles and anti-particles, if true. |
void |
setRunNumber(int nrun)
Sets the run number. |
void |
setSeed(long seed)
Set the seed for the random number generator. |
void |
setTwoParticleRes(double angres)
For angular resolution studies. |
void |
setXRange(double dx)
Randomly varies the x origin by +/-dx. |
void |
setYRange(double dy)
Randomly varies the y origin by +/-dy. |
void |
setZRange(double dz)
Randomly varies the z origin by +/-dz. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiagnosticEventGenerator()
public DiagnosticEventGenerator(ParticlePropertyProvider ppp)
ppp
- The particle property provider to use.public DiagnosticEventGenerator(ParticlePropertyProvider ppp, GeneratorFactory factory)
ppp
- The particle property provider to usefactory
- The object factory to use.public DiagnosticEventGenerator(ParticlePropertyProvider ppp, GeneratorFactory factory, java.util.Random random)
ppp
- The particle property provider to usefactory
- The object factory to use.random
- The random number generator to use.Method Detail |
---|
public ParticlePropertyProvider getParticlePropertyProvider()
public void reset()
reset
in interface EventGenerator
public void setRunNumber(int nrun)
public void setParticleType(ParticleType ptype)
public ParticleType getParticleType()
public void setNumberOfParticles(int nparts)
public int getNumberOfParticles()
public void setMomentumRange(double lowp, double highp)
public void setCosthRange(double lowcosth, double highcosth)
public void setPhiRange(double lowphi, double highphi)
public void setOrigin(double x, double y, double z)
public void setXRange(double dx)
public void setYRange(double dy)
public void setZRange(double dz)
public void setRandomParticleAntiParticle(boolean ppbar)
public void setTwoParticleRes(double angres)
public void setSeed(long seed)
public void printParameters()
public MCEvent generate()
generate
in interface EventGenerator
protected HepLorentzVector selectP()
protected Hep3Vector selectOrigin()
protected double selectMom()
protected double selectCosth()
protected double selectPhi()
public long getSeed()
public int getRunNumber()
public double getTwoParticleRes()
public boolean isRandomParticleAntiParticle()
public double getZRange()
public double getYRange()
public double getXRange()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |