Logo ROOT  
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:
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 
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 
RooAbsFunc::getMinLimit
virtual Double_t getMinLimit(UInt_t dimension) const =0
RooAbsFunc::getMaxLimit
virtual Double_t getMaxLimit(UInt_t dimension) const =0
RooInvTransform::getMinLimit
virtual Double_t getMinLimit(UInt_t index) const
Definition: RooInvTransform.h:44
RooAbsFunc.h
RooInvTransform::operator()
virtual Double_t operator()(const Double_t xvector[]) const
Definition: RooInvTransform.h:40
RooAbsFunc
Definition: RooAbsFunc.h:23
RooInvTransform
Definition: RooInvTransform.h:21
RooInvTransform::RooInvTransform
RooInvTransform(const RooAbsFunc &func)
Constructor.
Definition: RooInvTransform.cxx:45
RooInvTransform::getMaxLimit
virtual Double_t getMaxLimit(UInt_t index) const
Definition: RooInvTransform.h:45
RooInvTransform::_func
const RooAbsFunc * _func
Definition: RooInvTransform.h:48
unsigned int
RooInvTransform::~RooInvTransform
virtual ~RooInvTransform()
Definition: RooInvTransform.h:38
Double_t
double Double_t
Definition: RtypesCore.h:59
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325