Import Geant4 11.2.0.beta source tree
This commit is contained in:
@@ -43,23 +43,14 @@
|
||||
#include "G4Tokenizer.hh"
|
||||
#include <iomanip>
|
||||
|
||||
G4HtmlPPReporter::G4HtmlPPReporter():G4VParticlePropertyReporter()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
G4HtmlPPReporter::~G4HtmlPPReporter()
|
||||
{
|
||||
}
|
||||
|
||||
void G4HtmlPPReporter::Print(const G4String& option)
|
||||
{
|
||||
SparseOption( option );
|
||||
|
||||
GenerateIndex();
|
||||
|
||||
for (size_t i=0; i< pList.size(); i++){
|
||||
G4ParticleDefinition* particle = G4ParticleTable::GetParticleTable()->FindParticle( pList[i]->GetParticleName() );
|
||||
for (const auto & i : pList){
|
||||
G4ParticleDefinition* particle = G4ParticleTable::GetParticleTable()->FindParticle( i->GetParticleName() );
|
||||
GeneratePropertyTable(particle);
|
||||
}
|
||||
}
|
||||
@@ -116,14 +107,14 @@ void G4HtmlPPReporter::SparseOption(const G4String& option)
|
||||
outFile << sTD << " " << eTD;
|
||||
outFile << eTR << G4endl;;
|
||||
|
||||
for (size_t i=0; i< pList.size(); i++){
|
||||
if (pList[i]->GetPDGEncoding()<0) continue;
|
||||
for (const auto & i : pList){
|
||||
if (i->GetPDGEncoding()<0) continue;
|
||||
|
||||
outFile << sTR << G4endl;;
|
||||
// column 1 : endcoding
|
||||
outFile << sTD << pList[i]->GetPDGEncoding() << eTD << G4endl;;
|
||||
outFile << sTD << i->GetPDGEncoding() << eTD << G4endl;;
|
||||
// column 2 : name
|
||||
G4String name = pList[i]->GetParticleName();
|
||||
G4String name = i->GetParticleName();
|
||||
|
||||
G4String fname = name +".html";
|
||||
// exception
|
||||
@@ -134,18 +125,18 @@ void G4HtmlPPReporter::SparseOption(const G4String& option)
|
||||
outFile << name << "</A>" << eTD << G4endl;
|
||||
|
||||
// column 3 mass
|
||||
outFile << sTD << pList[i]->GetPDGMass()/GeV << eTD << G4endl;
|
||||
outFile << sTD << i->GetPDGMass()/GeV << eTD << G4endl;
|
||||
|
||||
// column 4 charge
|
||||
outFile << sTD << pList[i]->GetPDGCharge()/eplus << eTD << G4endl;
|
||||
outFile << sTD << i->GetPDGCharge()/eplus << eTD << G4endl;
|
||||
|
||||
// column 5 life time
|
||||
outFile << sTD << pList[i]->GetPDGLifeTime()/ns << eTD << G4endl;
|
||||
outFile << sTD << i->GetPDGLifeTime()/ns << eTD << G4endl;
|
||||
|
||||
// column 6 AntiParticle
|
||||
if ( (pList[i]->GetAntiPDGEncoding()!= 0) &&
|
||||
(pList[i]->GetAntiPDGEncoding() != pList[i]->GetPDGEncoding() ) ) {
|
||||
G4ParticleDefinition* anti_particle = G4ParticleTable::GetParticleTable()->FindParticle( pList[i]->GetAntiPDGEncoding() );
|
||||
if ( (i->GetAntiPDGEncoding()!= 0) &&
|
||||
(i->GetAntiPDGEncoding() != i->GetPDGEncoding() ) ) {
|
||||
G4ParticleDefinition* anti_particle = G4ParticleTable::GetParticleTable()->FindParticle( i->GetAntiPDGEncoding() );
|
||||
|
||||
outFile << sTD << anti_particle->GetParticleName() << eTD << G4endl;;
|
||||
}
|
||||
@@ -300,7 +291,7 @@ void G4HtmlPPReporter::SparseOption(const G4String& option)
|
||||
|
||||
// Decay Table
|
||||
G4DecayTable* dcyTable = particle->GetDecayTable();
|
||||
if (dcyTable != 0) {
|
||||
if (dcyTable != nullptr) {
|
||||
outFile << "<H2>" << " Decay Table " << "</H2>" << G4endl;
|
||||
|
||||
outFile << sTABLE << '"' << "80%" << '"' << " > " << G4endl;
|
||||
|
||||
@@ -56,7 +56,7 @@ const G4double G4IsotopeMagneticMomentTable::nuclearMagneton = eplus*hbar_Planck
|
||||
G4IsotopeMagneticMomentTable::G4IsotopeMagneticMomentTable()
|
||||
:G4VIsotopeTable("MagneticMoment")
|
||||
{
|
||||
if ( !std::getenv("G4IONMAGNETICMOMENT")) {
|
||||
if ( std::getenv("G4IONMAGNETICMOMENT") == nullptr) {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>1) {
|
||||
G4cout << "G4IsotopeMagneticMomentTable::G4IsotopeMagneticMomentTable(): "
|
||||
@@ -108,7 +108,7 @@ G4IsotopeMagneticMomentTable::G4IsotopeMagneticMomentTable()
|
||||
>> ionLife >> ionLifeUnit
|
||||
>> ionJ >> ionMu;
|
||||
|
||||
G4IsotopeProperty* fProperty = new G4IsotopeProperty();
|
||||
auto fProperty = new G4IsotopeProperty();
|
||||
// Set Isotope Property
|
||||
fProperty->SetAtomicNumber(ionZ);
|
||||
fProperty->SetAtomicMass(ionA);
|
||||
@@ -132,8 +132,8 @@ G4IsotopeMagneticMomentTable::G4IsotopeMagneticMomentTable()
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
G4IsotopeMagneticMomentTable::~G4IsotopeMagneticMomentTable()
|
||||
{
|
||||
for (size_t i = 0 ; i< fIsotopeList.size(); i++) {
|
||||
delete fIsotopeList[i];
|
||||
for (const auto & i : fIsotopeList) {
|
||||
delete i;
|
||||
}
|
||||
fIsotopeList.clear();
|
||||
}
|
||||
@@ -154,9 +154,7 @@ G4IsotopeMagneticMomentTable & G4IsotopeMagneticMomentTable::operator= (const G
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
G4bool G4IsotopeMagneticMomentTable::FindIsotope(G4IsotopeProperty* pP)
|
||||
{
|
||||
for (size_t i = 0 ; i< fIsotopeList.size(); ++i) {
|
||||
G4IsotopeProperty* fP = fIsotopeList[i];
|
||||
|
||||
for (const auto fP : fIsotopeList) {
|
||||
// check Z
|
||||
if ( fP->GetAtomicNumber() > pP->GetAtomicNumber()) {
|
||||
// Not Found
|
||||
@@ -194,11 +192,9 @@ G4IsotopeProperty*
|
||||
G4IsotopeMagneticMomentTable::GetIsotope(G4int Z, G4int A, G4double E,
|
||||
G4Ions::G4FloatLevelBase /*flb*/)
|
||||
{
|
||||
G4IsotopeProperty* fProperty = 0;
|
||||
for (size_t i = 0 ; i< fIsotopeList.size(); ++i) {
|
||||
G4IsotopeProperty* fP = fIsotopeList[i];
|
||||
|
||||
// check Z
|
||||
G4IsotopeProperty* fProperty = nullptr;
|
||||
for (const auto fP : fIsotopeList) {
|
||||
// check Z
|
||||
if ( fP->GetAtomicNumber() > Z) {
|
||||
// Not Found
|
||||
break;
|
||||
@@ -232,11 +228,9 @@ G4IsotopeProperty*
|
||||
G4IsotopeProperty*
|
||||
G4IsotopeMagneticMomentTable::GetIsotopeByIsoLvl(G4int Z, G4int A, G4int lvl)
|
||||
{
|
||||
G4IsotopeProperty* fProperty = 0;
|
||||
for (size_t i = 0 ; i< fIsotopeList.size(); ++i) {
|
||||
G4IsotopeProperty* fP = fIsotopeList[i];
|
||||
|
||||
// check Z
|
||||
G4IsotopeProperty* fProperty = nullptr;
|
||||
for (const auto fP : fIsotopeList) {
|
||||
// check Z
|
||||
if ( fP->GetAtomicNumber() > Z) {
|
||||
// Not Found
|
||||
break;
|
||||
|
||||
@@ -36,21 +36,10 @@
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
//////////////////////////////
|
||||
G4SimplePPReporter::G4SimplePPReporter():G4VParticlePropertyReporter()
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
G4SimplePPReporter::~G4SimplePPReporter()
|
||||
{
|
||||
}
|
||||
|
||||
/////////////////////
|
||||
void G4SimplePPReporter::Print(const G4String& )
|
||||
{
|
||||
for (size_t i=0; i<pList.size(); i++){
|
||||
G4ParticlePropertyData* ptr = (pList)[i];
|
||||
for (const auto ptr : pList){
|
||||
ptr->Print();
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
@@ -44,23 +44,13 @@
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
|
||||
//////////////////////////////
|
||||
G4TextPPReporter::G4TextPPReporter():G4VParticlePropertyReporter()
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
G4TextPPReporter::~G4TextPPReporter()
|
||||
{
|
||||
}
|
||||
|
||||
/////////////////////
|
||||
void G4TextPPReporter::Print(const G4String& option)
|
||||
{
|
||||
SparseOption( option );
|
||||
|
||||
for (size_t i=0; i< pList.size(); i++){
|
||||
G4ParticleDefinition* particle = G4ParticleTable::GetParticleTable()->FindParticle( pList[i]->GetParticleName() );
|
||||
for (const auto & i : pList){
|
||||
G4ParticleDefinition* particle = G4ParticleTable::GetParticleTable()->FindParticle( i->GetParticleName() );
|
||||
|
||||
GeneratePropertyTable(particle);
|
||||
}
|
||||
@@ -115,7 +105,7 @@ void G4TextPPReporter::GeneratePropertyTable(const G4ParticleDefinition* partic
|
||||
|
||||
// Decay Table
|
||||
G4DecayTable* dcyTable = particle->GetDecayTable();
|
||||
if (dcyTable != 0) {
|
||||
if (dcyTable != nullptr) {
|
||||
for (G4int i=0; i< dcyTable->entries(); i++){
|
||||
G4VDecayChannel * channel = dcyTable->GetDecayChannel(i);
|
||||
// column 1 : BR
|
||||
|
||||
@@ -44,16 +44,6 @@
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
|
||||
//////////////////////////////
|
||||
G4TextPPRetriever::G4TextPPRetriever():G4VParticlePropertyRetriever()
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
G4TextPPRetriever::~G4TextPPRetriever()
|
||||
{
|
||||
}
|
||||
|
||||
/////////////////////
|
||||
void G4TextPPRetriever::Retrieve(const G4String& option)
|
||||
{
|
||||
@@ -147,7 +137,7 @@ G4bool G4TextPPRetriever::ModifyPropertyTable(const G4ParticleDefinition* parti
|
||||
|
||||
// Decay Table
|
||||
G4DecayTable* dcyTable = particle->GetDecayTable();
|
||||
if (dcyTable == 0) return true;
|
||||
if (dcyTable == nullptr) return true;
|
||||
|
||||
G4int idx =0;
|
||||
while (!inFile.eof() ) { // Loop checking, 09.08.2015, K.Kurashige
|
||||
|
||||
@@ -54,7 +54,7 @@ G4bool G4VParticlePropertyReporter::FillList(G4String name)
|
||||
{
|
||||
G4ParticlePropertyData* pData = pPropertyTable->GetParticleProperty(name);
|
||||
G4bool result = false;
|
||||
if (pData != 0) {
|
||||
if (pData != nullptr) {
|
||||
//the particle exists
|
||||
pList.push_back(pData);
|
||||
result = true;
|
||||
|
||||
Reference in New Issue
Block a user