|
|
|||
Warning, file /include/Geant4/G4VSIntegration.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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 // G4VSIntegration 0027 // 0028 // Class description: 0029 // 0030 // Numerical algorithm for integration of probability density function 0031 // and sampling of the energy. Parameters of the algorithm should 0032 // be defined by consumer class via the InitialiseIntegrator(..) method. 0033 // The method is effective for the case of functions with a peak and long 0034 // tail. Tunning of parameters may increase efficiency of the algorithm. 0035 // The default set of parameters is optimized for the pre-compound model. 0036 // 0037 // Created 03.03.2025 V.Ivanchenko 0038 // 0039 // -------------------------------------------------------------------- 0040 0041 #ifndef G4VSIntegration_HH 0042 #define G4VSIntegration_HH 1 0043 0044 #include "globals.hh" 0045 0046 class G4VSIntegration 0047 { 0048 public: 0049 G4VSIntegration() = default; 0050 0051 virtual ~G4VSIntegration() = default; 0052 0053 // this method should be implemented in a consumer class 0054 virtual G4double ProbabilityDensityFunction(G4double) = 0; 0055 0056 virtual const G4String& ModelName() const; 0057 0058 // initialisation before run called once 0059 // accuracy - accuracy of integration 0060 // fact1 - value < 1 to define energy E1: Pmax*fact = P(E1) 0061 // and E2: P(E1)*fact = P(E2) 0062 // fact2 - value > 1 provides tolerance for max cross section 0063 // deltaE - the default step in energy 0064 // dmin, dmax - min and max values of step 0065 void InitialiseIntegrator(G4double accuracy, G4double fact1, G4double fact2, 0066 G4double de, G4double dmin, G4double dmax); 0067 0068 // compute integral of probability density function 0069 G4double ComputeIntegral(const G4double emin, const G4double emax); 0070 0071 // sample value according to probability density function 0072 // it is assumed that ComputeIntegral(emin, emax) was executed 0073 G4double SampleValue(); 0074 0075 G4VSIntegration(const G4VSIntegration&) = delete; 0076 G4VSIntegration& operator=(const G4VSIntegration&) = delete; 0077 G4bool operator==(const G4VSIntegration &right) const = delete; 0078 G4bool operator!=(const G4VSIntegration &right) const = delete; 0079 0080 void SetVerbose(G4int verb) { fVerbose = verb; } 0081 0082 private: 0083 0084 G4double fAcc{0.001}; // accuracy of integration 0085 G4double fMinDelta{0.1}; // minimal step integration 0086 G4double fMaxDelta{2.0}; // maximal step integration 0087 G4double fDelta{1.0}; // the default step 0088 G4double fFactor1{0.25}; 0089 G4double fFactor2{1.05}; 0090 0091 // parameters describing function 0092 G4double fEmin{0.0}; 0093 G4double fEmax{0.0}; 0094 G4double fE1{0.0}; 0095 G4double fP1{0.0}; 0096 G4double fE2{0.0}; 0097 G4double fP2{0.0}; 0098 G4double fPmax{0.0}; 0099 0100 G4int fVerbose{0}; 0101 G4int fWarnLimit{4}; 0102 G4int fnWarn{0}; 0103 0104 G4String dummy{""}; 0105 }; 0106 0107 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|