Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooGamma.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  *
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) 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   void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
0035   std::string
0036   buildCallToAnalyticIntegral(Int_t code, const char *rangeName, RooFit::Detail::CodeSquashContext &ctx) const override;
0037 
0038 protected:
0039 
0040   RooRealProxy x ;
0041   RooRealProxy gamma ;
0042   RooRealProxy beta ;
0043   RooRealProxy mu ;
0044 
0045   double evaluate() const override ;
0046   void doEval(RooFit::EvalContext &) const override;
0047   inline bool canComputeBatchWithCuda() const override { return true; }
0048 
0049 private:
0050 
0051   ClassDefOverride(RooGamma,1) // Gaussian PDF
0052 };
0053 
0054 #endif