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
RooPower Class Reference

#include <HGGRooPdfs.h>

Inheritance diagram for RooPower:

Public Member Functions

Double_t analyticalIntegral (Int_t code, const char *rangeName=0) const
 
virtual TObject * clone (const char *newname) const
 
Int_t getAnalyticalIntegral (RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
 
 RooPower ()
 
 RooPower (const char *name, const char *title, RooAbsReal &_x, RooAbsReal &_c)
 
 RooPower (const RooPower &other, const char *name=0)
 
virtual ~RooPower ()
 

Protected Member Functions

Double_t evaluate () const
 

Protected Attributes

RooRealProxy c
 
RooRealProxy x
 

Detailed Description

Definition at line 25 of file HGGRooPdfs.h.

Constructor & Destructor Documentation

RooPower::RooPower ( )
inline

Definition at line 27 of file HGGRooPdfs.h.

Referenced by clone().

27 {} ;
RooPower::RooPower ( const char *  name,
const char *  title,
RooAbsReal &  _x,
RooAbsReal &  _c 
)

Definition at line 37 of file HGGRooPdfs.cc.

38  :
39  RooAbsPdf(name, title),
40  x("x","Dependent",this,_x),
41  c("c","Power",this,_c)
42 {
43 }
RooRealProxy c
Definition: HGGRooPdfs.h:39
RooRealProxy x
Definition: HGGRooPdfs.h:38
RooPower::RooPower ( const RooPower other,
const char *  name = 0 
)

Definition at line 47 of file HGGRooPdfs.cc.

47  :
48  RooAbsPdf(other, name), x("x",this,other.x), c("c",this,other.c)
49 {
50 }
RooRealProxy c
Definition: HGGRooPdfs.h:39
RooRealProxy x
Definition: HGGRooPdfs.h:38
virtual RooPower::~RooPower ( )
inlinevirtual

Definition at line 32 of file HGGRooPdfs.h.

32 { }

Member Function Documentation

Double_t RooPower::analyticalIntegral ( Int_t  code,
const char *  rangeName = 0 
) const

Definition at line 69 of file HGGRooPdfs.cc.

References c, create_public_lumi_plots::log, funct::pow(), run_regression::ret, and x.

70 {
71  switch(code) {
72  case 1:
73  {
74  Double_t ret(0) ;
75  if(c == 0.0) {
76  ret = (x.max(rangeName) - x.min(rangeName));
77  } else if (c== -1.0) {
78  ret = ( log( x.max(rangeName)) - log( x.min(rangeName)) );
79 
80  } else {
81 // ret = ( exp( c*x.max(rangeName) ) - exp( c*x.min(rangeName) ) )/c;
82  ret = ( pow( x.max(rangeName), c+1 ) - pow( x.min(rangeName),c+1 ) )/(c+1);
83  }
84 
85  //cout << "Int_exp_dx(c=" << c << ", xmin=" << x.min(rangeName) << ", xmax=" << x.max(rangeName) << ")=" << ret << endl ;
86  return ret ;
87  }
88  }
89 
90  assert(0) ;
91  return 0 ;
92 }
RooRealProxy c
Definition: HGGRooPdfs.h:39
RooRealProxy x
Definition: HGGRooPdfs.h:38
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
virtual TObject* RooPower::clone ( const char *  newname) const
inlinevirtual

Definition at line 31 of file HGGRooPdfs.h.

References RooPower().

31 { return new RooPower(*this,newname); }
RooPower()
Definition: HGGRooPdfs.h:27
Double_t RooPower::evaluate ( ) const
protected

Definition at line 54 of file HGGRooPdfs.cc.

References c, funct::pow(), and x.

54  {
55  //cout << "pow(x=" << x << ",c=" << c << ")=" << pow(x,c) << endl ;
56  return pow(x,c);
57 }
RooRealProxy c
Definition: HGGRooPdfs.h:39
RooRealProxy x
Definition: HGGRooPdfs.h:38
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
Int_t RooPower::getAnalyticalIntegral ( RooArgSet &  allVars,
RooArgSet &  analVars,
const char *  rangeName = 0 
) const

Definition at line 61 of file HGGRooPdfs.cc.

References x.

62 {
63  if (matchArgs(allVars,analVars,x)) return 1 ;
64  return 0 ;
65 }
RooRealProxy x
Definition: HGGRooPdfs.h:38

Member Data Documentation

RooRealProxy RooPower::c
protected

Definition at line 39 of file HGGRooPdfs.h.

Referenced by analyticalIntegral(), and evaluate().

RooRealProxy RooPower::x
protected