37 std::vector<float>
const& pFractions);
48 template <
typename TFunction>
60 double const getAverageMassNumber()
const;
63 Code sampleTarget(std::vector<CrossSectionType>
const& sigma,
64 TRNG& randomStream)
const;
68 size_t getHash()
const;
76 std::vector<float>
const numberFractions_;
77 std::vector<Code>
const components_;
79 double const avgMassNumber_;
86 #include <corsika/detail/media/NuclearComposition.inl> Import and extend the phys::units package.
auto getWeightedSum(TFunction const &func) const
Sum all all relative composition weighted by func(element) This function sums all relative compositio...
std::vector< float > const & getFractions() const
Returns a const reference to the fraction.
The cascade namespace assembles all objects needed to simulate full particles cascades.
std::vector< Code > const & getComponents() const
Returns a const reference to the fraction.
size_t getSize() const
Number of elements in the composition array.
bool operator==(NuclearComposition const &v) const
based on hash value
Describes the composition of matter Allowes and handles the creation of custom matter compositions...
Interface to particle properties.
NuclearComposition(std::vector< Code > const &pComponents, std::vector< float > const &pFractions)
Constructor The constructore takes a list of elements and a list which describe the relative amount...