// // ******************************************************************** // * 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.2 2010/06/02 09:08:25 mkossov Exp $ // GEANT4 tag $Name: hadr-chips-V09-03-08 $ // // // 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 std::vector* G4QElectronNuclearCrossSection::J1 = new std::vector; std::vector* G4QElectronNuclearCrossSection::J2 = new std::vector; std::vector* G4QElectronNuclearCrossSection::J3 = new std::vector; // Returns Pointer to the G4VQCrossSection class G4VQCrossSection* G4QElectronNuclearCrossSection::GetPointer() { static G4QElectronNuclearCrossSection theCrossSection; //**Static body of Cross Section** return &theCrossSection; } G4QElectronNuclearCrossSection::~G4QElectronNuclearCrossSection() { G4int lens=J1->size(); for(G4int i=0; isize(); for(G4int i=0; isize(); for(G4int i=0; i 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(Z&&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(A>1&&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(A>1&&G4NucleiProperties::IsInStableTable(A-1,Z)) mN = G4NucleiProperties::GetNuclearMass(A-1,Z)/MeV; // ResNucMass for a neutron G4double mA= infEn; if(A>4&&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="<size(); if(J3->size()) G4cout<<", p="<<(*J3)[0]; G4cout<GetKineticEnergy()/MeV; // Energy of the Electron onlyCS=CS; // Flag to calculate only CS (not Si/Bi) G4double TotEnergy2=Momentum*Momentum+mel2; G4double TotEnergy=std::sqrt(TotEnergy2); // Total energy of the electron lastE=TotEnergy-mel; // Kinetic energy of the electron #ifdef pdebug G4cout<<"G4QElectronNucCS::CalcCS: P="< 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="<push_back(lastJ1); J2->push_back(lastJ2); J3->push_back(lastJ3); colF.push_back(lastF); colH.push_back(lastH); } // End of creation of the new set of parameters } // End of parameters udate // ============================== NOW Calculate the Cross Section ===================== if (lastE<=lastTH || lastE<=EMi) // Check that muKiE is higher than ThreshE { lastE=0.; lastG=0.; lastSig=0.; #ifdef pdebug G4cout<<"G4QElectronNucCS::CalcCS:CS=0 as T="<(shift); #ifdef pdebug G4cout<<"-->G4QElectronNuclearCS::CalcCrossSect:LOGfit b="<G4QElecNucCS::CCS:LOGex="<>>>>>>>G4QElNucCS::CalculateCrossSection: p="<<(*J3)[0]<(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="<