Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
etaMax.h
Go to the documentation of this file.
1// @(#)root/mathcore:$Id$
2// Authors: W. Brown, M. Fischler, L. Moneta 2005
3
4 /**********************************************************************
5 * *
6 * Copyright (c) 2005 , FNAL MathLib Team *
7 * *
8 * *
9 **********************************************************************/
10
11
12// Header source file for function etaMax
13//
14// Created by: Mark Fischler at Thu Jun 2 2005
15
16
17#ifndef ROOT_Math_GenVector_etaMax
18#define ROOT_Math_GenVector_etaMax 1
19
20
21#include <limits>
22#include <cmath>
23
24
25namespace ROOT {
26
27 namespace Math {
28
29 /**
30 The following function could be called to provide the maximum possible
31 value of pseudorapidity for a non-zero rho. This is log ( max/min )
32 where max and min are the extrema of positive values for type
33 long double.
34 */
35 inline
36 long double etaMax_impl() {
37 using std::log;
38 return log ( std::numeric_limits<long double>::max()/256.0l ) -
39 log ( std::numeric_limits<long double>::denorm_min()*256.0l )
40 + 16.0 * log(2.0);
41 // Actual usage of etaMax() simply returns the number 22756, which is
42 // the answer this would supply, rounded to a higher integer.
43 }
44
45 /**
46 Function providing the maximum possible value of pseudorapidity for
47 a non-zero rho, in the Scalar type with the largest dynamic range.
48 */
49 template <class T>
50 inline
51 T etaMax() {
52 return static_cast<T>(22756.0);
53 }
54
55 } // namespace Math
56
57} // namespace ROOT
58
59
60#endif /* ROOT_Math_GenVector_etaMax */
Namespace for new Math classes and functions.
long double etaMax_impl()
The following function could be called to provide the maximum possible value of pseudorapidity for a ...
Definition etaMax.h:36
T etaMax()
Function providing the maximum possible value of pseudorapidity for a non-zero rho,...
Definition etaMax.h:51
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...