6 #include "GaudiKernel/IToolSvc.h"
7 #include "CLHEP/Random/RandomEngine.h"
8 #include "CLHEP/Random/Ranlux64Engine.h"
11 const std::function< CLHEP::HepRandomEngine*(void) >
RanluxFactory = []()->CLHEP::HepRandomEngine*{
12 return new CLHEP::Ranlux64Engine();
17 const std::string&
name,
25 std::string
chainName( confElement, 0, confElement.find(
':') );
26 std::string psValue( confElement, confElement.find(
':')+1 );
30 return StatusCode::SUCCESS;
37 bool forExpressStream )
const {
39 ATH_MSG_DEBUG(
"Express stream prescaling ignored in Emulation tool" << forExpressStream);
41 if ( initiallyActive.empty() ) {
42 return StatusCode::SUCCESS;
46 remainActive.reserve( initiallyActive.size() );
49 size_t seed = ctx.eventID().time_stamp() ^ ctx.eventID().time_stamp_ns_offset();
51 engine->setSeed( seed, 0 );
52 for (
auto ch: initiallyActive ) {
55 engine->flat() < chainPS->second :
57 ATH_MSG_DEBUG(
"Prescaling decision for chain " <<
ch <<
" " << decision );
59 remainActive.push_back(
ch );
62 return StatusCode::SUCCESS;