RooLinearVar.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooLinearVar.h,v 1.19 2007/05/11 09:11:30 verkerke Exp $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_LINEAR_VAR
00017 #define ROO_LINEAR_VAR
00018 
00019 #include "Riosfwd.h"
00020 #include <math.h>
00021 #include <float.h>
00022 #include "TString.h"
00023 #include "RooAbsRealLValue.h"
00024 #include "RooRealProxy.h"
00025 #include "RooFormula.h"
00026 #include "RooLinTransBinning.h"
00027 
00028 class RooArgSet ;
00029 
00030 class RooLinearVar : public RooAbsRealLValue {
00031 public:
00032   // Constructors, assignment etc.
00033   RooLinearVar(const char *name, const char *title, RooAbsRealLValue& variable, const RooAbsReal& slope, const RooAbsReal& offset, const char *unit= "") ;
00034   RooLinearVar(const RooLinearVar& other, const char* name=0);
00035   virtual TObject* clone(const char* newname) const { return new RooLinearVar(*this,newname); }
00036   virtual ~RooLinearVar() ;
00037   
00038   // Parameter value and error accessors
00039   virtual void setVal(Double_t value) ;
00040 
00041   // Jacobian and limits
00042   virtual Bool_t hasBinning(const char* name) const ;
00043   virtual const RooAbsBinning& getBinning(const char* name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const ;
00044   virtual RooAbsBinning& getBinning(const char* name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE)  ;
00045 
00046   virtual Double_t jacobian() const ;
00047   virtual Bool_t isJacobianOK(const RooArgSet& depList) const ;
00048 
00049   // I/O streaming interface (machine readable)
00050   virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose=kFALSE) ;
00051   virtual void writeToStream(ostream& os, Bool_t compact) const ;
00052 
00053   // Printing interface (human readable)
00054 
00055   using RooAbsRealLValue::operator= ;
00056   using RooAbsRealLValue::setVal ;
00057 
00058 protected:
00059 
00060   virtual Double_t evaluate() const ;
00061 
00062   mutable RooLinTransBinning _binning ;
00063   RooLinkedList _altBinning ; //!
00064   RooRealProxy _var ;         // Input observable
00065   RooRealProxy _slope ;       // Slope of transformation
00066   RooRealProxy _offset ;      // Offset of transformation
00067 
00068   ClassDef(RooLinearVar,1) // Lvalue linear transformation function 
00069 };
00070 
00071 #endif

Generated on Tue Jul 5 14:26:13 2011 for ROOT_528-00b_version by  doxygen 1.5.1