thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
SimplePhaseSpace.h
1// -*- C++ -*-
2//
3// SimplePhaseSpace.h is a part of ThePEG - Toolkit for HEP Event Generation
4// Copyright (C) 1999-2019 Leif Lonnblad
5//
6// ThePEG 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 ThePEG_SimplePhaseSpace_H
10#define ThePEG_SimplePhaseSpace_H
11
13
14#include "ThePEG/Vectors/LorentzRotation.h"
15#include "ThePEG/Vectors/LorentzRotation.h"
16#include "ThePEG/EventRecord/Particle.h"
17#include "ThePEG/EventRecord/ParticleTraits.h"
18#include "ThePEG/Repository/UseRandom.h"
19#include "SimplePhaseSpace.xh"
20#include <numeric>
21
22namespace ThePEG {
23
32namespace SimplePhaseSpace {
33
46 template <typename PType>
47 void CMS(Energy2 s, PType & p1, PType & p2);
48
64 template <typename PType>
65 void CMS(PType & p1, PType & p2, Energy2 s,
66 double cosTheta, double phi);
67
84 template <typename PType>
85 void CMS(PType & p1, PType & p2, Energy2 s, Energy2 t, double phi,
86 const PType & p0);
87
99 template <typename PType>
100 void CMS(PType & p1, PType & p2, Energy2 s);
101
112 template <typename PPairType>
113 void CMS(const PPairType & p, Energy2 s)
114 {
115 CMS(*p.first, *p.second, s);
116 }
117
135 template <typename PType>
136 void CMS(PType & p1, PType & p2, PType & p3, Energy2 s,
137 double x1, double x3);
138
161 template <typename PType>
162 void CMS(PType & p1, PType & p2, PType & p3, Energy2 s,
163 double x1, double x3, double phii = 0.0,
164 double theta = 0.0, double phi = 0.0);
165
177
188// static Energy checkMagnitude(Energy2 s, Energy m1, Energy m2);
189
197 inline Momentum3 polar3Vector(Energy p, double costheta, double phi)
198 {
199 return Momentum3(p*sqrt(1.0 - sqr(costheta))*sin(phi),
200 p*sqrt(1.0 - sqr(costheta))*cos(phi),
201 p*costheta);
202 }
203
218 vector<LorentzMomentum>
219 CMSn(Energy m0, const vector<Energy> & m);
220
233 template <typename Container>
234 void CMSn(Container & particles, Energy m0);
235
236}
237
238}
239
240#ifndef ThePEG_TEMPLATES_IN_CC_FILE
241#include "SimplePhaseSpace.tcc"
242#endif
243
244#endif /* ThePEG_SimplePhaseSpace_H */
This is the main config header file for ThePEG.
A 3-component vector.
Definition: ThreeVector.h:35
Energy getMagnitude(Energy2 s, Energy m1, Energy m2)
Calculate the absolute magnitude of the momenta of two particles with masses m1 and m2 when put in th...
void CMS(Energy2 s, PType &p1, PType &p2)
Set two momenta in their center of mass system.
Momentum3 polar3Vector(Energy p, double costheta, double phi)
Calculate the absolute magnitude of the momenta of two particles with masses m1 and m2 when put in th...
vector< LorentzMomentum > CMSn(Energy m0, const vector< Energy > &m)
Get a number of randomly distributed momenta.
ThreeVector< Energy > Momentum3
A momentum in three-dimensional euclidean space.
Definition: Unitsystem.h:136
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
constexpr auto sqr(const T &x) -> decltype(x *x)
The square function should really have been included in the standard C++ library.
Definition: ThePEG.h:117