Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4DNAChemistryManager.cc 64057 2012-10-30 15:04:49Z gcosmo $
// $Id: G4DNAChemistryManager.cc 75583 2013-11-04 12:16:46Z gcosmo $
//
// Author: Mathieu Karamitros (kara@cenbg.in2p3.fr)
//
@@ -48,270 +48,294 @@
#include "G4ITManager.hh"
#include "G4MolecularConfiguration.hh"
#include "G4MoleculeCounter.hh"
#include "G4Tokenizer.hh"
#include "G4AutoLock.hh"
using namespace std;
auto_ptr<G4DNAChemistryManager> G4DNAChemistryManager::fInstance(0);
auto_ptr<G4DNAChemistryManager> G4DNAChemistryManager::fInstance ;
G4ThreadLocal std::ofstream* G4DNAChemistryManager::fOutput = 0;
G4Mutex chemManExistence;
G4DNAChemistryManager::G4DNAChemistryManager() :
fActiveChemistry(false)
fActiveChemistry(false)
{
fExcitationLevel = 0;
fIonisationLevel = 0;
fWriteFile = false;
fExcitationLevel = 0;
fIonisationLevel = 0;
fWriteFile = false;
}
G4DNAChemistryManager* G4DNAChemistryManager::Instance()
{
if(!fInstance.get()) fInstance = auto_ptr<G4DNAChemistryManager>(new G4DNAChemistryManager());
return fInstance.get();
if (fInstance.get() == 0)
{
G4AutoLock lock(&chemManExistence);
if(fInstance.get() == 0) // MT : double check at initialisation
{
fInstance = auto_ptr<G4DNAChemistryManager> (new G4DNAChemistryManager()) ;
}
lock.unlock();
}
return fInstance.get();
}
G4DNAChemistryManager::~G4DNAChemistryManager()
{
if (fOutput.is_open())
{
fOutput.close();
}
if(fIonisationLevel) delete fIonisationLevel;
if(fExcitationLevel) delete fExcitationLevel;
G4DNAMolecularReactionTable::DeleteInstance();
G4MoleculeHandleManager::DeleteInstance();
G4MolecularConfiguration::DeleteManager();
fInstance.release();
G4MoleculeCounter::DeleteInstance();
if(fIonisationLevel) delete fIonisationLevel;
if(fExcitationLevel) delete fExcitationLevel;
G4DNAMolecularReactionTable::DeleteInstance();
G4MoleculeHandleManager::DeleteInstance();
G4MolecularConfiguration::DeleteManager();
fInstance.release();
G4MoleculeCounter::DeleteInstance();
}
void G4DNAChemistryManager::DeleteInstance()
{
if(fInstance.get())
fInstance.reset();
G4AutoLock lock(&chemManExistence);
if(fInstance.get())
{
fInstance.reset();
}
}
void G4DNAChemistryManager::InitializeFile()
{
*fOutput << std::setprecision(6) << std::scientific;
*fOutput << 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;
}
void G4DNAChemistryManager::WriteInto(const G4String& output,
ios_base::openmode mode)
ios_base::openmode mode)
{
fOutput.open(output.data(), mode);
fOutput << std::setprecision(6) << std::scientific;
fOutput << 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;
fWriteFile = true;
fOutput = new std::ofstream();
fOutput->open(output.data(), mode);
fWriteFile = true;
}
void G4DNAChemistryManager::CloseFile()
{
if (fOutput.is_open())
{
fOutput.close();
}
fWriteFile = false;
if (fOutput->is_open())
{
fOutput->close();
}
fWriteFile = false;
}
G4DNAWaterExcitationStructure* G4DNAChemistryManager::GetExcitationLevel()
{
if(!fExcitationLevel)
{
fExcitationLevel = new G4DNAWaterExcitationStructure;
}
return fExcitationLevel;
if(!fExcitationLevel)
{
fExcitationLevel = new G4DNAWaterExcitationStructure;
}
return fExcitationLevel;
}
G4DNAWaterIonisationStructure* G4DNAChemistryManager::GetIonisationLevel()
{
if(!fIonisationLevel)
{
fIonisationLevel = new G4DNAWaterIonisationStructure;
}
return fIonisationLevel;
if(!fIonisationLevel)
{
fIonisationLevel = new G4DNAWaterIonisationStructure;
}
return fIonisationLevel;
}
void G4DNAChemistryManager::CreateWaterMolecule(ElectronicModification modification,
G4int electronicLevel,
const G4Track* theIncomingTrack)
G4int electronicLevel,
const G4Track* theIncomingTrack)
{
if(fWriteFile)
{
G4double energy = -1.;
if(fWriteFile)
{
G4double energy = -1.;
switch (modification)
{
case eDissociativeAttachment:
energy = -1;
break;
case eExcitedMolecule :
energy = GetExcitationLevel()->ExcitationEnergy(electronicLevel);
break;
case eIonizedMolecule :
energy = GetIonisationLevel()->IonisationEnergy(electronicLevel);
break;
}
switch (modification)
{
case eDissociativeAttachment:
energy = -1;
break;
case eExcitedMolecule :
energy = GetExcitationLevel()->ExcitationEnergy(electronicLevel);
break;
case eIonizedMolecule :
energy = GetIonisationLevel()->IonisationEnergy(electronicLevel);
break;
}
fOutput << 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;
}
*fOutput << 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;
}
if(fActiveChemistry)
{
G4Molecule * H2O = new G4Molecule (G4H2O::Definition());
if(fActiveChemistry)
{
G4Molecule * H2O = new G4Molecule (G4H2O::Definition());
switch (modification)
{
case eDissociativeAttachment:
H2O -> AddElectron(5,1);
break;
case eExcitedMolecule :
H2O -> ExciteMolecule(electronicLevel);
break;
case eIonizedMolecule :
H2O -> IonizeMolecule(electronicLevel);
break;
}
switch (modification)
{
case eDissociativeAttachment:
H2O -> AddElectron(5,1);
break;
case eExcitedMolecule :
H2O -> ExciteMolecule(electronicLevel);
break;
case eIonizedMolecule :
H2O -> IonizeMolecule(electronicLevel);
break;
}
G4Track * H2OTrack = H2O->BuildTrack(1*picosecond,
theIncomingTrack->GetPosition());
G4Track * H2OTrack = H2O->BuildTrack(1*picosecond,
theIncomingTrack->GetPosition());
H2OTrack -> SetParentID(theIncomingTrack->GetTrackID());
H2OTrack -> SetTrackStatus(fStopButAlive);
H2OTrack -> SetKineticEnergy(0.);
H2OTrack -> SetParentID(theIncomingTrack->GetTrackID());
H2OTrack -> SetTrackStatus(fStopButAlive);
H2OTrack -> SetKineticEnergy(0.);
G4ITTrackHolder::Instance()->PushTrack(H2OTrack);
}
G4ITTrackHolder::Instance()->PushTrack(H2OTrack);
}
}
void G4DNAChemistryManager::CreateSolvatedElectron(const G4Track* theIncomingTrack,
G4ThreeVector* finalPosition)
G4ThreeVector* finalPosition)
// finalPosition is a pointer because this argument is optional
{
if(fWriteFile)
{
fOutput << 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(fWriteFile)
{
*fOutput << 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)
{
fOutput<< setw(14)<< (finalPosition->x())/nanometer
<< setw(14)<< (finalPosition->y())/nanometer
<< setw(14)<< (finalPosition->z())/nanometer ;
}
if(finalPosition != 0)
{
*fOutput<< setw(14)<< (finalPosition->x())/nanometer
<< setw(14)<< (finalPosition->y())/nanometer
<< setw(14)<< (finalPosition->z())/nanometer ;
}
fOutput << G4endl;
}
*fOutput << G4endl;
}
if(fActiveChemistry)
{
G4Molecule* e_aq = new G4Molecule(G4Electron_aq::Definition());
G4Track * e_aqTrack(0);
if(finalPosition)
{
e_aqTrack = e_aq->BuildTrack(picosecond,*finalPosition);
}
else
{
e_aqTrack = e_aq->BuildTrack(picosecond,theIncomingTrack->GetPosition());
}
e_aqTrack -> SetTrackStatus(fAlive);
e_aqTrack -> SetParentID(theIncomingTrack->GetTrackID());
G4ITTrackHolder::Instance()->PushTrack(e_aqTrack);
G4ITManager<G4Molecule>::Instance()->Push(e_aqTrack);
}
if(fActiveChemistry)
{
G4Molecule* e_aq = new G4Molecule(G4Electron_aq::Definition());
G4Track * e_aqTrack(0);
if(finalPosition)
{
e_aqTrack = e_aq->BuildTrack(picosecond,*finalPosition);
}
else
{
e_aqTrack = e_aq->BuildTrack(picosecond,theIncomingTrack->GetPosition());
}
e_aqTrack -> SetTrackStatus(fAlive);
e_aqTrack -> SetParentID(theIncomingTrack->GetTrackID());
G4ITTrackHolder::Instance()->PushTrack(e_aqTrack);
G4ITManager<G4Molecule>::Instance()->Push(e_aqTrack);
}
}
void G4DNAChemistryManager::PushMolecule(G4Molecule*& molecule, double time,
const G4ThreeVector& position, int parentID)
const G4ThreeVector& position, int parentID)
{
if(fWriteFile)
{
fOutput << 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;
fOutput << G4endl;
}
if(fWriteFile)
{
*fOutput << 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;
*fOutput << G4endl;
}
if(fActiveChemistry)
{
G4Track* track = molecule->BuildTrack(time,position);
track -> SetTrackStatus(fAlive);
track -> SetParentID(parentID);
G4ITTrackHolder::Instance()->PushTrack(track);
G4ITManager<G4Molecule>::Instance()->Push(track);
}
else
{
delete molecule;
molecule = 0;
}
if(fActiveChemistry)
{
G4Track* track = molecule->BuildTrack(time,position);
track -> SetTrackStatus(fAlive);
track -> SetParentID(parentID);
G4ITTrackHolder::Instance()->PushTrack(track);
G4ITManager<G4Molecule>::Instance()->Push(track);
}
else
{
delete molecule;
molecule = 0;
}
}
void G4DNAChemistryManager::PushMoleculeAtParentTimeAndPlace(G4Molecule*& molecule,
const G4Track* theIncomingTrack)
const G4Track* theIncomingTrack)
{
if(fWriteFile)
{
fOutput << 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 ;
fOutput << G4endl;
}
if(fWriteFile)
{
*fOutput << 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 ;
*fOutput << G4endl;
}
if(fActiveChemistry)
{
G4Track* track = molecule->BuildTrack(theIncomingTrack->GetGlobalTime(),theIncomingTrack->GetPosition());
track -> SetTrackStatus(fAlive);
track -> SetParentID(theIncomingTrack->GetTrackID());
G4ITTrackHolder::Instance()->PushTrack(track);
G4ITManager<G4Molecule>::Instance()->Push(track);
}
else
{
delete molecule;
molecule = 0;
}
if(fActiveChemistry)
{
G4Track* track = molecule->BuildTrack(theIncomingTrack->GetGlobalTime(),theIncomingTrack->GetPosition());
track -> SetTrackStatus(fAlive);
track -> SetParentID(theIncomingTrack->GetTrackID());
G4ITTrackHolder::Instance()->PushTrack(track);
G4ITManager<G4Molecule>::Instance()->Push(track);
}
else
{
delete molecule;
molecule = 0;
}
}
void G4DNAChemistryManager::AddEmptyLineInOuputFile()
{
if(fWriteFile)
{
*fOutput << G4endl;
}
}
@@ -25,7 +25,7 @@
//
//
// $Id$
// $Id: G4DNACrossSectionDataSet.cc 70171 2013-05-24 13:34:18Z gcosmo $
//
// Author: Riccardo Capra <capra@ge.infn.it>
// Code review by MGP October 2007: removed inheritance from concrete class
@@ -23,12 +23,12 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4DNADamages.cc 65022 2012-11-12 16:43:12Z gcosmo $
// $Id: G4DNADamages.cc 66872 2013-01-15 01:25:57Z japost $
//
#include "G4DNADamages.hh"
#include "G4UnitsTable.hh"
G4DNADamages* G4DNADamages::fpInstance(0);
G4ThreadLocal G4DNADamages* G4DNADamages::fpInstance(0);
G4DNAIndirectHit::G4DNAIndirectHit(const G4String& baseName,
const G4Molecule* molecule,
@@ -23,13 +23,13 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: G4DNAGenericIonsManager.cc 73124 2013-08-19 07:53:33Z gcosmo $
#include "G4DNAGenericIonsManager.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4Alpha.hh"
#include "G4Ions.hh"
#include "G4DNAIons.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -65,88 +65,88 @@ G4DNAGenericIonsManager :: G4DNAGenericIonsManager()
// shortlived subType anti_encoding
// excitation
G4Ions *helium;
G4Ions *hydrogen;
G4Ions *alphaPlus;
G4Ions *positronium1s;
G4Ions *positronium2s;
G4DNAIons *helium;
G4DNAIons *hydrogen;
G4DNAIons *alphaPlus;
G4DNAIons *positronium1s;
G4DNAIons *positronium2s;
G4Ions *carbon;
G4Ions *nitrogen;
G4Ions *oxygen;
G4Ions *iron;
G4DNAIons *carbon;
G4DNAIons *nitrogen;
G4DNAIons *oxygen;
G4DNAIons *iron;
iron= new G4Ions(
iron= new G4DNAIons(
"iron", 52.5672*GeV, 0.0*MeV, +26.0*eplus,
0, +1, 0,
0, 0, 0,
"nucleus", +26, +56, 0,
"DNAion", +26, +56, 0,
true, -1.0, 0,
false, "", 0,
0.0);
oxygen= new G4Ions(
oxygen= new G4DNAIons(
"oxygen", 15.0074*GeV, 0.0*MeV, +8.0*eplus,
0, +1, 0,
0, 0, 0,
"nucleus", +8, +16, 0,
"DNAion", +8, +16, 0,
true, -1.0, 0,
false, "", 0,
0.0);
nitrogen= new G4Ions(
nitrogen= new G4DNAIons(
"nitrogen", 13.132*GeV, 0.0*MeV, +7.0*eplus,
0, +1, 0,
0, 0, 0,
"nucleus", +7, +14, 0,
"DNAion", +7, +14, 0,
true, -1.0, 0,
false, "", 0,
0.0);
carbon= new G4Ions(
carbon= new G4DNAIons(
"carbon", 11.267025440*GeV, 0.0*MeV, +6.0*eplus,
0, +1, 0,
0, 0, 0,
"nucleus", +6, +12, 0,
"DNAion", +6, +12, 0,
true, -1.0, 0,
false, "", 0,
0.0);
helium= new G4Ions(
helium= new G4DNAIons(
"helium", 3.727417*GeV, 0.0*MeV, +0.0*eplus,
0, +1, 0,
0, 0, 0,
"nucleus", +2, +4, 0,
"DNAion", +2, +4, 0,
true, -1.0, 0,
false, "", 0,
0.0);
alphaPlus= new G4Ions("alpha+", 3.727417*GeV, 0.0*MeV, +1.0*eplus,
alphaPlus= new G4DNAIons("alpha+", 3.727417*GeV, 0.0*MeV, +1.0*eplus,
1, +1, 0,
0, 0, 0,
"nucleus", +1, +4, 0,
"DNAion", +1, +4, 0,
true, -1.0, 0, false,
"", 0, 0.0);
hydrogen= new G4Ions("hydrogen", 0.9382723*GeV, 0.0*MeV, +0.0*eplus,
hydrogen= new G4DNAIons("hydrogen", 0.9382723*GeV, 0.0*MeV, +0.0*eplus,
0, +1, 0,
0, 0, 0,
"nucleus", +1, +1, 0,
"DNAion", +1, +1, 0,
true, -1.0, 0, false,
"", 0, 0.0);
positronium1s= new G4Ions("Ps-1s", 2*electron_mass_c2, 0.0*MeV, +0.0*eplus,
positronium1s= new G4DNAIons("Ps-1s", 2*electron_mass_c2, 0.0*MeV, +0.0*eplus,
0, 0, 0,
0, 0, 0,
"nucleus", 0, 0, 0,
"DNAion", 0, 0, 0,
true, -1.0, 0, false,
"", 0, 0.0);
positronium2s= new G4Ions("Ps-2s", 2*electron_mass_c2, 0.0*MeV, +0.0*eplus,
positronium2s= new G4DNAIons("Ps-2s", 2*electron_mass_c2, 0.0*MeV, +0.0*eplus,
0, 0, 0,
0, 0, 0,
"nucleus", 0, 0, 0,
"DNAion", 0, 0, 0,
true, -1.0, 0, false,
"", 0, 0.0);
@@ -0,0 +1,82 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// 31.07.2013: Derived from G4Ions for MT migration (SI)
// Suggested by Makoto et al.
#include <fstream>
#include <iomanip>
#include "G4DNAIons.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
// ######################################################################
// ### G4DNAIons ###
// ######################################################################
G4DNAIons::G4DNAIons(
const G4String& aName, G4double mass,
G4double width, G4double charge,
G4int iSpin, G4int iParity,
G4int iConjugation, G4int iIsospin,
G4int iIsospin3, G4int gParity,
const G4String& pType, G4int lepton,
G4int baryon, G4int encoding,
G4bool stable, G4double lifetime,
G4DecayTable *decaytable , G4bool shortlived,
const G4String& subType,
G4int anti_encoding,
G4double excitation,
G4int isomer
)
: G4ParticleDefinition( aName,mass,width,charge,iSpin,iParity,
iConjugation,iIsospin,iIsospin3,gParity,pType,
lepton,baryon,encoding,stable,lifetime,decaytable,
shortlived, subType, anti_encoding),
theExcitationEnergy(excitation),
theIsomerLevel(isomer)
{
// isomer level isset to 10
// if isomer level is set to 0 for excited state
if ((theExcitationEnergy > 0.0) && (isomer==0)) isomer =9;
if (GetAtomicNumber() == 0 ) {
// AtomicNumber/Mass is positve even for anti_nulceus
SetAtomicNumber( std::abs(G4int(GetPDGCharge()/eplus)) );
SetAtomicMass( std::abs(GetBaryonNumber()) );
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4DNAIons::~G4DNAIons()
{
}
@@ -23,15 +23,21 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4DNAMolecularMaterial.cc 65022 2012-11-12 16:43:12Z gcosmo $
// $Id: G4DNAMolecularMaterial.cc 70171 2013-05-24 13:34:18Z gcosmo $
//
#include "G4DNAMolecularMaterial.hh"
#include "G4Material.hh"
#include <utility>
#include "G4StateManager.hh"
#include "G4Threading.hh"
#include "G4AutoLock.hh"
using namespace std;
G4DNAMolecularMaterial* G4DNAMolecularMaterial::fInstance(0);
//G4ThreadLocal G4DNAMolecularMaterial* G4DNAMolecularMaterial::fInstance(0);
G4Mutex aMutex=G4MUTEX_INITIALIZER;
bool CompareMaterial::operator() (const G4Material* mat1, const G4Material* mat2) const
{
@@ -59,8 +65,6 @@ bool CompareMaterial::operator() (const G4Material* mat1, const G4Material* mat2
return mat1 < baseMat2;
}
G4DNAMolecularMaterial* G4DNAMolecularMaterial::fInstance(0);
G4DNAMolecularMaterial* G4DNAMolecularMaterial::Instance()
{
if(! fInstance) new G4DNAMolecularMaterial();
@@ -274,7 +278,11 @@ void G4DNAMolecularMaterial::InitializeNumMolPerVol()
void G4DNAMolecularMaterial::Initialize()
{
if(fIsInitialized) return;
G4AutoLock l(&aMutex);
if(fIsInitialized)
{
return;
}
const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
@@ -371,7 +379,7 @@ const std::vector<double>* G4DNAMolecularMaterial::GetNumMolPerVolTableFor(const
if(fIsInitialized)
{
G4ExceptionDescription exceptionDescription;
exceptionDescription << "The pointer fpCompNumMolPerVolTable is not initialized will the singleton of G4DNAMolecularMaterial "
exceptionDescription << "The pointer fpCompNumMolPerVolTable is not initialized whereas the singleton of G4DNAMolecularMaterial "
<< "has already been initialized."<< G4endl;
G4Exception("G4DNAMolecularMaterial::GetNumMolPerVolTableFor","G4DNAMolecularMaterial005",
FatalException,exceptionDescription);
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4DNAMolecularReactionTable.cc 65022 2012-11-12 16:43:12Z gcosmo $
// $Id: G4DNAMolecularReactionTable.cc 74551 2013-10-14 12:59:14Z gcosmo $
//
// Author: Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
//
@@ -48,6 +48,7 @@
using namespace std;
G4DNAMolecularReactionTable* G4DNAMolecularReactionTable::fInstance(0);
//G4ThreadLocal G4DNAMolecularReactionTable* G4DNAMolecularReactionTable::fInstance(0);
G4DNAMolecularReactionData::G4DNAMolecularReactionData():
fReactive1(),fReactive2(),
@@ -284,7 +285,7 @@ void G4DNAMolecularReactionTable::PrintTable(G4VDNAReactionModel* pReactionModel
G4cout<<"Number of possible reactions: "<< n << G4endl;
////////////////////////////////////////////////////////////////////
// Tableau dynamique en fonction du nombre de caractère maximal dans
// Tableau dynamique en fonction du nombre de caractere maximal dans
// chaque colonne
////////////////////////////////////////////////////////////////////