Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooCrystalBall.h
Go to the documentation of this file.
1// Author: Jonas Rembser, CERN 02/2021
2
3#ifndef RooFit_RooFit_RooCrystalBall_h
4#define RooFit_RooFit_RooCrystalBall_h
5
6#include "RooAbsPdf.h"
7#include "RooRealProxy.h"
8
9#include <memory>
10
11class RooRealVar;
12
13class RooCrystalBall final : public RooAbsPdf {
14public:
15
17
18 RooCrystalBall(const char *name, const char *title, RooAbsReal &x, RooAbsReal &x0, RooAbsReal &sigmaL,
19 RooAbsReal &sigmaR, RooAbsReal &alphaL, RooAbsReal &nL, RooAbsReal &alphaR, RooAbsReal &nR);
20 RooCrystalBall(const char *name, const char *title, RooAbsReal &x, RooAbsReal &x0, RooAbsReal &sigmaLR,
21 RooAbsReal &alphaL, RooAbsReal &nL, RooAbsReal &alphaR, RooAbsReal &nR);
22 RooCrystalBall(const char *name, const char *title, RooAbsReal &x, RooAbsReal &x0, RooAbsReal &sigmaLR,
23 RooAbsReal &alpha, RooAbsReal &n, bool doubleSided = false);
24
25 RooCrystalBall(const RooCrystalBall &other, const char *name = 0);
26 virtual TObject *clone(const char *newname) const { return new RooCrystalBall(*this, newname); }
27
28 inline virtual ~RooCrystalBall() {}
29
30 virtual Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName = 0) const;
31 virtual Double_t analyticalIntegral(Int_t code, const char *rangeName = 0) const;
32
33 // Optimized accept/reject generator support
34 virtual Int_t getMaxVal(const RooArgSet &vars) const;
35 virtual Double_t maxVal(Int_t code) const;
36
37protected:
38 Double_t evaluate() const;
39
40private:
47
48 // optional parameters
49 std::unique_ptr<RooRealProxy> alphaR_ = nullptr;
50 std::unique_ptr<RooRealProxy> nR_ = nullptr;
51
53};
54
55#endif
double Double_t
Definition RtypesCore.h:59
#define ClassDef(name, id)
Definition Rtypes.h:325
char name[80]
Definition TGX11.cxx:110
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition RooAbsReal.h:64
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:35
PDF implementing the generalized Asymmetrical Double-Sided Crystall Ball line shape.
std::unique_ptr< RooRealProxy > nR_
virtual Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
RooRealProxy sigmaR_
RooRealProxy nL_
virtual ~RooCrystalBall()
RooRealProxy x_
virtual Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
std::unique_ptr< RooRealProxy > alphaR_
RooRealProxy x0_
RooRealProxy alphaL_
virtual TObject * clone(const char *newname) const
RooRealProxy sigmaL_
virtual Int_t getMaxVal(const RooArgSet &vars) const
Advertise that we know the maximum of self for given (m0,alpha,n,sigma).
RooRealVar represents a variable that can be changed from the outside.
Definition RooRealVar.h:39
Mother of all ROOT objects.
Definition TObject.h:41
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16