87 crossSectionHandler(0),
93 generatorName =
"tsai";
118 if(crossSectionHandler)
delete crossSectionHandler;
119 if(energySpectrum)
delete energySpectrum;
120 if(theMeanFreePath)
delete theMeanFreePath;
121 delete angularDistribution;
122 delete TsaiAngularDistribution;
130 G4cout <<
"G4LowEnergyBremsstrahlung::BuildPhysicsTable start"
134 cutForSecondaryPhotons.clear();
137 if( energySpectrum != 0 )
delete energySpectrum;
139 for(
size_t i=0; i<15; i++) {
142 if(i == 10) x = 0.95;
143 if(i == 11) x = 0.97;
144 if(i == 12) x = 0.99;
145 if(i == 13) x = 0.995;
147 energyBins.push_back(x);
149 const G4String dataName(
"/brem/br-sp.dat");
153 G4cout <<
"G4LowEnergyBremsstrahlungSpectrum is initialized"
159 if( crossSectionHandler != 0 )
delete crossSectionHandler;
165 crossSectionHandler->
Initialise(0,lowKineticEnergy, highKineticEnergy, totBin);
170 <<
" is created; Cross section data: "
180 BuildLossTable(aParticleType);
183 G4cout <<
"The loss table is built"
201 if( theMeanFreePath != 0 )
delete theMeanFreePath;
202 theMeanFreePath = crossSectionHandler->
203 BuildMeanFreePathForMaterials(&cutForSecondaryPhotons);
206 G4cout <<
"The MeanFreePath table is built"
215 G4cout <<
"G4LowEnergyBremsstrahlung::BuildPhysicsTable end"
243 cutForSecondaryPhotons.clear();
247 for (
size_t j=0; j<numOfCouples; j++) {
260 tCut = std::min(highKineticEnergy, tCut);
261 cutForSecondaryPhotons.push_back(tCut);
265 const G4double* theAtomicNumDensityVector =
268 G4cout <<
"Energy loss for material # " << j
269 <<
" tCut(keV)= " << tCut/
keV
274 for (
size_t i = 0; i<totBin; i++) {
280 for (
size_t iel=0; iel<NumberOfElements; iel++ ) {
281 G4int Z = (
G4int)((*theElementVector)[iel]->GetZ());
284 ionloss += e * cs * theAtomicNumDensityVector[iel];
287 <<
"; tCut(keV)= " << tCut/
keV
288 <<
"; E(keV)= " << lowEdgeEnergy/
keV
289 <<
"; Eav(keV)= " << e/
keV
291 <<
"; loss= " << ionloss
313 if(tCut >= kineticEnergy)
320 G4double finalEnergy = kineticEnergy - tGamma;
323 if((kineticEnergy < 1*MeV && kineticEnergy > 1*
keV && generatorName ==
"2bn")){
324 theta = angularDistribution->
PolarAngle(kineticEnergy,finalEnergy,Z);
326 theta = TsaiAngularDistribution->
PolarAngle(kineticEnergy,finalEnergy,Z);
331 G4double sinTheta = std::sqrt(1. - dirZ*dirZ);
332 G4double dirX = sinTheta*std::cos(phi);
333 G4double dirY = sinTheta*std::sin(phi);
341 gammaDirection.
rotateUz(electronDirection);
344 if (finalEnergy < 0.) {
345 tGamma += finalEnergy;
349 G4double momentum = std::sqrt((totalEnergy + electron_mass_c2)*kineticEnergy);
351 G4double finalX = momentum*electronDirection.
x() - tGamma*gammaDirection.
x();
352 G4double finalY = momentum*electronDirection.
y() - tGamma*gammaDirection.
y();
353 G4double finalZ = momentum*electronDirection.
z() - tGamma*gammaDirection.
z();
356 G4double norm = 1./std::sqrt(finalX*finalX + finalY*finalY + finalZ*finalZ);
362 gammaDirection, tGamma);
371 G4String comments =
"Total cross sections from EEDL database.";
372 comments +=
"\n Gamma energy sampled from a parameterised formula.";
373 comments +=
"\n Implementation of the continuous dE/dx part.";
374 comments +=
"\n At present it can be used for electrons ";
375 comments +=
"in the energy range [250eV,100GeV].";
376 comments +=
"\n The process must work with G4LowEnergyIonisation.";
405 angularDistribution = distribution;
413 delete angularDistribution;
415 generatorName =
name;
417 else if (name ==
"2bn")
419 delete angularDistribution;
421 generatorName =
name;
423 else if (name ==
"2bs")
425 delete angularDistribution;
427 generatorName =
name;
431 G4Exception(
"G4LowEnergyBremsstrahlung::SetAngularGenerator()",