hep.physics.event.generator
Class GeneratorFactory

java.lang.Object
  extended by hep.physics.event.generator.GeneratorFactory

public class GeneratorFactory
extends java.lang.Object

A factory used for creating events and particles. The user can override this class to provide custom implementations of event or particle.

Author:
tonyj

Constructor Summary
GeneratorFactory()
           
 
Method Summary
 MCEvent createEvent(int run, int event)
          Create a new event
 BasicParticle createParticle(Hep3Vector origin, HepLorentzVector p, ParticleType ptype, int status, double time)
          Create a new particle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneratorFactory

public GeneratorFactory()
Method Detail

createEvent

public MCEvent createEvent(int run,
                           int event)
Create a new event

Parameters:
run - The run number
event - The event number
Returns:
The created event.

createParticle

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

Parameters:
origin - The particles creation point
p - The particles momentum and energy
ptype - The particles type
status - The particles status
time - The particles creation time
Returns:
The newly created particle


Copyright © 2000-2010 FreeHEP. All Rights Reserved.