CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RooCMSShape.cc
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: CMS detector at the CERN
3  *
4  * Package: PhysicsTools/TagAndProbe/RooCMSShape
5  *
6  *
7  * Authors:
8  * Nadia Adam, Princeton - neadam@princeton.edu
9  * Adam Hunt, Princeton - ahunt@princeton.edu
10  * Kalanand Mishra, Fermilab - kalanand@fnal.gov
11  *
12  * Description:
13  * Defines a probability density function which has exponential decay
14  * distribution at high mass beyond the pole position (say, Z peak)
15  * but turns over (i.e., error function) at low mass due to threshold
16  * effect. We use this to model the background shape in Z->ll invariant
17  * mass.
18  * History:
19  *
20  *
21  * Copyright (C) 2008 FNAL
22  *****************************************************************************/
23 
25 
26 ClassImp(RooCMSShape)
27 
29  RooAbsReal& _x,
30  RooAbsReal& _alpha,
31  RooAbsReal& _beta,
32  RooAbsReal& _gamma,
33  RooAbsReal& _peak) :
34  RooAbsPdf(name,title),
35  x("x","x",this,_x),
36  alpha("alpha","alpha",this,_alpha),
37  beta("beta","beta",this,_beta),
38  gamma("gamma","gamma",this,_gamma),
39  peak("peak","peak",this,_peak)
40  { }
41 
42 
43  RooCMSShape::RooCMSShape(const RooCMSShape& other, const char* name):
44  RooAbsPdf(other,name),
45  x("x",this,other.x),
46  alpha("alpha",this,other.alpha),
47  beta("beta",this,other.beta),
48  gamma("gamma",this,other.gamma),
49  peak("peak",this,other.peak)
50  { }
51 
52 
53 
54  Double_t RooCMSShape::evaluate() const
55  {
56  // ENTER EXPRESSION IN TERMS OF VARIABLE ARGUMENTS HERE
57 
58  //Double_t erf = TMath::Erfc((alpha - x) * beta);
59  Double_t erf = RooMath::erfc((alpha - x) * beta);
60  Double_t u = (x - peak)*gamma;
61 
62  if(u < -70) u = 1e20;
63  else if( u>70 ) u = 0;
64  else u = exp(-u); //exponential decay
65  return erf*u;
66  }
const double beta
RooRealProxy gamma
Definition: RooCMSShape.h:56
float alpha
Definition: AMPTWrapper.h:95
RooRealProxy peak
Definition: RooCMSShape.h:57
RooRealProxy alpha
Definition: RooCMSShape.h:54
RooRealProxy x
Definition: RooCMSShape.h:53
RooRealProxy beta
Definition: RooCMSShape.h:55
Double_t evaluate() const
Definition: RooCMSShape.cc:54
string const
Definition: compareJSON.py:14
x
Definition: VDTMath.h:216