Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitModels
0004  *
0005  * authors: Stefan A. Schmitz, Gregory Schott
0006  * implementation of the Gamma distribution (class structure derived
0007  * from the class RooGaussian by Wouter Verkerke and David Kirkby)
0008  *
0009  * Redistribution and use in source and binary forms,                        *
0010  * with or without modification, are permitted according to the terms        *
0011  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0012  *****************************************************************************/
0013 
0014 #ifndef ROO_GAMMA
0015 #define ROO_GAMMA
0016 
0017 #include "RooAbsPdf.h"
0018 #include "RooRealProxy.h"
0019 
0020 class RooGamma : public RooAbsPdf {
0021 public:
0022   RooGamma() {} ;
0023   RooGamma(const char *name, const char *title,
0024          RooAbsReal& _x, RooAbsReal& _gamma, RooAbsReal& _beta, RooAbsReal& _mu);
0025   RooGamma(const RooGamma& other, const char* name=nullptr) ;
0026   TObject* clone(const char* newname=nullptr) const override { return new RooGamma(*this,newname); }
0027 
0028   Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override ;
0029   double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override ;
0030 
0031   Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, bool staticInitOK=true) const override;
0032   void generateEvent(Int_t code) override;
0033 
0034   RooAbsReal const &getX() const { return *x; }
0035   RooAbsReal const &getGamma() const { return *gamma; }
0036   RooAbsReal const &getBeta() const { return *beta; }
0037   RooAbsReal const &getMu() const { return *mu; }
0038 
0039 protected:
0040 
0041   RooRealProxy x ;
0042   RooRealProxy gamma ;
0043   RooRealProxy beta ;
0044   RooRealProxy mu ;
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 
0052   ClassDefOverride(RooGamma,1) // Gaussian PDF
0053 };
0054 
0055 #endif