# Project CMSSW displayed by LXR

File indexing completed on 2021-02-14 14:25:12

```0001 //
0002 //  VVIObj.h (v2.0)
0003 //
0004 //  Vavilov density and distribution functions
0005 //
0006 //
0007 // Created by Morris Swartz on 1/14/10.
0008 // 2010 __TheJohnsHopkinsUniversity__.
0009 //
0010 // V1.1 - make dzero call both fcns with a switch
0011 // V1.2 - remove inappriate initializers and add methods to return non-zero/normalized region
0012 // V2.0 - restructuring and speed improvements by V. Innocente
0013 //
0014
0015 #ifndef VVIObj_h
0016 #define VVIObj_h 1
0017
0018 namespace sistripvvi {
0019   // ***********************************************************************************************************************
0020   //! \class VVIObj
0021   //!
0022   //!  Port of CERNLIB routines vvidis/vviden (G116) to calculate higher quality Vavilov density and distribution functions
0023   //!
0024   // ***********************************************************************************************************************
0025   class VVIObj {
0026   public:
0027     VVIObj(double kappa = 0.01, double beta2 = 1., int mode = 0);  //!< Constructor
0028
0029     double fcn(double x) const;  //! density (mode=0) or distribution (mode=1) function
0030     void limits(double& xl,
0031                 double& xu) const;  //! returns the limits on the non-zero (mode=0) or normalized region (mode=1)
0032
0033   private:
0034     // Vavilov distribution parameters (inputs and common block /G116C1/)
0035
0036     const int mode_;  //!< set to 0 to calculate the density function and to 1 to calculate the distribution function
0037     double t0_;
0038     double t1_;
0039     double t_;
0040     double omega_;
0041     double x0_;
0042     double a_[155];
0043     double b_[155];
0044   };
0045 }  // namespace sistripvvi
0046
0047 #endif```