herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
MatrixElement
Matchbox
Phasespace
FlatInvertiblePhasespace.h
1
// -*- C++ -*-
2
//
3
// FlatInvertiblePhasespace.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_FlatInvertiblePhasespace_H
10
#define Herwig_FlatInvertiblePhasespace_H
11
//
12
// This is the declaration of the FlatInvertiblePhasespace class.
13
//
14
15
#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
16
17
namespace
Herwig
{
18
19
using namespace
ThePEG
;
20
28
class
FlatInvertiblePhasespace
:
public
MatchboxPhasespace
{
29
30
public
:
31
35
virtual
double
generateTwoToNKinematics
(
const
double
*,
36
vector<Lorentz5Momentum>& momenta);
37
42
virtual
int
nDimPhasespace
(
int
nFinal)
const
{
43
if
( nFinal == 1 )
44
return
1;
45
return
3*nFinal - 4;
46
}
47
48
public
:
49
53
virtual
bool
isInvertible
()
const
{
return
true
; }
54
59
virtual
double
invertTwoToNKinematics
(
const
vector<Lorentz5Momentum>& momenta,
60
double
* r)
const
{
61
return
invertKinematics
(momenta,(momenta[0]+momenta[1]).m(),r);
62
}
63
64
private
:
65
69
double
bisect
(
double
v,
double
n,
70
double
target = -16.,
double
maxLevel = 80.)
const
;
71
75
double
rho
(Energy M, Energy N, Energy m)
const
{
76
return
sqrt
((
sqr
(M)-
sqr
(N+m))*(
sqr
(M)-
sqr
(N-m)))/(8.*
sqr
(M));
77
}
78
82
double
generateIntermediates
(vector<Energy>& K,
83
const
double
* r)
const
;
84
88
double
invertIntermediates
(
const
vector<Energy>& K,
89
double
* r)
const
;
90
94
double
generateIntermediates
(vector<Energy>& M,
95
const
vector<Energy>& m,
96
const
double
* r)
const
;
97
101
double
invertIntermediates
(
const
vector<Energy>& M,
102
const
vector<Energy>& m,
103
double
* r)
const
;
104
108
double
generateKinematics
(vector<Lorentz5Momentum>& P,
109
Energy Ecm,
110
const
double
* r)
const
;
111
115
double
invertKinematics
(
const
vector<Lorentz5Momentum>& P,
116
Energy Ecm,
117
double
* r)
const
;
118
127
long
double
flatWeights
(
int
n)
const
;
128
129
public
:
130
137
void
persistentOutput
(
PersistentOStream
& os)
const
;
138
144
void
persistentInput
(
PersistentIStream
& is,
int
version);
146
153
static
void
Init
();
154
155
protected
:
156
163
virtual
IBPtr
clone
()
const
;
164
169
virtual
IBPtr
fullclone
()
const
;
171
172
173
// If needed, insert declarations of virtual function defined in the
174
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
175
176
177
private
:
178
183
FlatInvertiblePhasespace
&
operator=
(
const
FlatInvertiblePhasespace
&) =
delete
;
184
185
};
186
187
}
188
189
#endif
/* Herwig_FlatInvertiblePhasespace_H */
Herwig::FlatInvertiblePhasespace
FlatInvertiblePhasespace implements flat, invertible phase space generation.
Definition:
FlatInvertiblePhasespace.h:28
Herwig::FlatInvertiblePhasespace::clone
virtual IBPtr clone() const
Make a simple clone of this object.
Herwig::FlatInvertiblePhasespace::bisect
double bisect(double v, double n, double target=-16., double maxLevel=80.) const
Solve v = (n+2) * u^(n+1) - (n+1) * u^(n+2) for u.
Herwig::FlatInvertiblePhasespace::flatWeights
long double flatWeights(int n) const
Return the appropriate phase space weight, Eq.
Herwig::FlatInvertiblePhasespace::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Herwig::FlatInvertiblePhasespace::invertTwoToNKinematics
virtual double invertTwoToNKinematics(const vector< Lorentz5Momentum > &momenta, double *r) const
Invert the given phase space point to the random numbers which would have generated it.
Definition:
FlatInvertiblePhasespace.h:59
Herwig::FlatInvertiblePhasespace::invertIntermediates
double invertIntermediates(const vector< Energy > &K, double *r) const
Invert intermediate masses for a massless final state.
Herwig::FlatInvertiblePhasespace::invertIntermediates
double invertIntermediates(const vector< Energy > &M, const vector< Energy > &m, double *r) const
Invert intermediate masses for a massive final state.
Herwig::FlatInvertiblePhasespace::operator=
FlatInvertiblePhasespace & operator=(const FlatInvertiblePhasespace &)=delete
The assignment operator is private and must never be called.
Herwig::FlatInvertiblePhasespace::generateIntermediates
double generateIntermediates(vector< Energy > &M, const vector< Energy > &m, const double *r) const
Generate intermediate masses for a massive final state.
Herwig::FlatInvertiblePhasespace::generateIntermediates
double generateIntermediates(vector< Energy > &K, const double *r) const
Generate intermediate masses for a massless final state.
Herwig::FlatInvertiblePhasespace::Init
static void Init()
The standard Init function used to initialize the interfaces.
Herwig::FlatInvertiblePhasespace::invertKinematics
double invertKinematics(const vector< Lorentz5Momentum > &P, Energy Ecm, double *r) const
Invert momenta in the CMS.
Herwig::FlatInvertiblePhasespace::rho
double rho(Energy M, Energy N, Energy m) const
Return rho.
Definition:
FlatInvertiblePhasespace.h:75
Herwig::FlatInvertiblePhasespace::nDimPhasespace
virtual int nDimPhasespace(int nFinal) const
Return the number of random numbers required to produce a given multiplicity final state.
Definition:
FlatInvertiblePhasespace.h:42
Herwig::FlatInvertiblePhasespace::generateKinematics
double generateKinematics(vector< Lorentz5Momentum > &P, Energy Ecm, const double *r) const
Generate momenta in the CMS.
Herwig::FlatInvertiblePhasespace::isInvertible
virtual bool isInvertible() const
Return true, if this phase space generator is invertible.
Definition:
FlatInvertiblePhasespace.h:53
Herwig::FlatInvertiblePhasespace::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Herwig::FlatInvertiblePhasespace::generateTwoToNKinematics
virtual double generateTwoToNKinematics(const double *, vector< Lorentz5Momentum > &momenta)
Generate a phase space point and return its weight.
Herwig::FlatInvertiblePhasespace::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Herwig::MatchboxPhasespace
MatchboxPhasespace defines an abstract interface to a phase space generator.
Definition:
MatchboxPhasespace.h:82
ThePEG::PersistentIStream
ThePEG::PersistentOStream
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
ThePEG
ThePEG::sqrt
double sqrt(int x)
ThePEG::IBPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::sqr
constexpr auto sqr(const T &x) -> decltype(x *x)
Generated on Thu Jun 20 2024 17:50:53 for Herwig by
1.9.6