Struct RMGVertexConfinement::SampleableObjectCollection

Nested Relationships

This struct is a nested type of Class RMGVertexConfinement.

Struct Documentation

struct SampleableObjectCollection

A collection of SampleableObjects . Can be used to sample from by selecting a volume weighted by surface area or volume.

Public Functions

SampleableObjectCollection() = default
inline ~SampleableObjectCollection()
const SampleableObject &SurfaceWeightedRand() const

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

Returns:

a reference to the chosen SampleableObject .

const SampleableObject &VolumeWeightedRand() const

Select a SampleableObject from the collection, weighted by volume.

Returns:

a reference to the chosen SampleableObject .

bool IsInside(const G4ThreeVector &vertex) const
inline size_t size() const
inline SampleableObject &at(size_t i)
template<typename ...Args>
void emplace_back(Args&&... args)
inline bool empty() const
inline SampleableObject &back()
inline void clear()
inline void insert(SampleableObjectCollection &other)

Public Members

std::vector<SampleableObject> data = {}
double total_volume = 0
double total_surface = 0