Jpp
18.6.0-rc.1
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JPhysics
JPhysicsToolkit.hh
Go to the documentation of this file.
1
#ifndef __JPHYSICS__JPHYSICSTOOLKIT__
2
#define __JPHYSICS__JPHYSICSTOOLKIT__
3
4
5
/**
6
* \file
7
* Auxiliary methods for physics calculations.
8
* \author bjung
9
*/
10
11
namespace
JPHYSICS {}
12
namespace
JPP {
using namespace
JPHYSICS; }
13
14
namespace
JPHYSICS {
15
16
/**
17
* Get kinetic energy of particle with given energy and mass.
18
*
19
* \param E energy [GeV]
20
* \param m mass [GeV]
21
* \return kinetic energy [GeV]
22
*/
23
inline
double
getKineticEnergy
(
const
double
E
,
const
double
m)
24
{
25
if
(E > m) {
26
return
sqrt((E - m) * (E + m));
27
}
else
{
28
return
0.0;
29
}
30
}
31
}
32
33
#endif
E
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
Definition:
JMuonPostfit.sh:40
JAANET::getKineticEnergy
double getKineticEnergy(const Trk &trk)
Get track kinetic energy.
Definition:
JAAnetToolkit.hh:872
Generated by
1.8.5