![]() |
ATLAS Offline Software
|
a class to generate random numbers with a unique seed More...
#include <BootstrapGeneratorAlg.h>
Public Member Functions | |
| BootstrapGenerator () | |
| the standard constructor | |
| std::uint64_t | fnv1a_64 (const void *buffer, size_t size, std::uint64_t offset_basis) |
| implementation of the hash function from https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function | |
| void | setSeed (std::uint64_t eventNumber, std::uint32_t runNumber, std::uint32_t mcChannelNumber) |
| set the seed of the random number generator based on event properties | |
| std::uint64_t | generateSeed (std::uint64_t eventNumber, std::uint32_t runNumber, std::uint32_t mcChannelNumber) |
| generate a unique seed based on event identifiers | |
| std::uint8_t | getBootstrap () |
| get the next bootstrap weight | |
Private Attributes | |
| TRandomRanluxpp | m_rng |
| the random number generator (Ranlux++) | |
Static Private Attributes | |
| static constexpr std::uint64_t | m_offset = 14695981039346656037u |
| constants for seed generation | |
| static constexpr std::uint64_t | m_prime = 1099511628211u |
a class to generate random numbers with a unique seed
Definition at line 21 of file BootstrapGeneratorAlg.h.
|
inline |
| std::uint64_t CP::BootstrapGenerator::fnv1a_64 | ( | const void * | buffer, |
| size_t | size, | ||
| std::uint64_t | offset_basis ) |
implementation of the hash function from https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
Definition at line 15 of file BootstrapGeneratorAlg.cxx.
| std::uint64_t CP::BootstrapGenerator::generateSeed | ( | std::uint64_t | eventNumber, |
| std::uint32_t | runNumber, | ||
| std::uint32_t | mcChannelNumber ) |
generate a unique seed based on event identifiers
Definition at line 25 of file BootstrapGeneratorAlg.cxx.
|
inline |
get the next bootstrap weight
Definition at line 41 of file BootstrapGeneratorAlg.h.
| void CP::BootstrapGenerator::setSeed | ( | std::uint64_t | eventNumber, |
| std::uint32_t | runNumber, | ||
| std::uint32_t | mcChannelNumber ) |
set the seed of the random number generator based on event properties
Definition at line 33 of file BootstrapGeneratorAlg.cxx.
|
staticconstexprprivate |
constants for seed generation
Definition at line 45 of file BootstrapGeneratorAlg.h.
|
staticconstexprprivate |
Definition at line 46 of file BootstrapGeneratorAlg.h.
|
private |
the random number generator (Ranlux++)
Definition at line 50 of file BootstrapGeneratorAlg.h.