Import Geant4 10.4.0 source tree
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4LossTableManager.cc 99151 2016-09-07 08:03:17Z gcosmo $
|
||||
// $Id: G4LossTableManager.cc 107364 2017-11-09 10:53:25Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -105,6 +105,13 @@
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4Threading.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4OpticalPhoton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
G4ThreadLocal G4LossTableManager* G4LossTableManager::instance = nullptr;
|
||||
@@ -191,6 +198,7 @@ G4LossTableManager::G4LossTableManager()
|
||||
emElectronIonPair = nullptr;
|
||||
atomDeexcitation = nullptr;
|
||||
subcutProducer = nullptr;
|
||||
gammaShark = nullptr;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
@@ -1023,3 +1031,98 @@ void G4LossTableManager::PrintEWarning(G4String tit, G4double /*val*/)
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4LossTableManager::DumpHtml()
|
||||
{
|
||||
// Automatic generation of html documentation page for physics lists
|
||||
// List processes and models for the most important
|
||||
// particles in descending order of importance
|
||||
|
||||
char* dirName = getenv("G4PhysListDocDir");
|
||||
char* physListName = getenv("G4PhysListName");
|
||||
if (dirName && physListName) {
|
||||
G4String pathName = G4String(dirName) + "/" + G4String(physListName)
|
||||
+ ".html";
|
||||
|
||||
std::ofstream outFile;
|
||||
outFile.open(pathName);
|
||||
|
||||
outFile << "<html>\n";
|
||||
outFile << "<head>\n";
|
||||
outFile << "<title>Physics List Summary</title>\n";
|
||||
outFile << "</head>\n";
|
||||
outFile << "<body>\n";
|
||||
outFile << "<h2> Summary of Electromagnetic Processes, Models and Cross "
|
||||
<< "Sections for Physics List "
|
||||
<< G4String(physListName) << "</h2>\n";
|
||||
outFile << "<ul>\n";
|
||||
|
||||
std::vector<G4ParticleDefinition*> particles {
|
||||
G4Gamma::Gamma(),
|
||||
G4Electron::Electron(),
|
||||
G4Positron::Positron(),
|
||||
G4Proton::ProtonDefinition(),
|
||||
G4MuonPlus::MuonPlusDefinition(),
|
||||
G4MuonMinus::MuonMinusDefinition(),
|
||||
};
|
||||
|
||||
std::vector<G4VEmProcess*> emproc_vector = GetEmProcessVector();
|
||||
std::vector<G4VEnergyLossProcess*> enloss_vector =
|
||||
GetEnergyLossProcessVector();
|
||||
std::vector<G4VMultipleScattering*> mscat_vector =
|
||||
GetMultipleScatteringVector();
|
||||
|
||||
for (auto theParticle : particles) {
|
||||
outFile << "<li><h3>" << theParticle->GetParticleName() << "</h3><ul>\n";
|
||||
|
||||
G4ProcessManager* pm = theParticle->GetProcessManager();
|
||||
G4ProcessVector* pv = pm->GetProcessList();
|
||||
G4int plen = pm->GetProcessListLength();
|
||||
|
||||
for (auto emproc : emproc_vector) {
|
||||
for (G4int i = 0; i < plen; ++i) {
|
||||
G4VProcess* proc = (*pv)[i];
|
||||
if (proc == emproc) {
|
||||
outFile << "<li>\n";
|
||||
proc->ProcessDescription(outFile);
|
||||
outFile << "</li>\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (auto mscproc : mscat_vector) {
|
||||
for (G4int i = 0; i < plen; ++i) {
|
||||
G4VProcess* proc = (*pv)[i];
|
||||
if (proc == mscproc) {
|
||||
outFile << "<li>\n";
|
||||
proc->ProcessDescription(outFile);
|
||||
outFile << "</li>\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (auto enlossproc : enloss_vector) {
|
||||
for (G4int i = 0; i < plen; ++i) {
|
||||
G4VProcess* proc = (*pv)[i];
|
||||
if (proc == enlossproc) {
|
||||
outFile << "<li>\n";
|
||||
proc->ProcessDescription(outFile);
|
||||
outFile << "</li>\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
outFile << "</ul>\n";
|
||||
outFile << "</li>\n";
|
||||
}
|
||||
outFile << "</ul>\n";
|
||||
outFile << "</body>\n";
|
||||
outFile << "</html>\n";
|
||||
outFile.close();
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
|
||||
Reference in New Issue
Block a user