Import Geant4 10.5.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2018-06-29 10:58:11 +02:00
parent fe81a77428
commit 6aa23be517
1581 changed files with 124288 additions and 83758 deletions
@@ -70,6 +70,7 @@ public:
// Cross section per unit volume is computed (inverse mean free path)
inline G4double GetCrossSection(const G4DynamicParticle*, const G4Material*);
G4double ComputeCrossSection(const G4DynamicParticle*, const G4Material*);
// Cross section per element is computed
G4double GetCrossSection(const G4DynamicParticle*,
@@ -81,8 +82,8 @@ public:
const G4Element*, const G4Material*);
// Sample Z and A of a target nucleus and upload into G4Nucleus
G4Element* SampleZandA(const G4DynamicParticle*, const G4Material*,
G4Nucleus& target);
const G4Element* SampleZandA(const G4DynamicParticle*, const G4Material*,
G4Nucleus& target);
// Initialisation before run
void BuildPhysicsTable(const G4ParticleDefinition&);
@@ -94,7 +95,7 @@ public:
void DumpHtml(const G4ParticleDefinition&, std::ofstream&) const;
void PrintCrossSectionHtml(const G4VCrossSectionDataSet *cs) const;
inline void AddDataSet(G4VCrossSectionDataSet*);
void AddDataSet(G4VCrossSectionDataSet*);
void AddDataSet(G4VCrossSectionDataSet*,size_t);
inline void SetVerboseLevel(G4int value);
@@ -158,12 +159,6 @@ inline G4double G4CrossSectionDataStore::GetCrossSection(const G4DynamicParticle
return GetCrossSection( particle , material , false);
}
inline void G4CrossSectionDataStore::AddDataSet(G4VCrossSectionDataSet* p)
{
dataSetList.push_back(p);
++nDataSetList;
}
inline void G4CrossSectionDataStore::SetVerboseLevel(G4int value)
{
verboseLevel = value;
@@ -105,8 +105,7 @@ template <typename T> class G4CrossSectionFactory<T,2> : public G4VBaseXSFactory
virtual G4VCrossSectionDataSet* Instantiate()
{
static G4ThreadLocal T* shared = 0;
if (!shared) { shared = new T(); }
static G4ThreadLocal T* shared = new T();
return shared;
}
};
@@ -0,0 +1,142 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: G4HadronXSDataTable.hh 96794 2016-05-09 10:09:30Z gcosmo $
//
//---------------------------------------------------------------------------
//
// GEANT4 Class file
//
// Description: Data structure for cross sections per materials
//
// Author: V.Ivanchenko 31.05.2018
//
// Modifications:
//
//----------------------------------------------------------------------------
//
#ifndef HadronXSDataTable_h
#define HadronXSDataTable_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "globals.hh"
#include "G4Element.hh"
#include "G4ElementVector.hh"
#include "G4PhysicsVector.hh"
#include "Randomize.hh"
#include <vector>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4Material;
class G4DynamicParticle;
class G4CrossSectionDataStore;
class G4HadElementSelector
{
public:
G4HadElementSelector(G4DynamicParticle*, G4CrossSectionDataStore*,
const G4Material*, G4int bins,
G4double emin, G4double emax, G4bool spline);
~G4HadElementSelector();
void Dump();
inline const G4Element* SelectRandomAtom(G4double e) const
{
const G4Element* element = (*theElementVector)[nElmMinusOne];
if (nElmMinusOne > 0) {
G4double x = G4UniformRand();
for(G4int i=0; i<nElmMinusOne; ++i) {
if (x <= xSections[i]->Value(e)) {
element = (*theElementVector)[i];
break;
}
}
}
return element;
}
private:
G4HadElementSelector(G4HadElementSelector &) = delete;
G4HadElementSelector& operator=(const G4HadElementSelector &right) = delete;
G4int nElmMinusOne;
const G4ElementVector* theElementVector;
std::vector<G4PhysicsVector*> xSections;
};
class G4HadronXSDataTable
{
public:
explicit G4HadronXSDataTable();
~G4HadronXSDataTable();
void Initialise(G4DynamicParticle*, G4CrossSectionDataStore*,
G4int bins, G4double emin, G4double emax,
G4bool spline);
inline const G4PhysicsVector* HasData(size_t idx) const
{
return xsData[idx];
};
inline G4double GetCrossSection(G4double e, size_t idx) const
{
return xsData[idx]->Value(e);
};
inline const G4Element* SelectRandomAtom(G4double e, size_t idx) const
{
return elmSelectors[idx]->SelectRandomAtom(e);
};
void Dump();
private:
// Assignment operator and copy constructor
G4HadronXSDataTable & operator=
(const G4HadronXSDataTable &right) = delete;
G4HadronXSDataTable(const G4HadronXSDataTable&) = delete;
std::vector<G4PhysicsVector*> xsData;
std::vector<G4HadElementSelector*> elmSelectors;
size_t nMaterials;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -57,6 +57,7 @@ public:
G4double GetCutEnergy(){return fCutEnergy;};
void SetBiasingFactor(G4double bf){fBiasingFactor=bf;};
G4double GetBiasingFactor(){return fBiasingFactor;};
protected:
@@ -55,6 +55,7 @@ public:
G4double GetCutEnergy(){return fCutEnergy;};
void SetBiasingFactor(G4double bf){fBiasingFactor=bf;};
G4double GetBiasingFactor(){return fBiasingFactor;};
protected:
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Neutrino electron total (Cc+Nc) cross sections
//
// 27.11.17 V. Grichine
//
//
#ifndef G4NeutrinoElectronTotXsc_h
#define G4NeutrinoElectronTotXsc_h
#include "globals.hh"
#include "G4VCrossSectionDataSet.hh"
class G4NeutrinoElectronCcXsc;
class G4NeutrinoElectronNcXsc;
class G4NeutrinoElectronTotXsc : public G4VCrossSectionDataSet
{
public:
G4NeutrinoElectronTotXsc();
~G4NeutrinoElectronTotXsc();
virtual
G4bool IsElementApplicable(const G4DynamicParticle*, G4int Z, const G4Material*);
virtual
G4double GetElementCrossSection(const G4DynamicParticle*,
G4int Z, const G4Material*);
void SetCutEnergy(G4double ec){fCutEnergy=ec;};
G4double GetCutEnergy(){return fCutEnergy;};
void SetBiasingFactor(G4double bf);
void SetBiasingFactors(G4double bfCc, G4double bfNc); // for separate testing
G4double GetBiasingFactor(){return fBiasingFactor;};
G4double GetCcRatio(){return fCcRatio;};
protected:
G4NeutrinoElectronCcXsc* fCcXsc;
G4NeutrinoElectronNcXsc* fNcXsc;
G4double fCutEnergy; // min detected recoil energy
G4double fBiasingFactor; // biasing xsc up
G4double fCcRatio; // biasing xsc up
};
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NeutronCaptureXS.hh 91580 2015-07-27 12:55:01Z gcosmo $
// $Id: G4NeutronCaptureXS.hh 110787 2018-06-14 06:43:31Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -48,6 +48,7 @@
#include "G4VCrossSectionDataSet.hh"
#include "globals.hh"
#include "G4ElementData.hh"
#include "G4Threading.hh"
#include <vector>
#include <iostream>
@@ -60,9 +61,9 @@ class G4PhysicsVector;
class G4NeutronCaptureXS : public G4VCrossSectionDataSet
{
public: // With Description
public:
G4NeutronCaptureXS();
explicit G4NeutronCaptureXS();
virtual ~G4NeutronCaptureXS();
@@ -78,7 +79,7 @@ public: // With Description
virtual
G4double GetElementCrossSection(const G4DynamicParticle*,
G4int Z, const G4Material* mat=0);
G4int Z, const G4Material* mat=nullptr);
virtual
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
@@ -86,7 +87,7 @@ public: // With Description
const G4Element* elm,
const G4Material* mat);
virtual G4Isotope* SelectIsotope(const G4Element*, G4double kinEnergy);
virtual const G4Isotope* SelectIsotope(const G4Element*, G4double kinEnergy);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&);
@@ -95,7 +96,7 @@ public: // With Description
private:
void Initialise(G4int Z, const char* = 0);
void Initialise(G4int Z, const char*);
G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn);
@@ -115,6 +116,9 @@ private:
static const G4int amin[MAXZCAPTURE];
static const G4int amax[MAXZCAPTURE];
#ifdef G4MULTITHREADED
static G4Mutex neutronCaptureXSMutex;
#endif
};
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NeutronElasticXS.hh 93682 2015-10-28 10:09:49Z gcosmo $
// $Id: G4NeutronElasticXS.hh 110543 2018-05-29 13:38:54Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -47,7 +47,9 @@
#include "G4VCrossSectionDataSet.hh"
#include "globals.hh"
#include "G4Threading.hh"
#include <vector>
#include <iostream>
const G4int MAXZEL = 93;
@@ -60,9 +62,9 @@ class G4HadronNucleonXsc;
class G4NeutronElasticXS : public G4VCrossSectionDataSet
{
public: // With Description
public:
G4NeutronElasticXS();
explicit G4NeutronElasticXS();
virtual ~G4NeutronElasticXS();
@@ -74,7 +76,7 @@ public: // With Description
virtual
G4double GetElementCrossSection(const G4DynamicParticle*,
G4int Z, const G4Material* mat=0);
G4int Z, const G4Material* mat=nullptr);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&);
@@ -83,7 +85,7 @@ public: // With Description
private:
void Initialise(G4int Z, G4DynamicParticle* dp = 0, const char* = 0);
void Initialise(G4int Z, G4DynamicParticle* dp, const char*);
G4NeutronElasticXS & operator=(const G4NeutronElasticXS &right);
G4NeutronElasticXS(const G4NeutronElasticXS&);
@@ -93,11 +95,14 @@ private:
const G4ParticleDefinition* proton;
static std::vector<G4PhysicsVector*>* data;
static G4PhysicsVector* data[MAXZEL];
static G4double coeff[MAXZEL];
G4bool isMaster;
#ifdef G4MULTITHREADED
static G4Mutex neutronElasticXSMutex;
#endif
};
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NeutronInelasticXS.hh 93682 2015-10-28 10:09:49Z gcosmo $
// $Id: G4NeutronInelasticXS.hh 110787 2018-06-14 06:43:31Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -48,7 +48,9 @@
#include "G4VCrossSectionDataSet.hh"
#include "globals.hh"
#include "G4ElementData.hh"
#include "G4Threading.hh"
#include <vector>
#include <iostream>
const G4int MAXZINEL = 93;
@@ -79,7 +81,7 @@ public:
virtual
G4double GetElementCrossSection(const G4DynamicParticle*,
G4int Z, const G4Material* mat=0);
G4int Z, const G4Material* mat=nullptr);
virtual
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
@@ -87,7 +89,7 @@ public:
const G4Element* elm,
const G4Material* mat);
virtual G4Isotope* SelectIsotope(const G4Element*, G4double kinEnergy);
virtual const G4Isotope* SelectIsotope(const G4Element*, G4double kinEnergy);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&);
@@ -96,7 +98,7 @@ public:
private:
void Initialise(G4int Z, G4DynamicParticle* dp = 0, const char* = 0);
void Initialise(G4int Z, G4DynamicParticle* dp, const char*);
G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn);
@@ -112,13 +114,18 @@ private:
G4bool isMaster;
static G4ElementData* data;
G4double emax;
std::vector<G4double> temp;
static G4double coeff[MAXZINEL];
static G4ElementData* data;
static G4double coeff[MAXZINEL];
static const G4int amin[MAXZINEL];
static const G4int amax[MAXZINEL];
#ifdef G4MULTITHREADED
static G4Mutex neutronInelasticXSMutex;
#endif
};
#endif
@@ -0,0 +1,136 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: G4ParticleInelasticXS.hh 93605 2015-10-27 08:14:57Z ribon $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4ParticleInelasticXS
//
// Author Ivantchenko, Geant4, 24 May 2018
//
// Modifications:
//
// Class Description:
// This is a base class for n,p,d,t,he3,he4 inelastic hadronic cross
// section based on data files from G4NEUTRONXSDATA data set
// and Glauber-Gribov model for high energy
// Class Description - End
#ifndef G4ParticleInelasticXS_h
#define G4ParticleInelasticXS_h 1
#include "G4VCrossSectionDataSet.hh"
#include "globals.hh"
#include "G4ElementData.hh"
#include "G4Threading.hh"
#include <vector>
#include <iostream>
const G4int MAXZINELP = 93;
class G4DynamicParticle;
class G4ParticleDefinition;
class G4Element;
class G4PhysicsVector;
class G4ComponentGGHadronNucleusXsc;
class G4ComponentGGNuclNuclXsc;
class G4HadronNucleonXsc;
class G4ParticleInelasticXS : public G4VCrossSectionDataSet
{
public:
explicit G4ParticleInelasticXS(const G4ParticleDefinition*);
virtual ~G4ParticleInelasticXS();
virtual
G4bool IsElementApplicable(const G4DynamicParticle*, G4int Z,
const G4Material*);
virtual
G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A,
const G4Element*, const G4Material*);
virtual
G4double GetElementCrossSection(const G4DynamicParticle*,
G4int Z, const G4Material* mat=nullptr);
virtual
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
const G4Isotope* iso,
const G4Element* elm,
const G4Material* mat);
virtual const G4Isotope* SelectIsotope(const G4Element*, G4double kinEnergy);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&);
virtual void CrossSectionDescription(std::ostream&) const;
private:
void Initialise(G4int Z, G4DynamicParticle* dp, const char*);
G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn);
G4double IsoCrossSection(G4double ekin, G4int Z, G4int A);
G4ParticleInelasticXS & operator=(const G4ParticleInelasticXS &right);
G4ParticleInelasticXS(const G4ParticleInelasticXS&);
G4ComponentGGHadronNucleusXsc* ggXsection;
G4ComponentGGNuclNuclXsc* nnXsection;
G4HadronNucleonXsc* fNucleon;
const G4ParticleDefinition* particle;
const G4ParticleDefinition* proton;
G4String particleName;
G4bool isMaster;
G4double emax;
std::vector<G4double> temp;
static G4ElementData* data;
static G4double coeff[MAXZINELP];
static const G4int amin[MAXZINELP];
static const G4int amax[MAXZINELP];
#ifdef G4MULTITHREADED
static G4Mutex particleInelasticXSMutex;
#endif
};
#endif
@@ -81,10 +81,10 @@ class G4ProjectileFragmentCrossSection
G4double Ap13 = G4Pow::GetInstance()->powA(Ap, 1./3.);
G4double At13 = G4Pow::GetInstance()->powA(At, 1./3.);
G4double S = p_S[2] * (At13 + Ap13 + p_S[1]);
// cout << "debug0 "<<S<<" "<<At13<<" "<<Ap13<<" "<<p_S[1]<<" "<<p_S[2]<<endl;
// std::cout << "debug0 "<<S<<" "<<At13<<" "<<Ap13<<" "<<p_S[1]<<" "<<p_S[2]<<std::endl;
G4double p = G4Exp(p_P[2]*Ap + p_P[1]);
G4double yield_a = p * S * G4Exp(-p * (Ap - A));
cout << "debug1 "<<yield_a<<endl;
// std::cout << "debug1 "<<yield_a<<std::endl;
// modification close to projectile
G4double f_mod_y=1.0;
if (A/Ap > corr_y[2])
@@ -92,7 +92,7 @@ class G4ProjectileFragmentCrossSection
f_mod_y=corr_y[1]*G4Pow::GetInstance()->powN(A/Ap-corr_y[2], 2) + 1.0;
}
yield_a= yield_a * f_mod_y;
cout << "debug1 "<<yield_a<<endl;
// std::cout << "debug1 "<<yield_a<<std::endl;
// calculate maximum of charge dispersion zprob
G4double zbeta = A/(1.98+0.0155*G4Pow::GetInstance()->powA(A, (2./3.)));
@@ -121,8 +121,8 @@ class G4ProjectileFragmentCrossSection
if((Zp-zbeta_p)>0)
{
dq = G4Exp(p_mp[1] + G4double(A)/G4double(Ap)*p_mp[2]);
cout << "dq "<<A<<" "<<Ap<<" "<<p_mp[1]
<<" "<<p_mp[2]<<" "<<dq<<" "<<p_mp[1] + A/Ap*p_mp[2]<<endl;
// std::cout << "dq "<<A<<" "<<Ap<<" "<<p_mp[1]
// <<" "<<p_mp[2]<<" "<<dq<<" "<<p_mp[1] + A/Ap*p_mp[2]<<std::endl;
}
else
{
@@ -132,8 +132,8 @@ class G4ProjectileFragmentCrossSection
// small corr. since Xe-129 and Pb-208 are not on Z_beta line
zprob = zprob + 0.0020*A;
cout <<"zprob "<<A<<" "<<dq<<" "<<Zp<<" "<<zbeta_p
<<" "<<zbeta<<" "<<delta<<endl;
// std::cout <<"zprob "<<A<<" "<<dq<<" "<<Zp<<" "<<zbeta_p
// <<" "<<zbeta<<" "<<delta<<std::endl;
// calculate width parameter R
G4double r = G4Exp(p_R[1] + p_R[2]*A);
@@ -169,7 +169,7 @@ class G4ProjectileFragmentCrossSection
// proton-rich
expo = -r*G4Pow::GetInstance()->powA(std::abs(zprob-Z), u_p);
fract = G4Exp(expo)*std::sqrt(r/3.14159);
cout << "1 "<<expo<<" "<<r<<" "<<zprob<<" "<<Z<<" "<<u_p<<endl;
// std::cout << "1 "<<expo<<" "<<r<<" "<<zprob<<" "<<Z<<" "<<u_p<<std::endl;
// go to exponential slope
G4double dfdz = 1.2 + 0.647*G4Pow::GetInstance()->powA(A/2.,0.3);
G4double z_exp = zprob + dfdz * G4Log(10.) / (2.*r);
@@ -181,7 +181,7 @@ class G4ProjectileFragmentCrossSection
}
}
cout << "debug "<<fract<<" "<<yield_a<<endl;
// std::cout << "debug "<<fract<<" "<<yield_a<<std::endl;
G4double epaxv2=fract*yield_a;
return epaxv2;
}
@@ -189,8 +189,8 @@ class G4ProjectileFragmentCrossSection
void testMe()
{
G4ProjectileFragmentCrossSection i;
cout << i.doit(58, 28, 9, 4, 49, 28) << endl;
// Sigma = 9.800163E-13 b
// std::cout << i.doit(58, 28, 9, 4, 49, 28) << std::endl;
// Sigma = 9.800163E-13 b
}
private:
G4double p_S[3];
@@ -98,14 +98,14 @@ public: //with description
// This is a generic method to access cross section per element
// This method should not be overwritten in a derived class
inline G4double GetCrossSection(const G4DynamicParticle*, const G4Element*,
const G4Material* mat = 0);
const G4Material* mat = nullptr);
// This is a generic method to compute cross section per element
// If the DataSet is not applicable the method returns zero
// This method should not be overwritten in a derived class
G4double ComputeCrossSection(const G4DynamicParticle*,
const G4Element*,
const G4Material* mat = 0);
const G4Material* mat = nullptr);
// The following two methods have default implementations which throw
// G4HadronicException. Derived classes should implement only needed
@@ -114,23 +114,23 @@ public: //with description
// Implement this method for element-wise cross section
virtual
G4double GetElementCrossSection(const G4DynamicParticle*, G4int Z,
const G4Material* mat = 0);
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.
virtual
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
const G4Isotope* iso = 0,
const G4Element* elm = 0,
const G4Material* mat = 0);
const G4Isotope* iso = nullptr,
const G4Element* elm = nullptr,
const G4Material* mat = nullptr);
//=====================================================================
// Implement this method if needed
// This method is called for element-wise cross section
// Default implementation assumes equal cross sections for all isotopes
virtual G4Isotope* SelectIsotope(const G4Element*, G4double kinEnergy);
virtual const G4Isotope* SelectIsotope(const G4Element*, G4double kinEnergy);
// Implement this method if needed
virtual
@@ -158,6 +158,10 @@ public: // Without Description
inline void SetMaxKinEnergy(G4double value);
inline bool ForAllAtomsAndEnergies() const;
inline void SetForAllAtomsAndEnergies(G4bool val);
inline const G4String& GetName() const;
protected:
@@ -176,6 +180,8 @@ private:
G4double minKinEnergy;
G4double maxKinEnergy;
G4bool isForAllAtomsAndEnergies;
G4String name;
};
@@ -223,6 +229,16 @@ inline const G4String& G4VCrossSectionDataSet::GetName() const
return name;
}
inline bool G4VCrossSectionDataSet::ForAllAtomsAndEnergies() const
{
return isForAllAtomsAndEnergies;
}
inline void G4VCrossSectionDataSet::SetForAllAtomsAndEnergies(G4bool val)
{
isForAllAtomsAndEnergies = val;
}
inline void G4VCrossSectionDataSet::SetName(const G4String& nam)
{
name = nam;