|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "CLHEP/Random/RandFlat.h"
15 : base_class (
t,
n,
p ),m_randomEngineName(
"VertexRnd")
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());
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
#define ATH_MSG_VERBOSE(x)
::StatusCode StatusCode
StatusCode definition for legacy code.
Ensure that the ATLAS eigen extensions are properly loaded.
A wrapper class for event-slot-local random engines.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
EventContext::ContextEvt_t evtSeeded() const
Return the event count at which the current slot was last seeded.
size_type size() const noexcept
Returns the number of elements in the collection.