Import Geant4 10.4.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2017-06-30 10:49:55 +02:00
parent 3a5407696b
commit 1a1316fea4
2180 changed files with 237880 additions and 59109 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointSimManager.hh 102566 2017-02-09 08:35:24Z gcosmo $
// $Id: G4AdjointSimManager.hh 102435 2017-01-27 08:28:15Z gcosmo $
//
/////////////////////////////////////////////////////////////////////////////////
// Class Name: G4AdjointSimManager.hh
@@ -0,0 +1,71 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
////
//---------------------------------------------------------------
//
// G4BuilderInterface.hh
//
// Class Description:
// Provides the common interface to all types of builders.
//
// Creation date: 09.04.2016 adotti
// Modifications:
//
//---------------------------------------------------------------
#ifndef G4BUILDERINTERFACE_HH
#define G4BUILDERINTERFACE_HH
#include "globals.hh"
class G4PhysicsBuilderInterface {
public:
G4PhysicsBuilderInterface() = default;
virtual ~G4PhysicsBuilderInterface() {}
virtual void Build() {
G4Exception("G4PhysicsBuilderInterface::Build","PHYSBLD001",FatalException,
"Called based class method. Should be implemented in"\
" inherited class");;
}
virtual void RegisterMe(G4PhysicsBuilderInterface*) {
G4Exception("G4PhysicsBuilderInterface::RegisterMe","PHYSBLD001",FatalException,
"Called based class method. Should be implemented in"\
" inherited class, or wrong type of parameter passed.");;
}
virtual void SetMinEnergy(G4double) {
G4Exception("G4PhysicsBuilderInterface::SetMinEnergy","PHYSBLD001",
FatalException,
"Called based class method. Should be implemented in"\
" inherited class");;
}
virtual void SetMaxEnergy(G4double) {
G4Exception("G4PhysicsBuilderInterface::SetMaxEnergy","PHYSBLD001",
FatalException,
"Called based class method. Should be implemented in"\
" inherited class");;
}
};
#endif
+7 -6
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VModularPhysicsList.hh 72043 2013-07-04 12:10:30Z gcosmo $
// $Id: G4VModularPhysicsList.hh 103803 2017-04-27 14:03:05Z gcosmo $
//
//
// ------------------------------------------------------------
@@ -45,6 +45,7 @@
// History
// - first version 12 Nov 2000 by H.Kurashige
// - Add ReplacePhysics 14 Mar 2011 by H.Kurashige
// - Add Worker cleanup 21 Apr 2017 by A.Dotti
//
// ------------------------------------------------------------
#ifndef G4VModularPhysicsList_h
@@ -66,6 +67,8 @@ class G4VMPLData {
public:
void initialize();
typedef std::vector<G4VPhysicsConstructor*> G4PhysConstVectorData;
//TODO: understand this
//See: https://jira-geant4.kek.jp/browse/DEV-284
G4PhysConstVectorData* physicsVector;
};
@@ -101,12 +104,12 @@ class G4VModularPhysicsList: public virtual G4VUserPhysicsList
public: // with description
// This method will be invoked in the Construct() method.
// each particle type will be instantiated
virtual void ConstructParticle();
virtual void ConstructParticle() override;
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
virtual void ConstructProcess() override;
public: // with description
// Register Physics Constructor
@@ -140,9 +143,6 @@ class G4VModularPhysicsList: public virtual G4VUserPhysicsList
// given verbose level is set to all physics constructors
protected: // with description
// vector of pointers to G4VPhysicsConstructor
//typedef std::vector<G4VPhysicsConstructor*> G4PhysConstVector;
//static G4ThreadLocal G4PhysConstVector* physicsVector;
G4int verboseLevel;
typedef G4VMPLData::G4PhysConstVectorData G4PhysConstVector;
G4int g4vmplInstanceID;
@@ -150,6 +150,7 @@ class G4VModularPhysicsList: public virtual G4VUserPhysicsList
public:
inline G4int GetInstanceID() const;
static const G4VMPLManager& GetSubInstanceManager();
virtual void TerminateWorker() override;
};
inline
+15 -4
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VPhysicsConstructor.hh 101155 2016-11-08 08:21:41Z gcosmo $
// $Id: G4VPhysicsConstructor.hh 103953 2017-05-04 11:27:35Z gcosmo $
//
//
// ------------------------------------------------------------
@@ -56,6 +56,7 @@
// first version 12 Nov. 2000 by H.Kurashige
// Add physicsType 14 Mar. 2011 by H.Kurashige
// Add RegisterProcess 1 May 2011 by H.Kurashige
// Add G4PhysicsBuilderInterface 21 Apr 2017 by A.Dotti
// ------------------------------------------------------------
#ifndef G4VPhysicsConstructor_h
#define G4VPhysicsConstructor_h 1
@@ -66,15 +67,19 @@
#include "G4ParticleTable.hh"
#include "G4PhysicsListHelper.hh"
#include "G4VUPLSplitter.hh"
#include <vector>
class G4PhysicsBuilderInterface;
class G4VPCData
{
//Encapsulate the fields of class G4VPhysicsConstructor
//that are per-thread.
public:
using PhysicsBuilders_V=std::vector<G4PhysicsBuilderInterface*>;
void initialize();
G4ParticleTable::G4PTblDicIterator* _aParticleIterator;
PhysicsBuilders_V * _builders;
};
// The type G4VPCManager is introduced to encapsulate the methods used by
@@ -166,13 +171,19 @@ class G4VPhysicsConstructor
G4int g4vpcInstanceID;
G4RUN_DLL static G4VPCManager subInstanceManager;
G4ParticleTable::G4PTblDicIterator* GetParticleIterator() const;
using PhysicsBuilder_V=G4VPCData::PhysicsBuilders_V;
//This returns a copy of the vector of pointers
PhysicsBuilder_V GetBuilders() const;
void AddBuilder(G4PhysicsBuilderInterface* bld);
public:
inline G4int GetInstanceID() const;
static const G4VPCManager& GetSubInstanceManager();
//G4ParticleTable::G4PTblDicIterator* aParticleIterator;
// the particle table has the complete List of existing particle types
//G4PhysicsListHelper* aPLHelper;
//Method called by kernel to destroy thread-local
//data, equivalent to destructor in sequential mode
//Derived classes implementing this method, must also call
//this base class method.
virtual void TerminateWorker();
};
// Inlined methods
+8 -3
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VUserPhysicsList.hh 101155 2016-11-08 08:21:41Z gcosmo $
// $Id: G4VUserPhysicsList.hh 103803 2017-04-27 14:03:05Z gcosmo $
//
//
// ------------------------------------------------------------
@@ -80,6 +80,7 @@
// Added default impelmentation of SetCuts 10 June 2011 H.Kurashige
// SetCuts is not 'pure virtual' any more
// Trasnformations for multi-threading 26 Mar. 2013 A. Dotti
// Added destructions 21 Apr 2017 A. Dotti
// ------------------------------------------------------------
#ifndef G4VUserPhysicsList_h
#define G4VUserPhysicsList_h 1
@@ -396,8 +397,12 @@ class G4VUserPhysicsList
inline G4int GetInstanceID() const;
static const G4VUPLManager& GetSubInstanceManager();
//Used by Worker threads on the shared instance of
// PL to initialize workers
void InitializeWorker();
// PL to initialize workers. Derived class re-implementing this method
// must also call this base class method
virtual void InitializeWorker();
//Destroy thread-local data. Note that derived classes
//implementing this method should still call this base class one
virtual void TerminateWorker();
};
inline void G4VUserPhysicsList::Construct()