Analysis Software
Documentation for sPHENIX simulation software
|
#include <coresoftware/blob/master/simulation/g4simulation/g4main/PHG4PileupGenerator.h>
Public Member Functions | |
PHG4PileupGenerator (const std::string &name="PILEUPGENERATOR") | |
~PHG4PileupGenerator () override | |
int | Init (PHCompositeNode *topNode) override |
int | InitRun (PHCompositeNode *topNode) override |
int | process_event (PHCompositeNode *topNode) override |
int | Reset (PHCompositeNode *topNode) override |
Reset. | |
int | ResetEvent (PHCompositeNode *topNode) override |
Clean up after each event. | |
int | EndRun (const int runnumber) override |
Called at the end of each run. | |
int | End (PHCompositeNode *topNode) override |
Called at the end of all processing. | |
void | set_generator (PHG4ParticleGeneratorBase *generator) |
void | set_time_window (double past_nsec, double future_nsec) |
past times are negative, future times are positive | |
void | set_collision_rate (double kHz) |
void | set_time_between_crossings (double nsec) |
Public Member Functions inherited from PHG4ParticleGeneratorBase | |
~PHG4ParticleGeneratorBase () override | |
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 void | set_vtx_z (const double z) |
virtual void | set_t0 (const double t) |
virtual double | get_vtx_x () const |
virtual double | get_vtx_y () const |
virtual double | get_vtx_z () const |
virtual double | get_t0 () const |
void | Print (const std::string &what="ALL") const override |
virtual void | PrintParticles (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 | |
~SubsysReco () override | |
Public Member Functions inherited from Fun4AllBase | |
virtual | ~Fun4AllBase () |
virtual const std::string | Name () const |
Returns the name of this module. | |
virtual void | Name (const std::string &name) |
Sets the name of this module. | |
virtual void | Verbosity (const int ival) |
Sets the verbosity of this module (0 by default=quiet). | |
virtual void | Verbosity (enu_Verbosity ival) |
Sets the verbosity of this module (0 by default=quiet). | |
virtual int | Verbosity () const |
Gets the verbosity of this module. | |
Private Attributes | |
PHG4ParticleGeneratorBase * | _generator = nullptr |
double | _min_integration_time = -1000. |
double | _max_integration_time = 1000. |
double | _collision_rate = 100. |
double | _time_between_crossings = 106. |
double | _ave_coll_per_crossing = 1. |
int | _min_crossing = 0 |
int | _max_crossing = 0 |
Additional Inherited Members | |
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 = std::numeric_limits<int>::max() - 10 } |
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) |
gsl_rng * | RandomGenerator () const |
int | EmbedFlag () const |
std::vector< PHG4Particle * > ::iterator | particlelist_begin () |
std::vector< PHG4Particle * > ::iterator | particlelist_end () |
void | ResetParticleList () |
Definition at line 12 of file PHG4PileupGenerator.h.
View newest version in sPHENIX GitHub at line 12 of file PHG4PileupGenerator.h
PHG4PileupGenerator::PHG4PileupGenerator | ( | const std::string & | name = "PILEUPGENERATOR" | ) |
Definition at line 11 of file PHG4PileupGenerator.cc.
View newest version in sPHENIX GitHub at line 11 of file PHG4PileupGenerator.cc
|
override |
Definition at line 17 of file PHG4PileupGenerator.cc.
View newest version in sPHENIX GitHub at line 17 of file PHG4PileupGenerator.cc
References _generator.
|
overridevirtual |
Called at the end of all processing.
Reimplemented from SubsysReco.
Definition at line 88 of file PHG4PileupGenerator.cc.
View newest version in sPHENIX GitHub at line 88 of file PHG4PileupGenerator.cc
References _generator, SubsysReco::End(), and Fun4AllReturnCodes::EVENT_OK.
|
overridevirtual |
Called at the end of each run.
Reimplemented from SubsysReco.
Definition at line 81 of file PHG4PileupGenerator.cc.
View newest version in sPHENIX GitHub at line 81 of file PHG4PileupGenerator.cc
References _generator, SubsysReco::EndRun(), and Fun4AllReturnCodes::EVENT_OK.
|
overridevirtual |
Called during initialization. Typically this is where you can book histograms, and e.g. register them to Fun4AllServer (so they can be output to file using Fun4AllServer::dumpHistos() method).
Reimplemented from SubsysReco.
Definition at line 22 of file PHG4PileupGenerator.cc.
View newest version in sPHENIX GitHub at line 22 of file PHG4PileupGenerator.cc
References _generator, Fun4AllReturnCodes::EVENT_OK, and SubsysReco::Init().
|
overridevirtual |
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 29 of file PHG4PileupGenerator.cc.
View newest version in sPHENIX GitHub at line 29 of file PHG4PileupGenerator.cc
References _ave_coll_per_crossing, _collision_rate, _generator, _max_crossing, _max_integration_time, _min_crossing, _min_integration_time, _time_between_crossings, Acts::UnitConstants::e, Fun4AllReturnCodes::EVENT_OK, and PHG4ParticleGeneratorBase::InitRun().
|
overridevirtual |
Called for each event. This is where you do the real work.
Reimplemented from PHG4ParticleGeneratorBase.
Definition at line 45 of file PHG4PileupGenerator.cc.
View newest version in sPHENIX GitHub at line 45 of file PHG4PileupGenerator.cc
References _ave_coll_per_crossing, _generator, _max_crossing, _min_crossing, _time_between_crossings, Fun4AllReturnCodes::EVENT_OK, PHG4ParticleGeneratorBase::process_event(), PHG4ParticleGeneratorBase::RandomGenerator(), and PHG4ParticleGeneratorBase::set_t0().
|
overridevirtual |
Reset.
Reimplemented from SubsysReco.
Definition at line 67 of file PHG4PileupGenerator.cc.
View newest version in sPHENIX GitHub at line 67 of file PHG4PileupGenerator.cc
References _generator, Fun4AllReturnCodes::EVENT_OK, and SubsysReco::Reset().
|
overridevirtual |
Clean up after each event.
Reimplemented from SubsysReco.
Definition at line 74 of file PHG4PileupGenerator.cc.
View newest version in sPHENIX GitHub at line 74 of file PHG4PileupGenerator.cc
References _generator, Fun4AllReturnCodes::EVENT_OK, and SubsysReco::ResetEvent().
|
inline |
Definition at line 34 of file PHG4PileupGenerator.h.
View newest version in sPHENIX GitHub at line 34 of file PHG4PileupGenerator.h
References _collision_rate.
|
inline |
Definition at line 26 of file PHG4PileupGenerator.h.
View newest version in sPHENIX GitHub at line 26 of file PHG4PileupGenerator.h
References _generator, and Fatras::Test::generator.
|
inline |
Definition at line 35 of file PHG4PileupGenerator.h.
View newest version in sPHENIX GitHub at line 35 of file PHG4PileupGenerator.h
References _time_between_crossings.
past times are negative, future times are positive
Definition at line 29 of file PHG4PileupGenerator.h.
View newest version in sPHENIX GitHub at line 29 of file PHG4PileupGenerator.h
References _max_integration_time, and _min_integration_time.
|
private |
Definition at line 45 of file PHG4PileupGenerator.h.
View newest version in sPHENIX GitHub at line 45 of file PHG4PileupGenerator.h
Referenced by InitRun(), and process_event().
|
private |
Definition at line 42 of file PHG4PileupGenerator.h.
View newest version in sPHENIX GitHub at line 42 of file PHG4PileupGenerator.h
Referenced by InitRun(), and set_collision_rate().
|
private |
Definition at line 38 of file PHG4PileupGenerator.h.
View newest version in sPHENIX GitHub at line 38 of file PHG4PileupGenerator.h
Referenced by End(), EndRun(), Init(), InitRun(), process_event(), Reset(), ResetEvent(), set_generator(), and ~PHG4PileupGenerator().
|
private |
Definition at line 47 of file PHG4PileupGenerator.h.
View newest version in sPHENIX GitHub at line 47 of file PHG4PileupGenerator.h
Referenced by InitRun(), and process_event().
|
private |
Definition at line 41 of file PHG4PileupGenerator.h.
View newest version in sPHENIX GitHub at line 41 of file PHG4PileupGenerator.h
Referenced by InitRun(), and set_time_window().
|
private |
Definition at line 46 of file PHG4PileupGenerator.h.
View newest version in sPHENIX GitHub at line 46 of file PHG4PileupGenerator.h
Referenced by InitRun(), and process_event().
|
private |
Definition at line 40 of file PHG4PileupGenerator.h.
View newest version in sPHENIX GitHub at line 40 of file PHG4PileupGenerator.h
Referenced by InitRun(), and set_time_window().
|
private |
Definition at line 43 of file PHG4PileupGenerator.h.
View newest version in sPHENIX GitHub at line 43 of file PHG4PileupGenerator.h
Referenced by InitRun(), process_event(), and set_time_between_crossings().