Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooLandau.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: RooLandau.h,v 1.5 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_LANDAU
0017 #define ROO_LANDAU
0018 
0019 #include "RooAbsPdf.h"
0020 #include "RooRealProxy.h"
0021 
0022 class RooRealVar;
0023 
0024 class RooLandau : public RooAbsPdf {
0025 public:
0026   RooLandau() {} ;
0027   // Original constructor without RooAbsReal::Ref for backwards compatibility.
0028   inline RooLandau(const char *name, const char *title, RooAbsReal& _x, RooAbsReal& _mean, RooAbsReal& _sigma)
0029       : RooLandau{name, title, RooAbsReal::Ref{_x}, RooAbsReal::Ref{_mean}, RooAbsReal::Ref{_sigma}} {}
0030   RooLandau(const char *name, const char *title, RooAbsReal::Ref _x, RooAbsReal::Ref _mean, RooAbsReal::Ref _sigma);
0031   RooLandau(const RooLandau& other, const char* name=nullptr);
0032   TObject* clone(const char* newname) const override { return new RooLandau(*this,newname); }
0033 
0034   Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, bool staticInitOK=true) const override;
0035   void generateEvent(Int_t code) override;
0036 
0037   Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName = nullptr) const override;
0038   double analyticalIntegral(Int_t code, const char *rangeName) const override;
0039 
0040   void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
0041   std::string
0042   buildCallToAnalyticIntegral(Int_t code, const char *rangeName, RooFit::Detail::CodeSquashContext &ctx) const override;
0043 
0044 protected:
0045 
0046   RooRealProxy x ;
0047   RooRealProxy mean ;
0048   RooRealProxy sigma ;
0049 
0050   double evaluate() const override ;
0051   void doEval(RooFit::EvalContext &) const override;
0052   inline bool canComputeBatchWithCuda() const override { return true; }
0053 
0054 private:
0055 
0056   ClassDefOverride(RooLandau,1) // Landau Distribution PDF
0057 };
0058 
0059 #endif