![]() |
|
|||
File indexing completed on 2025-09-15 08:58:50
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 // 0027 // 20100114 M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly 0028 // 20100319 M. Kelsey -- Add optional mass argument to generateWithFixedTheta; 0029 // define new generateWithRandomAngles, encapsulating code; define 0030 // cbrt() cube-root function (in math.h, but not in <math>!) 0031 // 20100412 M. Kelsey -- Modify paraMaker[Truncated] to take buffer as argument 0032 // 20100914 M. Kelsey -- Migrate to integer A and Z. Discard unused binding 0033 // energy functions 0034 // 20120608 M. Kelsey -- Fix variable-name "shadowing" compiler warnings. 0035 // 20130308 M. Kelsey -- New function to encapsulate INUCL power expansion 0036 // 20130808 M. Kelsey -- Convert paraMaker[Truncated] to class object, to 0037 // allow thread isolation 0038 // 20130829 M. Kelsey -- Address Coverity #52158, 52161 for copy actions. 0039 // 20150619 M. Kelsey -- Overload G4cbrt for case of integer arguments 0040 0041 #ifndef G4INUCL_SPECIAL_FUNC_HH 0042 #define G4INUCL_SPECIAL_FUNC_HH 0043 0044 #include "globals.hh" 0045 #include "G4LorentzVector.hh" 0046 #include <algorithm> 0047 #include <vector> 0048 0049 template <int N> class G4CascadeInterpolator; 0050 0051 0052 namespace G4InuclSpecialFunctions { 0053 G4double bindingEnergy(G4int A, G4int Z); 0054 0055 // NOTE: Used only by G4Fissioner 0056 G4double bindingEnergyAsymptotic(G4int A, G4int Z); 0057 0058 G4double FermiEnergy(G4int A, G4int Z, G4int ntype); 0059 0060 G4double getAL(G4int A); 0061 0062 G4double csNN(G4double e); 0063 0064 G4double csPN(G4double e); 0065 0066 G4double G4cbrt(G4double x); // Can't use "cbrt" name, clashes with <math.h> 0067 G4double G4cbrt(G4int n); // Use G4Pow::powN() here for speedup 0068 0069 G4double randomInuclPowers(G4double ekin, // Power series in Ekin, S 0070 const G4double (&coeff)[4][4]); 0071 0072 G4double randomGauss(G4double sigma); // Gaussian distribution 0073 0074 G4double randomPHI(); 0075 0076 std::pair<G4double, G4double> randomCOS_SIN(); 0077 0078 G4double nucleiLevelDensity(G4int A); 0079 0080 // Optional mass argument will be used to fill G4LorentzVector correctly 0081 G4LorentzVector generateWithFixedTheta(G4double ct, G4double p, 0082 G4double mass=0.); 0083 0084 G4LorentzVector generateWithRandomAngles(G4double p, G4double mass=0.); 0085 0086 // This is an object to be instantiated by client code 0087 class paraMaker { 0088 public: 0089 paraMaker(G4int verbose=0); 0090 ~paraMaker(); 0091 0092 // NOTE: Passing Z as double here, to be used as interpolation argument 0093 void getParams(G4double Z, std::pair<std::vector<G4double>, 0094 std::vector<G4double> >& parms); 0095 0096 void getTruncated(G4double Z, std::pair<G4double, G4double>& parms); 0097 0098 private: 0099 G4int verboseLevel; 0100 G4CascadeInterpolator<5>* interp; 0101 0102 // No copy actions 0103 paraMaker(const paraMaker& right); 0104 paraMaker& operator=(const paraMaker& right); 0105 }; 0106 } 0107 0108 0109 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |