Import Geant4 11.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2022-12-09 14:43:28 +01:00
parent c07cea1fe0
commit 9f34590941
3810 changed files with 200490 additions and 182326 deletions
@@ -88,7 +88,7 @@ public:
// Glauber-Gribov cross section
void ComputeCrossSections(const G4ParticleDefinition* aParticle,
G4double kinEnergy, G4int Z, G4int A);
G4double kinEnergy, G4int Z, G4int A, G4int nL = 0);
// additional public methods
G4double GetProductionElementCrossSection(const G4ParticleDefinition* aParticle,
@@ -164,12 +164,13 @@ private:
const G4ParticleDefinition* theKMinus;
const G4ParticleDefinition* theK0S;
const G4ParticleDefinition* theK0L;
const G4ParticleDefinition* theLambda;
G4HadronNucleonXsc* hnXsc;
// Cache
const G4ParticleDefinition* fParticle;
G4int fZ, fA;
G4int fZ, fA, fL;
};
@@ -131,6 +131,7 @@ private:
const G4ParticleDefinition* theProton;
const G4ParticleDefinition* theNeutron;
const G4ParticleDefinition* theLambda;
G4ComponentGGHadronNucleusXsc* fHadrNucl;
G4HadronNucleonXsc* fHNXsc;
@@ -94,10 +94,14 @@ public:
void PrintCrossSectionHtml(const G4VCrossSectionDataSet *cs) const;
void AddDataSet(G4VCrossSectionDataSet*);
void AddDataSet(G4VCrossSectionDataSet*, size_t);
void AddDataSet(G4VCrossSectionDataSet*, std::size_t);
inline const std::vector<G4VCrossSectionDataSet*>& GetDataSetList() const;
inline void SetVerboseLevel(G4int value);
// may be used by special processes
inline void SetForcedElement(const G4Element*);
G4CrossSectionDataStore & operator=
(const G4CrossSectionDataStore &right) = delete;
G4CrossSectionDataStore(const G4CrossSectionDataStore&) = delete;
@@ -113,6 +117,7 @@ private:
G4NistManager* nist;
const G4Material* currentMaterial = nullptr;
const G4ParticleDefinition* matParticle = nullptr;
const G4Element* forcedElement = nullptr;
G4double matKinEnergy = 0.0;
G4double matCrossSection = 0.0;
@@ -129,6 +134,17 @@ inline void G4CrossSectionDataStore::SetVerboseLevel(G4int value)
verboseLevel = value;
}
inline void G4CrossSectionDataStore::SetForcedElement(const G4Element* ptr)
{
forcedElement = ptr;
}
inline const std::vector<G4VCrossSectionDataSet*>&
G4CrossSectionDataStore::GetDataSetList() const
{
return dataSetList;
}
inline G4double
G4CrossSectionDataStore::GetCrossSection(const G4DynamicParticle* dp,
const G4Material* mat)
@@ -28,7 +28,7 @@
//
// 14.08.17 V. Grichine
//
//
// 27.10.22 V. Grichine - extension to tau-neutrinos based on mu_nu XS energy scaled
#ifndef G4MuNeutrinoNucleusTotXsc_h
#define G4MuNeutrinoNucleusTotXsc_h
@@ -88,7 +88,7 @@ protected:
G4double fCutEnergy; // minimal recoil electron energy detected
G4double fBiasingFactor; // biasing xsc up
G4double fTotXsc, fCcTotRatio, fCcFactor, fNcFactor, fQEratio;
G4double fEmc;
G4int fIndex;
static const G4double fNuMuEnergy[50];
@@ -97,8 +97,8 @@ protected:
static const G4double fANuMuInXsc[50];
static const G4double fANuMuQeXsc[50];
G4ParticleDefinition* theMuonMinus;
G4ParticleDefinition* theMuonPlus;
// G4ParticleDefinition* theMuonMinus;
// G4ParticleDefinition* theMuonPlus;
};
#endif
@@ -47,7 +47,6 @@
#include "globals.hh"
#include "G4ElementData.hh"
#include "G4PhysicsVector.hh"
#include "G4Threading.hh"
#include <vector>
#include <iostream>
@@ -73,7 +72,19 @@ public:
G4double GetElementCrossSection(const G4DynamicParticle*,
G4int Z, const G4Material*) final;
G4double ComputeCrossSectionPerElement(G4double kinEnergy, G4double loge,
const G4ParticleDefinition*,
const G4Element*,
const G4Material*) final;
G4double ComputeIsoCrossSection(G4double kinEnergy, G4double loge,
const G4ParticleDefinition*,
G4int Z, G4int A,
const G4Isotope* iso,
const G4Element* elm,
const G4Material* mat) final;
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
const G4Isotope* iso,
const G4Element* elm,
@@ -86,6 +97,8 @@ public:
void CrossSectionDescription(std::ostream&) const final;
G4double ElementCrossSection(G4double kinEnergy, G4double loge, G4int Z);
G4double IsoCrossSection(G4double ekin, G4double logekin, G4int Z, G4int A);
G4NeutronCaptureXS & operator=(const G4NeutronCaptureXS &right) = delete;
@@ -114,10 +127,6 @@ private:
static const G4int MAXZCAPTURE = 93;
static G4ElementData* data;
static G4String gDataDirectory;
#ifdef G4MULTITHREADED
static G4Mutex neutronCaptureXSMutex;
#endif
};
inline
@@ -45,7 +45,6 @@
#include "G4VCrossSectionDataSet.hh"
#include "globals.hh"
#include "G4PhysicsVector.hh"
#include "G4Threading.hh"
#include <vector>
class G4DynamicParticle;
@@ -77,6 +76,18 @@ public:
const G4Element* elm,
const G4Material* mat) final;
G4double ComputeCrossSectionPerElement(G4double kinEnergy, G4double loge,
const G4ParticleDefinition*,
const G4Element*,
const G4Material*) final;
G4double ComputeIsoCrossSection(G4double kinEnergy, G4double loge,
const G4ParticleDefinition*,
G4int Z, G4int A,
const G4Isotope* iso,
const G4Element* elm,
const G4Material* mat) final;
const G4Isotope* SelectIsotope(const G4Element*,
G4double kinEnergy, G4double logE) final;
@@ -84,6 +95,8 @@ public:
void CrossSectionDescription(std::ostream&) const final;
G4double ElementCrossSection(G4double kinEnergy, G4double loge, G4int Z);
G4NeutronElasticXS & operator=(const G4NeutronElasticXS &right) = delete;
G4NeutronElasticXS(const G4NeutronElasticXS&) = delete;
@@ -106,10 +119,6 @@ private:
static G4PhysicsVector* data[MAXZEL];
static G4double coeff[MAXZEL];
static G4String gDataDirectory;
#ifdef G4MULTITHREADED
static G4Mutex neutronElasticXSMutex;
#endif
};
inline
@@ -45,7 +45,6 @@
#include "globals.hh"
#include "G4ElementData.hh"
#include "G4PhysicsVector.hh"
#include "G4Threading.hh"
#include <vector>
class G4DynamicParticle;
@@ -72,6 +71,18 @@ public:
G4double GetElementCrossSection(const G4DynamicParticle*,
G4int Z, const G4Material*) final;
G4double ComputeCrossSectionPerElement(G4double kinEnergy, G4double loge,
const G4ParticleDefinition*,
const G4Element*,
const G4Material*) final;
G4double ComputeIsoCrossSection(G4double kinEnergy, G4double loge,
const G4ParticleDefinition*,
G4int Z, G4int A,
const G4Isotope* iso,
const G4Element* elm,
const G4Material* mat) final;
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
const G4Isotope* iso,
const G4Element* elm,
@@ -84,6 +95,8 @@ public:
void CrossSectionDescription(std::ostream&) const final;
G4double ElementCrossSection(G4double kinEnergy, G4double loge, G4int Z);
G4double IsoCrossSection(G4double ekin, G4double logekin, G4int Z, G4int A);
G4NeutronInelasticXS & operator=(const G4NeutronInelasticXS &right) = delete;
@@ -107,16 +120,14 @@ private:
std::vector<G4double> temp;
G4bool isMaster = false;
G4double elimit;
G4bool isMaster = false;
static const G4int MAXZINEL = 93;
static G4ElementData* data;
static G4double coeff[MAXZINEL];
static G4String gDataDirectory;
#ifdef G4MULTITHREADED
static G4Mutex neutronInelasticXSMutex;
#endif
};
inline
@@ -46,7 +46,6 @@
#include "globals.hh"
#include "G4ElementData.hh"
#include "G4PhysicsVector.hh"
#include "G4Threading.hh"
#include <vector>
class G4DynamicParticle;
@@ -72,6 +71,18 @@ public:
G4double GetElementCrossSection(const G4DynamicParticle*, G4int Z,
const G4Material* mat = nullptr) final;
G4double ComputeCrossSectionPerElement(G4double kinEnergy, G4double loge,
const G4ParticleDefinition*,
const G4Element*,
const G4Material*) final;
G4double ComputeIsoCrossSection(G4double kinEnergy, G4double loge,
const G4ParticleDefinition*,
G4int Z, G4int A,
const G4Isotope* iso,
const G4Element* elm,
const G4Material* mat) final;
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
const G4Isotope* iso = nullptr,
const G4Element* elm = nullptr,
@@ -84,6 +95,8 @@ public:
void CrossSectionDescription(std::ostream&) const final;
G4double ElementCrossSection(G4double kinEnergy, G4double loge, G4int Z);
G4double IsoCrossSection(G4double ekin, G4double logE, G4int Z, G4int A);
G4ParticleInelasticXS & operator=
@@ -106,6 +119,7 @@ private:
const G4ParticleDefinition* particle;
std::vector<G4double> temp;
G4double elimit;
G4int index = 0;
G4bool isMaster = false;
@@ -114,10 +128,6 @@ private:
static G4ElementData* data[5];
static G4double coeff[MAXZINELP][5];
static G4String gDataDirectory[5];
#ifdef G4MULTITHREADED
static G4Mutex particleInelasticXSMutex;
#endif
};
inline
@@ -0,0 +1,104 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// The total muon (anti)neutrino-nucleus cross sections in the
// simplified form as A-multiplied nu_mu-nucleon cross-sections
//
// 14.08.17 V. Grichine
//
// 31.10.22 V. Grichine - extension to tau-neutrinos based on mu_nu XS energy scaled
#ifndef G4TauNeutrinoNucleusTotXsc_h
#define G4TauNeutrinoNucleusTotXsc_h
#include "globals.hh"
#include "G4VCrossSectionDataSet.hh"
class G4ParticleDefinition;
class G4TauNeutrinoNucleusTotXsc : public G4VCrossSectionDataSet
{
public:
G4TauNeutrinoNucleusTotXsc();
~G4TauNeutrinoNucleusTotXsc();
virtual
G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A, const G4Element*, const G4Material*);
virtual
G4bool IsElementApplicable(const G4DynamicParticle*, G4int , const G4Material*){ return true; };
// virtual G4double GetElementCrossSection(const G4DynamicParticle*, G4int Z, const G4Material*);
virtual G4double GetElementCrossSection(const G4DynamicParticle* dynPart,
G4int Z,
const G4Material* mat);
virtual
G4double GetIsoCrossSection(const G4DynamicParticle* aPart, G4int Z, G4int A,
const G4Isotope*,
const G4Element*,
const G4Material*);
G4int GetEnergyIndex(G4double energy);
G4double GetNuMuTotCsXsc(G4int index, G4double energy, G4int Z, G4int A);
G4double GetANuMuTotCsXsc(G4int index, G4double energy, G4int Z, G4int A);
G4double GetNuMuTotCsArray(G4int index);
G4double GetANuMuTotCsArray(G4int index);
void SetCutEnergy(G4double ec){fCutEnergy=ec;};
G4double GetCutEnergy(){return fCutEnergy;};
void SetBiasingFactor(G4double bf){fBiasingFactor=bf;};
G4double GetBiasingFactor(){return fBiasingFactor;};
G4double GetTotXsc(){return fTotXsc;};
G4double GetCcTotRatio(){return fCcTotRatio;};
G4double GetQEratio(){return fQEratio;};
protected:
G4double fCofXsc; // 2*Gf*Gf*MeC2/pi
G4double fSin2tW; // sin^2theta_Weinberg
G4double fCofS, fCofL;
G4double fCutEnergy; // minimal recoil electron energy detected
G4double fBiasingFactor; // biasing xsc up
G4double fTotXsc, fCcTotRatio, fCcFactor, fNcFactor, fQEratio;
G4double fEmc, fEtc, fDtc;
G4int fIndex;
static const G4double fNuMuEnergy[50];
static const G4double fNuMuInXsc[50];
static const G4double fNuMuQeXsc[50];
static const G4double fANuMuInXsc[50];
static const G4double fANuMuQeXsc[50];
// G4ParticleDefinition* theMuonMinus;
// G4ParticleDefinition* theMuonPlus;
};
#endif
@@ -105,20 +105,35 @@ public: //with description
const G4Element*,
const G4Material* mat = nullptr);
// Implement this method for element-wise cross section
// Implement element cross section, IsApplicable does not checked.
// In the default implementation a sum of isotope cross sections is computed
virtual
G4double ComputeCrossSectionPerElement(G4double kinEnergy, G4double loge,
const G4ParticleDefinition*,
const G4Element*,
const G4Material* mat = nullptr);
// Implement these methods for element-wise cross section
virtual
G4double GetElementCrossSection(const G4DynamicParticle*, G4int Z,
const G4Material* mat = nullptr);
// Derived classes should implement this method if they provide isotope-wise
// cross sections. Default arguments G4Element and G4Material are needed to
// access low-energy neutron cross sections, but are not required for others.
// Derived classes should implement these methods if they provide isotope-wise
// cross sections. Extra arguments G4Isotope, G4Element, and G4Material are
// needed to access low-energy neutron cross sections, but not in other cases.
virtual
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
const G4Isotope* iso = nullptr,
const G4Element* elm = nullptr,
const G4Material* mat = nullptr);
virtual
G4double ComputeIsoCrossSection(G4double kinEnergy, G4double loge,
const G4ParticleDefinition*, G4int Z, G4int A,
const G4Isotope* iso = nullptr,
const G4Element* elm = nullptr,
const G4Material* mat = nullptr);
//=====================================================================
// Implement this method if needed