Analysis Software
Documentation for sPHENIX simulation software
|
#include <coresoftware/blob/master/simulation/g4simulation/g4main/PHG4ParticleGeneratorBase.h>
Public Member Functions | |
~PHG4ParticleGeneratorBase () override | |
int | InitRun (PHCompositeNode *topNode) override |
int | process_event (PHCompositeNode *topNode) 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 | |
virtual int | End (PHCompositeNode *) |
Called at the end of all processing. | |
virtual int | EndRun (const int) |
Called at the end of each run. | |
virtual int | Init (PHCompositeNode *) |
virtual int | Reset (PHCompositeNode *) |
Reset. | |
virtual int | ResetEvent (PHCompositeNode *) |
Clean up after each event. | |
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. | |
Protected Member Functions | |
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 () |
Protected Member Functions inherited from SubsysReco | |
SubsysReco (const std::string &name="NONAME") | |
Protected Member Functions inherited from Fun4AllBase | |
Fun4AllBase (const std::string &name="NONAME") | |
Private Attributes | |
gsl_rng * | m_RandomGenerator = nullptr |
int | m_EmbedFlag = 0 |
int | m_ReUseExistingVertexFlag = 0 |
unsigned int | m_Seed = 0 |
double | m_Vtx_x = 0. |
double | m_Vtx_y = 0. |
double | m_Vtx_z = 0. |
double | m_TZero = 0. |
std::vector< PHG4Particle * > | particlelist |
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 } |
Definition at line 17 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 17 of file PHG4ParticleGeneratorBase.h
|
override |
Definition at line 50 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 50 of file PHG4ParticleGeneratorBase.cc
References m_RandomGenerator, and particlelist.
|
protected |
Definition at line 41 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 41 of file PHG4ParticleGeneratorBase.cc
References gsl_rng_set(), m_RandomGenerator, and m_Seed.
|
virtual |
Definition at line 162 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 162 of file PHG4ParticleGeneratorBase.cc
References get_pdgcode(), and particlelist.
Referenced by PHG4ParticleGeneratorD0::process_event(), and PHG4ParticleGeneratorVectorMeson::process_event().
|
virtual |
Definition at line 168 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 168 of file PHG4ParticleGeneratorBase.cc
References particle, particlelist, PHG4Particle::set_pid(), PHG4Particle::set_px(), PHG4Particle::set_py(), and PHG4Particle::set_pz().
|
protected |
Definition at line 178 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 178 of file PHG4ParticleGeneratorBase.cc
References particlelist.
Referenced by set_mom(), set_name(), and set_pid().
|
inlinevirtual |
Definition at line 41 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 41 of file PHG4ParticleGeneratorBase.h
References i, and m_EmbedFlag.
Referenced by ConfigureInput(), Fun4All_EICAnalysis_DVCS(), Fun4All_G4_EICDetector_LQ(), Fun4All_G4_EICDetector_LQ_reference(), Fun4All_G4_EICDetector_RICH(), Fun4All_G4_fsPHENIX_FastSim(), Fun4All_G4_sPHENIX(), Fun4All_G4_sPHENIX_AnaGenFit(), Fun4All_G4_sPHENIX_photonjet(), Fun4All_G4_sPHENIX_photons(), Fun4All_G4_sPHENIX_truthphotonjet(), Fun4All_G4_W(), Fun4All_Generator_Display(), Fun4All_single_particle(), InputInit(), and Jin_BJet().
|
inlineprotected |
Definition at line 57 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 57 of file PHG4ParticleGeneratorBase.h
References m_EmbedFlag.
Referenced by PHG4ParticleGeneratorD0::process_event(), PHG4SimpleEventGenerator::process_event(), and PHG4ParticleGeneratorVectorMeson::process_event().
|
protected |
Definition at line 86 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 86 of file PHG4ParticleGeneratorBase.cc
References get_pdgname(), and Acts::UnitConstants::GeV.
Referenced by PHG4SimpleEventGenerator::process_event().
|
protected |
Definition at line 61 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 61 of file PHG4ParticleGeneratorBase.cc
Referenced by AddParticle(), PHG4SimpleEventGenerator::process_event(), set_name(), and SetParticleId().
|
protected |
Definition at line 73 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 73 of file PHG4ParticleGeneratorBase.cc
Referenced by get_mass(), PHG4SimpleEventGenerator::InitRun(), and SetParticleId().
|
inline |
Definition at line 44 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 44 of file PHG4ParticleGeneratorBase.h
References m_ReUseExistingVertexFlag.
Referenced by PHG4SimpleEventGenerator::InitRun(), and PHG4SimpleEventGenerator::process_event().
|
inline |
Definition at line 47 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 47 of file PHG4ParticleGeneratorBase.h
References m_Seed.
Referenced by PHG4SimpleEventGenerator::InitRun().
|
inlinevirtual |
Definition at line 35 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 35 of file PHG4ParticleGeneratorBase.h
References m_TZero.
Referenced by PHG4SimpleEventGenerator::InitRun(), PHG4ParticleGun::process_event(), PHG4IonGun::process_event(), PHG4ParticleGenerator::process_event(), PHG4ParticleGeneratorD0::process_event(), PHG4ParticleGeneratorVectorMeson::process_event(), and PHG4SimpleEventGenerator::process_event().
|
inlinevirtual |
Definition at line 32 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 32 of file PHG4ParticleGeneratorBase.h
References m_Vtx_x.
Referenced by PHG4ParticleGun::process_event(), PHG4IonGun::process_event(), PHG4ParticleGenerator::process_event(), PHG4ParticleGeneratorD0::process_event(), PHG4ParticleGeneratorVectorMeson::process_event(), and PHG4SimpleEventGenerator::process_event().
|
inlinevirtual |
Definition at line 33 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 33 of file PHG4ParticleGeneratorBase.h
References m_Vtx_y.
Referenced by PHG4ParticleGun::process_event(), PHG4IonGun::process_event(), PHG4ParticleGenerator::process_event(), PHG4ParticleGeneratorD0::process_event(), PHG4ParticleGeneratorVectorMeson::process_event(), and PHG4SimpleEventGenerator::process_event().
|
inlinevirtual |
Definition at line 34 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 34 of file PHG4ParticleGeneratorBase.h
References m_Vtx_z.
Referenced by PHG4ParticleGun::process_event(), PHG4IonGun::process_event(), PHG4ParticleGenerator::process_event(), PHG4ParticleGeneratorD0::process_event(), PHG4ParticleGeneratorVectorMeson::process_event(), and PHG4SimpleEventGenerator::process_event().
|
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 SubsysReco.
Reimplemented in PHG4ParticleGeneratorVectorMeson, PHG4SimpleEventGenerator, PHG4ParticleGeneratorD0, and PHG4PileupGenerator.
Definition at line 128 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 128 of file PHG4ParticleGeneratorBase.cc
References PHCompositeNode::addNode(), and PHNodeIterator::findFirst().
Referenced by PHG4PileupGenerator::InitRun().
|
inlineprotected |
Definition at line 58 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 58 of file PHG4ParticleGeneratorBase.h
References particlelist.
Referenced by PHG4ParticleGun::process_event(), PHG4ParticleGenerator::process_event(), PHG4ParticleGeneratorD0::process_event(), PHG4ParticleGeneratorVectorMeson::process_event(), and ResetParticleList().
|
inlineprotected |
Definition at line 59 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 59 of file PHG4ParticleGeneratorBase.h
References particlelist.
Referenced by PHG4ParticleGun::process_event(), PHG4ParticleGenerator::process_event(), PHG4ParticleGeneratorD0::process_event(), PHG4ParticleGeneratorVectorMeson::process_event(), and ResetParticleList().
|
inlineoverridevirtual |
Print out some info about this module.
what | can be used to specify what to print exactly. |
Reimplemented from SubsysReco.
Definition at line 37 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 37 of file PHG4ParticleGeneratorBase.h
References PrintParticles().
|
virtual |
Definition at line 150 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 150 of file PHG4ParticleGeneratorBase.cc
References i, and particlelist.
Referenced by PHG4ParticleGenerator::Print(), and Print().
|
overridevirtual |
Called for each event. This is where you do the real work.
Reimplemented from SubsysReco.
Reimplemented in PHG4ParticleGeneratorVectorMeson, PHG4SimpleEventGenerator, PHG4ParticleGeneratorD0, PHG4PileupGenerator, and PHG4ParticleGun.
Definition at line 144 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 144 of file PHG4ParticleGeneratorBase.cc
References Fun4AllBase::Name(), and PHWHERE.
Referenced by PHG4PileupGenerator::process_event().
|
inlineprotected |
Definition at line 56 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 56 of file PHG4ParticleGeneratorBase.h
References m_RandomGenerator.
Referenced by PHG4ParticleGenerator::process_event(), PHG4ParticleGeneratorD0::process_event(), PHG4PileupGenerator::process_event(), PHG4SimpleEventGenerator::process_event(), PHG4ParticleGeneratorVectorMeson::process_event(), PHG4ParticleGeneratorVectorMeson::smearvtx(), and PHG4SimpleEventGenerator::smearvtx().
|
protected |
Definition at line 314 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 314 of file PHG4ParticleGeneratorBase.cc
References particlelist, particlelist_begin(), and particlelist_end().
Referenced by PHG4ParticleGeneratorD0::process_event(), and PHG4ParticleGeneratorVectorMeson::process_event().
|
virtual |
Definition at line 212 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 212 of file PHG4ParticleGeneratorBase.cc
References assert, PHHepMCGenEvent::get_collision_vertex(), PHG4VtxPoint::get_x(), PHG4VtxPoint::get_y(), PHG4VtxPoint::get_z(), PHG4InEvent::GetNVtx(), PHG4TruthInfoContainer::GetPrimaryVtx(), PHG4InEvent::GetVertices(), PHG4VtxPoint::identify(), PHHepMCGenEvent::identify(), PHG4TruthInfoContainer::identify(), m_ReUseExistingVertexFlag, PHWHERE, PHHepMCGenEventMap::rbegin(), PHHepMCGenEventMap::rend(), set_vtx(), and Fun4AllBase::Verbosity().
Referenced by PHG4ParticleGun::process_event(), PHG4IonGun::process_event(), PHG4ParticleGenerator::process_event(), PHG4ParticleGeneratorD0::process_event(), PHG4ParticleGeneratorVectorMeson::process_event(), and PHG4SimpleEventGenerator::process_event().
Definition at line 111 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 111 of file PHG4ParticleGeneratorBase.cc
References CheckAndCreateParticleVector(), and particlelist.
Referenced by Fun4All_EICAnalysis_DVCS(), Fun4All_G4_block(), Fun4All_G4_Calos(), Fun4All_G4_EICIR(), Fun4All_G4_Example01(), Fun4All_G4_Example02(), Fun4All_G4_Example03(), Fun4All_G4_Geantino(), Fun4All_G4_LeadBrick(), Fun4All_G4_MyDetector(), Fun4All_G4_Prototype2(), Fun4All_G4_Prototype3(), Fun4All_G4_Prototype4(), Fun4All_G4_sPHENIX_photonjet(), Fun4All_G4_sPHENIX_photons(), Fun4All_G4_sPHENIX_truthphotonjet(), Fun4All_G4_Write_Dst(), and Fun4All_single_particle().
|
virtual |
Definition at line 97 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 97 of file PHG4ParticleGeneratorBase.cc
References CheckAndCreateParticleVector(), get_pdgcode(), and particlelist.
Referenced by Fun4All_EICAnalysis_DVCS(), Fun4All_G4_block(), Fun4All_G4_Calos(), Fun4All_G4_Cylinder(), Fun4All_G4_EICDetector_LQ(), Fun4All_G4_EICDetector_LQ_reference(), Fun4All_G4_EICDetector_RICH(), Fun4All_G4_EICIR(), Fun4All_G4_Example01(), Fun4All_G4_Example02(), Fun4All_G4_Example03(), Fun4All_G4_Geantino(), Fun4All_G4_LeadBrick(), Fun4All_G4_Momentum(), Fun4All_G4_Momentum_Projection(), Fun4All_G4_Momentum_Projection_Calorimeters(), Fun4All_G4_Momentum_Projection_Detectors(), Fun4All_G4_MyDetector(), Fun4All_G4_Prototype2(), Fun4All_G4_Prototype3(), Fun4All_G4_Prototype4(), Fun4All_G4_sPHENIX_photonjet(), Fun4All_G4_sPHENIX_photons(), Fun4All_G4_sPHENIX_truthphotonjet(), Fun4All_G4_Write_Dst(), Fun4All_Generator_Display(), and Fun4All_single_particle().
|
virtual |
Definition at line 105 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 105 of file PHG4ParticleGeneratorBase.cc
References CheckAndCreateParticleVector(), and particlelist.
|
inline |
Definition at line 45 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 45 of file PHG4ParticleGeneratorBase.h
References i, and m_ReUseExistingVertexFlag.
Referenced by ConfigureInput(), Fun4All_EICAnalysis_DVCS(), Fun4All_G4_EICDetector_LQ(), Fun4All_G4_EICDetector_LQ_reference(), Fun4All_G4_EICDetector_RICH(), Fun4All_G4_fsPHENIX_FastSim(), Fun4All_G4_fsPHENIX_pi0(), Fun4All_G4_sPHENIX(), Fun4All_G4_sPHENIX_AnaGenFit(), Fun4All_G4_sPHENIX_photonjet(), Fun4All_G4_sPHENIX_photons(), Fun4All_G4_sPHENIX_truthphotonjet(), Fun4All_Generator_Display(), Fun4All_single_particle(), Jin_BJet(), and Wrapper().
void PHG4ParticleGeneratorBase::set_seed | ( | const unsigned int | iseed | ) |
Definition at line 205 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 205 of file PHG4ParticleGeneratorBase.cc
References gsl_rng_set(), m_RandomGenerator, m_Seed, and Fun4AllBase::Name().
Referenced by Wrapper().
|
inlinevirtual |
Definition at line 30 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 30 of file PHG4ParticleGeneratorBase.h
Referenced by PHG4ParticleGeneratorD0::process_event(), and PHG4PileupGenerator::process_event().
Definition at line 120 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 120 of file PHG4ParticleGeneratorBase.cc
References m_Vtx_x, m_Vtx_y, m_Vtx_z, ambiguity_solver_full_chain::x, y, and physmon_track_finding_ttbar::z.
Referenced by Fun4All_EICAnalysis_DVCS(), Fun4All_G4_block(), Fun4All_G4_Calos(), Fun4All_G4_Cylinder(), Fun4All_G4_EICIR(), Fun4All_G4_Example01(), Fun4All_G4_Example02(), Fun4All_G4_Example03(), Fun4All_G4_Geantino(), Fun4All_G4_LeadBrick(), Fun4All_G4_Momentum(), Fun4All_G4_Momentum_Projection(), Fun4All_G4_Momentum_Projection_Calorimeters(), Fun4All_G4_Momentum_Projection_Detectors(), Fun4All_G4_MyDetector(), Fun4All_G4_Prototype2(), Fun4All_G4_Prototype3(), Fun4All_G4_Prototype4(), Fun4All_G4_sPHENIX_photonjet(), Fun4All_G4_sPHENIX_photons(), Fun4All_G4_sPHENIX_truthphotonjet(), Fun4All_G4_Write_Dst(), Fun4All_single_particle(), PHG4ParticleGeneratorD0::process_event(), PHG4SimpleEventGenerator::process_event(), PHG4ParticleGeneratorVectorMeson::process_event(), and ReuseExistingVertex().
|
inlinevirtual |
Definition at line 29 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 29 of file PHG4ParticleGeneratorBase.h
References m_Vtx_z, and physmon_track_finding_ttbar::z.
Referenced by PHG4ParticleGenerator::process_event(), and PHG4ParticleGeneratorD0::process_event().
|
protected |
Definition at line 188 of file PHG4ParticleGeneratorBase.cc.
View newest version in sPHENIX GitHub at line 188 of file PHG4ParticleGeneratorBase.cc
References PHG4InEvent::AddEmbeddedParticle(), PHG4Particle::get_name(), get_pdgcode(), get_pdgname(), PHG4Particle::get_pid(), m_EmbedFlag, PHG4Particle::set_name(), PHG4Particle::set_pid(), and size.
Referenced by PHG4ParticleGun::process_event(), PHG4ParticleGenerator::process_event(), PHG4IonGun::process_event(), PHG4ParticleGeneratorD0::process_event(), and PHG4ParticleGeneratorVectorMeson::process_event().
|
private |
Definition at line 64 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 64 of file PHG4ParticleGeneratorBase.h
Referenced by Embed(), EmbedFlag(), and SetParticleId().
|
private |
Definition at line 63 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 63 of file PHG4ParticleGeneratorBase.h
Referenced by PHG4ParticleGeneratorBase(), RandomGenerator(), set_seed(), and ~PHG4ParticleGeneratorBase().
|
private |
Definition at line 65 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 65 of file PHG4ParticleGeneratorBase.h
Referenced by get_reuse_existing_vertex(), ReuseExistingVertex(), and set_reuse_existing_vertex().
|
private |
Definition at line 66 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 66 of file PHG4ParticleGeneratorBase.h
Referenced by get_seed(), PHG4ParticleGeneratorBase(), and set_seed().
|
private |
Definition at line 70 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 70 of file PHG4ParticleGeneratorBase.h
|
private |
Definition at line 67 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 67 of file PHG4ParticleGeneratorBase.h
Referenced by get_vtx_x(), and set_vtx().
|
private |
Definition at line 68 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 68 of file PHG4ParticleGeneratorBase.h
Referenced by get_vtx_y(), and set_vtx().
|
private |
Definition at line 69 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 69 of file PHG4ParticleGeneratorBase.h
Referenced by get_vtx_z(), set_vtx(), and set_vtx_z().
|
private |
Definition at line 71 of file PHG4ParticleGeneratorBase.h.
View newest version in sPHENIX GitHub at line 71 of file PHG4ParticleGeneratorBase.h
Referenced by AddParticle(), CheckAndCreateParticleVector(), particlelist_begin(), particlelist_end(), PrintParticles(), ResetParticleList(), set_mom(), set_name(), set_pid(), and ~PHG4ParticleGeneratorBase().