RooThreshold Class Reference

#include <RooThreshold.hh>

List of all members.

Public Member Functions

 RooThreshold (const char *name, const char *title, RooAbsReal &_x, RooAbsReal &_m0, RooAbsReal &_power, const RooArgList &_coeffs)
 RooThreshold (const RooThreshold &other, const char *name=0)
virtual TObject * clone (const char *newname) const
virtual ~RooThreshold ()

Protected Member Functions

Double_t evaluate () const

Protected Attributes

RooRealProxy x
RooRealProxy m0
RooRealProxy power
RooListProxy coeffs


Detailed Description

Definition at line 20 of file RooThreshold.hh.


Constructor & Destructor Documentation

RooThreshold::RooThreshold ( const char *  name,
const char *  title,
RooAbsReal &  _x,
RooAbsReal &  _m0,
RooAbsReal &  _power,
const RooArgList &  _coeffs 
)

Referenced by clone().

RooThreshold::RooThreshold ( const RooThreshold other,
const char *  name = 0 
)

Definition at line 60 of file RooThreshold.cc.

00061                                        : 
00062   RooAbsPdf(other,name), 
00063   x("x",this,other.x), 
00064   m0("m0",this,other.m0),
00065   power("power",this,other.power),
00066   coeffs("coeffs",this, other.coeffs)
00067 {
00068 }

virtual RooThreshold::~RooThreshold (  )  [inline, virtual]

Definition at line 32 of file RooThreshold.hh.

00032 { }


Member Function Documentation

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

Definition at line 29 of file RooThreshold.hh.

References RooThreshold().

00029                                                     { 
00030     return new RooThreshold(*this,newname); 
00031   }

Double_t RooThreshold::evaluate (  )  const [protected]

Definition at line 71 of file RooThreshold.cc.

References coeffs, m0, power, and x.

00072 {
00073   // calculate Threshold
00074 
00075   if (x<m0) {return(0);} // below threshold
00076   Double_t result(0);
00077 
00078   // loop over coefficient
00079   TIterator* iter = coeffs.createIterator() ;
00080   RooRealVar* coef(0) ;
00081   Int_t n(0);
00082   while ((coef = (RooRealVar*) iter->Next())) {
00083     n++;
00084     result += coef->getVal() * TMath::Power(x,n);
00085   }
00086   delete iter ;
00087 
00088   result = TMath::Exp(result) * TMath::Power(x-m0,power);
00089 
00090   //  cout << result << " " << x << " " << power << " " << m0 << endl;
00091   return(result);
00092 }


Member Data Documentation

RooListProxy RooThreshold::coeffs [protected]

Definition at line 39 of file RooThreshold.hh.

Referenced by evaluate().

RooRealProxy RooThreshold::m0 [protected]

Definition at line 37 of file RooThreshold.hh.

Referenced by evaluate().

RooRealProxy RooThreshold::power [protected]

Definition at line 38 of file RooThreshold.hh.

Referenced by evaluate().

RooRealProxy RooThreshold::x [protected]

Definition at line 36 of file RooThreshold.hh.

Referenced by evaluate().


The documentation for this class was generated from the following files:
Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7