Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooGExpModel.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: RooGExpModel.h,v 1.16 2007/05/11 09:13:07 verkerke 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_GEXP_MODEL
0017 #define ROO_GEXP_MODEL
0018 
0019 #include "Rtypes.h"
0020 #include "RooResolutionModel.h"
0021 #include "RooRealProxy.h"
0022 
0023 #include <complex>
0024 
0025 class RooGExpModel : public RooResolutionModel {
0026 public:
0027 
0028   enum Type { Normal, Flipped };
0029 
0030   // Constructors, assignment etc
0031   RooGExpModel() = default;
0032 
0033   RooGExpModel(const char *name, const char *title, RooAbsRealLValue& x,
0034           RooAbsReal& mean, RooAbsReal& sigma, RooAbsReal& rlife,
0035           RooAbsReal& meanSF, RooAbsReal& sigmaSF, RooAbsReal& rlifeSF,
0036           bool nlo=false, Type type=Normal) ;
0037 
0038   RooGExpModel(const char *name, const char *title, RooAbsRealLValue& x,
0039           RooAbsReal& sigma, RooAbsReal& rlife,
0040           bool nlo=false, Type type=Normal) ;
0041 
0042   RooGExpModel(const char *name, const char *title, RooAbsRealLValue& x,
0043           RooAbsReal& sigma, RooAbsReal& rlife,
0044           RooAbsReal& srSF,
0045           bool nlo=false, Type type=Normal) ;
0046 
0047   RooGExpModel(const char *name, const char *title, RooAbsRealLValue& x,
0048           RooAbsReal& sigma, RooAbsReal& rlife,
0049           RooAbsReal& sigmaSF, RooAbsReal& rlifeSF,
0050           bool nlo=false, Type type=Normal) ;
0051 
0052 
0053 
0054   RooGExpModel(const RooGExpModel& other, const char* name=nullptr);
0055   TObject* clone(const char* newname) const override { return new RooGExpModel(*this,newname) ; }
0056 
0057   Int_t basisCode(const char* name) const override ;
0058   Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override ;
0059   double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override ;
0060 
0061   Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, bool staticInitOK=true) const override;
0062   void generateEvent(Int_t code) override;
0063 
0064   void advertiseFlatScaleFactorIntegral(bool flag) { _flatSFInt = flag ; }
0065 
0066   void advertiseAsymptoticIntegral(bool flag) { _asympInt = flag ; }  // added FMV,07/24/03
0067 
0068 protected:
0069   double evaluate() const override ;
0070 
0071 private:
0072   //double calcDecayConv(double sign, double tau, double sig, double rtau) const ;
0073   double calcDecayConv(double sign, double tau, double sig, double rtau, double fsign) const ;
0074    // modified FMV,08/13/03
0075   std::complex<double> calcSinConv(double sign, double sig, double tau, double omega, double rtau, double fsign) const ;
0076   double calcSinConv(double sign, double sig, double tau, double rtau, double fsign) const ;
0077   std::complex<double> calcSinConvNorm(double sign, double tau, double omega,
0078                         double sig, double rtau, double fsign, const char* rangeName) const ; // modified FMV,07/24/03
0079   double calcSinConvNorm(double sign, double tau,
0080         double sig, double rtau, double fsign, const char* rangeName) const ; // added FMV,08/18/03
0081   //double calcSinhConv(double sign, double sign1, double sign2, double tau, double dgamma, double sig, double rtau, double fsign) const ;
0082   //double calcCoshConv(double sign, double tau, double dgamma, double sig, double rtau, double fsign) const ;
0083 
0084   static std::complex<double> evalCerfApprox(double swt, double u, double c);
0085 
0086   // Calculate common normalization factors
0087   // added FMV,07/24/03
0088   std::complex<double> evalCerfInt(double sign, double wt, double tau, double umin, double umax, double c) const ;
0089   double evalCerfInt(double sign, double tau, double umin, double umax, double c) const ;
0090 
0091   RooRealProxy _mean;
0092   RooRealProxy sigma ;
0093   RooRealProxy rlife ;
0094   RooRealProxy _meanSF;
0095   RooRealProxy ssf ;
0096   RooRealProxy rsf ;
0097 
0098   bool _flip ;
0099   bool _nlo ;
0100   bool _flatSFInt = false;
0101   bool _asympInt = false;  // added FMV,07/24/03
0102 
0103   ClassDefOverride(RooGExpModel,2) // Gauss (x) Exponential resolution model
0104 };
0105 
0106 #endif