Import Geant4 11.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2021-12-10 14:46:44 +01:00
committed by Ben Morgan
parent 6399a014b6
commit 80e2389dd8
3932 changed files with 202519 additions and 246221 deletions
@@ -41,6 +41,7 @@ G4ParticleChangeForGamma::G4ParticleChangeForGamma()
: G4VParticleChange()
{
theSteppingControlFlag = NormalCondition;
// Disable flag that is enabled in G4VParticleChange if G4VERBOSE.
debugFlag = false;
}
@@ -42,6 +42,7 @@ G4ParticleChangeForLoss::G4ParticleChangeForLoss()
, lowEnergyLimit(1.0 * eV)
{
theSteppingControlFlag = NormalCondition;
// Disable flag that is enabled in G4VParticleChange if G4VERBOSE.
debugFlag = false;
}
@@ -40,6 +40,8 @@
G4ParticleChangeForMSC::G4ParticleChangeForMSC()
: G4VParticleChange()
{
// Disable flag that is enabled in G4VParticleChange if G4VERBOSE.
debugFlag = false;
}
// --------------------------------------------------------------------
@@ -39,6 +39,8 @@
G4ParticleChangeForTransport::G4ParticleChangeForTransport()
: G4ParticleChange()
{
// Disable flag that is enabled in G4VParticleChange if G4VERBOSE.
debugFlag = false;
}
// --------------------------------------------------------------------
+16 -14
View File
@@ -32,7 +32,6 @@
#include "G4Track.hh"
#include "G4PhysicalConstants.hh"
#include "G4VAuxiliaryTrackInformation.hh"
#include "G4PhysicsModelCatalog.hh"
#include <iostream>
#include <iomanip>
@@ -104,6 +103,9 @@ G4Track& G4Track::operator=(const G4Track& right)
// CurrentStepNumber is set to be 0
fCurrentStepNumber = 0;
// Creator model ID
fCreatorModelID = right.fCreatorModelID;
// velocity information
fVelocity = right.fVelocity;
@@ -174,7 +176,7 @@ G4double G4Track::CalculateVelocityForOpticalPhoton() const
{
groupvel = nullptr;
if(mat->GetMaterialPropertiesTable() != nullptr)
groupvel = mat->GetMaterialPropertiesTable()->GetProperty("GROUPVEL");
groupvel = mat->GetMaterialPropertiesTable()->GetProperty(kGROUPVEL);
update_groupvel = true;
}
prev_mat = mat;
@@ -200,7 +202,7 @@ G4double G4Track::CalculateVelocityForOpticalPhoton() const
}
// --------------------------------------------------------------------
void G4Track::SetAuxiliaryTrackInformation(G4int idx,
void G4Track::SetAuxiliaryTrackInformation(G4int id,
G4VAuxiliaryTrackInformation* info) const
{
if(fpAuxiliaryTrackInformationMap == nullptr)
@@ -208,23 +210,23 @@ void G4Track::SetAuxiliaryTrackInformation(G4int idx,
fpAuxiliaryTrackInformationMap =
new std::map<G4int, G4VAuxiliaryTrackInformation*>;
}
if(idx < 0 || idx >= G4PhysicsModelCatalog::Entries())
if(G4PhysicsModelCatalog::GetModelIndex(id) < 0)
{
G4ExceptionDescription ED;
ED << "Process/model index <" << idx << "> is invalid.";
ED << "Process/model ID <" << id << "> is invalid.";
G4Exception("G4VAuxiliaryTrackInformation::G4VAuxiliaryTrackInformation()",
"TRACK0982", FatalException, ED);
}
(*fpAuxiliaryTrackInformationMap)[idx] = info;
(*fpAuxiliaryTrackInformationMap)[id] = info;
}
// --------------------------------------------------------------------
G4VAuxiliaryTrackInformation*
G4Track::GetAuxiliaryTrackInformation(G4int idx) const
G4Track::GetAuxiliaryTrackInformation(G4int id) const
{
if(fpAuxiliaryTrackInformationMap == nullptr)
return nullptr;
auto itr = fpAuxiliaryTrackInformationMap->find(idx);
auto itr = fpAuxiliaryTrackInformationMap->find(id);
if(itr == fpAuxiliaryTrackInformationMap->cend())
return nullptr;
else
@@ -232,12 +234,12 @@ G4Track::GetAuxiliaryTrackInformation(G4int idx) const
}
// --------------------------------------------------------------------
void G4Track::RemoveAuxiliaryTrackInformation(G4int idx)
void G4Track::RemoveAuxiliaryTrackInformation(G4int id)
{
if(fpAuxiliaryTrackInformationMap != nullptr
&& idx >= 0 && idx < G4PhysicsModelCatalog::Entries())
if(fpAuxiliaryTrackInformationMap != nullptr &&
fpAuxiliaryTrackInformationMap->find(id) != fpAuxiliaryTrackInformationMap->cend())
{
fpAuxiliaryTrackInformationMap->erase(idx);
fpAuxiliaryTrackInformationMap->erase(id);
}
}
@@ -246,8 +248,8 @@ void G4Track::RemoveAuxiliaryTrackInformation(G4String& name)
{
if(fpAuxiliaryTrackInformationMap != nullptr)
{
G4int idx = G4PhysicsModelCatalog::GetIndex(name);
RemoveAuxiliaryTrackInformation(idx);
G4int id = G4PhysicsModelCatalog::GetModelID(name);
RemoveAuxiliaryTrackInformation(id);
}
}
+1 -1
View File
@@ -43,7 +43,7 @@ G4VParticleChange::G4VParticleChange()
: theSizeOftheListOfSecondaries(G4TrackFastVectorSize)
{
#ifdef G4VERBOSE
// activate CHeckIt if in VERBOSE mode
// activate CheckIt if in VERBOSE mode
debugFlag = true;
#endif
theListOfSecondaries = new G4TrackFastVector();