Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
Stat.h
이 파일의 문서화 페이지로 가기
1 // $Id:$
2 // -*- C++ -*-
3 //
4 // -----------------------------------------------------------------------
5 // HEP Random
6 // --- HepStat ---
7 // Purely static class containing useful statistics methods
8 
9 // -----------------------------------------------------------------------
10 
11 // HepStat is a substitute for using a namespace.
12 // One would never instantiate a HepStat object;
13 // usage of any of these methods looks like --
14 //
15 // double x = HepStat::erf ( .1 );
16 //
17 // A user may wish to improve the readability of algortihm code which uses
18 // one method many times by lines like using HepStat::erf
19 //
20 // and later, x = erf(u); will work.
21 //
22 
23 // These methods are implemented in separate .cc files so that
24 // user code need pull in only the code that is necessary. Time
25 // (ROUGH estimates in cycles) and table footprint info is provided
26 // in this header.
27 
28 
29 // =======================================================================
30 // M. Fischler - Created: 1/25/00
31 //
32 // M. Fischler - Inserted flatToGaussian 1/25/00
33 // From code of an attempt to speed up RandGauss
34 // by use of tables and splines. The code was not
35 // significantly faster than Box-Mueller, so that
36 // algorithm is left as the RandGauss implementation.
37 // - Inserted inverseErf
38 // M. Fischler - Inserted gammln 2/4/00
39 // M. Fischler - Made constructor private; removed private destructor 4/17/00
40 // =======================================================================
41 
42 #ifndef HepStat_h
43 #define HepStat_h 1
44 
45 namespace CLHEP {
46 
51 class HepStat {
52 
53 private:
54  HepStat();
55  // You CANNOT instantiate a HepStat object.
56 
57 public:
58 
59  static double flatToGaussian (double r);
60  // This is defined by the satement that if e() provides a uniform random
61  // on (0,1) then flatToGaussian(e()) is distributed as a unit normal
62  // Gaussian. That is, flatToGaussian is the inverse of the c.d.f. of
63  // a Gaussian.
64  // Footprint: 30 K // Time: 150 cycles
65 
66  static double inverseErf (double t);
67  static double erf (double x);
68  // defined in flatToGaussian.cc
69 
70  static double erfQ (double x);
71  // Quicker, and with less footprint, than erf and gaussianCDF
72  // but only accurate to 7 digits.
73  // Footprint: 0 // Time:
74 
75  static double gammln (double x);
76  // ln (gamma(x))
77 
78 };
79 
80 } // namespace CLHEP
81 
82 #endif
Float_t x
Definition: compare.C:6
static double flatToGaussian(double r)
static double gammln(double x)
Definition: gammln.cc:19
static double inverseErf(double t)
static double erfQ(double x)
Definition: erfQ.cc:24
static double erf(double x)