// // ******************************************************************** // * 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: G4QPionMinusElasticCrossSection.cc,v 1.3 2010/02/16 07:53:05 mkossov Exp $ // GEANT4 tag $Name: hadr-chips-V09-03-08 $ // // // G4 Physics class: G4QPionMinusElasticCrossSection 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 "G4QPionMinusElasticCrossSection.hh" // Initialization of the static parameters const G4int G4QPionMinusElasticCrossSection::nPoints=128;//#ofPt in AMDB table(>anyPar)(D) const G4int G4QPionMinusElasticCrossSection::nLast=nPoints-1;//theLastElement inTheTable(D) G4double G4QPionMinusElasticCrossSection::lPMin=-8.; //Min tabulated logarithmMomentum(D) G4double G4QPionMinusElasticCrossSection::lPMax= 8.; //Max tabulated logarithmMomentum(D) G4double G4QPionMinusElasticCrossSection::dlnP=(lPMax-lPMin)/nLast;//LogStep inTheTable(D) G4bool G4QPionMinusElasticCrossSection::onlyCS=true;//Flag toCalcul OnlyCS(not Si/Bi)(L) G4double G4QPionMinusElasticCrossSection::lastSIG=0.; //Last calculated cross section (L) G4double G4QPionMinusElasticCrossSection::lastLP=-10.;//Last log(mom_of IncidentHadron)(L) G4double G4QPionMinusElasticCrossSection::lastTM=0.; //Last t_maximum (L) G4double G4QPionMinusElasticCrossSection::theSS=0.; //TheLastSqSlope of 1st difr.Max(L) G4double G4QPionMinusElasticCrossSection::theS1=0.; //TheLastMantissa of 1st difr.Max(L) G4double G4QPionMinusElasticCrossSection::theB1=0.; //TheLastSlope of 1st difruct.Max(L) G4double G4QPionMinusElasticCrossSection::theS2=0.; //TheLastMantissa of 2nd difr.Max(L) G4double G4QPionMinusElasticCrossSection::theB2=0.; //TheLastSlope of 2nd difruct.Max(L) G4double G4QPionMinusElasticCrossSection::theS3=0.; //TheLastMantissa of 3d difr. Max(L) G4double G4QPionMinusElasticCrossSection::theB3=0.; //TheLastSlope of 3d difruct. Max(L) G4double G4QPionMinusElasticCrossSection::theS4=0.; //TheLastMantissa of 4th difr.Max(L) G4double G4QPionMinusElasticCrossSection::theB4=0.; //TheLastSlope of 4th difruct.Max(L) G4int G4QPionMinusElasticCrossSection::lastTZ=0; // Last atomic number of the target G4int G4QPionMinusElasticCrossSection::lastTN=0; // Last # of neutrons in the target G4double G4QPionMinusElasticCrossSection::lastPIN=0.; // Last initialized max momentum G4double* G4QPionMinusElasticCrossSection::lastCST=0; // Elastic cross-section table G4double* G4QPionMinusElasticCrossSection::lastPAR=0; // Parameters ForFunctionCalculation G4double* G4QPionMinusElasticCrossSection::lastSST=0; // E-dep of SqardSlope of 1st difMax G4double* G4QPionMinusElasticCrossSection::lastS1T=0; // E-dep of mantissa of 1st dif.Max G4double* G4QPionMinusElasticCrossSection::lastB1T=0; // E-dep of the slope of 1st difMax G4double* G4QPionMinusElasticCrossSection::lastS2T=0; // E-dep of mantissa of 2nd difrMax G4double* G4QPionMinusElasticCrossSection::lastB2T=0; // E-dep of the slope of 2nd difMax G4double* G4QPionMinusElasticCrossSection::lastS3T=0; // E-dep of mantissa of 3d difr.Max G4double* G4QPionMinusElasticCrossSection::lastB3T=0; // E-dep of the slope of 3d difrMax G4double* G4QPionMinusElasticCrossSection::lastS4T=0; // E-dep of mantissa of 4th difrMax G4double* G4QPionMinusElasticCrossSection::lastB4T=0; // E-dep of the slope of 4th difMax G4int G4QPionMinusElasticCrossSection::lastN=0; // The last N of calculated nucleus G4int G4QPionMinusElasticCrossSection::lastZ=0; // The last Z of calculated nucleus G4double G4QPionMinusElasticCrossSection::lastP=0.; // LastUsed in CrossSection Momentum G4double G4QPionMinusElasticCrossSection::lastTH=0.; // Last threshold momentum G4double G4QPionMinusElasticCrossSection::lastCS=0.; // Last value of the Cross Section G4int G4QPionMinusElasticCrossSection::lastI=0; // The last position in the DAMDB std::vector G4QPionMinusElasticCrossSection::PAR;// Vector of ParsForFunctCalcul std::vector G4QPionMinusElasticCrossSection::CST;// Vector of CrossSection table std::vector G4QPionMinusElasticCrossSection::SST;// Vector of the1st SquardSlope std::vector G4QPionMinusElasticCrossSection::S1T;// Vector of the1st mantissa std::vector G4QPionMinusElasticCrossSection::B1T;// Vector of the1st slope std::vector G4QPionMinusElasticCrossSection::S2T;// Vector of the2nd mantissa std::vector G4QPionMinusElasticCrossSection::B2T;// Vector of the2nd slope std::vector G4QPionMinusElasticCrossSection::S3T;// Vector of the3d mantissa std::vector G4QPionMinusElasticCrossSection::B3T;// Vector of the3d slope std::vector G4QPionMinusElasticCrossSection::S4T;// Vector of the4th mantissa(g) std::vector G4QPionMinusElasticCrossSection::B4T;// Vector of the4th slope(glor) G4QPionMinusElasticCrossSection::G4QPionMinusElasticCrossSection() { } G4QPionMinusElasticCrossSection::~G4QPionMinusElasticCrossSection() { 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 pdebug 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 pdebug 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:"<0"<