Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:23

0001 // Author: Stephan Hageboeck, CERN, May 2019
0002 /*****************************************************************************
0003  * Project: RooFit                                                           *
0004  * Authors:                                                                  *
0005  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
0006  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
0007  *                                                                           *
0008  * Copyright (c) 2000-2005, Regents of the University of California          *
0009  *                          and Stanford University. All rights reserved.    *
0010  *                                                                           *
0011  * Redistribution and use in source and binary forms,                        *
0012  * with or without modification, are permitted according to the terms        *
0013  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0014  *****************************************************************************/
0015 #ifndef ROO_JOHNSON
0016 #define ROO_JOHNSON
0017 
0018 #include "RooAbsPdf.h"
0019 #include "RooRealProxy.h"
0020 #include "RooConstVar.h"
0021 
0022 class RooRealVar;
0023 
0024 class RooJohnson final : public RooAbsPdf {
0025 public:
0026   RooJohnson() {} // NOLINT: not allowed to use = default because of TObject::kIsOnHeap detection, see ROOT-10300
0027 
0028   RooJohnson(const char *name, const char *title,
0029             RooAbsReal& mass, RooAbsReal& mu, RooAbsReal& lambda,
0030             RooAbsReal& gamma, RooAbsReal& delta,
0031             double massThreshold = -std::numeric_limits<double>::max());
0032 
0033   RooJohnson(const RooJohnson& other, const char* newName = nullptr);
0034 
0035   TObject* clone(const char* newname) const override {
0036     return new RooJohnson(*this,newname);
0037   }
0038 
0039   Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override;
0040   double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override;
0041 
0042   Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, bool staticInitOK=true) const override;
0043   void generateEvent(Int_t code) override;
0044 
0045 private:
0046   enum AnaInt_t {kMass = 1, kMean, kLambda, kGamma, kDelta};
0047 
0048   RooRealProxy _mass;
0049   RooRealProxy _mu;
0050   RooRealProxy _lambda;
0051 
0052   RooRealProxy _gamma;
0053   RooRealProxy _delta;
0054 
0055   double _massThreshold{-1.E300};
0056 
0057   double evaluate() const override;
0058   void doEval(RooFit::EvalContext &) const override;
0059   inline bool canComputeBatchWithCuda() const override { return true; }
0060 
0061   ClassDefOverride(RooJohnson,1)
0062 };
0063 
0064 #endif