Import Geant4 11.1.0 source tree
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
# Category procbiasing History
|
||||
|
||||
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!
|
||||
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!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2022-11-23 Gabriele Cosmo (procbiasing-V11-00-01)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
## 2021-12-10 Ben Morgan (procbiasing-V11-00-00)
|
||||
- Change to new Markdown History format
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
# Category proc-biasgen History
|
||||
|
||||
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!
|
||||
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!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2022-11-23 Gabriele Cosmo (proc-biasgen-V11-00-02)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
## 2022-08-31, Gabriele Cosmo (proc-biasgen-V11-00-01)
|
||||
- Fixed defects reported by Coverity in G4BOptnLeadingParticle, to use auto&.
|
||||
|
||||
## 2021-12-10 Ben Morgan (proc-biasgen-V11-00-00)
|
||||
- Change to new Markdown History format
|
||||
|
||||
@@ -134,7 +134,7 @@ G4VParticleChange* G4BOptnLeadingParticle::ApplyFinalStateBiasing( const G4Biasi
|
||||
// ---- randomly select one surviving track per species
|
||||
// ---- for this surviving track, further apply a Russian roulette
|
||||
G4int nSecondaries = 0; // -- the number of secondaries to be returned
|
||||
for ( auto typeAndTrack : typesAndTracks )
|
||||
for ( auto& typeAndTrack : typesAndTracks )
|
||||
{
|
||||
size_t nTracks = (typeAndTrack.second).size();
|
||||
G4Track* keptTrack;
|
||||
|
||||
@@ -36,7 +36,7 @@ G4bool G4BiasingHelper::ActivatePhysicsBiasing(G4ProcessManager* pmanager,
|
||||
G4VProcess* physicsProcess(0);
|
||||
|
||||
G4ProcessVector* vprocess = pmanager->GetProcessList();
|
||||
for (std::size_t ip = 0 ; ip < vprocess->size() ; ++ip)
|
||||
for (G4int ip = 0 ; ip < (G4int)vprocess->size() ; ++ip)
|
||||
{
|
||||
if ( (*vprocess)[ip]->GetProcessName() == physicsProcessToBias )
|
||||
{
|
||||
@@ -95,7 +95,7 @@ G4bool G4BiasingHelper::ActivatePhysicsBiasing(G4ProcessManager* pmanager,
|
||||
void G4BiasingHelper::ActivateNonPhysicsBiasing(G4ProcessManager* pmanager,
|
||||
G4String nonPhysicsProcessName )
|
||||
{
|
||||
G4BiasingProcessInterface* biasingNonPhys(0);
|
||||
G4BiasingProcessInterface* biasingNonPhys(nullptr);
|
||||
if ( nonPhysicsProcessName == "" ) biasingNonPhys = new G4BiasingProcessInterface();
|
||||
else biasingNonPhys = new G4BiasingProcessInterface(nonPhysicsProcessName );
|
||||
pmanager->AddProcess( biasingNonPhys,
|
||||
@@ -110,7 +110,7 @@ G4ParallelGeometriesLimiterProcess* G4BiasingHelper::AddLimiterProcess(G4Process
|
||||
|
||||
G4ProcessVector* processList = pmanager->GetProcessList();
|
||||
G4bool noInstance = true;
|
||||
for (std::size_t i = 0 ; i < processList->size() ; ++i)
|
||||
for (G4int i = 0 ; i < (G4int)processList->size() ; ++i)
|
||||
{
|
||||
G4VProcess* process = (*processList)[i];
|
||||
if ( dynamic_cast< G4ParallelGeometriesLimiterProcess* >( process ) )
|
||||
@@ -140,5 +140,4 @@ G4ParallelGeometriesLimiterProcess* G4BiasingHelper::AddLimiterProcess(G4Process
|
||||
}
|
||||
|
||||
return toReturn;
|
||||
|
||||
}
|
||||
|
||||
@@ -918,14 +918,17 @@ G4bool G4BiasingProcessInterface::IsFirstPostStepGPILInterface(G4bool physOnly)
|
||||
G4bool isFirst = true;
|
||||
const G4ProcessVector* pv = fProcessManager->GetPostStepProcessVector(typeGPIL);
|
||||
G4int thisIdx(-1);
|
||||
for (std::size_t i = 0; i < pv->size(); ++i ) if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
for (G4int i = 0; i < (G4int)pv->size(); ++i )
|
||||
if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
if ( thisIdx < 0 ) return false; // -- to ignore pure along processes
|
||||
for ( std::size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); ++i )
|
||||
{
|
||||
if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
|
||||
{
|
||||
G4int thatIdx(-1);
|
||||
for (std::size_t j = 0; j < pv->size(); ++j ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
for (G4int j = 0; j < (G4int)pv->size(); ++j )
|
||||
if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] )
|
||||
{ thatIdx = j; break; }
|
||||
if ( thatIdx >= 0 ) // -- to ignore pure along processes
|
||||
{
|
||||
if ( thisIdx > thatIdx )
|
||||
@@ -945,14 +948,17 @@ G4bool G4BiasingProcessInterface::IsLastPostStepGPILInterface(G4bool physOnly) c
|
||||
G4bool isLast = true;
|
||||
const G4ProcessVector* pv = fProcessManager->GetPostStepProcessVector(typeGPIL);
|
||||
G4int thisIdx(-1);
|
||||
for (std::size_t i = 0; i < pv->size(); ++i ) if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
for (G4int i = 0; i < (G4int)pv->size(); ++i )
|
||||
if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
if ( thisIdx < 0 ) return false; // -- to ignore pure along processes
|
||||
for ( std::size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); ++i )
|
||||
{
|
||||
if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
|
||||
{
|
||||
G4int thatIdx(-1);
|
||||
for (std::size_t j = 0; j < pv->size(); ++j ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
for (G4int j = 0; j < (G4int)pv->size(); ++j )
|
||||
if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] )
|
||||
{ thatIdx = j; break; }
|
||||
if ( thatIdx >= 0 ) // -- to ignore pure along processes
|
||||
{
|
||||
if ( thisIdx < thatIdx )
|
||||
@@ -972,14 +978,17 @@ G4bool G4BiasingProcessInterface::IsFirstPostStepDoItInterface(G4bool physOnly)
|
||||
G4bool isFirst = true;
|
||||
const G4ProcessVector* pv = fProcessManager->GetPostStepProcessVector(typeDoIt);
|
||||
G4int thisIdx(-1);
|
||||
for (std::size_t i = 0; i < pv->size(); ++i ) if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
for (G4int i = 0; i < (G4int)pv->size(); ++i )
|
||||
if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
if ( thisIdx < 0 ) return false; // -- to ignore pure along processes
|
||||
for ( std::size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); ++i )
|
||||
{
|
||||
if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
|
||||
{
|
||||
G4int thatIdx(-1);
|
||||
for (std::size_t j = 0; j < pv->size(); ++j ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
for (G4int j = 0; j < (G4int)pv->size(); ++j )
|
||||
if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] )
|
||||
{ thatIdx = j; break; }
|
||||
if ( thatIdx >= 0 ) // -- to ignore pure along processes
|
||||
{
|
||||
if ( thisIdx > thatIdx )
|
||||
@@ -999,14 +1008,17 @@ G4bool G4BiasingProcessInterface::IsLastPostStepDoItInterface(G4bool physOnly) c
|
||||
G4bool isLast = true;
|
||||
const G4ProcessVector* pv = fProcessManager->GetPostStepProcessVector(typeDoIt);
|
||||
G4int thisIdx(-1);
|
||||
for (std::size_t i = 0; i < pv->size(); ++i ) if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
for (G4int i = 0; i < (G4int)pv->size(); ++i )
|
||||
if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
if ( thisIdx < 0 ) return false; // -- to ignore pure along processes
|
||||
for ( std::size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); ++i )
|
||||
{
|
||||
if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
|
||||
{
|
||||
G4int thatIdx(-1);
|
||||
for (std::size_t j = 0; j < pv->size(); ++j ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
for (G4int j = 0; j < (G4int)pv->size(); ++j )
|
||||
if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] )
|
||||
{ thatIdx = j; break; }
|
||||
if ( thatIdx >= 0 ) // -- to ignore pure along processes
|
||||
{
|
||||
if ( thisIdx < thatIdx )
|
||||
@@ -1084,26 +1096,26 @@ void G4BiasingProcessInterface::ReorderBiasingVectorAsGPIL()
|
||||
( fSharedData -> fPublicNonPhysicsBiasingProcessInterfaces ) . clear();
|
||||
|
||||
const G4ProcessVector* pv = fProcessManager->GetPostStepProcessVector(typeGPIL);
|
||||
for (std::size_t i = 0; i < pv->size(); ++i )
|
||||
for (G4int i = 0; i < (G4int)pv->size(); ++i )
|
||||
{
|
||||
for ( std::size_t j = 0; j < tmpProcess.size(); ++j )
|
||||
{
|
||||
if ( (*pv)(i) == tmpProcess[j] )
|
||||
{
|
||||
( fSharedData -> fBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
|
||||
( fSharedData -> fPublicBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
|
||||
if ( tmpProcess[j] -> fIsPhysicsBasedBiasing )
|
||||
{
|
||||
( fSharedData -> fPhysicsBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
|
||||
( fSharedData -> fPublicPhysicsBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
|
||||
}
|
||||
else
|
||||
{
|
||||
( fSharedData -> fNonPhysicsBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
|
||||
( fSharedData -> fPublicNonPhysicsBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
{
|
||||
if ( (*pv)(i) == tmpProcess[j] )
|
||||
{
|
||||
( fSharedData -> fBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
|
||||
( fSharedData -> fPublicBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
|
||||
if ( tmpProcess[j] -> fIsPhysicsBasedBiasing )
|
||||
{
|
||||
( fSharedData -> fPhysicsBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
|
||||
( fSharedData -> fPublicPhysicsBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
|
||||
}
|
||||
else
|
||||
{
|
||||
( fSharedData -> fNonPhysicsBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
|
||||
( fSharedData -> fPublicNonPhysicsBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
# Category proc-biasimp History
|
||||
|
||||
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!
|
||||
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!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2022-10-05 Gabriele Cosmo (proc-biasimp-V11-00-01)
|
||||
- Fixed compilation warning on Intel/icx compiler for variable set
|
||||
but not used in G4GeometrySampler.
|
||||
|
||||
## 2021-12-10 Ben Morgan (proc-biasimp-V11-00-00)
|
||||
- Change to new Markdown History format
|
||||
|
||||
@@ -286,19 +286,17 @@ void G4GeometrySampler::Configure()
|
||||
void G4GeometrySampler::AddProcess()
|
||||
{
|
||||
|
||||
G4VSamplerConfigurator *preConf = 0;
|
||||
G4int i = 0;
|
||||
for (G4Configurators::iterator it = fConfigurators.begin();
|
||||
it != fConfigurators.end(); it++)
|
||||
G4VSamplerConfigurator *preConf = nullptr;
|
||||
for (auto it = fConfigurators.cbegin();
|
||||
it != fConfigurators.cend(); ++it)
|
||||
{
|
||||
i++;
|
||||
G4VSamplerConfigurator *currConf =*it;
|
||||
currConf->Configure(preConf);
|
||||
preConf = *it;
|
||||
}
|
||||
if (fWeightCutOffConfigurator)
|
||||
if (fWeightCutOffConfigurator != nullptr)
|
||||
{
|
||||
fWeightCutOffConfigurator->Configure(0);
|
||||
fWeightCutOffConfigurator->Configure(nullptr);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
# Category proc-biasmng History
|
||||
|
||||
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!
|
||||
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!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2022-11-23 Gabriele Cosmo (proc-biasmng-V11-00-01)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
## 2021-12-10 Ben Morgan (proc-biasmng-V11-00-00)
|
||||
- Change to new Markdown History format
|
||||
|
||||
@@ -56,10 +56,8 @@ std::size_t G4BiasingOperationManager::Register(G4VBiasingOperation* option)
|
||||
|
||||
G4VBiasingOperation* G4BiasingOperationManager::GetBiasingOperation(std::size_t optionID)
|
||||
{
|
||||
if (optionID < fBiasingOperationVector.Size()) return fBiasingOperationVector[optionID];
|
||||
else return 0;
|
||||
if (optionID < fBiasingOperationVector.Size())
|
||||
return fBiasingOperationVector[(G4int)optionID];
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -223,13 +223,13 @@ void G4ProcessPlacer::PrintProcVec(G4ProcessVector* processVec)
|
||||
G4Exception("G4ProcessPlacer::G4ProcessPlacer()", "InvalidArgument",
|
||||
FatalException, "NULL pointer to process-vector !");
|
||||
}
|
||||
size_t len = processVec->length();
|
||||
G4int len = (G4int)processVec->length();
|
||||
if (len==0)
|
||||
{
|
||||
G4Exception("G4ProcessPlacer::G4ProcessPlacer()", "InvalidSetup",
|
||||
FatalException, "Length of process-vector is zero !");
|
||||
}
|
||||
for (size_t i=0; i<len; i++)
|
||||
for (G4int i=0; i<len; ++i)
|
||||
{
|
||||
G4VProcess *p = (*processVec)[i];
|
||||
if (p)
|
||||
|
||||
@@ -200,7 +200,8 @@ G4bool G4BiasingOperatorStateNotifier::Notify( G4ApplicationState requestedState
|
||||
{
|
||||
if ( ( fPreviousState == G4State_Idle ) && ( requestedState == G4State_GeomClosed ) )
|
||||
{
|
||||
for ( size_t i = 0 ; i < G4VBiasingOperator::fOperators.Size() ; i++ ) G4VBiasingOperator::fOperators[i]->StartRun();
|
||||
for ( G4int i = 0; i < (G4int)G4VBiasingOperator::fOperators.Size(); ++i )
|
||||
G4VBiasingOperator::fOperators[i]->StartRun();
|
||||
}
|
||||
|
||||
fPreviousState = requestedState;
|
||||
|
||||
Reference in New Issue
Block a user