// // ******************************************************************** // * 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: G4QPionPlusElasticCrossSection.cc,v 1.3 2010/02/16 07:53:05 mkossov Exp $ // GEANT4 tag $Name: hadr-chips-V09-03-08 $ // // // G4 Physics class: G4QPionPlusElasticCrossSection for pA elastic cross sections // Created: M.V. Kossov, CERN/ITEP(Moscow), 21-Jan-10 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 21-Jan-10 // //================================================================================ // Short description: Interaction cross-sections for the G4QElastic process // ------------------------------------------------------------------------------- //#define debug //#define isodebug //#define pdebug //#define ppdebug //#define tdebug //#define sdebug #include "G4QPionPlusElasticCrossSection.hh" // Initialization of the static parameters const G4int G4QPionPlusElasticCrossSection::nPoints=128;//#ofPt in AMDB table(>anyPar)(D) const G4int G4QPionPlusElasticCrossSection::nLast=nPoints-1;// theLastElement inTheTable(D) G4double G4QPionPlusElasticCrossSection::lPMin=-8.; // Min tabulated logarithmMomentum(D) G4double G4QPionPlusElasticCrossSection::lPMax= 8.; // Max tabulated logarithmMomentum(D) G4double G4QPionPlusElasticCrossSection::dlnP=(lPMax-lPMin)/nLast;// LogStep inTheTable(D) G4bool G4QPionPlusElasticCrossSection::onlyCS=true;// Flag toCalcul OnlyCS(not Si/Bi)(L) G4double G4QPionPlusElasticCrossSection::lastSIG=0.; // Last calculated cross section (L) G4double G4QPionPlusElasticCrossSection::lastLP=-10.;// Last log(mom_of IncidentHadron)(L) G4double G4QPionPlusElasticCrossSection::lastTM=0.; // Last t_maximum (L) G4double G4QPionPlusElasticCrossSection::theSS=0.; // TheLastSqSlope of 1st difr.Max(L) G4double G4QPionPlusElasticCrossSection::theS1=0.; // TheLastMantissa of 1st difr.Max(L) G4double G4QPionPlusElasticCrossSection::theB1=0.; // TheLastSlope of 1st difruct.Max(L) G4double G4QPionPlusElasticCrossSection::theS2=0.; // TheLastMantissa of 2nd difr.Max(L) G4double G4QPionPlusElasticCrossSection::theB2=0.; // TheLastSlope of 2nd difruct.Max(L) G4double G4QPionPlusElasticCrossSection::theS3=0.; // TheLastMantissa of 3d difr. Max(L) G4double G4QPionPlusElasticCrossSection::theB3=0.; // TheLastSlope of 3d difruct. Max(L) G4double G4QPionPlusElasticCrossSection::theS4=0.; // TheLastMantissa of 4th difr.Max(L) G4double G4QPionPlusElasticCrossSection::theB4=0.; // TheLastSlope of 4th difruct.Max(L) G4int G4QPionPlusElasticCrossSection::lastTZ=0; // Last atomic number of the target G4int G4QPionPlusElasticCrossSection::lastTN=0; // Last # of neutrons in the target G4double G4QPionPlusElasticCrossSection::lastPIN=0.; // Last initialized max momentum G4double* G4QPionPlusElasticCrossSection::lastCST=0; // Elastic cross-section table G4double* G4QPionPlusElasticCrossSection::lastPAR=0; // ParametersForFunctionalCalculation G4double* G4QPionPlusElasticCrossSection::lastSST=0; // E-dep of SqaredSlope of 1st difMax G4double* G4QPionPlusElasticCrossSection::lastS1T=0; // E-dep of mantissa of 1st dif.Max G4double* G4QPionPlusElasticCrossSection::lastB1T=0; // E-dep of the slope of 1st difMax G4double* G4QPionPlusElasticCrossSection::lastS2T=0; // E-dep of mantissa of 2nd difrMax G4double* G4QPionPlusElasticCrossSection::lastB2T=0; // E-dep of the slope of 2nd difMax G4double* G4QPionPlusElasticCrossSection::lastS3T=0; // E-dep of mantissa of 3d difr.Max G4double* G4QPionPlusElasticCrossSection::lastB3T=0; // E-dep of the slope of 3d difrMax G4double* G4QPionPlusElasticCrossSection::lastS4T=0; // E-dep of mantissa of 4th difrMax G4double* G4QPionPlusElasticCrossSection::lastB4T=0; // E-dep of the slope of 4th difMax G4int G4QPionPlusElasticCrossSection::lastN=0; // The last N of calculated nucleus G4int G4QPionPlusElasticCrossSection::lastZ=0; // The last Z of calculated nucleus G4double G4QPionPlusElasticCrossSection::lastP=0.; // LastUsed in cross section Momentum G4double G4QPionPlusElasticCrossSection::lastTH=0.; // Last threshold momentum G4double G4QPionPlusElasticCrossSection::lastCS=0.; // Last value of the Cross Section G4int G4QPionPlusElasticCrossSection::lastI=0; // The last position in the DAMDB std::vector G4QPionPlusElasticCrossSection::PAR;// Vector of pars forFunctCalcul std::vector G4QPionPlusElasticCrossSection::CST;// Vector of cross-section table std::vector G4QPionPlusElasticCrossSection::SST;// Vector of the 1st SquareSlope std::vector G4QPionPlusElasticCrossSection::S1T;// Vector of the 1st mantissa std::vector G4QPionPlusElasticCrossSection::B1T;// Vector of the 1st slope std::vector G4QPionPlusElasticCrossSection::S2T;// Vector of the 2nd mantissa std::vector G4QPionPlusElasticCrossSection::B2T;// Vector of the 2nd slope std::vector G4QPionPlusElasticCrossSection::S3T;// Vector of the 3d mantissa std::vector G4QPionPlusElasticCrossSection::B3T;// Vector of the 3d slope std::vector G4QPionPlusElasticCrossSection::S4T;// Vector of the 4th mantissa(g) std::vector G4QPionPlusElasticCrossSection::B4T;// Vector of the 4th slope(glor) G4QPionPlusElasticCrossSection::G4QPionPlusElasticCrossSection() { } G4QPionPlusElasticCrossSection::~G4QPionPlusElasticCrossSection() { 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 pdebug G4cout<<"G4QPElCS::GetCS:>>> f="< Found pPDG="< CS=0"< New (inDB) Calculated CS="<lastTH) // Correct the threshold { #ifdef debug G4cout<<"G4QElCS::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<<"G4QElasticCS::CalcCS: DB is updated for I="< fin="< ILP="<= max="< ILP="< p+p=p+p { #ifdef tdebug G4cout<<"G4QElasticCS::GetExchangeT: TM="<"<=-1.||theB1<=1.))G4cout<<"*NAN*G4QElasticCrossSect::Getslope:"<92) { G4cout<<"*Warning*G4QPionPlusElCS::GetTabValue:(1-92) No isotopes for Z="<0"<