87 crossSectionHandler(0),
130 G4cout <<
"G4LowEnergyBremsstrahlung::BuildPhysicsTable start"
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;
149 const G4String dataName(
"/brem/br-sp.dat");
153 G4cout <<
"G4LowEnergyBremsstrahlungSpectrum is initialized"
170 <<
" is created; Cross section data: "
183 G4cout <<
"The loss table is built"
206 G4cout <<
"The MeanFreePath table is built"
215 G4cout <<
"G4LowEnergyBremsstrahlung::BuildPhysicsTable end"
247 for (
size_t j=0; j<numOfCouples; j++) {
260 tCut =
std::min(highKineticEnergy, 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")){
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.";
417 else if (name ==
"2bn")
423 else if (name ==
"2bs")
431 G4Exception(
"G4LowEnergyBremsstrahlung::SetAngularGenerator()",
virtual G4double AverageEnergy(G4int Z, G4double minKineticEnergy, G4double maxKineticEnergy, G4double kineticEnergy, G4int shell=0, const G4ParticleDefinition *pd=0) const =0
static G4PhysicsTable ** RecorderOfPositronProcess
static G4double GetUpperBoundEloss()
G4double GetKineticEnergy() const
void BuildDEDXTable(const G4ParticleDefinition &aParticleType)
G4int SelectRandomAtom(const G4MaterialCutsCouple *couple, G4double e) const
G4RDVBremAngularDistribution * TsaiAngularDistribution
G4double GetLowEdgeEnergy(size_t binNumber) const
static constexpr double keV
const G4ElementVector * GetElementVector() const
Hep3Vector & rotateUz(const Hep3Vector &)
void BuildPhysicsTable(const G4ParticleDefinition &particleType)
static G4double GetLowerBoundEloss()
const std::vector< G4double > * GetEnergyCutsVector(size_t pcIdx) const
void AddSecondary(G4Track *aSecondary)
G4ParticleChange aParticleChange
const XML_Char const XML_Char * data
void PrintInfoDefinition()
virtual G4double PolarAngle(const G4double initial_energy, const G4double final_energy, const G4int Z)=0
G4DataVector cutForSecondaryPhotons
static G4int CounterOfPositronProcess
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
virtual G4double SampleEnergy(G4int Z, G4double minKineticEnergy, G4double maxKineticEnergy, G4double kineticEnergy, G4int shell=0, const G4ParticleDefinition *pd=0) const =0
virtual void Initialize(const G4Track &)
G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &step)
~G4LowEnergyBremsstrahlung()
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
static constexpr double electron_mass_c2
G4PhysicsTable * theLossTable
static G4PhysicsTable ** RecorderOfElectronProcess
static G4int GetNbinEloss()
static constexpr double twopi
G4LowEnergyBremsstrahlung(const G4String &processName="LowEnBrem")
const G4String & GetProcessName() const
void ProposeEnergy(G4double finalEnergy)
virtual void PrintGeneratorInformation() const =0
static G4Electron * Electron()
size_t GetTableSize() const
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
static G4ProductionCutsTable * GetProductionCutsTable()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4bool IsApplicable(const G4ParticleDefinition &)
std::vector< G4Element * > G4ElementVector
G4RDVBremAngularDistribution * angularDistribution
void BuildLossTable(const G4ParticleDefinition &ParticleType)
void insert(G4PhysicsVector *)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
void Initialise(G4RDVDataSetAlgorithm *interpolation=0, G4double minE=250 *CLHEP::eV, G4double maxE=100 *CLHEP::GeV, G4int numberOfBins=200, G4double unitE=CLHEP::MeV, G4double unitData=CLHEP::barn, G4int minZ=1, G4int maxZ=99)
void LoadShellData(const G4String &dataFile)
G4GLOB_DLL std::ostream G4cout
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
static G4int CounterOfElectronProcess
const G4Material * GetMaterial() const
const G4double * GetAtomicNumDensityVector() const
G4RDVCrossSectionHandler * crossSectionHandler
void SetCutForLowEnSecPhotons(G4double cut)
virtual const G4RDVEMDataSet * GetComponent(G4int componentId) const =0
const G4ThreeVector & GetMomentumDirection() const
G4RDVEMDataSet * theMeanFreePath
G4double FindValue(G4int Z, G4double e) const
void PutValue(size_t index, G4double theValue)
void SetAngularGenerator(G4RDVBremAngularDistribution *distribution)
size_t GetNumberOfElements() const
virtual void PrintData() const =0
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4RDVEnergySpectrum * energySpectrum
void SetNumberOfSecondaries(G4int totSecondaries)