00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef ThePEG_SimplePhaseSpace_H
00010 #define ThePEG_SimplePhaseSpace_H
00011
00012 #include "ThePEG/Config/ThePEG.h"
00013
00014 #include "ThePEG/Vectors/LorentzRotation.h"
00015 #include "ThePEG/Vectors/LorentzRotation.h"
00016 #include "ThePEG/EventRecord/Particle.h"
00017 #include "ThePEG/EventRecord/ParticleTraits.h"
00018 #include "ThePEG/Repository/UseRandom.h"
00019 #include "SimplePhaseSpace.xh"
00020 #include <numeric>
00021
00022 namespace ThePEG {
00023
00032 struct SimplePhaseSpace {
00033
00046 template <typename PType>
00047 static void CMS(Energy2 s, PType & p1, PType & p2);
00048
00064 template <typename PType>
00065 static void CMS(PType & p1, PType & p2, Energy2 s,
00066 double cosTheta, double phi);
00067
00084 template <typename PType>
00085 static void CMS(PType & p1, PType & p2, Energy2 s, Energy2 t, double phi,
00086 const PType & p0);
00087
00099 template <typename PType>
00100 static void CMS(PType & p1, PType & p2, Energy2 s);
00101
00112 template <typename PPairType>
00113 static void CMS(const PPairType & p, Energy2 s)
00114 {
00115 CMS(*p.first, *p.second, s);
00116 }
00117
00135 template <typename PType>
00136 static void CMS(PType & p1, PType & p2, PType & p3, Energy2 s,
00137 double x1, double x3);
00138
00161 template <typename PType>
00162 static void CMS(PType & p1, PType & p2, PType & p3, Energy2 s,
00163 double x1, double x3, double phii = 0.0,
00164 double theta = 0.0, double phi = 0.0);
00165
00176 static Energy getMagnitude(Energy2 s, Energy m1, Energy m2);
00177
00185 static Momentum3 polar3Vector(Energy p, double costheta, double phi)
00186 {
00187 return Momentum3(p*sqrt(1.0 - sqr(costheta))*sin(phi),
00188 p*sqrt(1.0 - sqr(costheta))*cos(phi),
00189 p*costheta);
00190 }
00191
00206 static vector<LorentzMomentum>
00207 CMSn(Energy m0, const vector<Energy> & m);
00208
00221 template <typename Container>
00222 static void CMSn(Container & particles, Energy m0);
00223
00224 };
00225
00226 }
00227
00228 #ifndef ThePEG_TEMPLATES_IN_CC_FILE
00229 #include "SimplePhaseSpace.tcc"
00230 #endif
00231
00232 #endif