Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PhotoNuclearCrossSection Class Reference

#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 *)
 
- Public Member Functions inherited from G4VCrossSectionDataSet
 G4VCrossSectionDataSet (const G4String &nam="")
 
virtual ~G4VCrossSectionDataSet ()
 
virtual G4bool IsElementApplicable (const G4DynamicParticle *, G4int Z, const G4Material *mat=0)
 
virtual G4bool IsIsoApplicable (const G4DynamicParticle *, G4int Z, G4int A, const G4Element *elm=0, const G4Material *mat=0)
 
G4double GetCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=0)
 
G4double ComputeCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=0)
 
virtual G4double GetElementCrossSection (const G4DynamicParticle *, G4int Z, const G4Material *mat=0)
 
virtual G4double GetIsoCrossSection (const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
 
virtual G4IsotopeSelectIsotope (const G4Element *, G4double kinEnergy)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void DumpPhysicsTable (const G4ParticleDefinition &)
 
virtual void CrossSectionDescription (std::ostream &) const
 
void SetVerboseLevel (G4int value)
 
G4double GetMinKinEnergy () const
 
void SetMinKinEnergy (G4double value)
 
G4double GetMaxKinEnergy () const
 
void SetMaxKinEnergy (G4double value)
 
const G4StringGetName () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VCrossSectionDataSet
void SetName (const G4String &)
 
- Protected Attributes inherited from G4VCrossSectionDataSet
G4int verboseLevel
 

Detailed Description

Definition at line 42 of file G4PhotoNuclearCrossSection.hh.

Constructor & Destructor Documentation

◆ G4PhotoNuclearCrossSection()

G4PhotoNuclearCrossSection::G4PhotoNuclearCrossSection ( const G4String name = "PhotoNuclearXS")

◆ ~G4PhotoNuclearCrossSection()

G4PhotoNuclearCrossSection::~G4PhotoNuclearCrossSection ( )
virtual

Definition at line 76 of file G4PhotoNuclearCrossSection.cc.

77{
78 std::vector<G4double*>::iterator pos;
79 for(pos=GDR.begin(); pos<GDR.end(); pos++)
80 { delete [] *pos; }
81 GDR.clear();
82 for(pos=HEN.begin(); pos<HEN.end(); pos++)
83 { delete [] *pos; }
84 HEN.clear();
85}

Member Function Documentation

◆ CrossSectionDescription()

void G4PhotoNuclearCrossSection::CrossSectionDescription ( std::ostream &  outFile) const
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 88 of file G4PhotoNuclearCrossSection.cc.

89{
90 outFile << "G4PhotoNuclearCrossSection provides the total inelastic\n"
91 << "cross section for photon interactions with nuclei. The\n"
92 << "cross section is a parameterization of data which covers\n"
93 << "all incident gamma energies.\n";
94}

◆ GetIsoCrossSection()

G4double G4PhotoNuclearCrossSection::GetIsoCrossSection ( const G4DynamicParticle aPart,
G4int  ZZ,
G4int  AA,
const G4Isotope ,
const G4Element ,
const G4Material  
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 109 of file G4PhotoNuclearCrossSection.cc.

112{
113 static const G4double THmin=2.; // minimum Energy Threshold
114 static const G4double dE=1.; // step for the GDR table
115 static const G4int nL=105; // A#of GDResonance points in E
116 // (each MeV from 2 to 106)
117 static const G4double Emin=THmin+(nL-1)*dE; // minE for the HighE part
118 static const G4double Emax=50000.; // maxE for the HighE part
119 static const G4int nH=224; // A#of HResonance points in lnE
120 static const G4double milE=std::log(Emin); // Low logarithm energy for
121 // the HighE part
122 static const G4double malE=std::log(Emax); // High logarithm energy
123 // (each 2.75 percent)
124 static const G4double dlE=(malE-milE)/(nH-1); // Step in logarithm energy
125 // in the HighE part
126 //
127 //static const G4double shd=1.075-.0023*std::log(2.); // HE PomShadowing(D)
128 static const G4double shd=1.0734; // HE PomShadowing(D)
129 static const G4double shc=0.072; // HE Shadowing constant
130 static const G4double poc=0.0375; // HE Pomeron coefficient
131 static const G4double pos=16.5; // HE Pomeron shift
132 static const G4double reg=.11; // HE Reggeon slope
133 //static const G4double shp=1.075; // HE PomShadowing(P)
134
135 // Associative memory for acceleration
136
137 static std::vector <G4int> colN; // N of calculated nuclei
138 static std::vector <G4int> colZ; // Z of calculated nuclei
139 static std::vector <G4double> spA; // shadowing coefficients (A-dependent)
140 static std::vector <G4double> eTH; // energy threshold (A-dependent)
141 //
142 const G4double Energy = aPart->GetKineticEnergy()/MeV;
143 const G4int targetAtomicNumber = AA; //@@ Nat mixture (?!)
144 const G4int targZ = ZZ;
145 const G4int targN = targetAtomicNumber-targZ;
146#ifdef debug
147 G4cout << "G4PhotoNuclearCrossSection::GetCS:N=" << targN << ",Z="
148 << targZ << ",E=" << Energy << G4endl;
149#endif
150 if (Energy<THmin) return 0.;
151 G4double sigma=0.;
152 if( aPart->GetDefinition()->GetPDGEncoding() == 22 )
153 {
154 G4double A=targN+targZ;
155 if(targN!=lastN || targZ!=lastZ) // Otherwise the set of parameters is ready
156 {
157 lastN = targN; // The last N of calculated nucleus
158 lastZ = targZ; // The last Z of calculated nucleus
159 G4int n=colN.size(); // Size of Associated Memory
160 G4bool in=false; // The nucleus is in the AssocMem DB
161 if(n) {
162 for(G4int i=0; i<n; i++) {
163 if(colN[i]==targN && colZ[i]==targZ) // Calculated nuclei in DB
164 {
165 in=true; // The nucleus is found in the AssocMem DB
166 lastGDR=GDR[i]; // Pointer to prepared GDR cross sections
167 lastHEN=HEN[i]; // Pointer to prepared High Energy cross sections
168 lastTH =eTH[i]; // Energy Threshold
169 lastSP =spA[i]; // Shadowing coefficient for UHE
170 }
171 }
172 }
173#ifdef debug
174 G4cout<<"G4PhotoNucCrossSect::GetCS:A="<<A<<",n="<<n<<",in="<<in<<G4endl;
175#endif
176 if(!in) // Fill the new set of parameters for the new nucleus
177 {
178 G4double lnA=std::log(A); // The nucleus is not found in DB. It is new.
179 if(A==1.) lastSP=1.; // The Reggeon shadowing (A=1)
180 else lastSP=A*(1.-shc*lnA); // The Reggeon shadowing
181#ifdef debug
182 G4cout << "G4PhotoNucCrossSect::GetCS: lnA="
183 << lnA << ",lastSP=" << lastSP << G4endl;
184#endif
185 lastTH=ThresholdEnergy(targZ, targN); // Energy Threshold
186#ifdef debug
187 G4cout << "G4PhotoNucCrossSect::GetCS: lastTH=" << lastTH << G4endl;
188#endif
189#ifdef debug3
190 if(A==3) G4cout << "G4PhotoNucCrossSect::GetCS: lastTH="
191 << lastTH << ",lastSP=" << lastSP << G4endl;
192#endif
193 lastGDR = new G4double[nL]; // Allocate memory for the new
194 // GDR cross sections
195 lastHEN = new G4double[nH]; // Allocate memory for the new
196 // HEN cross sections
197 G4int er=GetFunctions(A,lastGDR,lastHEN); // new ZeroPosition and
198 // filling of the functions
199 if(er<1) G4cerr << "***G4PhotoNucCrossSection::GetCrossSection: A="
200 << A << " failed" << G4endl;
201#ifdef debug
202 G4cout<<"G4PhotoNucCrossSect::GetCS: GetFunctions er="<<er<<G4endl;
203#endif
204 colN.push_back(targN);
205 colZ.push_back(targZ);
206 GDR.push_back(lastGDR); // added GDR, found by AH 10/7/02
207 HEN.push_back(lastHEN); // added HEN, found by AH 10/7/02
208 eTH.push_back(lastTH); // Threshold Energy
209 spA.push_back(lastSP); // Pomeron Shadowing
210 } // End of creation of the new set of parameters
211 } // End of parameters udate
212
213 //
214 // =================== NOW the Magic Formula ===================
215 //
216 if (Energy<lastTH)
217 {
218 lastE=Energy;
219 lastSig=0.;
220 return 0.;
221 }
222 else if (Energy<Emin) // GDR region (approximated in E, not in lnE)
223 {
224#ifdef debug
225 G4cout << "G4PNCS::GetCS: before GDR A=" << A
226 << ", nL=" << nL << ",TH=" << THmin << ",dE=" <<dE << G4endl;
227#endif
228 if(A<=1.) sigma=0.;
229 else sigma=EquLinearFit(Energy,nL,THmin,dE,lastGDR);
230#ifdef debugn
231 if(sigma<0.) G4cout << "G4PNCS::GetCS:A=" << A << ",E=" << Energy
232 << ",TH=" << THmin << ",dE=" << dE << G4endl;
233#endif
234 }
235 else if (Energy<Emax) // High Energy region
236 {
237 G4double lE=std::log(Energy);
238#ifdef debug
239 G4cout << "G4PNCS::GetCS: before HEN nH=" << nH << ",iE="
240 << milE << ",dlE=" << dlE << G4endl;
241#endif
242 sigma=EquLinearFit(lE,nH,milE,dlE,lastHEN);
243 }
244 else // UHE region (calculation, but not so frequent)
245 {
246 G4double lE=std::log(Energy);
247 //G4double sh=shd;
248 //if(A==1.)sh=shp;
249 sigma=lastSP*(poc*(lE-pos)+shd*std::exp(-reg*lE));
250 }
251#ifdef debug
252 G4cout<<"G4PNCS::GetCS: sigma="<<sigma<<G4endl;
253#endif
254#ifdef pdebug
255 if(Energy>45000.&&Energy<60000.)G4cout<<"PN::CS:A="<<A<<",E="<<Energy<<",sigma="<<sigma<<G4endl;
256#endif
257 } // End of "sigma" calculation
258 else return 0.;
259
260 if(sigma<0.) return 0.;
261 return sigma*millibarn;
262}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const

◆ IsIsoApplicable()

G4bool G4PhotoNuclearCrossSection::IsIsoApplicable ( const G4DynamicParticle particle,
G4int  ,
G4int  ,
const G4Element ,
const G4Material  
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 97 of file G4PhotoNuclearCrossSection.cc.

100{
101 G4bool result = false;
102 if( particle->GetDefinition()->GetPDGEncoding()==22) result = true;
103 return result;
104}

The documentation for this class was generated from the following files: