7#ifndef ASG_ANALYSIS_ALGORITHMS__BOOTSTRAP_GENERATOR_ALG_H
8#define ASG_ANALYSIS_ALGORITHMS__BOOTSTRAP_GENERATOR_ALG_H
16#include <TRandomGen.h>
29 std::uint64_t
fnv1a_64(
const void *buffer,
size_t size, std::uint64_t offset_basis);
45 static constexpr std::uint64_t
m_offset = 14695981039346656037u;
46 static constexpr std::uint64_t
m_prime = 1099511628211u;
60 ISvcLocator *pSvcLocator);
75 this,
"eventInfo",
"EventInfo",
"the EventInfo container"};
79 Gaudi::Property<int>
m_nReplicas {
this,
"nReplicas", 1000,
"number of bootstrapped weights (toys) to generate"};
83 Gaudi::Property<bool>
m_data {
this,
"isData",
false,
"whether we are running on data"};
96 this,
"decorationName",
"bootstrapWeights_%SYS%",
"decoration name for the vector of bootstrapped weights"};
SysListHandle m_systematicsList
the systematics list we run
BootstrapGeneratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
the standard constructor
StatusCode execute() override
std::vector< std::uint8_t > m_weights
the vector of bootstrap replica weights
Gaudi::Property< int > m_nReplicas
the number of bootstrap replicas
BootstrapGenerator m_bootstrap
the bootstrap generator instance
SysWriteDecorHandle< std::vector< std::uint8_t > > m_decoration
the output decoration
SysReadHandle< xAOD::EventInfo > m_eventInfoHandle
the EventInfo container
Gaudi::Property< bool > m_data
flag whether we are running on data
StatusCode initialize() override
a class to generate random numbers with a unique seed
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...
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
static constexpr std::uint64_t m_offset
constants for seed generation
TRandomRanluxpp m_rng
the random number generator (Ranlux++)
static constexpr std::uint64_t m_prime
std::uint8_t getBootstrap()
get the next bootstrap weight
std::uint64_t generateSeed(std::uint64_t eventNumber, std::uint32_t runNumber, std::uint32_t mcChannelNumber)
generate a unique seed based on event identifiers
BootstrapGenerator()
the standard constructor
a class managing the property to configure the list of systematics to process
a data handle for reading systematics varied input data
a data handle for reading systematics varied input data
the (new) base class for EventLoop algorithms
Select isolated Photons, Electrons and Muons.