Import Geant4 9.2.0 source tree
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4LossTableManager.cc,v 1.84 2007/06/14 07:28:48 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4LossTableManager.cc,v 1.95 2008/11/13 18:23:39 schaelic Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -69,6 +69,7 @@
|
||||
// left ionisation table for further usage (VI)
|
||||
// 12-02-07 Add SetSkin, SetLinearLossLimit (V.Ivanchenko)
|
||||
// 18-06-07 Move definition of msc parameters to G4EmProcessOptions (V.Ivanchenko)
|
||||
// 21-02-08 Add G4EmSaturation (V.Ivanchenko)
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
@@ -90,6 +91,7 @@
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4PhysicsTableHelper.hh"
|
||||
#include "G4EmCorrections.hh"
|
||||
#include "G4EmSaturation.hh"
|
||||
#include "G4EmTableType.hh"
|
||||
#include "G4LossTableBuilder.hh"
|
||||
|
||||
@@ -115,16 +117,25 @@ G4LossTableManager::~G4LossTableManager()
|
||||
}
|
||||
size_t msc = msc_vector.size();
|
||||
for (size_t j=0; j<msc; j++) {
|
||||
if(msc_vector[j] ) delete msc_vector[j];
|
||||
if( msc_vector[j] ) delete msc_vector[j];
|
||||
}
|
||||
size_t emp = emp_vector.size();
|
||||
for (size_t k=0; k<emp; k++) {
|
||||
if(emp_vector[k] ) delete emp_vector[k];
|
||||
if( emp_vector[k] ) delete emp_vector[k];
|
||||
}
|
||||
size_t mod = mod_vector.size();
|
||||
for (size_t a=0; a<mod; a++) {
|
||||
if( mod_vector[a] ) delete mod_vector[a];
|
||||
}
|
||||
size_t fmod = fmod_vector.size();
|
||||
for (size_t b=0; b<fmod; b++) {
|
||||
if( fmod_vector[b] ) delete fmod_vector[b];
|
||||
}
|
||||
Clear();
|
||||
delete theMessenger;
|
||||
delete tableBuilder;
|
||||
delete emCorrections;
|
||||
delete emSaturation;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
@@ -151,6 +162,7 @@ G4LossTableManager::G4LossTableManager()
|
||||
theElectron = G4Electron::Electron();
|
||||
tableBuilder = new G4LossTableBuilder();
|
||||
emCorrections= new G4EmCorrections();
|
||||
emSaturation = new G4EmSaturation();
|
||||
integral = true;
|
||||
integralActive = false;
|
||||
buildCSDARange = false;
|
||||
@@ -159,8 +171,10 @@ G4LossTableManager::G4LossTableManager()
|
||||
maxEnergyForMuonsActive = false;
|
||||
stepFunctionActive = false;
|
||||
flagLPM = true;
|
||||
splineFlag = true;
|
||||
bremsTh = DBL_MAX;
|
||||
verbose = 1;
|
||||
tableBuilder->SetSplineFlag(splineFlag);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
@@ -225,9 +239,10 @@ void G4LossTableManager::DeRegister(G4VEnergyLossProcess* p)
|
||||
void G4LossTableManager::Register(G4VMultipleScattering* p)
|
||||
{
|
||||
msc_vector.push_back(p);
|
||||
if(verbose > 1)
|
||||
if(verbose > 1) {
|
||||
G4cout << "G4LossTableManager::Register G4VMultipleScattering : "
|
||||
<< p->GetProcessName() << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
@@ -245,9 +260,10 @@ void G4LossTableManager::DeRegister(G4VMultipleScattering* p)
|
||||
void G4LossTableManager::Register(G4VEmProcess* p)
|
||||
{
|
||||
emp_vector.push_back(p);
|
||||
if(verbose > 1)
|
||||
if(verbose > 1) {
|
||||
G4cout << "G4LossTableManager::Register G4VEmProcess : "
|
||||
<< p->GetProcessName() << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
@@ -262,6 +278,48 @@ void G4LossTableManager::DeRegister(G4VEmProcess* p)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
void G4LossTableManager::Register(G4VEmModel* p)
|
||||
{
|
||||
mod_vector.push_back(p);
|
||||
if(verbose > 1) {
|
||||
G4cout << "G4LossTableManager::Register G4VEmModel : "
|
||||
<< p->GetName() << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
void G4LossTableManager::DeRegister(G4VEmModel* p)
|
||||
{
|
||||
size_t n = mod_vector.size();
|
||||
for (size_t i=0; i<n; i++) {
|
||||
if(mod_vector[i] == p) mod_vector[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
void G4LossTableManager::Register(G4VEmFluctuationModel* p)
|
||||
{
|
||||
fmod_vector.push_back(p);
|
||||
if(verbose > 1) {
|
||||
G4cout << "G4LossTableManager::Register G4VEmFluctuationModel : "
|
||||
<< p->GetName() << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
void G4LossTableManager::DeRegister(G4VEmFluctuationModel* p)
|
||||
{
|
||||
size_t n = fmod_vector.size();
|
||||
for (size_t i=0; i<n; i++) {
|
||||
if(fmod_vector[i] == p) fmod_vector[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
void G4LossTableManager::RegisterIon(const G4ParticleDefinition* ion,
|
||||
G4VEnergyLossProcess* p)
|
||||
{
|
||||
@@ -363,10 +421,11 @@ G4EnergyLossMessenger* G4LossTableManager::GetMessenger()
|
||||
void G4LossTableManager::ParticleHaveNoLoss(
|
||||
const G4ParticleDefinition* aParticle)
|
||||
{
|
||||
G4String s = "G4LossTableManager:: dE/dx table not found for "
|
||||
+ aParticle->GetParticleName() + "!";
|
||||
G4Exception(s);
|
||||
exit(1);
|
||||
G4String s = " dE/dx table not found for "
|
||||
+ aParticle->GetParticleName() + " !";
|
||||
G4Exception("G4LossTableManager::ParticleHaveNoLoss", "EM01",
|
||||
FatalException, s);
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
@@ -475,7 +534,8 @@ G4VEnergyLossProcess* G4LossTableManager::BuildTables(
|
||||
for (i=0; i<n_loss; i++) {
|
||||
p = loss_vector[i];
|
||||
if (p && aParticle == part_vector[i] && !tables_are_built[i]) {
|
||||
if (p->IsIonisationProcess() && isActive[i] || !em || (em && !isActive[iem]) ) {
|
||||
if ((p->IsIonisationProcess() && isActive[i]) ||
|
||||
!em || (em && !isActive[iem]) ) {
|
||||
em = p;
|
||||
iem= i;
|
||||
}
|
||||
@@ -508,7 +568,7 @@ G4VEnergyLossProcess* G4LossTableManager::BuildTables(
|
||||
|
||||
dedx = em->IonisationTable();
|
||||
if (1 < n_dedx) {
|
||||
em->SetDEDXTable(dedx, fIonisation);
|
||||
em->SetDEDXTable(dedx, fIsIonisation);
|
||||
dedx = 0;
|
||||
dedx = G4PhysicsTableHelper::PreparePhysicsTable(dedx);
|
||||
tableBuilder->BuildDEDXTable(dedx, t_list);
|
||||
@@ -559,7 +619,7 @@ G4VEnergyLossProcess* G4LossTableManager::BuildTables(
|
||||
if (0 < nSubRegions) {
|
||||
G4PhysicsTable* dedxSub = em->IonisationTableForSubsec();
|
||||
if (1 < listSub.size()) {
|
||||
em->SetDEDXTable(dedxSub, fSubIonisation);
|
||||
em->SetDEDXTable(dedxSub, fIsSubIonisation);
|
||||
dedxSub = 0;
|
||||
dedxSub = G4PhysicsTableHelper::PreparePhysicsTable(dedxSub);
|
||||
tableBuilder->BuildDEDXTable(dedxSub, listSub);
|
||||
@@ -828,6 +888,21 @@ G4bool G4LossTableManager::LPMFlag() const
|
||||
return flagLPM;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
void G4LossTableManager::SetSplineFlag(G4bool val)
|
||||
{
|
||||
splineFlag = val;
|
||||
tableBuilder->SetSplineFlag(splineFlag);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
G4bool G4LossTableManager::SplineFlag() const
|
||||
{
|
||||
return splineFlag;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4LossTableManager::SetBremsstrahlungTh(G4double val)
|
||||
@@ -842,4 +917,18 @@ G4double G4LossTableManager::BremsstrahlungTh() const
|
||||
return bremsTh;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmCorrections* G4LossTableManager::EmCorrections()
|
||||
{
|
||||
return emCorrections;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmSaturation* G4LossTableManager::EmSaturation()
|
||||
{
|
||||
return emSaturation;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
Reference in New Issue
Block a user