public class DiagnosticEventGenerator extends Object implements EventGenerator
Constructor and Description |
---|
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,
Random random)
Create a diagnostic event generator with user supplied
particle property provider and object factory.
|
Modifier and Type | Method and Description |
---|---|
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() |
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.
|
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, Random random)
ppp
- The particle property provider to usefactory
- The object factory to use.random
- The random number generator to use.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
public long getSeed()
public int getRunNumber()
public double getTwoParticleRes()
public boolean isRandomParticleAntiParticle()
public double getZRange()
public double getYRange()
public double getXRange()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics