SynAPSE  0.6.0
Synergistic Analysis of Phase Space Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
DCauchy.hh
1 #ifndef DCAUCHY_HH
2 #define DCAUCHY_HH
3 
4 // C++ includes
5 #include <iostream>
6 #include <vector>
7 #include <cmath>
8 
9 // ROOT includes
10 #include "TBox.h"
11 
12 // Other includes
13 #include "DFunction.hh"
14 
19 class DCauchy : public DFunction {
20  public:
21 
23  DCauchy();
24 
30  DCauchy(const double mu,
31  const double sigma);
32 
34  DCauchy(const DCauchy& df);
35 
37  DCauchy& operator=(const DCauchy& df);
38 
40  ~DCauchy();
41 
46  double CDF(const double& v) const;
47 
52  double CDFRadial(const double& R) const;
53 
58  std::vector<TLine*> Contour1D(const double alpha) const;
59 
64  std::vector<TObject*> Contour2D(const double alpha) const;
65 
70  TF3* Contour3D(const double alpha) const;
71 
76  std::vector<TLine*> ContourRadial(const double alpha) const;
77 
82  double ContourVolume(const double alpha) const;
83 
88  double Evaluate(const std::vector<double>& v) const;
89 
94  double Level(const double alpha) const;
95 
97  double Norm() const;
98 
103  double Radial(const double R) const;
104 
106  double Random();
107 
109  std::vector<double> RandomVector();
110 
111  private:
112 
114  bool Initialize();
115 
116  double _mean;
117  double _sigma;
118 };
119 
120 #endif
double ContourVolume(const double alpha) const
Volume of the smallest contour of a given p-value.
Definition: DCauchy.cc:90
double _sigma
Width.
Definition: DCauchy.hh:117
double Random()
Returns a random value sampled from the Cauchy distribution.
Definition: DCauchy.cc:119
bool Initialize()
Initializes the distribution.
Definition: DCauchy.cc:132
std::vector< TObject * > Contour2D(const double alpha) const
Dummy definition for the 2D contour, Cauchy is not normalisable in 2D.
Definition: DCauchy.cc:61
~DCauchy()
Destructor.
Definition: DCauchy.cc:36
double Level(const double alpha) const
Returns the level of the alpha-contour of the distribution.
Definition: DCauchy.cc:102
double CDF(const double &v) const
Cumulative distribution function at v.
Definition: DCauchy.cc:38
std::vector< double > RandomVector()
Returns a random vector sampled from the Cauchy distribution.
Definition: DCauchy.cc:126
double Evaluate(const std::vector< double > &v) const
Returns the value of the distribution in v.
Definition: DCauchy.cc:96
DCauchy()
Basic constructor, initilizes a Cauchy distribution.
Definition: DCauchy.cc:3
double Radial(const double R) const
Returns the centred and normalised version of Evaluate.
Definition: DCauchy.cc:113
DCauchy & operator=(const DCauchy &df)
Equality operator.
Definition: DCauchy.cc:26
double CDFRadial(const double &R) const
If the function has an L1, L2 or Linf symmetry, returns its CDF at radius R.
Definition: DCauchy.cc:45
Defines the methods associated with the Cauchy distribution.
Definition: DCauchy.hh:19
Parent class for all the probability density functions D*.
Definition: DFunction.hh:27
std::vector< TLine * > Contour1D(const double alpha) const
Segment that encompass a certain p-value in 1 dimension.
Definition: DCauchy.cc:52
std::vector< TLine * > ContourRadial(const double alpha) const
Segment that encompass a certain p-value in radius.
Definition: DCauchy.cc:81
double _mean
Median.
Definition: DCauchy.hh:116
double Norm() const
Returns the probability content within the defined interval.
Definition: DCauchy.cc:108
TF3 * Contour3D(const double alpha) const
Dummy definition for the 3D contour, Cauchy is not normalisable in 3D.
Definition: DCauchy.cc:71