Page MenuHomeHEPForge

Kinematics.icc
No OneTemporary

Size
887 B
Referenced Files
None
Subscribers
None

Kinematics.icc

// -*- C++ -*-
//
// This is the implementation of the inlined member functions of
// the Kinematics class.
//
namespace Herwig {
/******
* This function generates the center of mass momentum for M -> m1 m2
*****/
inline Energy MyKinematics::CMMomentum(const Energy M,
const Energy m1,
const Energy m2) {
return ( M <= 0.0 || m1 < 0.0 || m2 < 0.0 || M <= m1+m2 ? 0.0 :
sqrt(( M*M - (m1+m2)*(m1+m2) )*( M*M - (m1-m2)*(m1-m2) )) / (2.0*M) );
}
/******
* This function creates a 3 vector in the direction given by the angles
*****/
inline Vector3 MyKinematics::unitDirection(const double cosTheta, const double phi)
{
double sinTheta = sqrt(1.0-cosTheta*cosTheta);
return ( fabs( cosTheta ) > 1.0 ? Vector3() :
Vector3( cos(phi)*sinTheta ,
sin(phi)*sinTheta ,
cosTheta) );
}
}

File Metadata

Mime Type
text/plain
Expires
Tue, Sep 30, 5:49 AM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6432195
Default Alt Text
Kinematics.icc (887 B)

Event Timeline