EpIC 1.1.0
Monte Carlo generator for exclusive processes
Loading...
Searching...
No Matches
EventGeneratorModule.h
1/*
2 * EventGeneratorModule.h
3 *
4 * Created on: Feb 7, 2021
5 * Author: Pawel Sznajder (NCBJ)
6 */
7
8#ifndef MODULES_EVENTGENERATOR_EVENTGENERATORMODULE_H_
9#define MODULES_EVENTGENERATOR_EVENTGENERATORMODULE_H_
10
11#include <ElementaryUtils/parameters/Parameters.h>
12#include <string>
13#include <utility>
14#include <vector>
15
16#include "../../beans/containers/KinematicRange.h"
17#include "../EpicModuleObject.h"
18
19namespace EPIC {
20class EventGeneratorInterface;
21} /* namespace EPIC */
22
23namespace EPIC {
24
35
36public:
37
38 static const std::string EVENT_GENERATOR_MODULE_CLASS_NAME;
39 static const std::string EVENT_GENERATOR_MODULE_INIT_STATE_PATH;
40
44 EventGeneratorModule(const std::string &className);
45
50
55
56 virtual void configure(const ElemUtils::Parameters &parameters);
57
58 virtual bool runTest() const;
59
63 virtual void initialise(const std::vector<KinematicRange> &kinematicRanges,
64 const EventGeneratorInterface &service) = 0;
65
69 virtual std::pair<std::vector<double>, double> generateEvent() = 0;
70
74 virtual std::pair<double, double> getIntegral() = 0;
75
76 //********************************************************
77 //*** SETTERS AND GETTERS ********************************
78 //********************************************************
79
83 const std::string& getInitStatePath() const;
84
88 void setInitStatePath(const std::string& initStatePath);
89
90protected:
91
92 virtual void initModule();
93 virtual void isModuleWellConfigured();
94
95 std::string m_initStatePath;
96};
97
98} /* namespace EPIC */
99
100#endif /* MODULES_EVENTGENERATOR_EVENTGENERATORMODULE_H_ */
Testable version of PARTONS::ModuleObject.
Definition: EpicModuleObject.h:26
Interface to EventGeneratorModule.
Definition: EventGeneratorInterface.h:22
Definition of module for generation of events from a given distribution.
Definition: EventGeneratorModule.h:34
virtual std::pair< double, double > getIntegral()=0
void setInitStatePath(const std::string &initStatePath)
static const std::string EVENT_GENERATOR_MODULE_CLASS_NAME
Class name used in parsing XML.
Definition: EventGeneratorModule.h:38
EventGeneratorModule(const EventGeneratorModule &other)
const std::string & getInitStatePath() const
std::string m_initStatePath
Path to file to either load (if exist) or save (if not) initial state of generator.
Definition: EventGeneratorModule.h:95
static const std::string EVENT_GENERATOR_MODULE_INIT_STATE_PATH
String used to set path to init state file type via XML scenario.
Definition: EventGeneratorModule.h:39
virtual bool runTest() const
virtual void initialise(const std::vector< KinematicRange > &kinematicRanges, const EventGeneratorInterface &service)=0
virtual std::pair< std::vector< double >, double > generateEvent()=0
EventGeneratorModule(const std::string &className)