Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -36,13 +36,16 @@
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#include "G4DNAMoleculeEncounterStepper.hh"
|
||||
#include "G4VDNAReactionModel.hh"
|
||||
|
||||
#include "G4DNAMolecularReactionTable.hh"
|
||||
#include "G4H2O.hh"
|
||||
#include "G4memory.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4MoleculeFinder.hh"
|
||||
#include "G4MolecularConfiguration.hh"
|
||||
#include "G4MoleculeFinder.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4VDNAReactionModel.hh"
|
||||
#include "G4memory.hh"
|
||||
|
||||
#include <memory>
|
||||
|
||||
using namespace std;
|
||||
using namespace CLHEP;
|
||||
@@ -66,11 +69,8 @@ G4DNAMoleculeEncounterStepper::Utils::Utils(const G4Track& tA,
|
||||
}
|
||||
|
||||
G4DNAMoleculeEncounterStepper::G4DNAMoleculeEncounterStepper()
|
||||
: G4VITTimeStepComputer()
|
||||
, fHasAlreadyReachedNullTime(false)
|
||||
, fMolecularReactionTable(reference_cast<const G4DNAMolecularReactionTable*>(fpReactionTable))
|
||||
, fReactionModel(nullptr)
|
||||
, fVerbose(0)
|
||||
:
|
||||
fMolecularReactionTable(reference_cast<const G4DNAMolecularReactionTable*>(fpReactionTable))
|
||||
{
|
||||
fpTrackContainer = G4ITTrackHolder::Instance();
|
||||
fReactionSet = G4ITReactionSet::Instance();
|
||||
@@ -126,7 +126,7 @@ G4DNAMoleculeEncounterStepper::CalculateStep(const G4Track& trackA,
|
||||
fUserMinTimeStep = userMinTimeStep;
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (fVerbose)
|
||||
if (fVerbose != 0)
|
||||
{
|
||||
G4cout
|
||||
<< "_______________________________________________________________________"
|
||||
@@ -144,7 +144,7 @@ G4DNAMoleculeEncounterStepper::CalculateStep(const G4Track& trackA,
|
||||
|
||||
const auto pReactantList = fMolecularReactionTable->CanReactWith(pMolConfA);
|
||||
|
||||
if (!pReactantList)
|
||||
if (pReactantList == nullptr)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
// DEBUG
|
||||
@@ -163,13 +163,13 @@ G4DNAMoleculeEncounterStepper::CalculateStep(const G4Track& trackA,
|
||||
return DBL_MAX;
|
||||
}
|
||||
|
||||
G4int nbReactives = (G4int)pReactantList->size();
|
||||
auto nbReactives = (G4int)pReactantList->size();
|
||||
|
||||
if (nbReactives == 0)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
// DEBUG
|
||||
if (fVerbose)
|
||||
if (fVerbose != 0)
|
||||
{
|
||||
// TODO replace with the warning mode of G4Exception
|
||||
G4cout << "!!!!!!!!!!!!!!!!!!!!" << G4endl;
|
||||
@@ -186,7 +186,7 @@ G4DNAMoleculeEncounterStepper::CalculateStep(const G4Track& trackA,
|
||||
return DBL_MAX;
|
||||
}
|
||||
|
||||
fReactants.reset(new vector<G4Track*>());
|
||||
fReactants = std::make_shared<vector<G4Track*>>();
|
||||
fReactionModel->Initialise(pMolConfA, trackA);
|
||||
|
||||
//__________________________________________________________________
|
||||
@@ -205,7 +205,7 @@ G4DNAMoleculeEncounterStepper::CalculateStep(const G4Track& trackA,
|
||||
G4MoleculeFinder::Instance()->FindNearest(pMoleculeA,
|
||||
pMoleculeB->GetMoleculeID()));
|
||||
|
||||
if (resultsNearest == 0) continue;
|
||||
if (static_cast<int>(resultsNearest) == 0) continue;
|
||||
|
||||
G4double r2 = resultsNearest->GetDistanceSqr();
|
||||
Utils utils(trackA, pMoleculeB);
|
||||
@@ -217,7 +217,7 @@ G4DNAMoleculeEncounterStepper::CalculateStep(const G4Track& trackA,
|
||||
// Therefore, if we only take the nearby reactant into account, it might have already
|
||||
// reacted. Instead, we will take all possible reactants that satisfy the condition r<R
|
||||
|
||||
if (fHasAlreadyReachedNullTime == false)
|
||||
if (!fHasAlreadyReachedNullTime)
|
||||
{
|
||||
fReactants->clear();
|
||||
fHasAlreadyReachedNullTime = true;
|
||||
@@ -286,7 +286,7 @@ G4DNAMoleculeEncounterStepper::CalculateStep(const G4Track& trackA,
|
||||
}
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (fVerbose)
|
||||
if (fVerbose != 0)
|
||||
{
|
||||
G4cout << "G4MoleculeEncounterStepper::CalculateStep will finally return :"
|
||||
<< G4BestUnit(fSampledMinTimeStep, "Time") << G4endl;
|
||||
@@ -316,7 +316,7 @@ void G4DNAMoleculeEncounterStepper::CheckAndRecordResults(const Utils& utils,
|
||||
#endif
|
||||
G4KDTreeResultHandle& results)
|
||||
{
|
||||
if (results == 0)
|
||||
if (static_cast<int>(results) == 0)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (fVerbose > 1)
|
||||
@@ -331,16 +331,16 @@ void G4DNAMoleculeEncounterStepper::CheckAndRecordResults(const Utils& utils,
|
||||
|
||||
for (results->Rewind(); !results->End(); results->Next())
|
||||
{
|
||||
G4IT* reactiveB = results->GetItem<G4IT>();
|
||||
auto reactiveB = results->GetItem<G4IT>();
|
||||
|
||||
if (reactiveB == 0)
|
||||
if (reactiveB == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
G4Track *trackB = reactiveB->GetTrack();
|
||||
|
||||
if (trackB == 0)
|
||||
if (trackB == nullptr)
|
||||
{
|
||||
G4ExceptionDescription exceptionDescription;
|
||||
exceptionDescription
|
||||
|
||||
Reference in New Issue
Block a user