HPS-MC
EGS5 Class Reference

Run the EGS5 event generator to produce a StdHep file. More...

Inheritance diagram for EGS5:
EventGenerator Component StdHepConverter

Public Member Functions

def __init__ (self, name='', **kwargs)
 
def get_install_dir (self)
 Get installation directory. More...
 
def setup (self)
 Setup of egs5 event generator. More...
 
def output_files (self)
 Generate output file name. More...
 
def execute (self, log_out, log_err)
 Execute event generator. More...
 
def required_parameters (self)
 Return required parameters. More...
 
def optional_parameters (self)
 Return optional parameters. More...
 
- Public Member Functions inherited from EventGenerator
def __init__ (self, name, command=None, **kwargs)
 
- Public Member Functions inherited from Component
def __init__ (self, name, command=None, nevents=None, seed=1, inputs=[], outputs=None, append_tok=None, output_ext=None, ignore_job_params=[], **kwargs)
 
def cmd_line_str (self)
 
def cmd_exists (self)
 Check if the component's assigned command exists. More...
 
def cmd_args (self)
 Return the command arguments of this component. More...
 
def cmd_args_str (self)
 Return list of arguments, making sure they are all converted to strings. More...
 
def cleanup (self)
 Perform post-job cleanup such as deleting temporary files. More...
 
def config_logging (self, parser)
 Configure the logging for a component. More...
 
def config (self, parser)
 Automatic configuration. More...
 
def set_parameters (self, params)
 Set class attributes for the component based on JSON parameters. More...
 
def required_config (self)
 Return a list of required configuration settings. More...
 
def check_config (self)
 Raise an exception on the first missing config setting for this component. More...
 
def input_files (self)
 Get a list of input files for this component. More...
 
def config_from_environ (self)
 Configure component from environment variables which are just upper case versions of the required config names set in the shell environment. More...
 

Public Attributes

 bunches
 
 target_thickness
 target thickness in $\mu$m, More...
 
 egs5_dir
 egs5 installation directory More...
 
 beam_energy
 beam energy in MeV More...
 
 num_electrons
 number of electrons More...
 
 egs5_data_dir
 data directory More...
 
 egs5_config_dir
 config directory More...
 
 target_dz
 
- Public Attributes inherited from Component
 name
 
 command
 
 nevents
 
 seed
 
 inputs
 
 outputs
 
 append_tok
 
 output_ext
 
 ignore_job_params
 
 hpsmc_dir
 
 logger
 

Detailed Description

Run the EGS5 event generator to produce a StdHep file.

Required parameters are seed, target_thickness, beam_energy, num_electrons
Optional parameters are: bunches

Definition at line 28 of file generators.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  name = '',
**  kwargs 
)

Reimplemented in StdHepConverter.

Definition at line 36 of file generators.py.

Member Function Documentation

◆ execute()

def execute (   self,
  log_out,
  log_err 
)

Execute event generator.

Parameters
log_outname of log file for output
log_errname of log file for error

Reimplemented from Component.

Reimplemented in StdHepConverter.

Definition at line 103 of file generators.py.

◆ get_install_dir()

def get_install_dir (   self)

Get installation directory.

Reimplemented from EventGenerator.

Definition at line 49 of file generators.py.

◆ optional_parameters()

def optional_parameters (   self)

Return optional parameters.

Optional parameters are: bunches

Reimplemented from Component.

Definition at line 123 of file generators.py.

◆ output_files()

def output_files (   self)

Generate output file name.

Returns
moller.stdhep if name of generator contains moller; beam.stdhep else

Reimplemented from Component.

Reimplemented in StdHepConverter.

Definition at line 94 of file generators.py.

◆ required_parameters()

def required_parameters (   self)

Return required parameters.

Required parameters are seed, target_thickness, beam_energy, num_electrons

Reimplemented from EventGenerator.

Definition at line 115 of file generators.py.

◆ setup()

def setup (   self)

Setup of egs5 event generator.

Reimplemented from Component.

Reimplemented in StdHepConverter.

Definition at line 53 of file generators.py.

Member Data Documentation

◆ beam_energy

beam_energy

beam energy in MeV

Definition at line 44 of file generators.py.

◆ bunches

bunches
Todo:
is this the number of bunches or the number of particles per bunch?

Definition at line 38 of file generators.py.

◆ egs5_config_dir

egs5_config_dir

config directory

Definition at line 64 of file generators.py.

◆ egs5_data_dir

egs5_data_dir

data directory

Definition at line 62 of file generators.py.

◆ egs5_dir

egs5_dir

egs5 installation directory

Definition at line 42 of file generators.py.

◆ num_electrons

num_electrons

number of electrons

Definition at line 46 of file generators.py.

◆ target_dz

target_dz

Definition at line 79 of file generators.py.

◆ target_thickness

target_thickness

target thickness in $\mu$m,

Todo:
is this correct?

Definition at line 40 of file generators.py.


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