ATLAS Offline Software
Macros | Functions
MathTools.cxx File Reference
#include "ReweightUtils/MathTools.h"
#include <cmath>
Include dependency graph for MathTools.cxx:

Go to the source code of this file.

Macros

#define MathTools_cxx
 

Functions

double ln_factorial (unsigned int value)
 Logarithmic factorial (precise). More...
 
double ln_factorialApp (unsigned int value)
 Logarithmic factorial (approximative). More...
 

Macro Definition Documentation

◆ MathTools_cxx

#define MathTools_cxx

Definition at line 6 of file MathTools.cxx.

Function Documentation

◆ ln_factorial()

double ln_factorial ( unsigned int  value)

Logarithmic factorial (precise).

Definition at line 10 of file MathTools.cxx.

10  {
11  double result = 0.;
12  for (int k = value ; k > 0 ; --k) {
13  result += std::log(k);
14  }
15  return result;
16 }

◆ ln_factorialApp()

double ln_factorialApp ( unsigned int  value)

Logarithmic factorial (approximative).

Definition at line 18 of file MathTools.cxx.

18  {
19  return 0.5*std::log(1.04719755119659763+6.28318530717958623*value) + value*(std::log(value)-1.);
20 }
get_generator_info.result
result
Definition: get_generator_info.py:21
athena.value
value
Definition: athena.py:124
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
fitman.k
k
Definition: fitman.py:528