// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // // $Id: G4QNeutronElasticCrossSection.cc,v 1.5 2010/09/03 15:19:04 gcosmo Exp $ // GEANT4 tag $Name: geant4-09-03-ref-09 $ // // // G4 Physics class: G4QNeutronElasticCrossSection for nA elastic cross sections // Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 12-Jan-10 (from G4QElCrSect) // //================================================================================ // Short description: Interaction cross-sections for the G4QElastic process // ------------------------------------------------------------------------------- //#define debug //#define isodebug //#define pdebug //#define ppdebug //#define tdebug //#define sdebug #include "G4QNeutronElasticCrossSection.hh" // Initialization of the static parameters const G4int G4QNeutronElasticCrossSection::nPoints=128;//#ofPt in the AMDB tabs(>anyPar)(D) const G4int G4QNeutronElasticCrossSection::nLast=nPoints-1;// the Last Element in table (D) G4double G4QNeutronElasticCrossSection::lPMin=-8.; // Min tabulated log Momentum (D) G4double G4QNeutronElasticCrossSection::lPMax= 8.; // Max tabulated log Momentum (D) G4double G4QNeutronElasticCrossSection::dlnP=(lPMax-lPMin)/nLast;// Log step in table (D) G4bool G4QNeutronElasticCrossSection::onlyCS=true;// Flag to calc only CS (not Si/Bi)(L) G4double G4QNeutronElasticCrossSection::lastSIG=0.; // Last calculated cross section (L) G4double G4QNeutronElasticCrossSection::lastLP=-10.;// Last log(momOfIncidentHadron) (L) G4double G4QNeutronElasticCrossSection::lastTM=0.; // Last t_maximum (L) G4double G4QNeutronElasticCrossSection::theSS=0.; // The Last sq.slope of 1st difMax (L) G4double G4QNeutronElasticCrossSection::theS1=0.; // The Last mantissa of 1st difMax (L) G4double G4QNeutronElasticCrossSection::theB1=0.; // The Last slope of 1st difr. Max (L) G4double G4QNeutronElasticCrossSection::theS2=0.; // The Last mantissa of 2nd difMax (L) G4double G4QNeutronElasticCrossSection::theB2=0.; // The Last slope of 2nd difr. Max (L) G4double G4QNeutronElasticCrossSection::theS3=0.; // The Last mantissa of 3d difrMax (L) G4double G4QNeutronElasticCrossSection::theB3=0.; // The Last slope of 3d difructMax (L) G4double G4QNeutronElasticCrossSection::theS4=0.; // The Last mantissa of 4th difMax (L) G4double G4QNeutronElasticCrossSection::theB4=0.; // The Last slope of 4th difr. Max (L) G4int G4QNeutronElasticCrossSection::lastTZ=0; // Last atomic number of the target G4int G4QNeutronElasticCrossSection::lastTN=0; // Last # of neutrons in the target G4double G4QNeutronElasticCrossSection::lastPIN=0.; // Last initialized max momentum G4double* G4QNeutronElasticCrossSection::lastCST=0; // Elastic cross-section table G4double* G4QNeutronElasticCrossSection::lastPAR=0; // Parameters of FunctionalCalculation G4double* G4QNeutronElasticCrossSection::lastSST=0; // E-dep of sq.slope of the 1st difMax G4double* G4QNeutronElasticCrossSection::lastS1T=0; // E-dep of mantissa of the 1st difMax G4double* G4QNeutronElasticCrossSection::lastB1T=0; // E-dep of theSlope of the 1st difMax G4double* G4QNeutronElasticCrossSection::lastS2T=0; // E-dep of mantissa of the 2nd difMax G4double* G4QNeutronElasticCrossSection::lastB2T=0; // E-dep of theSlope of the 2nd difMax G4double* G4QNeutronElasticCrossSection::lastS3T=0; // E-dep of mantissa of the 3d difrMax G4double* G4QNeutronElasticCrossSection::lastB3T=0; // E-dep of the slope of the 3d difMax G4double* G4QNeutronElasticCrossSection::lastS4T=0; // E-dep of mantissa of the 4th difMax G4double* G4QNeutronElasticCrossSection::lastB4T=0; // E-dep of theSlope of the 4th difMax G4int G4QNeutronElasticCrossSection::lastN=0; // The last N of calculated nucleus G4int G4QNeutronElasticCrossSection::lastZ=0; // The last Z of calculated nucleus G4double G4QNeutronElasticCrossSection::lastP=0.; // Last used in cross section Momentum G4double G4QNeutronElasticCrossSection::lastTH=0.; // Last threshold momentum G4double G4QNeutronElasticCrossSection::lastCS=0.; // Last value of the Cross Section G4int G4QNeutronElasticCrossSection::lastI=0; // The last position in the DAMDB std::vector G4QNeutronElasticCrossSection::PAR; // Vector of params forFunctCalc std::vector G4QNeutronElasticCrossSection::CST; // Vector of cross-section table std::vector G4QNeutronElasticCrossSection::SST; // Vector of the 1st sq. slope std::vector G4QNeutronElasticCrossSection::S1T; // Vector of the first mantissa std::vector G4QNeutronElasticCrossSection::B1T; // Vector of the first slope std::vector G4QNeutronElasticCrossSection::S2T; // Vector of the secon mantissa std::vector G4QNeutronElasticCrossSection::B2T; // Vector of the second slope std::vector G4QNeutronElasticCrossSection::S3T; // Vector of the third mantissa std::vector G4QNeutronElasticCrossSection::B3T; // Vector of the third slope std::vector G4QNeutronElasticCrossSection::S4T; // Vector of the 4th mantissa std::vector G4QNeutronElasticCrossSection::B4T; // Vector of the 4th slope G4QNeutronElasticCrossSection::G4QNeutronElasticCrossSection() { } G4QNeutronElasticCrossSection::~G4QNeutronElasticCrossSection() { std::vector::iterator pos; for (pos=CST.begin(); pos colN; // Vector of N for calculated nuclei (isotops) static std::vector colZ; // Vector of Z for calculated nuclei (isotops) static std::vector colP; // Vector of last momenta for the reaction static std::vector colTH; // Vector of energy thresholds for the reaction static std::vector colCS; // Vector of last cross sections for the reaction // ***---*** End of the mandatory Static Definitions of the Associative Memory ***---*** G4double pEn=pMom; onlyCS=fCS; #ifdef debug G4cout<<"G4QNElCS::GetCS:>>> f="< CS=0"<New (inDB) Calculated CS="<lastTH) // Correct the threshold { #ifdef debug G4cout<<"G4QNeutronElCS::GetCS:New,T="< Threshold="< Threshold="<onlyCS="<RETRIEVE/UPDATE { if(F<0) // the AMDB must be loded { lastPIN = PIN[I]; // Max log(P) initialised for this table set lastPAR = PAR[I]; // Pointer to the parameter set lastCST = CST[I]; // Pointer to the total sross-section table lastSST = SST[I]; // Pointer to the first squared slope lastS1T = S1T[I]; // Pointer to the first mantissa lastB1T = B1T[I]; // Pointer to the first slope lastS2T = S2T[I]; // Pointer to the second mantissa lastB2T = B2T[I]; // Pointer to the second slope lastS3T = S3T[I]; // Pointer to the third mantissa lastB3T = B3T[I]; // Pointer to the rhird slope lastS4T = S4T[I]; // Pointer to the 4-th mantissa lastB4T = B4T[I]; // Pointer to the 4-th slope #ifdef debug G4cout<<"G4QNElasticCS::CalcCS: DB is updated for I="<6 & A<7 if(a<6.5) { G4double a28=a16*a12; // The main pre-exponent (pel_sg) lastPAR[15]=4000*a; // p1 lastPAR[16]=1.2e7*a8+380*a17; // p2 lastPAR[17]=.7/(1.+4.e-12*a16); // p3 lastPAR[18]=2.5/a8/(a4+1.e-16*a32); // p4 lastPAR[19]=.28*a; // p5 lastPAR[20]=1.2*a2+2.3; // p6 lastPAR[21]=3.8/a; // p7 // The main slope (pel_sl) lastPAR[22]=.01/(1.+.0024*a5); // p1 lastPAR[23]=.2*a; // p2 lastPAR[24]=9.e-7/(1.+.035*a5); // p3 lastPAR[25]=(42.+2.7e-11*a16)/(1.+.14*a); // p4 // The main quadratic (pel_sh) lastPAR[26]=2.25*a3; // p1 lastPAR[27]=18.; // p2 lastPAR[28]=.0024*a8/(1.+2.6e-4*a7); // p3 lastPAR[29]=3.5e-36*a32*a8/(1.+5.e-15*a32/a); // p4 lastPAR[30]=1.e5/(a8+2.5e12/a16); // p1 lastPAR[31]=8.e7/(a12+1.e-27*a28*a28); // p2 lastPAR[32]=.0006*a3; // p3 // The 1st max slope (pel_qs) lastPAR[33]=10.+4.e-8*a12*a; // p1 lastPAR[34]=.114; // p2 lastPAR[35]=.003; // p3 lastPAR[36]=2.e-23; // p4 // The effective pre-exponent (pel_ss) lastPAR[37]=1./(1.+.0001*a8); // p1 lastPAR[38]=1.5e-4/(1.+5.e-6*a12); // p2 lastPAR[39]=.03; // p3 // The effective slope (pel_sb) lastPAR[40]=a/2; // p1 lastPAR[41]=2.e-7*a4; // p2 lastPAR[42]=4.; // p3 lastPAR[43]=64./a3; // p4 // The gloria pre-exponent (pel_us) lastPAR[44]=1.e8*std::exp(.32*asa); // p1 lastPAR[45]=20.*std::exp(.45*asa); // p2 lastPAR[46]=7.e3+2.4e6/a5; // p3 lastPAR[47]=2.5e5*std::exp(.085*a3); // p4 lastPAR[48]=2.5*a; // p5 // The gloria slope (pel_ub) lastPAR[49]=920.+.03*a8*a3; // p1 lastPAR[50]=93.+.0023*a12; // p2 #ifdef debug G4cout<<"G4QNElCrS::CalcCS:la "< fin="< ILP="<= max="< ILP="< n+p=n+p { #ifdef tdebug G4cout<<"G4QNeutronElasticCrS::GetExchangeT: TM="<"<=-1.||theB1<=1.))G4cout<<"*NAN*G4QNeutElasticCrosS::Getslope:"<0"<