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 = nullptr);
26 TObject *clone(const char *newname) const override { return new RooCrystalBall(*this, newname); }
27
28 Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName = nullptr) const override;
29 double analyticalIntegral(Int_t code, const char *rangeName = nullptr) const override;
30
31 // Optimized accept/reject generator support
32 Int_t getMaxVal(const RooArgSet &vars) const override;
33 double maxVal(Int_t code) const override;
34
35protected:
36 double evaluate() const override;
37
38private:
45
46 // optional parameters
47 std::unique_ptr<RooRealProxy> alphaR_ = nullptr;
48 std::unique_ptr<RooRealProxy> nR_ = nullptr;
49
51};
52
53#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:40
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
PDF implementing the generalized Asymmetrical Double-Sided Crystall Ball line shape.
TObject * clone(const char *newname) const override
std::unique_ptr< RooRealProxy > nR_
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
RooRealProxy sigmaR_
RooRealProxy nL_
RooRealProxy x_
std::unique_ptr< RooRealProxy > alphaR_
RooRealProxy x0_
RooRealProxy alphaL_
double maxVal(Int_t code) const override
Return maximum value for set of observables identified by code assigned in getMaxVal.
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
RooRealProxy sigmaL_
Int_t getMaxVal(const RooArgSet &vars) const override
Advertise that we know the maximum of self for given (m0,alpha,n,sigma).
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
Variable that can be changed from the outside.
Definition RooRealVar.h:37
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