Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:19

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // G4GaussLegendreQ
0027 //
0028 // Class description:
0029 //
0030 // Class for Gauss-Legendre integration method
0031 // Roots of ortogonal polynoms and corresponding weights are calculated based on
0032 // iteration method (by bisection Newton algorithm). Constant values for initial
0033 // approximations were derived from the book:
0034 //   M. Abramowitz, I. Stegun, Handbook of mathematical functions,
0035 //   DOVER Publications INC, New York 1965 ; chapters 9, 10, and 22.
0036 
0037 // Author: V.Grichine, 13.05.1997
0038 // --------------------------------------------------------------------
0039 #ifndef G4GAUSSLEGENDREQ_HH
0040 #define G4GAUSSLEGENDREQ_HH 1
0041 
0042 #include "G4VGaussianQuadrature.hh"
0043 
0044 class G4GaussLegendreQ : public G4VGaussianQuadrature
0045 {
0046  public:
0047   explicit G4GaussLegendreQ(function pFunction);
0048 
0049   G4GaussLegendreQ(function pFunction, G4int nLegendre);
0050   // Constructor for GaussLegendre quadrature method. The value nLegendre set
0051   // the accuracy required, i.e the number of points where the function
0052   // pFunction will be evaluated during integration. The constructor creates
0053   // the arrays for abscissas and weights that used in Gauss-Legendre
0054   // quadrature method.
0055   // The values a and b are the limits of integration of the pFunction.
0056 
0057   G4GaussLegendreQ(const G4GaussLegendreQ&) = delete;
0058   G4GaussLegendreQ& operator=(const G4GaussLegendreQ&) = delete;
0059 
0060   G4double Integral(G4double a, G4double b) const;
0061   // Returns the integral of the function to be pointed by fFunction between a
0062   // and b, by 2*fNumber point Gauss-Legendre integration: the function is
0063   // evaluated exactly 2*fNumber Times at interior points in the range of
0064   // integration. Since the weights and abscissas are, in this case, symmetric
0065   // around the midpoint of the range of integration, there are actually only
0066   // fNumber distinct values of each.
0067 
0068   G4double QuickIntegral(G4double a, G4double b) const;
0069   // Returns the integral of the function to be pointed by fFunction between a
0070   // and b, by ten point Gauss-Legendre integration: the function is evaluated
0071   // exactly ten Times at interior points in the range of integration. Since
0072   // the weights and abscissas are, in this case, symmetric around the midpoint
0073   // of the range of integration, there are actually only five distinct values
0074   // of each.
0075 
0076   G4double AccurateIntegral(G4double a, G4double b) const;
0077   // Returns the integral of the function to be pointed by fFunction between a
0078   // and b, by 96 point Gauss-Legendre integration: the function is evaluated
0079   // exactly ten Times at interior points in the range of integration. Since
0080   // the weights and abscissas are, in this case, symmetric around the midpoint
0081   // of the range of integration, there are actually only five distinct values
0082   // of each.
0083 };
0084 
0085 #endif