Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooCBShape.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: RooCBShape.h,v 1.11 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_CB_SHAPE
0017 #define ROO_CB_SHAPE
0018 
0019 #include "RooAbsPdf.h"
0020 #include "RooRealProxy.h"
0021 
0022 class RooRealVar;
0023 
0024 class RooCBShape : public RooAbsPdf {
0025 public:
0026   RooCBShape() {} ;
0027   RooCBShape(const char *name, const char *title, RooAbsReal& _m,
0028         RooAbsReal& _m0, RooAbsReal& _sigma,
0029         RooAbsReal& _alpha, RooAbsReal& _n);
0030 
0031   RooCBShape(const RooCBShape& other, const char *name = nullptr);
0032   TObject* clone(const char* newname) const override { return new RooCBShape(*this,newname); }
0033 
0034   Int_t getAnalyticalIntegral( RooArgSet& allVars,  RooArgSet& analVars, const char* rangeName=nullptr ) const override;
0035   double analyticalIntegral(Int_t, const char *rangeName = nullptr) const override;
0036 
0037   // Optimized accept/reject generator support
0038   Int_t getMaxVal(const RooArgSet& vars) const override ;
0039   double maxVal(Int_t code) const override ;
0040 
0041   void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
0042   std::string
0043   buildCallToAnalyticIntegral(Int_t code, const char *rangeName, RooFit::Detail::CodeSquashContext &ctx) const override;
0044 
0045 protected:
0046 
0047   double ApproxErf(double arg) const ;
0048 
0049   RooRealProxy m;
0050   RooRealProxy m0;
0051   RooRealProxy sigma;
0052   RooRealProxy alpha;
0053   RooRealProxy n;
0054 
0055   double evaluate() const override;
0056   void doEval(RooFit::EvalContext &) const override;
0057   inline bool canComputeBatchWithCuda() const override { return true; }
0058 
0059 
0060 private:
0061 
0062   ClassDefOverride(RooCBShape,1) // Crystal Ball lineshape PDF
0063 };
0064 
0065 #endif