GENIEGenerator
Loading...
Searching...
No Matches
HNLKinUtils.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2/*!
3
4\namespace genie::utils::hnl
5
6\brief Useful kinematic functions
7
8\author John Plows <komninos-john.plows@physics.ox.ac.uk>
9
10\created January 11th, 2022
11
12\cpright Copyright (c) 2003-2025, The GENIE Collaboration
13 For the full text of the license visit http://copyright.genie-mc.org
14
15*/
16//----------------------------------------------------------------------------
17
18#ifndef _HNL_KINUTILS_H_
19#define _HNL_KINUTILS_H_
20
21// -- C++ includes
22#include <cmath>
23
24// -- GENIE includes
26
27namespace genie{
28namespace utils {
29
30 namespace hnl {
31
32 inline double MassX( double m1, double m2 ) {
33 if( m2 <= 0. || m1 < 0.) { LOG( "HNL", pERROR ) << "Illegal masses m1 = " << m1 << ", m2 = " << m2; exit( 3 ); }
34 return m1 / m2;
35 }
36
37 inline double Kallen( double x, double y, double z ) {
38 return x*x + y*y + z*z - 2. * ( x*y + y*z + z*x );
39 }
40
41 inline double SymmDiff( double x, double y ) {
42 return x + y - ( x-y ) * ( x-y );
43 }
44
45 inline double RhoFunc( double x, double y ) {
46 return SymmDiff( x, y ) * std::sqrt( Kallen( 1, x, y ) );
47 }
48
49 } // namespace hnl
50
51} //namespace utils
52} //namespace genie
53
54#endif // #ifndef _HNL_KINUTILS_H_
#define pERROR
Definition Messenger.h:59
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
Useful kinematic functions.
double MassX(double m1, double m2)
Definition HNLKinUtils.h:32
double Kallen(double x, double y, double z)
Definition HNLKinUtils.h:37
double SymmDiff(double x, double y)
Definition HNLKinUtils.h:41
double RhoFunc(double x, double y)
Definition HNLKinUtils.h:45
Root of GENIE utility namespaces.
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25