Class Reference for E1039 Core & Analysis Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PHG4ParticleGeneratorBase Class Reference

#include </dev/shm/kenichi/update-github-e1039-doc/e1039-core/simulation/g4main/PHG4ParticleGeneratorBase.h>

+ Inheritance diagram for PHG4ParticleGeneratorBase:
+ Collaboration diagram for PHG4ParticleGeneratorBase:

Public Member Functions

virtual ~PHG4ParticleGeneratorBase ()
 
virtual int InitRun (PHCompositeNode *topNode)
 
virtual int process_event (PHCompositeNode *topNode)
 
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_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
 
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...
 

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

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...
 

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 = INT_MAX - 10
}
 

Detailed Description

Definition at line 16 of file PHG4ParticleGeneratorBase.h.

Constructor & Destructor Documentation

◆ ~PHG4ParticleGeneratorBase()

PHG4ParticleGeneratorBase::~PHG4ParticleGeneratorBase ( )
virtual

Definition at line 41 of file PHG4ParticleGeneratorBase.cc.

References particlelist, and RandomGenerator.

◆ PHG4ParticleGeneratorBase()

PHG4ParticleGeneratorBase::PHG4ParticleGeneratorBase ( const std::string &  name = "GENERATORBASE")
protected

Definition at line 26 of file PHG4ParticleGeneratorBase.cc.

References RandomGenerator, and seed.

Member Function Documentation

◆ AddParticle() [1/2]

void PHG4ParticleGeneratorBase::AddParticle ( const int  pid,
const double  x,
const double  y,
const double  z 
)
virtual

Definition at line 160 of file PHG4ParticleGeneratorBase.cc.

References particlelist, PHG4Particle::set_pid(), PHG4Particle::set_px(), PHG4Particle::set_py(), and PHG4Particle::set_pz().

+ Here is the call graph for this function:

◆ AddParticle() [2/2]

void PHG4ParticleGeneratorBase::AddParticle ( const std::string &  particle,
const double  x,
const double  y,
const double  z 
)
virtual

Definition at line 154 of file PHG4ParticleGeneratorBase.cc.

References get_pdgcode(), and particlelist.

Referenced by PHG4ParticleGeneratorD0::process_event(), and PHG4ParticleGeneratorVectorMeson::process_event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckAndCreateParticleVector()

void PHG4ParticleGeneratorBase::CheckAndCreateParticleVector ( )
protected

Definition at line 170 of file PHG4ParticleGeneratorBase.cc.

References particlelist.

Referenced by set_mom(), set_name(), and set_pid().

+ Here is the caller graph for this function:

◆ Embed()

virtual void PHG4ParticleGeneratorBase::Embed ( const int  i = 1)
inlinevirtual

Definition at line 38 of file PHG4ParticleGeneratorBase.h.

References embedflag.

◆ get_mass()

double PHG4ParticleGeneratorBase::get_mass ( const int  pdgcode) const
protected

Definition at line 78 of file PHG4ParticleGeneratorBase.cc.

References get_pdgname().

Referenced by PHG4PSScanGenerator::process_event(), and PHG4SimpleEventGenerator::process_event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_pdgcode()

int PHG4ParticleGeneratorBase::get_pdgcode ( const std::string &  name) const
protected

Definition at line 52 of file PHG4ParticleGeneratorBase.cc.

Referenced by AddParticle(), PHG4PSScanGenerator::process_event(), PHG4SimpleEventGenerator::process_event(), set_name(), and SetParticleId().

+ Here is the caller graph for this function:

◆ get_pdgname()

string PHG4ParticleGeneratorBase::get_pdgname ( const int  pdgcode) const
protected

Definition at line 65 of file PHG4ParticleGeneratorBase.cc.

Referenced by get_mass(), PHG4PSScanGenerator::InitRun(), PHG4SimpleEventGenerator::InitRun(), SQSingleMuonGen::process_event(), SQCosmicGen::process_event(), and SetParticleId().

+ Here is the caller graph for this function:

◆ get_reuse_existing_vertex()

int PHG4ParticleGeneratorBase::get_reuse_existing_vertex ( ) const
inline

Definition at line 41 of file PHG4ParticleGeneratorBase.h.

References reuse_existing_vertex.

Referenced by PHG4PSScanGenerator::InitRun(), and PHG4SimpleEventGenerator::InitRun().

+ Here is the caller graph for this function:

◆ get_seed()

unsigned int PHG4ParticleGeneratorBase::get_seed ( ) const
inline

Definition at line 44 of file PHG4ParticleGeneratorBase.h.

References seed.

Referenced by PHG4PSScanGenerator::InitRun(), and PHG4SimpleEventGenerator::InitRun().

+ Here is the caller graph for this function:

◆ get_t0()

virtual double PHG4ParticleGeneratorBase::get_t0 ( ) const
inlinevirtual

Definition at line 33 of file PHG4ParticleGeneratorBase.h.

References t0.

◆ get_vtx_x()

virtual double PHG4ParticleGeneratorBase::get_vtx_x ( ) const
inlinevirtual

Definition at line 30 of file PHG4ParticleGeneratorBase.h.

References vtx_x.

◆ get_vtx_y()

virtual double PHG4ParticleGeneratorBase::get_vtx_y ( ) const
inlinevirtual

Definition at line 31 of file PHG4ParticleGeneratorBase.h.

References vtx_y.

◆ get_vtx_z()

virtual double PHG4ParticleGeneratorBase::get_vtx_z ( ) const
inlinevirtual

Definition at line 32 of file PHG4ParticleGeneratorBase.h.

References vtx_z.

◆ InitRun()

int PHG4ParticleGeneratorBase::InitRun ( PHCompositeNode )
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 SubsysReco.

Reimplemented in SQCosmicGen, PHG4SimpleEventGenerator, PHG4PSScanGenerator, PHG4PileupGenerator, PHG4ParticleGun, PHG4ParticleGeneratorVectorMeson, PHG4ParticleGeneratorD0, SQSingleMuonGen, SQPrimaryParticleGen, and SQPileupGen.

Definition at line 120 of file PHG4ParticleGeneratorBase.cc.

References PHCompositeNode::addNode(), and PHNodeIterator::findFirst().

Referenced by PHG4ParticleGun::InitRun(), and PHG4PileupGenerator::InitRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Print()

void PHG4ParticleGeneratorBase::Print ( const std::string &  what = "ALL") const
virtual

Print out some info about this module.

Parameters
whatcan be used to specify what to print exactly.

Reimplemented from SubsysReco.

Definition at line 142 of file PHG4ParticleGeneratorBase.cc.

References particlelist.

◆ process_event()

int PHG4ParticleGeneratorBase::process_event ( PHCompositeNode )
virtual

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

Reimplemented from SubsysReco.

Reimplemented in SQCosmicGen, PHG4SimpleEventGenerator, PHG4PSScanGenerator, PHG4PileupGenerator, PHG4ParticleGun, PHG4ParticleGeneratorVectorMeson, PHG4ParticleGeneratorD0, PHG4ParticleGenerator, SQSingleMuonGen, SQPrimaryParticleGen, and SQPileupGen.

Definition at line 136 of file PHG4ParticleGeneratorBase.cc.

References Fun4AllBase::Name(), and PHWHERE.

Referenced by PHG4PileupGenerator::process_event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReuseExistingVertex()

int PHG4ParticleGeneratorBase::ReuseExistingVertex ( PHCompositeNode topNode)
virtual

◆ set_mom()

void PHG4ParticleGeneratorBase::set_mom ( const double  x,
const double  y,
const double  z 
)
virtual

Definition at line 103 of file PHG4ParticleGeneratorBase.cc.

References CheckAndCreateParticleVector(), and particlelist.

+ Here is the call graph for this function:

◆ set_name()

void PHG4ParticleGeneratorBase::set_name ( const std::string &  particle = "proton")
virtual

Definition at line 89 of file PHG4ParticleGeneratorBase.cc.

References CheckAndCreateParticleVector(), get_pdgcode(), and particlelist.

+ Here is the call graph for this function:

◆ set_pid()

void PHG4ParticleGeneratorBase::set_pid ( const int  pid)
virtual

Definition at line 97 of file PHG4ParticleGeneratorBase.cc.

References CheckAndCreateParticleVector(), and particlelist.

+ Here is the call graph for this function:

◆ set_reuse_existing_vertex()

void PHG4ParticleGeneratorBase::set_reuse_existing_vertex ( const int  i = 1)
inline

Definition at line 42 of file PHG4ParticleGeneratorBase.h.

References reuse_existing_vertex.

◆ set_seed()

void PHG4ParticleGeneratorBase::set_seed ( const unsigned int  iseed)

Definition at line 197 of file PHG4ParticleGeneratorBase.cc.

References Fun4AllBase::Name(), RandomGenerator, and seed.

+ Here is the call graph for this function:

◆ set_t0()

virtual void PHG4ParticleGeneratorBase::set_t0 ( const double  t)
inlinevirtual

Reimplemented in PHG4SimpleEventGenerator, and PHG4PSScanGenerator.

Definition at line 28 of file PHG4ParticleGeneratorBase.h.

References t0.

Referenced by PHG4PileupGenerator::process_event().

+ Here is the caller graph for this function:

◆ set_vtx()

void PHG4ParticleGeneratorBase::set_vtx ( const double  x,
const double  y,
const double  z 
)
virtual

Definition at line 112 of file PHG4ParticleGeneratorBase.cc.

References vtx_x, vtx_y, and vtx_z.

Referenced by ReuseExistingVertex().

+ Here is the caller graph for this function:

◆ SetParticleId()

void PHG4ParticleGeneratorBase::SetParticleId ( PHG4Particle particle,
PHG4InEvent ineve 
)
protected

Definition at line 180 of file PHG4ParticleGeneratorBase.cc.

References PHG4InEvent::AddEmbeddedParticle(), embedflag, PHG4Particle::get_name(), get_pdgcode(), get_pdgname(), PHG4Particle::get_pid(), PHG4Particle::set_name(), and PHG4Particle::set_pid().

Referenced by PHG4ParticleGenerator::process_event(), PHG4ParticleGeneratorD0::process_event(), PHG4ParticleGeneratorVectorMeson::process_event(), and PHG4ParticleGun::process_event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ embedflag

◆ particlelist

◆ RandomGenerator

◆ reuse_existing_vertex

int PHG4ParticleGeneratorBase::reuse_existing_vertex
protected

◆ seed

unsigned int PHG4ParticleGeneratorBase::seed
protected

Definition at line 60 of file PHG4ParticleGeneratorBase.h.

Referenced by get_seed(), PHG4ParticleGeneratorBase(), and set_seed().

◆ t0

◆ vtx_x

◆ vtx_y

◆ vtx_z


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