Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# $Id: GNUmakefile 94089 2015-11-05 15:12:13Z gcosmo $
|
||||
# $Id: GNUmakefile 108674 2018-02-27 07:32:51Z gcosmo $
|
||||
# ---------------------------------------------------------------------------
|
||||
# GNUmakefile for physics_lists/constructors/factory library.
|
||||
# GNUmakefile for physics_lists/constructors/factory library.
|
||||
# Gunter Folger 10-Jan-2012.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -17,6 +17,7 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/global/HEPRandom/include \
|
||||
-I$(G4BASE)/global/HEPNumerics/include \
|
||||
-I$(G4BASE)/global/HEPGeometry/include \
|
||||
-I$(G4BASE)/geometry/biasing/include \
|
||||
-I$(G4BASE)/geometry/volumes/include \
|
||||
-I$(G4BASE)/geometry/management/include \
|
||||
-I$(G4BASE)/geometry/magneticfield/include \
|
||||
@@ -31,16 +32,17 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/particles/hadrons/barions/include \
|
||||
-I$(G4BASE)/particles/hadrons/ions/include \
|
||||
-I$(G4BASE)/run/include \
|
||||
-I$(G4BASE)/physics_lists/builders/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/decay/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/electromagnetic/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/gamma_lepto_nuclear/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/hadron_elastic/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/hadron_inelastic/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/limiters/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/ions/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/stopping/include \
|
||||
-I$(G4BASE)/physics_lists/util/include \
|
||||
-I$(G4BASE)/physics_lists/builders/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/decay/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/electromagnetic/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/gamma_lepto_nuclear/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/hadron_elastic/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/hadron_inelastic/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/limiters/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/ions/include \
|
||||
-I$(G4BASE)/physics_lists/constructors/stopping/include \
|
||||
-I$(G4BASE)/physics_lists/util/include \
|
||||
-I$(G4BASE)/processes/biasing/importance/include \
|
||||
-I$(G4BASE)/processes/management/include \
|
||||
-I$(G4BASE)/processes/transportation/include \
|
||||
-I$(G4BASE)/processes/decay/include \
|
||||
@@ -67,7 +69,7 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/binary_cascade/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/cascade/cascade/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/qmd/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/qmd/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/coherent_elastic/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/evaporation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/fermi_breakup/include \
|
||||
|
||||
@@ -7,13 +7,30 @@ $Id: History 66241 2012-12-13 18:34:42Z gunter $
|
||||
|
||||
Hadronic physics-list/constructors/factory History
|
||||
--------------------------------------------------
|
||||
This file should be used to briefly summarize all major modifications
|
||||
This file should be used to briefly summarize all major modifications
|
||||
introduced in the code and keeptrack of all tags.
|
||||
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
16-Mar-2018, Robert Hatcher (phys-ctor-fact-V10-04-02)
|
||||
- Allows override of exclusion of G4RegisterPhysicsConstructors.icc
|
||||
when using WIN32 by setting USING_STATIC_LIBS
|
||||
|
||||
28-Feb-2018, Robert Hatcher (phys-ctor-fact-V10-04-01)
|
||||
- WIN32 linker works differently then Unix for externals in shared mode
|
||||
Special case WIN32 (for both shared & static builds for now)
|
||||
|
||||
26-Feb-2018, Robert Hatcher (phys-ctor-fact-V10-04-00)
|
||||
- Move G4_REFERENCE_PHYSCONSTR_FACTORY macro calls out of
|
||||
G4PhysicsConstructorRegistry.cc, where they cause an implicit
|
||||
circular link when building granular libraries, and into a new
|
||||
G4RegisterPhysicsConstructors.icc, where they can be included
|
||||
as necessary in a higher level compilation unit.
|
||||
- REFERENCE macro calls can be made unique by #define REGREF <anything>
|
||||
- Whitespace cleanup
|
||||
|
||||
01-May-2017, Sebastien Incerti (phys-ctor-fact-V10-03-00)
|
||||
- added Geant4-DNA stationary constructors
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor) \
|
||||
const G4PhysicsConstructorFactory<physics_constructor>& physics_constructor##Factory = G4PhysicsConstructorFactory<physics_constructor>(#physics_constructor)
|
||||
|
||||
@@ -76,16 +75,21 @@ public:
|
||||
// the compilation unit static variable from the library and cause it
|
||||
// to be initialized (and thus self-register)
|
||||
|
||||
// Use REGREF to allow cases where REFERENCE macro is used twice
|
||||
#ifndef REGREF
|
||||
#define REGREF 0
|
||||
#endif
|
||||
|
||||
#define G4_REFERENCE_PHYSCONSTR_FACTORY(physics_constructor) \
|
||||
class physics_constructor; \
|
||||
extern const G4PhysicsConstructorFactory<physics_constructor>& physics_constructor##Factory; \
|
||||
const G4PhysicsConstructorFactory<physics_constructor>& physics_constructor##FactoryRef = physics_constructor##Factory
|
||||
const G4PhysicsConstructorFactory<physics_constructor>& physics_constructor##FactoryRef##REGREF = physics_constructor##Factory
|
||||
|
||||
#define G4_REFERENCE_PHYSCONSTR_FACTORY_NS( physics_constructor, nsname, pcbase ) \
|
||||
namespace nsname { \
|
||||
class pcbase; \
|
||||
extern const G4PhysicsConstructorFactory<physics_constructor>& pcbase##Factory; \
|
||||
const G4PhysicsConstructorFactory<physics_constructor>& pcbase##FactoryRef = pcbase##Factory; \
|
||||
const G4PhysicsConstructorFactory<physics_constructor>& pcbase##FactoryRef##REGREF = pcbase##Factory; \
|
||||
} \
|
||||
typedef int xyzzy__LINE__
|
||||
// eat trailing semicolon using silly typedef
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id:
|
||||
// $Id:
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
@@ -37,7 +37,7 @@
|
||||
// Author W. Pokorski 21.09.2012
|
||||
//
|
||||
// Modifications:
|
||||
//
|
||||
//
|
||||
//
|
||||
// Class Description
|
||||
// This is a singleton keeping pointers to all physics constructors
|
||||
@@ -59,10 +59,10 @@ class G4PhysicsConstructorRegistry
|
||||
public:
|
||||
|
||||
static G4PhysicsConstructorRegistry* Instance();
|
||||
// access
|
||||
|
||||
// access
|
||||
|
||||
~G4PhysicsConstructorRegistry();
|
||||
|
||||
|
||||
void Register(G4VPhysicsConstructor*);
|
||||
//register new physics constructors
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
|
||||
void Clean();
|
||||
//clean the store
|
||||
|
||||
|
||||
void AddFactory(G4String, G4VBasePhysConstrFactory*);
|
||||
|
||||
G4VPhysicsConstructor* GetPhysicsConstructor(const G4String& name);
|
||||
@@ -81,13 +81,13 @@ public:
|
||||
std::vector<G4String> AvailablePhysicsConstructors() const;
|
||||
|
||||
void PrintAvailablePhysicsConstructors() const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsConstructorRegistry();
|
||||
|
||||
static G4ThreadLocal G4PhysicsConstructorRegistry* theInstance;
|
||||
|
||||
|
||||
std::vector <G4VPhysicsConstructor*> physConstr;
|
||||
|
||||
std::map <G4String, G4VBasePhysConstrFactory*> factories;
|
||||
|
||||
@@ -0,0 +1,274 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RegisterPhysLists.icc 66704 2013-01-10 18:20:17Z rhatcher $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: RegisterPhysicsConstructors.icc
|
||||
//
|
||||
// Author: R. Hatcher 2018-02-06
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#if defined(WIN32) && !defined(USING_STATIC_LIBS)
|
||||
// WIN32 linker/loader works differently than on unix
|
||||
// these G4_REFERENCE_PHYSCONSTR_FACTORY macro calls in fact can't be used
|
||||
// in "shared" link mode. In principle they _should_ be called
|
||||
// in "static" link mode (that's the point of this file).
|
||||
// Currently there is no build -D flag that distinquishes the two cases...
|
||||
// but users can set USING_STATIC_LIBS
|
||||
#define G4RegisterPhysicsConstructors_icc 1
|
||||
#endif // WIN32
|
||||
|
||||
//
|
||||
#ifndef G4RegisterPhysicsConstructors_icc
|
||||
#define G4RegisterPhysicsConstructors_icc 1
|
||||
|
||||
#include "G4PhysicsConstructorFactory.hh"
|
||||
//
|
||||
// External reference to phy ctor factories for running with 'static'
|
||||
// libraries to pull the references of the declared factories into the
|
||||
// same compilation unit as the registry itself.
|
||||
// No harm having them in the non-static case.
|
||||
//
|
||||
// Using the G4_REFERENCE_PHYSCONSTR_FACTORY macro does _not_ require
|
||||
// including the headers (using G4_DECLARE_PHYSCONSTR_FACTORY does,
|
||||
// but those are done in each phys_ctor's implementation itself).
|
||||
//
|
||||
// For static builds this needs to be included in a compilation unit
|
||||
// for something that is going to use the G4PhysicsConstructorRegistry
|
||||
// as a source of physics constructors (but not in the registration
|
||||
// of the constructors themselves; that is via the G4_DECLARE_PHYSCONSTR_FACTORY
|
||||
// macro). This is necessary when using static libraries in order that the
|
||||
// individual phys_ctor compilation units to be included in the final
|
||||
// executable, and thus available to self-register w/ the
|
||||
// G4PhysicsConstructorRegistry to make themselves available.
|
||||
//
|
||||
// For granular builds this needs to be included at a higher level
|
||||
// than any of the phys_ctor_X libraries in order to avoid introducing
|
||||
// an effective ciruclar link.
|
||||
|
||||
//#include "G4ChargeExchangePhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4ChargeExchangePhysics);
|
||||
|
||||
//#include "G4DecayPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4DecayPhysics);
|
||||
|
||||
//#include "G4EmDNAChemistry.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAChemistry);
|
||||
|
||||
//#include "G4EmDNAPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics);
|
||||
|
||||
//#include "G4EmDNAPhysics_option1.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option1);
|
||||
|
||||
//#include "G4EmDNAPhysics_option2.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option2);
|
||||
|
||||
//#include "G4EmDNAPhysics_option3.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option3);
|
||||
|
||||
//#include "G4EmDNAPhysics_option4.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option4);
|
||||
|
||||
//#include "G4EmDNAPhysics_option5.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option5);
|
||||
|
||||
//#include "G4EmDNAPhysics_option6.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option6);
|
||||
|
||||
//#include "G4EmDNAPhysics_option7.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option7);
|
||||
|
||||
//#include "G4EmDNAPhysics_stationary.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_stationary);
|
||||
|
||||
//#include "G4EmDNAPhysics_stationary_option2.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_stationary_option2);
|
||||
|
||||
//#include "G4EmDNAPhysics_stationary_option4.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_stationary_option4);
|
||||
|
||||
//#include "G4EmDNAPhysics_stationary_option6.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_stationary_option6);
|
||||
|
||||
//#include "G4EmExtraPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmExtraPhysics);
|
||||
|
||||
//#include "G4EmLivermorePhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmLivermorePhysics);
|
||||
|
||||
//#include "G4EmLivermorePolarizedPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmLivermorePolarizedPhysics);
|
||||
|
||||
//#include "G4EmLowEPPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmLowEPPhysics);
|
||||
|
||||
//#include "G4EmPenelopePhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmPenelopePhysics);
|
||||
|
||||
//#include "G4EmStandardPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics);
|
||||
|
||||
//#include "G4EmStandardPhysicsGS.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsGS);
|
||||
|
||||
//#include "G4EmStandardPhysicsSS.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsSS);
|
||||
|
||||
//#include "G4EmStandardPhysicsWVI.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsWVI);
|
||||
|
||||
//#include "G4EmStandardPhysics_option1.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option1);
|
||||
|
||||
//#include "G4EmStandardPhysics_option2.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option2);
|
||||
|
||||
//#include "G4EmStandardPhysics_option3.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option3);
|
||||
|
||||
//#include "G4EmStandardPhysics_option4.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option4);
|
||||
|
||||
//#include "G4GenericBiasingPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4GenericBiasingPhysics);
|
||||
|
||||
//#include "G4HadronDElasticPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronDElasticPhysics);
|
||||
|
||||
//#include "G4HadronElasticPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysics);
|
||||
|
||||
//#include "G4HadronElasticPhysicsHP.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysicsHP);
|
||||
|
||||
//#include "G4HadronElasticPhysicsLEND.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysicsLEND);
|
||||
|
||||
//#include "G4HadronElasticPhysicsXS.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysicsXS);
|
||||
|
||||
//#include "G4HadronHElasticPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronHElasticPhysics);
|
||||
|
||||
//#include "G4HadronInelasticQBBC.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronInelasticQBBC);
|
||||
|
||||
//#include "G4HadronPhysicsFTFP_BERT.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT);
|
||||
|
||||
//#include "G4HadronPhysicsFTFP_BERT_ATL.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_ATL);
|
||||
|
||||
//#include "G4HadronPhysicsFTFP_BERT_HP.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_HP);
|
||||
|
||||
//#include "G4HadronPhysicsFTFP_BERT_TRV.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_TRV);
|
||||
|
||||
//#include "G4HadronPhysicsFTF_BIC.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTF_BIC);
|
||||
|
||||
//#include "G4HadronPhysicsINCLXX.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsINCLXX);
|
||||
|
||||
//#include "G4HadronPhysicsNuBeam.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsNuBeam);
|
||||
|
||||
//#include "G4HadronPhysicsQGSP_BERT.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT);
|
||||
|
||||
//#include "G4HadronPhysicsQGSP_BERT_HP.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT_HP);
|
||||
|
||||
//#include "G4HadronPhysicsQGSP_BIC.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC);
|
||||
|
||||
//#include "G4HadronPhysicsQGSP_BIC_AllHP.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC_AllHP);
|
||||
|
||||
//#include "G4HadronPhysicsQGSP_BIC_HP.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC_HP);
|
||||
|
||||
//#include "G4HadronPhysicsQGSP_FTFP_BERT.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_FTFP_BERT);
|
||||
|
||||
//#include "G4HadronPhysicsQGS_BIC.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGS_BIC);
|
||||
|
||||
//#include "G4HadronPhysicsShielding.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsShielding);
|
||||
|
||||
//#include "G4ImportanceBiasing.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4ImportanceBiasing);
|
||||
|
||||
//#include "G4IonBinaryCascadePhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonBinaryCascadePhysics);
|
||||
|
||||
//#include "G4IonElasticPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonElasticPhysics);
|
||||
|
||||
//#include "G4IonINCLXXPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonINCLXXPhysics);
|
||||
|
||||
//#include "G4IonPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonPhysics);
|
||||
|
||||
//#include "G4IonQMDPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonQMDPhysics);
|
||||
|
||||
//#include "G4NeutronCrossSectionXS.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4NeutronCrossSectionXS);
|
||||
|
||||
//#include "G4NeutronTrackingCut.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4NeutronTrackingCut);
|
||||
|
||||
//#include "G4OpticalPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4OpticalPhysics);
|
||||
|
||||
//#include "G4ParallelWorldPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4ParallelWorldPhysics);
|
||||
|
||||
//#include "G4RadioactiveDecayPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4RadioactiveDecayPhysics);
|
||||
|
||||
//#include "G4SpinDecayPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4SpinDecayPhysics);
|
||||
|
||||
//#include "G4StepLimiterPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4StepLimiterPhysics);
|
||||
|
||||
//#include "G4StoppingPhysics.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4StoppingPhysics);
|
||||
|
||||
//#include "G4WeightWindowBiasing.hh"
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4WeightWindowBiasing);
|
||||
|
||||
#endif // G4RegisterPhysicsConstructors_icc
|
||||
@@ -104,10 +104,11 @@ include_directories(${CMAKE_SOURCE_DIR}/source/tracking/include)
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4phys_ctor_factory
|
||||
HEADERS
|
||||
G4PhysicsConstructorFactory.hh
|
||||
G4RegisterPhysicsConstructors.icc
|
||||
G4PhysicsConstructorFactory.hh
|
||||
G4PhysicsConstructorRegistry.hh
|
||||
SOURCES
|
||||
G4PhysicsConstructorRegistry.cc
|
||||
G4PhysicsConstructorRegistry.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4baryons
|
||||
G4bosons
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id:
|
||||
// $Id:
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -41,7 +41,11 @@
|
||||
#include "G4ios.hh"
|
||||
#include <iomanip>
|
||||
|
||||
// force REFERENCE macros _not_ to be expanded here
|
||||
// but wherever the class is used (w/ that .hh use)
|
||||
#define G4PhysicsConstructorRegistry_cc 1
|
||||
#include "G4PhysicsConstructorRegistry.hh"
|
||||
|
||||
#include "G4VPhysicsConstructor.hh"
|
||||
#include "G4PhysicsConstructorFactory.hh"
|
||||
|
||||
@@ -66,7 +70,7 @@ G4PhysicsConstructorRegistry::~G4PhysicsConstructorRegistry()
|
||||
|
||||
void G4PhysicsConstructorRegistry::Clean()
|
||||
{
|
||||
size_t n = physConstr.size();
|
||||
size_t n = physConstr.size();
|
||||
if(n > 0) {
|
||||
for (size_t i=0; i<n; ++i) {
|
||||
if(physConstr[i]) {
|
||||
@@ -82,7 +86,7 @@ void G4PhysicsConstructorRegistry::Clean()
|
||||
void G4PhysicsConstructorRegistry::Register(G4VPhysicsConstructor* p)
|
||||
{
|
||||
if(!p) return;
|
||||
size_t n = physConstr.size();
|
||||
size_t n = physConstr.size();
|
||||
if(n > 0) {
|
||||
for (size_t i=0; i<n; ++i) {
|
||||
if(physConstr[i] == p) { return; }
|
||||
@@ -94,7 +98,7 @@ void G4PhysicsConstructorRegistry::Register(G4VPhysicsConstructor* p)
|
||||
void G4PhysicsConstructorRegistry::DeRegister(G4VPhysicsConstructor* p)
|
||||
{
|
||||
if ( !p ) return;
|
||||
size_t n = physConstr.size();
|
||||
size_t n = physConstr.size();
|
||||
if ( n > 0 ) {
|
||||
for (size_t i=0; i<n; ++i) {
|
||||
if ( physConstr[i] == p ) {
|
||||
@@ -119,7 +123,7 @@ G4VPhysicsConstructor* G4PhysicsConstructorRegistry::GetPhysicsConstructor(const
|
||||
// we could store the list of called factories in some vector and
|
||||
// before returning we can could first check if this physics constructor was already instantiated
|
||||
// if yes, we can throw an exception saying that this physics can been already registered
|
||||
|
||||
|
||||
return factories[name]->Instantiate();
|
||||
}
|
||||
else
|
||||
@@ -164,75 +168,19 @@ void G4PhysicsConstructorRegistry::PrintAvailablePhysicsConstructors() const
|
||||
}
|
||||
|
||||
//
|
||||
// External reference to phy ctor factories for running with 'static'
|
||||
// External reference to phy ctor factories for running with 'static'
|
||||
// libraries to pull the references of the declared factories into the
|
||||
// same compilation unit as the registry itself.
|
||||
// No harm having them in the non-static case.
|
||||
//
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4ChargeExchangePhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4DecayPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAChemistry);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option1);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option2);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option3);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option4);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option5);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option6);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option7);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_stationary);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_stationary_option2);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_stationary_option4);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_stationary_option6);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmExtraPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmLivermorePhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmLivermorePolarizedPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmLowEPPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmPenelopePhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsGS);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsSS);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsWVI);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option1);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option2);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option3);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option4);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4GenericBiasingPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronDElasticPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysicsHP);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysicsLEND);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysicsXS);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronHElasticPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronInelasticQBBC);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_ATL);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_HP);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_TRV);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTF_BIC);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsINCLXX);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsNuBeam);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT_HP);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC_AllHP);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC_HP);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_FTFP_BERT);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGS_BIC);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsShielding);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4ImportanceBiasing);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonBinaryCascadePhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonElasticPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonINCLXXPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonQMDPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4NeutronCrossSectionXS);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4NeutronTrackingCut);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4OpticalPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4ParallelWorldPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4RadioactiveDecayPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4SpinDecayPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4StepLimiterPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4StoppingPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4WeightWindowBiasing);
|
||||
|
||||
// Ideally we'd do the G4_REFERENCE_PHYSCONSTR_FACTORY() macros
|
||||
// here, but this introduces a circular dependence between the
|
||||
// ctor_phys_factory library and the other ctor_phys_* libraries
|
||||
// when creating granular libraries.
|
||||
// Instead we'll make the references in the location(s) where the
|
||||
// G4PhysicsConstructorRegistry is _used_ :
|
||||
// G4
|
||||
/*
|
||||
#include "G4RegisterPhysicsConstructors.icc"
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user