Import Geant4 5.2.0 source tree
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AtomicTransitionManager.hh,v 1.2 ????
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
|
||||
// Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
|
||||
@@ -50,9 +50,9 @@ G4AtomicDeexcitation::G4AtomicDeexcitation():
|
||||
G4AtomicDeexcitation::~G4AtomicDeexcitation()
|
||||
{}
|
||||
|
||||
G4std::vector<G4DynamicParticle*>* G4AtomicDeexcitation::GenerateParticles(G4int Z,G4int givenShellId)
|
||||
std::vector<G4DynamicParticle*>* G4AtomicDeexcitation::GenerateParticles(G4int Z,G4int givenShellId)
|
||||
{
|
||||
G4std::vector<G4DynamicParticle*>* vectorOfParticles = new G4std::vector<G4DynamicParticle*>;
|
||||
std::vector<G4DynamicParticle*>* vectorOfParticles = new std::vector<G4DynamicParticle*>;
|
||||
G4DynamicParticle* aParticle;
|
||||
G4int provShellId = 0;
|
||||
G4int counter = 0;
|
||||
@@ -304,7 +304,7 @@ G4DynamicParticle* G4AtomicDeexcitation::GenerateAuger(G4int Z, G4int shellId)
|
||||
(anAugerTransition->TransitionOriginatingShellIds())->size();
|
||||
while (transitionLoopShellIndex < transitionSize) {
|
||||
|
||||
G4std::vector<G4int>::const_iterator pos =
|
||||
std::vector<G4int>::const_iterator pos =
|
||||
anAugerTransition->TransitionOriginatingShellIds()->begin();
|
||||
|
||||
G4int transitionLoopShellId = *(pos+transitionLoopShellIndex);
|
||||
@@ -345,7 +345,7 @@ G4DynamicParticle* G4AtomicDeexcitation::GenerateAuger(G4int Z, G4int shellId)
|
||||
|
||||
while (transitionRandomShellIndex < transitionSize) {
|
||||
|
||||
G4std::vector<G4int>::const_iterator pos =
|
||||
std::vector<G4int>::const_iterator pos =
|
||||
anAugerTransition->TransitionOriginatingShellIds()->begin();
|
||||
|
||||
transitionRandomShellId = *(pos+transitionRandomShellIndex);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AtomicShell.cc,v 1.2 ????
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
|
||||
// Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AtomicTransitionManager.cc,v 1.2 ????
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
|
||||
// Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
|
||||
@@ -55,7 +55,7 @@ G4AtomicTransitionManager::G4AtomicTransitionManager(G4int minZ, G4int maxZ,
|
||||
// energies of shells
|
||||
for (G4int Z = zMin; Z<= zMax; Z++)
|
||||
{
|
||||
G4std::vector<G4AtomicShell*> vectorOfShells;
|
||||
std::vector<G4AtomicShell*> vectorOfShells;
|
||||
|
||||
size_t numberOfShells=shellManager->NumberOfShells(Z);
|
||||
for (size_t shellIndex = 0; shellIndex<numberOfShells; shellIndex++)
|
||||
@@ -68,7 +68,7 @@ G4AtomicTransitionManager::G4AtomicTransitionManager(G4int minZ, G4int maxZ,
|
||||
vectorOfShells.push_back(shell);
|
||||
}
|
||||
|
||||
// shellTable.insert(G4std::make_pair(Z, vectorOfShells));
|
||||
// shellTable.insert(std::make_pair(Z, vectorOfShells));
|
||||
shellTable[Z] = vectorOfShells;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ G4AtomicTransitionManager::G4AtomicTransitionManager(G4int minZ, G4int maxZ,
|
||||
// energies and transition probabilities
|
||||
for (G4int Znum= infTableLimit; Znum<=supTableLimit; Znum++)
|
||||
{ G4FluoData* fluoManager = new G4FluoData;
|
||||
G4std::vector<G4FluoTransition*> vectorOfTransitions;
|
||||
std::vector<G4FluoTransition*> vectorOfTransitions;
|
||||
fluoManager->LoadData(Znum);
|
||||
|
||||
size_t numberOfVacancies = fluoManager-> NumberOfVacancies();
|
||||
@@ -84,7 +84,7 @@ G4AtomicTransitionManager::G4AtomicTransitionManager(G4int minZ, G4int maxZ,
|
||||
for (size_t vacancyIndex = 0; vacancyIndex<numberOfVacancies; vacancyIndex++)
|
||||
|
||||
{
|
||||
G4std::vector<G4int> vectorOfIds;
|
||||
std::vector<G4int> vectorOfIds;
|
||||
G4DataVector vectorOfEnergies;
|
||||
G4DataVector vectorOfProbabilities;
|
||||
|
||||
@@ -108,7 +108,7 @@ G4AtomicTransitionManager::G4AtomicTransitionManager(G4int minZ, G4int maxZ,
|
||||
vectorOfEnergies,vectorOfProbabilities);
|
||||
vectorOfTransitions.push_back(transition);
|
||||
}
|
||||
// transitionTable.insert(G4std::make_pair(Znum, vectorOfTransitions));
|
||||
// transitionTable.insert(std::make_pair(Znum, vectorOfTransitions));
|
||||
transitionTable[Znum] = vectorOfTransitions;
|
||||
|
||||
delete fluoManager;
|
||||
@@ -122,11 +122,11 @@ G4AtomicTransitionManager::~G4AtomicTransitionManager()
|
||||
|
||||
delete augerData;
|
||||
|
||||
G4std::map<G4int,G4std::vector<G4AtomicShell*>,G4std::less<G4int> >::iterator pos;
|
||||
std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::iterator pos;
|
||||
|
||||
for (pos = shellTable.begin(); pos != shellTable.end(); pos++){
|
||||
|
||||
G4std::vector< G4AtomicShell*>vec = (*pos).second;
|
||||
std::vector< G4AtomicShell*>vec = (*pos).second;
|
||||
|
||||
G4int vecSize=vec.size();
|
||||
|
||||
@@ -137,11 +137,11 @@ G4std::map<G4int,G4std::vector<G4AtomicShell*>,G4std::less<G4int> >::iterator po
|
||||
|
||||
}
|
||||
|
||||
G4std::map<G4int,G4std::vector<G4FluoTransition*>,G4std::less<G4int> >::iterator ppos;
|
||||
std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::iterator ppos;
|
||||
|
||||
for (ppos = transitionTable.begin(); ppos != transitionTable.end(); ppos++){
|
||||
|
||||
G4std::vector<G4FluoTransition*>vec = (*ppos).second;
|
||||
std::vector<G4FluoTransition*>vec = (*ppos).second;
|
||||
|
||||
G4int vecSize=vec.size();
|
||||
|
||||
@@ -169,13 +169,13 @@ G4AtomicTransitionManager* G4AtomicTransitionManager::Instance()
|
||||
|
||||
G4AtomicShell* G4AtomicTransitionManager::Shell(G4int Z, size_t shellIndex) const
|
||||
{
|
||||
G4std::map<G4int,G4std::vector<G4AtomicShell*>,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::const_iterator pos;
|
||||
|
||||
pos = shellTable.find(Z);
|
||||
|
||||
if (pos!= shellTable.end())
|
||||
{
|
||||
G4std::vector<G4AtomicShell*> v = (*pos).second;
|
||||
std::vector<G4AtomicShell*> v = (*pos).second;
|
||||
if (shellIndex<v.size())
|
||||
{
|
||||
return(v[shellIndex]);
|
||||
@@ -209,11 +209,11 @@ G4AtomicShell* G4AtomicTransitionManager::Shell(G4int Z, size_t shellIndex) cons
|
||||
|
||||
const G4FluoTransition* G4AtomicTransitionManager::ReachableShell(G4int Z,size_t shellIndex) const
|
||||
{
|
||||
G4std::map<G4int,G4std::vector<G4FluoTransition*>,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator pos;
|
||||
pos = transitionTable.find(Z);
|
||||
if (pos!= transitionTable.end())
|
||||
{
|
||||
G4std::vector<G4FluoTransition*> v = (*pos).second;
|
||||
std::vector<G4FluoTransition*> v = (*pos).second;
|
||||
if (shellIndex < v.size()) return(v[shellIndex]);
|
||||
else {
|
||||
G4Exception("G4AtomicTransitionManager:reachable shell not found");
|
||||
@@ -238,13 +238,13 @@ const G4AugerTransition* G4AtomicTransitionManager::ReachableAugerShell(G4int Z,
|
||||
G4int G4AtomicTransitionManager::NumberOfShells (G4int Z) const
|
||||
{
|
||||
|
||||
G4std::map<G4int,G4std::vector<G4AtomicShell*>,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,std::vector<G4AtomicShell*>,std::less<G4int> >::const_iterator pos;
|
||||
|
||||
pos = shellTable.find(Z);
|
||||
|
||||
if (pos!= shellTable.end()){
|
||||
|
||||
G4std::vector<G4AtomicShell*> v = (*pos).second;
|
||||
std::vector<G4AtomicShell*> v = (*pos).second;
|
||||
|
||||
return v.size();
|
||||
}
|
||||
@@ -260,13 +260,13 @@ G4std::map<G4int,G4std::vector<G4AtomicShell*>,G4std::less<G4int> >::const_itera
|
||||
|
||||
G4int G4AtomicTransitionManager::NumberOfReachableShells(G4int Z) const
|
||||
{
|
||||
G4std::map<G4int,G4std::vector<G4FluoTransition*>,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::const_iterator pos;
|
||||
|
||||
pos = transitionTable.find(Z);
|
||||
|
||||
if (pos!= transitionTable.end())
|
||||
{
|
||||
G4std::vector<G4FluoTransition*> v = (*pos).second;
|
||||
std::vector<G4FluoTransition*> v = (*pos).second;
|
||||
return v.size();
|
||||
}
|
||||
else
|
||||
@@ -291,13 +291,13 @@ G4double G4AtomicTransitionManager::TotalRadiativeTransitionProbability(G4int Z,
|
||||
size_t shellIndex)
|
||||
|
||||
{
|
||||
G4std::map<G4int,G4std::vector<G4FluoTransition*>,G4std::less<G4int> >::iterator pos;
|
||||
std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::iterator pos;
|
||||
|
||||
pos = transitionTable.find(Z);
|
||||
|
||||
if (pos!= transitionTable.end())
|
||||
{
|
||||
G4std::vector<G4FluoTransition*> v = (*pos).second;
|
||||
std::vector<G4FluoTransition*> v = (*pos).second;
|
||||
|
||||
if (shellIndex < v.size())
|
||||
{
|
||||
@@ -328,13 +328,13 @@ G4double G4AtomicTransitionManager::TotalNonRadiativeTransitionProbability(G4int
|
||||
|
||||
{
|
||||
|
||||
G4std::map<G4int,G4std::vector<G4FluoTransition*>,G4std::less<G4int> >::iterator pos;
|
||||
std::map<G4int,std::vector<G4FluoTransition*>,std::less<G4int> >::iterator pos;
|
||||
|
||||
pos = transitionTable.find(Z);
|
||||
|
||||
if (pos!= transitionTable.end()){
|
||||
|
||||
G4std::vector<G4FluoTransition*> v = (*pos).second;
|
||||
std::vector<G4FluoTransition*> v = (*pos).second;
|
||||
|
||||
|
||||
if (shellIndex<v.size()){
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
#include "G4Material.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementVector.hh"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/strstream"
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
G4AugerData::G4AugerData()
|
||||
{
|
||||
@@ -61,16 +61,16 @@ G4AugerData::G4AugerData()
|
||||
G4AugerData::~G4AugerData()
|
||||
{
|
||||
/*
|
||||
G4std::map<G4int,G4std::vector<G4AugerTransition>,G4std::less<G4int> >::iterator pos;
|
||||
std::map<G4int,std::vector<G4AugerTransition>,std::less<G4int> >::iterator pos;
|
||||
|
||||
for (pos = augerTransitionTable.begin(); pos != augerTransitionTable.end(); pos++)
|
||||
{
|
||||
G4std::vector<G4AugerTransition> dataSet = (*pos).second;
|
||||
std::vector<G4AugerTransition> dataSet = (*pos).second;
|
||||
delete dataSet;
|
||||
}
|
||||
for (pos = energyMap.begin(); pos != energyMap.end(); pos++)
|
||||
{
|
||||
G4std::map<G4Int,G4DataVector*,G4std::less<G4int>>* dataMap = (*pos).second;
|
||||
std::map<G4Int,G4DataVector*,std::less<G4int>>* dataMap = (*pos).second;
|
||||
for (pos2 = newIdProbabilityMap.begin(); pos2 != idMap.end(); pos2++)
|
||||
{
|
||||
G4DataVector* dataSet = (*pos2).second;
|
||||
@@ -79,7 +79,7 @@ G4AugerData::~G4AugerData()
|
||||
}
|
||||
for (pos = probabilityMap.begin(); pos != probabilityMap.end(); pos++)
|
||||
{
|
||||
G4std::map<G4Int,G4DataVector*,G4std::less<G4int>>* dataMap = (*pos).second;
|
||||
std::map<G4Int,G4DataVector*,std::less<G4int>>* dataMap = (*pos).second;
|
||||
for (pos2 = newIdProbabilityMap.begin(); pos2 != idMap.end(); pos2++)
|
||||
{
|
||||
G4DataVector* dataSet = (*pos2).second;
|
||||
@@ -119,7 +119,7 @@ G4int G4AugerData::VacancyId(G4int Z, G4int vacancyIndex) const
|
||||
else {
|
||||
trans_Table::const_iterator element = augerTransitionTable.find(Z);
|
||||
if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
|
||||
G4std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
n = (G4int) dataSet[vacancyIndex].FinalShellId();
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ size_t G4AugerData::NumberOfTransitions(G4int Z, G4int vacancyIndex) const
|
||||
else {
|
||||
trans_Table::const_iterator element = augerTransitionTable.find(Z);
|
||||
if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
|
||||
G4std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
n = (G4int)dataSet[vacancyIndex].TransitionOriginatingShellIds()->size();
|
||||
}
|
||||
return n;
|
||||
@@ -155,8 +155,8 @@ size_t G4AugerData::NumberOfAuger(G4int Z, G4int initIndex, G4int vacancyId) con
|
||||
else {
|
||||
trans_Table::const_iterator element = augerTransitionTable.find(Z);
|
||||
if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
|
||||
G4std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
const G4std::vector<G4int>* temp = dataSet[initIndex].AugerOriginatingShellIds(vacancyId);
|
||||
std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
const std::vector<G4int>* temp = dataSet[initIndex].AugerOriginatingShellIds(vacancyId);
|
||||
n = temp->size();
|
||||
}
|
||||
return n;
|
||||
@@ -170,7 +170,7 @@ size_t G4AugerData::AugerShellId(G4int Z, G4int vacancyIndex, G4int transId, G4i
|
||||
else {
|
||||
trans_Table::const_iterator element = augerTransitionTable.find(Z);
|
||||
if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
|
||||
G4std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
n = dataSet[vacancyIndex].AugerOriginatingShellId(augerIndex,transId);
|
||||
}
|
||||
return n;
|
||||
@@ -185,7 +185,7 @@ G4int G4AugerData::StartShellId(G4int Z, G4int vacancyIndex, G4int transitionShe
|
||||
else {
|
||||
trans_Table::const_iterator element = augerTransitionTable.find(Z);
|
||||
if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
|
||||
G4std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
n = dataSet[vacancyIndex].TransitionOriginatingShellId(transitionShellIndex);
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ G4double G4AugerData::StartShellEnergy(G4int Z, G4int vacancyIndex, G4int transi
|
||||
else {
|
||||
trans_Table::const_iterator element = augerTransitionTable.find(Z);
|
||||
if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
|
||||
G4std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
n = dataSet[vacancyIndex].AugerTransitionEnergy(augerIndex,transitionId);
|
||||
|
||||
}
|
||||
@@ -219,7 +219,7 @@ G4double G4AugerData::StartShellProb(G4int Z, G4int vacancyIndex,G4int transitio
|
||||
else {
|
||||
trans_Table::const_iterator element = augerTransitionTable.find(Z);
|
||||
if (element == augerTransitionTable.end()) {G4Exception("G4AugerData::augerTransitionTable: Data not Loaded");}
|
||||
G4std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
std::vector<G4AugerTransition> dataSet = (*element).second;
|
||||
n = dataSet[vacancyIndex].AugerTransitionProbability(augerIndex, transitionId);
|
||||
|
||||
|
||||
@@ -228,12 +228,12 @@ G4double G4AugerData::StartShellProb(G4int Z, G4int vacancyIndex,G4int transitio
|
||||
return n;
|
||||
}
|
||||
|
||||
G4std::vector<G4AugerTransition> G4AugerData::LoadData(G4int Z)
|
||||
std::vector<G4AugerTransition> G4AugerData::LoadData(G4int Z)
|
||||
{
|
||||
// Build the complete string identifying the file with the data set
|
||||
|
||||
char nameChar[100] = {""};
|
||||
G4std::ostrstream ost(nameChar, 100, G4std::ios::out);
|
||||
std::ostrstream ost(nameChar, 100, std::ios::out);
|
||||
if(Z != 0){
|
||||
ost << "au-tr-pr-"<< Z << ".dat";
|
||||
}
|
||||
@@ -251,8 +251,8 @@ G4std::vector<G4AugerTransition> G4AugerData::LoadData(G4int Z)
|
||||
|
||||
G4String pathString(path);
|
||||
G4String dirFile = pathString + "/auger/" + name;
|
||||
G4std::ifstream file(dirFile);
|
||||
G4std::filebuf* lsdp = file.rdbuf();
|
||||
std::ifstream file(dirFile);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
|
||||
if (! (lsdp->is_open()) )
|
||||
{
|
||||
@@ -266,17 +266,17 @@ G4std::vector<G4AugerTransition> G4AugerData::LoadData(G4int Z)
|
||||
G4int s = 0;
|
||||
|
||||
G4int vacId = 0;
|
||||
G4std::vector<G4int>* initIds = new G4std::vector<G4int>;
|
||||
G4std::vector<G4int>* newIds = new G4std::vector<G4int>;
|
||||
std::vector<G4int>* initIds = new std::vector<G4int>;
|
||||
std::vector<G4int>* newIds = new std::vector<G4int>;
|
||||
G4DataVector* transEnergies = new G4DataVector;
|
||||
G4DataVector* transProbabilities = new G4DataVector;
|
||||
G4std::vector<G4AugerTransition> augerTransitionVector;
|
||||
G4std::map<G4int,G4std::vector<G4int>,G4std::less<G4int> >* newIdMap =
|
||||
new G4std::map<G4int,G4std::vector<G4int>,G4std::less<G4int> >;
|
||||
G4std::map<G4int,G4DataVector,G4std::less<G4int> >* newEnergyMap =
|
||||
new G4std::map<G4int,G4DataVector,G4std::less<G4int> >;
|
||||
G4std::map<G4int,G4DataVector,G4std::less<G4int> >* newProbabilityMap =
|
||||
new G4std::map<G4int,G4DataVector,G4std::less<G4int> >;
|
||||
std::vector<G4AugerTransition> augerTransitionVector;
|
||||
std::map<G4int,std::vector<G4int>,std::less<G4int> >* newIdMap =
|
||||
new std::map<G4int,std::vector<G4int>,std::less<G4int> >;
|
||||
std::map<G4int,G4DataVector,std::less<G4int> >* newEnergyMap =
|
||||
new std::map<G4int,G4DataVector,std::less<G4int> >;
|
||||
std::map<G4int,G4DataVector,std::less<G4int> >* newProbabilityMap =
|
||||
new std::map<G4int,G4DataVector,std::less<G4int> >;
|
||||
|
||||
|
||||
do {
|
||||
@@ -296,7 +296,7 @@ G4std::vector<G4AugerTransition> G4AugerData::LoadData(G4int Z)
|
||||
|
||||
|
||||
|
||||
G4std::vector<G4int>::iterator vectorIndex = initIds->begin();
|
||||
std::vector<G4int>::iterator vectorIndex = initIds->begin();
|
||||
|
||||
vacId = *vectorIndex;
|
||||
|
||||
@@ -304,7 +304,7 @@ G4std::vector<G4AugerTransition> G4AugerData::LoadData(G4int Z)
|
||||
|
||||
|
||||
|
||||
G4std::vector<G4int> identifiers;
|
||||
std::vector<G4int> identifiers;
|
||||
for (vectorIndex = initIds->begin()+1 ; vectorIndex != initIds->end(); ++vectorIndex){
|
||||
|
||||
identifiers.push_back(*vectorIndex);
|
||||
@@ -334,13 +334,13 @@ G4std::vector<G4AugerTransition> G4AugerData::LoadData(G4int Z)
|
||||
delete newIds;
|
||||
delete transEnergies;
|
||||
delete transProbabilities;
|
||||
initIds = new G4std::vector<G4int>;
|
||||
newIds = new G4std::vector<G4int>;
|
||||
initIds = new std::vector<G4int>;
|
||||
newIds = new std::vector<G4int>;
|
||||
transEnergies = new G4DataVector;
|
||||
transProbabilities = new G4DataVector;
|
||||
newIdMap = new G4std::map<G4int,G4std::vector<G4int>,G4std::less<G4int> >;
|
||||
newEnergyMap = new G4std::map<G4int,G4DataVector,G4std::less<G4int> >;
|
||||
newProbabilityMap = new G4std::map<G4int,G4DataVector,G4std::less<G4int> >;
|
||||
newIdMap = new std::map<G4int,std::vector<G4int>,std::less<G4int> >;
|
||||
newEnergyMap = new std::map<G4int,G4DataVector,std::less<G4int> >;
|
||||
newProbabilityMap = new std::map<G4int,G4DataVector,std::less<G4int> >;
|
||||
|
||||
|
||||
|
||||
@@ -399,7 +399,7 @@ G4std::vector<G4AugerTransition> G4AugerData::LoadData(G4int Z)
|
||||
}
|
||||
else {
|
||||
|
||||
G4std::vector<G4int>::iterator vectorIndex = (initIds->end())-1;
|
||||
std::vector<G4int>::iterator vectorIndex = (initIds->end())-1;
|
||||
if((G4int)a != *vectorIndex){
|
||||
|
||||
|
||||
@@ -418,7 +418,7 @@ G4std::vector<G4AugerTransition> G4AugerData::LoadData(G4int Z)
|
||||
delete newIds;
|
||||
delete transEnergies;
|
||||
delete transProbabilities;
|
||||
newIds = new G4std::vector<G4int>;
|
||||
newIds = new std::vector<G4int>;
|
||||
transEnergies = new G4DataVector;
|
||||
transProbabilities = new G4DataVector;
|
||||
}
|
||||
@@ -520,16 +520,16 @@ void G4AugerData::PrintData(G4int Z)
|
||||
}
|
||||
G4AugerTransition* G4AugerData::GetAugerTransition(G4int Z,G4int vacancyShellIndex)
|
||||
{
|
||||
G4std::vector<G4AugerTransition>* dataSet = &augerTransitionTable[Z];
|
||||
G4std::vector<G4AugerTransition>::iterator vectorIndex = dataSet->begin() + vacancyShellIndex;
|
||||
std::vector<G4AugerTransition>* dataSet = &augerTransitionTable[Z];
|
||||
std::vector<G4AugerTransition>::iterator vectorIndex = dataSet->begin() + vacancyShellIndex;
|
||||
|
||||
G4AugerTransition* augerTransition = &(*vectorIndex);
|
||||
return augerTransition;
|
||||
}
|
||||
|
||||
G4std::vector<G4AugerTransition>* G4AugerData::GetAugerTransitions(G4int Z)
|
||||
std::vector<G4AugerTransition>* G4AugerData::GetAugerTransitions(G4int Z)
|
||||
{
|
||||
G4std::vector<G4AugerTransition>* dataSet = &augerTransitionTable[Z];
|
||||
std::vector<G4AugerTransition>* dataSet = &augerTransitionTable[Z];
|
||||
return dataSet;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
// the final shell in wich the electron goes is needed, to know the data for the auger electron emitted
|
||||
// (i.e. originating shell id, electron energy and transition probability)
|
||||
|
||||
G4AugerTransition::G4AugerTransition(G4int finalShell, G4std::vector<G4int> transIds,
|
||||
const G4std::map<G4int,G4std::vector<G4int>,G4std::less<G4int> >* idMap,
|
||||
const G4std::map<G4int,G4DataVector,G4std::less<G4int> >* energyMap,
|
||||
const G4std::map<G4int,G4DataVector,G4std::less<G4int> >* probabilityMap)
|
||||
G4AugerTransition::G4AugerTransition(G4int finalShell, std::vector<G4int> transIds,
|
||||
const std::map<G4int,std::vector<G4int>,std::less<G4int> >* idMap,
|
||||
const std::map<G4int,G4DataVector,std::less<G4int> >* energyMap,
|
||||
const std::map<G4int,G4DataVector,std::less<G4int> >* probabilityMap)
|
||||
{
|
||||
finalShellId = finalShell;
|
||||
augerOriginatingShellIdsMap = *idMap;
|
||||
@@ -61,12 +61,12 @@ G4AugerTransition::~G4AugerTransition()
|
||||
// Returns the ids of the shells from wich an auger electron culd came from, given th shell
|
||||
// from wich the transition electron cames from.
|
||||
|
||||
const G4std::vector<G4int>* G4AugerTransition::AugerOriginatingShellIds(G4int startShellId) const
|
||||
const std::vector<G4int>* G4AugerTransition::AugerOriginatingShellIds(G4int startShellId) const
|
||||
{
|
||||
G4std::map<G4int,G4std::vector<G4int>,G4std::less<G4int> >::const_iterator shellId = augerOriginatingShellIdsMap.find(startShellId);
|
||||
std::map<G4int,std::vector<G4int>,std::less<G4int> >::const_iterator shellId = augerOriginatingShellIdsMap.find(startShellId);
|
||||
|
||||
const G4std::vector<G4int>* dataSet = &(*shellId).second;
|
||||
//const G4std::vector<G4int>* dataOut = 0;
|
||||
const std::vector<G4int>* dataSet = &(*shellId).second;
|
||||
//const std::vector<G4int>* dataOut = 0;
|
||||
|
||||
if (dataSet->size() == 0) {G4cout << "Error: no auger Id found"<< G4endl;}
|
||||
else {
|
||||
@@ -80,10 +80,10 @@ const G4std::vector<G4int>* G4AugerTransition::AugerOriginatingShellIds(G4int st
|
||||
|
||||
// Returns the ids of the shells from wich an electron cuuld fill the vacancy in finalShellId
|
||||
|
||||
const G4std::vector<G4int>* G4AugerTransition::TransitionOriginatingShellIds() const
|
||||
const std::vector<G4int>* G4AugerTransition::TransitionOriginatingShellIds() const
|
||||
{
|
||||
|
||||
const G4std::vector<G4int>* dataSet = &transitionOriginatingShellIds;
|
||||
const std::vector<G4int>* dataSet = &transitionOriginatingShellIds;
|
||||
return dataSet;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ const G4std::vector<G4int>* G4AugerTransition::TransitionOriginatingShellIds() c
|
||||
|
||||
const G4DataVector* G4AugerTransition::AugerTransitionEnergies(G4int startShellId) const
|
||||
{
|
||||
G4std::map<G4int,G4DataVector,G4std::less<G4int> >::const_iterator shellId = augerTransitionEnergiesMap.find(startShellId);
|
||||
std::map<G4int,G4DataVector,std::less<G4int> >::const_iterator shellId = augerTransitionEnergiesMap.find(startShellId);
|
||||
const G4DataVector* dataSet = &(*shellId).second;
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ const G4DataVector* G4AugerTransition::AugerTransitionEnergies(G4int startShellI
|
||||
|
||||
const G4DataVector* G4AugerTransition::AugerTransitionProbabilities(G4int startShellId) const
|
||||
{
|
||||
G4std::map<G4int,G4DataVector,G4std::less<G4int> >::const_iterator shellId = augerTransitionProbabilitiesMap.find(startShellId);
|
||||
std::map<G4int,G4DataVector,std::less<G4int> >::const_iterator shellId = augerTransitionProbabilitiesMap.find(startShellId);
|
||||
const G4DataVector* dataSet = &(*shellId).second;
|
||||
return dataSet;
|
||||
}
|
||||
@@ -119,9 +119,9 @@ const G4int G4AugerTransition::FinalShellId() const
|
||||
|
||||
G4int G4AugerTransition::AugerOriginatingShellId(G4int index, G4int startShellId) const
|
||||
{
|
||||
const G4std::vector<G4int>* ids = AugerOriginatingShellIds(startShellId);
|
||||
const std::vector<G4int>* ids = AugerOriginatingShellIds(startShellId);
|
||||
// G4int i =
|
||||
G4std::vector<G4int>::const_iterator pos = ids->begin();
|
||||
std::vector<G4int>::const_iterator pos = ids->begin();
|
||||
G4int n = *(pos+index);
|
||||
return n;
|
||||
}
|
||||
|
||||
+5
-5
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BremsstrahlungCrossSectionHandler.cc,v 1.6 2003/01/22 18:47:26 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4BremsstrahlungCrossSectionHandler.cc,v 1.8 2003/06/16 17:00:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -52,7 +52,7 @@
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
|
||||
G4BremsstrahlungCrossSectionHandler::G4BremsstrahlungCrossSectionHandler(const G4VEnergySpectrum* spec,
|
||||
G4VDataSetAlgorithm* alg)
|
||||
G4VDataSetAlgorithm* )
|
||||
: theBR(spec)
|
||||
{
|
||||
interp = new G4SemiLogInterpolation();
|
||||
@@ -65,11 +65,11 @@ G4BremsstrahlungCrossSectionHandler::~G4BremsstrahlungCrossSectionHandler()
|
||||
}
|
||||
|
||||
|
||||
G4std::vector<G4VEMDataSet*>*
|
||||
std::vector<G4VEMDataSet*>*
|
||||
G4BremsstrahlungCrossSectionHandler::BuildCrossSectionsForMaterials(const G4DataVector& energyVector,
|
||||
const G4DataVector* energyCuts)
|
||||
{
|
||||
G4std::vector<G4VEMDataSet*>* set = new G4std::vector<G4VEMDataSet*>;
|
||||
std::vector<G4VEMDataSet*>* set = new std::vector<G4VEMDataSet*>;
|
||||
|
||||
G4DataVector* energies;
|
||||
G4DataVector* cs;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4BremsstrahlungParameters.cc,v 1.16 2003/02/28 08:42:18 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4BremsstrahlungParameters.cc,v 1.17 2003/06/16 17:00:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
// V.Ivanchenko (Vladimir.Ivantchenko@cern.ch)
|
||||
@@ -44,8 +44,8 @@
|
||||
#include "G4EMDataSet.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/strstream"
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
|
||||
G4BremsstrahlungParameters:: G4BremsstrahlungParameters(const G4String& name,
|
||||
@@ -61,7 +61,7 @@ G4BremsstrahlungParameters:: G4BremsstrahlungParameters(const G4String& name,
|
||||
G4BremsstrahlungParameters::~G4BremsstrahlungParameters()
|
||||
{
|
||||
// Reset the map of data sets: remove the data sets from the map
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::iterator pos;
|
||||
|
||||
for (pos = param.begin(); pos != param.end(); ++pos)
|
||||
{
|
||||
@@ -80,14 +80,14 @@ G4double G4BremsstrahlungParameters::Parameter(G4int parameterIndex,
|
||||
{
|
||||
G4double value = 0.;
|
||||
G4int id = Z*length + parameterIndex;
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
|
||||
|
||||
pos = param.find(id);
|
||||
if (pos!= param.end()) {
|
||||
|
||||
G4VEMDataSet* dataSet = (*pos).second;
|
||||
const G4DataVector ener = dataSet->GetEnergies(0);
|
||||
G4double ee = G4std::max(ener.front(),G4std::min(ener.back(),energy));
|
||||
G4double ee = std::max(ener.front(),std::min(ener.back(),energy));
|
||||
value = dataSet->FindValue(ee);
|
||||
|
||||
} else {
|
||||
@@ -145,8 +145,8 @@ void G4BremsstrahlungParameters::LoadData(const G4String& name)
|
||||
|
||||
G4String pathString_a(path);
|
||||
G4String name_a = pathString_a + name;
|
||||
G4std::ifstream file_a(name_a);
|
||||
G4std::filebuf* lsdp_a = file_a.rdbuf();
|
||||
std::ifstream file_a(name_a);
|
||||
std::filebuf* lsdp_a = file_a.rdbuf();
|
||||
|
||||
if (! (lsdp_a->is_open()) )
|
||||
{
|
||||
@@ -169,7 +169,7 @@ void G4BremsstrahlungParameters::LoadData(const G4String& name)
|
||||
data = new G4DataVector();
|
||||
G4int z = 0;
|
||||
|
||||
G4std::vector<G4DataVector*> a;
|
||||
std::vector<G4DataVector*> a;
|
||||
for (size_t j=0; j<length; j++) {
|
||||
G4DataVector* aa = new G4DataVector();
|
||||
a.push_back(aa);
|
||||
@@ -262,7 +262,7 @@ void G4BremsstrahlungParameters::PrintData() const
|
||||
G4cout << G4endl;
|
||||
|
||||
size_t nZ = activeZ.size();
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
|
||||
|
||||
for (size_t j=0; j<nZ; j++) {
|
||||
G4int Z = (G4int)activeZ[j];
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CompositeEMDataSet.cc,v 1.6 2002/05/28 09:20:18 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4CompositeEMDataSet.cc,v 1.7 2003/06/16 17:00:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
@@ -35,8 +35,8 @@
|
||||
#include "G4CompositeEMDataSet.hh"
|
||||
#include "G4EMDataSet.hh"
|
||||
#include "G4VDataSetAlgorithm.hh"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/strstream"
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
|
||||
G4CompositeEMDataSet::G4CompositeEMDataSet(G4VDataSetAlgorithm* interpolation,
|
||||
@@ -106,7 +106,7 @@ void G4CompositeEMDataSet::LoadData(const G4String& fileName)
|
||||
// Build the complete string identifying the file with the data set
|
||||
|
||||
char nameChar[100] = {""};
|
||||
G4std::ostrstream ost(nameChar, 100, G4std::ios::out);
|
||||
std::ostrstream ost(nameChar, 100, std::ios::out);
|
||||
|
||||
ost << fileName << Z << ".dat";
|
||||
|
||||
@@ -122,8 +122,8 @@ void G4CompositeEMDataSet::LoadData(const G4String& fileName)
|
||||
G4String pathString(path);
|
||||
G4String separator = G4String("/");
|
||||
G4String dirFile = pathString + separator + name;
|
||||
G4std::ifstream file(dirFile);
|
||||
G4std::filebuf* lsdp = file.rdbuf();
|
||||
std::ifstream file(dirFile);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
|
||||
if (! (lsdp->is_open()) )
|
||||
{
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CrossSectionHandler.cc,v 1.15 2003/04/24 14:19:37 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4CrossSectionHandler.cc,v 1.16 2003/06/16 17:00:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
@@ -44,10 +44,10 @@
|
||||
#include "G4Material.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "g4std/map"
|
||||
#include "g4std/vector"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/strstream"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
|
||||
@@ -57,14 +57,14 @@ G4CrossSectionHandler::G4CrossSectionHandler()
|
||||
G4CrossSectionHandler::~G4CrossSectionHandler()
|
||||
{ }
|
||||
|
||||
G4std::vector<G4VEMDataSet*>*
|
||||
std::vector<G4VEMDataSet*>*
|
||||
G4CrossSectionHandler::BuildCrossSectionsForMaterials(const G4DataVector& energyVector,
|
||||
const G4DataVector*)
|
||||
{
|
||||
G4DataVector* energies;
|
||||
G4DataVector* data;
|
||||
|
||||
G4std::vector<G4VEMDataSet*>* matCrossSections = new G4std::vector<G4VEMDataSet*>;
|
||||
std::vector<G4VEMDataSet*>* matCrossSections = new std::vector<G4VEMDataSet*>;
|
||||
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4EMDataSet.cc,v 1.7 2003/02/24 00:36:10 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4EMDataSet.cc,v 1.9 2003/06/16 17:00:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
@@ -34,8 +34,8 @@
|
||||
|
||||
#include "G4EMDataSet.hh"
|
||||
#include "G4VDataSetAlgorithm.hh"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/strstream"
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
// Constructor
|
||||
|
||||
@@ -80,7 +80,7 @@ G4EMDataSet::~G4EMDataSet()
|
||||
}
|
||||
|
||||
|
||||
G4double G4EMDataSet::FindValue(G4double e, G4int id) const
|
||||
G4double G4EMDataSet::FindValue(G4double e, G4int) const
|
||||
{
|
||||
G4double value = 0.;
|
||||
if ( !(energies->empty()) )
|
||||
@@ -144,7 +144,7 @@ void G4EMDataSet::LoadData(const G4String& fileName)
|
||||
// Build the complete string identifying the file with the data set
|
||||
|
||||
char nameChar[100] = {""};
|
||||
G4std::ostrstream ost(nameChar, 100, G4std::ios::out);
|
||||
std::ostrstream ost(nameChar, 100, std::ios::out);
|
||||
|
||||
ost << fileName << z << ".dat";
|
||||
|
||||
@@ -161,8 +161,8 @@ void G4EMDataSet::LoadData(const G4String& fileName)
|
||||
G4String separator("/");
|
||||
|
||||
G4String dirFile = pathString + separator + name;
|
||||
G4std::ifstream file(dirFile);
|
||||
G4std::filebuf* lsdp = file.rdbuf();
|
||||
std::ifstream file(dirFile);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
|
||||
if (! (lsdp->is_open()) )
|
||||
{
|
||||
@@ -223,10 +223,10 @@ void G4EMDataSet::PrintData() const
|
||||
}
|
||||
|
||||
|
||||
const G4VEMDataSet* G4EMDataSet::GetComponent(G4int i) const
|
||||
const G4VEMDataSet* G4EMDataSet::GetComponent(G4int) const
|
||||
{ return 0; }
|
||||
|
||||
void G4EMDataSet::AddComponent(G4VEMDataSet* dataSet)
|
||||
void G4EMDataSet::AddComponent(G4VEMDataSet*)
|
||||
{ }
|
||||
|
||||
size_t G4EMDataSet::NumberOfComponents() const
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#include "G4FluoData.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "G4FluoTransition.hh"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/strstream"
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
G4FluoData::G4FluoData()
|
||||
{
|
||||
@@ -43,7 +43,7 @@ G4FluoData::G4FluoData()
|
||||
|
||||
G4FluoData::~G4FluoData()
|
||||
{
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> >::iterator pos;
|
||||
std::map<G4int,G4DataVector*,std::less<G4int> >::iterator pos;
|
||||
|
||||
for (pos = idMap.begin(); pos != idMap.end(); ++pos)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ G4int G4FluoData::VacancyId(G4int vacancyIndex) const
|
||||
{G4Exception("G4FluoData::vacancyIndex outside boundaries");}
|
||||
else
|
||||
{
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator pos;
|
||||
pos = idMap.find(vacancyIndex);
|
||||
if (pos!= idMap.end())
|
||||
{ G4DataVector dataSet = (*(*pos).second);
|
||||
@@ -107,7 +107,7 @@ G4int G4FluoData::StartShellId(G4int initIndex, G4int vacancyIndex) const
|
||||
{G4Exception("G4FluoData::vacancyIndex outside boundaries");}
|
||||
else
|
||||
{
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator pos;
|
||||
|
||||
pos = idMap.find(vacancyIndex);
|
||||
|
||||
@@ -131,7 +131,7 @@ G4double G4FluoData::StartShellEnergy(G4int initIndex, G4int vacancyIndex) const
|
||||
{G4Exception("G4FluoData::vacancyIndex outside boundaries");}
|
||||
else
|
||||
{
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator pos;
|
||||
|
||||
pos = energyMap.find(vacancyIndex);
|
||||
|
||||
@@ -155,7 +155,7 @@ G4double G4FluoData::StartShellProb(G4int initIndex, G4int vacancyIndex) const
|
||||
{G4Exception("G4FluoData::vacancyIndex outside boundaries");}
|
||||
else
|
||||
{
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator pos;
|
||||
|
||||
pos = probabilityMap.find(vacancyIndex);
|
||||
|
||||
@@ -176,7 +176,7 @@ void G4FluoData::LoadData(G4int Z)
|
||||
// Build the complete string identifying the file with the data set
|
||||
|
||||
char nameChar[100] = {""};
|
||||
G4std::ostrstream ost(nameChar, 100, G4std::ios::out);
|
||||
std::ostrstream ost(nameChar, 100, std::ios::out);
|
||||
if(Z != 0){
|
||||
ost << "fl-tr-pr-"<< Z << ".dat";
|
||||
}
|
||||
@@ -195,8 +195,8 @@ void G4FluoData::LoadData(G4int Z)
|
||||
G4String pathString(path);
|
||||
G4String fluor("/fluor/");
|
||||
G4String dirFile = pathString + fluor + name;
|
||||
G4std::ifstream file(dirFile);
|
||||
G4std::filebuf* lsdp = file.rdbuf();
|
||||
std::ifstream file(dirFile);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
|
||||
if (! (lsdp->is_open()) )
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FluoTransition.cc,v 1.2 ????
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
|
||||
//
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "G4FluoTransition.hh"
|
||||
|
||||
G4FluoTransition::G4FluoTransition(G4int finalShell,
|
||||
const G4std::vector<G4int>& ids,
|
||||
const std::vector<G4int>& ids,
|
||||
const G4DataVector& energies,
|
||||
const G4DataVector& prob)
|
||||
:finalShellId(finalShell),
|
||||
@@ -48,7 +48,7 @@ G4FluoTransition::G4FluoTransition(G4int finalShell,
|
||||
G4FluoTransition::~G4FluoTransition()
|
||||
{ }
|
||||
|
||||
const G4std::vector<G4int>& G4FluoTransition::OriginatingShellIds() const
|
||||
const std::vector<G4int>& G4FluoTransition::OriginatingShellIds() const
|
||||
{
|
||||
return originatingShellIds;
|
||||
}
|
||||
|
||||
@@ -99,62 +99,55 @@ G4double G4IonChuFluctuationModel::TheValue(
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonChuFluctuationModel::HighEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
G4double G4IonChuFluctuationModel::HighEnergyLimit(const G4ParticleDefinition*,
|
||||
const G4Material* ) const
|
||||
{
|
||||
return 1.0*TeV ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonChuFluctuationModel::LowEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
G4double G4IonChuFluctuationModel::LowEnergyLimit(const G4ParticleDefinition*,
|
||||
const G4Material*) const
|
||||
{
|
||||
return 0.0 ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonChuFluctuationModel::HighEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle) const
|
||||
G4double G4IonChuFluctuationModel::HighEnergyLimit(const G4ParticleDefinition*) const
|
||||
{
|
||||
return 1.0*TeV ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonChuFluctuationModel::LowEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle) const
|
||||
G4double G4IonChuFluctuationModel::LowEnergyLimit(const G4ParticleDefinition*) const
|
||||
{
|
||||
return 0.0 ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4IonChuFluctuationModel::IsInCharge(
|
||||
const G4DynamicParticle* particle,
|
||||
const G4Material* material) const
|
||||
G4bool G4IonChuFluctuationModel::IsInCharge(const G4DynamicParticle*,
|
||||
const G4Material*) const
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4IonChuFluctuationModel::IsInCharge(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
G4bool G4IonChuFluctuationModel::IsInCharge(const G4ParticleDefinition*,
|
||||
const G4Material*) const
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonChuFluctuationModel::ChuFluctuationModel(
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy,
|
||||
G4double particleMass) const
|
||||
G4double G4IonChuFluctuationModel::ChuFluctuationModel(const G4Material* material,
|
||||
G4double kineticEnergy,
|
||||
G4double particleMass) const
|
||||
{
|
||||
// The aproximation of energy loss fluctuations
|
||||
// Q.Yang et al., NIM B61(1991)149-155.
|
||||
|
||||
@@ -70,7 +70,7 @@ G4IonYangFluctuationModel::~G4IonYangFluctuationModel()
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonYangFluctuationModel::TheValue(const G4DynamicParticle* particle,
|
||||
const G4Material* material)
|
||||
const G4Material* material)
|
||||
{
|
||||
G4double energy = particle->GetKineticEnergy() ;
|
||||
G4double mass = particle->GetMass() ;
|
||||
@@ -83,10 +83,9 @@ G4double G4IonYangFluctuationModel::TheValue(const G4DynamicParticle* particle,
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonYangFluctuationModel::TheValue(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy)
|
||||
G4double G4IonYangFluctuationModel::TheValue(const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy)
|
||||
{
|
||||
G4double mass = aParticle->GetPDGMass() ;
|
||||
G4double charge = (aParticle->GetPDGCharge())/eplus ;
|
||||
@@ -98,9 +97,23 @@ G4double G4IonYangFluctuationModel::TheValue(
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonYangFluctuationModel::HighEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
G4double G4IonYangFluctuationModel::HighEnergyLimit(const G4ParticleDefinition*,
|
||||
const G4Material*) const
|
||||
{
|
||||
return 1.0*TeV ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonYangFluctuationModel::LowEnergyLimit(const G4ParticleDefinition* ,
|
||||
const G4Material* ) const
|
||||
{
|
||||
return 0.0 ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonYangFluctuationModel::HighEnergyLimit(const G4ParticleDefinition* ) const
|
||||
{
|
||||
return 1.0*TeV ;
|
||||
}
|
||||
@@ -108,53 +121,33 @@ G4double G4IonYangFluctuationModel::HighEnergyLimit(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonYangFluctuationModel::LowEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
{
|
||||
return 0.0 ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonYangFluctuationModel::HighEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle) const
|
||||
{
|
||||
return 1.0*TeV ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonYangFluctuationModel::LowEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle) const
|
||||
const G4ParticleDefinition* ) const
|
||||
{
|
||||
return 0.0 ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4IonYangFluctuationModel::IsInCharge(
|
||||
const G4DynamicParticle* particle,
|
||||
const G4Material* material) const
|
||||
G4bool G4IonYangFluctuationModel::IsInCharge(const G4DynamicParticle*,
|
||||
const G4Material* ) const
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4IonYangFluctuationModel::IsInCharge(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
G4bool G4IonYangFluctuationModel::IsInCharge(const G4ParticleDefinition* ,
|
||||
const G4Material* ) const
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4IonYangFluctuationModel::YangFluctuationModel(
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy,
|
||||
G4double particleMass,
|
||||
G4double charge) const
|
||||
G4double G4IonYangFluctuationModel::YangFluctuationModel(const G4Material* material,
|
||||
G4double kineticEnergy,
|
||||
G4double particleMass,
|
||||
G4double charge) const
|
||||
{
|
||||
// The aproximation of energy loss fluctuations
|
||||
// Q.Yang et al., NIM B61(1991)149-155.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4LinInterpolation.cc,v 1.2 2002/05/28 09:20:19 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
|
||||
@@ -63,7 +63,7 @@ G4double G4LinLogLogInterpolation::Calculate(G4double x, G4int bin,
|
||||
G4double d2 = data[bin+1];
|
||||
if(d1 > 0.0 && d2 > 0.0) {
|
||||
value = (log10(d1)*log10(e2/x) + log10(d2)*log10(x/e1)) / log10(e2/e1);
|
||||
value = pow(10,value);
|
||||
value = pow(10.,value);
|
||||
} else {
|
||||
value = (d1*log10(e2/x) + d2*log10(x/e1)) / log10(e2/e1);
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LogLogInterpolation.cc,v 1.4 2002/05/28 09:20:19 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4LogLogInterpolation.cc,v 1.5 2003/06/25 14:24:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
@@ -65,7 +65,7 @@ G4double G4LogLogInterpolation::Calculate(G4double x, G4int bin,
|
||||
G4double d1 = data[bin];
|
||||
G4double d2 = data[bin+1];
|
||||
value = (log10(d1)*log10(e2/x) + log10(d2)*log10(x/e1)) / log10(e2/e1);
|
||||
value = pow(10,value);
|
||||
value = pow(10.,value);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4LowEnergyBremsstrahlung.cc,v 1.58 2003/02/28 08:42:17 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4LowEnergyBremsstrahlung.cc,v 1.63 2003/06/16 17:00:10 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
@@ -54,12 +54,16 @@
|
||||
// 21.01.2003 VI Cut per region
|
||||
// 21.02.2003 V.Ivanchenko Energy bins for spectrum are defined here
|
||||
// 28.02.03 V.Ivanchenko Filename is defined in the constructor
|
||||
// 24.03.2003 P.Rodrigues Changes to accommodate new angular generators
|
||||
// 20.05.2003 MGP Removed memory leak related to angularDistribution
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
#include "G4LowEnergyBremsstrahlung.hh"
|
||||
#include "G4eBremsstrahlungSpectrum.hh"
|
||||
#include "G4BremsstrahlungCrossSectionHandler.hh"
|
||||
#include "G4VBremAngularDistribution.hh"
|
||||
#include "G4ModifiedTsai.hh"
|
||||
#include "G4VDataSetAlgorithm.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4VEMDataSet.hh"
|
||||
@@ -78,14 +82,32 @@ G4LowEnergyBremsstrahlung::G4LowEnergyBremsstrahlung(const G4String& nam)
|
||||
{
|
||||
cutForPhotons = 0.;
|
||||
verboseLevel = 0;
|
||||
angularDistribution = new G4ModifiedTsai("TsaiGenerator"); // default generator
|
||||
angularDistribution->PrintGeneratorInformation();
|
||||
}
|
||||
|
||||
/*
|
||||
// Commented out for release 5.2 (June 2003), allowing no interface change
|
||||
G4LowEnergyBremsstrahlung::G4LowEnergyBremsstrahlung(const G4String& nam, G4VBremAngularDistribution* distribution)
|
||||
: G4eLowEnergyLoss(nam),
|
||||
crossSectionHandler(0),
|
||||
theMeanFreePath(0),
|
||||
energySpectrum(0),
|
||||
angularDistribution(distribution)
|
||||
{
|
||||
cutForPhotons = 0.;
|
||||
verboseLevel = 0;
|
||||
|
||||
angularDistribution->PrintGeneratorInformation();
|
||||
}
|
||||
*/
|
||||
|
||||
G4LowEnergyBremsstrahlung::~G4LowEnergyBremsstrahlung()
|
||||
{
|
||||
if(crossSectionHandler) delete crossSectionHandler;
|
||||
if(energySpectrum) delete energySpectrum;
|
||||
if(theMeanFreePath) delete theMeanFreePath;
|
||||
delete angularDistribution;
|
||||
energyBins.clear();
|
||||
}
|
||||
|
||||
@@ -185,7 +207,7 @@ void G4LowEnergyBremsstrahlung::BuildPhysicsTable(const G4ParticleDefinition& aP
|
||||
}
|
||||
|
||||
|
||||
void G4LowEnergyBremsstrahlung::BuildLossTable(const G4ParticleDefinition& aParticleType)
|
||||
void G4LowEnergyBremsstrahlung::BuildLossTable(const G4ParticleDefinition& )
|
||||
{
|
||||
// Build table for energy loss due to soft brems
|
||||
// the tables are built for *MATERIALS* binning is taken from LowEnergyLoss
|
||||
@@ -223,7 +245,7 @@ void G4LowEnergyBremsstrahlung::BuildLossTable(const G4ParticleDefinition& aPart
|
||||
|
||||
// the cut cannot be below lowest limit
|
||||
G4double tCut = (*(theCoupleTable->GetEnergyCutsVector(0)))[j];
|
||||
tCut = G4std::min(highKineticEnergy, tCut);
|
||||
tCut = std::min(highKineticEnergy, tCut);
|
||||
cutForSecondaryPhotons.push_back(tCut);
|
||||
|
||||
const G4ElementVector* theElementVector = material->GetElementVector();
|
||||
@@ -282,20 +304,15 @@ G4VParticleChange* G4LowEnergyBremsstrahlung::PostStepDoIt(const G4Track& track,
|
||||
G4int Z = crossSectionHandler->SelectRandomAtom(couple, kineticEnergy);
|
||||
|
||||
G4double tGamma = energySpectrum->SampleEnergy(Z, tCut, kineticEnergy, kineticEnergy);
|
||||
|
||||
// Sample gamma angle (Z - axis along the parent particle).
|
||||
// Universal distribution suggested by L. Urban (Geant3 manual (1993)
|
||||
// Phys211) derived from Tsai distribution (Rev Mod Phys 49,421(1977))
|
||||
|
||||
G4double totalEnergy = kineticEnergy + electron_mass_c2;
|
||||
G4double initial_momentum = sqrt((totalEnergy + electron_mass_c2)*kineticEnergy);
|
||||
|
||||
const G4double a1 = 0.625, a2 = 3.*a1, d = 27.;
|
||||
G4double u = - log(G4UniformRand()*G4UniformRand());
|
||||
G4double finalEnergy = kineticEnergy - tGamma; // electron/positron final energy
|
||||
G4double totalFinalEnergy = finalEnergy + electron_mass_c2;
|
||||
G4double final_momentum = sqrt((totalFinalEnergy + electron_mass_c2)*finalEnergy);
|
||||
|
||||
if (9./(9.+d) > G4UniformRand()) u /= a1;
|
||||
else u /= a2;
|
||||
G4double theta = angularDistribution->PolarAngle(kineticEnergy,initial_momentum,finalEnergy,final_momentum,Z);
|
||||
|
||||
G4double theta = u*electron_mass_c2/totalEnergy;
|
||||
G4double phi = twopi * G4UniformRand();
|
||||
G4double dirZ = cos(theta);
|
||||
G4double sinTheta = sqrt(1. - dirZ*dirZ);
|
||||
@@ -304,14 +321,11 @@ G4VParticleChange* G4LowEnergyBremsstrahlung::PostStepDoIt(const G4Track& track,
|
||||
|
||||
G4ThreeVector gammaDirection (dirX, dirY, dirZ);
|
||||
G4ThreeVector electronDirection = track.GetMomentumDirection();
|
||||
|
||||
gammaDirection.rotateUz(electronDirection);
|
||||
|
||||
|
||||
//
|
||||
// Update the incident particle
|
||||
//
|
||||
|
||||
G4double finalEnergy = kineticEnergy - tGamma;
|
||||
gammaDirection.rotateUz(electronDirection);
|
||||
|
||||
// Kinematic problem
|
||||
if (finalEnergy < 0.) {
|
||||
@@ -358,7 +372,7 @@ G4bool G4LowEnergyBremsstrahlung::IsApplicable(const G4ParticleDefinition& parti
|
||||
|
||||
|
||||
G4double G4LowEnergyBremsstrahlung::GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double,
|
||||
G4ForceCondition* cond)
|
||||
{
|
||||
*cond = NotForced;
|
||||
@@ -373,3 +387,8 @@ void G4LowEnergyBremsstrahlung::SetCutForLowEnSecPhotons(G4double cut)
|
||||
cutForPhotons = cut;
|
||||
}
|
||||
|
||||
void G4LowEnergyBremsstrahlung::SetAngularGenerator(G4VBremAngularDistribution* distribution)
|
||||
{
|
||||
angularDistribution = distribution;
|
||||
angularDistribution->PrintGeneratorInformation();
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4LowEnergyCompton.cc,v 1.36 2003/04/24 14:19:37 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4LowEnergyCompton.cc,v 1.37 2003/05/20 20:16:13 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: A. Forti
|
||||
// Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
@@ -105,7 +105,7 @@ G4LowEnergyCompton::~G4LowEnergyCompton()
|
||||
delete rangeTest;
|
||||
}
|
||||
|
||||
void G4LowEnergyCompton::BuildPhysicsTable(const G4ParticleDefinition& photon)
|
||||
void G4LowEnergyCompton::BuildPhysicsTable(const G4ParticleDefinition& )
|
||||
{
|
||||
|
||||
crossSectionHandler->Clear();
|
||||
@@ -117,7 +117,7 @@ void G4LowEnergyCompton::BuildPhysicsTable(const G4ParticleDefinition& photon)
|
||||
}
|
||||
|
||||
G4VParticleChange* G4LowEnergyCompton::PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep)
|
||||
const G4Step& aStep)
|
||||
{
|
||||
// The scattered gamma energy is sampled according to Klein - Nishina formula.
|
||||
// then accepted or rejected depending on the Scattering Function multiplied
|
||||
@@ -245,7 +245,7 @@ G4bool G4LowEnergyCompton::IsApplicable(const G4ParticleDefinition& particle)
|
||||
}
|
||||
|
||||
G4double G4LowEnergyCompton::GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double, // previousStepSize
|
||||
G4ForceCondition*)
|
||||
{
|
||||
const G4DynamicParticle* photon = track.GetDynamicParticle();
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
///
|
||||
// $Id: G4LowEnergyGammaConversion.cc,v 1.30 2003/04/24 14:19:37 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4LowEnergyGammaConversion.cc,v 1.32 2003/06/16 17:00:11 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -109,7 +109,7 @@ G4LowEnergyGammaConversion::~G4LowEnergyGammaConversion()
|
||||
delete rangeTest;
|
||||
}
|
||||
|
||||
void G4LowEnergyGammaConversion::BuildPhysicsTable(const G4ParticleDefinition& photon)
|
||||
void G4LowEnergyGammaConversion::BuildPhysicsTable(const G4ParticleDefinition& )
|
||||
{
|
||||
|
||||
crossSectionHandler->Clear();
|
||||
@@ -171,11 +171,11 @@ G4VParticleChange* G4LowEnergyGammaConversion::PostStepDoIt(const G4Track& aTrac
|
||||
// Limits of the screening variable
|
||||
G4double screenFactor = 136. * epsilon0 / (element->GetIonisation()->GetZ3()) ;
|
||||
G4double screenMax = exp ((42.24 - fZ)/8.368) - 0.952 ;
|
||||
G4double screenMin = G4std::min(4.*screenFactor,screenMax) ;
|
||||
G4double screenMin = std::min(4.*screenFactor,screenMax) ;
|
||||
|
||||
// Limits of the energy sampling
|
||||
G4double epsilon1 = 0.5 - 0.5 * sqrt(1. - screenMin / screenMax) ;
|
||||
G4double epsilonMin = G4std::max(epsilon0,epsilon1);
|
||||
G4double epsilonMin = std::max(epsilon0,epsilon1);
|
||||
G4double epsilonRange = 0.5 - epsilonMin ;
|
||||
|
||||
// Sample the energy rate of the created electron (or positron)
|
||||
@@ -184,8 +184,8 @@ G4VParticleChange* G4LowEnergyGammaConversion::PostStepDoIt(const G4Track& aTrac
|
||||
|
||||
G4double f10 = ScreenFunction1(screenMin) - fZ;
|
||||
G4double f20 = ScreenFunction2(screenMin) - fZ;
|
||||
G4double normF1 = G4std::max(f10 * epsilonRange * epsilonRange,0.);
|
||||
G4double normF2 = G4std::max(1.5 * f20,0.);
|
||||
G4double normF1 = std::max(f10 * epsilonRange * epsilonRange,0.);
|
||||
G4double normF2 = std::max(1.5 * f20,0.);
|
||||
|
||||
do {
|
||||
if (normF1 / (normF1 + normF2) > G4UniformRand() )
|
||||
@@ -254,7 +254,7 @@ G4VParticleChange* G4LowEnergyGammaConversion::PostStepDoIt(const G4Track& aTrac
|
||||
G4double localEnergyDeposit = 0. ;
|
||||
|
||||
aParticleChange.SetNumberOfSecondaries(2) ;
|
||||
G4double electronKineEnergy = G4std::max(0.,electronTotEnergy - electron_mass_c2) ;
|
||||
G4double electronKineEnergy = std::max(0.,electronTotEnergy - electron_mass_c2) ;
|
||||
|
||||
// Generate the electron only if with large enough range w.r.t. cuts and safety
|
||||
|
||||
@@ -276,7 +276,7 @@ G4VParticleChange* G4LowEnergyGammaConversion::PostStepDoIt(const G4Track& aTrac
|
||||
}
|
||||
|
||||
// The e+ is always created (even with kinetic energy = 0) for further annihilation
|
||||
G4double positronKineEnergy = G4std::max(0.,positronTotEnergy - electron_mass_c2) ;
|
||||
G4double positronKineEnergy = std::max(0.,positronTotEnergy - electron_mass_c2) ;
|
||||
|
||||
// Is the local energy deposit correct, if the positron is always created?
|
||||
if (! (rangeTest->Escape(G4Positron::Positron(),couple,positronKineEnergy,safety)))
|
||||
@@ -310,7 +310,7 @@ G4bool G4LowEnergyGammaConversion::IsApplicable(const G4ParticleDefinition& part
|
||||
}
|
||||
|
||||
G4double G4LowEnergyGammaConversion::GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double, // previousStepSize
|
||||
G4ForceCondition*)
|
||||
{
|
||||
const G4DynamicParticle* photon = track.GetDynamicParticle();
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4LowEnergyIonisation.cc,v 1.93 2003/04/12 16:40:29 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4LowEnergyIonisation.cc,v 1.95 2003/06/16 17:00:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
@@ -224,8 +224,7 @@ void G4LowEnergyIonisation::BuildPhysicsTable(const G4ParticleDefinition& aParti
|
||||
}
|
||||
|
||||
|
||||
void G4LowEnergyIonisation::BuildLossTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
void G4LowEnergyIonisation::BuildLossTable(const G4ParticleDefinition& )
|
||||
{
|
||||
// Build table for energy loss due to soft brems
|
||||
// the tables are built for *MATERIALS* binning is taken from LowEnergyLoss
|
||||
@@ -509,7 +508,7 @@ G4VParticleChange* G4LowEnergyIonisation::PostStepDoIt(const G4Track& track,
|
||||
// Generation of Fluorescence and Auger
|
||||
size_t nSecondaries = 0;
|
||||
size_t totalNumber = 1;
|
||||
G4std::vector<G4DynamicParticle*>* secondaryVector = 0;
|
||||
std::vector<G4DynamicParticle*>* secondaryVector = 0;
|
||||
G4DynamicParticle* aSecondary = 0;
|
||||
G4ParticleDefinition* type = 0;
|
||||
|
||||
@@ -596,7 +595,7 @@ G4bool G4LowEnergyIonisation::IsApplicable(const G4ParticleDefinition& particle)
|
||||
return ( (&particle == G4Electron::Electron()) );
|
||||
}
|
||||
|
||||
G4std::vector<G4DynamicParticle*>*
|
||||
std::vector<G4DynamicParticle*>*
|
||||
G4LowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple,
|
||||
G4double incidentEnergy,
|
||||
G4double eLoss)
|
||||
@@ -604,8 +603,8 @@ G4LowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple,
|
||||
// create vector of secondary particles
|
||||
const G4Material* material = couple->GetMaterial();
|
||||
|
||||
G4std::vector<G4DynamicParticle*>* partVector =
|
||||
new G4std::vector<G4DynamicParticle*>;
|
||||
std::vector<G4DynamicParticle*>* partVector =
|
||||
new std::vector<G4DynamicParticle*>;
|
||||
|
||||
if(eLoss > cutForPhotons && eLoss > cutForElectrons) {
|
||||
|
||||
@@ -615,7 +614,7 @@ G4LowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple,
|
||||
size_t nElements = material->GetNumberOfElements();
|
||||
const G4ElementVector* theElementVector = material->GetElementVector();
|
||||
|
||||
G4std::vector<G4DynamicParticle*>* secVector = 0;
|
||||
std::vector<G4DynamicParticle*>* secVector = 0;
|
||||
G4DynamicParticle* aSecondary = 0;
|
||||
G4ParticleDefinition* type = 0;
|
||||
G4double e;
|
||||
@@ -625,7 +624,7 @@ G4LowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple,
|
||||
// sample secondaries
|
||||
|
||||
G4double eTot = 0.0;
|
||||
G4std::vector<G4int> n =
|
||||
std::vector<G4int> n =
|
||||
shellVacancy->GenerateNumberOfIonisations(couple,
|
||||
incidentEnergy,eLoss);
|
||||
for (size_t i=0; i<nElements; i++) {
|
||||
@@ -682,7 +681,7 @@ G4LowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple,
|
||||
}
|
||||
|
||||
G4double G4LowEnergyIonisation::GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double , // previousStepSize
|
||||
G4ForceCondition* cond)
|
||||
{
|
||||
*cond = NotForced;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyPhotoElectric.cc,v 1.49 2003/01/22 18:47:28 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4LowEnergyPhotoElectric.cc,v 1.51 2003/06/16 17:00:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: A. Forti
|
||||
// Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
@@ -118,7 +118,7 @@ G4LowEnergyPhotoElectric::~G4LowEnergyPhotoElectric()
|
||||
delete rangeTest;
|
||||
}
|
||||
|
||||
void G4LowEnergyPhotoElectric::BuildPhysicsTable(const G4ParticleDefinition& photon)
|
||||
void G4LowEnergyPhotoElectric::BuildPhysicsTable(const G4ParticleDefinition& )
|
||||
{
|
||||
|
||||
crossSectionHandler->Clear();
|
||||
@@ -170,8 +170,8 @@ G4VParticleChange* G4LowEnergyPhotoElectric::PostStepDoIt(const G4Track& aTrack,
|
||||
|
||||
// Create lists of pointers to DynamicParticles (photons and electrons)
|
||||
// (Is the electron vector necessary? To be checked)
|
||||
G4std::vector<G4DynamicParticle*>* photonVector = 0;
|
||||
G4std::vector<G4DynamicParticle*> electronVector;
|
||||
std::vector<G4DynamicParticle*>* photonVector = 0;
|
||||
std::vector<G4DynamicParticle*> electronVector;
|
||||
|
||||
G4double energyDeposit = 0.0;
|
||||
|
||||
@@ -211,10 +211,10 @@ G4VParticleChange* G4LowEnergyPhotoElectric::PostStepDoIt(const G4Track& aTrack,
|
||||
|
||||
size_t index = couple->GetIndex();
|
||||
G4double cutg = (*(theCoupleTable->GetEnergyCutsVector(0)))[index];
|
||||
cutg = G4std::min(cutForLowEnergySecondaryPhotons,cutg);
|
||||
cutg = std::min(cutForLowEnergySecondaryPhotons,cutg);
|
||||
|
||||
G4double cute = (*(theCoupleTable->GetEnergyCutsVector(1)))[index];
|
||||
cute = G4std::min(cutForLowEnergySecondaryPhotons,cute);
|
||||
cute = std::min(cutForLowEnergySecondaryPhotons,cute);
|
||||
|
||||
G4DynamicParticle* aPhoton;
|
||||
|
||||
@@ -300,7 +300,7 @@ G4bool G4LowEnergyPhotoElectric::IsApplicable(const G4ParticleDefinition& partic
|
||||
}
|
||||
|
||||
G4double G4LowEnergyPhotoElectric::GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double, // previousStepSize
|
||||
G4ForceCondition*)
|
||||
{
|
||||
const G4DynamicParticle* photon = track.GetDynamicParticle();
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LowEnergyPolarizedCompton.cc,v 1.15 2003/04/24 14:19:37 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4LowEnergyPolarizedCompton.cc,v 1.16 2003/05/20 20:16:13 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -127,7 +127,7 @@ G4LowEnergyPolarizedCompton::~G4LowEnergyPolarizedCompton()
|
||||
}
|
||||
|
||||
|
||||
void G4LowEnergyPolarizedCompton::BuildPhysicsTable(const G4ParticleDefinition& photon)
|
||||
void G4LowEnergyPolarizedCompton::BuildPhysicsTable(const G4ParticleDefinition& )
|
||||
{
|
||||
|
||||
crossSectionHandler->Clear();
|
||||
@@ -569,7 +569,7 @@ G4bool G4LowEnergyPolarizedCompton::IsApplicable(const G4ParticleDefinition& par
|
||||
|
||||
|
||||
G4double G4LowEnergyPolarizedCompton::GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double,
|
||||
G4ForceCondition*)
|
||||
{
|
||||
const G4DynamicParticle* photon = track.GetDynamicParticle();
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
//
|
||||
// $Id: G4LowEnergyRayleigh.cc,v 1.32 2003/04/24 14:19:37 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4LowEnergyRayleigh.cc,v 1.33 2003/05/20 20:16:13 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: A. Forti
|
||||
// Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
@@ -103,7 +103,7 @@ G4LowEnergyRayleigh::~G4LowEnergyRayleigh()
|
||||
delete formFactorData;
|
||||
}
|
||||
|
||||
void G4LowEnergyRayleigh::BuildPhysicsTable(const G4ParticleDefinition& photon)
|
||||
void G4LowEnergyRayleigh::BuildPhysicsTable(const G4ParticleDefinition& )
|
||||
{
|
||||
|
||||
crossSectionHandler->Clear();
|
||||
@@ -192,7 +192,7 @@ G4bool G4LowEnergyRayleigh::IsApplicable(const G4ParticleDefinition& particle)
|
||||
}
|
||||
|
||||
G4double G4LowEnergyRayleigh::GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double, // previousStepSize
|
||||
G4ForceCondition*)
|
||||
{
|
||||
const G4DynamicParticle* photon = track.GetDynamicParticle();
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
//
|
||||
//
|
||||
// File name: G4ModifiedTsai
|
||||
//
|
||||
// Author: Andreia Trindade (andreia@lip.pt)
|
||||
// Pedro Rodrigues (psilva@lip.pt)
|
||||
// Luis Peralta (luis@lip.pt)
|
||||
//
|
||||
// Creation date: 21 March 2003
|
||||
//
|
||||
// Modifications:
|
||||
// 21 Mar 2003 A. Trindade First implementation acording with new design
|
||||
// 24 Mar 2003 & Fix in Tsai generator in order to prevent theta generation above pi
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Concrete base class for Bremsstrahlung Angular Distribution Generation - Tsai Model
|
||||
//
|
||||
// Class Description: End
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
||||
#include "G4ModifiedTsai.hh"
|
||||
#include "Randomize.hh"
|
||||
//
|
||||
|
||||
G4ModifiedTsai::G4ModifiedTsai(const G4String& name):G4VBremAngularDistribution(name)
|
||||
{;}
|
||||
|
||||
//
|
||||
|
||||
G4ModifiedTsai::~G4ModifiedTsai()
|
||||
{;}
|
||||
|
||||
//
|
||||
|
||||
G4double G4ModifiedTsai::PolarAngle(const G4double initial_energy,
|
||||
const G4double, // initial_momentum
|
||||
const G4double, // final_energy
|
||||
const G4double, // final_momentum
|
||||
const G4int ) const // Z
|
||||
{
|
||||
|
||||
// Sample gamma angle (Z - axis along the parent particle).
|
||||
// Universal distribution suggested by L. Urban (Geant3 manual (1993)
|
||||
// Phys211) derived from Tsai distribution (Rev Mod Phys 49,421(1977))
|
||||
|
||||
G4double totalEnergy = initial_energy + electron_mass_c2;
|
||||
|
||||
const G4double a1 = 0.625, a2 = 3.*a1, d = 27.;
|
||||
G4double u, theta = 0;
|
||||
|
||||
do{
|
||||
u = - log(G4UniformRand()*G4UniformRand());
|
||||
|
||||
if (9./(9.+d) > G4UniformRand()) u /= a1;
|
||||
else u /= a2;
|
||||
|
||||
theta = u*electron_mass_c2/totalEnergy;
|
||||
}while(u > (totalEnergy*pi/electron_mass_c2));
|
||||
|
||||
return theta;
|
||||
}
|
||||
//
|
||||
|
||||
void G4ModifiedTsai::PrintGeneratorInformation() const
|
||||
{
|
||||
|
||||
G4cout << "\n" << G4endl;
|
||||
G4cout << "Bremsstrahlung Angular Generator is Modified Tsai" << G4endl;
|
||||
G4cout << "Universal distribution suggested by L. Urban (Geant3 manual (1993) Phys211)" << G4endl;
|
||||
G4cout << "Derived from Tsai distribution (Rev Mod Phys 49,421(1977)) \n" << G4endl;
|
||||
}
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PenelopeBremsstrahlung.cc,v 1.5 2003/04/24 14:51:10 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4PenelopeBremsstrahlung.cc,v 1.10 2003/06/16 17:00:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
@@ -33,6 +33,11 @@
|
||||
//
|
||||
// Modifications:
|
||||
// 24.04.2003 V.Ivanchenko - Cut per region mfpt
|
||||
// 20.05.2003 MGP - Removed compilation warnings
|
||||
// Restored NotForced in GetMeanFreePath
|
||||
// 23.05.2003 L.Pandola - Bug fixed. G4double cast to elements of
|
||||
// ebins vector (is it necessary?)
|
||||
// 23.05.2003 MGP - Removed memory leak (fix in destructor)
|
||||
//
|
||||
//----------------------------------------------------------------
|
||||
|
||||
@@ -67,7 +72,7 @@ G4PenelopeBremsstrahlung::G4PenelopeBremsstrahlung(const G4String& nam)
|
||||
theMeanFreePath(0),
|
||||
energySpectrum(0)
|
||||
{
|
||||
materialAngularData.clear();
|
||||
// materialAngularData.clear();
|
||||
cutForPhotons = 0.;
|
||||
verboseLevel = 0;
|
||||
LoadAngularData();
|
||||
@@ -76,9 +81,19 @@ G4PenelopeBremsstrahlung::G4PenelopeBremsstrahlung(const G4String& nam)
|
||||
|
||||
G4PenelopeBremsstrahlung::~G4PenelopeBremsstrahlung()
|
||||
{
|
||||
if(crossSectionHandler) delete crossSectionHandler;
|
||||
if(energySpectrum) delete energySpectrum;
|
||||
if(theMeanFreePath) delete theMeanFreePath;
|
||||
delete crossSectionHandler;
|
||||
delete energySpectrum;
|
||||
delete theMeanFreePath;
|
||||
|
||||
for (size_t m=0; m<materialAngularData.size(); m++)
|
||||
{
|
||||
G4AngularData materialData = *(materialAngularData[m]);
|
||||
for (size_t i=0; i<materialData.size(); i++)
|
||||
{
|
||||
delete materialData[i];
|
||||
}
|
||||
delete &materialData;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,46 +107,48 @@ void G4PenelopeBremsstrahlung::BuildPhysicsTable(const G4ParticleDefinition& aPa
|
||||
cutForSecondaryPhotons.clear();
|
||||
|
||||
// Create and fill BremsstrahlungParameters once
|
||||
if( energySpectrum != 0 ) delete energySpectrum;
|
||||
if ( energySpectrum != 0 ) delete energySpectrum;
|
||||
//grid of reduced energy bins for photons
|
||||
|
||||
G4DataVector ebins;
|
||||
ebins.push_back(1.0e-12);
|
||||
ebins.push_back(0.05);
|
||||
ebins.push_back(0.075);
|
||||
ebins.push_back(0.1);
|
||||
ebins.push_back(0.125);
|
||||
ebins.push_back(0.15);
|
||||
ebins.push_back(0.2);
|
||||
ebins.push_back(0.25);
|
||||
ebins.push_back(0.3);
|
||||
ebins.push_back(0.35);
|
||||
ebins.push_back(0.40);
|
||||
ebins.push_back(0.45);
|
||||
ebins.push_back(0.50);
|
||||
ebins.push_back(0.55);
|
||||
ebins.push_back(0.60);
|
||||
ebins.push_back(0.65);
|
||||
ebins.push_back(0.70);
|
||||
ebins.push_back(0.75);
|
||||
ebins.push_back(0.80);
|
||||
ebins.push_back(0.85);
|
||||
ebins.push_back(0.90);
|
||||
ebins.push_back(0.925);
|
||||
ebins.push_back(0.95);
|
||||
ebins.push_back(0.97);
|
||||
ebins.push_back(0.99);
|
||||
ebins.push_back(0.995);
|
||||
ebins.push_back(0.999);
|
||||
ebins.push_back(0.9995);
|
||||
ebins.push_back(0.9999);
|
||||
ebins.push_back(0.99995);
|
||||
ebins.push_back(0.99999);
|
||||
ebins.push_back(1.0);
|
||||
|
||||
G4DataVector eBins;
|
||||
|
||||
//G4double value;
|
||||
eBins.push_back(1.0e-12);
|
||||
eBins.push_back(0.05);
|
||||
eBins.push_back(0.075);
|
||||
eBins.push_back(0.1);
|
||||
eBins.push_back(0.125);
|
||||
eBins.push_back(0.15);
|
||||
eBins.push_back(0.2);
|
||||
eBins.push_back(0.25);
|
||||
eBins.push_back(0.3);
|
||||
eBins.push_back(0.35);
|
||||
eBins.push_back(0.40);
|
||||
eBins.push_back(0.45);
|
||||
eBins.push_back(0.50);
|
||||
eBins.push_back(0.55);
|
||||
eBins.push_back(0.60);
|
||||
eBins.push_back(0.65);
|
||||
eBins.push_back(0.70);
|
||||
eBins.push_back(0.75);
|
||||
eBins.push_back(0.80);
|
||||
eBins.push_back(0.85);
|
||||
eBins.push_back(0.90);
|
||||
eBins.push_back(0.925);
|
||||
eBins.push_back(0.95);
|
||||
eBins.push_back(0.97);
|
||||
eBins.push_back(0.99);
|
||||
eBins.push_back(0.995);
|
||||
eBins.push_back(0.999);
|
||||
eBins.push_back(0.9995);
|
||||
eBins.push_back(0.9999);
|
||||
eBins.push_back(0.99995);
|
||||
eBins.push_back(0.99999);
|
||||
eBins.push_back(1.0);
|
||||
|
||||
|
||||
const G4String dataName("/penelope/br-sp-pen.dat");
|
||||
energySpectrum = new G4eBremsstrahlungSpectrum(ebins,dataName);
|
||||
energySpectrum = new G4eBremsstrahlungSpectrum(eBins,dataName);
|
||||
|
||||
//the shape of the energy spectrum for positron is the same used for the electrons,
|
||||
//as the differential cross section is scaled of a factor f(E,Z) which is independent
|
||||
@@ -175,7 +192,7 @@ void G4PenelopeBremsstrahlung::BuildPhysicsTable(const G4ParticleDefinition& aPa
|
||||
// Build loss table for Bremsstrahlung
|
||||
|
||||
BuildLossTable(aParticleType);
|
||||
|
||||
|
||||
if(verboseLevel > 0) {
|
||||
G4cout << "The loss table is built"
|
||||
<< G4endl;
|
||||
@@ -191,8 +208,7 @@ void G4PenelopeBremsstrahlung::BuildPhysicsTable(const G4ParticleDefinition& aPa
|
||||
|
||||
RecorderOfPositronProcess[CounterOfPositronProcess] = (*this).theLossTable;
|
||||
CounterOfPositronProcess++;
|
||||
}
|
||||
|
||||
}
|
||||
// Build mean free path data using cut values
|
||||
|
||||
if( theMeanFreePath != 0 ) delete theMeanFreePath;
|
||||
@@ -211,8 +227,7 @@ void G4PenelopeBremsstrahlung::BuildPhysicsTable(const G4ParticleDefinition& aPa
|
||||
if(verboseLevel > 0) {
|
||||
G4cout << "G4PenelopeBremsstrahlung::BuildPhysicsTable end"
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +235,6 @@ void G4PenelopeBremsstrahlung::BuildLossTable(const G4ParticleDefinition& aParti
|
||||
{
|
||||
// Build table for energy loss due to soft brems
|
||||
// the tables are built for *MATERIALS* binning is taken from LowEnergyLoss
|
||||
|
||||
G4double lowKineticEnergy = GetLowerBoundEloss();
|
||||
G4double highKineticEnergy = GetUpperBoundEloss();
|
||||
size_t totBin = GetNbinEloss();
|
||||
@@ -254,7 +268,7 @@ void G4PenelopeBremsstrahlung::BuildLossTable(const G4ParticleDefinition& aParti
|
||||
const G4Material* material= couple->GetMaterial();
|
||||
// the cut cannot be below lowest limit
|
||||
G4double tCut = (*(theCoupleTable->GetEnergyCutsVector(0)))[j];
|
||||
tCut = G4std::min(highKineticEnergy, tCut);
|
||||
tCut = std::min(highKineticEnergy, tCut);
|
||||
cutForSecondaryPhotons.push_back(tCut);
|
||||
|
||||
const G4ElementVector* theElementVector = material->GetElementVector();
|
||||
@@ -304,7 +318,7 @@ void G4PenelopeBremsstrahlung::BuildLossTable(const G4ParticleDefinition& aParti
|
||||
|
||||
|
||||
G4VParticleChange* G4PenelopeBremsstrahlung::PostStepDoIt(const G4Track& track,
|
||||
const G4Step& step)
|
||||
const G4Step& step)
|
||||
{
|
||||
aParticleChange.Initialize(track);
|
||||
|
||||
@@ -319,7 +333,6 @@ G4VParticleChange* G4PenelopeBremsstrahlung::PostStepDoIt(const G4Track& track,
|
||||
return G4VContinuousDiscreteProcess::PostStepDoIt(track, step);
|
||||
|
||||
G4int Z = crossSectionHandler->SelectRandomAtom(couple, kineticEnergy);
|
||||
|
||||
G4double tGamma = energySpectrum->SampleEnergy(Z, tCut, kineticEnergy, kineticEnergy);
|
||||
//bisogna recuperare il puntatore
|
||||
G4AngularData* elementData = materialAngularData[index]; //punta al vettore che contiene i puntatori del materiale
|
||||
@@ -340,11 +353,11 @@ G4VParticleChange* G4PenelopeBremsstrahlung::PostStepDoIt(const G4Track& track,
|
||||
}while(Z_try != Z);
|
||||
|
||||
G4PenelopeBremsstrahlungAngular* finalAngularData = (*elementData)[indexEl];
|
||||
|
||||
|
||||
// Sample gamma angle (Z - axis along the parent particle).
|
||||
G4double dirZ = finalAngularData->ExtractCosTheta(kineticEnergy,tGamma);
|
||||
|
||||
//G4std::ofstream fff("prova.dat",G4std::ios::app);
|
||||
//std::ofstream fff("prova.dat",std::ios::app);
|
||||
//fff << dirZ << G4endl;
|
||||
//fff.close();
|
||||
|
||||
@@ -412,10 +425,10 @@ G4bool G4PenelopeBremsstrahlung::IsApplicable(const G4ParticleDefinition& partic
|
||||
|
||||
|
||||
G4double G4PenelopeBremsstrahlung::GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double, // previousStepSize
|
||||
G4ForceCondition* cond)
|
||||
{
|
||||
//*cond = NotForced;
|
||||
*cond = NotForced;
|
||||
G4int index = (track.GetMaterialCutsCouple())->GetIndex();
|
||||
const G4VEMDataSet* data = theMeanFreePath->GetComponent(index);
|
||||
G4double meanFreePath = data->FindValue(track.GetKineticEnergy());
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PenelopeBremsstrahlungAngular.cc,v 1.3 2003/03/28 11:16:29 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4PenelopeBremsstrahlungAngular.cc,v 1.4 2003/06/16 17:00:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
@@ -70,8 +70,8 @@ void G4PenelopeBremsstrahlungAngular::InterpolationTableForZ()
|
||||
}
|
||||
G4String pathString(path);
|
||||
G4String pathFile = pathString + "/penelope/br-ang-pen.dat";
|
||||
G4std::ifstream file(pathFile);
|
||||
G4std::filebuf* lsdp = file.rdbuf();
|
||||
std::ifstream file(pathFile);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
|
||||
if (!(lsdp->is_open()))
|
||||
{
|
||||
@@ -107,7 +107,7 @@ void G4PenelopeBremsstrahlungAngular::InterpolationTableForZ()
|
||||
}
|
||||
|
||||
|
||||
//G4std::ofstream fil("matrice.dat",G4std::ios::app);
|
||||
//std::ofstream fil("matrice.dat",std::ios::app);
|
||||
//fil << "Numero atomico: " << Zmat << G4endl;
|
||||
//for (i=0;i<NumberofEPoints;i++)
|
||||
//{
|
||||
@@ -169,7 +169,7 @@ G4double G4PenelopeBremsstrahlungAngular::ExtractCosTheta(G4double e1,G4double e
|
||||
|
||||
|
||||
G4double RK=20.0*e2/e1;
|
||||
G4int ik=G4std::min((G4int) RK,19);
|
||||
G4int ik=std::min((G4int) RK,19);
|
||||
|
||||
G4double P10=0,P11=0,P1=0;
|
||||
G4double P20=0,P21=0,P2=0;
|
||||
@@ -211,8 +211,8 @@ G4double G4PenelopeBremsstrahlungAngular::ExtractCosTheta(G4double e1,G4double e
|
||||
P2=P20+(RK-(G4double) ik)*(P21-P20);
|
||||
|
||||
//Sampling from the Lorenz-trasformed dipole distributions
|
||||
P1=G4std::min(exp(P1)/beta,1.0);
|
||||
G4double betap = G4std::min(G4std::max(beta*(1.0+P2/beta),0.0),0.9999);
|
||||
P1=std::min(exp(P1)/beta,1.0);
|
||||
G4double betap = std::min(std::max(beta*(1.0+P2/beta),0.0),0.9999);
|
||||
|
||||
G4double cdt=0,testf=0;
|
||||
|
||||
|
||||
+8
-8
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PenelopeBremsstrahlungContinuous.cc,v 1.4 2003/03/28 11:16:29 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4PenelopeBremsstrahlungContinuous.cc,v 1.5 2003/06/16 17:00:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "Randomize.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4std/strstream"
|
||||
#include <strstream>
|
||||
|
||||
G4PenelopeBremsstrahlungContinuous::G4PenelopeBremsstrahlungContinuous (G4int Zed,G4double taglio,G4double e1,
|
||||
G4double e2,
|
||||
@@ -83,12 +83,12 @@ void G4PenelopeBremsstrahlungContinuous::LoadFromFile()
|
||||
G4String pathString(path);
|
||||
G4String filename = "br-pen-cont-";
|
||||
char nameChar[100] = {""};
|
||||
G4std::ostrstream ost(nameChar, 100, G4std::ios::out);
|
||||
std::ostrstream ost(nameChar, 100, std::ios::out);
|
||||
ost << filename << Zmat << ".dat";
|
||||
G4String name(nameChar);
|
||||
G4String dirFile = pathString + "/penelope/" + name;
|
||||
G4std::ifstream file(dirFile);
|
||||
G4std::filebuf* lsdp = file.rdbuf();
|
||||
std::ifstream file(dirFile);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
if (!(lsdp->is_open()))
|
||||
{
|
||||
G4String excep = "G4PenelopeBremsstrahlungContinuous - data file " + name + " not found!";
|
||||
@@ -203,7 +203,7 @@ void G4PenelopeBremsstrahlungContinuous::PrepareInterpolationTable()
|
||||
G4double G4PenelopeBremsstrahlungContinuous::CalculateStopping(G4double e1)
|
||||
//Stopping power expressed in MeV/mm*2
|
||||
{
|
||||
G4double Xel=G4std::max(log(e1),ExtendedLogEnergy[0]);
|
||||
G4double Xel=std::max(log(e1),ExtendedLogEnergy[0]);
|
||||
G4double Xe=1.0+(Xel-ExtendedLogEnergy[0])*DLFC;
|
||||
G4int Ke = (G4int) Xe;
|
||||
G4double Xek = Xe-Ke;
|
||||
@@ -231,7 +231,7 @@ G4double G4PenelopeBremsstrahlungContinuous::CalculateStopping(G4double e1)
|
||||
G4double XS2A = interpolator1->CalculateMomentum(wcre,1);
|
||||
delete interpolator1;
|
||||
for (size_t k=0;k<NumberofKPoints;k++){
|
||||
pY[k] = p0[G4std::min(Ke+1,(G4int) NumberofExtendedEGrid-1)][k];
|
||||
pY[k] = p0[std::min(Ke+1,(G4int) NumberofExtendedEGrid-1)][k];
|
||||
}
|
||||
G4PenelopeInterpolator* interpolator2 = new G4PenelopeInterpolator (pK,pY,NumberofKPoints);
|
||||
G4double XS1B = interpolator2->CalculateMomentum(wcre,0);
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PenelopeCompton.cc,v 1.10 2003/03/13 16:56:40 pandola Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4PenelopeCompton.cc,v 1.16 2003/06/16 17:00:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Luciano Pandola
|
||||
//
|
||||
@@ -33,7 +33,10 @@
|
||||
// from SUN
|
||||
// Modified some variables to lowercase initial
|
||||
// 10 Mar 2003 V.Ivanchenko Remove CutPerMaterial warning
|
||||
// 13 Mar 2003 L.Pandola Code "cleaned"
|
||||
// 13 Mar 2003 L.Pandola Code "cleaned"
|
||||
// 20 Mar 2003 L.Pandola ReadData() changed (performance improved)
|
||||
// 26 Mar 2003 L.Pandola Added fluorescence
|
||||
// 24 May 2003 MGP Removed memory leak
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
@@ -58,6 +61,10 @@
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4VRangeTest.hh"
|
||||
#include "G4RangeTest.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4AtomicTransitionManager.hh"
|
||||
#include "G4AtomicShell.hh"
|
||||
#include "G4AtomicDeexcitation.hh"
|
||||
#include "G4PenelopeIntegrator.hh"
|
||||
#include "G4MaterialCutsCouple.hh"
|
||||
|
||||
@@ -70,7 +77,8 @@ G4PenelopeCompton::G4PenelopeCompton(const G4String& processName)
|
||||
intrinsicHighEnergyLimit(100*GeV),
|
||||
energyForIntegration(0.0),
|
||||
ZForIntegration(1),
|
||||
nBins(200)
|
||||
nBins(200),
|
||||
cutForLowEnergySecondaryPhotons(250.0*eV)
|
||||
{
|
||||
if (lowEnergyLimit < intrinsicLowEnergyLimit ||
|
||||
highEnergyLimit > intrinsicHighEnergyLimit)
|
||||
@@ -79,12 +87,12 @@ G4PenelopeCompton::G4PenelopeCompton(const G4String& processName)
|
||||
}
|
||||
|
||||
meanFreePathTable = 0;
|
||||
ionizationEnergy = new G4std::vector<G4DataVector*>;
|
||||
hartreeFunction = new G4std::vector<G4DataVector*>;
|
||||
occupationNumber = new G4std::vector<G4DataVector*>;
|
||||
ionizationEnergy = new std::vector<G4DataVector*>;
|
||||
hartreeFunction = new std::vector<G4DataVector*>;
|
||||
occupationNumber = new std::vector<G4DataVector*>;
|
||||
rangeTest = new G4RangeTest;
|
||||
|
||||
ReadData(); //Legge i dati da file!
|
||||
ReadData(); //Read data from file
|
||||
|
||||
if (verboseLevel > 0)
|
||||
{
|
||||
@@ -101,12 +109,27 @@ G4PenelopeCompton::~G4PenelopeCompton()
|
||||
delete meanFreePathTable;
|
||||
delete rangeTest;
|
||||
delete matCrossSections;
|
||||
|
||||
for (size_t i=0; i<ionizationEnergy->size(); i++)
|
||||
{
|
||||
delete (*ionizationEnergy)[i];
|
||||
}
|
||||
delete ionizationEnergy;
|
||||
|
||||
for (size_t j=0; j<hartreeFunction->size(); j++)
|
||||
{
|
||||
delete (*hartreeFunction)[j];
|
||||
}
|
||||
delete hartreeFunction;
|
||||
delete occupationNumber;
|
||||
|
||||
for (size_t k=0; k<occupationNumber->size(); k++)
|
||||
{
|
||||
delete (*occupationNumber)[k];
|
||||
}
|
||||
delete occupationNumber;
|
||||
}
|
||||
|
||||
void G4PenelopeCompton::BuildPhysicsTable(const G4ParticleDefinition& photon)
|
||||
void G4PenelopeCompton::BuildPhysicsTable(const G4ParticleDefinition& )
|
||||
{
|
||||
G4DataVector energyVector;
|
||||
G4double dBin = log10(highEnergyLimit/lowEnergyLimit)/nBins;
|
||||
@@ -126,7 +149,7 @@ void G4PenelopeCompton::BuildPhysicsTable(const G4ParticleDefinition& photon)
|
||||
G4DataVector* energies;
|
||||
G4DataVector* data;
|
||||
|
||||
matCrossSections = new G4std::vector<G4VEMDataSet*>;
|
||||
matCrossSections = new std::vector<G4VEMDataSet*>;
|
||||
|
||||
|
||||
G4int m;
|
||||
@@ -382,7 +405,7 @@ G4VParticleChange* G4PenelopeCompton::PostStepDoIt(const G4Track& aTrack,
|
||||
{
|
||||
fpzmax = 1.0-AF*0.2;
|
||||
}
|
||||
fpz = 1.0+AF*G4std::max(G4std::min(pzomc,0.2),-0.2);
|
||||
fpz = 1.0+AF*std::max(std::min(pzomc,0.2),-0.2);
|
||||
}while ((fpzmax*G4UniformRand())>fpz);
|
||||
|
||||
//Energy of the scattered photon
|
||||
@@ -426,9 +449,10 @@ G4VParticleChange* G4PenelopeCompton::PostStepDoIt(const G4Track& aTrack,
|
||||
|
||||
// Kinematics of the scattered electron
|
||||
|
||||
|
||||
G4double diffEnergy = photonEnergy0*(1-epsilon);
|
||||
ionEnergy = (*((*ionizationEnergy)[Z-1]))[iosc];
|
||||
G4double eKineticEnergy = diffEnergy - ionEnergy;
|
||||
//G4double eKineticEnergy = diffEnergy - ionEnergy;
|
||||
G4double Q2 = pow(photonEnergy0,2)+photonEnergy1*(photonEnergy1-2.0*photonEnergy0*cosTheta);
|
||||
G4double cosThetaE; //scattering angle for the electron
|
||||
if (Q2 > 1.0e-12)
|
||||
@@ -441,10 +465,62 @@ G4VParticleChange* G4PenelopeCompton::PostStepDoIt(const G4Track& aTrack,
|
||||
}
|
||||
G4double sinThetaE = sqrt(1-pow(cosThetaE,2));
|
||||
|
||||
// Generate the electron only if with large enough range w.r.t. cuts and safety
|
||||
|
||||
|
||||
const G4AtomicTransitionManager* transitionManager = G4AtomicTransitionManager::Instance();
|
||||
const G4AtomicShell* shell = transitionManager->Shell(Z,iosc);
|
||||
G4double bindingEnergy = shell->BindingEnergy();
|
||||
G4int shellId = shell->ShellId();
|
||||
//G4cout << bindingEnergy/keV << " " << ionEnergy/keV << " keV" << G4endl;
|
||||
ionEnergy = std::max(bindingEnergy,ionEnergy); //protection against energy non-conservation
|
||||
G4double eKineticEnergy = diffEnergy - ionEnergy;
|
||||
|
||||
size_t nTotPhotons=0;
|
||||
G4int nPhotons=0;
|
||||
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t indx = couple->GetIndex();
|
||||
G4double cutg = (*(theCoupleTable->GetEnergyCutsVector(0)))[indx];
|
||||
cutg = std::min(cutForLowEnergySecondaryPhotons,cutg);
|
||||
|
||||
G4double cute = (*(theCoupleTable->GetEnergyCutsVector(1)))[indx];
|
||||
cute = std::min(cutForLowEnergySecondaryPhotons,cute);
|
||||
|
||||
std::vector<G4DynamicParticle*>* photonVector=0;
|
||||
G4DynamicParticle* aPhoton;
|
||||
G4AtomicDeexcitation deexcitationManager;
|
||||
|
||||
if (Z>5 && (ionEnergy > cutg || ionEnergy > cute))
|
||||
{
|
||||
photonVector = deexcitationManager.GenerateParticles(Z,shellId);
|
||||
nTotPhotons = photonVector->size();
|
||||
for (size_t k=0;k<nTotPhotons;k++){
|
||||
aPhoton = (*photonVector)[k];
|
||||
if (aPhoton)
|
||||
{
|
||||
G4double itsCut = cutg;
|
||||
if (aPhoton->GetDefinition() == G4Electron::Electron()) itsCut = cute;
|
||||
G4double itsEnergy = aPhoton->GetKineticEnergy();
|
||||
if (itsEnergy > itsCut && itsEnergy <= ionEnergy)
|
||||
{
|
||||
nPhotons++;
|
||||
ionEnergy -= itsEnergy;
|
||||
}
|
||||
else
|
||||
{
|
||||
delete aPhoton;
|
||||
(*photonVector)[k]=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
G4double energyDeposit =ionEnergy; //il deposito locale e' quello che rimane
|
||||
G4int nbOfSecondaries=nPhotons;
|
||||
|
||||
// Generate the electron only if with large enough range w.r.t. cuts and safety
|
||||
G4double safety = aStep.GetPostStepPoint()->GetSafety();
|
||||
|
||||
G4DynamicParticle* electron = 0;
|
||||
if (rangeTest->Escape(G4Electron::Electron(),couple,eKineticEnergy,safety))
|
||||
{
|
||||
G4double xEl = sinThetaE * cos(phi+pi);
|
||||
@@ -452,18 +528,34 @@ G4VParticleChange* G4PenelopeCompton::PostStepDoIt(const G4Track& aTrack,
|
||||
G4double zEl = cosThetaE;
|
||||
G4ThreeVector eDirection(xEl,yEl,zEl); //electron direction
|
||||
|
||||
G4DynamicParticle* electron = new G4DynamicParticle (G4Electron::Electron(),
|
||||
eDirection,eKineticEnergy) ;
|
||||
aParticleChange.SetNumberOfSecondaries(1);
|
||||
aParticleChange.AddSecondary(electron);
|
||||
aParticleChange.SetLocalEnergyDeposit(0.);
|
||||
electron = new G4DynamicParticle (G4Electron::Electron(),
|
||||
eDirection,eKineticEnergy) ;
|
||||
nbOfSecondaries++;
|
||||
}
|
||||
else
|
||||
{
|
||||
aParticleChange.SetNumberOfSecondaries(0);
|
||||
aParticleChange.SetLocalEnergyDeposit(eKineticEnergy);
|
||||
|
||||
energyDeposit += eKineticEnergy;
|
||||
}
|
||||
|
||||
aParticleChange.SetNumberOfSecondaries(nbOfSecondaries);
|
||||
if (electron) aParticleChange.AddSecondary(electron);
|
||||
for (size_t ll=0;ll<nTotPhotons;ll++)
|
||||
{
|
||||
aPhoton = (*photonVector)[ll];
|
||||
if (aPhoton) aParticleChange.AddSecondary(aPhoton);
|
||||
}
|
||||
delete photonVector;
|
||||
if (energyDeposit < 0)
|
||||
{
|
||||
G4cout << "WARNING-"
|
||||
<< "G4PenelopeCompton::PostStepDoIt - Negative energy deposit"
|
||||
<< G4endl;
|
||||
energyDeposit=0;
|
||||
}
|
||||
aParticleChange.SetLocalEnergyDeposit(energyDeposit);
|
||||
|
||||
|
||||
return G4VDiscreteProcess::PostStepDoIt( aTrack, aStep);
|
||||
}
|
||||
|
||||
@@ -473,7 +565,7 @@ G4bool G4PenelopeCompton::IsApplicable(const G4ParticleDefinition& particle)
|
||||
}
|
||||
|
||||
G4double G4PenelopeCompton::GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double, // previousStepSize
|
||||
G4ForceCondition*)
|
||||
{
|
||||
const G4DynamicParticle* photon = track.GetDynamicParticle();
|
||||
@@ -498,46 +590,44 @@ void G4PenelopeCompton::ReadData()
|
||||
G4Exception(excep);
|
||||
}
|
||||
G4String pathString(path);
|
||||
G4String pathFile = pathString + "/penelope/comptondata.dat";
|
||||
G4std::ifstream file(pathFile);
|
||||
G4std::filebuf* lsdp = file.rdbuf();
|
||||
G4String pathFile = pathString + "/penelope/compton-pen.dat";
|
||||
std::ifstream file(pathFile);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
|
||||
if (!(lsdp->is_open()))
|
||||
{
|
||||
G4String excep = "G4PenelopeCompton - data file " + pathFile + " not found!";
|
||||
G4Exception(excep);
|
||||
}
|
||||
file.close();
|
||||
|
||||
//This algorithm is slow and unelegant!
|
||||
//It must be improved.
|
||||
G4int k1,k2;
|
||||
|
||||
G4int k1,test,test1;
|
||||
G4double a1,a2;
|
||||
G4int Z=0;
|
||||
G4int Z=1,nLevels=0;
|
||||
G4DataVector* f;
|
||||
G4DataVector* u;
|
||||
G4DataVector* j;
|
||||
for(Z=1;Z<93;Z++) {
|
||||
|
||||
do{
|
||||
f = new G4DataVector;
|
||||
u = new G4DataVector;
|
||||
j = new G4DataVector;
|
||||
G4std::ifstream file(pathFile);
|
||||
k1=1;
|
||||
while (k1>0)
|
||||
{
|
||||
file >> k1 >> k2 >> a1 >> a2;
|
||||
if(k1 == Z)
|
||||
{
|
||||
f->push_back((G4double) k2);
|
||||
u->push_back(a1);
|
||||
j->push_back(a2);
|
||||
}
|
||||
}
|
||||
file.close();
|
||||
file >> Z >> nLevels;
|
||||
for (G4int h=0;h<nLevels;h++){
|
||||
file >> k1 >> a1 >> a2;
|
||||
f->push_back((G4double) k1);
|
||||
u->push_back(a1);
|
||||
j->push_back(a2);
|
||||
}
|
||||
ionizationEnergy->push_back(u);
|
||||
hartreeFunction->push_back(j);
|
||||
occupationNumber->push_back(f);
|
||||
}
|
||||
file >> test >> test1; //-1 -1 close the data for each Z
|
||||
if (test > 0) {
|
||||
G4String excep = "G4PenelopeCompton - data file corrupted!";
|
||||
G4Exception(excep);
|
||||
}
|
||||
}while (test != -2); //the very last Z is closed with -2 instead of -1
|
||||
|
||||
//(*((*ionizationEnergy)[Z-1]))[i] contains the ionization energy of the i-th level of
|
||||
//the element Z
|
||||
};
|
||||
|
||||
@@ -101,7 +101,7 @@ G4PenelopeGammaConversion::~G4PenelopeGammaConversion()
|
||||
delete rangeTest;
|
||||
}
|
||||
|
||||
void G4PenelopeGammaConversion::BuildPhysicsTable(const G4ParticleDefinition& photon)
|
||||
void G4PenelopeGammaConversion::BuildPhysicsTable(const G4ParticleDefinition& )
|
||||
{
|
||||
|
||||
crossSectionHandler->Clear();
|
||||
@@ -203,7 +203,7 @@ G4VParticleChange* G4PenelopeGammaConversion::PostStepDoIt(const G4Track& aTrack
|
||||
//electron kinematics
|
||||
G4double costheta_el,costheta_po;
|
||||
G4double phi_el,phi_po;
|
||||
G4double electronKineEnergy = G4std::max(0.,electronTotEnergy - electron_mass_c2) ;
|
||||
G4double electronKineEnergy = std::max(0.,electronTotEnergy - electron_mass_c2) ;
|
||||
costheta_el = G4UniformRand()*2.0-1.0;
|
||||
G4double kk = sqrt(electronKineEnergy*(electronKineEnergy+2.*electron_mass_c2));
|
||||
costheta_el = (costheta_el*electronTotEnergy+kk)/(electronTotEnergy+costheta_el*kk);
|
||||
@@ -213,7 +213,7 @@ G4VParticleChange* G4PenelopeGammaConversion::PostStepDoIt(const G4Track& aTrack
|
||||
G4double dirZ_el = costheta_el;
|
||||
|
||||
//positron kinematics
|
||||
G4double positronKineEnergy = G4std::max(0.,positronTotEnergy - electron_mass_c2) ;
|
||||
G4double positronKineEnergy = std::max(0.,positronTotEnergy - electron_mass_c2) ;
|
||||
costheta_po = G4UniformRand()*2.0-1.0;
|
||||
kk = sqrt(positronKineEnergy*(positronKineEnergy+2.*electron_mass_c2));
|
||||
costheta_po = (costheta_po*positronTotEnergy+kk)/(positronTotEnergy+costheta_po*kk);
|
||||
@@ -280,8 +280,8 @@ G4bool G4PenelopeGammaConversion::IsApplicable(const G4ParticleDefinition& parti
|
||||
}
|
||||
|
||||
G4double G4PenelopeGammaConversion::GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition*)
|
||||
G4double, // previousStepSize
|
||||
G4ForceCondition*)
|
||||
{
|
||||
const G4DynamicParticle* photon = track.GetDynamicParticle();
|
||||
G4double energy = photon->GetKineticEnergy();
|
||||
@@ -351,8 +351,8 @@ G4double G4PenelopeGammaConversion::GetScreeningRadius(G4double Z)
|
||||
}
|
||||
G4String pathString(path);
|
||||
G4String pathFile = pathString + "/penelope/pp-pen.dat";
|
||||
G4std::ifstream file(pathFile);
|
||||
G4std::filebuf* lsdp = file.rdbuf();
|
||||
std::ifstream file(pathFile);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
|
||||
if (!(lsdp->is_open()))
|
||||
{
|
||||
|
||||
@@ -164,13 +164,13 @@ G4double G4PenelopeInterpolator::CalculateMomentum(G4double UpperLimit,
|
||||
G4double RMom=0.0;
|
||||
if (UpperLimit < (*x)[0]) return RMom;
|
||||
G4int iend=0;
|
||||
G4double xt=G4std::min(UpperLimit,(*x)[nOfData-1]);
|
||||
G4double xt=std::min(UpperLimit,(*x)[nOfData-1]);
|
||||
G4double x1,x2,y1,y2;
|
||||
G4double xtc,dx,dy,a1,b1,ds;
|
||||
for (i=0;i<(nOfData-1);i++){
|
||||
x1=G4std::max((*x)[i],eps);
|
||||
x1=std::max((*x)[i],eps);
|
||||
y1=(*y)[i];
|
||||
x2=G4std::max((*x)[i+1],eps);
|
||||
x2=std::max((*x)[i+1],eps);
|
||||
y2=(*y)[i+1];
|
||||
if (xt < x2)
|
||||
{
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PenelopePhotoElectric.cc,v 1.5 2003/03/13 17:04:10 pandola Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4PenelopePhotoElectric.cc,v 1.7 2003/06/16 17:00:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: L. Pandola
|
||||
//
|
||||
@@ -93,7 +93,7 @@ G4PenelopePhotoElectric::~G4PenelopePhotoElectric()
|
||||
delete rangeTest;
|
||||
}
|
||||
|
||||
void G4PenelopePhotoElectric::BuildPhysicsTable(const G4ParticleDefinition& photon)
|
||||
void G4PenelopePhotoElectric::BuildPhysicsTable(const G4ParticleDefinition& )
|
||||
{
|
||||
|
||||
crossSectionHandler->Clear();
|
||||
@@ -109,7 +109,7 @@ void G4PenelopePhotoElectric::BuildPhysicsTable(const G4ParticleDefinition& phot
|
||||
}
|
||||
|
||||
G4VParticleChange* G4PenelopePhotoElectric::PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep)
|
||||
const G4Step& aStep)
|
||||
{
|
||||
// Fluorescence generated according to:
|
||||
// J. Stepanek ,"A program to determine the radiation spectra due to a single atomic
|
||||
@@ -146,8 +146,8 @@ G4VParticleChange* G4PenelopePhotoElectric::PostStepDoIt(const G4Track& aTrack,
|
||||
|
||||
// Create lists of pointers to DynamicParticles (photons and electrons)
|
||||
// (Is the electron vector necessary? To be checked)
|
||||
G4std::vector<G4DynamicParticle*>* photonVector = 0;
|
||||
G4std::vector<G4DynamicParticle*> electronVector;
|
||||
std::vector<G4DynamicParticle*>* photonVector = 0;
|
||||
std::vector<G4DynamicParticle*> electronVector;
|
||||
|
||||
G4double energyDeposit = 0.0;
|
||||
|
||||
@@ -188,10 +188,10 @@ G4VParticleChange* G4PenelopePhotoElectric::PostStepDoIt(const G4Track& aTrack,
|
||||
|
||||
size_t index = couple->GetIndex();
|
||||
G4double cutg = (*(theCoupleTable->GetEnergyCutsVector(0)))[index];
|
||||
cutg = G4std::min(cutForLowEnergySecondaryPhotons,cutg);
|
||||
cutg = std::min(cutForLowEnergySecondaryPhotons,cutg);
|
||||
|
||||
G4double cute = (*(theCoupleTable->GetEnergyCutsVector(1)))[index];
|
||||
cute = G4std::min(cutForLowEnergySecondaryPhotons,cute);
|
||||
cute = std::min(cutForLowEnergySecondaryPhotons,cute);
|
||||
|
||||
G4DynamicParticle* aPhoton;
|
||||
|
||||
@@ -277,8 +277,8 @@ G4bool G4PenelopePhotoElectric::IsApplicable(const G4ParticleDefinition& particl
|
||||
}
|
||||
|
||||
G4double G4PenelopePhotoElectric::GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition*)
|
||||
G4double, // previousStepSize
|
||||
G4ForceCondition*)
|
||||
{
|
||||
const G4DynamicParticle* photon = track.GetDynamicParticle();
|
||||
G4double energy = photon->GetKineticEnergy();
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
//
|
||||
// $Id: G4PenelopeRayleigh.cc,v 1.7 2003/03/13 16:55:35 pandola Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4PenelopeRayleigh.cc,v 1.9 2003/06/16 17:00:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: L. Pandola (luciano.pandola@cern.ch)
|
||||
//
|
||||
@@ -94,7 +94,7 @@ G4PenelopeRayleigh::~G4PenelopeRayleigh()
|
||||
delete samplingFunction_y;
|
||||
}
|
||||
|
||||
void G4PenelopeRayleigh::BuildPhysicsTable(const G4ParticleDefinition& photon)
|
||||
void G4PenelopeRayleigh::BuildPhysicsTable(const G4ParticleDefinition& )
|
||||
{
|
||||
|
||||
G4DataVector energyVector;
|
||||
@@ -112,7 +112,7 @@ void G4PenelopeRayleigh::BuildPhysicsTable(const G4ParticleDefinition& photon)
|
||||
|
||||
G4VDataSetAlgorithm* algo = new G4LogLogInterpolation();
|
||||
G4VEMDataSet* materialSet = new G4CompositeEMDataSet(algo,1.,1.);
|
||||
G4std::vector<G4VEMDataSet*> matCrossSections;
|
||||
std::vector<G4VEMDataSet*> matCrossSections;
|
||||
|
||||
G4int m;
|
||||
for (m=0; m<nMaterials; m++)
|
||||
@@ -139,7 +139,7 @@ void G4PenelopeRayleigh::BuildPhysicsTable(const G4ParticleDefinition& photon)
|
||||
for (bin=0; bin<nOfBins; bin++)
|
||||
{
|
||||
energies->push_back(energyVector[bin]);
|
||||
G4double ec=G4std::min(energyVector[bin],0.5*IZZ);
|
||||
G4double ec=std::min(energyVector[bin],0.5*IZZ);
|
||||
facte=k1*pow(ec/electron_mass_c2,2);
|
||||
G4double cs=0;
|
||||
G4PenelopeIntegrator<G4PenelopeRayleigh,G4double(G4PenelopeRayleigh::*)(G4double)> theIntegrator;
|
||||
@@ -297,7 +297,7 @@ G4bool G4PenelopeRayleigh::IsApplicable(const G4ParticleDefinition& particle)
|
||||
}
|
||||
|
||||
G4double G4PenelopeRayleigh::GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double, // previousStepSize
|
||||
G4ForceCondition*)
|
||||
{
|
||||
const G4DynamicParticle* photon = track.GetDynamicParticle();
|
||||
@@ -474,7 +474,7 @@ G4double G4PenelopeRayleigh::MolecularFormFactor(G4double y)
|
||||
Pg=sqrt(1-pow(Pa,2));
|
||||
Pq=k2*x/Pa;
|
||||
fb=sin(2*Pg*atan(Pq))/(Pg*Pq*pow((1+Pq*Pq),Pg));
|
||||
fa=G4std::max(fa,fb);
|
||||
fa=std::max(fa,fb);
|
||||
}
|
||||
if (stechiometric)
|
||||
{
|
||||
|
||||
@@ -70,52 +70,40 @@ G4QAOLowEnergyLoss::G4QAOLowEnergyLoss(const G4String& name)
|
||||
sizeL2 = 14;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4QAOLowEnergyLoss::~G4QAOLowEnergyLoss()
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::HighEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
G4double G4QAOLowEnergyLoss::HighEnergyLimit(const G4ParticleDefinition* ,
|
||||
const G4Material* ) const
|
||||
{
|
||||
return 2.0*MeV ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::LowEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
G4double G4QAOLowEnergyLoss::LowEnergyLimit(const G4ParticleDefinition* ,
|
||||
const G4Material* ) const
|
||||
{
|
||||
// return 50.0*keV ;
|
||||
return 5.0*keV ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::HighEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle) const
|
||||
G4double G4QAOLowEnergyLoss::HighEnergyLimit(const G4ParticleDefinition* ) const
|
||||
{
|
||||
return 2.0*MeV ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::LowEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle) const
|
||||
G4double G4QAOLowEnergyLoss::LowEnergyLimit(const G4ParticleDefinition* ) const
|
||||
{
|
||||
// return 50.0*keV ;
|
||||
return 5.0*keV ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4QAOLowEnergyLoss::IsInCharge(
|
||||
const G4DynamicParticle* particle,
|
||||
const G4Material* material) const
|
||||
G4bool G4QAOLowEnergyLoss::IsInCharge(const G4DynamicParticle* particle,
|
||||
const G4Material* material) const
|
||||
{
|
||||
G4bool isInCharge = false;
|
||||
|
||||
@@ -129,10 +117,8 @@ G4bool G4QAOLowEnergyLoss::IsInCharge(
|
||||
return isInCharge;
|
||||
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4QAOLowEnergyLoss::IsInCharge(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
G4bool G4QAOLowEnergyLoss::IsInCharge(const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
{
|
||||
|
||||
@@ -150,7 +136,6 @@ G4bool G4QAOLowEnergyLoss::IsInCharge(
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::TheValue(const G4DynamicParticle* particle,
|
||||
const G4Material* material)
|
||||
@@ -163,11 +148,10 @@ G4double G4QAOLowEnergyLoss::TheValue(const G4DynamicParticle* particle,
|
||||
return eloss ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::TheValue(const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy)
|
||||
G4double kineticEnergy)
|
||||
{
|
||||
G4double zParticle = (aParticle->GetPDGCharge())/eplus;
|
||||
|
||||
@@ -177,11 +161,10 @@ G4double G4QAOLowEnergyLoss::TheValue(const G4ParticleDefinition* aParticle,
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::EnergyLoss(const G4Material* material,
|
||||
G4double kineticEnergy,
|
||||
G4double zParticle) const
|
||||
G4double kineticEnergy,
|
||||
G4double zParticle) const
|
||||
{
|
||||
G4int nbOfShell = GetNumberOfShell(material);
|
||||
if(nbOfShell < 1) nbOfShell = 1;
|
||||
@@ -260,7 +243,6 @@ G4double G4QAOLowEnergyLoss::EnergyLoss(const G4Material* material,
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4int G4QAOLowEnergyLoss::GetNumberOfShell(const G4Material* material) const
|
||||
{
|
||||
@@ -282,7 +264,6 @@ G4int G4QAOLowEnergyLoss::GetNumberOfShell(const G4Material* material) const
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::GetShellEnergy(const G4Material* material,
|
||||
G4int nbOfTheShell) const
|
||||
@@ -306,7 +287,6 @@ G4double G4QAOLowEnergyLoss::GetShellEnergy(const G4Material* material,
|
||||
return shellEnergy;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::GetOscillatorEnergy(const G4Material* material,
|
||||
G4int nbOfTheShell) const
|
||||
@@ -345,7 +325,6 @@ G4double squaredPlasmonEnergy = 28.816 * 28.816 * 1e-6
|
||||
return oscShellEnergy;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::GetShellStrength(const G4Material* material,
|
||||
G4int nbOfTheShell) const
|
||||
@@ -369,8 +348,6 @@ G4double G4QAOLowEnergyLoss::GetShellStrength(const G4Material* material,
|
||||
return shellStrength;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::GetOccupationNumber(G4int Z, G4int ShellNb) const
|
||||
{
|
||||
|
||||
@@ -380,7 +357,6 @@ G4double G4QAOLowEnergyLoss::GetOccupationNumber(G4int Z, G4int ShellNb) const
|
||||
return nbOfElectronPerSubShell[indice+1];
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::GetL0(G4double normEnergy) const
|
||||
{
|
||||
@@ -399,7 +375,6 @@ G4double G4QAOLowEnergyLoss::GetL0(G4double normEnergy) const
|
||||
return bethe ;
|
||||
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::GetL1(G4double normEnergy) const
|
||||
{
|
||||
@@ -420,7 +395,6 @@ G4double G4QAOLowEnergyLoss::GetL1(G4double normEnergy) const
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4QAOLowEnergyLoss::GetL2(G4double normEnergy) const
|
||||
{
|
||||
@@ -439,7 +413,6 @@ G4double G4QAOLowEnergyLoss::GetL2(G4double normEnergy) const
|
||||
return bloch;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
const G4int G4QAOLowEnergyLoss::materialAvailable[6] = {13,14,29,73,79,78};
|
||||
/*
|
||||
@@ -465,7 +438,6 @@ G4double G4QAOLowEnergyLoss::auShellStrength[6]={ 0.0139, 0.0803, 0.2473, 0.423,
|
||||
G4double G4QAOLowEnergyLoss::ptShellEnergy[6]={ 95017e-6, 25590e-6, 4063e-6, 576e-6, 81.9e-6, 31.4e-6};
|
||||
G4double G4QAOLowEnergyLoss::ptShellStrength[6]={ 0.0129, 0.0745, 0.2295, 0.4627, 0.1324, 0.0879};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
const G4double G4QAOLowEnergyLoss::L0[67][2] =
|
||||
{
|
||||
@@ -537,7 +509,6 @@ const G4double G4QAOLowEnergyLoss::L0[67][2] =
|
||||
{1000.00, 6.90474}
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
const G4double G4QAOLowEnergyLoss::L1[22][2] =
|
||||
{
|
||||
@@ -565,7 +536,6 @@ const G4double G4QAOLowEnergyLoss::L1[22][2] =
|
||||
{20.00, 1.16752}
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
const G4double G4QAOLowEnergyLoss::L2[14][2] =
|
||||
{
|
||||
@@ -585,7 +555,6 @@ const G4double G4QAOLowEnergyLoss::L2[14][2] =
|
||||
{40.00, -1.13902}
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
const G4int G4QAOLowEnergyLoss::nbOfElectronPerSubShell[1540] =
|
||||
{
|
||||
@@ -720,6 +689,4 @@ const G4int G4QAOLowEnergyLoss::fNumberOfShells[101] =
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RangeTest.cc,v 1.6 2003/01/22 18:47:29 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4RangeTest.cc,v 1.7 2003/06/16 17:00:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
@@ -55,7 +55,7 @@ G4bool G4RangeTest::Escape(const G4ParticleDefinition* particle,
|
||||
if(idx>0) {
|
||||
G4double range = G4EnergyLossTables::GetRange(particle,energy,couple);
|
||||
G4double cut = couple->GetProductionCuts()->GetProductionCut(idx);
|
||||
G4double rMin = G4std::min(cut,safety);
|
||||
G4double rMin = std::min(cut,safety);
|
||||
value = (range > rMin);
|
||||
}
|
||||
return value;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SemiLogInterpolation.cc,v 1.4 2002/05/28 09:20:21 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ShellData.cc,v 1.5 2002/05/28 09:20:21 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4ShellData.cc,v 1.6 2003/06/16 17:00:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
@@ -34,8 +34,8 @@
|
||||
|
||||
#include "G4ShellData.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/strstream"
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
// Constructor
|
||||
|
||||
@@ -46,7 +46,7 @@ G4ShellData::G4ShellData(G4int minZ, G4int maxZ)
|
||||
// Destructor
|
||||
G4ShellData::~G4ShellData()
|
||||
{
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> >::iterator pos;
|
||||
std::map<G4int,G4DataVector*,std::less<G4int> >::iterator pos;
|
||||
|
||||
for (pos = idMap.begin(); pos != idMap.end(); ++pos)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ size_t G4ShellData::NumberOfShells(G4int Z) const
|
||||
|
||||
const G4DataVector& G4ShellData::ShellIdVector(G4int Z) const
|
||||
{
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator pos;
|
||||
if (Z < zMin || Z > zMax)
|
||||
G4Exception("G4ShellData::ShellIdVector - Z outside boundaries");
|
||||
pos = idMap.find(Z);
|
||||
@@ -90,7 +90,7 @@ G4int G4ShellData::ShellId(G4int Z, G4int shellIndex) const
|
||||
|
||||
if (Z >= zMin && Z <= zMax)
|
||||
{
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator pos;
|
||||
pos = idMap.find(Z);
|
||||
if (pos!= idMap.end())
|
||||
{
|
||||
@@ -112,7 +112,7 @@ G4double G4ShellData::BindingEnergy(G4int Z, G4int shellIndex) const
|
||||
|
||||
if (Z >= zMin && Z <= zMax)
|
||||
{
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator pos;
|
||||
pos = bindingMap.find(Z);
|
||||
if (pos!= bindingMap.end())
|
||||
{
|
||||
@@ -136,10 +136,10 @@ void G4ShellData::PrintData() const
|
||||
<< " ---- "
|
||||
<< G4endl;
|
||||
G4int nSh = nShells[Z-1];
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> >::const_iterator posId;
|
||||
std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator posId;
|
||||
posId = idMap.find(Z);
|
||||
G4DataVector* ids = (*posId).second;
|
||||
G4std::map<G4int,G4DataVector*,G4std::less<G4int> >::const_iterator posE;
|
||||
std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator posE;
|
||||
posE = bindingMap.find(Z);
|
||||
G4DataVector* energies = (*posE).second;
|
||||
for (G4int i=0; i<nSh; i++)
|
||||
@@ -161,7 +161,7 @@ void G4ShellData::LoadData(const G4String& fileName)
|
||||
// Build the complete string identifying the file with the data set
|
||||
|
||||
char nameChar[100] = {""};
|
||||
G4std::ostrstream ost(nameChar, 100, G4std::ios::out);
|
||||
std::ostrstream ost(nameChar, 100, std::ios::out);
|
||||
|
||||
ost << fileName << ".dat";
|
||||
|
||||
@@ -176,8 +176,8 @@ void G4ShellData::LoadData(const G4String& fileName)
|
||||
|
||||
G4String pathString(path);
|
||||
G4String dirFile = pathString + name;
|
||||
G4std::ifstream file(dirFile);
|
||||
G4std::filebuf* lsdp = file.rdbuf();
|
||||
std::ifstream file(dirFile);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
|
||||
if (! (lsdp->is_open()) )
|
||||
{
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ShellEMDataSet.cc,v 1.8 2002/05/28 09:20:21 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4ShellEMDataSet.cc,v 1.10 2003/06/16 17:00:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
@@ -36,8 +36,8 @@
|
||||
#include "G4ShellEMDataSet.hh"
|
||||
#include "G4EMDataSet.hh"
|
||||
#include "G4VDataSetAlgorithm.hh"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/strstream"
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
|
||||
G4ShellEMDataSet::G4ShellEMDataSet(G4int Z,
|
||||
@@ -71,7 +71,7 @@ G4ShellEMDataSet::~G4ShellEMDataSet()
|
||||
delete algorithm;
|
||||
}
|
||||
|
||||
G4double G4ShellEMDataSet::FindValue(G4double e, G4int id) const
|
||||
G4double G4ShellEMDataSet::FindValue(G4double e, G4int ) const
|
||||
{
|
||||
// Returns the sum over the shells corresponding to e
|
||||
G4double value = 0.;
|
||||
@@ -103,7 +103,7 @@ void G4ShellEMDataSet::LoadData(const G4String& fileName)
|
||||
// Build the complete string identifying the file with the data set
|
||||
|
||||
char nameChar[100] = {""};
|
||||
G4std::ostrstream ost(nameChar, 100, G4std::ios::out);
|
||||
std::ostrstream ost(nameChar, 100, std::ios::out);
|
||||
|
||||
if (z != 0) ost << fileName << z << ".dat";
|
||||
else ost << fileName << ".dat";
|
||||
@@ -120,8 +120,8 @@ void G4ShellEMDataSet::LoadData(const G4String& fileName)
|
||||
G4String pathString(path);
|
||||
G4String separator("/" );
|
||||
G4String dirFile = pathString + separator + name;
|
||||
G4std::ifstream file(dirFile);
|
||||
G4std::filebuf* lsdp = file.rdbuf();
|
||||
std::ifstream file(dirFile);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
|
||||
if (! (lsdp->is_open()) )
|
||||
{
|
||||
|
||||
@@ -60,14 +60,14 @@ void G4ShellVacancy::AddXsiTable(G4VEMDataSet* set)
|
||||
xsis.push_back(set);
|
||||
}
|
||||
|
||||
G4std::vector<G4int> G4ShellVacancy::GenerateNumberOfIonisations(const G4MaterialCutsCouple*
|
||||
std::vector<G4int> G4ShellVacancy::GenerateNumberOfIonisations(const G4MaterialCutsCouple*
|
||||
couple,
|
||||
G4double
|
||||
incidentEnergy,
|
||||
G4double eLoss) const
|
||||
|
||||
{
|
||||
G4std::vector<G4int> numberOfIonisations;
|
||||
std::vector<G4int> numberOfIonisations;
|
||||
const G4Material* material = couple->GetMaterial();
|
||||
G4int numberOfElements = material->GetNumberOfElements();
|
||||
|
||||
|
||||
+33
-51
@@ -21,63 +21,45 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AtomicTransition.cc,v 1.2 ????
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 16 Sept 2001 EG Modified according to a design iteration in the
|
||||
// LowEnergy category
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
//
|
||||
//
|
||||
// File name: G4VBremAngularDistribution
|
||||
//
|
||||
// Author: Andreia Trindade (andreia@lip.pt)
|
||||
// Pedro Rodrigues (psilva@lip.pt)
|
||||
// Luis Peralta (luis@lip.pt)
|
||||
// Maria Grazia Pia (MariaGrazia.Pia@ge.infn.it)
|
||||
//
|
||||
// Creation date: 21 March 2003
|
||||
//
|
||||
// Modifications:
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Abstract base class for Bremsstrahlung Angular Distribution Generation
|
||||
//
|
||||
// Class Description: End
|
||||
|
||||
#include "G4AtomicTransition.hh"
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
||||
G4AtomicTransition::G4AtomicTransition(G4int finalShell,
|
||||
const G4std::vector<G4int>& ids,
|
||||
const G4DataVector& energies,
|
||||
const G4DataVector& prob)
|
||||
:finalShellId(finalShell),
|
||||
originatingShellIds(ids),
|
||||
transitionEnergies(energies),
|
||||
transitionProbabilities(prob)
|
||||
{ }
|
||||
#include "G4VBremAngularDistribution.hh"
|
||||
|
||||
G4AtomicTransition::~G4AtomicTransition()
|
||||
{ }
|
||||
//
|
||||
|
||||
const G4std::vector<G4int>& G4AtomicTransition::OriginatingShellIds() const
|
||||
{
|
||||
return originatingShellIds;
|
||||
}
|
||||
G4VBremAngularDistribution::G4VBremAngularDistribution(const G4String& ) // name
|
||||
{;}
|
||||
|
||||
const G4DataVector& G4AtomicTransition::TransitionEnergies() const
|
||||
{
|
||||
return transitionEnergies;
|
||||
}
|
||||
//
|
||||
|
||||
const G4DataVector& G4AtomicTransition::TransitionProbabilities() const
|
||||
{
|
||||
return transitionProbabilities;
|
||||
}
|
||||
G4VBremAngularDistribution::~G4VBremAngularDistribution()
|
||||
{;}
|
||||
|
||||
const G4int G4AtomicTransition::FinalShellId() const
|
||||
{
|
||||
return finalShellId;
|
||||
}
|
||||
|
||||
G4int G4AtomicTransition::OriginatingShellId(G4int index) const
|
||||
{
|
||||
return originatingShellIds[index];
|
||||
}
|
||||
G4double G4AtomicTransition::TransitionEnergy(G4int index) const
|
||||
{
|
||||
return transitionEnergies[index];
|
||||
}
|
||||
G4double G4AtomicTransition::TransitionProbability(G4int index) const
|
||||
{
|
||||
return transitionProbabilities[index];
|
||||
}
|
||||
void G4VBremAngularDistribution::PrintGeneratorInformation() const
|
||||
{;}
|
||||
|
||||
//
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VCrossSectionHandler.cc,v 1.12 2003/01/22 18:47:29 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4VCrossSectionHandler.cc,v 1.13 2003/06/16 17:00:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
@@ -47,10 +47,10 @@
|
||||
#include "G4Material.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "g4std/map"
|
||||
#include "g4std/vector"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/strstream"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
|
||||
G4VCrossSectionHandler::G4VCrossSectionHandler()
|
||||
@@ -81,7 +81,7 @@ G4VCrossSectionHandler::~G4VCrossSectionHandler()
|
||||
{
|
||||
delete interpolation;
|
||||
interpolation = 0;
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::iterator pos;
|
||||
|
||||
for (pos = dataMap.begin(); pos != dataMap.end(); ++pos)
|
||||
{
|
||||
@@ -132,7 +132,7 @@ void G4VCrossSectionHandler::Initialise(G4VDataSetAlgorithm* algorithm,
|
||||
|
||||
void G4VCrossSectionHandler::PrintData() const
|
||||
{
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
|
||||
|
||||
for (pos = dataMap.begin(); pos != dataMap.end(); pos++)
|
||||
{
|
||||
@@ -161,7 +161,7 @@ void G4VCrossSectionHandler::LoadData(const G4String& fileName)
|
||||
// Build the complete string identifying the file with the data set
|
||||
|
||||
char nameChar[100] = {""};
|
||||
G4std::ostrstream ost(nameChar, 100, G4std::ios::out);
|
||||
std::ostrstream ost(nameChar, 100, std::ios::out);
|
||||
|
||||
ost << fileName << Z << ".dat";
|
||||
|
||||
@@ -176,8 +176,8 @@ void G4VCrossSectionHandler::LoadData(const G4String& fileName)
|
||||
|
||||
G4String pathString(path);
|
||||
G4String dirFile = pathString + "/" + name;
|
||||
G4std::ifstream file(dirFile);
|
||||
G4std::filebuf* lsdp = file.rdbuf();
|
||||
std::ifstream file(dirFile);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
|
||||
if (! (lsdp->is_open()) )
|
||||
{
|
||||
@@ -234,7 +234,7 @@ void G4VCrossSectionHandler::LoadShellData(const G4String& fileName)
|
||||
// Build the complete string identifying the file with the data set
|
||||
|
||||
char nameChar[100] = {""};
|
||||
G4std::ostrstream ost(nameChar, 100, G4std::ios::out);
|
||||
std::ostrstream ost(nameChar, 100, std::ios::out);
|
||||
|
||||
ost << fileName << Z << ".dat";
|
||||
|
||||
@@ -249,8 +249,8 @@ void G4VCrossSectionHandler::LoadShellData(const G4String& fileName)
|
||||
|
||||
G4String pathString(path);
|
||||
G4String dirFile = pathString + "/" + name;
|
||||
G4std::ifstream file(dirFile);
|
||||
G4std::filebuf* lsdp = file.rdbuf();
|
||||
std::ifstream file(dirFile);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
|
||||
if (! (lsdp->is_open()) )
|
||||
{
|
||||
@@ -300,7 +300,7 @@ void G4VCrossSectionHandler::LoadShellData(const G4String& fileName)
|
||||
void G4VCrossSectionHandler::Clear()
|
||||
{
|
||||
// Reset the map of data sets: remove the data sets from the map
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::iterator pos;
|
||||
|
||||
if(! dataMap.empty())
|
||||
{
|
||||
@@ -327,7 +327,7 @@ G4double G4VCrossSectionHandler::FindValue(G4int Z, G4double energy) const
|
||||
{
|
||||
G4double value = 0.;
|
||||
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
|
||||
pos = dataMap.find(Z);
|
||||
if (pos!= dataMap.end())
|
||||
{
|
||||
@@ -351,7 +351,7 @@ G4double G4VCrossSectionHandler::FindValue(G4int Z, G4double energy,
|
||||
{
|
||||
G4double value = 0.;
|
||||
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
|
||||
pos = dataMap.find(Z);
|
||||
if (pos!= dataMap.end())
|
||||
{
|
||||
@@ -425,7 +425,7 @@ G4VEMDataSet* G4VCrossSectionHandler::BuildMeanFreePathForMaterials(const G4Data
|
||||
|
||||
if (crossSections != 0)
|
||||
{ // Reset the list of cross sections
|
||||
G4std::vector<G4VEMDataSet*>::iterator mat;
|
||||
std::vector<G4VEMDataSet*>::iterator mat;
|
||||
if (! crossSections->empty())
|
||||
{
|
||||
for (mat = crossSections->begin(); mat!= crossSections->end(); ++mat)
|
||||
@@ -591,7 +591,7 @@ G4int G4VCrossSectionHandler::SelectRandomShell(G4int Z, G4double e) const
|
||||
G4double partialSum = 0.;
|
||||
|
||||
G4VEMDataSet* dataSet = 0;
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
|
||||
pos = dataMap.find(Z);
|
||||
// The following is a workaround for STL ObjectSpace implementation,
|
||||
// which does not support the standard and does not accept
|
||||
@@ -650,7 +650,7 @@ G4int G4VCrossSectionHandler::NumberOfComponents(G4int Z) const
|
||||
{
|
||||
G4int n = 0;
|
||||
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
|
||||
pos = dataMap.find(Z);
|
||||
if (pos!= dataMap.end())
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
//
|
||||
|
||||
G4VLowEnergyModel::G4VLowEnergyModel(const G4String& name)
|
||||
G4VLowEnergyModel::G4VLowEnergyModel(const G4String& ) // argument is name
|
||||
{;}
|
||||
|
||||
//
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VeLowEnergyLoss.cc,v 1.21 2003/04/24 11:24:16 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4VeLowEnergyLoss.cc,v 1.23 2003/06/16 17:00:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -76,7 +76,7 @@ G4VeLowEnergyLoss::G4VeLowEnergyLoss()
|
||||
|
||||
//
|
||||
|
||||
G4VeLowEnergyLoss::G4VeLowEnergyLoss(const G4String& aName , G4ProcessType aType)
|
||||
G4VeLowEnergyLoss::G4VeLowEnergyLoss(const G4String& aName, G4ProcessType aType)
|
||||
: G4VContinuousDiscreteProcess(aName, aType),
|
||||
lastMaterial(0),
|
||||
nmaxCont1(4),
|
||||
@@ -119,10 +119,11 @@ void G4VeLowEnergyLoss::SetStepFunction (G4double c1, G4double c2)
|
||||
c3lim=-(1.-dRoverRange)*finalRange*finalRange;
|
||||
}
|
||||
|
||||
G4PhysicsTable* G4VeLowEnergyLoss::BuildRangeTable(
|
||||
G4PhysicsTable* theDEDXTable,G4PhysicsTable* theRangeTable,
|
||||
G4double lowestKineticEnergy,G4double highestKineticEnergy,
|
||||
G4int TotBin)
|
||||
G4PhysicsTable* G4VeLowEnergyLoss::BuildRangeTable(G4PhysicsTable* theDEDXTable,
|
||||
G4PhysicsTable* theRangeTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy,
|
||||
G4int TotBin)
|
||||
// Build range table from the energy loss table
|
||||
{
|
||||
|
||||
@@ -188,7 +189,7 @@ void G4VeLowEnergyLoss::BuildRangeVector(G4PhysicsTable* theDEDXTable,
|
||||
//
|
||||
|
||||
G4double G4VeLowEnergyLoss::RangeIntLin(G4PhysicsVector* physicsVector,
|
||||
G4int nbin)
|
||||
G4int nbin)
|
||||
// num. integration, linear binning
|
||||
{
|
||||
G4double dtau,Value,taui,ti,lossi,ci;
|
||||
@@ -219,7 +220,7 @@ G4double G4VeLowEnergyLoss::RangeIntLin(G4PhysicsVector* physicsVector,
|
||||
//
|
||||
|
||||
G4double G4VeLowEnergyLoss::RangeIntLog(G4PhysicsVector* physicsVector,
|
||||
G4int nbin)
|
||||
G4int nbin)
|
||||
// num. integration, logarithmic binning
|
||||
{
|
||||
G4double ltt,dltau,Value,ui,taui,ti,lossi,ci;
|
||||
@@ -253,9 +254,9 @@ G4double G4VeLowEnergyLoss::RangeIntLog(G4PhysicsVector* physicsVector,
|
||||
//
|
||||
|
||||
G4PhysicsTable* G4VeLowEnergyLoss::BuildLabTimeTable(G4PhysicsTable* theDEDXTable,
|
||||
G4PhysicsTable* theLabTimeTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy,G4int TotBin)
|
||||
G4PhysicsTable* theLabTimeTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy,G4int TotBin)
|
||||
|
||||
{
|
||||
|
||||
@@ -286,9 +287,9 @@ G4PhysicsTable* G4VeLowEnergyLoss::BuildLabTimeTable(G4PhysicsTable* theDEDXTabl
|
||||
//
|
||||
|
||||
G4PhysicsTable* G4VeLowEnergyLoss::BuildProperTimeTable(G4PhysicsTable* theDEDXTable,
|
||||
G4PhysicsTable* theProperTimeTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy,G4int TotBin)
|
||||
G4PhysicsTable* theProperTimeTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy,G4int TotBin)
|
||||
|
||||
{
|
||||
|
||||
@@ -319,9 +320,9 @@ G4PhysicsTable* G4VeLowEnergyLoss::BuildProperTimeTable(G4PhysicsTable* theDEDXT
|
||||
//
|
||||
|
||||
void G4VeLowEnergyLoss::BuildLabTimeVector(G4PhysicsTable* theDEDXTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy,G4int TotBin,
|
||||
G4int materialIndex, G4PhysicsLogVector* timeVector)
|
||||
G4double, // lowestKineticEnergy
|
||||
G4double highestKineticEnergy, G4int TotBin,
|
||||
G4int materialIndex, G4PhysicsLogVector* timeVector)
|
||||
// create lab time vector for a material
|
||||
{
|
||||
|
||||
@@ -380,9 +381,9 @@ void G4VeLowEnergyLoss::BuildLabTimeVector(G4PhysicsTable* theDEDXTable,
|
||||
//
|
||||
|
||||
void G4VeLowEnergyLoss::BuildProperTimeVector(G4PhysicsTable* theDEDXTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy,G4int TotBin,
|
||||
G4int materialIndex, G4PhysicsLogVector* timeVector)
|
||||
G4double, // lowestKineticEnergy
|
||||
G4double highestKineticEnergy, G4int TotBin,
|
||||
G4int materialIndex, G4PhysicsLogVector* timeVector)
|
||||
// create proper time vector for a material
|
||||
{
|
||||
G4int nbin=100;
|
||||
@@ -441,7 +442,7 @@ void G4VeLowEnergyLoss::BuildProperTimeVector(G4PhysicsTable* theDEDXTable,
|
||||
//
|
||||
|
||||
G4double G4VeLowEnergyLoss::LabTimeIntLog(G4PhysicsVector* physicsVector,
|
||||
G4int nbin)
|
||||
G4int nbin)
|
||||
// num. integration, logarithmic binning
|
||||
{
|
||||
G4double ltt,dltau,Value,ui,taui,ti,lossi,ci;
|
||||
@@ -474,7 +475,7 @@ G4double G4VeLowEnergyLoss::LabTimeIntLog(G4PhysicsVector* physicsVector,
|
||||
//
|
||||
|
||||
G4double G4VeLowEnergyLoss::ProperTimeIntLog(G4PhysicsVector* physicsVector,
|
||||
G4int nbin)
|
||||
G4int nbin)
|
||||
// num. integration, logarithmic binning
|
||||
{
|
||||
G4double ltt,dltau,Value,ui,taui,ti,lossi,ci;
|
||||
@@ -507,12 +508,13 @@ G4double G4VeLowEnergyLoss::ProperTimeIntLog(G4PhysicsVector* physicsVector,
|
||||
//
|
||||
|
||||
G4PhysicsTable* G4VeLowEnergyLoss::BuildInverseRangeTable(G4PhysicsTable* theRangeTable,
|
||||
G4PhysicsTable*,
|
||||
G4PhysicsTable*,
|
||||
G4PhysicsTable*,
|
||||
G4PhysicsTable* theInverseRangeTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy,G4int nbins)
|
||||
G4PhysicsTable*,
|
||||
G4PhysicsTable*,
|
||||
G4PhysicsTable*,
|
||||
G4PhysicsTable* theInverseRangeTable,
|
||||
G4double, // lowestKineticEnergy,
|
||||
G4double, // highestKineticEnergy
|
||||
G4int ) // nbins
|
||||
// Build inverse table of the range table
|
||||
{
|
||||
G4bool b;
|
||||
@@ -575,12 +577,12 @@ G4PhysicsTable* G4VeLowEnergyLoss::BuildInverseRangeTable(G4PhysicsTable* theRan
|
||||
//
|
||||
|
||||
void G4VeLowEnergyLoss::InvertRangeVector(G4PhysicsTable* theRangeTable,
|
||||
G4PhysicsTable* theRangeCoeffATable,
|
||||
G4PhysicsTable* theRangeCoeffBTable,
|
||||
G4PhysicsTable* theRangeCoeffCTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy,G4int TotBin,
|
||||
G4int materialIndex,G4PhysicsLogVector* aVector)
|
||||
G4PhysicsTable* theRangeCoeffATable,
|
||||
G4PhysicsTable* theRangeCoeffBTable,
|
||||
G4PhysicsTable* theRangeCoeffCTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy, G4int TotBin,
|
||||
G4int materialIndex, G4PhysicsLogVector* aVector)
|
||||
// invert range vector for a material
|
||||
{
|
||||
G4double LowEdgeRange,A,B,C,discr,KineticEnergy ;
|
||||
@@ -631,9 +633,9 @@ void G4VeLowEnergyLoss::InvertRangeVector(G4PhysicsTable* theRangeTable,
|
||||
//
|
||||
|
||||
G4PhysicsTable* G4VeLowEnergyLoss::BuildRangeCoeffATable(G4PhysicsTable* theRangeTable,
|
||||
G4PhysicsTable* theRangeCoeffATable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy,G4int TotBin)
|
||||
G4PhysicsTable* theRangeCoeffATable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy, G4int TotBin)
|
||||
// Build tables of coefficients for the energy loss calculation
|
||||
// create table for coefficients "A"
|
||||
{
|
||||
@@ -693,9 +695,9 @@ G4PhysicsTable* G4VeLowEnergyLoss::BuildRangeCoeffATable(G4PhysicsTable* theRang
|
||||
//
|
||||
|
||||
G4PhysicsTable* G4VeLowEnergyLoss::BuildRangeCoeffBTable(G4PhysicsTable* theRangeTable,
|
||||
G4PhysicsTable* theRangeCoeffBTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy,G4int TotBin)
|
||||
G4PhysicsTable* theRangeCoeffBTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy, G4int TotBin)
|
||||
// Build tables of coefficients for the energy loss calculation
|
||||
// create table for coefficients "B"
|
||||
{
|
||||
@@ -754,9 +756,9 @@ G4PhysicsTable* G4VeLowEnergyLoss::BuildRangeCoeffBTable(G4PhysicsTable* theRang
|
||||
//
|
||||
|
||||
G4PhysicsTable* G4VeLowEnergyLoss::BuildRangeCoeffCTable(G4PhysicsTable* theRangeTable,
|
||||
G4PhysicsTable* theRangeCoeffCTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy,G4int TotBin)
|
||||
G4PhysicsTable* theRangeCoeffCTable,
|
||||
G4double lowestKineticEnergy,
|
||||
G4double highestKineticEnergy, G4int TotBin)
|
||||
// Build tables of coefficients for the energy loss calculation
|
||||
// create table for coefficients "C"
|
||||
{
|
||||
@@ -816,8 +818,8 @@ G4PhysicsTable* G4VeLowEnergyLoss::BuildRangeCoeffCTable(G4PhysicsTable* theRang
|
||||
|
||||
G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
G4double MeanLoss,
|
||||
G4double step)
|
||||
G4double MeanLoss,
|
||||
G4double step)
|
||||
// calculate actual loss from the mean loss
|
||||
// The model used to get the fluctuation is essentially the same as in Glandz in Geant3.
|
||||
{
|
||||
@@ -911,7 +913,7 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
if(a3>alim)
|
||||
{
|
||||
siga=sqrt(a3) ;
|
||||
p3 = G4std::max(0,G4int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
p3 = std::max(0,G4int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
}
|
||||
else p3 = G4Poisson(a3);
|
||||
|
||||
@@ -941,7 +943,7 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
if(a3>alim)
|
||||
{
|
||||
siga=sqrt(a3) ;
|
||||
p3 = G4std::max(0,G4int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
p3 = std::max(0,G4int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p3 = G4Poisson(a3);
|
||||
@@ -975,7 +977,7 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
if(a1>alim)
|
||||
{
|
||||
siga=sqrt(a1) ;
|
||||
p1 = G4std::max(0,int(G4RandGauss::shoot(a1,siga)+0.5));
|
||||
p1 = std::max(0,int(G4RandGauss::shoot(a1,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p1 = G4Poisson(a1);
|
||||
@@ -984,7 +986,7 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
if(a2>alim)
|
||||
{
|
||||
siga=sqrt(a2) ;
|
||||
p2 = G4std::max(0,int(G4RandGauss::shoot(a2,siga)+0.5));
|
||||
p2 = std::max(0,int(G4RandGauss::shoot(a2,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p2 = G4Poisson(a2);
|
||||
@@ -1003,7 +1005,7 @@ G4double G4VeLowEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
if(a3>alim)
|
||||
{
|
||||
siga=sqrt(a3) ;
|
||||
p3 = G4std::max(0,int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
p3 = std::max(0,int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p3 = G4Poisson(a3);
|
||||
|
||||
@@ -73,7 +73,7 @@ G4double G4VhElectronicStoppingPower::HeEffChargeSquare(
|
||||
static G4double c[6] = {0.2865, 0.1266, -0.001429,
|
||||
0.02402,-0.01135, 0.001475} ;
|
||||
|
||||
G4double e = log( G4std::max( 1.0, kineticEnergyHe/(keV*GetHeMassAMU()))) ;
|
||||
G4double e = log( std::max( 1.0, kineticEnergyHe/(keV*GetHeMassAMU()))) ;
|
||||
G4double x = c[0] ;
|
||||
G4double y = 1.0 ;
|
||||
for (G4int i=1; i<6; i++) {
|
||||
|
||||
@@ -54,7 +54,7 @@ G4int G4VhShellCrossSection::SelectRandomShell(G4int Z,
|
||||
G4double mass,
|
||||
G4double deltaEnergy) const
|
||||
{
|
||||
G4std::vector<G4double> p = Probabilities(Z,incidentEnergy,mass,deltaEnergy);
|
||||
std::vector<G4double> p = Probabilities(Z,incidentEnergy,mass,deltaEnergy);
|
||||
G4int shell = 0;
|
||||
size_t nShells = p.size();
|
||||
G4double q = G4UniformRand();
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4eBremsstrahlungSpectrum.cc,v 1.9 2003/02/28 08:42:18 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4eBremsstrahlungSpectrum.cc,v 1.11 2003/06/16 17:00:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -74,8 +74,8 @@ G4double G4eBremsstrahlungSpectrum::Probability(G4int Z,
|
||||
G4int,
|
||||
const G4ParticleDefinition*) const
|
||||
{
|
||||
G4double tm = G4std::min(tmax, e);
|
||||
G4double t0 = G4std::max(tmin, lowestE);
|
||||
G4double tm = std::min(tmax, e);
|
||||
G4double t0 = std::max(tmin, lowestE);
|
||||
if(t0 >= tm) return 0.0;
|
||||
|
||||
t0 /= e;
|
||||
@@ -119,10 +119,10 @@ G4double G4eBremsstrahlungSpectrum::AverageEnergy(G4int Z,
|
||||
G4double tmax,
|
||||
G4double e,
|
||||
G4int,
|
||||
const G4ParticleDefinition*) const
|
||||
const G4ParticleDefinition*) const
|
||||
{
|
||||
G4double tm = G4std::min(tmax, e);
|
||||
G4double t0 = G4std::max(tmin, lowestE);
|
||||
G4double tm = std::min(tmax, e);
|
||||
G4double t0 = std::max(tmin, lowestE);
|
||||
if(t0 >= tm) return 0.0;
|
||||
|
||||
t0 /= e;
|
||||
@@ -173,10 +173,10 @@ G4double G4eBremsstrahlungSpectrum::SampleEnergy(G4int Z,
|
||||
G4double tmax,
|
||||
G4double e,
|
||||
G4int,
|
||||
const G4ParticleDefinition*) const
|
||||
const G4ParticleDefinition*) const
|
||||
{
|
||||
G4double tm = G4std::min(tmax, e);
|
||||
G4double t0 = G4std::max(tmin, lowestE);
|
||||
G4double tm = std::min(tmax, e);
|
||||
G4double t0 = std::max(tmin, lowestE);
|
||||
if(t0 >= tm) return 0.0;
|
||||
|
||||
t0 /= e;
|
||||
@@ -187,7 +187,7 @@ G4double G4eBremsstrahlungSpectrum::SampleEnergy(G4int Z,
|
||||
for (size_t i=0; i<=length; i++) {
|
||||
p.push_back(theBRparam->Parameter(i, Z, e));
|
||||
}
|
||||
G4double amaj = G4std::max(p[length], 1. - (p[1] - p[0])*xp[0]/(xp[1] - xp[0]) );
|
||||
G4double amaj = std::max(p[length], 1. - (p[1] - p[0])*xp[0]/(xp[1] - xp[0]) );
|
||||
|
||||
G4double amax = log(tm);
|
||||
G4double amin = log(t0);
|
||||
@@ -217,10 +217,10 @@ G4double G4eBremsstrahlungSpectrum::SampleEnergy(G4int Z,
|
||||
|
||||
G4double G4eBremsstrahlungSpectrum::IntSpectrum(G4double xMin,
|
||||
G4double xMax,
|
||||
const G4DataVector& p) const
|
||||
const G4DataVector& p) const
|
||||
{
|
||||
G4double x1 = G4std::min(xMin, xp[0]);
|
||||
G4double x2 = G4std::min(xMax, xp[0]);
|
||||
G4double x1 = std::min(xMin, xp[0]);
|
||||
G4double x2 = std::min(xMax, xp[0]);
|
||||
G4double sum = 0.0;
|
||||
|
||||
if(x1 < x2) {
|
||||
@@ -229,8 +229,8 @@ G4double G4eBremsstrahlungSpectrum::IntSpectrum(G4double xMin,
|
||||
}
|
||||
|
||||
for (size_t i=0; i<length-1; i++) {
|
||||
x1 = G4std::max(xMin, xp[i]);
|
||||
x2 = G4std::min(xMax, xp[i+1]);
|
||||
x1 = std::max(xMin, xp[i]);
|
||||
x2 = std::min(xMax, xp[i+1]);
|
||||
if(x1 < x2) {
|
||||
G4double z1 = p[i];
|
||||
G4double z2 = p[i+1];
|
||||
@@ -243,10 +243,10 @@ G4double G4eBremsstrahlungSpectrum::IntSpectrum(G4double xMin,
|
||||
|
||||
G4double G4eBremsstrahlungSpectrum::AverageValue(G4double xMin,
|
||||
G4double xMax,
|
||||
const G4DataVector& p) const
|
||||
const G4DataVector& p) const
|
||||
{
|
||||
G4double x1 = G4std::min(xMin, xp[0]);
|
||||
G4double x2 = G4std::min(xMax, xp[0]);
|
||||
G4double x1 = std::min(xMin, xp[0]);
|
||||
G4double x2 = std::min(xMax, xp[0]);
|
||||
G4double z1 = x1;
|
||||
G4double z2 = x2;
|
||||
G4double sum = 0.0;
|
||||
@@ -260,8 +260,8 @@ G4double G4eBremsstrahlungSpectrum::AverageValue(G4double xMin,
|
||||
}
|
||||
|
||||
for (size_t i=0; i<length-1; i++) {
|
||||
x1 = G4std::max(xMin, xp[i]);
|
||||
x2 = G4std::min(xMax, xp[i+1]);
|
||||
x1 = std::max(xMin, xp[i]);
|
||||
x2 = std::min(xMax, xp[i+1]);
|
||||
if(x1 < x2) {
|
||||
z1 = p[i];
|
||||
z2 = p[i+1];
|
||||
@@ -273,7 +273,7 @@ G4double G4eBremsstrahlungSpectrum::AverageValue(G4double xMin,
|
||||
}
|
||||
|
||||
G4double G4eBremsstrahlungSpectrum::Function(G4double x,
|
||||
const G4DataVector& p) const
|
||||
const G4DataVector& p) const
|
||||
{
|
||||
G4double f = 0.0;
|
||||
|
||||
@@ -296,13 +296,13 @@ G4double G4eBremsstrahlungSpectrum::Function(G4double x,
|
||||
void G4eBremsstrahlungSpectrum::PrintData() const
|
||||
{ theBRparam->PrintData(); }
|
||||
|
||||
G4double G4eBremsstrahlungSpectrum::Excitation(G4int Z, G4double kineticEnergy) const
|
||||
G4double G4eBremsstrahlungSpectrum::Excitation(G4int , G4double ) const
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
G4double G4eBremsstrahlungSpectrum::MaxEnergyOfSecondaries(G4double kineticEnergy,
|
||||
G4int Z,
|
||||
G4int, // Z,
|
||||
const G4ParticleDefinition*) const
|
||||
{
|
||||
return kineticEnergy;
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4eIonisationCrossSectionHandler.cc,v 1.9 2003/01/22 18:47:29 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4eIonisationCrossSectionHandler.cc,v 1.10 2003/06/16 17:00:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -71,12 +71,12 @@ G4eIonisationCrossSectionHandler::~G4eIonisationCrossSectionHandler()
|
||||
}
|
||||
|
||||
|
||||
G4std::vector<G4VEMDataSet*>* G4eIonisationCrossSectionHandler::BuildCrossSectionsForMaterials(
|
||||
std::vector<G4VEMDataSet*>* G4eIonisationCrossSectionHandler::BuildCrossSectionsForMaterials(
|
||||
const G4DataVector& energyVector,
|
||||
const G4DataVector* energyCuts)
|
||||
{
|
||||
G4int verbose = 0;
|
||||
G4std::vector<G4VEMDataSet*>* set = new G4std::vector<G4VEMDataSet*>;
|
||||
std::vector<G4VEMDataSet*>* set = new std::vector<G4VEMDataSet*>;
|
||||
|
||||
G4DataVector* energies;
|
||||
G4DataVector* cs;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4eIonisationParameters.cc,v 1.19 2002/05/30 17:53:09 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4eIonisationParameters.cc,v 1.20 2003/06/16 17:00:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
|
||||
//
|
||||
@@ -50,8 +50,8 @@
|
||||
#include "G4SemiLogInterpolation.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/strstream"
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
|
||||
G4eIonisationParameters:: G4eIonisationParameters(G4int minZ, G4int maxZ)
|
||||
@@ -65,7 +65,7 @@ G4eIonisationParameters:: G4eIonisationParameters(G4int minZ, G4int maxZ)
|
||||
G4eIonisationParameters::~G4eIonisationParameters()
|
||||
{
|
||||
// Reset the map of data sets: remove the data sets from the map
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::iterator pos;
|
||||
|
||||
for (pos = param.begin(); pos != param.end(); ++pos)
|
||||
{
|
||||
@@ -89,7 +89,7 @@ G4double G4eIonisationParameters::Parameter(G4int Z, G4int shellIndex,
|
||||
{
|
||||
G4double value = 0.;
|
||||
G4int id = Z*100 + parameterIndex;
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
|
||||
|
||||
pos = param.find(id);
|
||||
if (pos!= param.end()) {
|
||||
@@ -99,7 +99,7 @@ G4double G4eIonisationParameters::Parameter(G4int Z, G4int shellIndex,
|
||||
if(shellIndex < nShells) {
|
||||
const G4VEMDataSet* component = dataSet->GetComponent(shellIndex);
|
||||
const G4DataVector ener = component->GetEnergies(0);
|
||||
G4double ee = G4std::max(ener.front(),G4std::min(ener.back(),e));
|
||||
G4double ee = std::max(ener.front(),std::min(ener.back(),e));
|
||||
value = component->FindValue(ee);
|
||||
} else {
|
||||
G4cout << "WARNING: G4IonisationParameters::FindParameter "
|
||||
@@ -119,14 +119,14 @@ G4double G4eIonisationParameters::Parameter(G4int Z, G4int shellIndex,
|
||||
G4double G4eIonisationParameters::Excitation(G4int Z, G4double e) const
|
||||
{
|
||||
G4double value = 0.;
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
|
||||
|
||||
pos = excit.find(Z);
|
||||
if (pos!= excit.end()) {
|
||||
G4VEMDataSet* dataSet = (*pos).second;
|
||||
|
||||
const G4DataVector ener = dataSet->GetEnergies(0);
|
||||
G4double ee = G4std::max(ener.front(),G4std::min(ener.back(),e));
|
||||
G4double ee = std::max(ener.front(),std::min(ener.back(),e));
|
||||
value = dataSet->FindValue(ee);
|
||||
} else {
|
||||
G4cout << "WARNING: G4IonisationParameters::Excitation "
|
||||
@@ -186,12 +186,12 @@ void G4eIonisationParameters::LoadData()
|
||||
|
||||
G4int Z = (G4int)activeZ[i];
|
||||
char nameChar[100] = {""};
|
||||
G4std::ostrstream ost(nameChar, 100, G4std::ios::out);
|
||||
std::ostrstream ost(nameChar, 100, std::ios::out);
|
||||
ost << pathString << Z << ".dat";
|
||||
G4String name(nameChar);
|
||||
|
||||
G4std::ifstream file(name);
|
||||
G4std::filebuf* lsdp = file.rdbuf();
|
||||
std::ifstream file(name);
|
||||
std::filebuf* lsdp = file.rdbuf();
|
||||
|
||||
if (! (lsdp->is_open()) ) {
|
||||
G4String excep = G4String("G4IonisationParameters - data file: ")
|
||||
@@ -210,7 +210,7 @@ void G4eIonisationParameters::LoadData()
|
||||
// The shell terminates with the pattern: -1 -1
|
||||
// The file terminates with the pattern: -2 -2
|
||||
|
||||
G4std::vector<G4VEMDataSet*> p;
|
||||
std::vector<G4VEMDataSet*> p;
|
||||
for (size_t k=0; k<length; k++)
|
||||
{
|
||||
G4VDataSetAlgorithm* inter = new G4LinLogLogInterpolation();
|
||||
@@ -219,7 +219,7 @@ void G4eIonisationParameters::LoadData()
|
||||
}
|
||||
|
||||
G4int shell = 0;
|
||||
G4std::vector<G4DataVector*> a;
|
||||
std::vector<G4DataVector*> a;
|
||||
for (size_t j=0; j<length; j++)
|
||||
{
|
||||
G4DataVector* aa = new G4DataVector();
|
||||
@@ -279,12 +279,12 @@ void G4eIonisationParameters::LoadData()
|
||||
|
||||
G4String pathString_a(path);
|
||||
G4String name_a = pathString_a + G4String("/ioni/ion-ex-av.dat");
|
||||
G4std::ifstream file_a(name_a);
|
||||
G4std::filebuf* lsdp_a = file_a.rdbuf();
|
||||
std::ifstream file_a(name_a);
|
||||
std::filebuf* lsdp_a = file_a.rdbuf();
|
||||
G4String pathString_b(path);
|
||||
G4String name_b = pathString_b + G4String("/ioni/ion-ex-sig.dat");
|
||||
G4std::ifstream file_b(name_b);
|
||||
G4std::filebuf* lsdp_b = file_b.rdbuf();
|
||||
std::ifstream file_b(name_b);
|
||||
std::filebuf* lsdp_b = file_b.rdbuf();
|
||||
|
||||
if (! (lsdp_a->is_open()) ) {
|
||||
G4String excep = G4String("G4eIonisationParameters: cannot open file ")
|
||||
@@ -368,7 +368,7 @@ void G4eIonisationParameters::PrintData() const
|
||||
G4cout << G4endl;
|
||||
|
||||
size_t nZ = activeZ.size();
|
||||
G4std::map<G4int,G4VEMDataSet*,G4std::less<G4int> >::const_iterator pos;
|
||||
std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
|
||||
|
||||
for (size_t i=0; i<nZ; i++) {
|
||||
G4int Z = (G4int)activeZ[i];
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4eIonisationSpectrum.cc,v 1.20 2002/07/19 17:32:50 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4eIonisationSpectrum.cc,v 1.22 2003/06/16 17:00:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -74,15 +74,15 @@ G4double G4eIonisationSpectrum::Probability(G4int Z,
|
||||
G4double tMax,
|
||||
G4double e,
|
||||
G4int shell,
|
||||
const G4ParticleDefinition* part) const
|
||||
const G4ParticleDefinition* ) const
|
||||
{
|
||||
// Please comment what Probability does and what are the three
|
||||
// functions mentioned below
|
||||
// Describe the algorithms used
|
||||
|
||||
G4double eMax = MaxEnergyOfSecondaries(e);
|
||||
G4double t0 = G4std::max(tMin, lowestE);
|
||||
G4double tm = G4std::min(tMax, eMax);
|
||||
G4double t0 = std::max(tMin, lowestE);
|
||||
G4double tm = std::min(tMax, eMax);
|
||||
if(t0 >= tm) return 0.0;
|
||||
|
||||
G4double bindingEnergy = (G4AtomicTransitionManager::Instance())->
|
||||
@@ -92,8 +92,8 @@ G4double G4eIonisationSpectrum::Probability(G4int Z,
|
||||
|
||||
G4double energy = e + bindingEnergy;
|
||||
|
||||
G4double x1 = G4std::min(0.5,(t0 + bindingEnergy)/energy);
|
||||
G4double x2 = G4std::min(0.5,(tm + bindingEnergy)/energy);
|
||||
G4double x1 = std::min(0.5,(t0 + bindingEnergy)/energy);
|
||||
G4double x2 = std::min(0.5,(tm + bindingEnergy)/energy);
|
||||
|
||||
if(verbose > 1 || (Z==4 && e>= 1.0 && e<= 0.0)) {
|
||||
G4cout << "G4eIonisationSpectrum::Probability: Z= " << Z
|
||||
@@ -160,15 +160,15 @@ G4double G4eIonisationSpectrum::AverageEnergy(G4int Z,
|
||||
G4double tMax,
|
||||
G4double e,
|
||||
G4int shell,
|
||||
const G4ParticleDefinition* part) const
|
||||
const G4ParticleDefinition* ) const
|
||||
{
|
||||
// Please comment what AverageEnergy does and what are the three
|
||||
// functions mentioned below
|
||||
// Describe the algorithms used
|
||||
|
||||
G4double eMax = MaxEnergyOfSecondaries(e);
|
||||
G4double t0 = G4std::max(tMin, lowestE);
|
||||
G4double tm = G4std::min(tMax, eMax);
|
||||
G4double t0 = std::max(tMin, lowestE);
|
||||
G4double tm = std::min(tMax, eMax);
|
||||
if(t0 >= tm) return 0.0;
|
||||
|
||||
G4double bindingEnergy = (G4AtomicTransitionManager::Instance())->
|
||||
@@ -178,8 +178,8 @@ G4double G4eIonisationSpectrum::AverageEnergy(G4int Z,
|
||||
|
||||
G4double energy = e + bindingEnergy;
|
||||
|
||||
G4double x1 = G4std::min(0.5,(t0 + bindingEnergy)/energy);
|
||||
G4double x2 = G4std::min(0.5,(tm + bindingEnergy)/energy);
|
||||
G4double x1 = std::min(0.5,(t0 + bindingEnergy)/energy);
|
||||
G4double x2 = std::min(0.5,(tm + bindingEnergy)/energy);
|
||||
|
||||
if(verbose > 1) {
|
||||
G4cout << "G4eIonisationSpectrum::AverageEnergy: Z= " << Z
|
||||
@@ -242,12 +242,12 @@ G4double G4eIonisationSpectrum::SampleEnergy(G4int Z,
|
||||
G4double tMax,
|
||||
G4double e,
|
||||
G4int shell,
|
||||
const G4ParticleDefinition* part) const
|
||||
const G4ParticleDefinition* ) const
|
||||
{
|
||||
// Please comment what SampleEnergy does
|
||||
G4double tDelta = 0.0;
|
||||
G4double t0 = G4std::max(tMin, lowestE);
|
||||
G4double tm = G4std::min(tMax, MaxEnergyOfSecondaries(e));
|
||||
G4double t0 = std::max(tMin, lowestE);
|
||||
G4double tm = std::min(tMax, MaxEnergyOfSecondaries(e));
|
||||
if(t0 > tm) return tDelta;
|
||||
|
||||
G4double bindingEnergy = (G4AtomicTransitionManager::Instance())->
|
||||
@@ -257,8 +257,8 @@ G4double G4eIonisationSpectrum::SampleEnergy(G4int Z,
|
||||
|
||||
G4double energy = e + bindingEnergy;
|
||||
|
||||
G4double x1 = G4std::min(0.5,(t0 + bindingEnergy)/energy);
|
||||
G4double x2 = G4std::min(0.5,(tm + bindingEnergy)/energy);
|
||||
G4double x1 = std::min(0.5,(t0 + bindingEnergy)/energy);
|
||||
G4double x2 = std::min(0.5,(tm + bindingEnergy)/energy);
|
||||
if(x1 >= x2) return tDelta;
|
||||
|
||||
if(verbose > 1) {
|
||||
@@ -287,11 +287,11 @@ G4double G4eIonisationSpectrum::SampleEnergy(G4int Z,
|
||||
p[iMax-1] = Function(p[3], p);
|
||||
|
||||
G4double aria1 = 0.0;
|
||||
G4double a1 = G4std::max(x1,p[1]);
|
||||
G4double a2 = G4std::min(x2,p[3]);
|
||||
G4double a1 = std::max(x1,p[1]);
|
||||
G4double a2 = std::min(x2,p[3]);
|
||||
if(a1 < a2) aria1 = IntSpectrum(a1, a2, p);
|
||||
G4double aria2 = 0.0;
|
||||
G4double a3 = G4std::max(x1,p[3]);
|
||||
G4double a3 = std::max(x1,p[3]);
|
||||
G4double a4 = x2;
|
||||
if(a3 < a4) aria2 = IntSpectrum(a3, a4, p);
|
||||
|
||||
@@ -349,7 +349,7 @@ G4double G4eIonisationSpectrum::SampleEnergy(G4int Z,
|
||||
|
||||
} else {
|
||||
|
||||
amaj = G4std::max(p[iMax-1], Function(0.5, p)) * factor;
|
||||
amaj = std::max(p[iMax-1], Function(0.5, p)) * factor;
|
||||
a1 = 1./a3;
|
||||
a2 = 1./a4;
|
||||
|
||||
@@ -460,7 +460,7 @@ G4double G4eIonisationSpectrum::IntSpectrum(G4double xMin,
|
||||
|
||||
// Integral over aria with parametrised formula
|
||||
|
||||
x1 = G4std::max(xMin, p[3]);
|
||||
x1 = std::max(xMin, p[3]);
|
||||
if(x1 >= xMax) return sum;
|
||||
x2 = xMax;
|
||||
|
||||
@@ -541,7 +541,7 @@ G4double G4eIonisationSpectrum::AverageValue(G4double xMin,
|
||||
|
||||
// Integral over aria with parametrised formula
|
||||
|
||||
x1 = G4std::max(xMin, p[3]);
|
||||
x1 = std::max(xMin, p[3]);
|
||||
if(x1 >= xMax) return sum;
|
||||
x2 = xMax;
|
||||
|
||||
@@ -563,6 +563,10 @@ void G4eIonisationSpectrum::PrintData() const
|
||||
theParam->PrintData();
|
||||
}
|
||||
|
||||
G4double G4eIonisationSpectrum::MaxEnergyOfSecondaries(G4double kineticEnergy,
|
||||
G4int, // Z = 0,
|
||||
const G4ParticleDefinition* ) const
|
||||
{ return 0.5 * kineticEnergy; };
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4eLowEnergyLoss.cc,v 1.30 2003/01/22 18:47:29 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4eLowEnergyLoss.cc,v 1.31 2003/06/16 17:00:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// -----------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -459,7 +459,7 @@ G4VParticleChange* G4eLowEnergyLoss::AlongStepDoIt( const G4Track& trackData,
|
||||
aParticleChange.SetEnergyChange(finalT);
|
||||
|
||||
// Deexcitation of ionised atoms
|
||||
G4std::vector<G4DynamicParticle*>* deexcitationProducts = 0;
|
||||
std::vector<G4DynamicParticle*>* deexcitationProducts = 0;
|
||||
if (theFluo) deexcitationProducts = DeexciteAtom(couple,E,edep);
|
||||
|
||||
size_t nSecondaries = 0;
|
||||
|
||||
@@ -85,7 +85,7 @@ G4double G4hBetheBlochModel::TheValue(const G4DynamicParticle* particle,
|
||||
|
||||
G4double G4hBetheBlochModel::TheValue(const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy)
|
||||
G4double kineticEnergy)
|
||||
{
|
||||
G4double particleMass = aParticle->GetPDGMass() ;
|
||||
G4double eloss = BetheBlochFormula(material,kineticEnergy,particleMass) ;
|
||||
@@ -96,8 +96,8 @@ G4double G4hBetheBlochModel::TheValue(const G4ParticleDefinition* aParticle,
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hBetheBlochModel::HighEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
const G4ParticleDefinition* ,
|
||||
const G4Material* ) const
|
||||
{
|
||||
return highEnergyLimit ;
|
||||
}
|
||||
@@ -116,7 +116,7 @@ G4double G4hBetheBlochModel::LowEnergyLimit(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hBetheBlochModel::HighEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle) const
|
||||
const G4ParticleDefinition* ) const
|
||||
{
|
||||
return highEnergyLimit ;
|
||||
}
|
||||
@@ -124,23 +124,23 @@ G4double G4hBetheBlochModel::HighEnergyLimit(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hBetheBlochModel::LowEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle) const
|
||||
const G4ParticleDefinition* ) const
|
||||
{
|
||||
return lowEnergyLimit ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4hBetheBlochModel::IsInCharge(const G4DynamicParticle* particle,
|
||||
const G4Material* material) const
|
||||
G4bool G4hBetheBlochModel::IsInCharge(const G4DynamicParticle* ,
|
||||
const G4Material* ) const
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4hBetheBlochModel::IsInCharge(const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
G4bool G4hBetheBlochModel::IsInCharge(const G4ParticleDefinition* ,
|
||||
const G4Material* ) const
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ G4double G4hIonEffChargeSquare::TheValue(const G4DynamicParticle* particle,
|
||||
|
||||
G4double G4hIonEffChargeSquare::TheValue(const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy)
|
||||
G4double kineticEnergy)
|
||||
{
|
||||
// SetRateMass(aParticle) ;
|
||||
G4double particleMass = aParticle->GetPDGMass() ;
|
||||
@@ -100,8 +100,8 @@ G4double G4hIonEffChargeSquare::TheValue(const G4ParticleDefinition* aParticle,
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hIonEffChargeSquare::HighEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
const G4ParticleDefinition* ,
|
||||
const G4Material* ) const
|
||||
{
|
||||
return 1.0*TeV ;
|
||||
}
|
||||
@@ -109,8 +109,8 @@ G4double G4hIonEffChargeSquare::HighEnergyLimit(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hIonEffChargeSquare::LowEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
const G4ParticleDefinition* ,
|
||||
const G4Material* ) const
|
||||
{
|
||||
return 0.0 ;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ G4double G4hIonEffChargeSquare::LowEnergyLimit(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hIonEffChargeSquare::HighEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle) const
|
||||
const G4ParticleDefinition* ) const
|
||||
{
|
||||
return 1.0*TeV ;
|
||||
}
|
||||
@@ -126,23 +126,23 @@ G4double G4hIonEffChargeSquare::HighEnergyLimit(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hIonEffChargeSquare::LowEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle) const
|
||||
const G4ParticleDefinition* ) const
|
||||
{
|
||||
return 0.0 ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4hIonEffChargeSquare::IsInCharge(const G4DynamicParticle* particle,
|
||||
const G4Material* material) const
|
||||
G4bool G4hIonEffChargeSquare::IsInCharge(const G4DynamicParticle* ,
|
||||
const G4Material* ) const
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4hIonEffChargeSquare::IsInCharge(const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
G4bool G4hIonEffChargeSquare::IsInCharge(const G4ParticleDefinition* ,
|
||||
const G4Material* ) const
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
@@ -150,10 +150,10 @@ G4bool G4hIonEffChargeSquare::IsInCharge(const G4ParticleDefinition* aParticle,
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hIonEffChargeSquare::IonEffChargeSquare(
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy,
|
||||
G4double particleMass,
|
||||
G4double ionCharge) const
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy,
|
||||
G4double particleMass,
|
||||
G4double ionCharge) const
|
||||
{
|
||||
// The aproximation of ion effective charge from:
|
||||
// J.F.Ziegler, J.P. Biersack, U. Littmark
|
||||
@@ -232,7 +232,7 @@ G4double G4hIonEffChargeSquare::IonEffChargeSquare(
|
||||
// Helium ion case
|
||||
if( ionCharge < 2.5 ) {
|
||||
|
||||
G4double e = log(G4std::max(1.0, kineticEnergy / (keV*theHeMassAMU) )) ;
|
||||
G4double e = log(std::max(1.0, kineticEnergy / (keV*theHeMassAMU) )) ;
|
||||
G4double x = c[0] ;
|
||||
G4double y = 1.0 ;
|
||||
for (G4int i=1; i<6; i++) {
|
||||
@@ -265,7 +265,7 @@ G4double G4hIonEffChargeSquare::IonEffChargeSquare(
|
||||
0.38157*y - 0.008983*y*y ) ;
|
||||
if( q < 0.0 ) q = 0.0 ;
|
||||
|
||||
G4double s = 7.6 - log(G4std::max(1.0, reducedEnergy/keV)) ;
|
||||
G4double s = 7.6 - log(std::max(1.0, reducedEnergy/keV)) ;
|
||||
s = 1.0 + ( 0.18 + 0.0015 * z ) * exp( -s*s )/ (ionCharge*ionCharge) ;
|
||||
|
||||
// Screen length according to
|
||||
|
||||
@@ -292,13 +292,13 @@ void G4hLowEnergyIonisation::BuildPhysicsTable(
|
||||
|
||||
G4double excEnergy = material->GetIonisation()->GetMeanExcitationEnergy();
|
||||
|
||||
tCut = G4std::max(tCut,excEnergy);
|
||||
tCut = std::max(tCut,excEnergy);
|
||||
cutForDelta.push_back(tCut);
|
||||
|
||||
// the cut cannot be below lowest limit
|
||||
tCut = (*(theCoupleTable->GetEnergyCutsVector(0)))[j];
|
||||
if(tCut > HighestKineticEnergy) tCut = HighestKineticEnergy;
|
||||
tCut = G4std::max(tCut,minGammaEnergy);
|
||||
tCut = std::max(tCut,minGammaEnergy);
|
||||
cutForGamma.push_back(tCut);
|
||||
}
|
||||
|
||||
@@ -538,7 +538,7 @@ void G4hLowEnergyIonisation::BuildDataForFluorescence(
|
||||
G4double cross = 0.;
|
||||
G4double cross1 = 0.;
|
||||
G4double eAverage= 0.;
|
||||
G4double tmin = G4std::min(tCut,tmax);
|
||||
G4double tmin = std::min(tCut,tmax);
|
||||
G4double rel;
|
||||
|
||||
for (G4int n=0; n<nShells; n++) {
|
||||
@@ -726,8 +726,8 @@ G4double G4hLowEnergyIonisation::ComputeMicroscopicCrossSection(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hLowEnergyIonisation::GetMeanFreePath(const G4Track& trackData,
|
||||
G4double previousStepSize,
|
||||
enum G4ForceCondition* condition)
|
||||
G4double, // previousStepSize
|
||||
enum G4ForceCondition* condition)
|
||||
{
|
||||
const G4DynamicParticle* aParticle = trackData.GetDynamicParticle();
|
||||
const G4MaterialCutsCouple* couple = trackData.GetMaterialCutsCouple();
|
||||
@@ -818,7 +818,7 @@ G4double G4hLowEnergyIonisation::GetConstraints(
|
||||
dx /= (chargeSquare*massRatio) ;
|
||||
|
||||
stepLimit = fRangeNow ;
|
||||
G4double r = G4std::min(finalRange, couple->GetProductionCuts()
|
||||
G4double r = std::min(finalRange, couple->GetProductionCuts()
|
||||
->GetProductionCut(idxG4ElectronCut));
|
||||
|
||||
if (fRangeNow > r) {
|
||||
@@ -946,10 +946,10 @@ G4VParticleChange* G4hLowEnergyIonisation::AlongStepDoIt(
|
||||
G4double edep = kineticEnergy-finalT;
|
||||
|
||||
// Deexcitation only of ionised atoms
|
||||
eloss = G4std::min(edep, eloss);
|
||||
eloss = std::min(edep, eloss);
|
||||
|
||||
G4double hMass = particle->GetMass();
|
||||
G4std::vector<G4DynamicParticle*>* newpart = 0;
|
||||
std::vector<G4DynamicParticle*>* newpart = 0;
|
||||
G4DynamicParticle* part = 0;
|
||||
|
||||
if(theFluo) newpart = DeexciteAtom(couple, kineticEnergy, hMass, eloss);
|
||||
@@ -1112,7 +1112,7 @@ G4double G4hLowEnergyIonisation::DeltaRaysEnergy(
|
||||
tmax = 2.*electron_mass_c2*bg2/(1.0+2.0*gamma*rateMass+rateMass*rateMass) ;
|
||||
|
||||
// Validity range for delta electron cross section
|
||||
G4double deltaCut = G4std::max(deltaCutNow, eexc);
|
||||
G4double deltaCut = std::max(deltaCutNow, eexc);
|
||||
|
||||
if ( deltaCut < tmax) {
|
||||
x = deltaCut / tmax ;
|
||||
@@ -1223,7 +1223,7 @@ G4VParticleChange* G4hLowEnergyIonisation::PostStepDoIt(
|
||||
// Generation of Fluorescence and Auger
|
||||
size_t nSecondaries = 0;
|
||||
size_t totalNumber = 1;
|
||||
G4std::vector<G4DynamicParticle*>* secondaryVector = 0;
|
||||
std::vector<G4DynamicParticle*>* secondaryVector = 0;
|
||||
G4DynamicParticle* aSecondary = 0;
|
||||
G4ParticleDefinition* type = 0;
|
||||
|
||||
@@ -1338,7 +1338,7 @@ G4VParticleChange* G4hLowEnergyIonisation::PostStepDoIt(
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4std::vector<G4DynamicParticle*>*
|
||||
std::vector<G4DynamicParticle*>*
|
||||
G4hLowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple,
|
||||
G4double incidentEnergy,
|
||||
G4double hMass,
|
||||
@@ -1361,7 +1361,7 @@ G4hLowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple,
|
||||
G4double beta2 = 1.0 - 1.0/(gamma*gamma);
|
||||
G4double r = electron_mass_c2/hMass;
|
||||
G4double tmax = 2.*electron_mass_c2*(gamma*gamma - 1.)/(1. + 2.*gamma*r + r*r);
|
||||
G4double tcut = G4std::min(tmax,cutForDelta[index]);
|
||||
G4double tcut = std::min(tmax,cutForDelta[index]);
|
||||
const G4AtomicTransitionManager* transitionManager =
|
||||
G4AtomicTransitionManager::Instance();
|
||||
|
||||
@@ -1384,9 +1384,9 @@ G4hLowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple,
|
||||
|
||||
// create vector of tracks of secondary particles
|
||||
|
||||
G4std::vector<G4DynamicParticle*>* partVector =
|
||||
new G4std::vector<G4DynamicParticle*>;
|
||||
G4std::vector<G4DynamicParticle*>* secVector = 0;
|
||||
std::vector<G4DynamicParticle*>* partVector =
|
||||
new std::vector<G4DynamicParticle*>;
|
||||
std::vector<G4DynamicParticle*>* secVector = 0;
|
||||
G4DynamicParticle* aSecondary = 0;
|
||||
G4ParticleDefinition* type = 0;
|
||||
G4double e, tkin, grej;
|
||||
@@ -1396,7 +1396,7 @@ G4hLowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple,
|
||||
// sample secondaries
|
||||
|
||||
G4double etot = 0.0;
|
||||
G4std::vector<G4int> n = shellVacancy->GenerateNumberOfIonisations(couple,
|
||||
std::vector<G4int> n = shellVacancy->GenerateNumberOfIonisations(couple,
|
||||
incidentEnergy, eLoss);
|
||||
|
||||
for (size_t i=0; i<nElements; i++) {
|
||||
@@ -1476,7 +1476,7 @@ G4int G4hLowEnergyIonisation::SelectRandomAtom(const G4MaterialCutsCouple* coupl
|
||||
}
|
||||
|
||||
const G4ElementVector* theElementVector = material->GetElementVector();
|
||||
G4std::vector<G4double> p;
|
||||
std::vector<G4double> p;
|
||||
G4int index = couple->GetIndex();
|
||||
|
||||
G4double norm = 0.0;
|
||||
@@ -1723,7 +1723,7 @@ G4double G4hLowEnergyIonisation::ElectronicLossFluctuation(
|
||||
if(meanLoss < minLoss) return meanLoss ;
|
||||
|
||||
// Validity range for delta electron cross section
|
||||
G4double threshold = G4std::max(deltaCutInKineticEnergyNow,ipotFluct);
|
||||
G4double threshold = std::max(deltaCutInKineticEnergyNow,ipotFluct);
|
||||
G4double loss, siga;
|
||||
|
||||
G4double rmass = electron_mass_c2/particleMass;
|
||||
@@ -1809,7 +1809,7 @@ G4double G4hLowEnergyIonisation::ElectronicLossFluctuation(
|
||||
if(a3>alim)
|
||||
{
|
||||
siga=sqrt(a3) ;
|
||||
p3 = G4std::max(0,G4int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
p3 = std::max(0,G4int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p3 = G4Poisson(a3);
|
||||
@@ -1828,7 +1828,7 @@ G4double G4hLowEnergyIonisation::ElectronicLossFluctuation(
|
||||
if(a3>alim)
|
||||
{
|
||||
siga=sqrt(a3) ;
|
||||
p3 = G4std::max(0,int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
p3 = std::max(0,int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p3 = G4Poisson(a3);
|
||||
@@ -1857,7 +1857,7 @@ G4double G4hLowEnergyIonisation::ElectronicLossFluctuation(
|
||||
if(a1>alim)
|
||||
{
|
||||
siga=sqrt(a1) ;
|
||||
p1 = G4std::max(0,G4int(G4RandGauss::shoot(a1,siga)+0.5));
|
||||
p1 = std::max(0,G4int(G4RandGauss::shoot(a1,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p1 = G4Poisson(a1);
|
||||
@@ -1866,7 +1866,7 @@ G4double G4hLowEnergyIonisation::ElectronicLossFluctuation(
|
||||
if(a2>alim)
|
||||
{
|
||||
siga=sqrt(a2) ;
|
||||
p2 = G4std::max(0,G4int(G4RandGauss::shoot(a2,siga)+0.5));
|
||||
p2 = std::max(0,G4int(G4RandGauss::shoot(a2,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p2 = G4Poisson(a2);
|
||||
@@ -1885,7 +1885,7 @@ G4double G4hLowEnergyIonisation::ElectronicLossFluctuation(
|
||||
if(a3>alim)
|
||||
{
|
||||
siga=sqrt(a3) ;
|
||||
p3 = G4std::max(0,G4int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
p3 = std::max(0,G4int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p3 = G4Poisson(a3);
|
||||
@@ -2001,8 +2001,8 @@ void G4hLowEnergyIonisation::PrintInfoDefinition() const
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
G4cout << G4std::setw(20) << material->GetName()
|
||||
<< G4std::setw(15) << eexc/keV << G4endl;
|
||||
G4cout << std::setw(20) << material->GetName()
|
||||
<< std::setw(15) << eexc/keV << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4hLowEnergyLoss.cc,v 1.19 2003/01/23 11:39:07 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4hLowEnergyLoss.cc,v 1.20 2003/05/20 20:16:14 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// -----------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -740,7 +740,7 @@ G4double G4hLowEnergyLoss::ProperTimeIntLog(G4PhysicsVector* physicsVector,
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4hLowEnergyLoss::BuildRangeCoeffATable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
const G4ParticleDefinition& )
|
||||
// Build tables of coefficients for the energy loss calculation
|
||||
// create table for coefficients "A"
|
||||
{
|
||||
@@ -812,7 +812,7 @@ void G4hLowEnergyLoss::BuildRangeCoeffATable(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4hLowEnergyLoss::BuildRangeCoeffBTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
const G4ParticleDefinition& )
|
||||
// Build tables of coefficients for the energy loss calculation
|
||||
// create table for coefficients "B"
|
||||
{
|
||||
@@ -883,7 +883,7 @@ void G4hLowEnergyLoss::BuildRangeCoeffBTable(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4hLowEnergyLoss::BuildRangeCoeffCTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
const G4ParticleDefinition& )
|
||||
// Build tables of coefficients for the energy loss calculation
|
||||
// create table for coefficients "C"
|
||||
{
|
||||
|
||||
@@ -139,8 +139,8 @@ G4hParametrisedLossModel::~G4hParametrisedLossModel()
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::TheValue(
|
||||
const G4DynamicParticle* particle,
|
||||
const G4Material* material)
|
||||
const G4DynamicParticle* particle,
|
||||
const G4Material* material)
|
||||
{
|
||||
G4double scaledEnergy = (particle->GetKineticEnergy())
|
||||
* proton_mass_c2/(particle->GetMass());
|
||||
@@ -153,9 +153,9 @@ G4double G4hParametrisedLossModel::TheValue(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::TheValue(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy)
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy)
|
||||
{
|
||||
G4double scaledEnergy = kineticEnergy
|
||||
* proton_mass_c2/(aParticle->GetPDGMass());
|
||||
@@ -171,8 +171,8 @@ G4double G4hParametrisedLossModel::TheValue(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::LowEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
const G4ParticleDefinition* ,
|
||||
const G4Material*) const
|
||||
{
|
||||
return lowEnergyLimit;
|
||||
}
|
||||
@@ -180,15 +180,15 @@ G4double G4hParametrisedLossModel::LowEnergyLimit(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::HighEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
const G4ParticleDefinition* ,
|
||||
const G4Material*) const
|
||||
{
|
||||
return highEnergyLimit;
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::LowEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle) const
|
||||
const G4ParticleDefinition* ) const
|
||||
{
|
||||
return lowEnergyLimit;
|
||||
}
|
||||
@@ -196,7 +196,7 @@ G4double G4hParametrisedLossModel::LowEnergyLimit(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::HighEnergyLimit(
|
||||
const G4ParticleDefinition* aParticle) const
|
||||
const G4ParticleDefinition* ) const
|
||||
{
|
||||
return highEnergyLimit;
|
||||
}
|
||||
@@ -204,8 +204,8 @@ G4double G4hParametrisedLossModel::HighEnergyLimit(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4hParametrisedLossModel::IsInCharge(
|
||||
const G4DynamicParticle* particle,
|
||||
const G4Material* material) const
|
||||
const G4DynamicParticle* ,
|
||||
const G4Material*) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -213,8 +213,8 @@ G4bool G4hParametrisedLossModel::IsInCharge(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4hParametrisedLossModel::IsInCharge(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material) const
|
||||
const G4ParticleDefinition* ,
|
||||
const G4Material*) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -222,13 +222,13 @@ G4bool G4hParametrisedLossModel::IsInCharge(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::StoppingPower(
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy)
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy)
|
||||
{
|
||||
G4double eloss = 0.0;
|
||||
const G4int numberOfElements = material->GetNumberOfElements() ;
|
||||
const G4double* theAtomicNumDensityVector =
|
||||
material->GetAtomicNumDensityVector() ;
|
||||
material->GetAtomicNumDensityVector() ;
|
||||
|
||||
// pure material
|
||||
if(1 == numberOfElements) {
|
||||
|
||||
@@ -51,7 +51,7 @@ G4hShellCrossSection::~G4hShellCrossSection()
|
||||
{ }
|
||||
|
||||
|
||||
G4std::vector<G4double> G4hShellCrossSection::Probabilities(
|
||||
std::vector<G4double> G4hShellCrossSection::Probabilities(
|
||||
G4int Z,
|
||||
G4double incidentEnergy,
|
||||
G4double hMass,
|
||||
@@ -71,7 +71,7 @@ G4std::vector<G4double> G4hShellCrossSection::Probabilities(
|
||||
size_t nShells = transitionManager->NumberOfShells(Z);
|
||||
|
||||
// Vector that stores the calculated cross-sections for each shell:
|
||||
G4std::vector<G4double> crossSections;
|
||||
std::vector<G4double> crossSections;
|
||||
|
||||
// Partial and total cross-section used for normalization of crossSections:
|
||||
G4double totalCrossSection = 0.;
|
||||
|
||||
Reference in New Issue
Block a user