Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooLinearVar.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitCore                                                       *
0004  *    File: $Id: RooLinearVar.h,v 1.19 2007/05/11 09:11:30 verkerke Exp $
0005  * Authors:                                                                  *
0006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
0007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
0008  *                                                                           *
0009  * Copyright (c) 2000-2005, Regents of the University of California          *
0010  *                          and Stanford University. All rights reserved.    *
0011  *                                                                           *
0012  * Redistribution and use in source and binary forms,                        *
0013  * with or without modification, are permitted according to the terms        *
0014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0015  *****************************************************************************/
0016 #ifndef ROO_LINEAR_VAR
0017 #define ROO_LINEAR_VAR
0018 
0019 #include <cmath>
0020 #include <cfloat>
0021 #include <string>
0022 #include <list>
0023 #include "RooAbsRealLValue.h"
0024 #include "RooRealProxy.h"
0025 #include "RooLinTransBinning.h"
0026 
0027 class RooArgSet ;
0028 
0029 class RooLinearVar : public RooAbsRealLValue {
0030 public:
0031   // Constructors, assignment etc.
0032   RooLinearVar() {} ;
0033   RooLinearVar(const char *name, const char *title, RooAbsRealLValue& variable, const RooAbsReal& slope, const RooAbsReal& offset, const char *unit= "") ;
0034   RooLinearVar(const RooLinearVar& other, const char* name=nullptr);
0035   TObject* clone(const char* newname) const override { return new RooLinearVar(*this,newname); }
0036   ~RooLinearVar() override ;
0037 
0038   // Parameter value and error accessors
0039   void setVal(double value) override ;
0040 
0041   // Jacobian and limits
0042   bool hasBinning(const char* name) const override ;
0043   const RooAbsBinning& getBinning(const char* name=nullptr, bool verbose=true, bool createOnTheFly=false) const override ;
0044   RooAbsBinning& getBinning(const char* name=nullptr, bool verbose=true, bool createOnTheFly=false) override  ;
0045   std::list<std::string> getBinningNames() const override;
0046 
0047   double jacobian() const override ;
0048   bool isJacobianOK(const RooArgSet& depList) const override ;
0049 
0050   // I/O streaming interface (machine readable)
0051   bool readFromStream(std::istream& is, bool compact, bool verbose=false) override ;
0052   void writeToStream(std::ostream& os, bool compact) const override ;
0053 
0054   // Printing interface (human readable)
0055 
0056   using RooAbsRealLValue::operator= ;
0057   using RooAbsRealLValue::setVal ;
0058 
0059 protected:
0060 
0061   double evaluate() const override ;
0062 
0063   mutable RooLinTransBinning _binning ;
0064   RooLinkedList _altBinning ;              ///<!
0065   RooTemplateProxy<RooAbsRealLValue> _var; ///< Input observable
0066   RooRealProxy _slope ;                    ///< Slope of transformation
0067   RooRealProxy _offset ;                   ///< Offset of transformation
0068 
0069   ClassDefOverride(RooLinearVar,2) // Lvalue linear transformation function
0070 };
0071 
0072 #endif