herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
MatrixElement
Matchbox
Phasespace
PhasespaceHelpers.h
1
// -*- C++ -*-
2
//
3
// PhasespaceHelpers.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_PhasespaceHelpers_H
10
#define HERWIG_PhasespaceHelpers_H
11
12
#include "
ThePEG/Config/ThePEG.h
"
13
#include "ThePEG/PDT/ParticleData.h"
14
15
#include "ThePEG/Persistency/PersistentOStream.h"
16
#include "ThePEG/Persistency/PersistentIStream.h"
17
18
#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
19
20
namespace
Herwig
{
21
22
using namespace
ThePEG
;
23
24
namespace
PhasespaceHelpers {
25
31
struct
PhasespaceInfo
{
32
36
Energy2
sHat
;
37
41
Energy
sqrtSHat
;
42
46
double
weight
;
47
51
StreamingRnd
rnd
;
52
57
double
x0
;
58
63
double
xc
;
64
69
Energy
M0
;
70
75
Energy
Mc
;
76
80
Energy
generateMass
(
tcPDPtr
,
const
pair<Energy,Energy>&);
81
86
Lorentz5Momentum
generateKt
(
const
Lorentz5Momentum& p1,
87
const
Lorentz5Momentum& p2,
88
Energy pt);
89
90
};
91
97
struct
PhasespaceTree
{
98
102
PhasespaceTree
()
103
:
massRange
(
ZERO
,
ZERO
),
externalId
(-1),
104
spacelike
(false) {}
105
109
tcPDPtr
data
;
110
114
pair<Energy,Energy>
massRange
;
115
119
Lorentz5Momentum
momentum
;
120
124
Lorentz5Momentum
backwardMomentum
;
125
129
int
externalId
;
130
134
vector<PhasespaceTree>
children
;
135
139
set<int>
leafs
;
140
144
bool
spacelike
;
145
149
bool
doMirror
;
150
154
void
setup
(
const
Tree2toNDiagram
&,
int
pos = 0);
155
159
void
setupMirrored
(
const
Tree2toNDiagram
& diag,
int
pos);
160
165
void
init
(
const
vector<Lorentz5Momentum>&);
166
170
void
generateKinematics
(
PhasespaceInfo
&,
171
vector<Lorentz5Momentum>&);
172
176
void
put
(
PersistentOStream
&)
const
;
177
181
void
get
(
PersistentIStream
&);
182
186
void
print
(
int
in = 0);
187
188
};
189
190
}
191
192
}
193
194
#endif
// HERWIG_PhasespaceHelpers_H
ThePEG.h
ThePEG::PersistentIStream
ThePEG::PersistentOStream
ThePEG::Tree2toNDiagram
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
ThePEG
ThePEG::ZERO
constexpr ZeroUnit ZERO
ThePEG::tcPDPtr
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
Herwig::PhasespaceHelpers::PhasespaceInfo
General information for phase space generation.
Definition:
PhasespaceHelpers.h:31
Herwig::PhasespaceHelpers::PhasespaceInfo::generateMass
Energy generateMass(tcPDPtr, const pair< Energy, Energy > &)
Generate a mass for the given particle type and mass range.
Herwig::PhasespaceHelpers::PhasespaceInfo::sqrtSHat
Energy sqrtSHat
The center of mass energy.
Definition:
PhasespaceHelpers.h:41
Herwig::PhasespaceHelpers::PhasespaceInfo::generateKt
Lorentz5Momentum generateKt(const Lorentz5Momentum &p1, const Lorentz5Momentum &p2, Energy pt)
Calculate a transverse momentum for the given momenta, invariant pt and azimuth.
Herwig::PhasespaceHelpers::PhasespaceInfo::sHat
Energy2 sHat
The center of mass energy squared.
Definition:
PhasespaceHelpers.h:36
Herwig::PhasespaceHelpers::PhasespaceInfo::x0
double x0
Parameter steering from which on propagator virtualities are sampled flat.
Definition:
PhasespaceHelpers.h:57
Herwig::PhasespaceHelpers::PhasespaceInfo::weight
double weight
The phase space weight.
Definition:
PhasespaceHelpers.h:46
Herwig::PhasespaceHelpers::PhasespaceInfo::xc
double xc
Parameter steering at which virtuality singularities of propagators are actually cut off.
Definition:
PhasespaceHelpers.h:63
Herwig::PhasespaceHelpers::PhasespaceInfo::M0
Energy M0
Parameter steering from which on propagator virtualities are sampled flat.
Definition:
PhasespaceHelpers.h:69
Herwig::PhasespaceHelpers::PhasespaceInfo::rnd
StreamingRnd rnd
The random number generator.
Definition:
PhasespaceHelpers.h:51
Herwig::PhasespaceHelpers::PhasespaceInfo::Mc
Energy Mc
Parameter steering at which virtuality singularities of propagators are actually cut off.
Definition:
PhasespaceHelpers.h:75
Herwig::PhasespaceHelpers::PhasespaceTree
A phase space tree.
Definition:
PhasespaceHelpers.h:97
Herwig::PhasespaceHelpers::PhasespaceTree::setup
void setup(const Tree2toNDiagram &, int pos=0)
Setup from diagram at given position.
Herwig::PhasespaceHelpers::PhasespaceTree::print
void print(int in=0)
Print tree, only for debugging purposes.
Herwig::PhasespaceHelpers::PhasespaceTree::doMirror
bool doMirror
Wether or not this is a mirrored channel.
Definition:
PhasespaceHelpers.h:149
Herwig::PhasespaceHelpers::PhasespaceTree::setupMirrored
void setupMirrored(const Tree2toNDiagram &diag, int pos)
Setup mirror from diagram at given position.
Herwig::PhasespaceHelpers::PhasespaceTree::PhasespaceTree
PhasespaceTree()
Default constructor.
Definition:
PhasespaceHelpers.h:102
Herwig::PhasespaceHelpers::PhasespaceTree::init
void init(const vector< Lorentz5Momentum > &)
Initialize using masses as given by mass() members of the final state momenta.
Herwig::PhasespaceHelpers::PhasespaceTree::spacelike
bool spacelike
Wether or not this is a spacelike line.
Definition:
PhasespaceHelpers.h:144
Herwig::PhasespaceHelpers::PhasespaceTree::externalId
int externalId
The external leg id of this line, if external.
Definition:
PhasespaceHelpers.h:129
Herwig::PhasespaceHelpers::PhasespaceTree::massRange
pair< Energy, Energy > massRange
The allowed mass range for this line.
Definition:
PhasespaceHelpers.h:114
Herwig::PhasespaceHelpers::PhasespaceTree::leafs
set< int > leafs
External lines originating from this line.
Definition:
PhasespaceHelpers.h:139
Herwig::PhasespaceHelpers::PhasespaceTree::data
tcPDPtr data
The particle running along this line.
Definition:
PhasespaceHelpers.h:109
Herwig::PhasespaceHelpers::PhasespaceTree::generateKinematics
void generateKinematics(PhasespaceInfo &, vector< Lorentz5Momentum > &)
Generate kinematics for the children.
Herwig::PhasespaceHelpers::PhasespaceTree::put
void put(PersistentOStream &) const
Write phase space tree to ostream.
Herwig::PhasespaceHelpers::PhasespaceTree::get
void get(PersistentIStream &)
Read phase space tree from istream.
Herwig::PhasespaceHelpers::PhasespaceTree::backwardMomentum
Lorentz5Momentum backwardMomentum
A backward momentum, if needed.
Definition:
PhasespaceHelpers.h:124
Herwig::PhasespaceHelpers::PhasespaceTree::momentum
Lorentz5Momentum momentum
The momentum running along this line.
Definition:
PhasespaceHelpers.h:119
Herwig::PhasespaceHelpers::PhasespaceTree::children
vector< PhasespaceTree > children
The children lines; if empty this is an external line.
Definition:
PhasespaceHelpers.h:134
Herwig::StreamingRnd
Wrap around a vector of random numbers to behave as a stream of those.
Definition:
MatchboxPhasespace.h:34
Generated on Thu Jun 20 2024 17:50:53 for Herwig by
1.9.6