Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -23,21 +23,15 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class implementatBoson file
|
||||
//
|
||||
// GEANT 4 class implementatBoson file
|
||||
|
||||
#include "G4BosonConstructor.hh"
|
||||
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
// Bosons
|
||||
#include "G4ChargedGeantino.hh"
|
||||
#include "G4Geantino.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Geantino.hh"
|
||||
#include "G4OpticalPhoton.hh"
|
||||
|
||||
void G4BosonConstructor::ConstructParticle()
|
||||
@@ -52,4 +46,3 @@ void G4BosonConstructor::ConstructParticle()
|
||||
// optical photon
|
||||
G4OpticalPhoton::OpticalPhotonDefinition();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
@@ -36,34 +33,32 @@
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
#include "G4ChargedGeantino.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4String.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
|
||||
// ######################################################################
|
||||
// ### ChargedGeantino ###
|
||||
// ######################################################################
|
||||
G4ChargedGeantino* G4ChargedGeantino::theInstance = nullptr;
|
||||
|
||||
G4ChargedGeantino* G4ChargedGeantino::Definition()
|
||||
G4ChargedGeantino* G4ChargedGeantino::Definition()
|
||||
{
|
||||
if (theInstance !=nullptr) return theInstance;
|
||||
if (theInstance != nullptr) return theInstance;
|
||||
|
||||
const G4String name = "chargedgeantino";
|
||||
// search in particle table
|
||||
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
|
||||
G4ParticleDefinition* anInstance = pTable->FindParticle(name);
|
||||
if (anInstance ==nullptr)
|
||||
{
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
if (anInstance == nullptr) {
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
// clang-format off
|
||||
anInstance = new G4ParticleDefinition(
|
||||
name, 0.0*MeV, 0.0*MeV, +1.*eplus,
|
||||
0, 0, 0,
|
||||
@@ -72,19 +67,18 @@ G4ChargedGeantino* G4ChargedGeantino::Definition()
|
||||
true, -1.0, nullptr,
|
||||
false, "geantino", 0
|
||||
);
|
||||
// clang-format on
|
||||
}
|
||||
theInstance = static_cast<G4ChargedGeantino*>(anInstance);
|
||||
return theInstance;
|
||||
}
|
||||
|
||||
|
||||
G4ChargedGeantino* G4ChargedGeantino::ChargedGeantinoDefinition()
|
||||
G4ChargedGeantino* G4ChargedGeantino::ChargedGeantinoDefinition()
|
||||
{
|
||||
return Definition();
|
||||
}
|
||||
|
||||
G4ChargedGeantino* G4ChargedGeantino::ChargedGeantino()
|
||||
G4ChargedGeantino* G4ChargedGeantino::ChargedGeantino()
|
||||
{
|
||||
return Definition();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
@@ -36,34 +33,32 @@
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
|
||||
// ######################################################################
|
||||
// ### GAMMA ###
|
||||
// ######################################################################
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4String.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
G4Gamma* G4Gamma::theInstance = nullptr;
|
||||
|
||||
|
||||
G4Gamma* G4Gamma::Definition()
|
||||
G4Gamma* G4Gamma::Definition()
|
||||
{
|
||||
if (theInstance !=nullptr) return theInstance;
|
||||
if (theInstance != nullptr) return theInstance;
|
||||
|
||||
const G4String name = "gamma";
|
||||
// search in particle table]
|
||||
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
|
||||
G4ParticleDefinition* anInstance = pTable->FindParticle(name);
|
||||
if (anInstance ==nullptr)
|
||||
{
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
if (anInstance == nullptr) {
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
// clang-format off
|
||||
anInstance = new G4ParticleDefinition(
|
||||
name, 0.0*MeV, 0.0*MeV, 0.0,
|
||||
2, -1, -1,
|
||||
@@ -72,17 +67,18 @@ G4Gamma* G4Gamma::Definition()
|
||||
true, -1.0, nullptr,
|
||||
false, "photon", 22
|
||||
);
|
||||
// clang-format on
|
||||
}
|
||||
theInstance = static_cast<G4Gamma*>(anInstance);
|
||||
return theInstance;
|
||||
}
|
||||
|
||||
G4Gamma* G4Gamma::GammaDefinition()
|
||||
G4Gamma* G4Gamma::GammaDefinition()
|
||||
{
|
||||
return Definition();
|
||||
}
|
||||
|
||||
G4Gamma* G4Gamma::Gamma()
|
||||
G4Gamma* G4Gamma::Gamma()
|
||||
{
|
||||
return Definition();
|
||||
}
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
@@ -36,34 +33,32 @@
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
#include "G4Geantino.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4String.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
|
||||
// ######################################################################
|
||||
// ### GEANTINO ###
|
||||
// ######################################################################
|
||||
G4Geantino* G4Geantino::theInstance = nullptr;
|
||||
|
||||
G4Geantino* G4Geantino::Definition()
|
||||
G4Geantino* G4Geantino::Definition()
|
||||
{
|
||||
if (theInstance !=nullptr) return theInstance;
|
||||
if (theInstance != nullptr) return theInstance;
|
||||
|
||||
const G4String name = "geantino";
|
||||
// search in particle table]
|
||||
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
|
||||
G4ParticleDefinition* anInstance = pTable->FindParticle(name);
|
||||
if (anInstance ==nullptr)
|
||||
{
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
if (anInstance == nullptr) {
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
// clang-format off
|
||||
anInstance = new G4ParticleDefinition(
|
||||
name, 0.0*MeV, 0.0*MeV, 0.0,
|
||||
0, 0, 0,
|
||||
@@ -72,18 +67,18 @@ G4Geantino* G4Geantino::Definition()
|
||||
true, -1.0, nullptr,
|
||||
false, "geantino", 0
|
||||
);
|
||||
// clang-format on
|
||||
}
|
||||
theInstance = static_cast<G4Geantino*>(anInstance);
|
||||
return theInstance;
|
||||
|
||||
}
|
||||
|
||||
G4Geantino* G4Geantino::GeantinoDefinition()
|
||||
G4Geantino* G4Geantino::GeantinoDefinition()
|
||||
{
|
||||
return Definition();
|
||||
}
|
||||
|
||||
G4Geantino* G4Geantino::Geantino()
|
||||
G4Geantino* G4Geantino::Geantino()
|
||||
{
|
||||
return Definition();
|
||||
}
|
||||
|
||||
@@ -23,47 +23,43 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// History: first implementation, based on object model of
|
||||
// 4th April 1996, G.Cosmo
|
||||
// 4th April 1996, G.Cosmo
|
||||
// by H.Kurashige,17 Oct. 1996
|
||||
// **********************************************************************
|
||||
// New impelemenataion as an utility class H.Kurashige, 14 July 2004
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
#include "G4OpticalPhoton.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
|
||||
// ######################################################################
|
||||
// ### OPTICAL PHOTON ###
|
||||
// ######################################################################
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4String.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
G4OpticalPhoton* G4OpticalPhoton::theInstance = nullptr;
|
||||
|
||||
G4OpticalPhoton* G4OpticalPhoton::Definition()
|
||||
G4OpticalPhoton* G4OpticalPhoton::Definition()
|
||||
{
|
||||
if (theInstance !=nullptr) return theInstance;
|
||||
if (theInstance != nullptr) return theInstance;
|
||||
|
||||
const G4String name = "opticalphoton";
|
||||
// search in particle table]
|
||||
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
|
||||
G4ParticleDefinition* anInstance = pTable->FindParticle(name);
|
||||
if (anInstance ==nullptr)
|
||||
{
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
if (anInstance == nullptr) {
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
// clang-format off
|
||||
anInstance = new G4ParticleDefinition(
|
||||
name, 0.0*MeV, 0.0*MeV, 0.0,
|
||||
2, -1, -1,
|
||||
@@ -72,20 +68,18 @@ G4OpticalPhoton* G4OpticalPhoton::Definition()
|
||||
true, -1.0, nullptr,
|
||||
false, "photon", 0
|
||||
);
|
||||
// clang-format on
|
||||
}
|
||||
theInstance = static_cast<G4OpticalPhoton*>(anInstance);
|
||||
return theInstance;
|
||||
}
|
||||
|
||||
|
||||
G4OpticalPhoton* G4OpticalPhoton::OpticalPhotonDefinition()
|
||||
G4OpticalPhoton* G4OpticalPhoton::OpticalPhotonDefinition()
|
||||
{
|
||||
return Definition();
|
||||
}
|
||||
|
||||
G4OpticalPhoton* G4OpticalPhoton::OpticalPhoton()
|
||||
G4OpticalPhoton* G4OpticalPhoton::OpticalPhoton()
|
||||
{
|
||||
return Definition();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,36 +25,34 @@
|
||||
//
|
||||
/// \file particles/src/G4PhononLong.cc
|
||||
/// \brief Implementation of the G4PhononLong class
|
||||
//
|
||||
//
|
||||
|
||||
#include "G4PhononLong.hh"
|
||||
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4String.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
G4PhononLong* G4PhononLong::theInstance = nullptr;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4PhononLong* G4PhononLong::Definition()
|
||||
G4PhononLong* G4PhononLong::Definition()
|
||||
{
|
||||
if (theInstance !=nullptr) return theInstance;
|
||||
if (theInstance != nullptr) return theInstance;
|
||||
|
||||
const G4String name = "phononL";
|
||||
// search in particle table
|
||||
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
|
||||
G4ParticleDefinition* anInstance = pTable->FindParticle(name);
|
||||
if (anInstance ==nullptr)
|
||||
{
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
if (anInstance == nullptr) {
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
// clang-format off
|
||||
anInstance = new G4ParticleDefinition(
|
||||
name, 0.0*MeV, 0.0*MeV, 0.0,
|
||||
0, 0, 0,
|
||||
@@ -63,16 +61,13 @@ G4PhononLong* G4PhononLong::Definition()
|
||||
true, -1.0, nullptr,
|
||||
false, "phononL", 0
|
||||
);
|
||||
// clang-format on
|
||||
}
|
||||
theInstance = static_cast<G4PhononLong*>(anInstance);
|
||||
return theInstance;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4PhononLong* G4PhononLong::PhononDefinition()
|
||||
G4PhononLong* G4PhononLong::PhononDefinition()
|
||||
{
|
||||
return Definition();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,34 +25,34 @@
|
||||
//
|
||||
/// \file particles/phonons/src/G4PhononTransFast.cc
|
||||
/// \brief Implementation of the G4PhononTransFast class
|
||||
//
|
||||
//
|
||||
|
||||
#include "G4PhononTransFast.hh"
|
||||
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4String.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
G4PhononTransFast* G4PhononTransFast::theInstance = nullptr;
|
||||
|
||||
G4PhononTransFast* G4PhononTransFast::Definition()
|
||||
G4PhononTransFast* G4PhononTransFast::Definition()
|
||||
{
|
||||
if (theInstance !=nullptr) return theInstance;
|
||||
if (theInstance != nullptr) return theInstance;
|
||||
|
||||
const G4String name = "phononTF";
|
||||
// search in particle table
|
||||
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
|
||||
G4ParticleDefinition* anInstance = pTable->FindParticle(name);
|
||||
if (anInstance ==nullptr)
|
||||
{
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
if (anInstance == nullptr) {
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
// clang-format off
|
||||
anInstance = new G4ParticleDefinition(
|
||||
name, 0.0*MeV, 0.0*MeV, 0.0,
|
||||
0, 0, 0,
|
||||
@@ -61,22 +61,13 @@ G4PhononTransFast* G4PhononTransFast::Definition()
|
||||
true, -1.0, nullptr,
|
||||
false, "phononTF", 0
|
||||
);
|
||||
// clang-format on
|
||||
}
|
||||
theInstance = static_cast<G4PhononTransFast*>(anInstance);
|
||||
return theInstance;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
|
||||
G4PhononTransFast* G4PhononTransFast::PhononDefinition()
|
||||
G4PhononTransFast* G4PhononTransFast::PhononDefinition()
|
||||
{
|
||||
return Definition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -25,34 +25,34 @@
|
||||
//
|
||||
/// \file particles/phonons/src/G4PhononTransSlow.cc
|
||||
/// \brief Implementation of the G4PhononTransSlow class
|
||||
//
|
||||
//
|
||||
|
||||
#include "G4PhononTransSlow.hh"
|
||||
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4String.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
G4PhononTransSlow* G4PhononTransSlow::theInstance = nullptr;
|
||||
|
||||
G4PhononTransSlow* G4PhononTransSlow::Definition()
|
||||
G4PhononTransSlow* G4PhononTransSlow::Definition()
|
||||
{
|
||||
if (theInstance !=nullptr) return theInstance;
|
||||
if (theInstance != nullptr) return theInstance;
|
||||
|
||||
const G4String name = "phononTS";
|
||||
// search in particle table
|
||||
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
|
||||
G4ParticleDefinition* anInstance = pTable->FindParticle(name);
|
||||
if (anInstance ==nullptr)
|
||||
{
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
if (anInstance == nullptr) {
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
// clang-format off
|
||||
anInstance = new G4ParticleDefinition(
|
||||
name, 0.0*MeV, 0.0*MeV, 0.0,
|
||||
0, 0, 0,
|
||||
@@ -61,21 +61,13 @@ G4PhononTransSlow* G4PhononTransSlow::Definition()
|
||||
true, -1.0, nullptr,
|
||||
false, "phononTS", 0
|
||||
);
|
||||
// clang-format on
|
||||
}
|
||||
theInstance = static_cast<G4PhononTransSlow*>(anInstance);
|
||||
return theInstance;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
|
||||
G4PhononTransSlow* G4PhononTransSlow::PhononDefinition()
|
||||
G4PhononTransSlow* G4PhononTransSlow::PhononDefinition()
|
||||
{
|
||||
return Definition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
@@ -35,34 +32,32 @@
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
#include "G4UnknownParticle.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4String.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
|
||||
// ######################################################################
|
||||
// ### Unknown Particle ###
|
||||
// ######################################################################
|
||||
G4UnknownParticle* G4UnknownParticle::theInstance = nullptr;
|
||||
|
||||
G4UnknownParticle* G4UnknownParticle::Definition()
|
||||
G4UnknownParticle* G4UnknownParticle::Definition()
|
||||
{
|
||||
if (theInstance !=nullptr) return theInstance;
|
||||
if (theInstance != nullptr) return theInstance;
|
||||
|
||||
const G4String name = "unknown";
|
||||
// search in particle table]
|
||||
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
|
||||
G4ParticleDefinition* anInstance = pTable->FindParticle(name);
|
||||
if (anInstance ==nullptr)
|
||||
{
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
if (anInstance == nullptr) {
|
||||
// create particle
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
// shortlived subType anti_encoding
|
||||
// clang-format off
|
||||
anInstance = new G4ParticleDefinition(
|
||||
name, 0.0*MeV, 0.0*MeV, 0.0,
|
||||
0, 0, 0,
|
||||
@@ -71,18 +66,18 @@ G4UnknownParticle* G4UnknownParticle::Definition()
|
||||
true, -1.0, nullptr,
|
||||
false, "geantino", 0
|
||||
);
|
||||
// clang-format on
|
||||
}
|
||||
theInstance = static_cast<G4UnknownParticle*>(anInstance);
|
||||
return theInstance;
|
||||
|
||||
}
|
||||
|
||||
G4UnknownParticle* G4UnknownParticle::UnknownParticleDefinition()
|
||||
G4UnknownParticle* G4UnknownParticle::UnknownParticleDefinition()
|
||||
{
|
||||
return Definition();
|
||||
}
|
||||
|
||||
G4UnknownParticle* G4UnknownParticle::UnknownParticle()
|
||||
G4UnknownParticle* G4UnknownParticle::UnknownParticle()
|
||||
{
|
||||
return Definition();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user