File indexing completed on 2024-04-06 12:11:25
0001 #ifndef GammaFunctionGenerator_H
0002 #define GammaFunctionGenerator_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "FastSimulation/Utilities/interface/GammaNumericalGenerator.h"
0012
0013
0014 #include "CLHEP/GenericFunctions/IncompleteGamma.hh"
0015
0016
0017 #include <vector>
0018
0019 class RandomEngineAndDistribution;
0020
0021 class GammaFunctionGenerator {
0022 public:
0023
0024 GammaFunctionGenerator();
0025
0026
0027 virtual ~GammaFunctionGenerator();
0028
0029
0030
0031 double shoot(RandomEngineAndDistribution const*) const;
0032
0033
0034 void setParameters(double a, double b, double xm);
0035
0036 private:
0037
0038 double gammaFrac(RandomEngineAndDistribution const*) const;
0039
0040 double gammaInt(RandomEngineAndDistribution const*) const;
0041
0042 private:
0043
0044 std::vector<GammaNumericalGenerator> theGammas;
0045
0046
0047 std::vector<double> coreCoeff;
0048
0049
0050 double coreProba;
0051
0052
0053 std::vector<double> approxLimit;
0054
0055
0056 double xmin;
0057 double xmax;
0058
0059
0060 unsigned na;
0061
0062 double frac;
0063
0064 double alpha, beta;
0065
0066 Genfun::IncompleteGamma myIncompleteGamma;
0067
0068
0069 std::vector<double> integralToApproxLimit;
0070
0071
0072 bool badRange;
0073 };
0074 #endif