CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
RooDoubleCB Class Reference

#include <HZZ2L2QRooPdfs.h>

Inheritance diagram for RooDoubleCB:

Public Member Functions

virtual TObject * clone (const char *newname) const
 
 RooDoubleCB ()
 
 RooDoubleCB (const char *name, const char *title, RooAbsReal &_x, RooAbsReal &_mean, RooAbsReal &_width, RooAbsReal &_alpha1, RooAbsReal &_n1, RooAbsReal &_alpha2, RooAbsReal &_n2)
 
 RooDoubleCB (const RooDoubleCB &other, const char *name=0)
 
virtual ~RooDoubleCB ()
 

Protected Member Functions

Double_t evaluate () const
 

Protected Attributes

RooRealProxy alpha1
 
RooRealProxy alpha2
 
RooRealProxy mean
 
RooRealProxy n1
 
RooRealProxy n2
 
RooRealProxy width
 
RooRealProxy x
 

Detailed Description

Definition at line 40 of file HZZ2L2QRooPdfs.h.

Constructor & Destructor Documentation

RooDoubleCB::RooDoubleCB ( )

Definition at line 69 of file HZZ2L2QRooPdfs.cc.

Referenced by clone().

69 {}
RooDoubleCB::RooDoubleCB ( const char *  name,
const char *  title,
RooAbsReal &  _x,
RooAbsReal &  _mean,
RooAbsReal &  _width,
RooAbsReal &  _alpha1,
RooAbsReal &  _n1,
RooAbsReal &  _alpha2,
RooAbsReal &  _n2 
)

Definition at line 71 of file HZZ2L2QRooPdfs.cc.

79  :
80  RooAbsPdf(name,title),
81  x("x","x",this,_x),
82  mean("mean","mean",this,_mean),
83  width("width","width",this,_width),
84  alpha1("alpha1","alpha1",this,_alpha1),
85  n1("n1","n1",this,_n1),
86  alpha2("alpha2","alpha2",this,_alpha2),
87  n2("n2","n2",this,_n2)
88  {
89  }
RooRealProxy alpha2
RooRealProxy alpha1
RooRealProxy x
RooRealProxy n1
RooRealProxy mean
RooRealProxy width
RooRealProxy n2
RooDoubleCB::RooDoubleCB ( const RooDoubleCB other,
const char *  name = 0 
)

Definition at line 92 of file HZZ2L2QRooPdfs.cc.

92  :
93  RooAbsPdf(other,name),
94  x("x",this,other.x),
95  mean("mean",this,other.mean),
96  width("width",this,other.width),
97  alpha1("alpha1",this,other.alpha1),
98  n1("n1",this,other.n1),
99  alpha2("alpha2",this,other.alpha2),
100  n2("n2",this,other.n2)
101 
102  {
103  }
RooRealProxy alpha2
RooRealProxy alpha1
RooRealProxy x
RooRealProxy n1
RooRealProxy mean
RooRealProxy width
RooRealProxy n2
virtual RooDoubleCB::~RooDoubleCB ( )
inlinevirtual

Definition at line 54 of file HZZ2L2QRooPdfs.h.

54 { }

Member Function Documentation

virtual TObject* RooDoubleCB::clone ( const char *  newname) const
inlinevirtual

Definition at line 53 of file HZZ2L2QRooPdfs.h.

References RooDoubleCB().

53 { return new RooDoubleCB(*this,newname); }
double RooDoubleCB::evaluate ( ) const
protected

Definition at line 105 of file HZZ2L2QRooPdfs.cc.

References alpha1, alpha2, gather_cfg::cout, create_public_lumi_plots::exp, mean, n1, n2, funct::pow(), width, and x.

106  {
107  double A1 = pow(n1/fabs(alpha1),n1)*exp(-alpha1*alpha1/2);
108  double A2 = pow(n2/fabs(alpha2),n2)*exp(-alpha2*alpha2/2);
109  double B1 = n1/fabs(alpha1)-fabs(alpha1);
110  double B2 = n2/fabs(alpha2)-fabs(alpha2);
111 
112  if((x-mean)/width>-alpha1 && (x-mean)/width<alpha2){
113  return exp(-(x-mean)*(x-mean)/(2*width*width));
114  }else if((x-mean)/width<-alpha1){
115  return A1*pow(B1-(x-mean)/width,-n1);
116  }else if((x-mean)/width>alpha2){
117  return A2*pow(B2+(x-mean)/width,-n2);
118  }else{
119  cout << "ERROR evaluating range..." << endl;
120  return 99;
121  }
122 
123  }
RooRealProxy alpha2
RooRealProxy alpha1
RooRealProxy x
RooRealProxy n1
RooRealProxy mean
tuple cout
Definition: gather_cfg.py:121
RooRealProxy width
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
RooRealProxy n2

Member Data Documentation

RooRealProxy RooDoubleCB::alpha1
protected

Definition at line 61 of file HZZ2L2QRooPdfs.h.

Referenced by evaluate().

RooRealProxy RooDoubleCB::alpha2
protected

Definition at line 63 of file HZZ2L2QRooPdfs.h.

Referenced by evaluate().

RooRealProxy RooDoubleCB::mean
protected

Definition at line 59 of file HZZ2L2QRooPdfs.h.

Referenced by evaluate().

RooRealProxy RooDoubleCB::n1
protected

Definition at line 62 of file HZZ2L2QRooPdfs.h.

Referenced by evaluate().

RooRealProxy RooDoubleCB::n2
protected

Definition at line 64 of file HZZ2L2QRooPdfs.h.

Referenced by evaluate().

RooRealProxy RooDoubleCB::width
protected
RooRealProxy RooDoubleCB::x
protected