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
+21 -27
View File
@@ -22,38 +22,34 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
#include "G4AdjointAlpha.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
// ######################################################################
// ### ADJOINT ALPHA ###
// ######################################################################
#include "G4ParticleTable.hh"
#include "G4String.hh"
#include "G4SystemOfUnits.hh"
G4AdjointAlpha* G4AdjointAlpha::theInstance = nullptr;
G4AdjointAlpha* G4AdjointAlpha::Definition()
{
if (theInstance !=nullptr) return theInstance;
if (theInstance != nullptr) return theInstance;
const G4String name = "adj_alpha";
// search in particle table]
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
auto anInstance = static_cast<G4AdjointIons*>(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
// excitation
auto anInstance = static_cast<G4AdjointIons*>(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
// excitation
// clang-format off
anInstance = new G4AdjointIons(
name, 3.727417*GeV, 0.0*MeV, -2.0*eplus,
0, +1, 0,
@@ -63,24 +59,22 @@ G4AdjointAlpha* G4AdjointAlpha::Definition()
false, "static", 0,
0.0
);
// clang-format on
}
//No Anti particle registered
// No Anti particle registered
anInstance->SetAntiPDGEncoding(0);
theInstance = static_cast<G4AdjointAlpha*>(anInstance);
return theInstance;
}
G4AdjointAlpha* G4AdjointAlpha::AlphaDefinition()
G4AdjointAlpha* G4AdjointAlpha::AlphaDefinition()
{
return Definition();
}
G4AdjointAlpha* G4AdjointAlpha::Alpha()
G4AdjointAlpha* G4AdjointAlpha::Alpha()
{
return Definition();
}
@@ -22,39 +22,37 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
#include "G4AdjointDeuteron.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
// ######################################################################
// ### ADJOINT DEUTERON ###
// ######################################################################
#include "G4AdjointDeuteron.hh"
#include "G4ParticleTable.hh"
#include "G4PhysicalConstants.hh"
#include "G4String.hh"
#include "G4SystemOfUnits.hh"
#include "G4Types.hh"
G4AdjointDeuteron* G4AdjointDeuteron::theInstance = nullptr;
G4AdjointDeuteron* G4AdjointDeuteron::Definition()
{
if (theInstance !=nullptr) return theInstance;
if (theInstance != nullptr) return theInstance;
const G4String name = "adj_deuteron";
// search in particle table]
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
auto anInstance = static_cast<G4AdjointIons*>(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
// excitation
auto anInstance = static_cast<G4AdjointIons*>(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
// excitation
// clang-format off
anInstance = new G4AdjointIons(
name, 1.875613*GeV, 0.0*MeV, -1.0*eplus,
2, +1, 0,
@@ -64,27 +62,25 @@ G4AdjointDeuteron* G4AdjointDeuteron::Definition()
false, "static", 0,
0.0
);
// clang-format on
// Magnetic Moment
G4double mN = eplus*hbar_Planck/2./(proton_mass_c2 /c_squared);
anInstance->SetPDGMagneticMoment( 0.857438230 * mN);
G4double mN = eplus * hbar_Planck / 2. / (proton_mass_c2 / c_squared);
anInstance->SetPDGMagneticMoment(0.857438230 * mN);
}
//No Anti particle registered
// No Anti particle registered
anInstance->SetAntiPDGEncoding(0);
theInstance = static_cast<G4AdjointDeuteron*>(anInstance);
return theInstance;
}
G4AdjointDeuteron* G4AdjointDeuteron::DeuteronDefinition()
G4AdjointDeuteron* G4AdjointDeuteron::DeuteronDefinition()
{
return Definition();
}
G4AdjointDeuteron* G4AdjointDeuteron::Deuteron()
G4AdjointDeuteron* G4AdjointDeuteron::Deuteron()
{
return Definition();
}
@@ -23,57 +23,51 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// 1st March 2007 creation by L. Desorgher based on a modification of G4Electron
// 06 Nov. 2008 modified for Geant4-09-02 by Hisaya Kurashige
// History:
// 1st March 2007 creation by L. Desorgher based on a modification of G4Electron
// 06 Nov. 2008 modified for Geant4-09-02 by Hisaya Kurashige
//
//-------------------------------------------------------------
//
//
#include "G4AdjointElectron.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
// ######################################################################
// ### ADJOINT ELECTRON ###
// ######################################################################
#include "G4ParticleTable.hh"
#include "G4PhysicalConstants.hh"
#include "G4String.hh"
#include "G4SystemOfUnits.hh"
#include "G4Types.hh"
G4AdjointElectron* G4AdjointElectron::theInstance = nullptr;
G4AdjointElectron* G4AdjointElectron::Definition()
{
if (theInstance !=nullptr) return theInstance;
{
if (theInstance != nullptr) return theInstance;
const G4String name = "adj_e-";
// 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
// use constants in CLHEP
// static const double electron_mass_c2 = 0.51099906 * MeV;
// NOTE : electric charge and magnetic moment is opposite
// compared with real electron, because adjoint particles
// are used to back-trace
// use constants in CLHEP
// static const double electron_mass_c2 = 0.51099906 * MeV;
// NOTE : electric charge and magnetic moment is opposite
// compared with real electron, because adjoint particles
// are used to back-trace
// clang-format off
anInstance = new G4ParticleDefinition(
name, electron_mass_c2, 0.0*MeV, 1.*eplus,
1, 0, 0,
@@ -82,23 +76,21 @@ G4AdjointElectron* G4AdjointElectron::Definition()
true, -1.0, nullptr,
false, "adj_lepton"
);
// Bohr Magnetron
G4double muB = 0.5*eplus*hbar_Planck/(electron_mass_c2/c_squared) ;
anInstance->SetPDGMagneticMoment( muB * 2.* 1.0011596521859 );
// clang-format on
// Bohr Magnetron
G4double muB = 0.5 * eplus * hbar_Planck / (electron_mass_c2 / c_squared);
anInstance->SetPDGMagneticMoment(muB * 2. * 1.0011596521859);
}
theInstance = static_cast<G4AdjointElectron*>(anInstance);
return theInstance;
}
G4AdjointElectron* G4AdjointElectron::AdjointElectronDefinition()
G4AdjointElectron* G4AdjointElectron::AdjointElectronDefinition()
{
return Definition();
}
G4AdjointElectron* G4AdjointElectron::AdjointElectron()
G4AdjointElectron* G4AdjointElectron::AdjointElectron()
{
return Definition();
}
@@ -23,57 +23,50 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// 1st March 2007 creation by L. Desorgher based on a modification of G4Electron
// 06 Nov. 2008 modified for Geant4-09-02 by Hisaya Kurashige
// History:
// 1st March 2007 creation by L. Desorgher based on a modification of G4Electron
// 06 Nov. 2008 modified for Geant4-09-02 by Hisaya Kurashige
//
//-------------------------------------------------------------
//
#include "G4AdjointElectronFI.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
// ######################################################################
// ### ADJOINT ELECTRON FOR FORCED INTERACTION ###
// ######################################################################
#include "G4ParticleTable.hh"
#include "G4PhysicalConstants.hh"
#include "G4String.hh"
#include "G4SystemOfUnits.hh"
#include "G4Types.hh"
G4AdjointElectronFI* G4AdjointElectronFI::theInstance = nullptr;
G4AdjointElectronFI* G4AdjointElectronFI::Definition()
{
if (theInstance !=nullptr) return theInstance;
{
if (theInstance != nullptr) return theInstance;
const G4String name = "adj_e-_FI";
// 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
// use constants in CLHEP
// static const double electron_mass_c2 = 0.51099906 * MeV;
// NOTE : electric charge and magnetic moment is opposite
// compared with real electron, because adjoint particles
// are used to back-trace
// use constants in CLHEP
// static const double electron_mass_c2 = 0.51099906 * MeV;
// NOTE : electric charge and magnetic moment is opposite
// compared with real electron, because adjoint particles
// are used to back-trace
// clang-format off
anInstance = new G4ParticleDefinition(
name, electron_mass_c2, 0.0*MeV, 1.*eplus,
1, 0, 0,
@@ -82,23 +75,21 @@ G4AdjointElectronFI* G4AdjointElectronFI::Definition()
true, -1.0, nullptr,
false, "adj_lepton"
);
// Bohr Magnetron
G4double muB = 0.5*eplus*hbar_Planck/(electron_mass_c2/c_squared) ;
anInstance->SetPDGMagneticMoment( muB * 2.* 1.0011596521859 );
// clang-format on
// Bohr Magnetron
G4double muB = 0.5 * eplus * hbar_Planck / (electron_mass_c2 / c_squared);
anInstance->SetPDGMagneticMoment(muB * 2. * 1.0011596521859);
}
theInstance = static_cast<G4AdjointElectronFI*>(anInstance);
return theInstance;
}
G4AdjointElectronFI* G4AdjointElectronFI::AdjointElectronFIDefinition()
G4AdjointElectronFI* G4AdjointElectronFI::AdjointElectronFIDefinition()
{
return Definition();
}
G4AdjointElectronFI* G4AdjointElectronFI::AdjointElectronFI()
G4AdjointElectronFI* G4AdjointElectronFI::AdjointElectronFI()
{
return Definition();
}
+24 -27
View File
@@ -23,45 +23,41 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// 1st March 2007 creation by L. Desorgher based on a modification of G4Gamma
// 06 Nov. 2008 modified for Geant4-09-02 by Hisaya Kurashige
//
// History:
// 1st March 2007 creation by L. Desorgher based on a modification of G4Gamma
// 06 Nov. 2008 modified for Geant4-09-02 by Hisaya Kurashige
//
#include "G4AdjointGamma.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
// ######################################################################
// ### GAMMA ###
// ######################################################################
#include "G4ParticleTable.hh"
#include "G4String.hh"
#include "G4SystemOfUnits.hh"
G4AdjointGamma* G4AdjointGamma::theInstance = nullptr;
G4AdjointGamma* G4AdjointGamma::Definition()
G4AdjointGamma* G4AdjointGamma::Definition()
{
if (theInstance !=nullptr) return theInstance;
if (theInstance != nullptr) return theInstance;
const G4String name = "adj_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,
@@ -70,17 +66,18 @@ G4AdjointGamma* G4AdjointGamma::Definition()
true, 0.0, nullptr,
false, "adj_gamma", 10000022
);
// clang-format on
}
theInstance = static_cast<G4AdjointGamma*>(anInstance);
return theInstance;
}
G4AdjointGamma* G4AdjointGamma::AdjointGammaDefinition()
G4AdjointGamma* G4AdjointGamma::AdjointGammaDefinition()
{
return Definition();
}
G4AdjointGamma* G4AdjointGamma::AdjointGamma()
G4AdjointGamma* G4AdjointGamma::AdjointGamma()
{
return Definition();
}
@@ -22,40 +22,38 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
#include "G4AdjointGenericIon.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
// ######################################################################
// ### ADJOINT GenericIon ###
// ######################################################################
#include "G4AdjointGenericIon.hh"
#include "G4ParticleTable.hh"
#include "G4String.hh"
#include "G4SystemOfUnits.hh"
G4AdjointGenericIon* G4AdjointGenericIon::theInstance = nullptr;
G4AdjointGenericIon* G4AdjointGenericIon::Definition()
{
if (theInstance !=nullptr) return theInstance;
if (theInstance != nullptr) return theInstance;
const G4String name = "adj_GenericIon";
// search in particle table]
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
auto anInstance = static_cast<G4AdjointIons*>(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
// excitation
//!!!!
//!!!! this particle should not be used for tracking
//!!!! all properties except name and type are meaningless
//!!!!
auto anInstance = static_cast<G4AdjointIons*>(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
// excitation
//!!!!
//!!!! this particle should not be used for tracking
//!!!! all properties except name and type are meaningless
//!!!!
// clang-format off
anInstance = new G4AdjointIons(
name, 0.9382723*GeV, 0.0*MeV, -eplus,
1, +1, 0,
@@ -65,19 +63,19 @@ G4AdjointGenericIon* G4AdjointGenericIon::Definition()
false, "adjoint_generic", 0,
0.0
);
// clang-format on
}
theInstance = static_cast<G4AdjointGenericIon*>(anInstance);
return theInstance;
}
G4AdjointGenericIon* G4AdjointGenericIon::GenericIonDefinition()
{
G4AdjointGenericIon* G4AdjointGenericIon::GenericIonDefinition()
{
return Definition();
}
G4AdjointGenericIon* G4AdjointGenericIon::GenericIon()
{
G4AdjointGenericIon* G4AdjointGenericIon::GenericIon()
{
return Definition();
}
+28 -33
View File
@@ -22,39 +22,36 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
#include "G4AdjointHe3.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
// ######################################################################
// ### ADJOINT He3 ###
// ######################################################################
#include "G4AdjointHe3.hh"
#include "G4ParticleTable.hh"
#include "G4PhysicalConstants.hh"
#include "G4String.hh"
#include "G4SystemOfUnits.hh"
#include "G4Types.hh"
G4AdjointHe3* G4AdjointHe3::theInstance = nullptr;
G4AdjointHe3* G4AdjointHe3::Definition()
{
if (theInstance !=nullptr) return theInstance;
if (theInstance != nullptr) return theInstance;
const G4String name = "adj_He3";
// search in particle table]
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
auto anInstance = static_cast<G4AdjointIons*>(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
// excitation
auto anInstance = static_cast<G4AdjointIons*>(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
// excitation
// clang-format off
anInstance = new G4AdjointIons(
name, 2.80923*GeV, 0.0*MeV, -2.0*eplus,
1, +1, 0,
@@ -64,27 +61,25 @@ G4AdjointHe3* G4AdjointHe3::Definition()
false, "static", 0,
0.0
);
// Magnetic Moment
G4double mN = eplus*hbar_Planck/2./(proton_mass_c2 /c_squared);
anInstance->SetPDGMagneticMoment( -2.12762485 * mN);
// clang-format on
// Magnetic Moment
G4double mN = eplus * hbar_Planck / 2. / (proton_mass_c2 / c_squared);
anInstance->SetPDGMagneticMoment(-2.12762485 * mN);
}
//No Anti particle registered
// No Anti particle registered
anInstance->SetAntiPDGEncoding(0);
theInstance = static_cast<G4AdjointHe3*>(anInstance);
return theInstance;
}
G4AdjointHe3* G4AdjointHe3::He3Definition()
G4AdjointHe3* G4AdjointHe3::He3Definition()
{
return Definition();
}
G4AdjointHe3* G4AdjointHe3::He3()
G4AdjointHe3* G4AdjointHe3::He3()
{
return Definition();
}
+7 -17
View File
@@ -22,18 +22,13 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
#include <fstream>
#include <iomanip>
#include "G4AdjointIons.hh"
#include "G4DecayTable.hh"
#include "G4SystemOfUnits.hh"
// ######################################################################
// ### ADJOINT Ions ###
// #######################################################################
// clang-format off
G4AdjointIons::G4AdjointIons(
const G4String& aName, G4double mass,
G4double width, G4double charge,
@@ -51,21 +46,16 @@ G4AdjointIons::G4AdjointIons(
iConjugation,iIsospin,iIsospin3,gParity,pType,
lepton,baryon,encoding,stable,lifetime,decaytable,
shortlived, subType, anti_encoding)
// clang-format on
{
// initialize excitation energy/level
theExcitationEnergy = excitation;
theExcitationEnergy = excitation;
SetAtomicNumber( G4int(-GetPDGCharge()/eplus) );
SetAtomicMass( GetBaryonNumber() );
//G4cout << "G4AdjointIons::" << GetParticleName() << G4endl;
SetAtomicNumber(G4int(-GetPDGCharge() / eplus));
SetAtomicMass(GetBaryonNumber());
}
G4AdjointIons* G4AdjointIons::IonsDefinition()
{
return this;
}
@@ -23,56 +23,50 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// 1st March 2007 creation by L. Desorgher based on a modification of G4Positron
// 06 Nov. 2008 modified for Geant4-09-02 by Hisaya Kurashige
// History:
// 1st March 2007 creation by L. Desorgher based on a modification of G4Positron
// 06 Nov. 2008 modified for Geant4-09-02 by Hisaya Kurashige
//
//-------------------------------------------------------------
//
#include "G4AdjointPositron.hh"
#include "G4ParticleTable.hh"
#include "G4PhysicalConstants.hh"
#include "G4String.hh"
#include "G4SystemOfUnits.hh"
#include "G4Types.hh"
// ######################################################################
// ### ADJOINT ELECTRON ###
// ######################################################################
G4AdjointPositron* G4AdjointPositron::theInstance = nullptr;
G4AdjointPositron* G4AdjointPositron::Definition()
{
if (theInstance !=nullptr) return theInstance;
{
if (theInstance != nullptr) return theInstance;
const G4String name = "adj_e+";
// 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
// use constants in CLHEP
// static const double electron_mass_c2 = 0.51099906 * MeV;
// NOTE : electric charge and magnetic moment is opposite
// compared with real positron, because adjoint particles
// are used to back-trace
// use constants in CLHEP
// static const double electron_mass_c2 = 0.51099906 * MeV;
// NOTE : electric charge and magnetic moment is opposite
// compared with real positron, because adjoint particles
// are used to back-trace
// clang-format off
anInstance = new G4ParticleDefinition(
name, electron_mass_c2, 0.0*MeV, -1.*eplus,
1, 0, 0,
@@ -81,6 +75,7 @@ G4AdjointPositron* G4AdjointPositron::Definition()
true, -1.0, nullptr,
false, "adj_lepton"
);
// clang-format on
// Bohr Magnetron
G4double muB = -0.5*eplus*hbar_Planck/(electron_mass_c2/c_squared) ;
anInstance->SetPDGMagneticMoment( muB * 2.* 1.0011596521859 );
@@ -99,5 +94,3 @@ G4AdjointPositron* G4AdjointPositron::AdjointPositron()
{
return Definition();
}
+26 -31
View File
@@ -22,41 +22,37 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
#include "G4AdjointProton.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
// ######################################################################
// ### PROTON ###
// ######################################################################
#include "G4ParticleTable.hh"
#include "G4PhysicalConstants.hh"
#include "G4String.hh"
#include "G4SystemOfUnits.hh"
#include "G4Types.hh"
G4AdjointProton* G4AdjointProton::theInstance = nullptr;
G4AdjointProton* G4AdjointProton::Definition()
{
if (theInstance !=nullptr) return theInstance;
if (theInstance != nullptr) return theInstance;
const G4String name = "adj_proton";
// 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
// use constants in CLHEP
// static const double proton_mass_c2 = 938.27231 * MeV;
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
// use constants in CLHEP
// static const double proton_mass_c2 = 938.27231 * MeV;
// clang-format off
anInstance = new G4ParticleDefinition(
name, proton_mass_c2, 0.0*MeV, -eplus,
1, +1, 0,
@@ -66,23 +62,22 @@ G4AdjointProton* G4AdjointProton::Definition()
false, "adjoint_ion", 0,
0.0
);
// clang-format on
// Magnetic Moment
G4double mN = eplus*hbar_Planck/2./(proton_mass_c2 /c_squared);
anInstance->SetPDGMagneticMoment( 2.792847351 * mN);
G4double mN = eplus * hbar_Planck / 2. / (proton_mass_c2 / c_squared);
anInstance->SetPDGMagneticMoment(2.792847351 * mN);
}
theInstance = static_cast<G4AdjointProton*>(anInstance);
return theInstance;
}
G4AdjointProton* G4AdjointProton::AdjointProtonDefinition()
G4AdjointProton* G4AdjointProton::AdjointProtonDefinition()
{
return Definition();
}
G4AdjointProton* G4AdjointProton::AdjointProton()
G4AdjointProton* G4AdjointProton::AdjointProton()
{
return Definition();
}
+29 -33
View File
@@ -22,38 +22,36 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
#include "G4AdjointTriton.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
// ######################################################################
// ### ADJOINT TRITON ###
// ######################################################################
#include "G4AdjointTriton.hh"
#include "G4ParticleTable.hh"
#include "G4PhysicalConstants.hh"
#include "G4String.hh"
#include "G4SystemOfUnits.hh"
#include "G4Types.hh"
G4AdjointTriton* G4AdjointTriton::theInstance = nullptr;
G4AdjointTriton* G4AdjointTriton::Definition()
{
if (theInstance !=nullptr) return theInstance;
if (theInstance != nullptr) return theInstance;
const G4String name = "adj_triton";
// search in particle table]
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
auto anInstance = static_cast<G4AdjointIons*>(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
// excitation
auto anInstance = static_cast<G4AdjointIons*>(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
// excitation
// clang-format off
anInstance = new G4AdjointIons(
name, 2.80925*GeV, 0.0*MeV, -1.0*eplus,
1, +1, 0,
@@ -63,27 +61,25 @@ G4AdjointTriton* G4AdjointTriton::Definition()
false, "static", 0,
0.0
);
// Magnetic Moment
G4double mN = eplus*hbar_Planck/2./(proton_mass_c2 /c_squared);
anInstance->SetPDGMagneticMoment( 2.97896248 * mN);
// clang-format on
}
//No Anti particle registered
// Magnetic Moment
G4double mN = eplus * hbar_Planck / 2. / (proton_mass_c2 / c_squared);
anInstance->SetPDGMagneticMoment(2.97896248 * mN);
}
// No Anti particle registered
anInstance->SetAntiPDGEncoding(0);
theInstance = static_cast<G4AdjointTriton*>(anInstance);
return theInstance;
}
G4AdjointTriton* G4AdjointTriton::TritonDefinition()
G4AdjointTriton* G4AdjointTriton::TritonDefinition()
{
return Definition();
}
G4AdjointTriton* G4AdjointTriton::Triton()
G4AdjointTriton* G4AdjointTriton::Triton()
{
return Definition();
}