// // ******************************************************************** // * 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: G4QElectronNuclearCrossSection.cc,v 1.15 2009/05/08 15:16:26 mkossov Exp $ // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ // // // G4 Physics class: G4QElectronNuclearCrossSection for gamma+A cross sections // Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03 // //================================================================================= // Short description: reaction cross-sections for electron-nuclear reactions, which // are integrals over virtual equivalent photons photons. // -------------------------------------------------------------------------------- //#define debug #define edebug //#define pdebug //#define ppdebug //#define tdebug //#define sdebug #include "G4QElectronNuclearCrossSection.hh" // Initialization of the G4bool G4QElectronNuclearCrossSection::onlyCS=true;// Flag to calculate only CS G4double G4QElectronNuclearCrossSection::lastSig=0.;// Last value of the Cross Section G4int G4QElectronNuclearCrossSection::lastL=0; // LastUsed in CrossSections TheLastBin G4double G4QElectronNuclearCrossSection::lastE=0.;// LastUsed in CrossSections TheEnergy G4int G4QElectronNuclearCrossSection::lastF=0; // LastUsed in CrossSections TheFirstBin G4double G4QElectronNuclearCrossSection::lastG=0.;// LastUsed in CrossSections TheGamma G4double G4QElectronNuclearCrossSection::lastH=0.;// LastValue of High Energy A-dependence G4double* G4QElectronNuclearCrossSection::lastJ1=0;// Pointer to lastArray of J1 function G4double* G4QElectronNuclearCrossSection::lastJ2=0;// Pointer to lastArray of J2 function G4double* G4QElectronNuclearCrossSection::lastJ3=0;// Pointer to lastArray of J3 function G4int G4QElectronNuclearCrossSection::lastPDG=0; // The last PDG code of the projectile G4int G4QElectronNuclearCrossSection::lastN=0; // The last N of calculated nucleus G4int G4QElectronNuclearCrossSection::lastZ=0; // The last Z of calculated nucleus G4double G4QElectronNuclearCrossSection::lastP=0.; // Last used in cross section Momentum G4double G4QElectronNuclearCrossSection::lastTH=0.; // Last threshold momentum G4double G4QElectronNuclearCrossSection::lastCS=0.; // Last value of the Cross Section G4int G4QElectronNuclearCrossSection::lastI=0; // The last position in the DAMDB // Returns Pointer to the G4VQCrossSection class G4VQCrossSection* G4QElectronNuclearCrossSection::GetPointer() { static G4QElectronNuclearCrossSection theCrossSection; //**Static body of Cross Section** return &theCrossSection; } // The main member function giving the collision cross section (P is in IU, CS is in mb) // Make pMom in independent units ! (Now it is MeV) G4double G4QElectronNuclearCrossSection::GetCrossSection(G4bool fCS, G4double pMom, G4int tgZ, G4int tgN, G4int pPDG) { static const G4double mel=0.5109989; // Mass of the electron in MeV static const G4double mel2=mel*mel; // Squared Mass of the electron in MeV static G4int j; // A#0f records found in DB for this projectile static std::vector colPDG;// Vector of the projectile PDG code static std::vector 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=std::sqrt(pMom*pMom+mel2)-mel; // ==> electron/positron kinEnergy #ifdef pdebug G4cout<<"G4QENCS::GetCS:>>> f="< CS=0"< New (inDB) Calculated CS="<lastTH) // Correct the threshold { #ifdef pdebug G4cout<<"G4QENCS::GetCS: New T="< Threshold="< Threshold="< CS=0 } // else if(std::fabs(lastP/pMom-1.)m+(m^2+2lm)/2M // CHIPS - Direct GEANT //G4double mT= G4QPDGCode(111).GetNuclMass(Z,N,0); G4double mT= 0.; if(G4NucleiProperties::IsInStableTable(A,Z)) mT = G4NucleiProperties::GetNuclearMass(A,Z)/MeV; else return 0.; // If it is not in the Table of Stable Nuclei, then the Threshold=0 // --------- G4double mP= infEn; //if(Z) mP= G4QPDGCode(111).GetNuclMass(Z-1,N,0); if(Z&&G4NucleiProperties::IsInStableTable(A-1,Z-1)) mP = G4NucleiProperties::GetNuclearMass(A-1,Z-1)/MeV; // ResNucMass for a proton G4double mN= infEn; //if(N) mN= G4QPDGCode(111).GetNuclMass(Z,N-1,0); if(N&&G4NucleiProperties::IsInStableTable(A-1,Z)) mN = G4NucleiProperties::GetNuclearMass(A-1,Z)/MeV; // ResNucMass for a neutron G4double mA= infEn; if(N>1&&Z>1&&G4NucleiProperties::IsInStableTable(A-4,Z-2)) mA = G4NucleiProperties::GetNuclearMass(A-4.,Z-2.)/MeV;// ResNucMass for an alpha G4double dP= mP +mProt - mT; G4double dN= mN +mNeut - mT; G4double dA= mA +mAlph - mT; #ifdef pdebug G4cout<<"G4QElectronNucCS::ThreshEn: mP="< CREATE { lastJ1 = new G4double[nE]; // Allocate memory for the new J1 function lastJ2 = new G4double[nE]; // Allocate memory for the new J2 function lastJ3 = new G4double[nE]; // Allocate memory for the new J3 function lastF = GetFunctions(A,lastJ1,lastJ2,lastJ3);//newZeroPos and J-functions filling lastH = alop*A*(1.-.072*std::log(A)); // like lastSP of G4PhotonuclearCrossSection #ifdef pdebug G4cout<<"==>G4QElNCS::CalcCS: pJ1="<(shift); #ifdef pdebug G4cout<<"-->G4QElectronNuclearCS::CalcCrossSect:LOGfit b="<G4QElecNucCS::CCS:LOGex="<>>>>>>>>>G4QElNucCS::CalculateCrossSection: p="<(a+.499); // Make the round integer of the atomic number G4double ai=iA; if(a!=ai) a=ai; for(G4int i=0; ileE"<lE="<E_electron"); } if(std::fabs(d)=imax) G4cerr<<"*G4QENCS::SolveTE:"<"<Use bigger max. ln(eE)=" < Q2max="<