#include <SplineGenerator.h>
Definition at line 9 of file SplineGenerator.h.
 
◆ SplineGenerator()
      
        
          | SplineGenerator::SplineGenerator  | 
          ( | 
          TRandom3 *  | 
          rndm,  | 
        
        
           | 
           | 
          const TSpline3 &  | 
          spline  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 7 of file SplineGenerator.cpp.
   16   double xmin(0.), a(0.), b(0.), c(0.), d(0.) ;
    19   m_spline.GetCoeff(i, xmin, a, b, c, d) ;
    30     m_spline.GetCoeff(i, xmin, a, b, c, d) ;
    32     ibin.xmax = 
m_bins[i+1].xmin ;
    35     ibin.integral = 
integral(i, ibin.xmin, ibin.xmax) ;
    40     tps.first = max(min(tps.first, ibin.xmax), ibin.xmin) ;
    41     tps.second = max(min(tps.second, ibin.xmax), ibin.xmin) ;
    56       cerr << 
"SplineGenerator ERROR: ymin < 0. (" << ibin.ymin << 
") for bin " << i << endl ;
    58     ibin.boxintegral = ibin.ymax * (ibin.xmax - ibin.xmin) ;
 
std::pair< double, double > turning_points(int i) const
 
std::vector< BinInfo > m_bins
 
const TSpline3 & spline() const
 
 
 
 
◆ gen_random()
      
        
          | double SplineGenerator::gen_random  | 
          ( | 
           | ) | 
           const | 
        
      
 
Definition at line 79 of file SplineGenerator.cpp.
   83     vector<BinInfo>::const_iterator ibin = 
m_bins.begin() ;
    84     for(; ibin != 
m_bins.end() ; ++ibin){
    85       boxsum += ibin->boxintegral ;
    89     double x = 
m_rndm->Rndm() * (ibin->xmax - ibin->xmin) + ibin->xmin ;
 
std::vector< BinInfo > m_bins
 
 
 
 
◆ integral() [1/3]
      
        
          | double SplineGenerator::integral  | 
          ( | 
           | ) | 
           const | 
        
      
 
 
◆ integral() [2/3]
      
        
          | double SplineGenerator::integral  | 
          ( | 
          double  | 
          xmin,  | 
        
        
           | 
           | 
          double  | 
          xmax  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 96 of file SplineGenerator.cpp.
  101   for(
int ibin = istart + 1 ; ibin != iend ; ++ibin)
 
std::vector< BinInfo > m_bins
 
 
 
 
◆ integral() [3/3]
  
  
      
        
          | double SplineGenerator::integral  | 
          ( | 
          int  | 
          i,  | 
         
        
           | 
           | 
          double  | 
          xmin,  | 
         
        
           | 
           | 
          double  | 
          xmax  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
private   | 
  
 
 
◆ mean() [1/2]
      
        
          | double SplineGenerator::mean  | 
          ( | 
           | ) | 
           const | 
        
      
 
 
◆ mean() [2/2]
  
  
      
        
          | double SplineGenerator::mean  | 
          ( | 
          int  | 
          i,  | 
         
        
           | 
           | 
          double  | 
          xmin,  | 
         
        
           | 
           | 
          double  | 
          xmax  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
private   | 
  
 
 
◆ mean_part_integral()
  
  
      
        
          | double SplineGenerator::mean_part_integral  | 
          ( | 
          int  | 
          i,  | 
         
        
           | 
           | 
          double  | 
          x  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
private   | 
  
 
Definition at line 140 of file SplineGenerator.cpp.
  141   double xmin(0.), a(0.), b(0.), c(0.), d(0.) ;
   142   m_spline.GetCoeff(i, xmin, a, b, c, d) ;
   143   double xshift = x - xmin ;
   144   return x * xshift * (a + xshift * (b/2. + xshift * (c/3. + xshift * d/4.)))
   145     - xshift * xshift * (a/2. + xshift * (b/6. + xshift * (c/12. + xshift * d/20.))) ;
 
 
 
 
◆ partial_integral()
  
  
      
        
          | double SplineGenerator::partial_integral  | 
          ( | 
          int  | 
          i,  | 
         
        
           | 
           | 
          double  | 
          x  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
private   | 
  
 
Definition at line 112 of file SplineGenerator.cpp.
  113   double xmin(0.), a(0.), b(0.), c(0.), d(0.) ;
   114   m_spline.GetCoeff(i, xmin, a, b, c, d) ;
   116   return x * (a + x * (b/2. + x * (c/3. + x * d/4.))) ;
 
 
 
 
◆ spline()
      
        
          | const TSpline3 & SplineGenerator::spline  | 
          ( | 
           | ) | 
           const | 
        
      
 
 
◆ turning_points()
  
  
      
        
          | pair< double, double > SplineGenerator::turning_points  | 
          ( | 
          int  | 
          i | ) | 
           const | 
         
       
   | 
  
private   | 
  
 
Definition at line 125 of file SplineGenerator.cpp.
  129   double xmin(0.), d(0.), c(0.), b(0.), a(0.) ;
   130   m_spline.GetCoeff(i, xmin, d, c, b, a) ;
   133   double arg = b*b - 4. * a * c ;
   135     return pair<double, double>(xmin-1e30, xmin-1e30) ;
   136   return pair<double, double>(xmin + (-b - sqrt(arg))/2./a, xmin + (-b + sqrt(arg))/2./a) ;
 
 
 
 
◆ m_bins
  
  
      
        
          | std::vector<BinInfo> SplineGenerator::m_bins | 
         
       
   | 
  
private   | 
  
 
 
◆ m_boxintegral
  
  
      
        
          | double SplineGenerator::m_boxintegral | 
         
       
   | 
  
private   | 
  
 
 
◆ m_integral
  
  
      
        
          | double SplineGenerator::m_integral | 
         
       
   | 
  
private   | 
  
 
 
◆ m_mean
  
  
      
        
          | double SplineGenerator::m_mean | 
         
       
   | 
  
private   | 
  
 
 
◆ m_rndm
  
  
      
        
          | TRandom3* SplineGenerator::m_rndm | 
         
       
   | 
  
private   | 
  
 
 
◆ m_spline
  
  
      
        
          | TSpline3 SplineGenerator::m_spline | 
         
       
   | 
  
mutableprivate   | 
  
 
 
The documentation for this class was generated from the following files: