EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4IonGun Class Reference

#include <fun4all_coresoftware/blob/master/simulation/g4simulation/g4main/PHG4IonGun.h>

+ Inheritance diagram for PHG4IonGun:
+ Collaboration diagram for PHG4IonGun:

Public Member Functions

 PHG4IonGun (const std::string &name="PHG4IONGUN")
 
 ~PHG4IonGun () override
 
int process_event (PHCompositeNode *topNode) override
 
void SetA (const int a)
 
void SetZ (const int z)
 
void SetCharge (const int c)
 
void ExcitEnergy (const double e)
 
void SetMom (const double px, const double py, const double pz)
 
void Print (const std::string &what="ALL") const override
 
- Public Member Functions inherited from PHG4ParticleGeneratorBase
 ~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.
 

Private Member Functions

void UpdateParticle ()
 

Private Attributes

PHG4Particleion = nullptr
 
int A = 0
 
int Z = 0
 
double mom [3] = {NAN, NAN, NAN}
 
int ioncharge = 0
 
double excitEnergy = 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 = 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 14 of file PHG4IonGun.h.

View newest version in sPHENIX GitHub at line 14 of file PHG4IonGun.h

Constructor & Destructor Documentation

PHG4IonGun::PHG4IonGun ( const std::string &  name = "PHG4IONGUN")

Definition at line 23 of file PHG4IonGun.cc.

View newest version in sPHENIX GitHub at line 23 of file PHG4IonGun.cc

PHG4IonGun::~PHG4IonGun ( )
inlineoverride

Definition at line 18 of file PHG4IonGun.h.

View newest version in sPHENIX GitHub at line 18 of file PHG4IonGun.h

Member Function Documentation

void PHG4IonGun::ExcitEnergy ( const double  e)
inline

Definition at line 23 of file PHG4IonGun.h.

View newest version in sPHENIX GitHub at line 23 of file PHG4IonGun.h

References Acts::UnitConstants::e, and excitEnergy.

void PHG4IonGun::Print ( const std::string &  what = "ALL") const
overridevirtual

Print out some info about this module.

Parameters
whatcan be used to specify what to print exactly.

Reimplemented from SubsysReco.

Definition at line 72 of file PHG4IonGun.cc.

View newest version in sPHENIX GitHub at line 72 of file PHG4IonGun.cc

References A, excitEnergy, Acts::UnitConstants::GeV, ioncharge, mom, and Z.

int PHG4IonGun::process_event ( PHCompositeNode )
overridevirtual

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

Reimplemented from SubsysReco.

Definition at line 41 of file PHG4IonGun.cc.

View newest version in sPHENIX GitHub at line 41 of file PHG4IonGun.cc

References PHG4InEvent::AddParticle(), PHG4InEvent::AddVtx(), Fun4AllReturnCodes::EVENT_OK, PHG4ParticleGeneratorBase::get_t0(), PHG4ParticleGeneratorBase::get_vtx_x(), PHG4ParticleGeneratorBase::get_vtx_y(), PHG4ParticleGeneratorBase::get_vtx_z(), ion, particle, PHG4ParticleGeneratorBase::ReuseExistingVertex(), PHG4ParticleGeneratorBase::SetParticleId(), and UpdateParticle().

+ Here is the call graph for this function:

void PHG4IonGun::SetA ( const int  a)
inline

Definition at line 20 of file PHG4IonGun.h.

View newest version in sPHENIX GitHub at line 20 of file PHG4IonGun.h

References A.

Referenced by Fun4All_G4_IonGun().

+ Here is the caller graph for this function:

void PHG4IonGun::SetCharge ( const int  c)

Definition at line 29 of file PHG4IonGun.cc.

View newest version in sPHENIX GitHub at line 29 of file PHG4IonGun.cc

References ioncharge.

Referenced by Fun4All_G4_IonGun().

+ Here is the caller graph for this function:

void PHG4IonGun::SetMom ( const double  px,
const double  py,
const double  pz 
)

Definition at line 34 of file PHG4IonGun.cc.

View newest version in sPHENIX GitHub at line 34 of file PHG4IonGun.cc

References mom.

Referenced by Fun4All_G4_IonGun().

+ Here is the caller graph for this function:

void PHG4IonGun::SetZ ( const int  z)
inline

Definition at line 21 of file PHG4IonGun.h.

View newest version in sPHENIX GitHub at line 21 of file PHG4IonGun.h

References Z, and z.

Referenced by Fun4All_G4_IonGun().

+ Here is the caller graph for this function:

void PHG4IonGun::UpdateParticle ( )
private

Definition at line 57 of file PHG4IonGun.cc.

View newest version in sPHENIX GitHub at line 57 of file PHG4IonGun.cc

References A, excitEnergy, ion, ioncharge, mom, PHG4Particle::set_A(), PHG4Particle::set_ExcitEnergy(), PHG4Particle::set_name(), PHG4Particle::set_NumCharge(), PHG4Particle::set_pid(), PHG4Particle::set_px(), PHG4Particle::set_py(), PHG4Particle::set_pz(), PHG4Particle::set_Z(), and Z.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

int PHG4IonGun::A = 0
private

Definition at line 30 of file PHG4IonGun.h.

View newest version in sPHENIX GitHub at line 30 of file PHG4IonGun.h

Referenced by Print(), SetA(), and UpdateParticle().

double PHG4IonGun::excitEnergy = 0.
private

Definition at line 34 of file PHG4IonGun.h.

View newest version in sPHENIX GitHub at line 34 of file PHG4IonGun.h

Referenced by ExcitEnergy(), Print(), and UpdateParticle().

PHG4Particle* PHG4IonGun::ion = nullptr
private

Definition at line 29 of file PHG4IonGun.h.

View newest version in sPHENIX GitHub at line 29 of file PHG4IonGun.h

Referenced by process_event(), and UpdateParticle().

int PHG4IonGun::ioncharge = 0
private

Definition at line 33 of file PHG4IonGun.h.

View newest version in sPHENIX GitHub at line 33 of file PHG4IonGun.h

Referenced by Print(), SetCharge(), and UpdateParticle().

double PHG4IonGun::mom[3] = {NAN, NAN, NAN}
private

Definition at line 32 of file PHG4IonGun.h.

View newest version in sPHENIX GitHub at line 32 of file PHG4IonGun.h

Referenced by Print(), SetMom(), and UpdateParticle().

int PHG4IonGun::Z = 0
private

Definition at line 31 of file PHG4IonGun.h.

View newest version in sPHENIX GitHub at line 31 of file PHG4IonGun.h

Referenced by Print(), SetZ(), and UpdateParticle().


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