herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
Sampling
CellGrids
CellGridSampler.h
1
// -*- C++ -*-
2
//
3
// CellGridSampler.hpp is a part of Herwig - A multi-purpose Monte Carlo event generator
4
// Copyright (C) 2002-2019 The Herwig Collaboration
5
//
6
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef Herwig_CellGridSampler_H
10
#define Herwig_CellGridSampler_H
11
//
12
// This is the declaration of the CellGridSampler class.
13
//
14
15
#include "Herwig/Sampling/BinSampler.h"
16
17
#include "SimpleCellGrid.h"
18
19
20
namespace
Herwig
{
21
22
using namespace
ThePEG
;
23
33
class
CellGridSampler
:
34
public
Herwig::BinSampler
,
ExSample::SimpleCellGrid
{
35
36
public
:
37
43
CellGridSampler
();
44
48
virtual
~CellGridSampler
();
50
51
public
:
52
56
Ptr<CellGridSampler>::ptr
cloneMe
()
const
{
57
return
dynamic_ptr_cast<Ptr<CellGridSampler>::ptr>(
clone
());
58
}
59
60
public
:
61
67
virtual
double
generate
();
68
72
virtual
void
initialize
(
bool
progress);
73
77
virtual
void
finalize
(
bool
);
78
82
virtual
void
adapt
();
83
87
virtual
bool
existsGrid
()
const
;
88
92
virtual
void
saveGrid
()
const
;
93
98
const
vector<int>&
pre_adaption_splits
()
const
{
return
the_pre_adaption_splits
; }
99
100
public
:
101
108
void
persistentOutput
(
PersistentOStream
& os)
const
;
109
115
void
persistentInput
(
PersistentIStream
& is,
int
version);
117
124
static
void
Init
();
125
126
protected
:
127
134
virtual
IBPtr
clone
()
const
;
135
140
virtual
IBPtr
fullclone
()
const
;
142
143
144
// If needed, insert declarations of virtual function defined in the
145
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
146
147
private
:
148
153
CellGridSampler
&
operator=
(
const
CellGridSampler
&) =
delete
;
154
158
size_t
theExplorationPoints
;
159
163
size_t
theExplorationSteps
;
164
168
double
theGain
;
169
173
double
theEpsilon
;
174
178
double
theMinimumSelection
;
179
183
vector<int>
the_pre_adaption_splits
;
184
189
int
theLuminositySplits
;
190
194
int
theChannelSplits
;
195
199
bool
theAllChannelSplits
;
200
204
bool
theUnweightCells
;
205
206
};
207
208
}
209
210
#endif
/* Herwig_CellGridSampler_H */
ExSample::SimpleCellGrid
A simple cell grid providing basic adaption and sampling.
Definition:
SimpleCellGrid.h:23
Herwig::BinSampler
BinSampler samples XCombs bins. This default implementation performs flat MC integration.
Definition:
BinSampler.h:38
Herwig::CellGridSampler
CellGridSampler samples XCombs bins using CellGrids.
Definition:
CellGridSampler.h:34
Herwig::CellGridSampler::initialize
virtual void initialize(bool progress)
Initialize this bin sampler.
Herwig::CellGridSampler::clone
virtual IBPtr clone() const
Make a simple clone of this object.
Herwig::CellGridSampler::Init
static void Init()
The standard Init function used to initialize the interfaces.
Herwig::CellGridSampler::the_pre_adaption_splits
vector< int > the_pre_adaption_splits
The splittings for each dimension befor adaption.
Definition:
CellGridSampler.h:183
Herwig::CellGridSampler::adapt
virtual void adapt()
Adapt.
Herwig::CellGridSampler::theEpsilon
double theEpsilon
The adaption threshold.
Definition:
CellGridSampler.h:173
Herwig::CellGridSampler::theExplorationPoints
size_t theExplorationPoints
The number of points used to explore a cell.
Definition:
CellGridSampler.h:158
Herwig::CellGridSampler::theMinimumSelection
double theMinimumSelection
The minimum probability for cell selection.
Definition:
CellGridSampler.h:178
Herwig::CellGridSampler::finalize
virtual void finalize(bool)
Finalize this sampler.
Herwig::CellGridSampler::saveGrid
virtual void saveGrid() const
Save grid data.
Herwig::CellGridSampler::theChannelSplits
int theChannelSplits
The number of splits to put into channel degrees of freedom.
Definition:
CellGridSampler.h:194
Herwig::CellGridSampler::theExplorationSteps
size_t theExplorationSteps
The number of exploration steps.
Definition:
CellGridSampler.h:163
Herwig::CellGridSampler::theLuminositySplits
int theLuminositySplits
The number of splits to put into parton luminiosity degrees of freedom.
Definition:
CellGridSampler.h:189
Herwig::CellGridSampler::theGain
double theGain
The adaption threshold.
Definition:
CellGridSampler.h:168
Herwig::CellGridSampler::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Herwig::CellGridSampler::cloneMe
Ptr< CellGridSampler >::ptr cloneMe() const
Clone this object.
Definition:
CellGridSampler.h:56
Herwig::CellGridSampler::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Herwig::CellGridSampler::~CellGridSampler
virtual ~CellGridSampler()
The destructor.
Herwig::CellGridSampler::pre_adaption_splits
const vector< int > & pre_adaption_splits() const
The splittings for each dimension befor adaption.
Definition:
CellGridSampler.h:98
Herwig::CellGridSampler::theUnweightCells
bool theUnweightCells
Perform unweighting in cells.
Definition:
CellGridSampler.h:204
Herwig::CellGridSampler::operator=
CellGridSampler & operator=(const CellGridSampler &)=delete
The assignment operator is private and must never be called.
Herwig::CellGridSampler::theAllChannelSplits
bool theAllChannelSplits
Perform splits for all channels.
Definition:
CellGridSampler.h:199
Herwig::CellGridSampler::generate
virtual double generate()
Generate the next point; store the point in lastPoint() and its weight using select(); if noMaxInfo i...
Herwig::CellGridSampler::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Herwig::CellGridSampler::CellGridSampler
CellGridSampler()
The default constructor.
Herwig::CellGridSampler::existsGrid
virtual bool existsGrid() const
Return true, if grid data exists for this sampler.
ThePEG::PersistentIStream
ThePEG::PersistentOStream
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
ThePEG
ThePEG::IBPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
Generated on Thu Jun 20 2024 17:50:53 for Herwig by
1.9.6