ROOT
master
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
// Header source file for function etaMax
12
//
13
// Created by: Mark Fischler at Thu Jun 2 2005
14
15
#ifndef ROOT_MathX_GenVectorX_etaMax
16
#define ROOT_MathX_GenVectorX_etaMax 1
17
18
#include "
MathX/GenVectorX/MathHeaders.h
"
19
20
#include "
MathX/GenVectorX/AccHeaders.h
"
21
22
#include <limits>
23
#include <cmath>
24
25
// #if !defined(ROOT_MATH_SYCL) && !defined(ROOT_MATH_CUDA)
26
// typedef long double d_type;
27
// #else
28
// typedef d_type double ;
29
// #endif
30
31
namespace
ROOT
{
32
33
namespace
ROOT_MATH_ARCH
{
34
35
/**
36
The following function could be called to provide the maximum possible
37
value of pseudorapidity for a non-zero rho. This is log ( max/min )
38
where max and min are the extrema of positive values for type
39
long double.
40
*/
41
__roohost__
__roodevice__
inline
long
double
etaMax_impl
()
42
{
43
using
std::log;
44
return
math_log
(std::numeric_limits<long double>::max() / 256.0l) -
45
math_log
(std::numeric_limits<long double>::denorm_min() * 256.0l) + 16.0 *
math_log
(2.0);
46
// Actual usage of etaMax() simply returns the number 22756, which is
47
// the answer this would supply, rounded to a higher integer.
48
}
49
50
/**
51
Function providing the maximum possible value of pseudorapidity for
52
a non-zero rho, in the Scalar type with the largest dynamic range.
53
*/
54
template
<
class
T>
55
inline
T
etaMax
()
56
{
57
return
static_cast<
T
>
(22756.0);
58
}
59
60
}
// namespace ROOT_MATH_ARCH
61
62
}
// namespace ROOT
63
64
#endif
/* ROOT_MathX_GenVectorX_etaMax */
AccHeaders.h
__roohost__
#define __roohost__
Definition
AccHeaders.h:36
__roodevice__
#define __roodevice__
Definition
AccHeaders.h:35
MathHeaders.h
ROOT::ROOT_MATH_ARCH::math_log
Scalar math_log(Scalar x)
Definition
MathHeaders.h:404
ROOT::ROOT_MATH_ARCH::etaMax_impl
__roohost__ __roodevice__ long double etaMax_impl()
The following function could be called to provide the maximum possible value of pseudorapidity for a ...
Definition
etaMax.h:41
ROOT::ROOT_MATH_ARCH::etaMax
T etaMax()
Function providing the maximum possible value of pseudorapidity for a non-zero rho,...
Definition
etaMax.h:55
ROOT_MATH_ARCH
Definition
Cartesian3Dfwd.h:9
ROOT
Definition
EExecutionPolicy.hxx:4
math
experimental
genvectorx
inc
MathX
GenVectorX
etaMax.h
ROOT master - Reference Guide Generated on Thu Sep 18 2025 04:29:15 (GVA Time) using Doxygen 1.10.0