Logo ROOT  
Reference Guide
Go to the documentation of this file.
2 * Project: RooFit *
3 * Package: RooFitModels *
4 * File: $Id$
5 * Authors: *
6 * GR, Gerhard Raven, Nikhef & VU, Gerhard.Raven@nikhef.nl
7 * *
8 * Copyright (c) 2010, Nikhef & VU. All rights reserved.
9 * *
10 * Redistribution and use in source and binary forms, *
11 * with or without modification, are permitted according to the terms *
12 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
13 *****************************************************************************/
14#ifndef ROO_LEGENDRE
15#define ROO_LEGENDRE
17#include "RooAbsReal.h"
18#include "RooRealProxy.h"
20class RooLegendre : public RooAbsReal {
22 RooLegendre() ;
23 // an (associated) Legendre polynomial, P_l^m(x)
24 // note: P_l(x) == P_l^0(x)
25 RooLegendre(const char *name, const char *title, RooAbsReal& ctheta, int l, int m=0);
26 // product of two associated Legendre polynomials, P_l1^m1(ctheta) * P_l2^m2(ctheta)
27 RooLegendre(const char *name, const char *title, RooAbsReal& ctheta, int l1, int m1, int l2, int m2);
29 RooLegendre(const RooLegendre& other, const char *name = nullptr);
30 TObject* clone(const char* newname) const override { return new RooLegendre(*this, newname); }
31 inline ~RooLegendre() override { }
33 Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override ;
34 double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override ;
36 Int_t getMaxVal( const RooArgSet& vars) const override;
37 double maxVal( Int_t code) const override;
39protected: // allow RooSpHarmonic access...
41 int _l1,_m1;
42 int _l2,_m2;
44 double evaluate() const override;
45 RooSpan<double> evaluateSpan(RooBatchCompute::RunContext& evalData, const RooArgSet* normSet) const override;
47 ClassDefOverride(RooLegendre,1) // Legendre polynomial
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
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:60
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:56
Compute the associated Legendre polynomials using ROOT::Math::assoc_legendre().
Definition: RooLegendre.h:20
double evaluate() const override
Note: P_0^0 = 1, so P_l^m = P_l^m P_0^0.
Int_t getMaxVal(const RooArgSet &vars) const override
Advertise capability to determine maximum value of function for given set of observables.
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
this was verified to match mathematica for l1 in [0,2], m1 in [0,l1], l2 in [l1,4],...
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
RooSpan< double > evaluateSpan(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet) const override
Evaluate this object for a batch/span of data points.
~RooLegendre() override
Definition: RooLegendre.h:31
RooRealProxy _ctheta
Definition: RooLegendre.h:40
TObject * clone(const char *newname) const override
Definition: RooLegendre.h:30
double maxVal(Int_t code) const override
Return maximum value for set of observables identified by code assigned in getMaxVal.
A simple container to hold a batch of data values.
Definition: RooSpan.h:34
Mother of all ROOT objects.
Definition: TObject.h:41
static constexpr double m2
This struct enables passing computation data around between elements of a computation graph.
Definition: RunContext.h:32
TMarker m
Definition: textangle.C:8
TLine l
Definition: textangle.C:4