|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hep.analysis.EventHandler | +--hep.analysis.EventGenerator | +--hep.physics.generator.diagnostic.DiagnosticEventGenerator
Generates user specified particle type events with user specified ranges.
Fields inherited from class hep.analysis.EventHandler |
out |
Constructor Summary | |
DiagnosticEventGenerator()
|
Method Summary | |
void |
addFakeMother(boolean doIt)
Add a fake mother particle of HepEvt type (status DOCUMENTATION) to the event record for every simulated particle (pair). |
void |
beforeFirstEvent()
Called before the first event is accessed. |
EventData |
generateEvent()
Generate a single event with nparts particles or nparts pairs of particles if angres is selected. |
int |
getMaxEvents()
|
java.lang.String |
getName()
override to specify name of event generator |
int |
getNumberOfParticles()
|
ParticleType |
getParticleType()
|
void |
getSummary()
Print run summary. |
int |
getTotalNumberOfEvents()
Override if the number of events is known, and return that number. |
void |
printParameters()
Print the parameters. |
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 |
setMaxEvents(int n)
Sets the maximum number of events to generate. |
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(int pdgid)
Set the particle type using the PDG particle ID numbers. |
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 hep.analysis.EventGenerator |
close, getEventDataClass, getNextEvent, toString |
Methods inherited from class hep.analysis.EventHandler |
afterLastEvent, histogram, histogram, sendMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface hep.analysis.EventSource |
afterLastEvent |
Constructor Detail |
public DiagnosticEventGenerator()
Method Detail |
public java.lang.String getName()
EventGenerator
getName
in class EventGenerator
public void beforeFirstEvent()
EventSource
beforeFirstEvent
in class EventHandler
public void setMaxEvents(int n)
n
- The maximum number of events to generate, or 0 for no limitpublic int getMaxEvents()
public int getTotalNumberOfEvents()
EventGenerator
getTotalNumberOfEvents
in class EventGenerator
public void setRunNumber(int nrun)
public void setParticleType(int pdgid)
public void setParticleType(ParticleType ptype)
public void addFakeMother(boolean doIt)
doIt
- = true (default): add fake mother particle(s).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 EventData generateEvent() throws EndOfDataException
generateEvent
in class EventGenerator
hep.analysis.EventGenerator
EndOfDataException
- when there are no more events availablepublic void getSummary()
protected HepLorentzVector selectP()
protected Hep3Vector selectOrigin()
protected double selectMom()
protected double selectCosth()
protected double selectPhi()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |