CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes

RooDoubleCB Class Reference

#include <HZZ2L2QRooPdfs.h>

List of all members.

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 ( )

Referenced by clone().

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.

                      :
   RooAbsPdf(name,title), 
   x("x","x",this,_x),
   mean("mean","mean",this,_mean),
   width("width","width",this,_width),
   alpha1("alpha1","alpha1",this,_alpha1),
   n1("n1","n1",this,_n1),
   alpha2("alpha2","alpha2",this,_alpha2),
   n2("n2","n2",this,_n2)
 { 
 } 
RooDoubleCB::RooDoubleCB ( const RooDoubleCB other,
const char *  name = 0 
)

Definition at line 92 of file HZZ2L2QRooPdfs.cc.

                                                                    :  
   RooAbsPdf(other,name), 
   x("x",this,other.x),
   mean("mean",this,other.mean),
   width("width",this,other.width),
   alpha1("alpha1",this,other.alpha1),
   n1("n1",this,other.n1),
   alpha2("alpha2",this,other.alpha2),
   n2("n2",this,other.n2)

 { 
 } 
virtual RooDoubleCB::~RooDoubleCB ( ) [inline, virtual]

Definition at line 54 of file HZZ2L2QRooPdfs.h.

{ }

Member Function Documentation

virtual TObject* RooDoubleCB::clone ( const char *  newname) const [inline, virtual]

Definition at line 53 of file HZZ2L2QRooPdfs.h.

References RooDoubleCB().

{ 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.

 { 
   double A1 = pow(n1/fabs(alpha1),n1)*exp(-alpha1*alpha1/2);
   double A2 = pow(n2/fabs(alpha2),n2)*exp(-alpha2*alpha2/2);
   double B1 = n1/fabs(alpha1)-fabs(alpha1);
   double B2 = n2/fabs(alpha2)-fabs(alpha2);

   if((x-mean)/width>-alpha1 && (x-mean)/width<alpha2){
     return exp(-(x-mean)*(x-mean)/(2*width*width));
   }else if((x-mean)/width<-alpha1){
     return A1*pow(B1-(x-mean)/width,-n1);
   }else if((x-mean)/width>alpha2){
     return A2*pow(B2+(x-mean)/width,-n2);
   }else{
     cout << "ERROR evaluating range..." << endl;
     return 99;
   }
   
 } 

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]

Definition at line 60 of file HZZ2L2QRooPdfs.h.

Referenced by evaluate().

RooRealProxy RooDoubleCB::x [protected]

Definition at line 58 of file HZZ2L2QRooPdfs.h.

Referenced by evaluate().