#include <G4LossTableBuilder.hh>
|
| G4LossTableBuilder () |
|
virtual | ~G4LossTableBuilder () |
|
void | BuildDEDXTable (G4PhysicsTable *dedxTable, const std::vector< G4PhysicsTable *> &) |
|
void | BuildRangeTable (const G4PhysicsTable *dedxTable, G4PhysicsTable *rangeTable, G4bool isIonisation=false) |
|
void | BuildInverseRangeTable (const G4PhysicsTable *rangeTable, G4PhysicsTable *invRangeTable, G4bool isIonisation=false) |
|
G4PhysicsTable * | BuildTableForModel (G4PhysicsTable *table, G4VEmModel *model, const G4ParticleDefinition *, G4double emin, G4double emax, G4bool spline) |
|
void | InitialiseBaseMaterials (G4PhysicsTable *table) |
|
const std::vector< G4int > * | GetCoupleIndexes () |
|
const std::vector< G4double > * | GetDensityFactors () |
|
G4bool | GetFlag (size_t idx) const |
|
void | SetSplineFlag (G4bool flag) |
|
void | SetInitialisationFlag (G4bool flag) |
|
Definition at line 61 of file G4LossTableBuilder.hh.
◆ G4LossTableBuilder() [1/2]
G4LossTableBuilder::G4LossTableBuilder |
( |
| ) |
|
Definition at line 72 of file G4LossTableBuilder.cc.
79 theFlag =
new std::vector<G4bool>;
std::vector< G4int > * theDensityIdx
std::vector< G4double > * theDensityFactor
std::vector< G4bool > * theFlag
◆ ~G4LossTableBuilder()
G4LossTableBuilder::~G4LossTableBuilder |
( |
| ) |
|
|
virtual |
Definition at line 84 of file G4LossTableBuilder.cc.
std::vector< G4int > * theDensityIdx
std::vector< G4double > * theDensityFactor
std::vector< G4bool > * theFlag
◆ G4LossTableBuilder() [2/2]
◆ BuildDEDXTable()
Definition at line 94 of file G4LossTableBuilder.cc.
97 size_t n_processes = list.size();
100 if(1 >= n_processes) {
return; }
102 size_t nCouples = dedxTable->size();
103 if(0 >= nCouples) {
return; }
105 for (
size_t i=0; i<nCouples; ++i) {
113 for (
size_t j=0; j<npoints; ++j) {
115 for (
size_t k=0; k<n_processes; ++k) {
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
void FillSecondDerivatives()
void PutValue(size_t index, G4double theValue)
size_t GetVectorLength() const
◆ BuildInverseRangeTable()
Definition at line 216 of file G4LossTableBuilder.cc.
221 size_t nCouples = rangeTable->size();
222 if(0 >= nCouples) {
return; }
224 for (
size_t i=0; i<nCouples; ++i) {
227 if( !(*
theFlag)[i] ) {
continue; }
234 delete (*invRangeTable)[i];
238 for (
size_t j=0; j<npoints; ++j) {
void PutValues(size_t binNumber, G4double binValue, G4double dataValue)
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
void FillSecondDerivatives()
size_t GetVectorLength() const
std::vector< G4bool > * theFlag
G4double Energy(size_t index) const
◆ BuildRangeTable()
Definition at line 129 of file G4LossTableBuilder.cc.
134 size_t nCouples = dedxTable->size();
135 if(0 >= nCouples) {
return; }
140 for (
size_t i=0; i<nCouples; ++i) {
142 if( !(*
theFlag)[i] ) {
continue; }
156 for (
size_t k=1; k<npoints; ++k) {
160 if(dedx1 > 0.0) {
break; }
169 if(npoints < 2) { npoints = 2; }
171 delete (*rangeTable)[i];
191 for (
size_t j=1; j<npoints; ++j) {
194 G4double de = (energy2 - energy1) * del;
199 for (
size_t k=0; k<
n; ++k) {
201 dedx1 = pv->
Value(energy);
202 if(dedx1 > 0.0) { sum += de/dedx1; }
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
void FillSecondDerivatives()
void PutValue(size_t index, G4double theValue)
size_t GetVectorLength() const
G4double Value(G4double theEnergy, size_t &lastidx) const
std::vector< G4bool > * theFlag
G4double Energy(size_t index) const
◆ BuildTableForModel()
Definition at line 405 of file G4LossTableBuilder.cc.
413 if(!table) {
return table; }
431 for(
size_t i=0; i<numOfCouples; ++i) {
447 if(0.0 >= tmin) { tmin =
eV; }
460 for(
G4int j=0; j<=
n; ++j) {
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
static G4LossTableManager * Instance()
const G4Material * GetMaterial() const
virtual G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
void FillSecondDerivatives()
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
void PutValue(size_t index, G4double theValue)
G4int GetNumberOfBinsPerDecade() const
static const G4double emax
static G4ProductionCutsTable * GetProductionCutsTable()
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
void InitialiseBaseMaterials(G4PhysicsTable *table)
size_t GetTableSize() const
G4bool GetFlag(size_t idx) const
G4double Energy(size_t index) const
virtual G4double Value(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
◆ GetCoupleIndexes()
const std::vector< G4int > * G4LossTableBuilder::GetCoupleIndexes |
( |
| ) |
|
|
inline |
◆ GetDensityFactors()
const std::vector< G4double > * G4LossTableBuilder::GetDensityFactors |
( |
| ) |
|
|
inline |
Definition at line 130 of file G4LossTableBuilder.hh.
std::vector< G4int > * theDensityIdx
std::vector< G4double > * theDensityFactor
◆ GetFlag()
G4bool G4LossTableBuilder::GetFlag |
( |
size_t |
idx | ) |
const |
|
inline |
◆ InitialiseBaseMaterials()
void G4LossTableBuilder::InitialiseBaseMaterials |
( |
G4PhysicsTable * |
table | ) |
|
Definition at line 252 of file G4LossTableBuilder.cc.
254 size_t nCouples = table->size();
255 size_t nFlags =
theFlag->size();
278 if(nFlags < nCouples) {
279 for(
size_t i=nFlags; i<nCouples; ++i) {
282 for(
size_t i=nFlags; i<nCouples; ++i) {
theDensityIdx->push_back(-1); }
283 for(
size_t i=nFlags; i<nCouples; ++i) {
theFlag->push_back(
true); }
285 for(
size_t i=0; i<nCouples; ++i) {
289 (*theFlag)[i] = table->
GetFlag(i);
291 (*theDensityIdx)[i] = i;
300 for(
size_t j=0; j<nCouples; ++j) {
302 if(j == i) {
continue; }
310 (*theDensityIdx)[i] = j;
312 (*theFlag)[i] =
false;
315 (*theDensityIdx)[j] = j;
316 (*theDensityFactor)[j] = 1.0;
317 (*theFlag)[j] =
true;
const G4Material * GetMaterial() const
std::vector< G4int > * theDensityIdx
G4ProductionCuts * GetProductionCuts() const
G4double GetDensity() const
static G4ProductionCutsTable * GetProductionCutsTable()
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::vector< G4double > * theDensityFactor
std::vector< G4bool > * theFlag
G4bool GetFlag(size_t i) const
const G4Material * GetBaseMaterial() const
◆ InitialiseCouples()
void G4LossTableBuilder::InitialiseCouples |
( |
| ) |
|
|
private |
Definition at line 338 of file G4LossTableBuilder.cc.
351 theFlag->resize(nCouples,
true);
353 for(
size_t i=0; i<nCouples; ++i) {
358 (*theDensityIdx)[i] = i;
367 for(
size_t j=0; j<nCouples; ++j) {
369 if(j == i) {
continue; }
377 (*theDensityIdx)[i] = j;
379 (*theFlag)[i] =
false;
382 (*theDensityIdx)[j] = j;
383 (*theDensityFactor)[j] = 1.0;
384 (*theFlag)[j] =
true;
const G4Material * GetMaterial() const
std::vector< G4int > * theDensityIdx
G4ProductionCuts * GetProductionCuts() const
G4double GetDensity() const
static G4ProductionCutsTable * GetProductionCutsTable()
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::vector< G4double > * theDensityFactor
std::vector< G4bool > * theFlag
size_t GetTableSize() const
const G4Material * GetBaseMaterial() const
◆ operator=()
◆ SetInitialisationFlag()
void G4LossTableBuilder::SetInitialisationFlag |
( |
G4bool |
flag | ) |
|
|
inline |
◆ SetSplineFlag()
void G4LossTableBuilder::SetSplineFlag |
( |
G4bool |
flag | ) |
|
|
inline |
◆ isInitialized
G4bool G4LossTableBuilder::isInitialized |
|
private |
◆ splineFlag
G4bool G4LossTableBuilder::splineFlag |
|
private |
◆ theDensityFactor
std::vector<G4double>* G4LossTableBuilder::theDensityFactor |
|
private |
◆ theDensityIdx
std::vector<G4int>* G4LossTableBuilder::theDensityIdx |
|
private |
◆ theFlag
std::vector<G4bool>* G4LossTableBuilder::theFlag |
|
private |
The documentation for this class was generated from the following files: