Import Geant4 11.2.0 source tree
This commit is contained in:
+27
-27
@@ -51,7 +51,7 @@ using namespace std;
|
||||
|
||||
G4DNAEmfietzoglouIonisationModel::G4DNAEmfietzoglouIonisationModel(const G4ParticleDefinition*,
|
||||
const G4String& nam) :
|
||||
G4VEmModel(nam), isInitialised(false)
|
||||
G4VEmModel(nam)
|
||||
{
|
||||
verboseLevel = 0;
|
||||
// Verbosity scale:
|
||||
@@ -68,9 +68,9 @@ G4VEmModel(nam), isInitialised(false)
|
||||
|
||||
// Mark this model as "applicable" for atomic deexcitation
|
||||
SetDeexcitationFlag(true);
|
||||
fAtomDeexcitation = 0;
|
||||
fParticleChangeForGamma = 0;
|
||||
fpMolWaterDensity = 0;
|
||||
fAtomDeexcitation = nullptr;
|
||||
fParticleChangeForGamma = nullptr;
|
||||
fpMolWaterDensity = nullptr;
|
||||
|
||||
// Define default angular generator
|
||||
SetAngularDistribution(new G4DNABornAngle());
|
||||
@@ -137,7 +137,7 @@ void G4DNAEmfietzoglouIonisationModel::Initialise(const G4ParticleDefinition* pa
|
||||
|
||||
// Cross section
|
||||
|
||||
G4DNACrossSectionDataSet* tableE = new G4DNACrossSectionDataSet(new G4LogLogInterpolation, eV,scaleFactor );
|
||||
auto tableE = new G4DNACrossSectionDataSet(new G4LogLogInterpolation, eV,scaleFactor );
|
||||
tableE->LoadData(fileElectron);
|
||||
|
||||
tableData[electron] = tableE;
|
||||
@@ -267,7 +267,7 @@ CrossSectionPerVolume(const G4Material* material,
|
||||
if (pos != tableData.end())
|
||||
{
|
||||
G4DNACrossSectionDataSet* table = pos->second;
|
||||
if (table != 0)
|
||||
if (table != nullptr)
|
||||
{
|
||||
sigma = table->FindValue(ekin);
|
||||
}
|
||||
@@ -349,7 +349,7 @@ SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
|
||||
|
||||
if (secondaryKinetic>0)
|
||||
{
|
||||
G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic);
|
||||
auto dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic);
|
||||
fvect->push_back(dp);
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
|
||||
G4double scatteredEnergy = k-bindingEnergy-secondaryKinetic;
|
||||
|
||||
// SI: only atomic deexcitation from K shell is considered
|
||||
if(fAtomDeexcitation && ionizationShell == 4)
|
||||
if((fAtomDeexcitation != nullptr) && ionizationShell == 4)
|
||||
{
|
||||
const G4AtomicShell* shell
|
||||
= fAtomDeexcitation->GetAtomicShell(Z, G4AtomicShellEnumerator(0));
|
||||
@@ -399,7 +399,7 @@ SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
|
||||
//Invalid secondary: not enough energy to create it!
|
||||
//Keep its energy in the local deposit
|
||||
delete (*fvect)[i];
|
||||
(*fvect)[i]=0;
|
||||
(*fvect)[i]=nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -581,28 +581,28 @@ G4double G4DNAEmfietzoglouIonisationModel::DifferentialCrossSection(G4ParticleDe
|
||||
|
||||
// k should be in eV and energy transfer eV also
|
||||
|
||||
std::vector<G4double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),
|
||||
auto t2 = std::upper_bound(eTdummyVec.begin(),
|
||||
eTdummyVec.end(),
|
||||
k);
|
||||
|
||||
std::vector<G4double>::iterator t1 = t2 - 1;
|
||||
auto t1 = t2 - 1;
|
||||
|
||||
// SI : the following condition avoids situations where energyTransfer >last vector element
|
||||
// added strict limitations (09/08/2017)
|
||||
if(energyTransfer < eVecm[(*t1)].back() &&
|
||||
energyTransfer < eVecm[(*t2)].back())
|
||||
{
|
||||
std::vector<G4double>::iterator e12 =
|
||||
auto e12 =
|
||||
std::upper_bound(eVecm[(*t1)].begin(),
|
||||
eVecm[(*t1)].end(),
|
||||
energyTransfer);
|
||||
std::vector<G4double>::iterator e11 = e12 - 1;
|
||||
auto e11 = e12 - 1;
|
||||
|
||||
std::vector<G4double>::iterator e22 =
|
||||
auto e22 =
|
||||
std::upper_bound(eVecm[(*t2)].begin(),
|
||||
eVecm[(*t2)].end(),
|
||||
energyTransfer);
|
||||
std::vector<G4double>::iterator e21 = e22 - 1;
|
||||
auto e21 = e22 - 1;
|
||||
|
||||
valueT1 = *t1;
|
||||
valueT2 = *t2;
|
||||
@@ -757,10 +757,10 @@ G4int G4DNAEmfietzoglouIonisationModel::RandomSelect(G4double k,
|
||||
{
|
||||
G4DNACrossSectionDataSet* table = pos->second;
|
||||
|
||||
if(table != 0)
|
||||
if(table != nullptr)
|
||||
{
|
||||
G4double* valuesBuffer = new G4double[table->NumberOfComponents()];
|
||||
const G4int n = (G4int)table->NumberOfComponents();
|
||||
auto valuesBuffer = new G4double[table->NumberOfComponents()];
|
||||
const auto n = (G4int)table->NumberOfComponents();
|
||||
G4int i(n);
|
||||
G4double value = 0.;
|
||||
|
||||
@@ -787,7 +787,7 @@ G4int G4DNAEmfietzoglouIonisationModel::RandomSelect(G4double k,
|
||||
value -= valuesBuffer[i];
|
||||
}
|
||||
|
||||
if(valuesBuffer) delete[] valuesBuffer;
|
||||
delete[] valuesBuffer;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -854,9 +854,9 @@ G4double G4DNAEmfietzoglouIonisationModel::RandomTransferedEnergy(G4ParticleDefi
|
||||
//
|
||||
|
||||
// k should be in eV
|
||||
std::vector<G4double>::iterator k2 = std::upper_bound(eTdummyVec.begin(),eTdummyVec.end(), k);
|
||||
auto k2 = std::upper_bound(eTdummyVec.begin(),eTdummyVec.end(), k);
|
||||
|
||||
std::vector<G4double>::iterator k1 = k2-1;
|
||||
auto k1 = k2-1;
|
||||
|
||||
/*
|
||||
G4cout << "----> k=" << k
|
||||
@@ -874,15 +874,15 @@ G4double G4DNAEmfietzoglouIonisationModel::RandomTransferedEnergy(G4ParticleDefi
|
||||
&& random <= eProbaShellMap[ionizationLevelIndex][(*k2)].back() )
|
||||
|
||||
{
|
||||
std::vector<G4double>::iterator prob12 = std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k1)].begin(),
|
||||
auto prob12 = std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k1)].begin(),
|
||||
eProbaShellMap[ionizationLevelIndex][(*k1)].end(), random);
|
||||
|
||||
std::vector<G4double>::iterator prob11 = prob12-1;
|
||||
auto prob11 = prob12-1;
|
||||
|
||||
std::vector<G4double>::iterator prob22 = std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
auto prob22 = std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
eProbaShellMap[ionizationLevelIndex][(*k2)].end(), random);
|
||||
|
||||
std::vector<G4double>::iterator prob21 = prob22-1;
|
||||
auto prob21 = prob22-1;
|
||||
|
||||
valueK1 =*k1;
|
||||
valueK2 =*k2;
|
||||
@@ -916,10 +916,10 @@ G4double G4DNAEmfietzoglouIonisationModel::RandomTransferedEnergy(G4ParticleDefi
|
||||
if ( random > eProbaShellMap[ionizationLevelIndex][(*k1)].back() )
|
||||
|
||||
{
|
||||
std::vector<G4double>::iterator prob22 = std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
auto prob22 = std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
eProbaShellMap[ionizationLevelIndex][(*k2)].end(), random);
|
||||
|
||||
std::vector<G4double>::iterator prob21 = prob22-1;
|
||||
auto prob21 = prob22-1;
|
||||
|
||||
valueK1 =*k1;
|
||||
valueK2 =*k2;
|
||||
|
||||
Reference in New Issue
Block a user