src
PhysicsTools
TagAndProbe
src
RooCBExGaussShape.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/TagAndProbe/interface/RooCBExGaussShape.h
"
2
3
ClassImp
(
RooCBExGaussShape
);
4
5
RooCBExGaussShape::RooCBExGaussShape
(
const
char
*
name
,
6
const
char
*
title
,
7
RooAbsReal&
_m
,
8
RooAbsReal& _m0,
9
RooAbsReal& _sigma,
10
RooAbsReal& _alpha,
11
RooAbsReal& _n,
12
RooAbsReal& _sigma_2,
13
RooAbsReal& _frac)
14
: RooAbsPdf(
name
,
title
),
15
m
(
"m"
,
"m"
, this,
_m
),
16
m0(
" m0"
,
" m0"
, this, _m0),
17
sigma(
" sigma"
,
" sigma"
, this, _sigma),
18
alpha
(
" alpha"
,
" alpha"
, this, _alpha),
19
n
(
" n"
,
" n"
, this, _n),
20
sigma_2(
" sigma_2"
,
" sigma_2"
, this, _sigma_2),
21
frac
(
" frac"
,
" frac"
, this, _frac) {}
22
23
RooCBExGaussShape::RooCBExGaussShape
(
const
RooCBExGaussShape
&
other
,
const
char
*
name
)
24
: RooAbsPdf(
other
,
name
),
25
m
(
"m"
, this,
other
.
m
),
26
m0(
" m0"
, this,
other
.m0),
27
sigma(
" sigma"
, this,
other
.sigma),
28
alpha
(
" alpha"
, this,
other
.
alpha
),
29
n
(
" n"
, this,
other
.
n
),
30
sigma_2(
" sigma_2"
, this,
other
.sigma_2),
31
frac
(
" frac"
, this,
other
.
frac
) {}
32
33
Double_t
RooCBExGaussShape::evaluate
()
const
{
34
Double_t rval = 0;
35
36
Double_t
t
= (
m
-
m0
) /
sigma
;
37
Double_t
t0
= (
m
-
m0
) /
sigma_2
;
38
if
(
alpha
< 0) {
39
t
= -
t
;
40
t0
= -
t0
;
41
}
42
43
Double_t absAlpha = fabs((Double_t)
alpha
);
44
45
if
(
t
>= -absAlpha) {
46
rval =
frac
*
exp
(-0.5 *
t
*
t
) + (1.0 -
frac
) *
exp
(-0.5 *
t0
*
t0
);
47
}
else
{
48
Double_t
a
= TMath::Power(
n
/ absAlpha,
n
) *
exp
(-0.5 * absAlpha * absAlpha);
49
Double_t
b
=
n
/ absAlpha - absAlpha;
50
rval =
a
/ TMath::Power(
b
-
t
,
n
);
51
}
52
53
//std::cout<<"RooCBExGaussShape: m, evaluate= "<<m<<", "<<rval<<std::endl;
54
return
rval;
55
}
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition:
FrontierCondition_GT_autoExpress_cfi.py:149
alpha
float alpha
Definition:
AMPTWrapper.h:105
RooCBExGaussShape::sigma
RooRealProxy sigma
Definition:
RooCBExGaussShape.h:38
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:651
RooCBExGaussShape::evaluate
Double_t evaluate() const override
Definition:
RooCBExGaussShape.cc:33
RooCBExGaussShape::RooCBExGaussShape
RooCBExGaussShape()
Definition:
RooCBExGaussShape.h:16
RooCBExGaussShape::frac
RooRealProxy frac
Definition:
RooCBExGaussShape.h:42
hgcalDigitizer_cfi._m
_m
Definition:
hgcalDigitizer_cfi.py:185
DivergingColor.frac
float frac
Definition:
DivergingColor.py:175
dqmiodumpmetadata.n
n
Definition:
dqmiodumpmetadata.py:28
ClassImp
ClassImp(RooCBExGaussShape)
trackingPlots.other
other
Definition:
trackingPlots.py:1464
visualization-live-secondInstance_cfg.m
m
Definition:
visualization-live-secondInstance_cfg.py:80
RooCBExGaussShape::sigma_2
RooRealProxy sigma_2
Definition:
RooCBExGaussShape.h:41
RooCBExGaussShape.h
RooCBExGaussShape
Definition:
RooCBExGaussShape.h:14
RooCBExGaussShape::m0
ClassDefOverride(RooCBExGaussShape, 1) protected RooRealProxy m0
Definition:
RooCBExGaussShape.h:32
b
double b
Definition:
hdecay.h:118
runGCPTkAlMap.title
string title
Definition:
runGCPTkAlMap.py:94
a
double a
Definition:
hdecay.h:119
RooCBExGaussShape::n
RooRealProxy n
Definition:
RooCBExGaussShape.h:40
JetChargeProducer_cfi.exp
exp
Definition:
JetChargeProducer_cfi.py:6
RooCBExGaussShape::alpha
RooRealProxy alpha
Definition:
RooCBExGaussShape.h:39
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
Generated for CMSSW Reference Manual by
1.8.14