Logo ROOT   6.08/07
Reference Guide
RooInvTransform.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooInvTransform.h,v 1.6 2007/05/11 09:11:30 verkerke Exp $
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 #ifndef ROO_INV_TRANSFORM
17 #define ROO_INV_TRANSFORM
18 
19 #include "RooAbsFunc.h"
20 
21 class RooInvTransform : public RooAbsFunc {
22 public:
24  inline virtual ~RooInvTransform() { }
25 
26  inline virtual Double_t operator()(const Double_t xvector[]) const {
27  Double_t xinv= 1./xvector[0];
28  return (*_func)(&xinv)*xinv*xinv;
29  }
30  inline virtual Double_t getMinLimit(UInt_t index) const { return 1/_func->getMaxLimit(index); }
31  inline virtual Double_t getMaxLimit(UInt_t index) const { return 1/_func->getMinLimit(index); }
32 
33 protected:
34  const RooAbsFunc *_func; // Input function binding
35 
36  ClassDef(RooInvTransform,0) // Function binding returning inverse of other function binding
37 };
38 
39 #endif
40 
virtual Double_t getMinLimit(UInt_t index) const
RooInvTransform(const RooAbsFunc &func)
Constructor.
const RooAbsFunc * _func
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual Double_t getMaxLimit(UInt_t index) const
Lightweight function binding that returns the inverse of an input function binding Apply the change o...
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual Double_t getMinLimit(UInt_t dimension) const =0
virtual Double_t getMaxLimit(UInt_t dimension) const =0
double Double_t
Definition: RtypesCore.h:55
double func(double *x, double *p)
Definition: stressTF1.cxx:213
virtual ~RooInvTransform()
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:23
virtual Double_t operator()(const Double_t xvector[]) const