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 inline ~RooCrystalBall() override {}
29
30 Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName = nullptr) const override;
31 double analyticalIntegral(Int_t code, const char *rangeName = nullptr) const override;
32
33 // Optimized accept/reject generator support
34 Int_t getMaxVal(const RooArgSet &vars) const override;
35 double maxVal(Int_t code) const override;
36
37protected:
38 double evaluate() const override;
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
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
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:62
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_
~RooCrystalBall() override
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.
RooRealVar represents a variable that can be changed from the outside.
Definition RooRealVar.h:40
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