HPS-MC
StdHepConverter Class Reference

Convert LHE files to StdHep using EGS5. More...

Inheritance diagram for StdHepConverter:
EGS5 EventGenerator Component

Public Member Functions

def __init__ (self, name="lhe_v1", **kwargs)
 
def config (self, parser)
 Automatic configuration. More...
 
def setup (self)
 Setup egs5 generator. More...
 
def execute (self, log_out, log_err)
 Execute converter. More...
 
def output_files (self)
 Converts *.lhe.gz and *.lhe to *.stdhep files. More...
 
- Public Member Functions inherited from EGS5
def get_install_dir (self)
 Get installation directory. 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 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...
 

Additional Inherited Members

- Public Attributes inherited from EGS5
 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

Convert LHE files to StdHep using EGS5.

Definition at line 135 of file generators.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  name = "lhe_v1",
**  kwargs 
)

Reimplemented from EGS5.

Definition at line 138 of file generators.py.

Member Function Documentation

◆ config()

def config (   self,
  parser 
)

Automatic configuration.

   Automatically load attributes from config by reading in values from
   the section with the same name as the class in the config file and
   assigning them to class attributes with the same name.

   @param parser  config parser

Reimplemented from Component.

Definition at line 144 of file generators.py.

◆ execute()

def execute (   self,
  log_out,
  log_err 
)

Execute converter.

Calls egs5 generator.

Parameters
log_outname of log file for output
log_errname of log file for error
Returns
egs5 error code

Reimplemented from EGS5.

Definition at line 154 of file generators.py.

◆ output_files()

def output_files (   self)

Converts *.lhe.gz and *.lhe to *.stdhep files.

Reimplemented from EGS5.

Definition at line 174 of file generators.py.

◆ setup()

def setup (   self)

Setup egs5 generator.

Throws exception if input LHE file is missing.

Reimplemented from EGS5.

Definition at line 147 of file generators.py.


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