00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // $Id$ 00027 // 00028 // 20100114 M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly 00029 // 20100319 M. Kelsey -- Add optional mass argument to generateWithFixedTheta; 00030 // define new generateWithRandomAngles, encapsulating code; define 00031 // cbrt() cube-root function (in math.h, but not in <math>!) 00032 // 20100412 M. Kelsey -- Modify paraMaker[Truncated] to take buffer as argument 00033 // 20100914 M. Kelsey -- Migrate to integer A and Z. Discard unused binding 00034 // energy functions 00035 // 20120608 M. Kelsey -- Fix variable-name "shadowing" compiler warnings. 00036 00037 #ifndef G4INUCL_SPECIAL_FUNC_HH 00038 #define G4INUCL_SPECIAL_FUNC_HH 00039 00040 #include "globals.hh" 00041 #include <algorithm> 00042 #include <vector> 00043 #include "G4LorentzVector.hh" 00044 00045 namespace G4InuclSpecialFunctions { 00046 G4double bindingEnergy(G4int A, G4int Z); 00047 00048 // NOTE: Used only by G4Fissioner 00049 G4double bindingEnergyAsymptotic(G4int A, G4int Z); 00050 00051 G4double FermiEnergy(G4int A, G4int Z, G4int ntype); 00052 00053 // NOTE: Passing Z as double here, to be used as interpolation argument 00054 void paraMaker(G4double Z, std::pair<std::vector<G4double>, std::vector<G4double> >& parms); 00055 00056 void paraMakerTruncated(G4double Z, std::pair<G4double, G4double>& parms); 00057 00058 G4double getAL(G4int A); 00059 00060 G4double csNN(G4double e); 00061 00062 G4double csPN(G4double e); 00063 00064 G4double G4cbrt(G4double x); // Can't use "cbrt" name, clashes with <math.h> 00065 00066 G4double inuclRndm(); 00067 00068 G4double randomGauss(G4double sigma); 00069 00070 G4double randomPHI(); 00071 00072 std::pair<G4double, G4double> randomCOS_SIN(); 00073 00074 G4double nucleiLevelDensity(G4int A); 00075 00076 // Optional mass argument will be used to fill G4LorentzVector correctly 00077 G4LorentzVector generateWithFixedTheta(G4double ct, G4double p, 00078 G4double mass=0.); 00079 00080 G4LorentzVector generateWithRandomAngles(G4double p, G4double mass=0.); 00081 } 00082 00083 00084 #endif