#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 62 of file G4LossTableBuilder.hh.
G4LossTableBuilder::G4LossTableBuilder |
( |
| ) |
|
Definition at line 73 of file G4LossTableBuilder.cc.
77 isInitialized =
false;
79 theDensityFactor =
new std::vector<G4double>;
80 theDensityIdx =
new std::vector<G4int>;
81 theFlag =
new std::vector<G4bool>;
static G4EmParameters * Instance()
G4LossTableBuilder::~G4LossTableBuilder |
( |
| ) |
|
|
virtual |
Definition at line 96 of file G4LossTableBuilder.cc.
99 size_t n_processes = list.size();
102 if(1 >= n_processes) {
return; }
104 size_t nCouples = dedxTable->size();
105 if(0 >= nCouples) {
return; }
107 for (
size_t i=0; i<nCouples; ++i) {
115 for (
size_t j=0; j<npoints; ++j) {
117 for (
size_t k=0; k<n_processes; ++k) {
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
size_t GetVectorLength() const
void FillSecondDerivatives()
void PutValue(size_t index, G4double theValue)
Definition at line 218 of file G4LossTableBuilder.cc.
223 size_t nCouples = rangeTable->size();
224 if(0 >= nCouples) {
return; }
226 for (
size_t i=0; i<nCouples; ++i) {
229 if( !(*theFlag)[i] ) {
continue; }
236 delete (*invRangeTable)[i];
240 for (
size_t j=0; j<npoints; ++j) {
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
size_t GetVectorLength() const
void FillSecondDerivatives()
G4double Energy(size_t index) const
void PutValues(size_t index, G4double e, G4double dataValue)
Definition at line 131 of file G4LossTableBuilder.cc.
136 size_t nCouples = dedxTable->size();
137 if(0 >= nCouples) {
return; }
142 for (
size_t i=0; i<nCouples; ++i) {
144 if( !(*theFlag)[i] ) {
continue; }
158 for (
size_t k=1; k<npoints; ++k) {
162 if(dedx1 > 0.0) {
break; }
171 if(npoints < 2) { npoints = 2; }
173 delete (*rangeTable)[i];
193 for (
size_t j=1; j<npoints; ++j) {
196 G4double de = (energy2 - energy1) * del;
201 for (
size_t k=0; k<
n; ++k) {
203 dedx1 = pv->
Value(energy);
204 if(dedx1 > 0.0) { sum += de/dedx1; }
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
size_t GetVectorLength() const
void FillSecondDerivatives()
void PutValue(size_t index, G4double theValue)
G4double Energy(size_t index) const
G4double Value(G4double theEnergy, size_t &lastidx) const
G4double energy(const ThreeVector &p, const G4double m)
Definition at line 407 of file G4LossTableBuilder.cc.
415 if(!table) {
return table; }
433 for(
size_t i=0; i<numOfCouples; ++i) {
449 if(0.0 >= tmin) { tmin =
eV; }
462 for(
G4int j=0; j<=
n; ++j) {
G4int NumberOfBinsPerDecade() const
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
virtual G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
G4bool GetFlag(size_t idx) const
void FillSecondDerivatives()
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
size_t GetTableSize() const
void PutValue(size_t index, G4double theValue)
static constexpr double eV
G4double Energy(size_t index) const
static const G4double emax
static G4ProductionCutsTable * GetProductionCutsTable()
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
void InitialiseBaseMaterials(G4PhysicsTable *table)
virtual G4double Value(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
const G4Material * GetMaterial() const
const std::vector< G4int > * G4LossTableBuilder::GetCoupleIndexes |
( |
| ) |
|
|
inline |
Definition at line 126 of file G4LossTableBuilder.hh.
128 if(theDensityIdx->size() == 0) { InitialiseCouples(); }
129 return theDensityIdx;
const std::vector< G4double > * G4LossTableBuilder::GetDensityFactors |
( |
| ) |
|
|
inline |
Definition at line 133 of file G4LossTableBuilder.hh.
135 if(theDensityIdx->size() == 0) { InitialiseCouples(); }
136 return theDensityFactor;
G4bool G4LossTableBuilder::GetFlag |
( |
size_t |
idx | ) |
const |
|
inline |
Definition at line 254 of file G4LossTableBuilder.cc.
256 size_t nCouples = table->size();
257 size_t nFlags = theFlag->size();
259 if(nCouples == nFlags && isInitialized) {
return; }
261 isInitialized =
true;
280 if(nFlags < nCouples) {
281 for(
size_t i=nFlags; i<nCouples; ++i) {
282 theDensityFactor->push_back(1.0);
284 for(
size_t i=nFlags; i<nCouples; ++i) { theDensityIdx->push_back(-1); }
285 for(
size_t i=nFlags; i<nCouples; ++i) { theFlag->push_back(
true); }
287 for(
size_t i=0; i<nCouples; ++i) {
291 (*theFlag)[i] = table->
GetFlag(i);
292 if ((*theDensityIdx)[i] < 0) {
293 (*theDensityIdx)[i] = i;
302 for(
size_t j=0; j<nCouples; ++j) {
304 if(j == i) {
continue; }
312 (*theDensityIdx)[i] = j;
314 (*theFlag)[i] =
false;
317 (*theDensityIdx)[j] = j;
318 (*theDensityFactor)[j] = 1.0;
319 (*theFlag)[j] =
true;
G4double GetDensity() const
static G4ProductionCutsTable * GetProductionCutsTable()
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
const G4Material * GetBaseMaterial() const
G4bool GetFlag(size_t i) const
G4ProductionCuts * GetProductionCuts() const
const G4Material * GetMaterial() const
void G4LossTableBuilder::SetInitialisationFlag |
( |
G4bool |
flag | ) |
|
|
inline |
void G4LossTableBuilder::SetSplineFlag |
( |
G4bool |
flag | ) |
|
|
inline |
The documentation for this class was generated from the following files: