Main Page
Namespaces
Classes
Package Documentation
CVS Directory
WorkBook
Offline Guide
Release schedule
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
,
const
char
*
title
,
6
RooAbsReal& _m,
7
RooAbsReal& _m0,
8
RooAbsReal& _sigma,
9
RooAbsReal& _alpha,
10
RooAbsReal& _n,
11
RooAbsReal& _sigma_2,
12
RooAbsReal& _frac
13
) :
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
24
RooCBExGaussShape::RooCBExGaussShape
(
const
RooCBExGaussShape
& other,
const
char
*
name
):
25
RooAbsPdf(other,name),
26
m
(
"m"
,this,other.
m
),
27
m0(
" m0"
,this,other. m0),
28
sigma
(
" sigma"
,this,other.
sigma
),
29
alpha
(
" alpha"
,this,other.
alpha
),
30
n
(
" n"
,this,other.
n
),
31
sigma_2(
" sigma_2"
,this,other. sigma_2),
32
frac
(
" frac"
,this,other.
frac
)
33
{ }
34
35
36
Double_t
RooCBExGaussShape::evaluate
()
const
37
{
38
Double_t
rval
=0;
39
40
Double_t
t
= (
m
-
m0
)/
sigma
;
41
Double_t t0 = (
m
-
m0
)/
sigma_2
;
42
if
(
alpha
< 0){
43
t = -
t
;
44
t0 = -t0;
45
}
46
47
Double_t absAlpha = fabs((Double_t)
alpha
);
48
49
if
(t >= -absAlpha) {
50
rval=
frac
*
exp
(-0.5*t*t) + (1.0-
frac
)*
exp
(-0.5*t0*t0);
51
}
52
else
{
53
Double_t
a
= TMath::Power(
n
/absAlpha,
n
)*
exp
(-0.5*absAlpha*absAlpha);
54
Double_t
b
=
n
/absAlpha - absAlpha;
55
rval= a/TMath::Power(b - t,
n
);
56
}
57
58
//std::cout<<"RooCBExGaussShape: m, evaluate= "<<m<<", "<<rval<<std::endl;
59
return
rval
;
60
}
indexGen.title
title
Definition:
indexGen.py:48
ExpressReco_HICollisions_FallBack.sigma
tuple sigma
Definition:
ExpressReco_HICollisions_FallBack.py:4426
alpha
float alpha
Definition:
AMPTWrapper.h:95
RooCBExGaussShape::sigma
RooRealProxy sigma
Definition:
RooCBExGaussShape.h:39
RooCBExGaussShape::RooCBExGaussShape
RooCBExGaussShape()
Definition:
RooCBExGaussShape.h:17
RooCBExGaussShape::frac
RooRealProxy frac
Definition:
RooCBExGaussShape.h:43
funct::exp
Exp< T >::type exp(const T &t)
Definition:
Exp.h:22
RooCBExGaussShape::m
RooRealProxy m
Definition:
RooCBExGaussShape.h:37
AlCaRecoCosmics_cfg.name
tuple name
Definition:
AlCaRecoCosmics_cfg.py:24
RooCBExGaussShape::evaluate
Double_t evaluate() const
Definition:
RooCBExGaussShape.cc:36
matplotRender.t
tuple t
Definition:
matplotRender.py:569
RooCBExGaussShape::sigma_2
RooRealProxy sigma_2
Definition:
RooCBExGaussShape.h:42
RooCBExGaussShape::m0
RooRealProxy m0
Definition:
RooCBExGaussShape.h:38
RooCBExGaussShape.h
rval
unsigned long long int rval
Definition:
vlib.h:23
m
int m
Definition:
DTDataIntegrityTask.cc:32
RooCBExGaussShape
Definition:
RooCBExGaussShape.h:15
n
int n
Definition:
DTDataIntegrityTask.cc:32
b
double b
Definition:
hdecay.h:120
compareJSON.const
string const
Definition:
compareJSON.py:14
cropTnPTrees.frac
tuple frac
Definition:
cropTnPTrees.py:17
a
double a
Definition:
hdecay.h:121
RooCBExGaussShape::n
RooRealProxy n
Definition:
RooCBExGaussShape.h:41
RooCBExGaussShape::alpha
RooRealProxy alpha
Definition:
RooCBExGaussShape.h:40
Generated for CMSSW Reference Manual by
1.8.5