cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
EventModifier.h
Go to the documentation of this file.
1/*
2 * CepGen: a central exclusive processes event generator
3 * Copyright (C) 2019-2024 Laurent Forthomme
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef CepGen_EventFilter_EventModifier_h
20#define CepGen_EventFilter_EventModifier_h
21
23
24namespace cepgen {
25 class Value;
29 class EventModifier : public EventHandler {
30 public:
31 explicit EventModifier(const ParametersList&);
32
34
37 void setSeed(long long seed) { seed_ = seed; }
38
39 inline virtual void readString(const std::string&) {}
40 virtual void readStrings(const std::vector<std::string>&);
41
47 virtual bool run(Event& ev, double& weight, bool fast = false) = 0;
48 inline virtual void setCrossSection(const Value&) {}
49
50 protected:
51 long long seed_{0ll};
52 unsigned short max_trials_{1};
53 };
54} // namespace cepgen
55
56#endif
Class template for modules interacting with events.
Class template to interface (external/internal) events modification algorithms.
virtual void readStrings(const std::vector< std::string > &)
Parse a list of configuration strings.
virtual void setCrossSection(const Value &)
Specify the cross section value, in pb.
virtual void readString(const std::string &)
Parse a configuration string.
void setSeed(long long seed)
Specify a random numbers generator seed for the external module.
virtual bool run(Event &ev, double &weight, bool fast=false)=0
Modify an event.
unsigned short max_trials_
Maximal number of trials for the algorithm.
static ParametersDescription description()
long long seed_
Random numbers generator seed fed to the algorithm.
Container for the information on the in- and outgoing particles' kinematics.
Definition Event.h:28
A description object for parameters collection.
A scalar value with its uncertainty.
Definition Value.h:26
Common namespace for this Monte Carlo generator.