Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
RooLegendre.h
Go to the documentation of this file.
1 /*****************************************************************************
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
16 
17 #include "RooAbsReal.h"
18 #include "RooRealProxy.h"
19 
20 class RooLegendre : public RooAbsReal {
21 public:
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);
28 
29  RooLegendre(const RooLegendre& other, const char* name = 0);
30  virtual TObject* clone(const char* newname) const { return new RooLegendre(*this, newname); }
31  inline virtual ~RooLegendre() { }
32 
33  virtual Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ;
34  virtual Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
35 
36  virtual Int_t getMaxVal( const RooArgSet& vars) const;
37  virtual Double_t maxVal( Int_t code) const;
38 
39 protected: // allow RooSpHarmonic access...
40  RooRealProxy _ctheta;
41  int _l1,_m1;
42  int _l2,_m2;
43 
44  Double_t evaluate() const;
45  RooSpan<double> evaluateBatch(std::size_t begin, std::size_t batchSize) const;
46 
47  ClassDef(RooLegendre,1) // Legendre polynomial
48 };
49 
50 #endif