-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathRooCMSShape.cc
More file actions
65 lines (55 loc) · 1.87 KB
/
RooCMSShape.cc
File metadata and controls
65 lines (55 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*****************************************************************************
* Project: CMS detector at the CERN
*
* Package: PhysicsTools/TagAndProbe/RooCMSShape
*
*
* Authors:
* Nadia Adam, Princeton - [email protected]
* Adam Hunt, Princeton - [email protected]
* Kalanand Mishra, Fermilab - [email protected]
*
* Description:
* Defines a probability density function which has exponential decay
* distribution at high mass beyond the pole position (say, Z peak)
* but turns over (i.e., error function) at low mass due to threshold
* effect. We use this to model the background shape in Z->ll invariant
* mass.
* History:
*
*
*****************************************************************************/
#include "RooCMSShape.h"
ClassImp(RooCMSShape)
RooCMSShape::RooCMSShape(const char *name, const char *title,
RooAbsReal& _x,
RooAbsReal& _alpha,
RooAbsReal& _beta,
RooAbsReal& _gamma,
RooAbsReal& _peak) :
RooAbsPdf(name,title),
x("x","x",this,_x),
alpha("alpha","alpha",this,_alpha),
beta("beta","beta",this,_beta),
gamma("gamma","gamma",this,_gamma),
peak("peak","peak",this,_peak)
{ }
RooCMSShape::RooCMSShape(const RooCMSShape& other, const char* name):
RooAbsPdf(other,name),
x("x",this,other.x),
alpha("alpha",this,other.alpha),
beta("beta",this,other.beta),
gamma("gamma",this,other.gamma),
peak("peak",this,other.peak)
{ }
Double_t RooCMSShape::evaluate() const
{
// ENTER EXPRESSION IN TERMS OF VARIABLE ARGUMENTS HERE
//Double_t erf = TMath::Erfc((alpha - x) * beta);
Double_t erf = RooMath::erfc((alpha - x) * beta);
Double_t u = (x - peak)*gamma;
if(u < -70) u = 1e20;
else if( u>70 ) u = 0;
else u = exp(-u); //exponential decay
return erf*u;
}