5#ifndef GENERATORMODULES_GENMODULE_H
6#define GENERATORMODULES_GENMODULE_H
10#include "CLHEP/Random/RandomEngine.h"
11#include "CLHEP/Random/RandPoisson.h"
45 GenModule(
const std::string& name, ISvcLocator* pSvcLocator);
68 virtual StatusCode
fillEvt(HepMC::GenEvent* evt) = 0;
70 virtual StatusCode
genFinalize() {
return StatusCode::SUCCESS; }
78 CLHEP::HepRandomEngine*
getRandomEngine(
const std::string& streamName,
const EventContext& ctx)
const;
79 CLHEP::HepRandomEngine*
getRandomEngine(
const std::string& streamName,
unsigned long int randomSeedOffset,
const EventContext& ctx)
const;
80 CLHEP::HepRandomEngine*
getRandomEngineDuringInitialize(
const std::string& streamName,
unsigned long int randomSeedOffset,
unsigned int conditionsRun=1,
unsigned int lbn=1)
const;
84 IntegerProperty
m_randomSeed{
this,
"RandomSeed", 1234567,
"Random seed for the built-in random engine"};
87 BooleanProperty
m_isAfterburner{
this,
"IsAfterburner",
false,
"Set true if generator modifies existing events rather than creating new ones"};
91 std::shared_ptr<HepMC3::GenRunInfo> m_runinfo{};
GenBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle on the incident service.
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
virtual StatusCode fillEvt(HepMC::GenEvent *evt)=0
For filling the HepMC event object.
ServiceHandle< IAthRNGSvc > m_rndmSvc
Data members.
virtual ~GenModule()
Virtual destructor.
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, const EventContext &ctx) const
CLHEP::HepRandomEngine * getRandomEngineDuringInitialize(const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const
virtual StatusCode genFinalize()
For finalising the generator, if required.
virtual StatusCode genuserInitialize()
For initialization of user code, if required. Called after genInitialize.
virtual StatusCode genInitialize()
For initializing the generator, if required.
BooleanProperty m_isAfterburner
Flag for normal vs. afterburner generators.
IntegerProperty m_randomSeed
Seed for random number engine.