8#include "CLHEP/Random/RandFlat.h"
17 declareProperty(
"RandomStreamName",
m_randomEngineName,
"Name of the random number stream");
27 return StatusCode::SUCCESS;
32 return StatusCode::SUCCESS;
37 if(vertexContainer->
size()>2)
41 const EventContext& ctx = Gaudi::Hive::currentContext();
43 if (wrapper->
evtSeeded (ctx) != ctx.evt()) {
46 CLHEP::HepRandomEngine* engine = wrapper->
getEngine (ctx);
49 if( CLHEP::RandFlat::shoot(engine)>0.9)
52 unsigned int ivtx = (
unsigned int)( CLHEP::RandFlat::shoot(engine) * vertexContainer->
size());
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
A wrapper class for event-slot-local random engines.
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
EventContext::ContextEvt_t evtSeeded() const
Return the event count at which the current slot was last seeded.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
size_type size() const noexcept
Returns the number of elements in the collection.
Ensure that the ATLAS eigen extensions are properly loaded.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".