remage
Simulation framework for HPGe-based experiments
 
Loading...
Searching...
No Matches
RMGVertexConfinement::SampleableObjectCollection Struct Reference

A collection of SampleableObject objects. It can be used to sample from by selecting a volume weighted by surface area or volume. More...

#include <RMGVertexConfinement.hh>

Public Member Functions

const SampleableObjectSurfaceWeightedRand () const
 Select a SampleableObject from the collection, weighted by surface area.
 
const SampleableObjectVolumeWeightedRand (bool weight_by_mass) const
 Select a SampleableObject from the collection, weighted by volume.
 
bool IsInside (const G4ThreeVector &vertex) const
 
size_t size () const
 
SampleableObjectat (size_t i)
 
template<typename... Args>
void emplace_back (Args &&... args)
 
bool empty () const
 
SampleableObjectback ()
 
void clear ()
 
void insert (SampleableObjectCollection &other)
 
void recalc_total (bool weigh_by_mass, int mass_isotope_z, int mass_istotope_n)
 

Public Attributes

std::vector< SampleableObjectdata
 
double total_volume = 0
 
double total_mass = 0
 
double total_surface = 0
 

Detailed Description

A collection of SampleableObject objects. It can be used to sample from by selecting a volume weighted by surface area or volume.

Member Function Documentation

◆ SurfaceWeightedRand()

const RMGVertexConfinement::SampleableObject & RMGVertexConfinement::SampleableObjectCollection::SurfaceWeightedRand ( ) const
nodiscard

Select a SampleableObject from the collection, weighted by surface area.

Returns
a reference to the chosen SampleableObject .

◆ VolumeWeightedRand()

const RMGVertexConfinement::SampleableObject & RMGVertexConfinement::SampleableObjectCollection::VolumeWeightedRand ( bool weight_by_mass) const
nodiscard

Select a SampleableObject from the collection, weighted by volume.

Returns
a reference to the chosen SampleableObject .
Parameters
weight_by_massA flag of whether the volume weighting should be done by mass and not by volume.

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