JHUGen MELA  JHUGen v7.5.6, MELA v2.4.2
Matrix element calculations as used in JHUGen.
MELANCSpline_1D_fast.h
Go to the documentation of this file.
1 #ifndef MELANCSPLINE_1D_FAST
2 #define MELANCSPLINE_1D_FAST
3 
4 #include <vector>
5 #include "RooAbsPdf.h"
6 #include "RooRealProxy.h"
7 #include "RooRealVar.h"
8 #include "RooAbsReal.h"
9 #include "MELANCSplineCore.h"
10 
11 
13 protected:
16 
17  std::vector<T> FcnList; // List of function values
18 
19  std::vector<T> kappaX;
20  std::vector<std::vector<T>> coefficients;
21 
22 public:
25  const char* name,
26  const char* title
27  );
29  const char* name,
30  const char* title,
31  RooAbsReal& inXVar,
32  const std::vector<T>& inXList,
33  const std::vector<T>& inFcnList,
36  Bool_t inUseFloor=true,
37  T inFloorEval=0,
38  T inFloorInt=0
39  );
40  MELANCSpline_1D_fast(const MELANCSpline_1D_fast& other, const char* name=0);
41  virtual TObject* clone(const char* newname)const { return new MELANCSpline_1D_fast(*this, newname); }
42  inline virtual ~MELANCSpline_1D_fast(){}
43 
44  void setRangeValidity(const T valmin, const T valmax, const Int_t whichDirection=0);
45 
46  virtual Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0)const;
47  virtual Double_t analyticalIntegral(Int_t code, const char* rangeName=0)const;
48 
49 protected:
50  virtual void emptyFcnList(){ std::vector<T> tmp; FcnList.swap(tmp); }
51 
52  virtual Int_t getWhichBin(const T& val, const Int_t whichDirection)const;
53  virtual T getTVar(const std::vector<T>& kappas, const T& val, const Int_t& bin, const Int_t whichDirection)const;
54  virtual void getKappas(std::vector<T>& kappas, const Int_t whichDirection);
55 
56  Bool_t testRangeValidity(const T& val, const Int_t whichDirection=0)const;
57  void cropValueForRange(T& val, const Int_t whichDirection=0)const;
58 
59  virtual T interpolateFcn(Int_t code, const char* rangeName=0)const;
60 
61  virtual Double_t evaluate()const;
62 
63 
64  ClassDef(MELANCSpline_1D_fast, 2)
65 
66 };
67 
68 #endif
MELANCSpline_1D_fast::interpolateFcn
virtual T interpolateFcn(Int_t code, const char *rangeName=0) const
Definition: MELANCSpline_1D_fast.cc:80
MELANCSpline_1D_fast::getAnalyticalIntegral
virtual Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Definition: MELANCSpline_1D_fast.cc:189
MELANCSplineCore::T
Float_t T
Definition: MELANCSplineCore.h:18
MELANCSpline_1D_fast::clone
virtual TObject * clone(const char *newname) const
Definition: MELANCSpline_1D_fast.h:41
MELANCSpline_1D_fast::getTVar
virtual T getTVar(const std::vector< T > &kappas, const T &val, const Int_t &bin, const Int_t whichDirection) const
Definition: MELANCSpline_1D_fast.cc:165
MELANCSpline_1D_fast::MELANCSpline_1D_fast
MELANCSpline_1D_fast()
MELANCSpline_1D_fast::FcnList
std::vector< T > FcnList
Definition: MELANCSpline_1D_fast.h:17
MELANCSplineCore::BoundaryCondition
BoundaryCondition
Definition: MELANCSplineCore.h:28
MELANCSpline_1D_fast::emptyFcnList
virtual void emptyFcnList()
Definition: MELANCSpline_1D_fast.h:50
MELANCSpline_1D_fast::bcEndX
const BoundaryCondition bcEndX
Definition: MELANCSpline_1D_fast.h:15
MELANCSpline_1D_fast
Definition: MELANCSpline_1D_fast.h:12
MELANCSpline_1D_fast::getWhichBin
virtual Int_t getWhichBin(const T &val, const Int_t whichDirection) const
Definition: MELANCSpline_1D_fast.cc:143
MELANCSpline_1D_fast::getKappas
virtual void getKappas(std::vector< T > &kappas, const Int_t whichDirection)
Definition: MELANCSpline_1D_fast.cc:124
MELANCSpline_1D_fast::cropValueForRange
void cropValueForRange(T &val, const Int_t whichDirection=0) const
Definition: MELANCSpline_1D_fast.cc:220
MELANCSpline_1D_fast::testRangeValidity
Bool_t testRangeValidity(const T &val, const Int_t whichDirection=0) const
Definition: MELANCSpline_1D_fast.cc:207
MELANCSplineCore
Definition: MELANCSplineCore.h:16
MELANCSpline_1D_fast::bcBeginX
const BoundaryCondition bcBeginX
Definition: MELANCSpline_1D_fast.h:14
MELANCSpline_1D_fast::~MELANCSpline_1D_fast
virtual ~MELANCSpline_1D_fast()
Definition: MELANCSpline_1D_fast.h:42
MELANCSpline_1D_fast::analyticalIntegral
virtual Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Definition: MELANCSpline_1D_fast.cc:197
MELANCSpline_1D_fast::evaluate
virtual Double_t evaluate() const
Definition: MELANCSpline_1D_fast.cc:170
MELANCSpline_1D_fast::kappaX
std::vector< T > kappaX
Definition: MELANCSpline_1D_fast.h:19
MELANCSplineCore.h
MELANCSplineCore::bcNaturalSpline
@ bcNaturalSpline
Definition: MELANCSplineCore.h:32
MELANCSpline_1D_fast::coefficients
std::vector< std::vector< T > > coefficients
Definition: MELANCSpline_1D_fast.h:20
MELANCSpline_1D_fast::setRangeValidity
void setRangeValidity(const T valmin, const T valmax, const Int_t whichDirection=0)
Definition: MELANCSpline_1D_fast.cc:213