Import Geant4 11.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2023-12-08 10:43:34 +01:00
parent dd1f179cda
commit 860a2b92bf
3962 changed files with 139318 additions and 164259 deletions
@@ -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();
}