// // ******************************************************************** // * 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. * // ******************************************************************** // // // The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02 // // **************************************************************************************** // Short description: Cross-sections extracted (by W.Pokorski) from the CHIPS package for // Hyperon-nuclear interactions. Original author: M. Kossov // ------------------------------------------------------------------------------------- // #include "G4ChipsHyperonInelasticXS.hh" #include "G4SystemOfUnits.hh" #include "G4DynamicParticle.hh" #include "G4ParticleDefinition.hh" #include "G4Lambda.hh" #include "G4SigmaPlus.hh" #include "G4SigmaMinus.hh" #include "G4SigmaZero.hh" #include "G4XiMinus.hh" #include "G4XiZero.hh" #include "G4OmegaMinus.hh" // factory #include "G4CrossSectionFactory.hh" // G4_DECLARE_XS_FACTORY(G4ChipsHyperonInelasticXS); G4ChipsHyperonInelasticXS::G4ChipsHyperonInelasticXS():G4VCrossSectionDataSet(Default_Name()) { // Initialization of the lastLEN=0; // Pointer to the lastArray of LowEn CS lastHEN=0; // Pointer to the lastArray of HighEn CS lastN=0; // The last N of calculated nucleus lastZ=0; // The last Z of calculated nucleus lastP=0.; // Last used in cross section Momentum lastTH=0.; // Last threshold momentum lastCS=0.; // Last value of the Cross Section lastI=0; // The last position in the DAMDB LEN = new std::vector; HEN = new std::vector; } G4ChipsHyperonInelasticXS::~G4ChipsHyperonInelasticXS() { G4int lens=LEN->size(); for(G4int i=0; isize(); for(G4int i=0; iGetDefinition(); if (particle == G4Lambda::Lambda()) { return true; } else if(particle == G4SigmaPlus::SigmaPlus()) { return true; } else if(particle == G4SigmaMinus::SigmaMinus()) { return true; } else if(particle == G4SigmaZero::SigmaZero()) { return true; } else if(particle == G4XiMinus::XiMinus()) { return true; } else if(particle == G4XiZero::XiZero()) { return true; } else if(particle == G4OmegaMinus::OmegaMinus()) { return true; } return false; } // 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 G4ChipsHyperonInelasticXS::GetIsoCrossSection(const G4DynamicParticle* Pt, G4int tgZ, G4int A, const G4Isotope*, const G4Element*, const G4Material*) { G4double pMom=Pt->GetTotalMomentum(); G4int tgN = A - tgZ; G4int pdg = Pt->GetDefinition()->GetPDGEncoding(); return GetChipsCrossSection(pMom, tgZ, tgN, pdg); } G4double G4ChipsHyperonInelasticXS::GetChipsCrossSection(G4double pMom, G4int tgZ, G4int tgN, G4int PDG) { G4bool in=false; // By default the isotope must be found in the AMDB if(tgN!=lastN || tgZ!=lastZ) // The nucleus was not the last used isotope { in = false; // By default the isotope haven't be found in AMDB lastP = 0.; // New momentum history (nothing to compare with) lastN = tgN; // The last N of the calculated nucleus lastZ = tgZ; // The last Z of the calculated nucleus lastI = colN.size(); // Size of the Associative Memory DB in the heap j = 0; // A#0f records found in DB for this projectile if(lastI) for(G4int i=0; ilastTH) // Correct the threshold (@@ No intermediate Zeros) { lastCS=0.; lastTH=pMom; } break; // Go out of the LOOP } j++; // Increment a#0f records found in DB } if(!in) // This isotope has not been calculated previously { //!!The slave functions must provide cross-sections in millibarns (mb) !! (not in IU) lastCS=CalculateCrossSection(0,j,PDG,lastZ,lastN,pMom); //calculate & create //if(lastCS>0.) // It means that the AMBD was initialized //{ lastTH = 0; //ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last colN.push_back(tgN); colZ.push_back(tgZ); colP.push_back(pMom); colTH.push_back(lastTH); colCS.push_back(lastCS); //} // M.K. Presence of H1 with high threshold breaks the syncronization return lastCS*millibarn; } // End of creation of the new set of parameters else { colP[lastI]=pMom; colCS[lastI]=lastCS; } } // End of parameters udate else if(pMom<=lastTH) { return 0.; // Momentum is below the Threshold Value -> CS=0 } else // It is the last used -> use the current tables { lastCS=CalculateCrossSection(1,j,PDG,lastZ,lastN,pMom); // Only read and UpdateDB lastP=pMom; } return lastCS*millibarn; } // The main member function giving the gamma-A cross section (E in GeV, CS in mb) G4double G4ChipsHyperonInelasticXS::CalculateCrossSection(G4int F, G4int I, G4int, G4int targZ, G4int targN, G4double Momentum) { static const G4double THmin=27.; // default minimum Momentum (MeV/c) Threshold static const G4double THmiG=THmin*.001; // minimum Momentum (GeV/c) Threshold static const G4double dP=10.; // step for the LEN (Low ENergy) table MeV/c static const G4double dPG=dP*.001; // step for the LEN (Low ENergy) table GeV/c static const G4int nL=105; // A#of LEN points in E (step 10 MeV/c) static const G4double Pmin=THmin+(nL-1)*dP; // minP for the HighE part with safety static const G4double Pmax=227000.; // maxP for the HEN (High ENergy) part 227 GeV static const G4int nH=224; // A#of HEN points in lnE static const G4double milP=std::log(Pmin);// Low logarithm energy for the HEN part static const G4double malP=std::log(Pmax);// High logarithm energy (each 2.75 percent) static const G4double dlP=(malP-milP)/(nH-1); // Step in log energy in the HEN part static const G4double milPG=std::log(.001*Pmin);// Low logarithmEnergy for HEN part GeV/c G4double sigma=0.; if(F&&I) sigma=0.; // @@ *!* Fake line *!* to use F & I !!!Temporary!!! //G4double A=targN+targZ; // A of the target if(F<=0) // This isotope was not the last used isotop { if(F<0) // This isotope was found in DAMDB =-----=> RETRIEVE { G4int sync=LEN->size(); if(sync<=I) G4cerr<<"*!*G4QPiMinusNuclCS::CalcCrosSect:Sync="< CREATE { lastLEN = new G4double[nL]; // Allocate memory for the new LEN cross sections lastHEN = new G4double[nH]; // Allocate memory for the new HEN cross sections // --- Instead of making a separate function --- G4double P=THmiG; // Table threshold in GeV/c for(G4int k=0; ksize(); if(sync!=I) { G4cerr<<"***G4QHyperNuclCS::CalcCrossSect: Sinc="<push_back(lastLEN); // remember the Low Energy Table HEN->push_back(lastHEN); // remember the High Energy Table } // End of creation of the new set of parameters } // End of parameters udate // =--------------------------= NOW the Magic Formula =------------------------------= if (Momentum1 || tN>1) { e=380.+18.*a2/(1.+a2/60.)/(1.+2.E-19*a8); r=0.15; h=1.E-8*a2/(1.+a2/17.)/(1.+3.E-20*a8); t=(.2+.00056*a2)/(1.+a2*.0006); } sigma=(c+d*d)/(1.+t/ssp+r/p4)+(gg+e*std::exp(-6.*P))/(1.+h/p4/p4); #ifdef pdebug G4cout<<"G4QHyperonNucCS::CSForm: A="<