// // ******************************************************************** // * 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. * // ******************************************************************** // // // G4 Tools program: NuMu DIS(Q2) fixed step integration // ..................................................... // Created: M.V. Kossov, CERN/ITEP(Moscow), 20-Dec-2005 // //===================================================================== #include "globals.hh" #include #include #include #include "G4ios.hh" //#include // All calculations have been done for C12 nucleus double nuE(double E) { return .9673/(1.+.323/E/E)/std::pow(E,.78);} // (E is in GeV) double nuX(double E, double r, double p) // (E is in GeV, r=Q2/Q2max, p=1.+nuE(E)) { double y=p-r; double p3=(.3088+.0012352*E)/(1.+1.836/E/E); return std::pow(y,6)*(r+p3)/(p3*r+1.); } double anuE(double E) { return .875/(1.+.2977/E/E)/std::pow(E,.78);} // (E is in GeV) double anuX(double E, double r, double p) // (E is in GeV, r=Q2/Q2max, p=1+anuE(E)) { double E2=E*E; double y=p-r; double p3=(13.88+.9373*(1.+.000033*E2)*std::sqrt(E))/(1.+(10.12+1.532/E2)/E); return std::pow(y,6)*(r+p3)/(p3*r+1.); } int main() { const double eps=.00000001; // relative accuracy of the integral calculation const double mmu=.105658369; // mu meson mass in GeV const double mmu2=mmu*mmu; // m_mu^2 in GeV^2 const double MN=.931494043; // Nucleon mass (inside nucleus, atomic mass unit, GeV) const double Emin=mmu+mmu2/(MN+MN); // the threshold energy in GeV const double Emax=390.; // the maximum energy in GeV const double lEmi=std::log(Emin); // logarithm of the threshold energy in GeV const double lEma=std::log(Emax); // logarithm of the maximum energy in GeV const int power=7; // power for the magic variable (E-dependent) const double pconv=1./power; // conversion power for the magic variable // ========= const int niX=20; // number of points for X table const int liX=niX-1; // the last index for X table const int niE=20; // number of points for E table double Xl[niE][niX]; // reversed table double inl[niE][niX]; // direct table // ----------------- nu/anu switch ------------------------------ //bool nu=true; bool nu=false; // -------------------------------------------------------------- double dE=(lEma-lEmi)/niE; double hE=dE/2; int ne=0; for(double len=lEmi+hE; len