herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.2.1
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 */
ThePEG::PersistentIStream
ExSample::SimpleCellGrid
A simple cell grid providing basic adaption and sampling.
Definition:
SimpleCellGrid.h:22
Herwig::CellGridSampler::theGain
double theGain
The adaption threshold.
Definition:
CellGridSampler.h:168
ThePEG::PersistentOStream
ThePEG::IBPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
Herwig::CellGridSampler::theChannelSplits
int theChannelSplits
The number of splits to put into channel degrees of freedom.
Definition:
CellGridSampler.h:194
ThePEG
Herwig::CellGridSampler::theExplorationPoints
size_t theExplorationPoints
The number of points used to explore a cell.
Definition:
CellGridSampler.h:158
Herwig::CellGridSampler::the_pre_adaption_splits
vector< int > the_pre_adaption_splits
The splittings for each dimension befor adaption.
Definition:
CellGridSampler.h:183
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:33
Herwig::CellGridSampler::theUnweightCells
bool theUnweightCells
Perform unweighting in cells.
Definition:
CellGridSampler.h:204
Herwig::CellGridSampler::theExplorationSteps
size_t theExplorationSteps
The number of exploration steps.
Definition:
CellGridSampler.h:163
Herwig::CellGridSampler::theEpsilon
double theEpsilon
The adaption threshold.
Definition:
CellGridSampler.h:173
Herwig::CellGridSampler::theMinimumSelection
double theMinimumSelection
The minimum probability for cell selection.
Definition:
CellGridSampler.h:178
Herwig::RandomHelpers::generate
pair< double, double > generate(const Generator< Density > &gen, double r)
Generate a random variable and return its weight.
Definition:
RandomHelpers.h:182
Herwig::CellGridSampler::theAllChannelSplits
bool theAllChannelSplits
Perform splits for all channels.
Definition:
CellGridSampler.h:199
Herwig::CellGridSampler::cloneMe
Ptr< CellGridSampler >::ptr cloneMe() const
Clone this object.
Definition:
CellGridSampler.h:56
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
Herwig::CellGridSampler::theLuminositySplits
int theLuminositySplits
The number of splits to put into parton luminiosity degrees of freedom.
Definition:
CellGridSampler.h:189
Herwig::CellGridSampler::pre_adaption_splits
const vector< int > & pre_adaption_splits() const
The splittings for each dimension befor adaption.
Definition:
CellGridSampler.h:98
Generated on Sat Apr 11 2020 14:50:28 for Herwig by
1.8.13