herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
MatrixElement
Matchbox
Phasespace
MatchboxRambo.h
1
// -*- C++ -*-
2
//
3
// MatchboxRambo.h 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_MatchboxRambo_H
10
#define Herwig_MatchboxRambo_H
11
//
12
// This is the declaration of the MatchboxRambo class.
13
//
14
15
#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
16
17
namespace
Herwig
{
18
19
using namespace
ThePEG
;
20
28
class
MatchboxRambo
:
public
MatchboxPhasespace
{
29
30
public
:
31
35
MatchboxRambo
();
36
37
public
:
38
42
virtual
void
setXComb
(tStdXCombPtr);
43
47
virtual
double
generateTwoToNKinematics
(
const
double
*,
48
vector<Lorentz5Momentum>& momenta);
49
54
virtual
int
nDimPhasespace
(
int
nFinal)
const
{
55
if
( nFinal == 1 )
56
return
1;
57
return
4*nFinal;
58
}
59
60
protected
:
61
66
struct
ReshuffleEquation
{
67
68
typedef
double
ArgType;
69
typedef
Energy ValType;
70
71
static
double
aUnit() {
return
1.; }
72
static
Energy vUnit() {
return
1.*GeV; }
73
74
Energy operator() (
double
xi)
const
;
75
76
Energy w;
77
cPDVector::const_iterator dataBegin;
78
cPDVector::const_iterator dataEnd;
79
vector<Lorentz5Momentum>::const_iterator momentaBegin;
80
vector<Lorentz5Momentum>::const_iterator momentaEnd;
81
82
ReshuffleEquation
(Energy q,
83
cPDVector::const_iterator dBegin,
84
cPDVector::const_iterator dEnd,
85
vector<Lorentz5Momentum>::const_iterator mBegin,
86
vector<Lorentz5Momentum>::const_iterator mEnd)
87
: w(q),
88
dataBegin(dBegin), dataEnd(dEnd),
89
momentaBegin(mBegin),
90
momentaEnd(mEnd) {}
91
92
};
93
94
public
:
95
102
void
persistentOutput
(
PersistentOStream
& os)
const
;
103
109
void
persistentInput
(
PersistentIStream
& is,
int
version);
111
118
static
void
Init
();
119
120
protected
:
121
128
virtual
IBPtr
clone
()
const
;
129
134
virtual
IBPtr
fullclone
()
const
;
136
137
138
// If needed, insert declarations of virtual function defined in the
139
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
140
141
142
private
:
143
148
MatchboxRambo
&
operator=
(
const
MatchboxRambo
&) =
delete
;
149
153
bool
needToReshuffle
;
154
159
bool
theMakeReferenceSample
;
160
164
map<cPDVector,ofstream*>
referenceSamples
;
165
169
ofstream*
referenceSample
;
170
174
void
dumpReference
(
const
vector<Lorentz5Momentum>&,
double
)
const
;
175
176
};
177
178
}
179
180
#endif
/* Herwig_MatchboxRambo_H */
Herwig::MatchboxPhasespace
MatchboxPhasespace defines an abstract interface to a phase space generator.
Definition:
MatchboxPhasespace.h:82
Herwig::MatchboxRambo
MatchboxRambo implements RAMBO phase space generation.
Definition:
MatchboxRambo.h:28
Herwig::MatchboxRambo::Init
static void Init()
The standard Init function used to initialize the interfaces.
Herwig::MatchboxRambo::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Herwig::MatchboxRambo::setXComb
virtual void setXComb(tStdXCombPtr)
Prepare a phase space generator for the given xcomb object.
Herwig::MatchboxRambo::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Herwig::MatchboxRambo::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Herwig::MatchboxRambo::dumpReference
void dumpReference(const vector< Lorentz5Momentum > &, double) const
Write the generated point to the reference sample.
Herwig::MatchboxRambo::referenceSample
ofstream * referenceSample
The stream to fill for the reference sample.
Definition:
MatchboxRambo.h:169
Herwig::MatchboxRambo::operator=
MatchboxRambo & operator=(const MatchboxRambo &)=delete
The assignment operator is private and must never be called.
Herwig::MatchboxRambo::MatchboxRambo
MatchboxRambo()
The default constructor.
Herwig::MatchboxRambo::clone
virtual IBPtr clone() const
Make a simple clone of this object.
Herwig::MatchboxRambo::theMakeReferenceSample
bool theMakeReferenceSample
True, if a reference sample of phasespace points should be generated.
Definition:
MatchboxRambo.h:159
Herwig::MatchboxRambo::generateTwoToNKinematics
virtual double generateTwoToNKinematics(const double *, vector< Lorentz5Momentum > &momenta)
Generate a phase space point and return its weight.
Herwig::MatchboxRambo::referenceSamples
map< cPDVector, ofstream * > referenceSamples
Map processes to streams for reference samples.
Definition:
MatchboxRambo.h:164
Herwig::MatchboxRambo::needToReshuffle
bool needToReshuffle
Whether or not we need to reshuffle.
Definition:
MatchboxRambo.h:153
Herwig::MatchboxRambo::nDimPhasespace
virtual int nDimPhasespace(int nFinal) const
Return the number of random numbers required to produce a given multiplicity final state.
Definition:
MatchboxRambo.h:54
ThePEG::PersistentIStream
ThePEG::PersistentOStream
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
ThePEG
ThePEG::IBPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
Herwig::MatchboxRambo::ReshuffleEquation
The function object defining the equation to be solved.
Definition:
MatchboxRambo.h:66
Generated on Thu Jun 20 2024 17:50:53 for Herwig by
1.9.6