cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
EventHarvester.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
#include <fstream>
20
21
#include "
CepGen/EventFilter/EventExporter.h
"
22
#include "
CepGen/Utils/Histogram.h
"
23
24
namespace
cepgen
{
25
class
Event;
26
namespace
utils {
27
class
Drawer;
28
class
EventBrowser;
29
}
// namespace utils
33
class
EventHarvester
:
public
EventExporter
{
34
public
:
35
explicit
EventHarvester
(
const
ParametersList
&);
36
virtual
~EventHarvester
();
37
38
static
ParametersDescription
description
();
39
40
inline
void
setCrossSection
(
const
Value
& cross_section)
override
{ cross_section_ = cross_section; }
41
bool
operator<<
(
const
Event
&)
override
;
42
43
private
:
44
void
initialise()
override
;
45
const
std::unique_ptr<utils::EventBrowser> browser_;
46
//--- variables definition
47
const
bool
show_hists_, save_hists_;
48
const
std::string filename_;
49
50
std::ofstream file_;
51
std::unique_ptr<utils::Drawer> drawer_;
52
53
Value
cross_section_{1., 0.};
54
unsigned
long
num_evts_{0ul};
55
std::string proc_name_;
56
58
struct
Hist1DInfo {
59
std::string var;
60
utils::Hist1D hist;
61
bool
log;
62
};
63
std::vector<Hist1DInfo> hists_;
65
struct
Hist2DInfo {
66
std::string var1, var2;
67
utils::Hist2D hist;
68
bool
log;
69
};
70
std::vector<Hist2DInfo> hists2d_;
71
};
72
}
// namespace cepgen
EventExporter.h
Histogram.h
cepgen::EventExporter
Output format handler for events export.
Definition
EventExporter.h:30
cepgen::EventHarvester
Generic text file output handler.
Definition
EventHarvester.h:33
cepgen::EventHarvester::operator<<
bool operator<<(const Event &) override
Writer operator.
Definition
EventHarvester.cpp:114
cepgen::EventHarvester::setCrossSection
void setCrossSection(const Value &cross_section) override
Specify the cross section value, in pb.
Definition
EventHarvester.h:40
cepgen::EventHarvester::~EventHarvester
virtual ~EventHarvester()
Definition
EventHarvester.cpp:68
cepgen::EventHarvester::description
static ParametersDescription description()
Definition
EventHarvester.cpp:124
cepgen::Event
Container for the information on the in- and outgoing particles' kinematics.
Definition
Event.h:28
cepgen::ParametersDescription
A description object for parameters collection.
Definition
ParametersDescription.h:26
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen::Value
A scalar value with its uncertainty.
Definition
Value.h:26
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
CepGen
EventFilter
EventHarvester.h
Generated on Mon Jul 29 2024 for CepGen by
1.9.7