CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes

RooPower Class Reference

#include <HGGRooPdfs.h>

List of all members.

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

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

Definition at line 47 of file HGGRooPdfs.cc.

                                                          :
  RooAbsPdf(other, name), x("x",this,other.x), c("c",this,other.c)
{
}
virtual RooPower::~RooPower ( ) [inline, virtual]

Definition at line 32 of file HGGRooPdfs.h.

{ }

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.

{
  switch(code) {
  case 1: 
    {
      Double_t ret(0) ;
      if(c == 0.0) {
        ret = (x.max(rangeName) - x.min(rangeName));
      } else if (c== -1.0) {
        ret =  ( log( x.max(rangeName)) - log( x.min(rangeName)) );

      } else {
//      ret =  ( exp( c*x.max(rangeName) ) - exp( c*x.min(rangeName) ) )/c;
        ret =  ( pow( x.max(rangeName),  c+1 ) - pow( x.min(rangeName),c+1 ) )/(c+1);
      }

      //cout << "Int_exp_dx(c=" << c << ", xmin=" << x.min(rangeName) << ", xmax=" << x.max(rangeName) << ")=" << ret << endl ;
      return ret ;
    }
  }
  
  assert(0) ;
  return 0 ;
}
virtual TObject* RooPower::clone ( const char *  newname) const [inline, virtual]

Definition at line 31 of file HGGRooPdfs.h.

References RooPower().

{ return new RooPower(*this,newname); }
Double_t RooPower::evaluate ( ) const [protected]

Definition at line 54 of file HGGRooPdfs.cc.

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

                                 {
  //cout << "pow(x=" << x << ",c=" << c << ")=" << pow(x,c) << endl ;
  return pow(x,c);
}
Int_t RooPower::getAnalyticalIntegral ( RooArgSet &  allVars,
RooArgSet &  analVars,
const char *  rangeName = 0 
) const

Definition at line 61 of file HGGRooPdfs.cc.

References x.

{
  if (matchArgs(allVars,analVars,x)) return 1 ;
  return 0 ;
}

Member Data Documentation

RooRealProxy RooPower::c [protected]

Definition at line 39 of file HGGRooPdfs.h.

Referenced by analyticalIntegral(), and evaluate().

RooRealProxy RooPower::x [protected]

Definition at line 38 of file HGGRooPdfs.h.

Referenced by analyticalIntegral(), evaluate(), and getAnalyticalIntegral().