|
DAS
3.0
Das Analysis System
|
Base functor for any Double Crystal Ball function
The idea is manyfold:
- store the values of the parameters and of the intermediate steps of the calculation for potential debugging
- keep the same structure for the distribution itself as well as for the integral of for the derivative
#include <DoubleCrystalBall.h>
◆ Base()
Base |
( |
TF1 * |
f = nullptr | ) |
|
If a TF1 is given, then the parameters are taken from f.
64 CR(0),
CL(0),
DD(sqrt(2*M_PI)),
67 if (
f ==
nullptr)
return;
68 assert(
f->GetNpar() == 7);
69 double *
p =
f->GetParameters();
◆ ~Base()
Default destructor will be taken from the daughter class.
◆ dump()
Just dump all internal parameters AND the last result.
◆ Eval()
virtual void Eval |
( |
double * |
x | ) |
|
|
pure virtual |
Virtual method to calculate the value of the function, given the internal set of parameters and the value of x given as parameter.
Implemented in DLog, Integral, and Distribution.
◆ operator()()
double operator() |
( |
double * |
x, |
|
|
double * |
p |
|
) |
| |
Standard form as requested from ROOT TF1 objects.
◆ SetParameters()
void SetParameters |
( |
double * |
p | ) |
|
Retrieves the parameters from p and calculate all intermediate steps of the calculation.
23 sigma = max(1e-8,abs(
p[2]));
25 kL = min(
mu-1e-8,
p[3]);
27 kR = max(
mu+1e-8,
p[5]);
48 DD = sqrt(M_PI/2.)*(erf(
aR/sqrt(2)) + erf(
aL/sqrt(2)));
◆ Z()
Calculate the normalised version of x for Gaussian core.
◆ AL
◆ aL
normalised LHS turn-on point
◆ AR
◆ aR
normalised RHS turn-on point
◆ BL
◆ BR
◆ CL
◆ CR
◆ DD
◆ expaL2
value of core at normalised LHS turn-on point
◆ expaR2
value of core at normalised RHS turn-on point
◆ kL
◆ kR
◆ mu
global normalisation (best is to fix it to one)
◆ nL
◆ nR
◆ result
◆ sigma
The documentation for this struct was generated from the following files:
- /builds/cms-analysis/general/DasAnalysisSystem/Core/Installer/Core/JEC/interface/DoubleCrystalBall.h
- /builds/cms-analysis/general/DasAnalysisSystem/Core/Installer/Core/JEC/src/DoubleCrystalBall.cc
void SetParameters(double *p)
Definition: DoubleCrystalBall.cc:19
double BL
LHS offset.
Definition: DoubleCrystalBall.h:25
double Z(double x)
Calculate the normalised version of x for Gaussian core.
Definition: DoubleCrystalBall.h:44
p
Definition: Ntupliser_cfg.py:358
f
Definition: Ntupliser_cfg.py:252
double sigma
width
Definition: DoubleCrystalBall.h:17
double aL
normalised LHS turn-on point
Definition: DoubleCrystalBall.h:30
double expaR2
value of core at normalised RHS turn-on point
Definition: DoubleCrystalBall.h:32
double DD
area in core
Definition: DoubleCrystalBall.h:37
static const double dinf
Definition: DoubleCrystalBall.cc:14
virtual void Eval(double *x)=0
double CL
area in LHS tail
Definition: DoubleCrystalBall.h:36
double BR
RHS offset.
Definition: DoubleCrystalBall.h:26
double kL
LHS turn-on point.
Definition: DoubleCrystalBall.h:18
double aR
normalised RHS turn-on point
Definition: DoubleCrystalBall.h:29
double z
normalised resolution
Definition: DoubleCrystalBall.h:28
double mu
mean
Definition: DoubleCrystalBall.h:16
double AL
LHS tail normalisation.
Definition: DoubleCrystalBall.h:23
double nR
RHS power.
Definition: DoubleCrystalBall.h:21
double result
store last evaludation
Definition: DoubleCrystalBall.h:40
double N
global normalisation (best is to fix it to one)
Definition: DoubleCrystalBall.h:15
double CR
area in RHS tail
Definition: DoubleCrystalBall.h:35
double expaL2
value of core at normalised LHS turn-on point
Definition: DoubleCrystalBall.h:33
double nL
LHS power.
Definition: DoubleCrystalBall.h:19
double AR
RHS tail normalisation.
Definition: DoubleCrystalBall.h:24
double kR
RHS turn-on point.
Definition: DoubleCrystalBall.h:20
double K
total normalisation
Definition: DoubleCrystalBall.h:38
static const double deps
Definition: DoubleCrystalBall.cc:15