|
Class Reference for E1039 Core & Analysis Software
|
#include </dev/shm/kenichi/update-github-e1039-doc/e1039-core/simulation/g4main/PHG4SimpleEventGenerator.h>
Inheritance diagram for PHG4SimpleEventGenerator:
Collaboration diagram for PHG4SimpleEventGenerator:Public Types | |
| enum | FUNCTION { Uniform, Gaus } |
| supported function distributions More... | |
Public Types inherited from Fun4AllBase | |
| enum | enu_Verbosity { VERBOSITY_QUIET = 0, VERBOSITY_SOME = 1, VERBOSITY_MORE = 2, VERBOSITY_EVEN_MORE = 3, VERBOSITY_A_LOT = 4, VERBOSITY_MAX = INT_MAX - 10 } |
Public Member Functions | |
| PHG4SimpleEventGenerator (const std::string &name="EVTGENERATOR") | |
| virtual | ~PHG4SimpleEventGenerator () |
| int | InitRun (PHCompositeNode *topNode) |
| int | process_event (PHCompositeNode *topNode) |
| void | add_particles (const std::string &name, const unsigned int count) |
| interface for adding particles by name More... | |
| void | add_particles (const int pid, const unsigned int count) |
| interface for adding particle by pid More... | |
| void | set_t0 (const double t0) |
| set the starting time for the event More... | |
| void | set_eta_range (const double eta_min, const double eta_max) |
| range of randomized eta values More... | |
| void | set_phi_range (const double phi_min, const double phi_max) |
| range of randomized phi values More... | |
| void | set_pt_range (const double pt_min, const double pt_max, const double pt_gaus_width=0) |
| void | set_p_range (const double p_min, const double p_max, const double p_gaus_width=0) |
| void | set_vertex_distribution_function (FUNCTION x, FUNCTION y, FUNCTION z) |
| toss a new vertex according to a Uniform or Gaus distribution More... | |
| void | set_vertex_distribution_mean (const double x, const double y, const double z) |
| set the mean value of the vertex distribution More... | |
| void | set_vertex_distribution_width (const double x, const double y, const double z) |
| set the width of the vertex distribution function about the mean More... | |
| void | set_existing_vertex_offset_vector (const double x, const double y, const double z) |
| set an offset vector from the existing vertex More... | |
| void | set_vertex_size_function (FUNCTION r) |
| set the distribution function of particles about the vertex More... | |
| void | set_vertex_size_parameters (const double mean, const double width) |
| set the dimensions of the distribution of particles about the vertex More... | |
| void | set_pxpypz_range (const double x_min, const double x_max, const double y_min, const double y_max, const double z_min, const double z_max) |
Public Member Functions inherited from PHG4ParticleGeneratorBase | |
| virtual | ~PHG4ParticleGeneratorBase () |
| virtual void | set_name (const std::string &particle="proton") |
| virtual void | set_pid (const int pid) |
| virtual void | set_mom (const double x, const double y, const double z) |
| virtual void | set_vtx (const double x, const double y, const double z) |
| virtual double | get_vtx_x () const |
| virtual double | get_vtx_y () const |
| virtual double | get_vtx_z () const |
| virtual double | get_t0 () const |
| virtual void | Print (const std::string &what="ALL") const |
| virtual void | AddParticle (const std::string &particle, const double x, const double y, const double z) |
| virtual void | AddParticle (const int pid, const double x, const double y, const double z) |
| virtual void | Embed (const int i=1) |
| virtual int | ReuseExistingVertex (PHCompositeNode *topNode) |
| int | get_reuse_existing_vertex () const |
| void | set_reuse_existing_vertex (const int i=1) |
| void | set_seed (const unsigned int iseed) |
| unsigned int | get_seed () const |
Public Member Functions inherited from SubsysReco | |
| virtual | ~SubsysReco () |
| virtual int | End (PHCompositeNode *) |
| Called at the end of all processing. More... | |
| virtual int | EndRun (const int) |
| Called at the end of each run. More... | |
| virtual int | Init (PHCompositeNode *) |
| virtual int | Reset (PHCompositeNode *) |
| Reset. More... | |
| virtual int | ResetEvent (PHCompositeNode *) |
| Clean up after each event. More... | |
Public Member Functions inherited from Fun4AllBase | |
| virtual | ~Fun4AllBase () |
| virtual const std::string | Name () const |
| Returns the name of this module. More... | |
| virtual void | Name (const std::string &name) |
| Sets the name of this module. More... | |
| virtual void | Verbosity (const int ival) |
| Sets the verbosity of this module (0 by default=quiet). More... | |
| virtual void | Verbosity (enu_Verbosity ival) |
| Sets the verbosity of this module (0 by default=quiet). More... | |
| virtual int | Verbosity () const |
| Gets the verbosity of this module. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from PHG4ParticleGeneratorBase | |
| PHG4ParticleGeneratorBase (const std::string &name="GENERATORBASE") | |
| int | get_pdgcode (const std::string &name) const |
| std::string | get_pdgname (const int pdgcode) const |
| double | get_mass (const int pdgcode) const |
| void | CheckAndCreateParticleVector () |
| void | SetParticleId (PHG4Particle *particle, PHG4InEvent *ineve) |
Protected Member Functions inherited from SubsysReco | |
| SubsysReco (const std::string &name="NONAME") | |
Protected Member Functions inherited from Fun4AllBase | |
| Fun4AllBase (const std::string &name="NONAME") | |
Protected Attributes inherited from PHG4ParticleGeneratorBase | |
| int | embedflag |
| int | reuse_existing_vertex |
| double | vtx_x |
| double | vtx_y |
| double | vtx_z |
| double | t0 |
| std::vector< PHG4Particle * > | particlelist |
| unsigned int | seed |
| gsl_rng * | RandomGenerator |
Protected Attributes inherited from Fun4AllBase | |
| std::string | ThisName |
| int | verbosity |
| The verbosity level. 0 means not verbose at all. More... | |
Definition at line 15 of file PHG4SimpleEventGenerator.h.
supported function distributions
| Enumerator | |
|---|---|
| Uniform | |
| Gaus | |
Definition at line 20 of file PHG4SimpleEventGenerator.h.
| PHG4SimpleEventGenerator::PHG4SimpleEventGenerator | ( | const std::string & | name = "EVTGENERATOR" | ) |
Definition at line 30 of file PHG4SimpleEventGenerator.cc.
|
inlinevirtual |
Definition at line 23 of file PHG4SimpleEventGenerator.h.
| void PHG4SimpleEventGenerator::add_particles | ( | const std::string & | name, |
| const unsigned int | count | ||
| ) |
interface for adding particles by name
Definition at line 71 of file PHG4SimpleEventGenerator.cc.
Referenced by EventDisplay4Sim(), Fun4All_EventDisplay(), Fun4DQ(), Fun4E1039Shielding(), Fun4HodoAccGap(), Fun4PatternDB(), Fun4Sim(), Fun4Sim_TrkQA(), Fun4TrkDev(), and RecoE1039Sim().
Here is the caller graph for this function:| void PHG4SimpleEventGenerator::add_particles | ( | const int | pid, |
| const unsigned int | count | ||
| ) |
interface for adding particle by pid
Definition at line 76 of file PHG4SimpleEventGenerator.cc.
|
virtual |
Called for first event when run number is known. Typically this is where you may want to fetch data from database, because you know the run number.
Reimplemented from PHG4ParticleGeneratorBase.
Definition at line 180 of file PHG4SimpleEventGenerator.cc.
References Fun4AllReturnCodes::ABORTRUN, PHCompositeNode::addNode(), Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), Gaus, PHG4ParticleGeneratorBase::get_pdgname(), PHG4ParticleGeneratorBase::get_reuse_existing_vertex(), PHG4ParticleGeneratorBase::get_seed(), PHWHERE, Uniform, and Fun4AllBase::verbosity.
Here is the call graph for this function:
|
virtual |
Called for each event. This is where you do the real work.
Reimplemented from PHG4ParticleGeneratorBase.
Definition at line 255 of file PHG4SimpleEventGenerator.cc.
References PHG4InEvent::AddEmbeddedParticle(), PHG4InEvent::AddParticle(), PHG4InEvent::AddVtx(), PHG4ParticleGeneratorBase::embedflag, Fun4AllReturnCodes::EVENT_OK, PHG4ParticleGeneratorBase::get_mass(), PHG4ParticleGeneratorBase::get_pdgcode(), PHG4InEvent::identify(), PHWHERE, PHG4ParticleGeneratorBase::RandomGenerator, PHG4ParticleGeneratorBase::reuse_existing_vertex, PHG4ParticleGeneratorBase::ReuseExistingVertex(), PHG4Particle::set_e(), PHG4Particle::set_name(), PHG4Particle::set_parent_id(), PHG4Particle::set_pid(), PHG4Particle::set_px(), PHG4Particle::set_py(), PHG4Particle::set_pz(), PHG4Particle::set_track_id(), PHG4Particle::set_vtx_id(), Fun4AllBase::verbosity, PHG4ParticleGeneratorBase::vtx_x, PHG4ParticleGeneratorBase::vtx_y, and PHG4ParticleGeneratorBase::vtx_z.
Here is the call graph for this function:| void PHG4SimpleEventGenerator::set_eta_range | ( | const double | eta_min, |
| const double | eta_max | ||
| ) |
range of randomized eta values
Definition at line 86 of file PHG4SimpleEventGenerator.cc.
Referenced by Fun4All_EventDisplay(), Fun4E1039Shielding(), and Fun4HodoAccGap().
Here is the caller graph for this function:| void PHG4SimpleEventGenerator::set_existing_vertex_offset_vector | ( | const double | x, |
| const double | y, | ||
| const double | z | ||
| ) |
set an offset vector from the existing vertex
Definition at line 162 of file PHG4SimpleEventGenerator.cc.
Referenced by Fun4All_EventDisplay().
Here is the caller graph for this function:| void PHG4SimpleEventGenerator::set_p_range | ( | const double | p_min, |
| const double | p_max, | ||
| const double | p_gaus_width = 0 |
||
| ) |
range of randomized p values
| [in] | p_gaus_width | if non-zero, further apply a Gauss smearing to the p_min - p_max flat distribution |
Definition at line 125 of file PHG4SimpleEventGenerator.cc.
| void PHG4SimpleEventGenerator::set_phi_range | ( | const double | phi_min, |
| const double | phi_max | ||
| ) |
range of randomized phi values
Definition at line 97 of file PHG4SimpleEventGenerator.cc.
Referenced by Fun4All_EventDisplay(), Fun4E1039Shielding(), and Fun4HodoAccGap().
Here is the caller graph for this function:| void PHG4SimpleEventGenerator::set_pt_range | ( | const double | pt_min, |
| const double | pt_max, | ||
| const double | pt_gaus_width = 0 |
||
| ) |
range of randomized pt values
| [in] | pt_gaus_width | if non-zero, further apply a Gauss smearing to the pt_min - pt_max flat distribution |
Definition at line 108 of file PHG4SimpleEventGenerator.cc.
Referenced by Fun4All_EventDisplay().
Here is the caller graph for this function:| void PHG4SimpleEventGenerator::set_pxpypz_range | ( | const double | x_min, |
| const double | x_max, | ||
| const double | y_min, | ||
| const double | y_max, | ||
| const double | z_min, | ||
| const double | z_max | ||
| ) |
Definition at line 366 of file PHG4SimpleEventGenerator.cc.
Referenced by EventDisplay4Sim(), Fun4DQ(), Fun4E1039Shielding(), Fun4HodoAccGap(), Fun4PatternDB(), Fun4Sim(), Fun4Sim_TrkQA(), Fun4TrkDev(), and RecoE1039Sim().
Here is the caller graph for this function:
|
virtual |
set the starting time for the event
Reimplemented from PHG4ParticleGeneratorBase.
Definition at line 81 of file PHG4SimpleEventGenerator.cc.
References PHG4ParticleGeneratorBase::t0.
| void PHG4SimpleEventGenerator::set_vertex_distribution_function | ( | FUNCTION | x, |
| FUNCTION | y, | ||
| FUNCTION | z | ||
| ) |
toss a new vertex according to a Uniform or Gaus distribution
Definition at line 141 of file PHG4SimpleEventGenerator.cc.
Referenced by EventDisplay4Sim(), Fun4All_EventDisplay(), Fun4DQ(), Fun4E1039Shielding(), Fun4HodoAccGap(), Fun4PatternDB(), Fun4Sim(), Fun4Sim_TrkQA(), Fun4TrkDev(), and RecoE1039Sim().
Here is the caller graph for this function:| void PHG4SimpleEventGenerator::set_vertex_distribution_mean | ( | const double | x, |
| const double | y, | ||
| const double | z | ||
| ) |
set the mean value of the vertex distribution
Definition at line 148 of file PHG4SimpleEventGenerator.cc.
Referenced by EventDisplay4Sim(), Fun4All_EventDisplay(), Fun4DQ(), Fun4E1039Shielding(), Fun4HodoAccGap(), Fun4PatternDB(), Fun4Sim(), Fun4Sim_TrkQA(), Fun4TrkDev(), and RecoE1039Sim().
Here is the caller graph for this function:| void PHG4SimpleEventGenerator::set_vertex_distribution_width | ( | const double | x, |
| const double | y, | ||
| const double | z | ||
| ) |
set the width of the vertex distribution function about the mean
Definition at line 155 of file PHG4SimpleEventGenerator.cc.
Referenced by EventDisplay4Sim(), Fun4All_EventDisplay(), Fun4DQ(), Fun4E1039Shielding(), Fun4HodoAccGap(), Fun4PatternDB(), Fun4Sim(), Fun4Sim_TrkQA(), Fun4TrkDev(), and RecoE1039Sim().
Here is the caller graph for this function:| void PHG4SimpleEventGenerator::set_vertex_size_function | ( | FUNCTION | r | ) |
set the distribution function of particles about the vertex
Definition at line 169 of file PHG4SimpleEventGenerator.cc.
Referenced by EventDisplay4Sim(), Fun4All_EventDisplay(), Fun4DQ(), Fun4E1039Shielding(), Fun4HodoAccGap(), Fun4PatternDB(), Fun4Sim(), Fun4Sim_TrkQA(), Fun4TrkDev(), and RecoE1039Sim().
Here is the caller graph for this function:| void PHG4SimpleEventGenerator::set_vertex_size_parameters | ( | const double | mean, |
| const double | width | ||
| ) |
set the dimensions of the distribution of particles about the vertex
Definition at line 174 of file PHG4SimpleEventGenerator.cc.
Referenced by EventDisplay4Sim(), Fun4All_EventDisplay(), Fun4DQ(), Fun4E1039Shielding(), Fun4HodoAccGap(), Fun4PatternDB(), Fun4Sim(), Fun4Sim_TrkQA(), Fun4TrkDev(), and RecoE1039Sim().
Here is the caller graph for this function: