Import Geant4 11.2.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2023-06-30 09:09:57 +02:00
parent aef78ca386
commit dd1f179cda
3780 changed files with 212808 additions and 142780 deletions
@@ -27,46 +27,55 @@
//
// Users are requested to cite the following papers:
// - M. Terrissol, A. Baudre, Radiat. Prot. Dosim. 31 (1990) 175-177
// - M.C. Bordage, J. Bordes, S. Edel, M. Terrissol, X. Franceries,
// - M.C. Bordage, J. Bordes, S. Edel, M. Terrissol, X. Franceries,
// M. Bardies, N. Lampe, S. Incerti, Phys. Med. 32 (2016) 1833-1840
//
// Authors of this class:
// Authors of this class:
// M.C. Bordage, M. Terrissol, S. Edel, J. Bordes, S. Incerti
//
// 15.01.2014: creation
//
//
// Based on the study by S. Zein et. al. Nucl. Inst. Meth. B 488 (2021) 70-82
#ifndef G4DNACPA100WaterIonisationStructure_hh
#define G4DNACPA100WaterIonisationStructure_hh 1
#ifndef G4DNACPA100ExcitationStructure_hh
#define G4DNACPA100ExcitationStructure_hh 1
#include "globals.hh"
#include <vector>
class G4DNACPA100WaterIonisationStructure
class G4Material;
class G4DNACPA100ExcitationStructure
{
public:
G4DNACPA100WaterIonisationStructure();
virtual ~G4DNACPA100WaterIonisationStructure();
G4double IonisationEnergy(G4int level);
public:
G4DNACPA100ExcitationStructure();
~G4DNACPA100ExcitationStructure() = default;
G4double ExcitationEnergy(const std::size_t& level, const std::size_t& MatID);
G4double UEnergy(const std::size_t& level, const std::size_t& MatID);
inline std::size_t NumberOfLevels(const std::size_t& MatID)
{
return fnLevels[MatID];
}
G4double UEnergy(G4int level);
private:
void InitialiseGuanine();
void InitialiseWater();
void InitialiseDeoxyribose();
void InitialiseCytosine();
void InitialiseThymine();
void InitialiseAdenine();
void InitialisePhosphate();
G4int NumberOfLevels() { return nLevels; }
// Copy constructor and assignment operator to be added here
private:
// Number of Ionisation levels of the water molecule
G4int nLevels;
std::map<std::size_t /*MatIndex*/, std::size_t> fnLevels;
std::map<std::size_t /*MatIndex*/, std::vector<G4double>> fEnergyConstant;
std::map<std::size_t /*MatIndex*/, std::vector<G4double>> fUConstant;
std::vector<G4double> energyConstant;
std::vector<G4double> UConstant;
G4Material* fpGuanine = nullptr;
G4Material* fpG4_WATER = nullptr;
G4Material* fpDeoxyribose = nullptr;
G4Material* fpCytosine = nullptr;
G4Material* fpThymine = nullptr;
G4Material* fpAdenine = nullptr;
G4Material* fpPhosphate = nullptr;
};
#endif
#endif //
@@ -0,0 +1,89 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Based on the work of M. Terrissol and M. C. Bordage
//
// Users are requested to cite the following papers:
// - M. Terrissol, A. Baudre, Radiat. Prot. Dosim. 31 (1990) 175-177
// - M.C. Bordage, J. Bordes, S. Edel, M. Terrissol, X. Franceries,
// M. Bardies, N. Lampe, S. Incerti, Phys. Med. 32 (2016) 1833-1840
//
// Authors of this class:
// M.C. Bordage, M. Terrissol, S. Edel, J. Bordes, S. Incerti
//
// 15.01.2014: creation
//
//
// Based on the study by S. Zein et. al. Nucl. Inst. Meth. B 488 (2021) 70-82
// 1/2/2023 : Hoang added modification for DNA cross sections
#ifndef G4DNACPA100IonisationStructure_hh
#define G4DNACPA100IonisationStructure_hh
#include "globals.hh"
#include <vector>
class G4Material;
class G4DNACPA100IonisationStructure
{
public:
G4DNACPA100IonisationStructure();
~G4DNACPA100IonisationStructure() = default;
G4double IonisationEnergy(const std::size_t& level, const std::size_t& MatID);
G4double UEnergy(const std::size_t& level, const std::size_t& MatID);
inline std::size_t NumberOfLevels(const std::size_t& MatID)
{
return fnLevels[MatID];
}
private:
void InitialiseGuanine();
void InitialiseWater();
void InitialiseDeoxyribose();
void InitialiseCytosine();
void InitialiseThymine();
void InitialiseAdenine();
void InitialisePhosphate();
std::map<std::size_t /*MatIndex*/, std::size_t> fnLevels;
std::map<std::size_t /*MatIndex*/, std::vector<G4double>> fEnergyConstant;
std::map<std::size_t /*MatIndex*/, std::vector<G4double>> fUConstant;
G4Material* fpGuanine = nullptr;
G4Material* fpG4_WATER = nullptr;
G4Material* fpDeoxyribose = nullptr;
G4Material* fpCytosine = nullptr;
G4Material* fpThymine = nullptr;
G4Material* fpAdenine = nullptr;
G4Material* fpPhosphate = nullptr;
};
#endif // G4DNACPA100IonisationStructure_hh
@@ -23,47 +23,55 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Based on the work of M. Terrissol and M. C. Bordage
//
// Users are requested to cite the following papers:
// - M. Terrissol, A. Baudre, Radiat. Prot. Dosim. 31 (1990) 175-177
// - M.C. Bordage, J. Bordes, S. Edel, M. Terrissol, X. Franceries,
// M. Bardies, N. Lampe, S. Incerti, Phys. Med. 32 (2016) 1833-1840
//
// Authors of this class:
// M.C. Bordage, M. Terrissol, S. Edel, J. Bordes, S. Incerti
//
// 15.01.2014: creation
//
// 1/2/2023: Hoang: this file is used to check avaiable DNA materils,
// and keeps DNA cross sections.
#ifndef G4DNAMaterialManager_hh
#define G4DNAMaterialManager_hh 1
#ifndef G4DNACPA100WaterExcitationStructure_hh
#define G4DNACPA100WaterExcitationStructure_hh 1
#include "globals.hh"
#include <vector>
class G4DNACPA100WaterExcitationStructure
#include "G4DNACrossSectionDataSet.hh"
#include <map>
class G4Material;
class G4ParticleDefinition;
class G4StateManager;
class G4VEmModel;
enum class DNAModelType
{
fDNAIonisation = 0,
fDNAExcitation,
fDNAElastics,
fDNADefault
};
class G4DNAMaterialManager {
public:
G4DNACPA100WaterExcitationStructure();
virtual ~G4DNACPA100WaterExcitationStructure();
G4double ExcitationEnergy(G4int level);
using MaterialMap = std::map<size_t, G4Material*>;
static G4DNAMaterialManager *Instance();
G4DNAMaterialManager(const G4DNAMaterialManager &) = delete;
const G4DNAMaterialManager &operator=(const G4DNAMaterialManager &) = delete;
G4VEmModel* GetModel(const DNAModelType& t);
void SetMasterDataModel(const DNAModelType& t, G4VEmModel* m);
G4bool IsLocked() const;
G4int NumberOfLevels() { return nLevels; }
// Copy constructor and assignment operator to be added here
private:
// Number of excitation levels of the water molecule
G4int nLevels;
G4DNAMaterialManager();
std::vector<G4double> energyConstant;
~G4DNAMaterialManager() = default;
static G4DNAMaterialManager *theInstance;
MaterialMap fMaterials;
G4StateManager* fStateManager = nullptr;
//this data stores only master models.
//this data is only to read then non conflits
std::map<DNAModelType,G4VEmModel*> fData;
};
#endif
@@ -30,29 +30,24 @@
#include "globals.hh"
#include <vector>
#include <map>
class G4Material;
class G4DNAPTBExcitationStructure
{
public:
G4DNAPTBExcitationStructure();
virtual ~G4DNAPTBExcitationStructure() = default;
G4double ExcitationEnergy(G4int ExcLevel, const G4String &materialName);
G4int NumberOfExcLevels(const G4String& materialName);
~G4DNAPTBExcitationStructure() = default;
G4double ExcitationEnergy(const G4int& ExcLevel, const size_t &materialID);
G4int NumberOfExcLevels(const size_t& materialID);
G4DNAPTBExcitationStructure(const G4DNAPTBExcitationStructure&) = delete; // prevent copy-construction
G4DNAPTBExcitationStructure& operator=(
const G4DNAPTBExcitationStructure& right) = delete; // prevent assignement
private:
// Number of Excitation levels of the water molecule
std::map<G4String, G4int> nExcLevels;
std::map<G4String, std::vector<G4double> > energyConstant;
G4String ReplaceMaterial(const G4String &materialName);
std::map<size_t, G4int> nExcLevels;
std::map<size_t, std::vector<G4double> > energyConstant;
size_t ReplaceMaterial(const size_t &materialName);
G4Material* fpN2;
};
#endif
@@ -29,34 +29,38 @@
#ifndef G4DNAPTBIonisationStructure_HH
#define G4DNAPTBIonisationStructure_HH 1
#include "globals.hh"
#include <vector>
#include <map>
#include <vector>
class G4Material;
class G4DNAPTBIonisationStructure
{
public:
public:
G4DNAPTBIonisationStructure();
virtual ~G4DNAPTBIonisationStructure();
G4double IonisationEnergy(G4int level, const G4String &materialName);
~G4DNAPTBIonisationStructure() = default;
G4double IonisationEnergy(G4int level, const size_t& materialName);
G4int NumberOfLevels(const size_t& materialName);
G4DNAPTBIonisationStructure(const G4DNAPTBIonisationStructure&) = delete; // prevent copy-construction
G4DNAPTBIonisationStructure& operator=(
const G4DNAPTBIonisationStructure& right) = delete; // prevent assignement
G4int NumberOfLevels(const G4String& materialName);
// Copy constructor and assignment operator to be added here
private:
private:
// Number of Ionisation levels of the water molecule
std::map<G4String, G4int> nLevels;
std::map<G4String, std::vector<G4double> > energyConstant;
G4String ReplaceMaterial(const G4String &materialName);
std::map<size_t, G4int> nLevels;
std::map<size_t, std::vector<G4double>> energyConstant;
size_t ReplaceMaterial(const size_t& materialID);
G4Material* fpGuanine_PU = nullptr;
G4Material* fpTHF = nullptr;
G4Material* fpPY = nullptr;
G4Material* fpPU = nullptr;
G4Material* fpTMP = nullptr;
G4Material* fpG4_WATER = nullptr;
G4Material* fpBackbone_THF = nullptr;
G4Material* fpCytosine_PY = nullptr;
G4Material* fpThymine_PY = nullptr;
G4Material* fpAdenine_PU = nullptr;
G4Material* fpBackbone_TMP = nullptr;
G4Material* fpN2 = nullptr;
};
#endif