Import Geant4 8.1.0 source tree
This commit is contained in:
@@ -1,27 +1,30 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * 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. *
|
||||
// * 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 intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4LossTableManager.hh,v 1.28 2005/10/27 14:04:35 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4LossTableManager.hh,v 1.41 2006/06/29 19:54:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
@@ -50,6 +53,11 @@
|
||||
// 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
|
||||
// 14-01-04 Activate precise range calculation (V.Ivanchenko)
|
||||
// 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
|
||||
// 10-01-06 PreciseRange -> CSDARange (V.Ivantchenko)
|
||||
// 20-01-06 Introduce GetSubDEDX method (VI)
|
||||
// 26-01-06 Rename GetRange -> GetRangeFromRestricteDEDX (V.Ivanchenko)
|
||||
// 10-05-06 Add methods SetMscStepLimitation, FacRange and MscFlag (VI)
|
||||
// 22-05-06 Add methods Set/Get bremsTh (VI)
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
@@ -70,7 +78,6 @@
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include "globals.hh"
|
||||
#include "G4LossTableBuilder.hh"
|
||||
#include "G4VEnergyLossProcess.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
|
||||
@@ -81,6 +88,7 @@ class G4ParticleDefinition;
|
||||
class G4VMultipleScattering;
|
||||
class G4VEmProcess;
|
||||
class G4EmCorrections;
|
||||
class G4LossTableBuilder;
|
||||
|
||||
class G4LossTableManager
|
||||
{
|
||||
@@ -99,12 +107,22 @@ public:
|
||||
G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple *couple);
|
||||
|
||||
G4double GetSubDEDX(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple *couple);
|
||||
|
||||
G4double GetRange(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple *couple);
|
||||
|
||||
G4double GetTrancatedRange(
|
||||
G4double GetCSDARange(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple *couple);
|
||||
|
||||
G4double GetRangeFromRestricteDEDX(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple *couple);
|
||||
@@ -132,13 +150,17 @@ public:
|
||||
|
||||
void DeRegister(G4VEmProcess* p);
|
||||
|
||||
void EnergyLossProcessIsInitialised(const G4ParticleDefinition* aParticle, G4VEnergyLossProcess* p);
|
||||
void EnergyLossProcessIsInitialised(const G4ParticleDefinition* aParticle,
|
||||
G4VEnergyLossProcess* p);
|
||||
|
||||
void RegisterIon(const G4ParticleDefinition* aParticle, G4VEnergyLossProcess* p);
|
||||
void RegisterIon(const G4ParticleDefinition* aParticle,
|
||||
G4VEnergyLossProcess* p);
|
||||
|
||||
void RegisterExtraParticle(const G4ParticleDefinition* aParticle, G4VEnergyLossProcess* p);
|
||||
void RegisterExtraParticle(const G4ParticleDefinition* aParticle,
|
||||
G4VEnergyLossProcess* p);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition* aParticle, G4VEnergyLossProcess* p);
|
||||
void BuildPhysicsTable(const G4ParticleDefinition* aParticle,
|
||||
G4VEnergyLossProcess* p);
|
||||
|
||||
void SetLossFluctuations(G4bool val);
|
||||
|
||||
@@ -154,25 +176,39 @@ public:
|
||||
|
||||
void SetMaxEnergy(G4double val);
|
||||
|
||||
void SetMaxEnergyForPreciseRange(G4double val);
|
||||
void SetMaxEnergyForCSDARange(G4double val);
|
||||
|
||||
void SetMaxEnergyForMuons(G4double val);
|
||||
|
||||
void SetDEDXBinning(G4int val);
|
||||
|
||||
void SetDEDXBinningForPreciseRange(G4int val);
|
||||
void SetDEDXBinningForCSDARange(G4int val);
|
||||
|
||||
void SetLambdaBinning(G4int val);
|
||||
|
||||
void SetStepLimits(G4double v1, G4double v2);
|
||||
void SetStepFunction(G4double v1, G4double v2);
|
||||
|
||||
void SetBuildPreciseRange(G4bool val);
|
||||
void SetBuildCSDARange(G4bool val);
|
||||
|
||||
void SetLPMFlag(G4bool val);
|
||||
|
||||
void SetBremsstrahlungTh(G4double val);
|
||||
|
||||
void SetVerbose(G4int val);
|
||||
|
||||
G4EnergyLossMessenger* GetMessenger();
|
||||
|
||||
G4bool BuildPreciseRange() const;
|
||||
G4bool BuildCSDARange() const;
|
||||
|
||||
G4bool LPMFlag() const;
|
||||
|
||||
void SetMscStepLimitation(G4bool algorithm, G4double factor = -1.);
|
||||
|
||||
G4bool MscFlag() const;
|
||||
|
||||
G4double FacRange() const;
|
||||
|
||||
G4double BremsstrahlungTh() const;
|
||||
|
||||
const std::vector<G4VEnergyLossProcess*>& GetEnergyLossProcessVector();
|
||||
|
||||
@@ -188,7 +224,8 @@ private:
|
||||
|
||||
G4VEnergyLossProcess* BuildTables(const G4ParticleDefinition* aParticle);
|
||||
|
||||
void CopyTables(const G4ParticleDefinition* aParticle, G4VEnergyLossProcess*);
|
||||
void CopyTables(const G4ParticleDefinition* aParticle,
|
||||
G4VEnergyLossProcess*);
|
||||
|
||||
void ParticleHaveNoLoss(const G4ParticleDefinition* aParticle);
|
||||
|
||||
@@ -207,6 +244,7 @@ private:
|
||||
std::vector<PD> part_vector;
|
||||
std::vector<PD> base_part_vector;
|
||||
std::vector<G4bool> tables_are_built;
|
||||
std::vector<G4bool> isActive;
|
||||
std::vector<G4PhysicsTable*> dedx_vector;
|
||||
std::vector<G4PhysicsTable*> range_vector;
|
||||
std::vector<G4PhysicsTable*> inv_range_vector;
|
||||
@@ -214,9 +252,9 @@ private:
|
||||
std::vector<G4VEmProcess*> emp_vector;
|
||||
|
||||
// cash
|
||||
G4VEnergyLossProcess* currentLoss;
|
||||
PD currentParticle;
|
||||
PD theElectron;
|
||||
G4VEnergyLossProcess* currentLoss;
|
||||
PD currentParticle;
|
||||
PD theElectron;
|
||||
|
||||
G4int n_loss;
|
||||
|
||||
@@ -228,11 +266,14 @@ private:
|
||||
G4bool integral;
|
||||
G4bool integralActive;
|
||||
G4bool all_tables_are_stored;
|
||||
G4bool buildPreciseRange;
|
||||
G4bool buildCSDARange;
|
||||
G4bool minEnergyActive;
|
||||
G4bool maxEnergyActive;
|
||||
G4bool maxEnergyForMuonsActive;
|
||||
G4bool stepFunctionActive;
|
||||
G4bool flagLPM;
|
||||
G4bool flagMSC;
|
||||
G4bool mscActive;
|
||||
|
||||
G4double minSubRange;
|
||||
G4double maxRangeVariation;
|
||||
@@ -240,6 +281,8 @@ private:
|
||||
G4double minKinEnergy;
|
||||
G4double maxKinEnergy;
|
||||
G4double maxKinEnergyForMuons;
|
||||
G4double facRange;
|
||||
G4double bremsTh;
|
||||
|
||||
G4LossTableBuilder* tableBuilder;
|
||||
G4EnergyLossMessenger* theMessenger;
|
||||
@@ -269,13 +312,57 @@ inline G4double G4LossTableManager::GetDEDX(
|
||||
}
|
||||
G4double x;
|
||||
if(currentLoss) x = currentLoss->GetDEDX(kineticEnergy, couple);
|
||||
else x = G4EnergyLossTables::GetDEDX(currentParticle,kineticEnergy,couple,false);
|
||||
else x = G4EnergyLossTables::GetDEDX(
|
||||
currentParticle,kineticEnergy,couple,false);
|
||||
return x;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
inline G4double G4LossTableManager::GetTrancatedRange(
|
||||
inline G4double G4LossTableManager::GetSubDEDX(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple *couple)
|
||||
{
|
||||
if(aParticle != currentParticle) {
|
||||
currentParticle = aParticle;
|
||||
std::map<PD, G4VEnergyLossProcess*,std::less<PD> >::const_iterator pos;
|
||||
if ((pos = loss_map.find(aParticle)) != loss_map.end()) {
|
||||
currentLoss = (*pos).second;
|
||||
} else {
|
||||
currentLoss = 0;
|
||||
// ParticleHaveNoLoss(aParticle);
|
||||
}
|
||||
}
|
||||
G4double x = 0.0;
|
||||
if(currentLoss) x = currentLoss->GetDEDXForSubsec(kineticEnergy, couple);
|
||||
return x;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
inline G4double G4LossTableManager::GetCSDARange(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple *couple)
|
||||
{
|
||||
if(aParticle != currentParticle) {
|
||||
currentParticle = aParticle;
|
||||
std::map<PD, G4VEnergyLossProcess*, std::less<PD> >::const_iterator pos;
|
||||
if ((pos = loss_map.find(currentParticle)) != loss_map.end()) {
|
||||
currentLoss = (*pos).second;
|
||||
} else {
|
||||
currentLoss = 0;
|
||||
}
|
||||
}
|
||||
G4double x = DBL_MAX;
|
||||
if(currentLoss) x = currentLoss->GetCSDARange(kineticEnergy, couple);
|
||||
return x;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
inline G4double G4LossTableManager::GetRangeFromRestricteDEDX(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple *couple)
|
||||
@@ -344,8 +431,8 @@ inline G4double G4LossTableManager::GetEnergy(
|
||||
}
|
||||
G4double x;
|
||||
if(currentLoss) x = currentLoss->GetKineticEnergy(range, couple);
|
||||
else x = G4EnergyLossTables::GetPreciseEnergyFromRange(currentParticle,
|
||||
range,couple,false);
|
||||
else x = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
currentParticle,range,couple,false);
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user