11#ifndef GENERATORMODULES_HERWIG7_H
12#define GENERATORMODULES_HERWIG7_H
16#include "ThePEG/Repository/Repository.h"
17#include "ThePEG/Repository/EventGenerator.h"
18#include "ThePEG/EventRecord/Event.h"
19#include "Herwig/API/HerwigUI.h"
42 virtual bool resume()
const {
return false; }
45 virtual bool tics()
const {
return false; }
59 virtual std::string
tag()
const {
return(
m_tag); }
73 virtual long N()
const {
return 0; }
84 std::cerr <<
"=================================\n";
85 std::cerr <<
"HERE I CAN PUT SOME ERROR MESSAGE\n";
86 std::cerr <<
"=================================\n";
91 virtual void quit()
const {
92 ThePEG::Repository::cleanup();
97 virtual std::ostream&
outStream()
const {
return(std::cout); }
100 virtual std::ostream&
errStream()
const {
return(std::cerr); }
103 virtual std::istream&
inStream()
const {
return(std::cin); }
135 Herwig7(
const std::string& name, ISvcLocator* pSvcLocator);
209 ,
"ReadHandleKey for xAOD::EventInfo"};
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Interface to the Herwig7 API.
Herwig::RunMode::Mode runMode() const
Requested Herwig run mode.
Herwig::RunMode::Mode m_runMode
virtual bool resume() const
Try to resume execution from an earlier interrupted run.
std::vector< std::string > m_prependReadDirectories
virtual int seed() const
The number of events to generate.
virtual unsigned int maxJobs() const
The number of subprocesses to integrate per integratoin job.
virtual std::string repository() const
Repository name to operate on.
std::vector< std::string > m_appendReadDirectories
std::string m_integrationList
virtual void quitWithHelp() const
The maximum number of integration jobs.
virtual const std::vector< std::string > & appendReadDirectories() const
Directories from which Herwig reads input files, will be appended to the search path.
virtual std::string setupfile() const
Name of the setup file to be read, to modify the repository.
virtual void quit() const
Bail out and be quiet.
virtual const std::vector< std::string > & prependReadDirectories() const
Directories from which Herwig reads input files, will be prepended to the search path.
virtual std::ostream & outStream() const
Return the standard out stream to be used.
void inputfile(const std::string &inputfile)
virtual std::string integrationList() const
An identifier for the integration job to be handled.
virtual std::string tag() const
A user-defined tag to append to the run name.
virtual std::string inputfile() const
Name of the file to be read.
virtual std::ostream & errStream() const
Return the standard err stream to be used.
virtual std::istream & inStream() const
Return the standard in stream to be used.
virtual bool tics() const
Require verbose progress markers.
void seed(int seed)
The seed to use.
void prependReadDirectory(const std::string &prependReadDirectory)
virtual unsigned int jobSize() const
The number of jobs to fork.
std::string m_pdfname_mpi
PS PDF name, stored for AMI capture at finalize.
StatusCode callGenerator()
Run the generator for one event.
SG::ReadHandleKey< xAOD::EventInfo > m_evtInfoKey
StatusCode genFinalize()
Close down the generator.
ThePEG::EventPtr m_event
ThePEG event object.
int m_seed_from_generatetf
Random number seed from Generate_tf.py.
StatusCode writeRunFileFromText(const std::string &share_path)
Write the CA input text into a real Herwig runfile.
std::string m_pdfname_me
ME PDF name, stored for AMI capture at finalize.
bool m_cleanup_herwig_scratch
Possibly remove Herwig-scratch folder after finishing the event generation.
Herwig7(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
double m_xsscale
Scale integrated cross section by a factor for MetaData output.
std::string m_runSettings
In-memory run settings provided by CA fragments.
StatusCode fillEvt(HepMC::GenEvent *evt)
Convert the generated event into the HepMC format.
int m_dsid
Gen_tf.py run args needed in interface.
ThePEG::EGPtr m_gen
ThePEG generator object.
std::string m_runfile
Name of run file.
StatusCode genInitialize()
Initialize the generator.
Herwig7API m_api
Herwig7 API object.
std::string m_setupfile
Name of setup file.
std::string m_runname
Run name, used in the Herwig/ThePEG config system.
bool m_use_seed_from_generatetf
Ignore random number seed provided by athena and use the one from Generate_tf.py instead.
Property holding a SG store/key/clid from which a ReadHandle is made.
HepMC3::GenEvent GenEvent