#include <RooThreshold.hh>
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 |
Definition at line 20 of file RooThreshold.hh.
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 | |||
) |
virtual RooThreshold::~RooThreshold | ( | ) | [inline, virtual] |
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 }
RooListProxy RooThreshold::coeffs [protected] |
RooRealProxy RooThreshold::m0 [protected] |
RooRealProxy RooThreshold::power [protected] |
RooRealProxy RooThreshold::x [protected] |