aegir
Phlex-based simulation framework for the SHiP experiment.
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
aegir Namespace Reference

Namespaces

namespace  clhep
 
namespace  hepmc
 

Classes

class  PhiloxRndmEngine
 

Typedefs

using mc_particle_generator = std::function< std::vector< SHiP::MCParticle >(phlex::data_cell_index const &)>
 
using event_header_generator = std::function< SHiP::EventHeader(phlex::data_cell_index const &)>
 
using PythiaTime = mp_units::quantity< ship::units::mm_per_c, double >
 

Enumerations

enum class  record_mode : std::uint8_t { final_state , full }
 

Functions

double magnitude (std::array< double, 3 > const &v)
 
template<typename Q >
Q magnitude (ship::Vec3< Q > const &v)
 
std::string source_stage (phlex::configuration const &config, std::string const &component)
 
phlex::provider_bundles mc_particle_provider_bundles (phlex::product_selector const &selector, std::string const &stage, mc_particle_generator generate, phlex::concurrency max_concurrency, event_header_generator generate_header={})
 
template<typename Registrar , typename Source >
void provide_constant (Registrar &s, char const *algorithm, std::shared_ptr< Source > source, char const *creator, char const *suffix, char const *layer)
 
int pythia_seed (std::uint32_t base, int extra_streams=0)
 
template<typename Pythia >
void configure_beams (Pythia &pythia, int idA, int idB, ship::Energy beam_energy)
 
template<typename Pythia >
void stabilise_long_lived (Pythia &pythia, PythiaTime tau0_threshold)
 
template<typename Pythia >
void next_event (Pythia &pythia, std::string_view source_name, int max_attempts=10)
 
template<typename MCParticle >
std::vector< MCParticle > extract_particles (Pythia8::Event const &event, ship::Length z_offset=ship::Length::zero(), record_mode mode=record_mode::final_state)
 
record_mode parse_record_mode (std::string_view value, std::string_view source)
 Parse the record configuration option.
 
std::uint32_t resolve_seed (phlex::configuration const &config, std::string const &component)
 
template<auto U>
mp_units::quantity< U, double > get_quantity (phlex::configuration const &config, std::string const &key, mp_units::quantity< U, double > fallback)
 Read config key key as a quantity in the unit of fallback, e.g.
 

Variables

constexpr std::uint32_t kPythiaEventStream = 0x50595448
 
constexpr std::uint32_t kPythiaInitStream = 0x50594E49
 

Typedef Documentation

◆ event_header_generator

using aegir::event_header_generator = typedef std::function<SHiP::EventHeader(phlex::data_cell_index const&)>

◆ mc_particle_generator

using aegir::mc_particle_generator = typedef std::function<std::vector<SHiP::MCParticle>(phlex::data_cell_index const&)>

◆ PythiaTime

using aegir::PythiaTime = typedef mp_units::quantity<ship::units::mm_per_c, double>

Enumeration Type Documentation

◆ record_mode

enum class aegir::record_mode : std::uint8_t
strong
Enumerator
final_state 

Only particles the generator left undecayed.

full 

The whole record, statuses and mother links intact.

Function Documentation

◆ configure_beams()

template<typename Pythia >
void aegir::configure_beams ( Pythia &  pythia,
int  idA,
int  idB,
ship::Energy  beam_energy 
)

◆ extract_particles()

template<typename MCParticle >
std::vector< MCParticle > aegir::extract_particles ( Pythia8::Event const &  event,
ship::Length  z_offset = ship::Length::zero(),
record_mode  mode = record_mode::final_state 
)

◆ get_quantity()

template<auto U>
mp_units::quantity< U, double > aegir::get_quantity ( phlex::configuration const &  config,
std::string const &  key,
mp_units::quantity< U, double >  fallback 
)

Read config key key as a quantity in the unit of fallback, e.g.

auto beam_energy = get_quantity(config, "beam_energy", 400.0 * su::GeV);

◆ magnitude() [1/2]

template<typename Q >
Q aegir::magnitude ( ship::Vec3< Q > const &  v)
inline

◆ magnitude() [2/2]

double aegir::magnitude ( std::array< double, 3 > const &  v)
inline

◆ mc_particle_provider_bundles()

phlex::provider_bundles aegir::mc_particle_provider_bundles ( phlex::product_selector const &  selector,
std::string const &  stage,
mc_particle_generator  generate,
phlex::concurrency  max_concurrency,
event_header_generator  generate_header = {} 
)
inline

◆ next_event()

template<typename Pythia >
void aegir::next_event ( Pythia &  pythia,
std::string_view  source_name,
int  max_attempts = 10 
)

◆ parse_record_mode()

record_mode aegir::parse_record_mode ( std::string_view  value,
std::string_view  source 
)
inline

Parse the record configuration option.

Throws on an unknown value rather than silently falling back: a typo here would quietly change the physics content of the output.

◆ provide_constant()

template<typename Registrar , typename Source >
void aegir::provide_constant ( Registrar &  s,
char const *  algorithm,
std::shared_ptr< Source >  source,
char const *  creator,
char const *  suffix,
char const *  layer 
)

◆ pythia_seed()

int aegir::pythia_seed ( std::uint32_t  base,
int  extra_streams = 0 
)
inline

◆ resolve_seed()

std::uint32_t aegir::resolve_seed ( phlex::configuration const &  config,
std::string const &  component 
)
inline

◆ source_stage()

std::string aegir::source_stage ( phlex::configuration const &  config,
std::string const &  component 
)
inline

◆ stabilise_long_lived()

template<typename Pythia >
void aegir::stabilise_long_lived ( Pythia &  pythia,
PythiaTime  tau0_threshold 
)

Variable Documentation

◆ kPythiaEventStream

constexpr std::uint32_t aegir::kPythiaEventStream = 0x50595448
inlineconstexpr

◆ kPythiaInitStream

constexpr std::uint32_t aegir::kPythiaInitStream = 0x50594E49
inlineconstexpr