DAS  3.0
Das Analysis System
Distribution

Description

Functor to get the standard Double Crystal Ball distribution

Todo:
write LaTeX version

Note: the formula looks a little bit different from the "Wikipedia" formula to avoid too large numbers in the intermediate steps of the calculation.

#include <DoubleCrystalBall.h>

+ Inheritance diagram for Distribution:
+ Collaboration diagram for Distribution:

Public Member Functions

void Eval (double *x) final
 
- Public Member Functions inherited from Base
double Z (double x)
 
void SetParameters (double *p)
 
double operator() (double *x, double *p)
 
 Base (TF1 *f=nullptr)
 
void dump ()
 
virtual ~Base ()=default
 

Additional Inherited Members

- Public Attributes inherited from Base
double N
 
double mu
 
double sigma
 
double kL
 
double nL
 
double kR
 
double nR
 
double AL
 
double AR
 
double BL
 
double BR
 
double z
 
double aR
 
double aL
 
double expaR2
 
double expaL2
 
double CR
 
double CL
 
double DD
 
double K
 
double result
 

Member Function Documentation

◆ Eval()

void Eval ( double *  x)
finalvirtual

Virtual method to calculate the value of the function, given the internal set of parameters and the value of x given as parameter.

Implements Base.

100 {
101  if (*x < kL) {
102  double R = aL/nL;
103  result = (N/K) * expaL2*pow(1-R*(aL+z),-nL)/sigma;
104  }
105  else if (*x < kR) {
106  result = (N/K) * exp(-pow(z,2)/2.)/sigma;
107  }
108  else {
109  double R = aR/nR;
110  result = (N/K) * expaR2*pow(1-R*(aR-z),-nR)/sigma;
111  }
112 }

The documentation for this struct was generated from the following files:
DAS::DoubleCrystalBall::Base::sigma
double sigma
width
Definition: DoubleCrystalBall.h:17
DAS::DoubleCrystalBall::Base::aL
double aL
normalised LHS turn-on point
Definition: DoubleCrystalBall.h:30
DAS::DoubleCrystalBall::Base::expaR2
double expaR2
value of core at normalised RHS turn-on point
Definition: DoubleCrystalBall.h:32
DAS::DoubleCrystalBall::Base::kL
double kL
LHS turn-on point.
Definition: DoubleCrystalBall.h:18
DAS::DoubleCrystalBall::Base::aR
double aR
normalised RHS turn-on point
Definition: DoubleCrystalBall.h:29
DAS::DoubleCrystalBall::Base::z
double z
normalised resolution
Definition: DoubleCrystalBall.h:28
DAS::DoubleCrystalBall::Base::nR
double nR
RHS power.
Definition: DoubleCrystalBall.h:21
DAS::DoubleCrystalBall::Base::result
double result
store last evaludation
Definition: DoubleCrystalBall.h:40
DAS::DoubleCrystalBall::Base::N
double N
global normalisation (best is to fix it to one)
Definition: DoubleCrystalBall.h:15
DAS::DoubleCrystalBall::Base::expaL2
double expaL2
value of core at normalised LHS turn-on point
Definition: DoubleCrystalBall.h:33
DAS::DoubleCrystalBall::Base::nL
double nL
LHS power.
Definition: DoubleCrystalBall.h:19
DAS::DoubleCrystalBall::Base::kR
double kR
RHS turn-on point.
Definition: DoubleCrystalBall.h:20
DAS::DoubleCrystalBall::Base::K
double K
total normalisation
Definition: DoubleCrystalBall.h:38