Import Geant4 10.4.0.beta source tree
This commit is contained in:
@@ -0,0 +1,160 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 "G4DNACPA100LogLogInterpolation.hh"
|
||||
|
||||
// Constructor
|
||||
|
||||
G4DNACPA100LogLogInterpolation::G4DNACPA100LogLogInterpolation()
|
||||
{ }
|
||||
|
||||
// Destructor
|
||||
|
||||
G4DNACPA100LogLogInterpolation::~G4DNACPA100LogLogInterpolation()
|
||||
{ }
|
||||
|
||||
G4VDataSetAlgorithm* G4DNACPA100LogLogInterpolation::Clone() const
|
||||
{ return new G4DNACPA100LogLogInterpolation; }
|
||||
|
||||
|
||||
G4double G4DNACPA100LogLogInterpolation::Calculate(G4double x, G4int bin,
|
||||
const G4DataVector& points,
|
||||
const G4DataVector& data) const
|
||||
{
|
||||
//G4cout << "G4DNACPA100LogLogInterpolation is performed (2 arguments) " << G4endl;
|
||||
G4int nBins = data.size() - 1;
|
||||
//G4double oldresult = 0.;
|
||||
G4double value = 0.;
|
||||
if (x < points[0])
|
||||
{
|
||||
value = 0.;
|
||||
}
|
||||
else if (bin < nBins)
|
||||
{
|
||||
G4double e1 = points[bin];
|
||||
G4double e2 = points[bin+1];
|
||||
G4double d1 = data[bin];
|
||||
G4double d2 = data[bin+1];
|
||||
// Check of e1, e2, d1 and d2 values to avoid floating-point errors when estimating the interpolated value below -- S.I., Jun. 2008
|
||||
if ((d1 > 0.) && (d2 > 0.) && (e1 > 0.) && (e2 > 0.))
|
||||
{
|
||||
// Streamline the Log-Log Interpolation formula in order to reduce the required number of log10() function calls
|
||||
// Variable oldresult contains the result of old implementation of Log-Log interpolation -- M.G.P. Jun. 2001
|
||||
// oldresult = (std::log10(d1)*std::log10(e2/x) + std::log10(d2)*std::log10(x/e1)) / std::log10(e2/e1);
|
||||
// oldresult = std::pow(10.,oldresult);
|
||||
// Variable value contains the result of new implementation, after streamlining the math operation -- N.A.K. Oct. 2008
|
||||
value = std::log10(d1)+(std::log10(d2/d1)/std::log10(e2/e1)*std::log10(x/e1));
|
||||
value = std::pow(10.,value);
|
||||
// Test of the new implementation result (value variable) against the old one (oldresult) -- N.A.K. Dec. 2008
|
||||
// G4double diffResult = value - oldresult;
|
||||
// G4double relativeDiff = 1e-11;
|
||||
// Comparison of the two values based on a max allowable relative difference
|
||||
// if ( std::fabs(diffResult) > relativeDiff*std::fabs(oldresult) )
|
||||
// {
|
||||
// Abort comparison when at least one of two results is infinite
|
||||
// if ((!std::isinf(oldresult)) && (!std::isinf(value)))
|
||||
// {
|
||||
// G4cout << "G4DNACPA100LogLogInterpolation> Old Interpolated Value is:" << oldresult << G4endl;
|
||||
// G4cout << "G4DNACPA100LogLogInterpolation> New Interpolated Value is:" << value << G4endl << G4endl;
|
||||
// G4cerr << "G4DNACPA100LogLogInterpolation> Error in Interpolation:" << G4endl;
|
||||
// G4cerr << "The difference between new and old interpolated value is:" << diffResult << G4endl << G4endl;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
else value = 0.;
|
||||
}
|
||||
else
|
||||
{
|
||||
value = data[nBins];
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
// Nicolas A. Karakatsanis: New implementation of log-log interpolation after directly loading
|
||||
// logarithmic values from G4EMLOW dataset
|
||||
|
||||
G4double G4DNACPA100LogLogInterpolation::Calculate(G4double x, G4int bin,
|
||||
const G4DataVector& points,
|
||||
const G4DataVector& data,
|
||||
const G4DataVector& log_points,
|
||||
const G4DataVector& log_data) const
|
||||
{
|
||||
G4int nBins = data.size() - 1;
|
||||
G4double value = 0.;
|
||||
G4double log_x = std::log10(x);
|
||||
if (x < points[0])
|
||||
{
|
||||
value = 0.;
|
||||
}
|
||||
else if (bin < nBins)
|
||||
{
|
||||
G4double log_e1 = log_points[bin];
|
||||
//G4double log_e2 = log_points[bin+1];
|
||||
G4double log_d1 = log_data[bin];
|
||||
G4double log_d2 = log_data[bin+1];
|
||||
|
||||
//G4cout << "x = " << x << " , logx = " << log_x << " , bin = " << bin << G4endl;
|
||||
//G4cout << "e1 = " << points[bin] << " d1 = " << data[bin] << G4endl;
|
||||
//G4cout << "e2 = " << points[bin+1] << " d2 = " << data[bin+1] << G4endl;
|
||||
//G4cout << "loge1 = " << log_e1 << " logd1 = " << log_d1 << G4endl;
|
||||
//G4cout << "loge2 = " << log_e2 << " logd2 = " << log_d2 << G4endl;
|
||||
//G4cout << "interpol " << log_d1 + (log_d2 - log_d1)*(log_x - log_e1)/(log_e2 - log_e1) << " " << G4endl;
|
||||
|
||||
|
||||
// Values e1, e2, d1 and d2 are the log values of the corresponding
|
||||
// original energy and data values. Simple linear interpolation performed
|
||||
// on loagarithmic data should be equivalent to log-log interpolation
|
||||
|
||||
// CPA100 specific
|
||||
//value = log_d1 + (log_d2 - log_d1)*(log_x - log_e1)/(log_e2 - log_e1);
|
||||
// value = log_d1;
|
||||
|
||||
value = log_d2; // UPPER VALUE INTERPOLATION
|
||||
if (log_x == log_e1) value = log_d1; // IN CASE OF EQUALITY
|
||||
|
||||
// Delogarithmize to obtain interpolated value
|
||||
value = std::pow(10.,value);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = data[nBins];
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 "G4DNACPA100WaterExcitationStructure.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
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 = energyConstant.size();
|
||||
}
|
||||
|
||||
//....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;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 = 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;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNAChemistryManager.cc 100802 2016-11-02 14:55:27Z gcosmo $
|
||||
// $Id: G4DNAChemistryManager.cc 103042 2017-03-10 11:50:07Z gcosmo $
|
||||
//
|
||||
// Author: Mathieu Karamitros (kara@cenbg.in2p3.fr)
|
||||
//
|
||||
@@ -58,38 +58,57 @@
|
||||
#include "G4StateManager.hh"
|
||||
#include "G4MoleculeFinder.hh"
|
||||
#include "G4MoleculeTable.hh"
|
||||
#include "G4PhysChemIO.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
G4DNAChemistryManager* G4DNAChemistryManager::fgInstance;
|
||||
G4ThreadLocal std::ofstream* G4DNAChemistryManager::fpgOutput_tl = 0;
|
||||
G4ThreadLocal G4bool* G4DNAChemistryManager::fpgThreadInitialized_tl = 0;
|
||||
|
||||
G4ThreadLocal G4DNAChemistryManager::ThreadLocalData*
|
||||
G4DNAChemistryManager::fpThreadData = 0;
|
||||
|
||||
G4Mutex chemManExistence;
|
||||
//bool G4DNAChemistryManager::fActiveChemistry = false;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4DNAChemistryManager::ThreadLocalData::ThreadLocalData()
|
||||
{
|
||||
fpPhysChemIO = nullptr;
|
||||
fThreadInitialized_tl = false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4DNAChemistryManager::ThreadLocalData::~ThreadLocalData()
|
||||
{
|
||||
if(fpPhysChemIO) delete fpPhysChemIO;
|
||||
fThreadInitialized_tl = false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::SetPhysChemIO(G4VPhysChemIO* physChemIO)
|
||||
{
|
||||
if(fpThreadData->fpPhysChemIO)
|
||||
delete fpThreadData->fpPhysChemIO;
|
||||
fpThreadData->fpPhysChemIO = physChemIO;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4DNAChemistryManager::G4DNAChemistryManager() :
|
||||
G4UImessenger(), G4VStateDependent()
|
||||
{
|
||||
//==============================================================================
|
||||
/* M.K: 24/11/2014
|
||||
* To work properly, the chemistry manager should be created and initialized on
|
||||
* the master thread only. If the static flag fActiveChemistry is on but the
|
||||
* chemistry manager singleton
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
* The chemistry manager is shared between threads
|
||||
* It is initialized both on the master thread and on the worker threads
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
// if (/*fActiveChemistry &&*/ G4Threading::IsWorkerThread()
|
||||
// && G4Threading::IsMultithreadedApplication())
|
||||
// {
|
||||
// G4Exception("G4DNAChemistryManager::G4DNAChemistryManager",
|
||||
// "G4DNAChemistryManager_MASTER_CREATION", FatalException,
|
||||
// "The chemistry manager should be created and initialized on the "
|
||||
// "master thread only");
|
||||
// }
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
fpExcitationLevel = 0;
|
||||
fpIonisationLevel = 0;
|
||||
fWriteFile = false;
|
||||
fpUserChemistryList = 0;
|
||||
fMasterInitialized = false;
|
||||
fpChemDNADirectory = new G4UIdirectory("/chem/");
|
||||
@@ -106,17 +125,18 @@ G4DNAChemistryManager::G4DNAChemistryManager() :
|
||||
fGeometryClosed = false;
|
||||
fPhysicsTableBuilt = false;
|
||||
fForceThreadReinitialization = false;
|
||||
fFileInitialized = false;
|
||||
fVerbose = 0;
|
||||
fActiveChemistry = false;
|
||||
fSkipReactions = false;
|
||||
fResetCounterWhenRunEnds = true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4DNAChemistryManager*
|
||||
G4DNAChemistryManager::Instance()
|
||||
{
|
||||
if (fgInstance == 0)
|
||||
if(fgInstance == 0)
|
||||
{
|
||||
G4AutoLock lock(&chemManExistence);
|
||||
if (fgInstance == 0) // MT : double check at initialisation
|
||||
@@ -125,15 +145,23 @@ G4DNAChemistryManager::Instance()
|
||||
}
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
if(fpThreadData==0) fpThreadData = new ThreadLocalData();
|
||||
// make sure thread local data is initialized for all threads
|
||||
|
||||
return fgInstance;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4DNAChemistryManager*
|
||||
G4DNAChemistryManager::GetInstanceIfExists()
|
||||
{
|
||||
return fgInstance;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4DNAChemistryManager::~G4DNAChemistryManager()
|
||||
{
|
||||
// G4cout << "Deleting G4DNAChemistryManager" << G4endl;
|
||||
@@ -146,6 +174,8 @@ G4DNAChemistryManager::~G4DNAChemistryManager()
|
||||
*/
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::Clear()
|
||||
{
|
||||
if (fpIonisationLevel)
|
||||
@@ -206,6 +236,8 @@ void G4DNAChemistryManager::Clear()
|
||||
G4VMoleculeCounter::DeleteInstance();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::DeleteInstance()
|
||||
{
|
||||
//G4cout << "G4DNAChemistryManager::DeleteInstance" << G4endl;
|
||||
@@ -226,6 +258,8 @@ void G4DNAChemistryManager::DeleteInstance()
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4bool G4DNAChemistryManager::Notify(G4ApplicationState requestedState)
|
||||
{
|
||||
if (requestedState == G4State_Quit)
|
||||
@@ -236,7 +270,15 @@ G4bool G4DNAChemistryManager::Notify(G4ApplicationState requestedState)
|
||||
//DeleteInstance();
|
||||
Clear();
|
||||
}
|
||||
|
||||
// else if(requestedState == G4State_EventProc)
|
||||
// Note: From here we can know that a new event is started
|
||||
// But the run and event IDs remain unknown
|
||||
// {
|
||||
// if(fpThreadData->fpPhysChemIO)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
// }
|
||||
else if(requestedState == G4State_GeomClosed)
|
||||
{
|
||||
fGeometryClosed = true;
|
||||
@@ -250,6 +292,8 @@ G4bool G4DNAChemistryManager::Notify(G4ApplicationState requestedState)
|
||||
return true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::SetNewValue(G4UIcommand* command, G4String value)
|
||||
{
|
||||
if (command == fpActivateChem)
|
||||
@@ -271,7 +315,8 @@ void G4DNAChemistryManager::SetNewValue(G4UIcommand* command, G4String value)
|
||||
}
|
||||
else if(command == fpScaleForNewTemperature)
|
||||
{
|
||||
SetGlobalTemperature(fpScaleForNewTemperature->ConvertToDimensionedDouble(value));
|
||||
SetGlobalTemperature(fpScaleForNewTemperature->
|
||||
ConvertToDimensionedDouble(value));
|
||||
}
|
||||
else if(command == fpInitChem)
|
||||
{
|
||||
@@ -280,6 +325,8 @@ void G4DNAChemistryManager::SetNewValue(G4UIcommand* command, G4String value)
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4String G4DNAChemistryManager::GetCurrentValue(G4UIcommand* command)
|
||||
{
|
||||
if (command == fpActivateChem)
|
||||
@@ -290,6 +337,8 @@ G4String G4DNAChemistryManager::GetCurrentValue(G4UIcommand* command)
|
||||
return "";
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::Run()
|
||||
{
|
||||
if (fActiveChemistry)
|
||||
@@ -304,7 +353,7 @@ void G4DNAChemistryManager::Run()
|
||||
description);
|
||||
}
|
||||
|
||||
if (fpgThreadInitialized_tl == 0)
|
||||
if (fpThreadData->fThreadInitialized_tl == 0)
|
||||
{
|
||||
G4ExceptionDescription description;
|
||||
description << "Thread local components were not initialized.";
|
||||
@@ -322,12 +371,16 @@ void G4DNAChemistryManager::Run()
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::Gun(G4ITGun* gun, bool physicsTableToBuild)
|
||||
{
|
||||
fBuildPhysicsTable = physicsTableToBuild;
|
||||
G4Scheduler::Instance()->SetGun(gun);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::Initialize()
|
||||
{
|
||||
//===========================================================================
|
||||
@@ -340,7 +393,7 @@ void G4DNAChemistryManager::Initialize()
|
||||
//==========================================================================
|
||||
if(G4Threading::IsWorkerThread())
|
||||
{
|
||||
InitializeThread(); // Will create and initialize G4ITScheduler
|
||||
InitializeThread(); // Will create and initialize G4Scheduler
|
||||
return;
|
||||
}
|
||||
//==========================================================================
|
||||
@@ -364,6 +417,8 @@ void G4DNAChemistryManager::Initialize()
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::InitializeMaster()
|
||||
{
|
||||
if (fMasterInitialized == false)
|
||||
@@ -375,7 +430,6 @@ void G4DNAChemistryManager::InitializeMaster()
|
||||
|
||||
G4Scheduler::Instance();
|
||||
// creates a concrete object of the scheduler
|
||||
// and track container
|
||||
|
||||
if (fpUserChemistryList)
|
||||
{
|
||||
@@ -404,9 +458,12 @@ void G4DNAChemistryManager::InitializeMaster()
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::InitializeThread()
|
||||
{
|
||||
if (fpgThreadInitialized_tl == 0 || fForceThreadReinitialization == true)
|
||||
if (fpThreadData->fThreadInitialized_tl == false
|
||||
|| fForceThreadReinitialization == true)
|
||||
{
|
||||
if (fpUserChemistryList)
|
||||
{
|
||||
@@ -447,7 +504,7 @@ void G4DNAChemistryManager::InitializeThread()
|
||||
G4DNAMolecularReactionTable::GetReactionTable());
|
||||
G4Scheduler::Instance()->Initialize();
|
||||
|
||||
fpgThreadInitialized_tl = new G4bool(true);
|
||||
fpThreadData->fThreadInitialized_tl = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -463,55 +520,51 @@ void G4DNAChemistryManager::InitializeThread()
|
||||
InitializeFile();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::InitializeFile()
|
||||
{
|
||||
if (fpgOutput_tl == 0 || fWriteFile == false || fFileInitialized)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(fVerbose)
|
||||
{
|
||||
G4cout << "G4DNAChemistryManager::InitializeFile() is called"
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
*fpgOutput_tl << std::setprecision(6) << std::scientific;
|
||||
*fpgOutput_tl << setw(11) << left << "#Parent ID" << setw(10) << "Molecule"
|
||||
<< setw(14) << "Elec Modif" << setw(13) << "Energy (eV)"
|
||||
<< setw(22) << "X pos of parent [nm]" << setw(22)
|
||||
<< "Y pos of parent [nm]" << setw(22) << "Z pos of parent [nm]"
|
||||
<< setw(14) << "X pos [nm]" << setw(14) << "Y pos [nm]"
|
||||
<< setw(14) << "Z pos [nm]" << G4endl<< setw(21) << "#"
|
||||
<< setw(13) << "1)io/ex=0/1"
|
||||
<< G4endl
|
||||
<< setw(21) << "#"
|
||||
<< setw(13) << "2)level=0...5"
|
||||
<< G4endl;
|
||||
|
||||
fFileInitialized = true;
|
||||
|
||||
if(fpThreadData->fpPhysChemIO){
|
||||
fpThreadData->fpPhysChemIO->InitializeFile();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4bool G4DNAChemistryManager::IsActivated()
|
||||
{
|
||||
return Instance()->fActiveChemistry;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::Activated(G4bool flag)
|
||||
{
|
||||
Instance()->fActiveChemistry = flag;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4bool G4DNAChemistryManager::IsChemistryActivated()
|
||||
{
|
||||
return fActiveChemistry;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::SetChemistryActivation(G4bool flag)
|
||||
{
|
||||
fActiveChemistry = flag;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::WriteInto(const G4String& output,
|
||||
ios_base::openmode mode)
|
||||
{
|
||||
@@ -521,34 +574,35 @@ void G4DNAChemistryManager::WriteInto(const G4String& output,
|
||||
<< output.data() << G4endl;
|
||||
}
|
||||
|
||||
fpgOutput_tl = new std::ofstream();
|
||||
fpgOutput_tl->open(output.data(), mode);
|
||||
fWriteFile = true;
|
||||
fFileInitialized = false;
|
||||
if(fpThreadData->fpPhysChemIO){
|
||||
fpThreadData->fpPhysChemIO->WriteInto(output, mode);
|
||||
}
|
||||
else{
|
||||
fpThreadData->fpPhysChemIO = new G4PhysChemIO::FormattedText();
|
||||
fpThreadData->fpPhysChemIO->WriteInto(output, mode);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::AddEmptyLineInOuputFile()
|
||||
{
|
||||
if (fWriteFile)
|
||||
{
|
||||
*fpgOutput_tl << G4endl;
|
||||
if(fpThreadData->fpPhysChemIO){
|
||||
fpThreadData->fpPhysChemIO->AddEmptyLineInOuputFile();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::CloseFile()
|
||||
{
|
||||
if (fpgOutput_tl == 0) return;
|
||||
|
||||
if (fpgOutput_tl->is_open())
|
||||
{
|
||||
if (fVerbose)
|
||||
{
|
||||
G4cout << "G4DNAChemistryManager: Close File" << G4endl;
|
||||
}
|
||||
fpgOutput_tl->close();
|
||||
if(fpThreadData->fpPhysChemIO){
|
||||
fpThreadData->fpPhysChemIO->CloseFile();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4DNAWaterExcitationStructure*
|
||||
G4DNAChemistryManager::GetExcitationLevel()
|
||||
{
|
||||
@@ -559,6 +613,8 @@ G4DNAChemistryManager::GetExcitationLevel()
|
||||
return fpExcitationLevel;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4DNAWaterIonisationStructure*
|
||||
G4DNAChemistryManager::GetIonisationLevel()
|
||||
{
|
||||
@@ -569,14 +625,14 @@ G4DNAChemistryManager::GetIonisationLevel()
|
||||
return fpIonisationLevel;
|
||||
}
|
||||
|
||||
void G4DNAChemistryManager::CreateWaterMolecule(ElectronicModification modification,
|
||||
G4int electronicLevel,
|
||||
const G4Track* theIncomingTrack)
|
||||
{
|
||||
if (fWriteFile)
|
||||
{
|
||||
if(!fFileInitialized) InitializeFile();
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void
|
||||
G4DNAChemistryManager::CreateWaterMolecule(ElectronicModification modification,
|
||||
G4int electronicLevel,
|
||||
const G4Track* theIncomingTrack)
|
||||
{
|
||||
if(fpThreadData->fpPhysChemIO){
|
||||
G4double energy = -1.;
|
||||
|
||||
switch (modification)
|
||||
@@ -591,19 +647,11 @@ void G4DNAChemistryManager::CreateWaterMolecule(ElectronicModification modificat
|
||||
energy = GetIonisationLevel()->IonisationEnergy(electronicLevel);
|
||||
break;
|
||||
}
|
||||
|
||||
*fpgOutput_tl << setw(11) << left << theIncomingTrack->GetTrackID()
|
||||
<< setw(10) << "H2O" << left << modification << internal
|
||||
<< ":" << right << electronicLevel << left << setw(11) << ""
|
||||
<< std::setprecision(2) << std::fixed << setw(13)
|
||||
<< energy / eV << std::setprecision(6) << std::scientific
|
||||
<< setw(22)
|
||||
<< (theIncomingTrack->GetPosition().x()) / nanometer
|
||||
<< setw(22)
|
||||
<< (theIncomingTrack->GetPosition().y()) / nanometer
|
||||
<< setw(22)
|
||||
<< (theIncomingTrack->GetPosition().z()) / nanometer
|
||||
<< G4endl;
|
||||
|
||||
fpThreadData->fpPhysChemIO->CreateWaterMolecule(modification,
|
||||
4-electronicLevel,
|
||||
energy,
|
||||
theIncomingTrack);
|
||||
}
|
||||
|
||||
if(fActiveChemistry)
|
||||
@@ -631,37 +679,18 @@ void G4DNAChemistryManager::CreateWaterMolecule(ElectronicModification modificat
|
||||
H2OTrack -> SetKineticEnergy(0.);
|
||||
G4VITTrackHolder::Instance()->Push(H2OTrack);
|
||||
}
|
||||
// else
|
||||
// abort();
|
||||
}
|
||||
|
||||
void G4DNAChemistryManager::CreateSolvatedElectron(const G4Track* theIncomingTrack,
|
||||
G4ThreeVector* finalPosition)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void
|
||||
G4DNAChemistryManager::CreateSolvatedElectron(const G4Track* theIncomingTrack,
|
||||
G4ThreeVector* finalPosition)
|
||||
// finalPosition is a pointer because this argument is optional
|
||||
{
|
||||
if (fWriteFile)
|
||||
{
|
||||
if(!fFileInitialized) InitializeFile();
|
||||
|
||||
*fpgOutput_tl << setw(11) << theIncomingTrack->GetTrackID() << setw(10)
|
||||
<< "e_aq" << setw(14) << -1 << std::setprecision(2)
|
||||
<< std::fixed << setw(13)
|
||||
<< theIncomingTrack->GetKineticEnergy() / eV
|
||||
<< std::setprecision(6) << std::scientific << setw(22)
|
||||
<< (theIncomingTrack->GetPosition().x()) / nanometer
|
||||
<< setw(22)
|
||||
<< (theIncomingTrack->GetPosition().y()) / nanometer
|
||||
<< setw(22)
|
||||
<< (theIncomingTrack->GetPosition().z()) / nanometer;
|
||||
|
||||
if (finalPosition != 0)
|
||||
{
|
||||
*fpgOutput_tl << setw(14) << (finalPosition->x()) / nanometer << setw(14)
|
||||
<< (finalPosition->y()) / nanometer << setw(14)
|
||||
<< (finalPosition->z()) / nanometer;
|
||||
}
|
||||
|
||||
*fpgOutput_tl << G4endl;
|
||||
if(fpThreadData->fpPhysChemIO){
|
||||
fpThreadData->fpPhysChemIO->CreateSolvatedElectron(theIncomingTrack,
|
||||
finalPosition);
|
||||
}
|
||||
|
||||
if(fActiveChemistry)
|
||||
@@ -682,24 +711,15 @@ void G4DNAChemistryManager::CreateSolvatedElectron(const G4Track* theIncomingTra
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::PushMolecule(G4Molecule*& molecule,
|
||||
double time,
|
||||
const G4ThreeVector& position,
|
||||
int parentID)
|
||||
{
|
||||
if (fWriteFile)
|
||||
{
|
||||
if(!fFileInitialized) InitializeFile();
|
||||
|
||||
*fpgOutput_tl << setw(11) << parentID << setw(10) << molecule->GetName()
|
||||
<< setw(14) << -1 << std::setprecision(2) << std::fixed
|
||||
<< setw(13) << -1 << std::setprecision(6) << std::scientific
|
||||
<< setw(22) << (position.x()) / nanometer << setw(22)
|
||||
<< (position.y()) / nanometer << setw(22)
|
||||
<< (position.z()) / nanometer;
|
||||
*fpgOutput_tl << G4endl;
|
||||
}
|
||||
|
||||
// TODO: PhysChemIO - method unused in the released code
|
||||
|
||||
if(fActiveChemistry)
|
||||
{
|
||||
G4Track* track = molecule->BuildTrack(time,position);
|
||||
@@ -714,25 +734,14 @@ void G4DNAChemistryManager::PushMolecule(G4Molecule*& molecule,
|
||||
}
|
||||
}
|
||||
|
||||
void G4DNAChemistryManager::PushMoleculeAtParentTimeAndPlace(G4Molecule*& molecule,
|
||||
const G4Track* theIncomingTrack)
|
||||
{
|
||||
if (fWriteFile)
|
||||
{
|
||||
if(!fFileInitialized) InitializeFile();
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
*fpgOutput_tl << setw(11) << theIncomingTrack->GetTrackID() << setw(10)
|
||||
<< molecule->GetName() << setw(14) << -1
|
||||
<< std::setprecision(2) << std::fixed << setw(13)
|
||||
<< theIncomingTrack->GetKineticEnergy() / eV
|
||||
<< std::setprecision(6) << std::scientific << setw(22)
|
||||
<< (theIncomingTrack->GetPosition().x()) / nanometer
|
||||
<< setw(22)
|
||||
<< (theIncomingTrack->GetPosition().y()) / nanometer
|
||||
<< setw(22)
|
||||
<< (theIncomingTrack->GetPosition().z()) / nanometer;
|
||||
*fpgOutput_tl << G4endl;
|
||||
}
|
||||
|
||||
void G4DNAChemistryManager::
|
||||
PushMoleculeAtParentTimeAndPlace(G4Molecule*& molecule,
|
||||
const G4Track* theIncomingTrack)
|
||||
{
|
||||
// TODO: PhysChemIO - method unused in the released code
|
||||
|
||||
if(fActiveChemistry)
|
||||
{
|
||||
@@ -749,9 +758,12 @@ void G4DNAChemistryManager::PushMoleculeAtParentTimeAndPlace(G4Molecule*& molecu
|
||||
}
|
||||
}
|
||||
|
||||
void G4DNAChemistryManager::SetGlobalTemperature(double temp_K)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAChemistryManager::SetGlobalTemperature(G4double temp_K)
|
||||
{
|
||||
G4MolecularConfiguration::SetGlobalTemperature(temp_K);
|
||||
G4DNAMolecularReactionTable::Instance()->ScaleReactionRateForNewTemperature(temp_K);
|
||||
G4DNAMolecularReactionTable::Instance()->
|
||||
ScaleReactionRateForNewTemperature(temp_K);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
|
||||
// $Id: G4DNACrossSectionDataSet.cc 70171 2013-05-24 13:34:18Z gcosmo $
|
||||
// $Id: G4DNACrossSectionDataSet.cc 104122 2017-05-11 13:50:22Z gcosmo $
|
||||
//
|
||||
// Author: Riccardo Capra <capra@ge.infn.it>
|
||||
// Code review by MGP October 2007: removed inheritance from concrete class
|
||||
@@ -160,31 +160,23 @@ G4bool G4DNACrossSectionDataSet::LoadData(const G4String & argFileName)
|
||||
comment=false;
|
||||
space=true;
|
||||
break;
|
||||
|
||||
|
||||
case '#':
|
||||
comment=true;
|
||||
break;
|
||||
|
||||
case '\t':
|
||||
c=' ';
|
||||
case ' ':
|
||||
if (space)
|
||||
break;
|
||||
space = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (comment)
|
||||
break;
|
||||
|
||||
if (c==' ')
|
||||
space=true;
|
||||
else
|
||||
{
|
||||
if (space && (!first))
|
||||
(*stream) << ' ';
|
||||
|
||||
first=false;
|
||||
(*stream) << c;
|
||||
space=false;
|
||||
}
|
||||
if (comment) { break; }
|
||||
if (space && (!first)) { (*stream) << ' '; }
|
||||
|
||||
first=false;
|
||||
(*stream) << c;
|
||||
space=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -318,31 +310,23 @@ G4bool G4DNACrossSectionDataSet::LoadNonLogData(const G4String & argFileName)
|
||||
comment=false;
|
||||
space=true;
|
||||
break;
|
||||
|
||||
|
||||
case '#':
|
||||
comment=true;
|
||||
break;
|
||||
|
||||
case '\t':
|
||||
c=' ';
|
||||
case ' ':
|
||||
if (space)
|
||||
break;
|
||||
space = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (comment)
|
||||
break;
|
||||
|
||||
if (c==' ')
|
||||
space=true;
|
||||
else
|
||||
{
|
||||
if (space && (!first))
|
||||
(*stream) << ' ';
|
||||
|
||||
first=false;
|
||||
(*stream) << c;
|
||||
space=false;
|
||||
}
|
||||
if (comment) { break; }
|
||||
if (space && (!first)) { (*stream) << ' '; }
|
||||
|
||||
first=false;
|
||||
(*stream) << c;
|
||||
space=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,10 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNAMolecularMaterial.cc 101354 2016-11-15 08:27:51Z gcosmo $
|
||||
// $Id: G4DNAMolecularMaterial.cc 103042 2017-03-10 11:50:07Z gcosmo $
|
||||
//
|
||||
// Author: Mathieu Karamitros
|
||||
//
|
||||
|
||||
#include "G4DNAMolecularMaterial.hh"
|
||||
#include "G4Material.hh"
|
||||
#include <utility>
|
||||
@@ -323,6 +324,7 @@ G4DNAMolecularMaterial::RecordMolecularMaterial(G4Material* parentMaterial,
|
||||
}
|
||||
else{
|
||||
matComponent[molecularMaterial] = it->second + fraction;
|
||||
// handle "base material"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,30 +334,27 @@ void G4DNAMolecularMaterial::SearchMolecularMaterial(G4Material* parentMaterial,
|
||||
G4Material* material,
|
||||
double currentFraction)
|
||||
{
|
||||
if (material->GetMassOfMolecule() != 0.0){
|
||||
if (material->GetMassOfMolecule() != 0.0){ // is a molecular material
|
||||
RecordMolecularMaterial(parentMaterial, material, currentFraction);
|
||||
return;
|
||||
}
|
||||
|
||||
G4Material* compMat(0);
|
||||
G4double fraction = -1;
|
||||
G4Material* compMat(nullptr);
|
||||
G4double fraction = -1.;
|
||||
std::map<G4Material*, G4double> matComponent = material->GetMatComponents();
|
||||
std::map<G4Material*, G4double>::iterator it = matComponent.begin();
|
||||
|
||||
for (; it != matComponent.end(); it++){
|
||||
compMat = it->first;
|
||||
fraction = it->second;
|
||||
if (compMat->GetMassOfMolecule() == 0.0){
|
||||
if (compMat->GetMassOfMolecule() == 0.0){ // is not a molecular material
|
||||
SearchMolecularMaterial(parentMaterial, compMat,
|
||||
currentFraction * fraction);
|
||||
}
|
||||
else{
|
||||
else{ // is a molecular material
|
||||
RecordMolecularMaterial(parentMaterial, compMat,
|
||||
currentFraction * fraction);
|
||||
}
|
||||
|
||||
//compMat = 0;
|
||||
//fraction = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -438,7 +437,7 @@ const std::vector<double>* G4DNAMolecularMaterial::GetNumMolPerVolTableFor(
|
||||
const G4Material* lookForMaterial) const
|
||||
{
|
||||
if(lookForMaterial==0) return nullptr;
|
||||
|
||||
|
||||
if (!fpCompNumMolPerVolTable){
|
||||
if (fIsInitialized){
|
||||
G4ExceptionDescription exceptionDescription;
|
||||
@@ -581,7 +580,7 @@ G4DNAMolecularMaterial::SetMolecularConfiguration(const G4String& materialName,
|
||||
const G4String& molUserID)
|
||||
{
|
||||
G4Material* material = G4Material::GetMaterial(materialName);
|
||||
|
||||
|
||||
if(material == 0){
|
||||
G4cout<< "Material " << materialName
|
||||
<< " was not found and therefore won't be linked to "
|
||||
@@ -590,3 +589,33 @@ G4DNAMolecularMaterial::SetMolecularConfiguration(const G4String& materialName,
|
||||
}
|
||||
SetMolecularConfiguration(material, molUserID);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4double
|
||||
G4DNAMolecularMaterial::
|
||||
GetNumMoleculePerVolumeUnitForMaterial(const G4Material*)
|
||||
{
|
||||
G4Exception("G4DNAMolecularMaterial::GetNumMolPerVolForComponentInComposite",
|
||||
"DEPRECATED",
|
||||
FatalException,"Use standard method: GetNumMolPerVolTableFor"
|
||||
" at the run initialization to retrieve a read-only table used"
|
||||
" during stepping. The method is thread-safe.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4double
|
||||
G4DNAMolecularMaterial::
|
||||
GetNumMolPerVolForComponentInComposite(const G4Material*,
|
||||
const G4Material*,
|
||||
G4double)
|
||||
{
|
||||
G4Exception("G4DNAMolecularMaterial::GetNumMolPerVolForComponentInComposite",
|
||||
"DEPRECATED",
|
||||
FatalException,"Use standard method: GetNumMolPerVolTableFor"
|
||||
" at the run initialization to retrieve a read-only table used"
|
||||
" during stepping. The method is thread-safe.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// Authors: S. Meylan and C. Villagrasa (IRSN, France)
|
||||
// Models come from
|
||||
// M. Bug et al, Rad. Phys and Chem. 130, 459-479 (2017)
|
||||
|
||||
#include "G4DNAPTBIonisationStructure.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
G4DNAPTBIonisationStructure::G4DNAPTBIonisationStructure()
|
||||
{
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
std::map<G4String, std::vector<G4double> >::iterator it;
|
||||
for(it=energyConstant.begin();it!=energyConstant.end();it++)
|
||||
{
|
||||
nLevels[it->first] = (it->second).size();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
G4DNAPTBIonisationStructure::~G4DNAPTBIonisationStructure()
|
||||
{ }
|
||||
|
||||
|
||||
G4double G4DNAPTBIonisationStructure::IonisationEnergy(G4int level, const G4String& materialName)
|
||||
{
|
||||
G4String matNameModif = ReplaceMaterial(materialName);
|
||||
|
||||
// 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());
|
||||
}
|
||||
|
||||
G4double ionisation = 0.;
|
||||
|
||||
if (level >=0 && level < nLevels[matNameModif]) ionisation = energyConstant[matNameModif][level];
|
||||
|
||||
return ionisation;
|
||||
}
|
||||
|
||||
G4int G4DNAPTBIonisationStructure::NumberOfLevels(const G4String& materialName)
|
||||
{
|
||||
G4String matNameModif = ReplaceMaterial(materialName);
|
||||
|
||||
// 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];
|
||||
}
|
||||
|
||||
G4String G4DNAPTBIonisationStructure::ReplaceMaterial(const G4String& materialName)
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,283 @@
|
||||
/*
|
||||
* G4PhysChemIO.cc
|
||||
*
|
||||
* Created on: 3 févr. 2017
|
||||
* Author: matkara
|
||||
*/
|
||||
|
||||
#include "G4PhysChemIO.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4VAnalysisManager.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace G4PhysChemIO{
|
||||
|
||||
FormattedText::FormattedText(){
|
||||
fRunID = -1;
|
||||
fEventID = -1;
|
||||
fFileInitialized = false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
FormattedText::~FormattedText(){
|
||||
CloseFile();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void FormattedText::InitializeFile()
|
||||
{
|
||||
if(fFileInitialized) return;
|
||||
|
||||
fOfstream << std::setprecision(6) << std::scientific;
|
||||
fOfstream << setw(11) << left << "#Parent ID" << setw(10) << "Molecule"
|
||||
<< setw(14) << "Elec Modif" << setw(13) << "Energy (eV)"
|
||||
<< setw(22) << "X pos of parent [nm]" << setw(22)
|
||||
<< "Y pos of parent [nm]" << setw(22) << "Z pos of parent [nm]"
|
||||
<< setw(14) << "X pos [nm]" << setw(14) << "Y pos [nm]"
|
||||
<< setw(14) << "Z pos [nm]" << G4endl<< setw(21) << "#"
|
||||
<< setw(13) << "1)io/ex=0/1"
|
||||
<< G4endl
|
||||
<< setw(21) << "#"
|
||||
<< setw(13) << "2)level=0...5"
|
||||
<< G4endl;
|
||||
|
||||
fFileInitialized = true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void FormattedText::WriteInto(const G4String& output,
|
||||
ios_base::openmode mode)
|
||||
{
|
||||
fOfstream.open(output.data(), mode);
|
||||
fFileInitialized = false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void FormattedText::AddEmptyLineInOuputFile()
|
||||
{
|
||||
if(fFileInitialized) fOfstream << G4endl;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void FormattedText::CloseFile()
|
||||
{
|
||||
if (fFileInitialized == false) return;
|
||||
|
||||
if (fOfstream.is_open())
|
||||
{
|
||||
fOfstream.close();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void FormattedText::CreateWaterMolecule(G4int modification,
|
||||
G4int electronicLevel,
|
||||
G4double energy,
|
||||
const G4Track* theIncomingTrack)
|
||||
{
|
||||
if(!fFileInitialized) InitializeFile();
|
||||
|
||||
fOfstream << setw(11) << left << theIncomingTrack->GetTrackID()
|
||||
<< setw(10) << "H2O" << left << modification << internal
|
||||
<< ":" << right << electronicLevel << left << setw(11) << ""
|
||||
<< std::setprecision(2) << std::fixed << setw(13)
|
||||
<< energy / eV << std::setprecision(6) << std::scientific
|
||||
<< setw(22)
|
||||
<< (theIncomingTrack->GetPosition().x()) / nanometer
|
||||
<< setw(22)
|
||||
<< (theIncomingTrack->GetPosition().y()) / nanometer
|
||||
<< setw(22)
|
||||
<< (theIncomingTrack->GetPosition().z()) / nanometer
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void FormattedText::CreateSolvatedElectron(const G4Track* theIncomingTrack,
|
||||
G4ThreeVector* finalPosition)
|
||||
{
|
||||
if(!fFileInitialized) InitializeFile();
|
||||
|
||||
fOfstream << setw(11) << theIncomingTrack->GetTrackID() << setw(10)
|
||||
<< "e_aq" << setw(14) << -1 << std::setprecision(2)
|
||||
<< std::fixed << setw(13)
|
||||
<< theIncomingTrack->GetKineticEnergy() / eV
|
||||
<< std::setprecision(6) << std::scientific << setw(22)
|
||||
<< (theIncomingTrack->GetPosition().x()) / nanometer
|
||||
<< setw(22)
|
||||
<< (theIncomingTrack->GetPosition().y()) / nanometer
|
||||
<< setw(22)
|
||||
<< (theIncomingTrack->GetPosition().z()) / nanometer;
|
||||
|
||||
if (finalPosition != 0)
|
||||
{
|
||||
fOfstream << setw(14) << (finalPosition->x()) / nanometer << setw(14)
|
||||
<< (finalPosition->y()) / nanometer << setw(14)
|
||||
<< (finalPosition->z()) / nanometer;
|
||||
}
|
||||
|
||||
fOfstream << G4endl;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Using G4analysis
|
||||
//
|
||||
|
||||
G4Analysis::G4Analysis(G4VAnalysisManager* analysisManager):
|
||||
fpAnalysisManager(analysisManager)
|
||||
{
|
||||
fFileInitialized = false;
|
||||
fNtupleID = -1;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4Analysis::~G4Analysis()
|
||||
{
|
||||
fpAnalysisManager = 0;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4Analysis::InitializeFile()
|
||||
{
|
||||
if (fFileInitialized) return;
|
||||
|
||||
fNtupleID = fpAnalysisManager->CreateNtuple("PhysChem","PhysChem");
|
||||
fpAnalysisManager->CreateNtupleIColumn(fNtupleID, "ParentID");
|
||||
fpAnalysisManager->CreateNtupleSColumn(fNtupleID, "Molecule");
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// valid for H2O only
|
||||
fpAnalysisManager->CreateNtupleIColumn(fNtupleID, "ElectronicModif");
|
||||
// ionization = 0 / excitation = 1 / diss att = 2
|
||||
fpAnalysisManager->CreateNtupleIColumn(fNtupleID, "level");
|
||||
// valid for ion and exc only
|
||||
fpAnalysisManager->CreateNtupleDColumn(fNtupleID, "Energy_eV");
|
||||
// valid for ion and exc only
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
fpAnalysisManager->CreateNtupleDColumn(fNtupleID, "x_parent_nm");
|
||||
fpAnalysisManager->CreateNtupleDColumn(fNtupleID, "y_parent_nm");
|
||||
fpAnalysisManager->CreateNtupleDColumn(fNtupleID, "z_parent_nm");
|
||||
fpAnalysisManager->CreateNtupleDColumn(fNtupleID, "x_nm");
|
||||
fpAnalysisManager->CreateNtupleDColumn(fNtupleID, "y_nm");
|
||||
fpAnalysisManager->CreateNtupleDColumn(fNtupleID, "z_nm");
|
||||
fpAnalysisManager->FinishNtuple(fNtupleID);
|
||||
|
||||
fFileInitialized = true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4Analysis::WriteInto(const G4String& output,
|
||||
ios_base::openmode)
|
||||
{
|
||||
fpAnalysisManager->OpenFile(output);
|
||||
fFileInitialized = false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4Analysis::CloseFile()
|
||||
{
|
||||
// fpAnalysisManager->Write();
|
||||
// fpAnalysisManager->CloseFile();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4Analysis::CreateWaterMolecule(G4int modification,
|
||||
G4int electronicLevel,
|
||||
G4double energy,
|
||||
const G4Track* theIncomingTrack)
|
||||
{
|
||||
if(!fFileInitialized) InitializeFile();
|
||||
|
||||
// parent ID
|
||||
fpAnalysisManager->FillNtupleIColumn(fNtupleID, 0,
|
||||
theIncomingTrack->GetTrackID());
|
||||
|
||||
// molecule type
|
||||
fpAnalysisManager->FillNtupleSColumn(fNtupleID, 1, "H2O");
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// valid for H2O only
|
||||
|
||||
// electronic modif
|
||||
fpAnalysisManager->FillNtupleIColumn(fNtupleID, 2, modification);
|
||||
// ionization = 0 / excitation = 1 / diss att = 2
|
||||
fpAnalysisManager->FillNtupleIColumn(fNtupleID, 3, electronicLevel);
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID, 4, energy / eV);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const G4ThreeVector& parentPos = theIncomingTrack->GetPosition();
|
||||
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,5,(parentPos.x())/nanometer);
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,6,(parentPos.y())/nanometer);
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,7,(parentPos.z())/nanometer);
|
||||
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,8,(parentPos.x())/nanometer);
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,9,(parentPos.y())/nanometer);
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,10,(parentPos.z())/nanometer);
|
||||
fpAnalysisManager->AddNtupleRow(fNtupleID);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4Analysis::CreateSolvatedElectron(const G4Track* electronTrack,
|
||||
G4ThreeVector* finalPosition)
|
||||
{
|
||||
if(!fFileInitialized) InitializeFile();
|
||||
|
||||
// parent ID
|
||||
fpAnalysisManager->FillNtupleIColumn(fNtupleID, 0,
|
||||
electronTrack->GetTrackID());
|
||||
|
||||
// molecule type
|
||||
fpAnalysisManager->FillNtupleSColumn(fNtupleID, 1, "e_aq");
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// valid for H2O only
|
||||
|
||||
// electronic modif
|
||||
fpAnalysisManager->FillNtupleIColumn(fNtupleID, 2, -1); // electronic modif
|
||||
fpAnalysisManager->FillNtupleIColumn(fNtupleID, 3, -1); // electronic level
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID, 4,
|
||||
electronTrack->GetKineticEnergy() / eV);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const G4ThreeVector& parentPos = electronTrack->GetPosition();
|
||||
const double i_nm = 1./nanometer;
|
||||
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,5, parentPos.x() *i_nm);
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,6, parentPos.y() *i_nm);
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,7, parentPos.z() *i_nm);
|
||||
|
||||
if (finalPosition != 0)
|
||||
{
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,8, finalPosition->x()*i_nm);
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,9, finalPosition->y()*i_nm);
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,10, finalPosition->z()*i_nm);
|
||||
}
|
||||
else
|
||||
{
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,8, parentPos.x() *i_nm);
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,9, parentPos.y() *i_nm);
|
||||
fpAnalysisManager->FillNtupleDColumn(fNtupleID,10, parentPos.z() *i_nm);
|
||||
}
|
||||
|
||||
fpAnalysisManager->AddNtupleRow(fNtupleID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* G4VPhysChemIO.cc
|
||||
*
|
||||
* Created on: 3 févr. 2017
|
||||
* Author: matkara
|
||||
*/
|
||||
|
||||
#include "G4VPhysChemIO.hh"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4VPhysChemIO::G4VPhysChemIO()
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4VPhysChemIO::~G4VPhysChemIO()
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user