Import Geant4 11.1.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2022-07-01 10:44:02 +02:00
parent b3bf75a2a1
commit c07cea1fe0
2172 changed files with 183300 additions and 123938 deletions
+22 -19
View File
@@ -1,31 +1,34 @@
-------------------------------------------------------------------
# Category op History
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
Category History file
---------------------
This file should be used by G4 developers and category coordinators
to briefly summarize all major modifications introduced in the code
and keep track of all category-tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
## 2022-04-27 Daren Sawkey (op-V11-00-05)
- many files: apply clang-tidy recommendations. Use default ctor, auto keyword,
remove (void) function argument, don't check for nullptr before delete, == for
string comparisons.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
## 2022-04-11 Daren Sawkey (op-V11-00-04)
- G4OpBoundaryProcess: Check for nullptr before dereferencing. Addresses bug 2471.
11 Apr 22: D. Sawkey (op-V10-07-08)
- G4OpBoundaryProcess: fix nullptr dereference. Address bug 2471.
07 Apr 22: D. Sawkey (op-V10-07-07)
## 2022-04-07 Daren Sawkey (op-V11-00-03)
- G4OpWLS2: fix incorrect call to set time profile. Addresses bug 2482.
10 Jan 22: D. Sawkey (op-V10-07-06)
## 2022-01-18 Jonas Hahnfeld (op-V11-00-02)
- Prefer pointer to `const G4Material` if possible
## 2022-01-10 Daren Sawkey (op-V11-00-01)
- Remove G4lrint/G4lint to calculate angle bin for Davis/LBNL LUT. Fixes crash
when angle = 0. Addresses issue 116.
## 2021-12-10 Ben Morgan (op-V11-00-00)
- Change to new Markdown History format
---
# History entries prior to 11.0
21 Oct 21: D. Sawkey (op-V10-07-05)
- G4OpBoundaryProcess - rename variables: class start with f; lowercase
- make comparison to nullptr explicit
@@ -175,9 +175,9 @@ class G4OpBoundaryProcess : public G4VDiscreteProcess
G4double ImaginaryRindex);
// Returns the Reflectivity on a metalic surface
void CalculateReflectivity(void);
void CalculateReflectivity();
void BoundaryProcessVerbose(void) const;
void BoundaryProcessVerbose() const;
// Invoke SD for post step point if the photon is 'detected'
G4bool InvokeSD(const G4Step* step);
@@ -191,8 +191,8 @@ class G4OpBoundaryProcess : public G4VDiscreteProcess
G4ThreeVector fGlobalNormal;
G4ThreeVector fFacetNormal;
G4Material* fMaterial1;
G4Material* fMaterial2;
const G4Material* fMaterial1;
const G4Material* fMaterial2;
G4OpticalSurface* fOpticalSurface;
@@ -65,7 +65,7 @@ G4OpAbsorption::G4OpAbsorption(const G4String& processName, G4ProcessType type)
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4OpAbsorption::~G4OpAbsorption() {}
G4OpAbsorption::~G4OpAbsorption() = default;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4OpAbsorption::PreparePhysicsTable(const G4ParticleDefinition&)
@@ -89,8 +89,8 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4OpBoundaryProcess::G4OpBoundaryProcess(const G4String& processName,
G4ProcessType type)
: G4VDiscreteProcess(processName, type)
G4ProcessType ptype)
: G4VDiscreteProcess(processName, ptype)
{
Initialise();
@@ -126,7 +126,7 @@ G4OpBoundaryProcess::G4OpBoundaryProcess(const G4String& processName,
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4OpBoundaryProcess::~G4OpBoundaryProcess() {}
G4OpBoundaryProcess::~G4OpBoundaryProcess() = default;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4OpBoundaryProcess::PreparePhysicsTable(const G4ParticleDefinition&)
@@ -195,6 +195,7 @@ G4VParticleChange* G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack,
{
groupvel = aMPT->GetProperty(kGROUPVEL);
}
if(groupvel != nullptr)
{
aParticleChange.ProposeVelocity(
@@ -413,7 +414,7 @@ G4VParticleChange* G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack,
BoundaryProcessVerbose();
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
MPT = fMaterial2->GetMaterialPropertiesTable();
MPT = fMaterial2->GetMaterialPropertiesTable();
rIndexMPV = nullptr;
if(MPT != nullptr)
{
@@ -742,7 +743,7 @@ void G4OpBoundaryProcess::DielectricMetal()
{
fFacetNormal = GetFacetNormal(fOldMomentum, fGlobalNormal);
}
//else
// else
// case of complex rindex needs to be implemented
}
fNewMomentum =
@@ -868,8 +869,8 @@ void G4OpBoundaryProcess::DielectricLUTDAVIS()
// Davis model has 90 reflection bins: round down
// don't allow angleIncident to be 90 for anglePhotonToNormal close to 90
angleIncident = std::min(static_cast<G4int>(
std::floor(anglePhotonToNormal / CLHEP::deg)), 89);
angleIncident = std::min(
static_cast<G4int>(std::floor(anglePhotonToNormal / CLHEP::deg)), 89);
reflectivityValue = fOpticalSurface->GetReflectivityLUTValue(angleIncident);
if(rand > reflectivityValue)
+1 -1
View File
@@ -56,7 +56,7 @@ G4OpMieHG::G4OpMieHG(const G4String& processName, G4ProcessType type)
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4OpMieHG::~G4OpMieHG() {}
G4OpMieHG::~G4OpMieHG() = default;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4OpMieHG::PreparePhysicsTable(const G4ParticleDefinition&)
+3 -7
View File
@@ -86,10 +86,7 @@ G4OpRayleigh::~G4OpRayleigh()
{
// VI: inside this PhysicsTable all properties are unique
// it is not possible to destroy
if(thePhysicsTable)
{
delete thePhysicsTable;
}
delete thePhysicsTable;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -220,8 +217,7 @@ void G4OpRayleigh::BuildPhysicsTable(const G4ParticleDefinition&)
G4double G4OpRayleigh::GetMeanFreePath(const G4Track& aTrack, G4double,
G4ForceCondition*)
{
G4PhysicsFreeVector* rayleigh =
static_cast<G4PhysicsFreeVector*>(
auto rayleigh = static_cast<G4PhysicsFreeVector*>(
(*thePhysicsTable)(aTrack.GetMaterial()->GetIndex()));
G4double rsLength = DBL_MAX;
@@ -281,7 +277,7 @@ G4PhysicsFreeVector* G4OpRayleigh::CalculateRayleighMeanFreePaths(
temperature = material->GetTemperature();
}
G4PhysicsFreeVector* rayleighMFPs = new G4PhysicsFreeVector();
auto rayleighMFPs = new G4PhysicsFreeVector();
// This calculates the meanFreePath via the Einstein-Smoluchowski formula
const G4double c1 =
scaleFactor * betat * temperature * k_Boltzmann / (6.0 * pi);
+4 -4
View File
@@ -195,7 +195,7 @@ G4VParticleChange* G4OpWLS::PostStepDoIt(const G4Track& aTrack,
photonPolarization = (cosp * photonPolarization + sinp * perp).unit();
// Generate a new photon:
G4DynamicParticle* sec_dp =
auto sec_dp =
new G4DynamicParticle(G4OpticalPhoton::OpticalPhoton(), photonMomentum);
sec_dp->SetPolarization(photonPolarization);
sec_dp->SetKineticEnergy(sampledEnergy);
@@ -242,7 +242,7 @@ void G4OpWLS::BuildPhysicsTable(const G4ParticleDefinition&)
// loop for materials
for(G4int i = 0; i < numOfMaterials; ++i)
{
G4PhysicsFreeVector* physVector = new G4PhysicsFreeVector();
auto physVector = new G4PhysicsFreeVector();
// Retrieve vector of WLS wavelength intensity for
// the material from the material's optical properties table.
@@ -318,11 +318,11 @@ void G4OpWLS::UseTimeProfile(const G4String name)
delete WLSTimeGeneratorProfile;
WLSTimeGeneratorProfile = nullptr;
}
if(name.compare("delta") == 0)
if(name == "delta")
{
WLSTimeGeneratorProfile = new G4WLSTimeGeneratorProfileDelta("delta");
}
else if(name.compare("exponential") == 0)
else if(name == "exponential")
{
WLSTimeGeneratorProfile =
new G4WLSTimeGeneratorProfileExponential("exponential");
+4 -4
View File
@@ -199,7 +199,7 @@ G4VParticleChange* G4OpWLS2::PostStepDoIt(const G4Track& aTrack,
photonPolarization = (cosp * photonPolarization + sinp * perp).unit();
// Generate a new photon:
G4DynamicParticle* sec_dp =
auto sec_dp =
new G4DynamicParticle(G4OpticalPhoton::OpticalPhoton(), photonMomentum);
sec_dp->SetPolarization(photonPolarization);
sec_dp->SetKineticEnergy(sampledEnergy);
@@ -246,7 +246,7 @@ void G4OpWLS2::BuildPhysicsTable(const G4ParticleDefinition&)
// loop for materials
for(G4int i = 0; i < numOfMaterials; ++i)
{
G4PhysicsFreeVector* physVector = new G4PhysicsFreeVector();
auto physVector = new G4PhysicsFreeVector();
// Retrieve vector of WLS2 wavelength intensity for
// the material from the material's optical properties table.
@@ -322,11 +322,11 @@ void G4OpWLS2::UseTimeProfile(const G4String name)
delete WLSTimeGeneratorProfile;
WLSTimeGeneratorProfile = nullptr;
}
if(name.compare("delta") == 0)
if(name == "delta")
{
WLSTimeGeneratorProfile = new G4WLSTimeGeneratorProfileDelta("delta");
}
else if(name.compare("exponential") == 0)
else if(name == "exponential")
{
WLSTimeGeneratorProfile =
new G4WLSTimeGeneratorProfileExponential("exponential");
@@ -53,4 +53,4 @@
G4VWLSTimeGeneratorProfile::G4VWLSTimeGeneratorProfile(const G4String&) {}
G4VWLSTimeGeneratorProfile::~G4VWLSTimeGeneratorProfile() {}
G4VWLSTimeGeneratorProfile::~G4VWLSTimeGeneratorProfile() = default;
@@ -56,7 +56,7 @@ G4WLSTimeGeneratorProfileDelta::G4WLSTimeGeneratorProfileDelta(
//
G4WLSTimeGeneratorProfileDelta::~G4WLSTimeGeneratorProfileDelta() {}
G4WLSTimeGeneratorProfileDelta::~G4WLSTimeGeneratorProfileDelta() = default;
//
@@ -56,7 +56,8 @@ G4WLSTimeGeneratorProfileExponential::G4WLSTimeGeneratorProfileExponential(
//
G4WLSTimeGeneratorProfileExponential::~G4WLSTimeGeneratorProfileExponential() {}
G4WLSTimeGeneratorProfileExponential::~G4WLSTimeGeneratorProfileExponential() =
default;
//