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,43 +23,36 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// 1 July 2009 creation by L. Desorgher based on a modification of G4Alpha
// History:
// 1 July 2009 creation by L. Desorgher based on a modification of G4Alpha
//
//-------------------------------------------------------------
// Documentation:
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
//
#ifndef G4AdjointAlpha_h
#define G4AdjointAlpha_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4ParticleDefinition.hh"
#include "G4AdjointIons.hh"
// ######################################################################
// ### ADJOINT ALPHA ###
// ######################################################################
class G4AdjointAlpha : public G4AdjointIons
{
private:
static G4AdjointAlpha* theInstance;
G4AdjointAlpha(){}
~G4AdjointAlpha() override= default;
public:
static G4AdjointAlpha* Definition();
static G4AdjointAlpha* AlphaDefinition();
static G4AdjointAlpha* Alpha();
public:
static G4AdjointAlpha* Definition();
static G4AdjointAlpha* AlphaDefinition();
static G4AdjointAlpha* Alpha();
private:
G4AdjointAlpha() {}
~G4AdjointAlpha() override = default;
static G4AdjointAlpha* theInstance;
};
#endif
@@ -23,49 +23,36 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// 1 July 2009 creation by L. Desorgher based on a modification of G4Deuteron
// History:
// 1 July 2009 creation by L. Desorgher based on a modification of G4Deuteron
//
//-------------------------------------------------------------
// Documentation:
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
//
#ifndef G4AdjointDeuteron_h
#define G4AdjointDeuteron_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4ParticleDefinition.hh"
#include "G4AdjointIons.hh"
// ######################################################################
// ### ADJOINT DEUTERON ###
// ######################################################################
class G4AdjointDeuteron : public G4AdjointIons
{
private:
static G4AdjointDeuteron* theInstance;
G4AdjointDeuteron(){}
~G4AdjointDeuteron() override= default;
public:
static G4AdjointDeuteron* Definition();
static G4AdjointDeuteron* DeuteronDefinition();
static G4AdjointDeuteron* Deuteron();
public:
static G4AdjointDeuteron* Definition();
static G4AdjointDeuteron* DeuteronDefinition();
static G4AdjointDeuteron* Deuteron();
private:
G4AdjointDeuteron() {}
~G4AdjointDeuteron() override = default;
static G4AdjointDeuteron* theInstance;
};
#endif
@@ -23,55 +23,37 @@
// * 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
//
//-------------------------------------------------------------
// Documentation:
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles
// during a reverse simulation is based on an idea of M. Asai
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles
// during a reverse simulation is based on an idea of M. Asai
//
#ifndef G4AdjointElectron_h
#define G4AdjointElectron_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4ParticleDefinition.hh"
// ######################################################################
// ### ADJOINT ELECTRON ###
// ######################################################################
class G4AdjointElectron : public G4ParticleDefinition
{
private:
static G4AdjointElectron* theInstance;
G4AdjointElectron(){}
~G4AdjointElectron() override= default;
public:
static G4AdjointElectron* Definition();
static G4AdjointElectron* AdjointElectronDefinition();
static G4AdjointElectron* AdjointElectron();
public:
static G4AdjointElectron* Definition();
static G4AdjointElectron* AdjointElectronDefinition();
static G4AdjointElectron* AdjointElectron();
private:
G4AdjointElectron() {}
~G4AdjointElectron() override = default;
static G4AdjointElectron* theInstance;
};
#endif
@@ -23,55 +23,37 @@
// * 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
//
//-------------------------------------------------------------
// Documentation:
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles
// during a reverse simulation is based on an idea of M. Asai
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles
// during a reverse simulation is based on an idea of M. Asai
//
#ifndef G4AdjointElectronFI_h
#define G4AdjointElectronFI_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4ParticleDefinition.hh"
// ######################################################################
// ### ADJOINT ELECTRON ###
// ######################################################################
class G4AdjointElectronFI : public G4ParticleDefinition
{
private:
static G4AdjointElectronFI* theInstance;
G4AdjointElectronFI(){}
~G4AdjointElectronFI() override= default;
public:
static G4AdjointElectronFI* Definition();
static G4AdjointElectronFI* AdjointElectronFIDefinition();
static G4AdjointElectronFI* AdjointElectronFI();
public:
static G4AdjointElectronFI* Definition();
static G4AdjointElectronFI* AdjointElectronFIDefinition();
static G4AdjointElectronFI* AdjointElectronFI();
private:
G4AdjointElectronFI() {}
~G4AdjointElectronFI() override = default;
static G4AdjointElectronFI* theInstance;
};
#endif
@@ -23,51 +23,37 @@
// * 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
//
//-------------------------------------------------------------
// Documentation:
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles
// during a reverse simulation is based on an idea of M. Asai
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles
// during a reverse simulation is based on an idea of M. Asai
//
#ifndef G4AdjointGamma_h
#define G4AdjointGamma_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4ParticleDefinition.hh"
// ######################################################################
// ### AdjointGAMMA ###
// ######################################################################
class G4AdjointGamma : public G4ParticleDefinition
{
private:
static G4AdjointGamma* theInstance;
public:
static G4AdjointGamma* Definition();
static G4AdjointGamma* AdjointGammaDefinition();
static G4AdjointGamma* AdjointGamma();
private: // hide constructor as private
G4AdjointGamma(){}
private:
G4AdjointGamma() {}
~G4AdjointGamma() override = default;
public:
~G4AdjointGamma() override= default;
static G4AdjointGamma* Definition();
static G4AdjointGamma* AdjointGammaDefinition();
static G4AdjointGamma* AdjointGamma();
static G4AdjointGamma* theInstance;
};
#endif
@@ -23,44 +23,37 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// 10 July 2009 creation by L. Desorgher based on a modification of G4GenericIon
// History:
// 10 July 2009 creation by L. Desorgher based on a modification of G4GenericIon
//
//-------------------------------------------------------------
// Documentation:
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
//
#ifndef G4AdjointGenericIon_h
#define G4AdjointGenericIon_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4ParticleDefinition.hh"
#include "G4AdjointIons.hh"
// ######################################################################
// ### GenericIon ###
// ######################################################################
class G4AdjointGenericIon : public G4AdjointIons
{
private:
static G4AdjointGenericIon* theInstance;
G4AdjointGenericIon(){}
~G4AdjointGenericIon() override= default;
public:
static G4AdjointGenericIon* Definition();
static G4AdjointGenericIon* GenericIonDefinition();
static G4AdjointGenericIon* GenericIon();
public:
static G4AdjointGenericIon* Definition();
static G4AdjointGenericIon* GenericIonDefinition();
static G4AdjointGenericIon* GenericIon();
private:
G4AdjointGenericIon() {}
~G4AdjointGenericIon() override = default;
static G4AdjointGenericIon* theInstance;
};
#endif
@@ -23,44 +23,36 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// 1 July 2009 creation by L. Desorgher based on a modification of G4He3
// History:
// 1 July 2009 creation by L. Desorgher based on a modification of G4He3
//
//-------------------------------------------------------------
// Documentation:
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
//
#ifndef G4AdjointHe3_h
#define G4AdjointHe3_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4ParticleDefinition.hh"
#include "G4AdjointIons.hh"
// ######################################################################
// ### ADJOINT He3 ###
// ######################################################################
class G4AdjointHe3 : public G4AdjointIons
{
private:
static G4AdjointHe3* theInstance;
G4AdjointHe3(){}
~G4AdjointHe3() override= default;
public:
static G4AdjointHe3* Definition();
static G4AdjointHe3* He3Definition();
static G4AdjointHe3* He3();
public:
static G4AdjointHe3* Definition();
static G4AdjointHe3* He3Definition();
static G4AdjointHe3* He3();
private:
G4AdjointHe3() {}
~G4AdjointHe3() override = default;
static G4AdjointHe3* theInstance;
};
#endif
@@ -23,47 +23,39 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// 1 July 2009 creation by L. Desorgher based on a modification of G4Ions
// History:
// 1 July 2009 creation by L. Desorgher based on a modification of G4Ions
//
//-------------------------------------------------------------
// Documentation:
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
//
#ifndef G4AdjointIons_h
#define G4AdjointIons_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4ParticleDefinition.hh"
// ######################################################################
// ### ADJOINT Ions ###
// ######################################################################
#include "G4String.hh"
#include "G4Types.hh"
class G4AdjointIons : public G4ParticleDefinition
{
// Class Description
// This is the base class for all nuclei including pre-defined
// light nuclei such as deuteron, alpha, and proton (Hydrogen)
// All nuclei/ions created on the fly are objects of this class
// Atomic number and atomic mass are vaild only for particles derived
// from this class. This class has Excitation Energy in addition to
// the normal particle properties.
// Class Description
// This is the base class for all nuclei including pre-defined
// light nuclei such as deuteron, alpha, and proton (Hydrogen)
// All nuclei/ions created on the fly are objects of this class
// Atomic number and atomic mass are vaild only for particles derived
// from this class. This class has Excitation Energy in addition to
// the normal particle properties.
protected:
G4AdjointIons() = default;
public: //With Description
public:
// clang-format off
G4AdjointIons(
const G4String& aName, G4double mass,
G4double width, G4double charge,
@@ -78,39 +70,31 @@ class G4AdjointIons : public G4ParticleDefinition
G4int anti_encoding =0,
G4double excitation = 0.0
);
// clang-format on
public:
~G4AdjointIons() override = default;
G4AdjointIons* IonsDefinition();
G4AdjointIons* Ions();
~G4AdjointIons() override = default;
G4AdjointIons* IonsDefinition();
G4AdjointIons* Ions();
// Get excitation energy of nucleus
G4double GetExcitationEnergy() const;
protected:
G4AdjointIons() = default;
public: //With Description
// Get excitation energy of nucleus
G4double GetExcitationEnergy() const ;
private:
G4double theExcitationEnergy;
G4double theExcitationEnergy;
};
inline
G4AdjointIons* G4AdjointIons::Ions()
inline G4AdjointIons* G4AdjointIons::Ions()
{
return this;
}
inline
G4double G4AdjointIons::GetExcitationEnergy() const
inline G4double G4AdjointIons::GetExcitationEnergy() const
{
return theExcitationEnergy;
}
#endif
@@ -23,55 +23,37 @@
// * 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 G4Positrony
// 06 Nov. 2008 modified for Geant4-09-02 by Hisaya Kurashige
// History:
// 1st March 2007 creation by L. Desorgher based on a modification of G4Positrony
// 06 Nov. 2008 modified for Geant4-09-02 by Hisaya Kurashige
//
//-------------------------------------------------------------
// Documentation:
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles
// during a reverse simulation is based on an idea of M. Asai
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles
// during a reverse simulation is based on an idea of M. Asai
//
#ifndef G4AdjointPositron_h
#define G4AdjointPositron_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4ParticleDefinition.hh"
// ######################################################################
// ### ADJOINT POSITRON ###
// ######################################################################
class G4AdjointPositron : public G4ParticleDefinition
{
private:
static G4AdjointPositron* theInstance;
G4AdjointPositron(){}
~G4AdjointPositron() override= default;
public:
static G4AdjointPositron* Definition();
static G4AdjointPositron* AdjointPositronDefinition();
static G4AdjointPositron* AdjointPositron();
public:
static G4AdjointPositron* Definition();
static G4AdjointPositron* AdjointPositronDefinition();
static G4AdjointPositron* AdjointPositron();
private:
G4AdjointPositron() {}
~G4AdjointPositron() override = default;
static G4AdjointPositron* theInstance;
};
#endif
@@ -23,45 +23,36 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// 13 February 2009 creation by L. Desorgher based on a modification of G4Proton
// History:
// 13 February 2009 creation by L. Desorgher based on a modification of G4Proton
//
//-------------------------------------------------------------
// Documentation:
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
//
#ifndef G4AdjointProton_h
#define G4AdjointProton_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4ParticleDefinition.hh"
#include "G4AdjointIons.hh"
// ######################################################################
// ### ADJOINT PROTON ###
// ######################################################################
class G4AdjointProton : public G4ParticleDefinition
{
private:
static G4AdjointProton* theInstance;
G4AdjointProton(){}
~G4AdjointProton() override= default;
public:
static G4AdjointProton* Definition();
static G4AdjointProton* AdjointProtonDefinition();
static G4AdjointProton* AdjointProton();
public:
static G4AdjointProton* Definition();
static G4AdjointProton* AdjointProtonDefinition();
static G4AdjointProton* AdjointProton();
private:
G4AdjointProton() {}
~G4AdjointProton() override = default;
static G4AdjointProton* theInstance;
};
#endif
@@ -23,43 +23,36 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// 1 July 2009 creation by L. Desorgher based on a modification of G4Triton
// History:
// 1 July 2009 creation by L. Desorgher based on a modification of G4Triton
//
//-------------------------------------------------------------
// Documentation:
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
// Adjoint particles are used in Reverse/Adjoint Monte Carlo simulations. New adjoint
// processes act on adjoint particles when they are tracked backward in the geometry.
// The use of adjoint particles instead of "normal" particles during a reverse simulation
// is based on an idea of M. Asai.
//
#ifndef G4AdjointTriton_h
#define G4AdjointTriton_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4ParticleDefinition.hh"
#include "G4AdjointIons.hh"
// ######################################################################
// ### ADJOINT TRITON ###
// ######################################################################
class G4AdjointTriton : public G4AdjointIons
{
private:
static G4AdjointTriton* theInstance;
G4AdjointTriton(){}
~G4AdjointTriton() override= default;
public:
static G4AdjointTriton* Definition();
static G4AdjointTriton* TritonDefinition();
static G4AdjointTriton* Triton();
public:
static G4AdjointTriton* Definition();
static G4AdjointTriton* TritonDefinition();
static G4AdjointTriton* Triton();
private:
G4AdjointTriton() {}
~G4AdjointTriton() override = default;
static G4AdjointTriton* theInstance;
};
#endif
+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();
}