#include <G4PhotoNuclearCrossSection.hh>
Inheritance diagram for G4PhotoNuclearCrossSection:
Public Member Functions | |
G4PhotoNuclearCrossSection (const G4String &name="PhotoNuclearXS") | |
virtual | ~G4PhotoNuclearCrossSection () |
virtual void | CrossSectionDescription (std::ostream &) const |
virtual G4bool | IsIsoApplicable (const G4DynamicParticle *particle, G4int, G4int, const G4Element *, const G4Material *) |
virtual G4double | GetIsoCrossSection (const G4DynamicParticle *, G4int, G4int, const G4Isotope *, const G4Element *, const G4Material *) |
Definition at line 42 of file G4PhotoNuclearCrossSection.hh.
G4PhotoNuclearCrossSection::G4PhotoNuclearCrossSection | ( | const G4String & | name = "PhotoNuclearXS" |
) |
Definition at line 72 of file G4PhotoNuclearCrossSection.cc.
00073 : G4VCrossSectionDataSet(nam) 00074 {}
G4PhotoNuclearCrossSection::~G4PhotoNuclearCrossSection | ( | ) | [virtual] |
Definition at line 76 of file G4PhotoNuclearCrossSection.cc.
00077 { 00078 std::vector<G4double*>::iterator pos; 00079 for(pos=GDR.begin(); pos<GDR.end(); pos++) 00080 { delete [] *pos; } 00081 GDR.clear(); 00082 for(pos=HEN.begin(); pos<HEN.end(); pos++) 00083 { delete [] *pos; } 00084 HEN.clear(); 00085 }
void G4PhotoNuclearCrossSection::CrossSectionDescription | ( | std::ostream & | ) | const [virtual] |
Reimplemented from G4VCrossSectionDataSet.
Definition at line 88 of file G4PhotoNuclearCrossSection.cc.
00089 { 00090 outFile << "G4PhotoNuclearCrossSection provides the total inelastic\n" 00091 << "cross section for photon interactions with nuclei. The\n" 00092 << "cross section is a parameterization of data which covers\n" 00093 << "all incident gamma energies.\n"; 00094 }
G4double G4PhotoNuclearCrossSection::GetIsoCrossSection | ( | const G4DynamicParticle * | , | |
G4int | , | |||
G4int | , | |||
const G4Isotope * | , | |||
const G4Element * | , | |||
const G4Material * | ||||
) | [virtual] |
Reimplemented from G4VCrossSectionDataSet.
Definition at line 109 of file G4PhotoNuclearCrossSection.cc.
References G4cerr, G4cout, G4endl, G4DynamicParticle::GetDefinition(), G4DynamicParticle::GetKineticEnergy(), G4ParticleDefinition::GetPDGEncoding(), and CLHEP::detail::n.
00112 { 00113 static const G4double THmin=2.; // minimum Energy Threshold 00114 static const G4double dE=1.; // step for the GDR table 00115 static const G4int nL=105; // A#of GDResonance points in E 00116 // (each MeV from 2 to 106) 00117 static const G4double Emin=THmin+(nL-1)*dE; // minE for the HighE part 00118 static const G4double Emax=50000.; // maxE for the HighE part 00119 static const G4int nH=224; // A#of HResonance points in lnE 00120 static const G4double milE=std::log(Emin); // Low logarithm energy for 00121 // the HighE part 00122 static const G4double malE=std::log(Emax); // High logarithm energy 00123 // (each 2.75 percent) 00124 static const G4double dlE=(malE-milE)/(nH-1); // Step in logarithm energy 00125 // in the HighE part 00126 // 00127 //static const G4double shd=1.075-.0023*std::log(2.); // HE PomShadowing(D) 00128 static const G4double shd=1.0734; // HE PomShadowing(D) 00129 static const G4double shc=0.072; // HE Shadowing constant 00130 static const G4double poc=0.0375; // HE Pomeron coefficient 00131 static const G4double pos=16.5; // HE Pomeron shift 00132 static const G4double reg=.11; // HE Reggeon slope 00133 //static const G4double shp=1.075; // HE PomShadowing(P) 00134 00135 // Associative memory for acceleration 00136 00137 static std::vector <G4int> colN; // N of calculated nuclei 00138 static std::vector <G4int> colZ; // Z of calculated nuclei 00139 static std::vector <G4double> spA; // shadowing coefficients (A-dependent) 00140 static std::vector <G4double> eTH; // energy threshold (A-dependent) 00141 // 00142 const G4double Energy = aPart->GetKineticEnergy()/MeV; 00143 const G4int targetAtomicNumber = AA; //@@ Nat mixture (?!) 00144 const G4int targZ = ZZ; 00145 const G4int targN = targetAtomicNumber-targZ; 00146 #ifdef debug 00147 G4cout << "G4PhotoNuclearCrossSection::GetCS:N=" << targN << ",Z=" 00148 << targZ << ",E=" << Energy << G4endl; 00149 #endif 00150 if (Energy<THmin) return 0.; 00151 G4double sigma=0.; 00152 if( aPart->GetDefinition()->GetPDGEncoding() == 22 ) 00153 { 00154 G4double A=targN+targZ; 00155 if(targN!=lastN || targZ!=lastZ) // Otherwise the set of parameters is ready 00156 { 00157 lastN = targN; // The last N of calculated nucleus 00158 lastZ = targZ; // The last Z of calculated nucleus 00159 G4int n=colN.size(); // Size of Associated Memory 00160 G4bool in=false; // The nucleus is in the AssocMem DB 00161 if(n) { 00162 for(G4int i=0; i<n; i++) { 00163 if(colN[i]==targN && colZ[i]==targZ) // Calculated nuclei in DB 00164 { 00165 in=true; // The nucleus is found in the AssocMem DB 00166 lastGDR=GDR[i]; // Pointer to prepared GDR cross sections 00167 lastHEN=HEN[i]; // Pointer to prepared High Energy cross sections 00168 lastTH =eTH[i]; // Energy Threshold 00169 lastSP =spA[i]; // Shadowing coefficient for UHE 00170 } 00171 } 00172 } 00173 #ifdef debug 00174 G4cout<<"G4PhotoNucCrossSect::GetCS:A="<<A<<",n="<<n<<",in="<<in<<G4endl; 00175 #endif 00176 if(!in) // Fill the new set of parameters for the new nucleus 00177 { 00178 G4double lnA=std::log(A); // The nucleus is not found in DB. It is new. 00179 if(A==1.) lastSP=1.; // The Reggeon shadowing (A=1) 00180 else lastSP=A*(1.-shc*lnA); // The Reggeon shadowing 00181 #ifdef debug 00182 G4cout << "G4PhotoNucCrossSect::GetCS: lnA=" 00183 << lnA << ",lastSP=" << lastSP << G4endl; 00184 #endif 00185 lastTH=ThresholdEnergy(targZ, targN); // Energy Threshold 00186 #ifdef debug 00187 G4cout << "G4PhotoNucCrossSect::GetCS: lastTH=" << lastTH << G4endl; 00188 #endif 00189 #ifdef debug3 00190 if(A==3) G4cout << "G4PhotoNucCrossSect::GetCS: lastTH=" 00191 << lastTH << ",lastSP=" << lastSP << G4endl; 00192 #endif 00193 lastGDR = new G4double[nL]; // Allocate memory for the new 00194 // GDR cross sections 00195 lastHEN = new G4double[nH]; // Allocate memory for the new 00196 // HEN cross sections 00197 G4int er=GetFunctions(A,lastGDR,lastHEN); // new ZeroPosition and 00198 // filling of the functions 00199 if(er<1) G4cerr << "***G4PhotoNucCrossSection::GetCrossSection: A=" 00200 << A << " failed" << G4endl; 00201 #ifdef debug 00202 G4cout<<"G4PhotoNucCrossSect::GetCS: GetFunctions er="<<er<<G4endl; 00203 #endif 00204 colN.push_back(targN); 00205 colZ.push_back(targZ); 00206 GDR.push_back(lastGDR); // added GDR, found by AH 10/7/02 00207 HEN.push_back(lastHEN); // added HEN, found by AH 10/7/02 00208 eTH.push_back(lastTH); // Threshold Energy 00209 spA.push_back(lastSP); // Pomeron Shadowing 00210 } // End of creation of the new set of parameters 00211 } // End of parameters udate 00212 00213 // 00214 // =================== NOW the Magic Formula =================== 00215 // 00216 if (Energy<lastTH) 00217 { 00218 lastE=Energy; 00219 lastSig=0.; 00220 return 0.; 00221 } 00222 else if (Energy<Emin) // GDR region (approximated in E, not in lnE) 00223 { 00224 #ifdef debug 00225 G4cout << "G4PNCS::GetCS: before GDR A=" << A 00226 << ", nL=" << nL << ",TH=" << THmin << ",dE=" <<dE << G4endl; 00227 #endif 00228 if(A<=1.) sigma=0.; 00229 else sigma=EquLinearFit(Energy,nL,THmin,dE,lastGDR); 00230 #ifdef debugn 00231 if(sigma<0.) G4cout << "G4PNCS::GetCS:A=" << A << ",E=" << Energy 00232 << ",TH=" << THmin << ",dE=" << dE << G4endl; 00233 #endif 00234 } 00235 else if (Energy<Emax) // High Energy region 00236 { 00237 G4double lE=std::log(Energy); 00238 #ifdef debug 00239 G4cout << "G4PNCS::GetCS: before HEN nH=" << nH << ",iE=" 00240 << milE << ",dlE=" << dlE << G4endl; 00241 #endif 00242 sigma=EquLinearFit(lE,nH,milE,dlE,lastHEN); 00243 } 00244 else // UHE region (calculation, but not so frequent) 00245 { 00246 G4double lE=std::log(Energy); 00247 //G4double sh=shd; 00248 //if(A==1.)sh=shp; 00249 sigma=lastSP*(poc*(lE-pos)+shd*std::exp(-reg*lE)); 00250 } 00251 #ifdef debug 00252 G4cout<<"G4PNCS::GetCS: sigma="<<sigma<<G4endl; 00253 #endif 00254 #ifdef pdebug 00255 if(Energy>45000.&&Energy<60000.)G4cout<<"PN::CS:A="<<A<<",E="<<Energy<<",sigma="<<sigma<<G4endl; 00256 #endif 00257 } // End of "sigma" calculation 00258 else return 0.; 00259 00260 if(sigma<0.) return 0.; 00261 return sigma*millibarn; 00262 }
G4bool G4PhotoNuclearCrossSection::IsIsoApplicable | ( | const G4DynamicParticle * | particle, | |
G4int | , | |||
G4int | , | |||
const G4Element * | , | |||
const G4Material * | ||||
) | [virtual] |
Reimplemented from G4VCrossSectionDataSet.
Definition at line 97 of file G4PhotoNuclearCrossSection.cc.
References G4DynamicParticle::GetDefinition(), and G4ParticleDefinition::GetPDGEncoding().
00100 { 00101 G4bool result = false; 00102 if( particle->GetDefinition()->GetPDGEncoding()==22) result = true; 00103 return result; 00104 }