herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
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
20namespace Herwig {
21
22using namespace ThePEG;
23
35
36public:
37
44
50
51public:
52
56 Ptr<CellGridSampler>::ptr cloneMe() const {
57 return dynamic_ptr_cast<Ptr<CellGridSampler>::ptr>(clone());
58 }
59
60public:
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
100public:
101
109
115 void persistentInput(PersistentIStream & is, int version);
117
124 static void Init();
125
126protected:
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
147private:
148
154
159
164
168 double theGain;
169
174
179
184
190
195
200
205
206};
207
208}
209
210#endif /* Herwig_CellGridSampler_H */
A simple cell grid providing basic adaption and sampling.
BinSampler samples XCombs bins. This default implementation performs flat MC integration.
Definition: BinSampler.h:38
CellGridSampler samples XCombs bins using CellGrids.
virtual void initialize(bool progress)
Initialize this bin sampler.
virtual IBPtr clone() const
Make a simple clone of this object.
static void Init()
The standard Init function used to initialize the interfaces.
vector< int > the_pre_adaption_splits
The splittings for each dimension befor adaption.
virtual void adapt()
Adapt.
double theEpsilon
The adaption threshold.
size_t theExplorationPoints
The number of points used to explore a cell.
double theMinimumSelection
The minimum probability for cell selection.
virtual void finalize(bool)
Finalize this sampler.
virtual void saveGrid() const
Save grid data.
int theChannelSplits
The number of splits to put into channel degrees of freedom.
size_t theExplorationSteps
The number of exploration steps.
int theLuminositySplits
The number of splits to put into parton luminiosity degrees of freedom.
double theGain
The adaption threshold.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Ptr< CellGridSampler >::ptr cloneMe() const
Clone this object.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual ~CellGridSampler()
The destructor.
const vector< int > & pre_adaption_splits() const
The splittings for each dimension befor adaption.
bool theUnweightCells
Perform unweighting in cells.
CellGridSampler & operator=(const CellGridSampler &)=delete
The assignment operator is private and must never be called.
bool theAllChannelSplits
Perform splits for all channels.
virtual double generate()
Generate the next point; store the point in lastPoint() and its weight using select(); if noMaxInfo i...
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
CellGridSampler()
The default constructor.
virtual bool existsGrid() const
Return true, if grid data exists for this sampler.
-*- C++ -*-
ThePEG::Ptr< InterfacedBase >::pointer IBPtr