Struct RMGVertexConfinement::SampleableObjectCollection¶
Defined in File RMGVertexConfinement.hh
Nested Relationships¶
This struct is a nested type of Class RMGVertexConfinement.
Struct Documentation¶
-
struct SampleableObjectCollection
A collection of
SampleableObjectobjects. It 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
SampleableObjectfrom the collection, weighted by surface area.- Returns:
a reference to the chosen
SampleableObject.
-
const SampleableObject &VolumeWeightedRand(bool weight_by_mass) const
Select a
SampleableObjectfrom the collection, weighted by volume.- Parameters:
weight_by_mass – A flag of whether the volume weighting should be done by mass and not 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)
-
void recalc_total(bool weigh_by_mass, int mass_isotope_z, int mass_istotope_n)
Public Members
-
std::vector<SampleableObject> data
-
double total_volume = 0
-
double total_mass = 0
-
double total_surface = 0
-
SampleableObjectCollection() = default