Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4ParticleGun Class Reference

#include <coresoftware/blob/master/simulation/g4simulation/g4main/PHG4ParticleGun.h>

+ Inheritance diagram for PHG4ParticleGun:
+ Collaboration diagram for PHG4ParticleGun:

Public Member Functions

 PHG4ParticleGun (const std::string &name="PGUN")
 
 ~PHG4ParticleGun () override
 
int process_event (PHCompositeNode *topNode) override
 
- Public Member Functions inherited from PHG4ParticleGeneratorBase
 ~PHG4ParticleGeneratorBase () override
 
int InitRun (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.
 

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 ()
 

Detailed Description

Definition at line 12 of file PHG4ParticleGun.h.

View newest version in sPHENIX GitHub at line 12 of file PHG4ParticleGun.h

Constructor & Destructor Documentation

PHG4ParticleGun::PHG4ParticleGun ( const std::string &  name = "PGUN")

Definition at line 13 of file PHG4ParticleGun.cc.

View newest version in sPHENIX GitHub at line 13 of file PHG4ParticleGun.cc

PHG4ParticleGun::~PHG4ParticleGun ( )
inlineoverride

Definition at line 16 of file PHG4ParticleGun.h.

View newest version in sPHENIX GitHub at line 16 of file PHG4ParticleGun.h

Member Function Documentation

int PHG4ParticleGun::process_event ( PHCompositeNode )
overridevirtual

Called for each event. This is where you do the real work.

Reimplemented from PHG4ParticleGeneratorBase.

Definition at line 19 of file PHG4ParticleGun.cc.

View newest version in sPHENIX GitHub at line 19 of file PHG4ParticleGun.cc

References PHG4InEvent::AddParticle(), PHG4InEvent::AddVtx(), PHG4ParticleGeneratorBase::get_t0(), PHG4ParticleGeneratorBase::get_vtx_x(), PHG4ParticleGeneratorBase::get_vtx_y(), PHG4ParticleGeneratorBase::get_vtx_z(), PHG4InEvent::identify(), particle, PHG4ParticleGeneratorBase::particlelist_begin(), PHG4ParticleGeneratorBase::particlelist_end(), PHG4ParticleGeneratorBase::ReuseExistingVertex(), PHG4ParticleGeneratorBase::SetParticleId(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:


The documentation for this class was generated from the following files: