Import Geant4 11.1.0 source tree
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user