CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
RooCBExGaussShape Class Reference

#include <RooCBExGaussShape.h>

Inheritance diagram for RooCBExGaussShape:

Public Member Functions

TObject * clone (const char *newname) const override
 
Double_t evaluate () const override
 
 RooCBExGaussShape ()
 
 RooCBExGaussShape (const char *name, const char *title, RooAbsReal &_m, RooAbsReal &_m0, RooAbsReal &_sigma, RooAbsReal &_alpha, RooAbsReal &_n, RooAbsReal &_sigma_2, RooAbsReal &_frac)
 
 RooCBExGaussShape (const RooCBExGaussShape &other, const char *name)
 
 ~RooCBExGaussShape () override
 

Public Attributes

RooRealProxy alpha
 
RooRealProxy frac
 
ClassDefOverride(RooCBExGaussShape, 1) protected RooRealProxy m0
 
RooRealProxy n
 
RooRealProxy sigma
 
RooRealProxy sigma_2
 

Detailed Description

Definition at line 14 of file RooCBExGaussShape.h.

Constructor & Destructor Documentation

◆ RooCBExGaussShape() [1/3]

RooCBExGaussShape::RooCBExGaussShape ( )
inline

Definition at line 16 of file RooCBExGaussShape.h.

Referenced by clone().

16 {};

◆ RooCBExGaussShape() [2/3]

RooCBExGaussShape::RooCBExGaussShape ( const char *  name,
const char *  title,
RooAbsReal &  _m,
RooAbsReal &  _m0,
RooAbsReal &  _sigma,
RooAbsReal &  _alpha,
RooAbsReal &  _n,
RooAbsReal &  _sigma_2,
RooAbsReal &  _frac 
)

Definition at line 5 of file RooCBExGaussShape.cc.

14  : RooAbsPdf(name, title),
15  m("m", "m", this, _m),
16  m0(" m0", " m0", this, _m0),
17  sigma(" sigma", " sigma", this, _sigma),
18  alpha(" alpha", " alpha", this, _alpha),
19  n(" n", " n", this, _n),
20  sigma_2(" sigma_2", " sigma_2", this, _sigma_2),
21  frac(" frac", " frac", this, _frac) {}
RooRealProxy sigma_2
ClassDefOverride(RooCBExGaussShape, 1) protected RooRealProxy m0

◆ RooCBExGaussShape() [3/3]

RooCBExGaussShape::RooCBExGaussShape ( const RooCBExGaussShape other,
const char *  name 
)

Definition at line 23 of file RooCBExGaussShape.cc.

24  : RooAbsPdf(other, name),
25  m("m", this, other.m),
26  m0(" m0", this, other.m0),
27  sigma(" sigma", this, other.sigma),
28  alpha(" alpha", this, other.alpha),
29  n(" n", this, other.n),
30  sigma_2(" sigma_2", this, other.sigma_2),
31  frac(" frac", this, other.frac) {}
RooRealProxy sigma_2
ClassDefOverride(RooCBExGaussShape, 1) protected RooRealProxy m0

◆ ~RooCBExGaussShape()

RooCBExGaussShape::~RooCBExGaussShape ( )
inlineoverride

Definition at line 29 of file RooCBExGaussShape.h.

29 {}

Member Function Documentation

◆ clone()

TObject* RooCBExGaussShape::clone ( const char *  newname) const
inlineoverride

Definition at line 28 of file RooCBExGaussShape.h.

References RooCBExGaussShape().

28 { return new RooCBExGaussShape(*this, newname); }

◆ evaluate()

Double_t RooCBExGaussShape::evaluate ( ) const
override

Definition at line 33 of file RooCBExGaussShape.cc.

References a, alpha, b, JetChargeProducer_cfi::exp, frac, visualization-live-secondInstance_cfg::m, m0, n, sigma, sigma_2, submitPVValidationJobs::t, and FrontierCondition_GT_autoExpress_cfi::t0.

33  {
34  Double_t rval = 0;
35 
36  Double_t t = (m - m0) / sigma;
37  Double_t t0 = (m - m0) / sigma_2;
38  if (alpha < 0) {
39  t = -t;
40  t0 = -t0;
41  }
42 
43  Double_t absAlpha = fabs((Double_t)alpha);
44 
45  if (t >= -absAlpha) {
46  rval = frac * exp(-0.5 * t * t) + (1.0 - frac) * exp(-0.5 * t0 * t0);
47  } else {
48  Double_t a = TMath::Power(n / absAlpha, n) * exp(-0.5 * absAlpha * absAlpha);
49  Double_t b = n / absAlpha - absAlpha;
50  rval = a / TMath::Power(b - t, n);
51  }
52 
53  //std::cout<<"RooCBExGaussShape: m, evaluate= "<<m<<", "<<rval<<std::endl;
54  return rval;
55 }
RooRealProxy sigma_2
ClassDefOverride(RooCBExGaussShape, 1) protected RooRealProxy m0
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119

Member Data Documentation

◆ alpha

RooRealProxy RooCBExGaussShape::alpha

Definition at line 39 of file RooCBExGaussShape.h.

Referenced by evaluate().

◆ frac

RooRealProxy RooCBExGaussShape::frac

Definition at line 42 of file RooCBExGaussShape.h.

Referenced by evaluate().

◆ m0

ClassDefOverride (RooCBExGaussShape, 1) protected RooRealProxy RooCBExGaussShape::m0

Definition at line 32 of file RooCBExGaussShape.h.

Referenced by evaluate().

◆ n

RooRealProxy RooCBExGaussShape::n

Definition at line 40 of file RooCBExGaussShape.h.

Referenced by evaluate().

◆ sigma

RooRealProxy RooCBExGaussShape::sigma

Definition at line 38 of file RooCBExGaussShape.h.

Referenced by evaluate().

◆ sigma_2

RooRealProxy RooCBExGaussShape::sigma_2

Definition at line 41 of file RooCBExGaussShape.h.

Referenced by evaluate().