Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooParametricStepFunction.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: RooFitModels                                                     *
0004  *    File: $Id: RooParametricStepFunction.h,v 1.5 2007/05/11 09:13:07 verkerke Exp $
0005  * Authors:                                                                  *
0006  *    Aaron Roodman, Stanford Linear Accelerator Center, Stanford University *
0007  *                                                                           *
0008  * Copyright (c) 2000-2005, Stanford University. All rights reserved.        *
0009  *
0010  *                                                                           *
0011  * Redistribution and use in source and binary forms,                        *
0012  * with or without modification, are permitted according to the terms        *
0013  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0014  *****************************************************************************/
0015 #ifndef ROO_PARAMETRIC_STEP_FUNCTION
0016 #define ROO_PARAMETRIC_STEP_FUNCTION
0017 
0018 #include <RooRealProxy.h>
0019 #include <RooListProxy.h>
0020 #include <RooAbsPdf.h>
0021 
0022 #include <TArrayD.h>
0023 
0024 class RooArgList ;
0025 
0026 class RooParametricStepFunction : public RooAbsPdf {
0027 public:
0028 
0029    RooParametricStepFunction() {}
0030 
0031   RooParametricStepFunction(const char *name, const char *title,
0032       RooAbsReal& x, const RooArgList& coefList, TArrayD const& limits, Int_t nBins=1) ;
0033 
0034   RooParametricStepFunction(const RooParametricStepFunction& other, const char* name = nullptr);
0035   TObject* clone(const char* newname) const override { return new RooParametricStepFunction(*this, newname); }
0036 
0037   Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override ;
0038   double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override ;
0039   Int_t getnBins() const { return _nBins; }
0040   double* getLimits() { return _limits.GetArray(); }
0041 
0042   std::list<double>* plotSamplingHint(RooAbsRealLValue& obs, double xlo, double xhi) const override ;
0043 
0044 protected:
0045 
0046   double lastBinValue() const ;
0047 
0048   RooRealProxy _x;
0049   RooListProxy _coefList ;
0050   TArrayD _limits;
0051   Int_t _nBins = 0;
0052 
0053   double evaluate() const override;
0054 
0055   ClassDefOverride(RooParametricStepFunction,1) // Parametric Step Function Pdf
0056 };
0057 
0058 #endif