Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 09:15:11

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitModels                                                     *
0004  *    File: $Id: RooExponential.h,v 1.10 2007/07/12 20:30:49 wouter 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_EXPONENTIAL
0017 #define ROO_EXPONENTIAL
0018 
0019 #include <RooAbsPdf.h>
0020 #include <RooRealProxy.h>
0021 
0022 class RooExponential : public RooAbsPdf {
0023 public:
0024    RooExponential() {}
0025    RooExponential(const char *name, const char *title, RooAbsReal &variable, RooAbsReal &coefficient,
0026                   bool negateCoefficient = false);
0027    RooExponential(const RooExponential &other, const char *name = nullptr);
0028    TObject *clone(const char *newname) const override { return new RooExponential(*this, newname); }
0029 
0030    Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName = nullptr) const override;
0031    double analyticalIntegral(Int_t code, const char *rangeName = nullptr) const override;
0032 
0033    /// Get the x variable.
0034    RooAbsReal const &variable() const { return x.arg(); }
0035 
0036    /// Get the coefficient "c".
0037    RooAbsReal const &coefficient() const { return c.arg(); }
0038 
0039    bool negateCoefficient() const { return _negateCoefficient; }
0040 
0041 protected:
0042    RooRealProxy x;
0043    RooRealProxy c;
0044    bool _negateCoefficient = false;
0045 
0046    double evaluate() const override;
0047    void doEval(RooFit::EvalContext &) const override;
0048    inline bool canComputeBatchWithCuda() const override { return true; }
0049 
0050 private:
0051    ClassDefOverride(RooExponential, 2) // Exponential PDF
0052 };
0053 
0054 #endif