Import Geant4 11.2.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2023-06-30 09:09:57 +02:00
parent aef78ca386
commit dd1f179cda
3780 changed files with 212808 additions and 142780 deletions
@@ -46,7 +46,7 @@ class G4BetaDecayCorrections
const G4double& p_e, const G4double& e_nu);
private:
G4double ModSquared(const G4double& x, const G4double& y);
G4double ModSquared(const G4double& x, G4double y);
G4double Gamma(const G4double& arg);
const G4int Z;
@@ -55,6 +55,7 @@ class G4BetaDecayCorrections
G4double Rnuc; // Nuclear radius
G4double V0; // Electron screening potential
G4double gamma0;
G4double imMax; // largest allowed im argument of ModSquared
G4double gc[6]; // Real gamma function polynomial coefficients
};
@@ -38,7 +38,7 @@
#include "G4NuclearDecay.hh"
#include "G4BetaDecayType.hh"
#include "Randomize.hh"
#include "G4BetaSpectrumSampler.hh"
class G4BetaMinusDecay : public G4NuclearDecay
@@ -60,7 +60,7 @@ class G4BetaMinusDecay : public G4NuclearDecay
const G4BetaDecayType& type);
const G4double endpointEnergy;
G4RandGeneral* spectrumSampler;
G4BetaSpectrumSampler* betaSampler;
};
#endif
@@ -38,7 +38,7 @@
#include "G4NuclearDecay.hh"
#include "G4BetaDecayType.hh"
#include "Randomize.hh"
#include "G4BetaSpectrumSampler.hh"
class G4BetaPlusDecay : public G4NuclearDecay
@@ -60,7 +60,7 @@ class G4BetaPlusDecay : public G4NuclearDecay
const G4BetaDecayType& type);
const G4double endpointEnergy;
G4RandGeneral* spectrumSampler;
G4BetaSpectrumSampler* betaSampler;
};
#endif
@@ -0,0 +1,67 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
////////////////////////////////////////////////////////////////////////////////
// //
// File: G4BetaSpectrumSampler.hh //
// Author: D.H. Wright //
// Date: 21 November 2022 //
// Description: samples a spectrum which is a piece-wise linear function of //
// energy. The CDF is calculated by trapezoidal integration //
// and within bins the line y = mx + b is sampled. //
// //
////////////////////////////////////////////////////////////////////////////////
#ifndef G4BetaSpectrumSampler_h
#define G4BetaSpectrumSampler_h 1
#include "globals.hh"
#include "Randomize.hh"
#include <vector>
class G4BetaSpectrumSampler
{
public:
G4BetaSpectrumSampler(const G4double* aPDF, G4int pdfSize, G4double e);
~G4BetaSpectrumSampler() = default;
G4double shoot();
private:
G4double sampleSlopedLine(); // Method to sample under sloped line
std::vector<double> pdf; // Spectrum shape
std::vector<double> cdf; // Cumulative distribution function
G4double eEnd; // Endpoint energy of spectrum
G4int nBins; // Number of lower bin edges in spectrum
G4int lowerBinEdge; // Index of lower bin edge
G4int upperBinEdge; // Index of upper bin edge
G4double ylower{0.0}; // Value at lower bin edge
G4double yupper{0.0}; // Value at upper bin edge
};
#endif
@@ -216,16 +216,10 @@ class G4RadioactiveDecay : public G4VRestDiscreteProcess
std::map<G4int, G4String> theUserRadioactiveDataFiles;
//The last RadDecayMode
G4RadioactiveDecayMode theRadDecayMode;
// // Library of decay tables
// DecayTableMap* dkmap;
// #ifdef G4MULTITHREADED
// static DecayTableMap* master_dkmap;
// #endif
G4RadioactiveDecayMode theRadDecayMode{G4RadioactiveDecayMode::IT};
// Remainder of life time at rest
G4double fRemainderLifeTime;
G4double fRemainderLifeTime{0.0};
G4int verboseLevel;
// Ignore radioactive decays at rest of nuclides happening after this (very long) time threshold