Logo ROOT   6.18/05
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
22public:
23 RooInvTransform(const RooAbsFunc &func);
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
33protected:
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
unsigned int UInt_t
Definition: RtypesCore.h:42
double Double_t
Definition: RtypesCore.h:55
#define ClassDef(name, id)
Definition: Rtypes.h:326
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:23
virtual Double_t getMinLimit(UInt_t dimension) const =0
virtual Double_t getMaxLimit(UInt_t dimension) const =0
Lightweight function binding that returns the inverse of an input function binding.
virtual Double_t operator()(const Double_t xvector[]) const
virtual Double_t getMinLimit(UInt_t index) const
virtual Double_t getMaxLimit(UInt_t index) const
RooInvTransform(const RooAbsFunc &func)
Constructor.
const RooAbsFunc * _func
virtual ~RooInvTransform()