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 15 of file RooCBExGaussShape.h.

Constructor & Destructor Documentation

RooCBExGaussShape::RooCBExGaussShape ( )
inline

Definition at line 17 of file RooCBExGaussShape.h.

References hgcalDigitizer_cfi::_m, dataset::name, trackingPlots::other, and fftjetcommon_cfi::title.

Referenced by clone().

17 {} ;
RooCBExGaussShape::RooCBExGaussShape ( const char *  name,
const char *  title,
RooAbsReal &  _m,
RooAbsReal &  _m0,
RooAbsReal &  _sigma,
RooAbsReal &  _alpha,
RooAbsReal &  _n,
RooAbsReal &  _sigma_2,
RooAbsReal &  _frac 
)
RooCBExGaussShape::RooCBExGaussShape ( const RooCBExGaussShape other,
const char *  name 
)

Definition at line 24 of file RooCBExGaussShape.cc.

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

Definition at line 30 of file RooCBExGaussShape.h.

References evaluate().

30 {}

Member Function Documentation

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

Definition at line 29 of file RooCBExGaussShape.h.

References RooCBExGaussShape().

29 { return new RooCBExGaussShape(*this,newname);}
Double_t RooCBExGaussShape::evaluate ( ) const
override

Definition at line 36 of file RooCBExGaussShape.cc.

References a, alpha, b, JetChargeProducer_cfi::exp, frac, funct::m, m0, n, sigma, sigma_2, lumiQTWidget::t, and cscNeutronWriter_cfi::t0.

Referenced by ~RooCBExGaussShape().

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

Member Data Documentation

RooRealProxy RooCBExGaussShape::alpha

Definition at line 40 of file RooCBExGaussShape.h.

Referenced by evaluate().

RooRealProxy RooCBExGaussShape::frac

Definition at line 43 of file RooCBExGaussShape.h.

Referenced by evaluate().

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

Definition at line 33 of file RooCBExGaussShape.h.

Referenced by evaluate().

RooRealProxy RooCBExGaussShape::n

Definition at line 41 of file RooCBExGaussShape.h.

Referenced by evaluate().

RooRealProxy RooCBExGaussShape::sigma

Definition at line 39 of file RooCBExGaussShape.h.

Referenced by evaluate().

RooRealProxy RooCBExGaussShape::sigma_2

Definition at line 42 of file RooCBExGaussShape.h.

Referenced by evaluate().