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
@@ -0,0 +1,261 @@
//
// ********************************************************************
// * 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
//
//
// Modified for Adenine material by S. Zein on 20.04.2021
// Based on the study by S. Zein et. al. Nucl. Inst. Meth. B 488 (2021) 70-82
#include "G4DNACPA100ExcitationStructure.hh"
#include "G4Material.hh"
#include "G4SystemOfUnits.hh"
G4DNACPA100ExcitationStructure::G4DNACPA100ExcitationStructure()
{
fpGuanine = G4Material::GetMaterial("G4_GUANINE", false);
fpG4_WATER = G4Material::GetMaterial("G4_WATER", false);
fpDeoxyribose = G4Material::GetMaterial("G4_DEOXYRIBOSE", false);
fpCytosine = G4Material::GetMaterial("G4_CYTOSINE", false);
fpThymine = G4Material::GetMaterial("G4_THYMINE", false);
fpAdenine = G4Material::GetMaterial("G4_ADENINE", false);
fpPhosphate = G4Material::GetMaterial("G4_PHOSPHORIC_ACID", false);
if (fpGuanine != nullptr) {
InitialiseGuanine();
}
if (fpG4_WATER != nullptr) {
InitialiseWater();
}
if (fpDeoxyribose != nullptr) {
InitialiseDeoxyribose();
}
if (fpCytosine != nullptr) {
InitialiseCytosine();
}
if (fpThymine != nullptr) {
InitialiseThymine();
}
if (fpAdenine != nullptr) {
InitialiseAdenine();
}
if (fpPhosphate != nullptr) {
InitialisePhosphate();
}
}
void G4DNACPA100ExcitationStructure::InitialiseGuanine()
{
auto index = fpGuanine->GetIndex();
fEnergyConstant[index].push_back(8.2315 * eV);
fEnergyConstant[index].push_back(11.0928 * eV);
fEnergyConstant[index].push_back(11.5984 * eV);
fEnergyConstant[index].push_back(11.7906 * eV);
fEnergyConstant[index].push_back(11.9382 * eV);
fEnergyConstant[index].push_back(12.4424 * eV);
fEnergyConstant[index].push_back(13.3581 * eV);
fEnergyConstant[index].push_back(15.1381 * eV);
fEnergyConstant[index].push_back(16.4059 * eV);
fEnergyConstant[index].push_back(16.496 * eV);
fEnergyConstant[index].push_back(16.8457 * eV);
fEnergyConstant[index].push_back(17.297 * eV);
fEnergyConstant[index].push_back(18.0608 * eV);
fEnergyConstant[index].push_back(18.441 * eV);
fEnergyConstant[index].push_back(19.2414 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
void G4DNACPA100ExcitationStructure::InitialiseWater()
{
auto index = fpG4_WATER->GetIndex();
// The following values are extracted from the thesis of S. Edel,
// Paul Sabatier University, Toulouse, France, July 7, 2006
// Page 36
fEnergyConstant[index].push_back(8.17 * eV);
fEnergyConstant[index].push_back(10.13 * eV);
fEnergyConstant[index].push_back(11.31 * eV);
fEnergyConstant[index].push_back(12.91 * eV);
fEnergyConstant[index].push_back(14.50 * eV);
fUConstant[index].push_back(61.91 * eV);
fUConstant[index].push_back(59.52 * eV);
fUConstant[index].push_back(48.36 * eV);
fUConstant[index].push_back(70.71 * eV);
fUConstant[index].push_back(796.2 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
void G4DNACPA100ExcitationStructure::InitialiseDeoxyribose()
{
auto index = fpDeoxyribose->GetIndex();
fEnergyConstant[index].push_back(11.2410 * eV);
fEnergyConstant[index].push_back(11.7927 * eV);
fEnergyConstant[index].push_back(12.6579 * eV);
fEnergyConstant[index].push_back(12.8163 * eV);
fEnergyConstant[index].push_back(13.3238 * eV);
fEnergyConstant[index].push_back(13.9487 * eV);
fEnergyConstant[index].push_back(14.4374 * eV);
fEnergyConstant[index].push_back(14.7433 * eV);
fEnergyConstant[index].push_back(15.0818 * eV);
fEnergyConstant[index].push_back(15.6112 * eV);
fEnergyConstant[index].push_back(16.0547 * eV);
fEnergyConstant[index].push_back(16.8319 * eV);
fEnergyConstant[index].push_back(17.4294 * eV);
fEnergyConstant[index].push_back(18.0000 * eV);
fEnergyConstant[index].push_back(18.2696 * eV);
fEnergyConstant[index].push_back(18.6049 * eV);
fEnergyConstant[index].push_back(19.8378 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
void G4DNACPA100ExcitationStructure::InitialiseCytosine()
{
auto index = fpCytosine->GetIndex();
// The following values are extracted from the thesis of S. Edel,
fEnergyConstant[index].push_back(9.3222 * eV);
fEnergyConstant[index].push_back(10.4601 * eV);
fEnergyConstant[index].push_back(11.3044 * eV);
fEnergyConstant[index].push_back(11.9986 * eV);
fEnergyConstant[index].push_back(13.4528 * eV);
fEnergyConstant[index].push_back(14.7371 * eV);
fEnergyConstant[index].push_back(16.2286 * eV);
fEnergyConstant[index].push_back(16.5877 * eV);
fEnergyConstant[index].push_back(17.0741 * eV);
fEnergyConstant[index].push_back(17.1875 * eV);
fEnergyConstant[index].push_back(18.638 * eV);
fEnergyConstant[index].push_back(19.6884 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
void G4DNACPA100ExcitationStructure::InitialiseThymine()
{
// The following values are extracted from the thesis of S. Edel,
auto index = fpThymine->GetIndex();
fEnergyConstant[index].push_back(9.639 * eV);
fEnergyConstant[index].push_back(11.8278 * eV);
fEnergyConstant[index].push_back(12.0876 * eV);
fEnergyConstant[index].push_back(12.9656 * eV);
fEnergyConstant[index].push_back(13.9555 * eV);
fEnergyConstant[index].push_back(15.0774 * eV);
fEnergyConstant[index].push_back(15.4078 * eV);
fEnergyConstant[index].push_back(15.4689 * eV);
fEnergyConstant[index].push_back(16.1964 * eV);
fEnergyConstant[index].push_back(16.8955 * eV);
fEnergyConstant[index].push_back(17.5018 * eV);
fEnergyConstant[index].push_back(18.2979 * eV);
fEnergyConstant[index].push_back(18.4495 * eV);
fEnergyConstant[index].push_back(19.3186 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
void G4DNACPA100ExcitationStructure::InitialiseAdenine()
{
auto index = fpAdenine->GetIndex();
// The following values are extracted from the thesis of S. Edel,
fEnergyConstant[index].push_back(8.5114 * eV);
fEnergyConstant[index].push_back(10.1294 * eV);
fEnergyConstant[index].push_back(11.0606 * eV);
fEnergyConstant[index].push_back(11.5849 * eV);
fEnergyConstant[index].push_back(12.1533 * eV);
fEnergyConstant[index].push_back(13.356 * eV);
fEnergyConstant[index].push_back(13.6554 * eV);
fEnergyConstant[index].push_back(15.3296 * eV);
fEnergyConstant[index].push_back(16.179 * eV);
fEnergyConstant[index].push_back(16.7676 * eV);
fEnergyConstant[index].push_back(17.3489 * eV);
fEnergyConstant[index].push_back(17.5568 * eV);
fEnergyConstant[index].push_back(18.554 * eV);
fEnergyConstant[index].push_back(19.0866 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
void G4DNACPA100ExcitationStructure::InitialisePhosphate()
{
// The following values are extracted from the thesis of S. Edel,
auto index = fpPhosphate->GetIndex();
fEnergyConstant[index].push_back(12.9963 * eV);
fEnergyConstant[index].push_back(12.9972 * eV);
fEnergyConstant[index].push_back(14.3109 * eV);
fEnergyConstant[index].push_back(15.2221 * eV);
fEnergyConstant[index].push_back(16.0591 * eV);
fEnergyConstant[index].push_back(16.0622 * eV);
fEnergyConstant[index].push_back(17.6365 * eV);
fEnergyConstant[index].push_back(17.6401 * eV);
fEnergyConstant[index].push_back(18.8803 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4DNACPA100ExcitationStructure::ExcitationEnergy(const std::size_t& level,
const std::size_t& MatID)
{
G4double ionisation = 0.;
if (level < fnLevels[MatID]) {
ionisation = fEnergyConstant[MatID][level];
}
else {
std::ostringstream oss;
oss << " material was not found. ";
G4Exception("G4DNACPA100ExcitationStructure::ExcitationEnergy", "CPA001", FatalException,
oss.str().c_str());
}
return ionisation;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4DNACPA100ExcitationStructure::UEnergy(const std::size_t& level, const std::size_t& MatID)
{
G4double UEnergy = 0.;
if (level < fnLevels[MatID]) {
UEnergy = fUConstant[MatID][level];
}
else {
std::ostringstream oss;
oss << " material was not found. ";
G4Exception("G4DNACPA100ExcitationStructure::ExcitationEnergy", "CPA001", FatalException,
oss.str().c_str());
}
return UEnergy;
}
@@ -0,0 +1,387 @@
//
// ********************************************************************
// * 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
//
//
// Modified for Adenine material by S. Zein on 20.04.2021
// Based on the study by S. Zein et. al. Nucl. Inst. Meth. B 488 (2021) 70-82
#include "G4DNACPA100IonisationStructure.hh"
#include "G4Material.hh"
#include "G4SystemOfUnits.hh"
G4DNACPA100IonisationStructure::G4DNACPA100IonisationStructure()
{
fpGuanine = G4Material::GetMaterial("G4_GUANINE", false);
fpG4_WATER = G4Material::GetMaterial("G4_WATER", false);
fpDeoxyribose = G4Material::GetMaterial("G4_DEOXYRIBOSE", false);
fpCytosine = G4Material::GetMaterial("G4_CYTOSINE", false);
fpThymine = G4Material::GetMaterial("G4_THYMINE", false);
fpAdenine = G4Material::GetMaterial("G4_ADENINE", false);
fpPhosphate = G4Material::GetMaterial("G4_PHOSPHORIC_ACID", false);
if (fpGuanine != nullptr) {
InitialiseGuanine();
}
if (fpG4_WATER != nullptr) {
InitialiseWater();
}
if (fpDeoxyribose != nullptr) {
InitialiseDeoxyribose();
}
if (fpCytosine != nullptr) {
InitialiseCytosine();
}
if (fpThymine != nullptr) {
InitialiseThymine();
}
if (fpAdenine != nullptr) {
InitialiseAdenine();
}
if (fpPhosphate != nullptr) {
InitialisePhosphate();
}
}
void G4DNACPA100IonisationStructure::InitialiseGuanine()
{
auto index = fpGuanine->GetIndex();
/// Guanine has 39 ionization levels
fEnergyConstant[index].push_back(8.2315 * eV);
fEnergyConstant[index].push_back(11.0928 * eV);
fEnergyConstant[index].push_back(11.5984 * eV);
fEnergyConstant[index].push_back(11.7906 * eV);
fEnergyConstant[index].push_back(11.9382 * eV);
fEnergyConstant[index].push_back(12.4424 * eV);
fEnergyConstant[index].push_back(13.3581 * eV);
fEnergyConstant[index].push_back(15.1381 * eV);
fEnergyConstant[index].push_back(16.4059 * eV);
fEnergyConstant[index].push_back(16.496 * eV);
fEnergyConstant[index].push_back(16.8457 * eV);
fEnergyConstant[index].push_back(17.297 * eV);
fEnergyConstant[index].push_back(18.0608 * eV);
fEnergyConstant[index].push_back(18.441 * eV);
fEnergyConstant[index].push_back(19.2414 * eV);
fEnergyConstant[index].push_back(20.0877 * eV);
fEnergyConstant[index].push_back(20.3321 * eV);
fEnergyConstant[index].push_back(22.0153 * eV);
fEnergyConstant[index].push_back(22.9048 * eV);
fEnergyConstant[index].push_back(24.2447 * eV);
fEnergyConstant[index].push_back(24.692 * eV);
fEnergyConstant[index].push_back(28.2049 * eV);
fEnergyConstant[index].push_back(32.1299 * eV);
fEnergyConstant[index].push_back(33.2774 * eV);
fEnergyConstant[index].push_back(33.3958 * eV);
fEnergyConstant[index].push_back(36.6377 * eV);
fEnergyConstant[index].push_back(37.3483 * eV);
fEnergyConstant[index].push_back(38.3743 * eV);
fEnergyConstant[index].push_back(305.7284 * eV);
fEnergyConstant[index].push_back(307.4187 * eV);
fEnergyConstant[index].push_back(307.8468 * eV);
fEnergyConstant[index].push_back(308.9415 * eV);
fEnergyConstant[index].push_back(309.8057 * eV);
fEnergyConstant[index].push_back(423.1456 * eV);
fEnergyConstant[index].push_back(423.2615 * eV);
fEnergyConstant[index].push_back(424.5211 * eV);
fEnergyConstant[index].push_back(425.006 * eV);
fEnergyConstant[index].push_back(425.0315 * eV);
fEnergyConstant[index].push_back(558.2487 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
void G4DNACPA100IonisationStructure::InitialiseWater()
{
auto index = fpG4_WATER->GetIndex();
// The following values are extracted from the thesis of S. Edel,
// Paul Sabatier University, Toulouse, France, July 7, 2006
// Page 36
fEnergyConstant[index].push_back(10.79 * eV);
fEnergyConstant[index].push_back(13.39 * eV);
fEnergyConstant[index].push_back(16.05 * eV);
fEnergyConstant[index].push_back(32.30 * eV);
fEnergyConstant[index].push_back(539.0 * eV);
fUConstant[index].push_back(61.91 * eV);
fUConstant[index].push_back(59.52 * eV);
fUConstant[index].push_back(48.36 * eV);
fUConstant[index].push_back(70.71 * eV);
fUConstant[index].push_back(796.2 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
void G4DNACPA100IonisationStructure::InitialiseDeoxyribose()
{
auto index = fpDeoxyribose->GetIndex();
fEnergyConstant[index].push_back(11.241 * eV);
fEnergyConstant[index].push_back(11.7927 * eV);
fEnergyConstant[index].push_back(12.6579 * eV);
fEnergyConstant[index].push_back(12.8163 * eV);
fEnergyConstant[index].push_back(13.3238 * eV);
fEnergyConstant[index].push_back(13.9487 * eV);
fEnergyConstant[index].push_back(14.4374 * eV);
fEnergyConstant[index].push_back(14.7433 * eV);
fEnergyConstant[index].push_back(15.0818 * eV);
fEnergyConstant[index].push_back(15.6112 * eV);
fEnergyConstant[index].push_back(16.0547 * eV);
fEnergyConstant[index].push_back(16.8319 * eV);
fEnergyConstant[index].push_back(17.4294 * eV);
fEnergyConstant[index].push_back(18.0 * eV);
fEnergyConstant[index].push_back(18.2696 * eV);
fEnergyConstant[index].push_back(18.6049 * eV);
fEnergyConstant[index].push_back(19.8378 * eV);
fEnergyConstant[index].push_back(20.5787 * eV);
fEnergyConstant[index].push_back(22.0146 * eV);
fEnergyConstant[index].push_back(22.9176 * eV);
fEnergyConstant[index].push_back(24.9005 * eV);
fEnergyConstant[index].push_back(28.0268 * eV);
fEnergyConstant[index].push_back(28.7417 * eV);
fEnergyConstant[index].push_back(36.9571 * eV);
fEnergyConstant[index].push_back(37.1881 * eV);
fEnergyConstant[index].push_back(37.5798 * eV);
fEnergyConstant[index].push_back(39.2622 * eV);
fEnergyConstant[index].push_back(305.446 * eV);
fEnergyConstant[index].push_back(306.6421 * eV);
fEnergyConstant[index].push_back(306.8925 * eV);
fEnergyConstant[index].push_back(307.0377 * eV);
fEnergyConstant[index].push_back(308.5849 * eV);
fEnergyConstant[index].push_back(559.0236 * eV);
fEnergyConstant[index].push_back(559.3832 * eV);
fEnergyConstant[index].push_back(559.6416 * eV);
fEnergyConstant[index].push_back(559.7734 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
void G4DNACPA100IonisationStructure::InitialiseCytosine()
{
auto index = fpCytosine->GetIndex();
/// Cytosine has 29 ionization levels
fEnergyConstant[index].push_back(9.3222 * eV);
fEnergyConstant[index].push_back(10.4601 * eV);
fEnergyConstant[index].push_back(11.3044 * eV);
fEnergyConstant[index].push_back(11.9986 * eV);
fEnergyConstant[index].push_back(13.4528 * eV);
fEnergyConstant[index].push_back(14.7371 * eV);
fEnergyConstant[index].push_back(16.2286 * eV);
fEnergyConstant[index].push_back(16.5877 * eV);
fEnergyConstant[index].push_back(17.0741 * eV);
fEnergyConstant[index].push_back(17.1875 * eV);
fEnergyConstant[index].push_back(18.638 * eV);
fEnergyConstant[index].push_back(19.6884 * eV);
fEnergyConstant[index].push_back(20.8713 * eV);
fEnergyConstant[index].push_back(20.9056 * eV);
fEnergyConstant[index].push_back(24.0179 * eV);
fEnergyConstant[index].push_back(24.5543 * eV);
fEnergyConstant[index].push_back(29.0576 * eV);
fEnergyConstant[index].push_back(32.0504 * eV);
fEnergyConstant[index].push_back(34.5499 * eV);
fEnergyConstant[index].push_back(35.5664 * eV);
fEnergyConstant[index].push_back(38.0707 * eV);
fEnergyConstant[index].push_back(305.7622 * eV);
fEnergyConstant[index].push_back(307.9891 * eV);
fEnergyConstant[index].push_back(308.674 * eV);
fEnergyConstant[index].push_back(309.0146 * eV);
fEnergyConstant[index].push_back(422.5331 * eV);
fEnergyConstant[index].push_back(424.1245 * eV);
fEnergyConstant[index].push_back(424.7781 * eV);
fEnergyConstant[index].push_back(557.6346 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
void G4DNACPA100IonisationStructure::InitialiseThymine()
{
// The following values are extracted from the thesis of S. Edel,
auto index = fpThymine->GetIndex();
/// THYMINE has 33 ionization levels
fEnergyConstant[index].push_back(9.639 * eV);
fEnergyConstant[index].push_back(11.8278 * eV);
fEnergyConstant[index].push_back(12.0876 * eV);
fEnergyConstant[index].push_back(12.9656 * eV);
fEnergyConstant[index].push_back(13.9555 * eV);
fEnergyConstant[index].push_back(15.0774 * eV);
fEnergyConstant[index].push_back(15.4078 * eV);
fEnergyConstant[index].push_back(15.4689 * eV);
fEnergyConstant[index].push_back(16.1964 * eV);
fEnergyConstant[index].push_back(16.8955 * eV);
fEnergyConstant[index].push_back(17.5018 * eV);
fEnergyConstant[index].push_back(18.2979 * eV);
fEnergyConstant[index].push_back(18.4495 * eV);
fEnergyConstant[index].push_back(19.3186 * eV);
fEnergyConstant[index].push_back(20.9944 * eV);
fEnergyConstant[index].push_back(21.0797 * eV);
fEnergyConstant[index].push_back(24.3676 * eV);
fEnergyConstant[index].push_back(24.9072 * eV);
fEnergyConstant[index].push_back(26.3981 * eV);
fEnergyConstant[index].push_back(30.1684 * eV);
fEnergyConstant[index].push_back(33.9007 * eV);
fEnergyConstant[index].push_back(35.6553 * eV);
fEnergyConstant[index].push_back(38.4935 * eV);
fEnergyConstant[index].push_back(39.3191 * eV);
fEnergyConstant[index].push_back(305.6808 * eV);
fEnergyConstant[index].push_back(306.1885 * eV);
fEnergyConstant[index].push_back(307.9374 * eV);
fEnergyConstant[index].push_back(309.3127 * eV);
fEnergyConstant[index].push_back(310.2121 * eV);
fEnergyConstant[index].push_back(424.8945 * eV);
fEnergyConstant[index].push_back(425.2178 * eV);
fEnergyConstant[index].push_back(558.7154 * eV);
fEnergyConstant[index].push_back(558.8106 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
void G4DNACPA100IonisationStructure::InitialiseAdenine()
{
auto index = fpAdenine->GetIndex();
/// Adenine has 35 ionization levels
fEnergyConstant[index].push_back(8.5114 * eV);
fEnergyConstant[index].push_back(10.1294 * eV);
fEnergyConstant[index].push_back(11.0606 * eV);
fEnergyConstant[index].push_back(11.5849 * eV);
fEnergyConstant[index].push_back(12.1533 * eV);
fEnergyConstant[index].push_back(13.356 * eV);
fEnergyConstant[index].push_back(13.6554 * eV);
fEnergyConstant[index].push_back(15.3296 * eV);
fEnergyConstant[index].push_back(16.179 * eV);
fEnergyConstant[index].push_back(16.7676 * eV);
fEnergyConstant[index].push_back(17.3489 * eV);
fEnergyConstant[index].push_back(17.5568 * eV);
fEnergyConstant[index].push_back(18.554 * eV);
fEnergyConstant[index].push_back(19.0866 * eV);
fEnergyConstant[index].push_back(20.2559 * eV);
fEnergyConstant[index].push_back(21.4027 * eV);
fEnergyConstant[index].push_back(23.0384 * eV);
fEnergyConstant[index].push_back(23.9742 * eV);
fEnergyConstant[index].push_back(24.479 * eV);
fEnergyConstant[index].push_back(28.3224 * eV);
fEnergyConstant[index].push_back(31.4796 * eV);
fEnergyConstant[index].push_back(32.4597 * eV);
fEnergyConstant[index].push_back(34.1263 * eV);
fEnergyConstant[index].push_back(35.6423 * eV);
fEnergyConstant[index].push_back(37.5026 * eV);
fEnergyConstant[index].push_back(305.9305 * eV);
fEnergyConstant[index].push_back(307.4532 * eV);
fEnergyConstant[index].push_back(307.6866 * eV);
fEnergyConstant[index].push_back(307.8303 * eV);
fEnergyConstant[index].push_back(308.2887 * eV);
fEnergyConstant[index].push_back(422.8443 * eV);
fEnergyConstant[index].push_back(423.0296 * eV);
fEnergyConstant[index].push_back(423.3954 * eV);
fEnergyConstant[index].push_back(423.8101 * eV);
fEnergyConstant[index].push_back(425.0749 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
void G4DNACPA100IonisationStructure::InitialisePhosphate()
{
auto index = fpPhosphate->GetIndex();
/// Phosphate has 25 ionization levels
fEnergyConstant[index].push_back(12.9963 * eV);
fEnergyConstant[index].push_back(12.9972 * eV);
fEnergyConstant[index].push_back(14.3109 * eV);
fEnergyConstant[index].push_back(15.2221 * eV);
fEnergyConstant[index].push_back(16.0591 * eV);
fEnergyConstant[index].push_back(16.0622 * eV);
fEnergyConstant[index].push_back(17.6365 * eV);
fEnergyConstant[index].push_back(17.6401 * eV);
fEnergyConstant[index].push_back(18.8803 * eV);
fEnergyConstant[index].push_back(20.6975 * eV);
fEnergyConstant[index].push_back(20.7054 * eV);
fEnergyConstant[index].push_back(24.2764 * eV);
fEnergyConstant[index].push_back(35.6676 * eV);
fEnergyConstant[index].push_back(38.1681 * eV);
fEnergyConstant[index].push_back(38.1685 * eV);
fEnergyConstant[index].push_back(40.1946 * eV);
fEnergyConstant[index].push_back(150.138 * eV);
fEnergyConstant[index].push_back(150.1381 * eV);
fEnergyConstant[index].push_back(150.1414 * eV);
fEnergyConstant[index].push_back(207.3392 * eV);
fEnergyConstant[index].push_back(558.1119 * eV);
fEnergyConstant[index].push_back(560.5803 * eV);
fEnergyConstant[index].push_back(560.5808 * eV);
fEnergyConstant[index].push_back(560.5817 * eV);
fEnergyConstant[index].push_back(2179.592 * eV);
fnLevels[index] = fEnergyConstant[index].size();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4DNACPA100IonisationStructure::IonisationEnergy(const std::size_t& level,
const std::size_t& MatID)
{
G4double ionisation = 0.;
if (level < fnLevels[MatID]) {
ionisation = fEnergyConstant[MatID][level];
}
else {
std::ostringstream oss;
oss << " material was not found. ";
G4Exception("G4DNACPA100IonisationStructure::IonisationEnergy", "CPA013", FatalException,
oss.str().c_str());
}
return ionisation;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4DNACPA100IonisationStructure::UEnergy(const std::size_t& level, const std::size_t& MatID)
{
G4double UEnergy = 0.;
if (level < fnLevels[MatID]) {
UEnergy = fUConstant[MatID][level];
}
else {
std::ostringstream oss;
oss << " material was not found. ";
G4Exception("G4DNACPA100IonisationStructure::IonisationEnergy", "CPA001", FatalException,
oss.str().c_str());
}
return UEnergy;
}
@@ -1,85 +0,0 @@
//
// ********************************************************************
// * 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
//
#include "G4DNACPA100WaterIonisationStructure.hh"
#include "G4SystemOfUnits.hh"
G4DNACPA100WaterIonisationStructure::G4DNACPA100WaterIonisationStructure(): nLevels(5)
{
energyConstant.push_back(10.79*eV);
energyConstant.push_back(13.39*eV);
energyConstant.push_back(16.05*eV);
energyConstant.push_back(32.30*eV);
energyConstant.push_back(539.0*eV);
UConstant.push_back(61.91*eV);
UConstant.push_back(59.52*eV);
UConstant.push_back(48.36*eV);
UConstant.push_back(70.71*eV);
UConstant.push_back(796.2*eV);
nLevels = (G4int)energyConstant.size();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4DNACPA100WaterIonisationStructure::~G4DNACPA100WaterIonisationStructure()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4DNACPA100WaterIonisationStructure::IonisationEnergy(G4int level)
{
G4double ionisation = 0.;
if (level >=0 && level < nLevels) ionisation = energyConstant[level];
return ionisation;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4DNACPA100WaterIonisationStructure::UEnergy(G4int level)
{
G4double ionisation = 0.;
if (level >=0 && level < nLevels) ionisation = UConstant[level];
return ionisation;
}
@@ -59,7 +59,7 @@
#include "G4MoleculeFinder.hh"
#include "G4MoleculeTable.hh"
#include "G4PhysChemIO.hh"
#include "G4VUserPulseInfo.hh"
G4DNAChemistryManager* G4DNAChemistryManager::fgInstance = nullptr;
@@ -648,7 +648,18 @@ void G4DNAChemistryManager::CreateWaterMolecule(ElectronicModification modificat
break;
}
G4Track* pH2OTrack = pH2OMolecule->BuildTrack(picosecond,
G4double delayedTime = 0.;
if(pIncomingTrack->GetUserInformation() != nullptr)
{
auto pPulseInfo = dynamic_cast<G4VUserPulseInfo*>
(pIncomingTrack->GetUserInformation());
if(pPulseInfo != nullptr)
{
delayedTime = pPulseInfo->GetDelayedTime();
}
}
G4Track* pH2OTrack = pH2OMolecule->BuildTrack(picosecond + delayedTime,
pIncomingTrack->GetPosition());
pH2OTrack->SetParentID(pIncomingTrack->GetTrackID());
@@ -671,8 +682,19 @@ void G4DNAChemistryManager::CreateSolvatedElectron(const G4Track* pIncomingTrack
if (fActiveChemistry)
{
G4double delayedTime = 0.;
if(pIncomingTrack->GetUserInformation() != nullptr)
{
auto pPulseInfo = dynamic_cast<G4VUserPulseInfo*>
(pIncomingTrack->GetUserInformation());
if(pPulseInfo != nullptr)
{
delayedTime = pPulseInfo->GetDelayedTime();
}
}
PushMolecule(std::unique_ptr<G4Molecule>(new G4Molecule(G4Electron_aq::Definition())),
picosecond,
picosecond + delayedTime,
pFinalPosition ? *pFinalPosition : pIncomingTrack->GetPosition(),
pIncomingTrack->GetTrackID());
}
@@ -23,52 +23,47 @@
// * 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 available DNA materials,
// and keeps DNA cross sections.
#include "G4DNACPA100WaterExcitationStructure.hh"
#include "G4SystemOfUnits.hh"
#include "G4DNAMaterialManager.hh"
#include "G4StateManager.hh"
#include "G4Threading.hh"
#include "G4AutoLock.hh"
#include "G4NistManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4DNAMaterialManager *G4DNAMaterialManager::theInstance = nullptr;
G4DNACPA100WaterExcitationStructure::G4DNACPA100WaterExcitationStructure(): nLevels(5)
{
// The following values are extracted from the thesis of S. Edel,
// Paul Sabatier University, Toulouse, France, July 7, 2006
// Page 36
energyConstant.push_back(8.17*eV);
energyConstant.push_back(10.13*eV);
energyConstant.push_back(11.31*eV);
energyConstant.push_back(12.91*eV);
energyConstant.push_back(14.50*eV);
nLevels = (G4int)energyConstant.size();
namespace {
G4Mutex MaterialMutex = G4MUTEX_INITIALIZER;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4DNACPA100WaterExcitationStructure::~G4DNACPA100WaterExcitationStructure()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4DNACPA100WaterExcitationStructure::ExcitationEnergy(G4int level)
{
G4double excitation = 0.;
if (level >=0 && level < nLevels) excitation = energyConstant[level];
return excitation;
G4DNAMaterialManager *G4DNAMaterialManager::Instance() {
if (nullptr == theInstance) {
G4AutoLock l(&MaterialMutex);
if (nullptr == theInstance) {
static G4DNAMaterialManager manager;
theInstance = &manager;
}
l.unlock();
}
return theInstance;
}
G4DNAMaterialManager::G4DNAMaterialManager() {
G4NistManager::Instance();
fStateManager = G4StateManager::GetStateManager();
}
G4VEmModel* G4DNAMaterialManager::GetModel(const DNAModelType& t){
return fData[t];
}
void G4DNAMaterialManager::SetMasterDataModel(const DNAModelType& t, G4VEmModel* m){
fData[t] = m;
}
G4bool G4DNAMaterialManager::IsLocked() const
{
return (!G4Threading::IsMasterThread());
}
@@ -24,91 +24,98 @@
// ********************************************************************
#include "G4DNAPTBExcitationStructure.hh"
#include "G4Material.hh"
#include "G4SystemOfUnits.hh"
G4DNAPTBExcitationStructure::G4DNAPTBExcitationStructure()
{
// taken directly from PTra code by MPietrzak
energyConstant["N2"].push_back( 1.85*eV);
energyConstant["N2"].push_back( 2.15*eV);
energyConstant["N2"].push_back( 8.00*eV);
energyConstant["N2"].push_back( 8.50*eV);
energyConstant["N2"].push_back( 8.60*eV);
energyConstant["N2"].push_back(11.05*eV);
energyConstant["N2"].push_back(11.79*eV);
energyConstant["N2"].push_back(11.90*eV);
energyConstant["N2"].push_back(12.25*eV);
energyConstant["N2"].push_back(12.50*eV);
energyConstant["N2"].push_back(13.01*eV);
energyConstant["N2"].push_back(13.19*eV);
energyConstant["N2"].push_back(13.30*eV);
energyConstant["N2"].push_back(14.33*eV);
energyConstant["N2"].push_back(14.84*eV);
energyConstant["N2"].push_back(15.18*eV);
energyConstant["N2"].push_back(15.70*eV);
energyConstant["N2"].push_back(15.75*eV);
energyConstant["N2"].push_back(15.86*eV);
energyConstant["N2"].push_back(17.36*eV);
energyConstant["N2"].push_back(17.95*eV);
energyConstant["N2"].push_back(19.77*eV);
energyConstant["N2"].push_back(20.79*eV);
energyConstant["N2"].push_back(20.87*eV);
energyConstant["N2"].push_back(22.27*eV);
energyConstant["N2"].push_back(22.83*eV);
energyConstant["N2"].push_back(37.19*eV);
energyConstant["N2"].push_back(38.67*eV);
energyConstant["N2"].push_back(39.23*eV);
for(const auto& [name,levels] : energyConstant)
{
nExcLevels[name] = (G4int)levels.size();
}
fpN2 = G4Material::GetMaterial("N2", false);
// taken directly from PTra code by MPietrzak
if (fpN2 != nullptr) {
auto index = fpN2->GetIndex();
energyConstant[index].push_back(1.85 * eV);
energyConstant[index].push_back(2.15 * eV);
energyConstant[index].push_back(8.00 * eV);
energyConstant[index].push_back(8.50 * eV);
energyConstant[index].push_back(8.60 * eV);
energyConstant[index].push_back(11.05 * eV);
energyConstant[index].push_back(11.79 * eV);
energyConstant[index].push_back(11.90 * eV);
energyConstant[index].push_back(12.25 * eV);
energyConstant[index].push_back(12.50 * eV);
energyConstant[index].push_back(13.01 * eV);
energyConstant[index].push_back(13.19 * eV);
energyConstant[index].push_back(13.30 * eV);
energyConstant[index].push_back(14.33 * eV);
energyConstant[index].push_back(14.84 * eV);
energyConstant[index].push_back(15.18 * eV);
energyConstant[index].push_back(15.70 * eV);
energyConstant[index].push_back(15.75 * eV);
energyConstant[index].push_back(15.86 * eV);
energyConstant[index].push_back(17.36 * eV);
energyConstant[index].push_back(17.95 * eV);
energyConstant[index].push_back(19.77 * eV);
energyConstant[index].push_back(20.79 * eV);
energyConstant[index].push_back(20.87 * eV);
energyConstant[index].push_back(22.27 * eV);
energyConstant[index].push_back(22.83 * eV);
energyConstant[index].push_back(37.19 * eV);
energyConstant[index].push_back(38.67 * eV);
energyConstant[index].push_back(39.23 * eV);
}
for (const auto& [index, levels] : energyConstant) {
nExcLevels[index] = (G4int)levels.size();
}
}
G4double G4DNAPTBExcitationStructure::ExcitationEnergy(G4int ExcLevel, const G4String& materialName)
G4double G4DNAPTBExcitationStructure::ExcitationEnergy(
const G4int& ExcLevel, const size_t& materialID)
{
G4String matNameModif = ReplaceMaterial(materialName);
size_t matNameModif = ReplaceMaterial(materialID);
// check if the material exist in the map
if(energyConstant.find(matNameModif)==energyConstant.end())
{
std::ostringstream oss;
oss << "Material name was not found in energyConstantMap. Problematic material is: "<<matNameModif;
G4Exception("G4DNAPTBExcitationStructure::ExcitationEnergy","em0002",
FatalException, oss.str().c_str());
}
// check if the material exist in the map
if (energyConstant.find(matNameModif) == energyConstant.end()) {
std::ostringstream oss;
oss << "Material name was not found in energyConstantMap. Problematic material is: "
<< matNameModif;
G4Exception(
"G4DNAPTBExcitationStructure::ExcitationEnergy", "em0002", FatalException, oss.str().c_str());
}
G4double excitation = 0.;
G4double excitation = 0.;
if (ExcLevel >=0 && ExcLevel < nExcLevels[matNameModif]) excitation = energyConstant[matNameModif][ExcLevel];
if (ExcLevel >= 0 && ExcLevel < nExcLevels[matNameModif])
excitation = energyConstant[matNameModif][ExcLevel];
return excitation;
return excitation;
}
G4int G4DNAPTBExcitationStructure::NumberOfExcLevels(const G4String& materialName)
G4int G4DNAPTBExcitationStructure::NumberOfExcLevels(const size_t& matID)
{
G4String matNameModif = ReplaceMaterial(materialName);
auto matNameModif = ReplaceMaterial(matID);
// check if the material exist in the map
if(nExcLevels.find(matNameModif)==nExcLevels.end())
{
std::ostringstream oss;
oss << "Material name was not found in energyConstantMap. Problematic material is: "<<matNameModif;
G4Exception("G4DNAPTBNDExcitationStructure::NumberOfExcLevels","em0002",
FatalException, oss.str().c_str());
}
// check if the material exist in the map
if (nExcLevels.find(matNameModif) == nExcLevels.end()) {
std::ostringstream oss;
oss << "Material name was not found in energyConstantMap. Problematic material is: "
<< matNameModif;
G4Exception("G4DNAPTBNDExcitationStructure::NumberOfExcLevels", "em0002", FatalException,
oss.str().c_str());
}
return nExcLevels[matNameModif];
return nExcLevels[matNameModif];
}
G4String G4DNAPTBExcitationStructure::ReplaceMaterial(const G4String& materialName)
size_t G4DNAPTBExcitationStructure::ReplaceMaterial(const size_t& materialID)
{
G4String materialNameModified (materialName);
auto output = materialID;
auto G4_N2 = G4Material::GetMaterial("G4_N2", false)->GetIndex();
if (materialID == G4_N2) {
output = fpN2->GetIndex();
}
if(materialName=="G4_N2") materialNameModified = "N2";
return materialNameModified;
return output;
}
@@ -27,193 +27,227 @@
// M. Bug et al, Rad. Phys and Chem. 130, 459-479 (2017)
#include "G4DNAPTBIonisationStructure.hh"
#include "G4Material.hh"
#include "G4SystemOfUnits.hh"
G4DNAPTBIonisationStructure::G4DNAPTBIonisationStructure()
{
// MPietrzak
energyConstant["N2"].push_back(15.58*eV);
energyConstant["N2"].push_back(17.07*eV);
energyConstant["N2"].push_back(21.00*eV);
energyConstant["N2"].push_back(41.72*eV);
// MPietrzak
energyConstant["G4_WATER"].push_back(10.79*eV);
energyConstant["G4_WATER"].push_back(13.39*eV);
energyConstant["G4_WATER"].push_back(16.05*eV);
energyConstant["G4_WATER"].push_back(32.30*eV);
energyConstant["G4_WATER"].push_back(539.0*eV);
fpTHF = G4Material::GetMaterial("THF", false);
fpPY = G4Material::GetMaterial("PY", false);
fpPU = G4Material::GetMaterial("PU", false);
fpTMP = G4Material::GetMaterial("TMP", false);
fpG4_WATER = G4Material::GetMaterial("G4_WATER", false);
fpBackbone_THF = G4Material::GetMaterial("backbone_THF", false);
fpCytosine_PY = G4Material::GetMaterial("cytosine_PY", false);
fpThymine_PY = G4Material::GetMaterial("thymine_PY", false);
fpAdenine_PU = G4Material::GetMaterial("adenine_PU", false);
fpBackbone_TMP = G4Material::GetMaterial("backbone_TMP", false);
fpGuanine_PU = G4Material::GetMaterial("guanine_PU", false);
fpN2 = G4Material::GetMaterial("N2", false);
energyConstant["THF"].push_back(9.74*eV);
energyConstant["THF"].push_back(12.31*eV);
energyConstant["THF"].push_back(12.99*eV);
energyConstant["THF"].push_back(13.57*eV);
energyConstant["THF"].push_back(13.60*eV);
energyConstant["THF"].push_back(15.11*eV);
energyConstant["THF"].push_back(15.97*eV);
energyConstant["THF"].push_back(16.28*eV);
energyConstant["THF"].push_back(18.19*eV);
energyConstant["THF"].push_back(18.69*eV);
energyConstant["THF"].push_back(22.14*eV);
energyConstant["THF"].push_back(22.25*eV);
energyConstant["THF"].push_back(27.21*eV);
energyConstant["THF"].push_back(28.97*eV);
energyConstant["THF"].push_back(36.97*eV);
energyConstant["THF"].push_back(305.07*eV);
energyConstant["THF"].push_back(305.08*eV);
energyConstant["THF"].push_back(306.17*eV);
energyConstant["THF"].push_back(306.17*eV);
energyConstant["THF"].push_back(557.94*eV);
// MPietrzak
if (fpN2 != nullptr) {
auto index = fpN2->GetIndex();
energyConstant[index].push_back(15.58 * eV);
energyConstant[index].push_back(17.07 * eV);
energyConstant[index].push_back(21.00 * eV);
energyConstant[index].push_back(41.72 * eV);
}
energyConstant["PY"].push_back(9.73*eV);
energyConstant["PY"].push_back(10.96*eV);
energyConstant["PY"].push_back(11.54*eV);
energyConstant["PY"].push_back(12.58*eV);
energyConstant["PY"].push_back(15.96*eV);
energyConstant["PY"].push_back(16.27*eV);
energyConstant["PY"].push_back(16.53*eV);
energyConstant["PY"].push_back(17.98*eV);
energyConstant["PY"].push_back(19.37*eV);
energyConstant["PY"].push_back(20.52*eV);
energyConstant["PY"].push_back(24.55*eV);
energyConstant["PY"].push_back(24.64*eV);
energyConstant["PY"].push_back(29.75*eV);
energyConstant["PY"].push_back(33.02*eV);
energyConstant["PY"].push_back(36.57*eV);
energyConstant["PY"].push_back(305.92*eV);
energyConstant["PY"].push_back(307.09*eV);
energyConstant["PY"].push_back(307.09*eV);
energyConstant["PY"].push_back(307.52*eV);
energyConstant["PY"].push_back(423.44*eV);
energyConstant["PY"].push_back(423.44*eV);
// MPietrzak
if (fpG4_WATER != nullptr) {
auto index = fpG4_WATER->GetIndex();
energyConstant[index].push_back(10.79 * eV);
energyConstant[index].push_back(13.39 * eV);
energyConstant[index].push_back(16.05 * eV);
energyConstant[index].push_back(32.30 * eV);
energyConstant[index].push_back(539.0 * eV);
}
if (fpTHF != nullptr) {
auto index = fpTHF->GetIndex();
energyConstant[index].push_back(9.74 * eV);
energyConstant[index].push_back(12.31 * eV);
energyConstant[index].push_back(12.99 * eV);
energyConstant[index].push_back(13.57 * eV);
energyConstant[index].push_back(13.60 * eV);
energyConstant[index].push_back(15.11 * eV);
energyConstant[index].push_back(15.97 * eV);
energyConstant[index].push_back(16.28 * eV);
energyConstant[index].push_back(18.19 * eV);
energyConstant[index].push_back(18.69 * eV);
energyConstant[index].push_back(22.14 * eV);
energyConstant[index].push_back(22.25 * eV);
energyConstant[index].push_back(27.21 * eV);
energyConstant[index].push_back(28.97 * eV);
energyConstant[index].push_back(36.97 * eV);
energyConstant[index].push_back(305.07 * eV);
energyConstant[index].push_back(305.08 * eV);
energyConstant[index].push_back(306.17 * eV);
energyConstant[index].push_back(306.17 * eV);
energyConstant[index].push_back(557.94 * eV);
}
energyConstant["PU"].push_back(9.58*eV);
energyConstant["PU"].push_back(10.57*eV);
energyConstant["PU"].push_back(10.97*eV);
energyConstant["PU"].push_back(12.22*eV);
energyConstant["PU"].push_back(12.92*eV);
energyConstant["PU"].push_back(13.44*eV);
energyConstant["PU"].push_back(15.05*eV);
energyConstant["PU"].push_back(16.56*eV);
energyConstant["PU"].push_back(17.18*eV);
energyConstant["PU"].push_back(17.88*eV);
energyConstant["PU"].push_back(17.90*eV);
energyConstant["PU"].push_back(19.11*eV);
energyConstant["PU"].push_back(20.09*eV);
energyConstant["PU"].push_back(21.70*eV);
energyConstant["PU"].push_back(23.52*eV);
energyConstant["PU"].push_back(24.35*eV);
energyConstant["PU"].push_back(25.41*eV);
energyConstant["PU"].push_back(29.34*eV);
energyConstant["PU"].push_back(32.44*eV);
energyConstant["PU"].push_back(33.67*eV);
energyConstant["PU"].push_back(36.26*eV);
energyConstant["PU"].push_back(38.22*eV);
energyConstant["PU"].push_back(306.53*eV);
energyConstant["PU"].push_back(307.19*eV);
energyConstant["PU"].push_back(307.64*eV);
energyConstant["PU"].push_back(308.14*eV);
energyConstant["PU"].push_back(308.17*eV);
energyConstant["PU"].push_back(423.31*eV);
energyConstant["PU"].push_back(423.43*eV);
energyConstant["PU"].push_back(423.64*eV);
energyConstant["PU"].push_back(423.98*eV);
if (fpPY != nullptr) {
auto index = fpPY->GetIndex();
energyConstant[index].push_back(9.73 * eV);
energyConstant[index].push_back(10.96 * eV);
energyConstant[index].push_back(11.54 * eV);
energyConstant[index].push_back(12.58 * eV);
energyConstant[index].push_back(15.96 * eV);
energyConstant[index].push_back(16.27 * eV);
energyConstant[index].push_back(16.53 * eV);
energyConstant[index].push_back(17.98 * eV);
energyConstant[index].push_back(19.37 * eV);
energyConstant[index].push_back(20.52 * eV);
energyConstant[index].push_back(24.55 * eV);
energyConstant[index].push_back(24.64 * eV);
energyConstant[index].push_back(29.75 * eV);
energyConstant[index].push_back(33.02 * eV);
energyConstant[index].push_back(36.57 * eV);
energyConstant[index].push_back(305.92 * eV);
energyConstant[index].push_back(307.09 * eV);
energyConstant[index].push_back(307.09 * eV);
energyConstant[index].push_back(307.52 * eV);
energyConstant[index].push_back(423.44 * eV);
energyConstant[index].push_back(423.44 * eV);
}
energyConstant["TMP"].push_back(10.81*eV);
energyConstant["TMP"].push_back(10.81*eV);
energyConstant["TMP"].push_back(12.90*eV);
energyConstant["TMP"].push_back(13.32*eV);
energyConstant["TMP"].push_back(13.32*eV);
energyConstant["TMP"].push_back(13.59*eV);
energyConstant["TMP"].push_back(14.33*eV);
energyConstant["TMP"].push_back(14.33*eV);
energyConstant["TMP"].push_back(15.90*eV);
energyConstant["TMP"].push_back(17.09*eV);
energyConstant["TMP"].push_back(17.09*eV);
energyConstant["TMP"].push_back(17.13*eV);
energyConstant["TMP"].push_back(17.85*eV);
energyConstant["TMP"].push_back(17.85*eV);
energyConstant["TMP"].push_back(18.44*eV);
energyConstant["TMP"].push_back(19.37*eV);
energyConstant["TMP"].push_back(19.37*eV);
energyConstant["TMP"].push_back(21.40*eV);
energyConstant["TMP"].push_back(26.20*eV);
energyConstant["TMP"].push_back(26.20*eV);
energyConstant["TMP"].push_back(27.43*eV);
energyConstant["TMP"].push_back(35.23*eV);
energyConstant["TMP"].push_back(37.67*eV);
energyConstant["TMP"].push_back(37.67*eV);
energyConstant["TMP"].push_back(39.64*eV);
energyConstant["TMP"].push_back(152.42*eV);
energyConstant["TMP"].push_back(152.42*eV);
energyConstant["TMP"].push_back(152.44*eV);
energyConstant["TMP"].push_back(209.59*eV);
energyConstant["TMP"].push_back(306.92*eV);
energyConstant["TMP"].push_back(306.92*eV);
energyConstant["TMP"].push_back(306.92*eV);
energyConstant["TMP"].push_back(557.34*eV);
energyConstant["TMP"].push_back(559.40*eV);
energyConstant["TMP"].push_back(559.40*eV);
energyConstant["TMP"].push_back(559.41*eV);
energyConstant["TMP"].push_back(2178.05*eV);
if (fpPU != nullptr) {
auto index = fpPU->GetIndex();
energyConstant[index].push_back(9.58 * eV);
energyConstant[index].push_back(10.57 * eV);
energyConstant[index].push_back(10.97 * eV);
energyConstant[index].push_back(12.22 * eV);
energyConstant[index].push_back(12.92 * eV);
energyConstant[index].push_back(13.44 * eV);
energyConstant[index].push_back(15.05 * eV);
energyConstant[index].push_back(16.56 * eV);
energyConstant[index].push_back(17.18 * eV);
energyConstant[index].push_back(17.88 * eV);
energyConstant[index].push_back(17.90 * eV);
energyConstant[index].push_back(19.11 * eV);
energyConstant[index].push_back(20.09 * eV);
energyConstant[index].push_back(21.70 * eV);
energyConstant[index].push_back(23.52 * eV);
energyConstant[index].push_back(24.35 * eV);
energyConstant[index].push_back(25.41 * eV);
energyConstant[index].push_back(29.34 * eV);
energyConstant[index].push_back(32.44 * eV);
energyConstant[index].push_back(33.67 * eV);
energyConstant[index].push_back(36.26 * eV);
energyConstant[index].push_back(38.22 * eV);
energyConstant[index].push_back(306.53 * eV);
energyConstant[index].push_back(307.19 * eV);
energyConstant[index].push_back(307.64 * eV);
energyConstant[index].push_back(308.14 * eV);
energyConstant[index].push_back(308.17 * eV);
energyConstant[index].push_back(423.31 * eV);
energyConstant[index].push_back(423.43 * eV);
energyConstant[index].push_back(423.64 * eV);
energyConstant[index].push_back(423.98 * eV);
}
for(auto it=energyConstant.cbegin();it!=energyConstant.cend();++it)
{
nLevels[it->first] = (G4int)(it->second).size();
}
if (fpTMP != nullptr) {
auto index = fpTMP->GetIndex();
energyConstant[index].push_back(10.81 * eV);
energyConstant[index].push_back(10.81 * eV);
energyConstant[index].push_back(12.90 * eV);
energyConstant[index].push_back(13.32 * eV);
energyConstant[index].push_back(13.32 * eV);
energyConstant[index].push_back(13.59 * eV);
energyConstant[index].push_back(14.33 * eV);
energyConstant[index].push_back(14.33 * eV);
energyConstant[index].push_back(15.90 * eV);
energyConstant[index].push_back(17.09 * eV);
energyConstant[index].push_back(17.09 * eV);
energyConstant[index].push_back(17.13 * eV);
energyConstant[index].push_back(17.85 * eV);
energyConstant[index].push_back(17.85 * eV);
energyConstant[index].push_back(18.44 * eV);
energyConstant[index].push_back(19.37 * eV);
energyConstant[index].push_back(19.37 * eV);
energyConstant[index].push_back(21.40 * eV);
energyConstant[index].push_back(26.20 * eV);
energyConstant[index].push_back(26.20 * eV);
energyConstant[index].push_back(27.43 * eV);
energyConstant[index].push_back(35.23 * eV);
energyConstant[index].push_back(37.67 * eV);
energyConstant[index].push_back(37.67 * eV);
energyConstant[index].push_back(39.64 * eV);
energyConstant[index].push_back(152.42 * eV);
energyConstant[index].push_back(152.42 * eV);
energyConstant[index].push_back(152.44 * eV);
energyConstant[index].push_back(209.59 * eV);
energyConstant[index].push_back(306.92 * eV);
energyConstant[index].push_back(306.92 * eV);
energyConstant[index].push_back(306.92 * eV);
energyConstant[index].push_back(557.34 * eV);
energyConstant[index].push_back(559.40 * eV);
energyConstant[index].push_back(559.40 * eV);
energyConstant[index].push_back(559.41 * eV);
energyConstant[index].push_back(2178.05 * eV);
}
for (const auto& [index, levels] : energyConstant) {
nLevels[index] = (G4int)levels.size();
}
}
G4DNAPTBIonisationStructure::~G4DNAPTBIonisationStructure()
{ }
G4double G4DNAPTBIonisationStructure::IonisationEnergy(G4int level, const G4String& materialName)
G4double G4DNAPTBIonisationStructure::IonisationEnergy(G4int level, const size_t& materialID)
{
G4String matNameModif = ReplaceMaterial(materialName);
size_t matNameModif = ReplaceMaterial(materialID);
// check if the material exist in the map
if(energyConstant.find(matNameModif)==energyConstant.end())
{
std::ostringstream oss;
oss << "Material name was not found in energyConstantMap. Problematic material is: "<<matNameModif;
G4Exception("G4DNAPTBIonisationStructure::IonisationEnergy","em0002",
FatalException, oss.str().c_str());
}
// check if the material exist in the map
if (energyConstant.find(matNameModif) == energyConstant.end()) {
std::ostringstream oss;
oss << "Material name was not found in energyConstantMap. Problematic material is: "
<< materialID;
G4Exception(
"G4DNAPTBIonisationStructure::IonisationEnergy", "em0002", FatalException, oss.str().c_str());
}
G4double ionisation = 0.;
G4double ionisation = 0.;
if (level >=0 && level < nLevels[matNameModif]) ionisation = energyConstant[matNameModif][level];
if (level >= 0 && level < nLevels[matNameModif]) ionisation = energyConstant[matNameModif][level];
return ionisation;
return ionisation;
}
G4int G4DNAPTBIonisationStructure::NumberOfLevels(const G4String& materialName)
G4int G4DNAPTBIonisationStructure::NumberOfLevels(const size_t& materialID)
{
G4String matNameModif = ReplaceMaterial(materialName);
auto matNameModif = ReplaceMaterial(materialID);
// check if the material exist in the map
if(nLevels.find(matNameModif)==nLevels.end())
{
std::ostringstream oss;
oss << "Material name was not found in energyConstantMap. Problematic material is: "<<matNameModif;
G4Exception("G4DNAPTBIonisationStructure::NumberOfLevels","em0002",
FatalException, oss.str().c_str());
}
// check if the material exist in the map
if (nLevels.find(matNameModif) == nLevels.end()) {
std::ostringstream oss;
oss << "Material name was not found in energyConstantMap. Problematic material is: "
<< matNameModif;
G4Exception(
"G4DNAPTBIonisationStructure::NumberOfLevels", "em0002", FatalException, oss.str().c_str());
}
return nLevels[matNameModif];
return nLevels[matNameModif];
}
G4String G4DNAPTBIonisationStructure::ReplaceMaterial(const G4String& materialName)
size_t G4DNAPTBIonisationStructure::ReplaceMaterial(const size_t& materialID)
{
G4String materialNameModified (materialName);
if(materialName=="backbone_THF") materialNameModified = "THF";
else if(materialName=="backbone_TMP") materialNameModified = "TMP";
else if(materialName=="adenine_PU") materialNameModified = "PU";
else if(materialName=="guanine_PU") materialNameModified = "PU";
else if(materialName=="thymine_PY") materialNameModified = "PY";
else if(materialName=="cytosine_PY") materialNameModified = "PY";
return materialNameModified;
if (fpBackbone_THF != nullptr && materialID == fpBackbone_THF->GetIndex()) {
return fpTHF->GetIndex();
}
else if (fpBackbone_TMP != nullptr && materialID == fpBackbone_TMP->GetIndex()) {
return fpTMP->GetIndex();
}
else if (fpAdenine_PU != nullptr && materialID == fpAdenine_PU->GetIndex()) {
return fpPU->GetIndex();
}
else if (fpGuanine_PU != nullptr && materialID == fpGuanine_PU->GetIndex()) {
return fpPU->GetIndex();
}
else if (fpThymine_PY != nullptr && materialID == fpThymine_PY->GetIndex()) {
return fpPY->GetIndex();
}
else if (fpCytosine_PY != nullptr && materialID == fpCytosine_PY->GetIndex()) {
return fpPY->GetIndex();
}
return materialID;
}