herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
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
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
20namespace Herwig {
21
22using namespace ThePEG;
23
24 namespace PhasespaceHelpers {
25
32
36 Energy2 sHat;
37
41 Energy sqrtSHat;
42
46 double weight;
47
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
98
103 : massRange(ZERO,ZERO), externalId(-1),
104 spacelike(false) {}
105
110
114 pair<Energy,Energy> massRange;
115
119 Lorentz5Momentum momentum;
120
124 Lorentz5Momentum backwardMomentum;
125
130
134 vector<PhasespaceTree> children;
135
139 set<int> leafs;
140
145
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
171 vector<Lorentz5Momentum>&);
172
176 void put(PersistentOStream&) const;
177
182
186 void print(int in = 0);
187
188 };
189
190 }
191
192}
193
194#endif // HERWIG_PhasespaceHelpers_H
-*- C++ -*-
constexpr ZeroUnit ZERO
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
General information for phase space generation.
Energy generateMass(tcPDPtr, const pair< Energy, Energy > &)
Generate a mass for the given particle type and mass range.
Energy sqrtSHat
The center of mass energy.
Lorentz5Momentum generateKt(const Lorentz5Momentum &p1, const Lorentz5Momentum &p2, Energy pt)
Calculate a transverse momentum for the given momenta, invariant pt and azimuth.
Energy2 sHat
The center of mass energy squared.
double x0
Parameter steering from which on propagator virtualities are sampled flat.
double weight
The phase space weight.
double xc
Parameter steering at which virtuality singularities of propagators are actually cut off.
Energy M0
Parameter steering from which on propagator virtualities are sampled flat.
StreamingRnd rnd
The random number generator.
Energy Mc
Parameter steering at which virtuality singularities of propagators are actually cut off.
void setup(const Tree2toNDiagram &, int pos=0)
Setup from diagram at given position.
void print(int in=0)
Print tree, only for debugging purposes.
bool doMirror
Wether or not this is a mirrored channel.
void setupMirrored(const Tree2toNDiagram &diag, int pos)
Setup mirror from diagram at given position.
void init(const vector< Lorentz5Momentum > &)
Initialize using masses as given by mass() members of the final state momenta.
bool spacelike
Wether or not this is a spacelike line.
int externalId
The external leg id of this line, if external.
pair< Energy, Energy > massRange
The allowed mass range for this line.
set< int > leafs
External lines originating from this line.
tcPDPtr data
The particle running along this line.
void generateKinematics(PhasespaceInfo &, vector< Lorentz5Momentum > &)
Generate kinematics for the children.
void put(PersistentOStream &) const
Write phase space tree to ostream.
void get(PersistentIStream &)
Read phase space tree from istream.
Lorentz5Momentum backwardMomentum
A backward momentum, if needed.
Lorentz5Momentum momentum
The momentum running along this line.
vector< PhasespaceTree > children
The children lines; if empty this is an external line.
Wrap around a vector of random numbers to behave as a stream of those.