#include <G4PixeCrossSectionHandler.hh>
|
| G4PixeCrossSectionHandler () |
|
| G4PixeCrossSectionHandler (G4IInterpolator *interpolation, const G4String &modelK="ecpssr", const G4String &modelL="ecpssr", const G4String &modelM="ecpssr", G4double minE=1 *CLHEP::keV, G4double maxE=0.1 *CLHEP::GeV, G4int nBins=200, G4double unitE=CLHEP::MeV, G4double unitData=CLHEP::barn, G4int minZ=6, G4int maxZ=92) |
|
virtual | ~G4PixeCrossSectionHandler () |
|
void | Initialise (G4IInterpolator *interpolation, const G4String &modelK="ecpssr", const G4String &modelL="ecpssr", const G4String &modelM="ecpssr", G4double minE=1 *CLHEP::keV, G4double maxE=0.1 *CLHEP::GeV, G4int nBins=200, G4double unitE=CLHEP::MeV, G4double unitData=CLHEP::barn, G4int minZ=6, G4int maxZ=92) |
|
G4int | SelectRandomAtom (const G4Material *material, G4double e) const |
|
G4int | SelectRandomShell (G4int Z, G4double e) const |
|
G4double | FindValue (G4int Z, G4double e) const |
|
G4double | FindValue (G4int Z, G4double e, G4int shellIndex) const |
|
G4double | ValueForMaterial (const G4Material *material, G4double e) const |
|
void | LoadShellData (const G4String &dataFile) |
|
G4double | MicroscopicCrossSection (const G4ParticleDefinition *particleDef, G4double kineticEnergy, G4double Z, G4double deltaCut) const |
|
void | PrintData () const |
|
void | Clear () |
|
◆ G4PixeCrossSectionHandler() [1/3]
G4PixeCrossSectionHandler::G4PixeCrossSectionHandler |
( |
| ) |
|
Definition at line 61 of file G4PixeCrossSectionHandler.cc.
66 Initialise(0,
"",
"",
"",1.*
keV,0.1*
GeV,200,
MeV,
barn,6,92);
G4IInterpolator * interpolation
std::vector< G4IDataSet * > * crossSections
void Initialise(G4IInterpolator *interpolation, const G4String &modelK="ecpssr", const G4String &modelL="ecpssr", const G4String &modelM="ecpssr", G4double minE=1 *CLHEP::keV, G4double maxE=0.1 *CLHEP::GeV, G4int nBins=200, G4double unitE=CLHEP::MeV, G4double unitData=CLHEP::barn, G4int minZ=6, G4int maxZ=92)
◆ G4PixeCrossSectionHandler() [2/3]
G4PixeCrossSectionHandler::G4PixeCrossSectionHandler |
( |
G4IInterpolator * |
interpolation, |
|
|
const G4String & |
modelK = "ecpssr" , |
|
|
const G4String & |
modelL = "ecpssr" , |
|
|
const G4String & |
modelM = "ecpssr" , |
|
|
G4double |
minE = 1*CLHEP::keV , |
|
|
G4double |
maxE = 0.1*CLHEP::GeV , |
|
|
G4int |
nBins = 200 , |
|
|
G4double |
unitE = CLHEP::MeV , |
|
|
G4double |
unitData = CLHEP::barn , |
|
|
G4int |
minZ = 6 , |
|
|
G4int |
maxZ = 92 |
|
) |
| |
Definition at line 71 of file G4PixeCrossSectionHandler.cc.
G4IInterpolator * interpolation
std::vector< G4IDataSet * > * crossSections
std::vector< G4String > crossModel
◆ ~G4PixeCrossSectionHandler()
G4PixeCrossSectionHandler::~G4PixeCrossSectionHandler |
( |
| ) |
|
|
virtual |
Definition at line 98 of file G4PixeCrossSectionHandler.cc.
102 std::map<G4int,G4IDataSet*,std::less<G4int> >::iterator
pos;
117 for (
size_t i=0; i<
n; i++)
119 delete (*crossSections)[i];
G4IInterpolator * interpolation
std::map< G4int, G4IDataSet *, std::less< G4int > > dataMap
std::vector< G4IDataSet * > * crossSections
static const G4double pos
◆ G4PixeCrossSectionHandler() [3/3]
◆ ActiveElements()
void G4PixeCrossSectionHandler::ActiveElements |
( |
| ) |
|
|
private |
Definition at line 576 of file G4PixeCrossSectionHandler.cc.
579 if (materialTable == 0)
580 G4Exception(
"G4PixeCrossSectionHandler::ActiveElements",
583 "no MaterialTable found");
593 for (
G4int iEl=0; iEl<nElements; iEl++)
595 G4Element* element = (*elementVector)[iEl];
std::vector< G4Element * > G4ElementVector
static G4MaterialTable * GetMaterialTable()
std::vector< G4Material * > G4MaterialTable
static size_t GetNumberOfMaterials()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4bool contains(const G4double &) const
size_t GetNumberOfElements() const
const G4ElementVector * GetElementVector() const
◆ BuildCrossSectionsForMaterials()
std::vector< G4IDataSet * > * G4PixeCrossSectionHandler::BuildCrossSectionsForMaterials |
( |
const G4DataVector & |
energyVector | ) |
|
|
private |
Definition at line 633 of file G4PixeCrossSectionHandler.cc.
638 std::vector<G4IDataSet*>* matCrossSections =
new std::vector<G4IDataSet*>;
643 size_t nOfBins = energyVector.size();
647 if (materialTable == 0)
648 G4Exception(
"G4PixeCrossSectionHandler::BuildCrossSectionsForMaterials",
651 "no MaterialTable found");
666 for (
G4int i=0; i<nElements; i++) {
678 energies->push_back(e);
681 data->push_back(cross);
689 matCrossSections->push_back(setForMat);
691 return matCrossSections;
virtual void AddComponent(G4IDataSet *dataSet)=0
std::vector< G4Element * > G4ElementVector
static G4MaterialTable * GetMaterialTable()
std::vector< G4Material * > G4MaterialTable
const G4double * GetAtomicNumDensityVector() const
static size_t GetNumberOfMaterials()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double FindValue(G4int Z, G4double e) const
size_t GetNumberOfElements() const
const G4ElementVector * GetElementVector() const
virtual G4IInterpolator * Clone() const =0
G4IInterpolator * CreateInterpolation()
◆ BuildForMaterials()
void G4PixeCrossSectionHandler::BuildForMaterials |
( |
| ) |
|
|
private |
Definition at line 406 of file G4PixeCrossSectionHandler.cc.
416 energyVector.push_back(std::pow(10., std::log10(
eMin)+i*dBin));
421 std::vector<G4IDataSet*>::iterator
mat;
439 G4Exception(
"G4PixeCrossSectionHandler::BuildForMaterials",
442 ", crossSections = 0");
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::vector< G4IDataSet * > * crossSections
std::vector< G4IDataSet * > * BuildCrossSectionsForMaterials(const G4DataVector &energyVector)
◆ Clear()
void G4PixeCrossSectionHandler::Clear |
( |
| ) |
|
Definition at line 210 of file G4PixeCrossSectionHandler.cc.
213 std::map<G4int,G4IDataSet*,std::less<G4int> >::iterator
pos;
226 G4int i = (*pos).first;
std::map< G4int, G4IDataSet *, std::less< G4int > > dataMap
static const G4double pos
◆ CreateInterpolation()
◆ FindValue() [1/2]
Definition at line 236 of file G4PixeCrossSectionHandler.cc.
240 std::map<G4int,G4IDataSet*,std::less<G4int> >::const_iterator
pos;
253 G4cout <<
"WARNING: G4PixeCrossSectionHandler::FindValue(Z,e) did not find Z = " virtual G4double FindValue(G4double x, G4int componentId=0) const =0
G4GLOB_DLL std::ostream G4cout
std::map< G4int, G4IDataSet *, std::less< G4int > > dataMap
static const G4double pos
◆ FindValue() [2/2]
Definition at line 259 of file G4PixeCrossSectionHandler.cc.
264 std::map<G4int,G4IDataSet*,std::less<G4int> >::const_iterator
pos;
276 if(shellIndex < nComponents)
281 G4cout <<
"WARNING: G4PixeCrossSectionHandler::FindValue(Z,e,shell) did not find" 282 <<
" shellIndex= " << shellIndex
292 G4cout <<
"WARNING: G4PixeCrossSectionHandler::FindValue did not find Z = " virtual const G4IDataSet * GetComponent(G4int componentId) const =0
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual size_t NumberOfComponents(void) const =0
G4GLOB_DLL std::ostream G4cout
std::map< G4int, G4IDataSet *, std::less< G4int > > dataMap
static const G4double pos
◆ GetInterpolation()
const G4IInterpolator* G4PixeCrossSectionHandler::GetInterpolation |
( |
| ) |
const |
|
inlineprivate |
◆ Initialise()
void G4PixeCrossSectionHandler::Initialise |
( |
G4IInterpolator * |
interpolation, |
|
|
const G4String & |
modelK = "ecpssr" , |
|
|
const G4String & |
modelL = "ecpssr" , |
|
|
const G4String & |
modelM = "ecpssr" , |
|
|
G4double |
minE = 1*CLHEP::keV , |
|
|
G4double |
maxE = 0.1*CLHEP::GeV , |
|
|
G4int |
nBins = 200 , |
|
|
G4double |
unitE = CLHEP::MeV , |
|
|
G4double |
unitData = CLHEP::barn , |
|
|
G4int |
minZ = 6 , |
|
|
G4int |
maxZ = 92 |
|
) |
| |
Definition at line 126 of file G4PixeCrossSectionHandler.cc.
138 interpolation = algorithm;
147 nBins = numberOfBins;
G4IInterpolator * interpolation
std::vector< G4String > crossModel
G4IInterpolator * CreateInterpolation()
◆ LoadShellData()
void G4PixeCrossSectionHandler::LoadShellData |
( |
const G4String & |
dataFile | ) |
|
Definition at line 180 of file G4PixeCrossSectionHandler.cc.
183 for (
size_t i=0; i<nZ; i++)
G4IInterpolator * interpolation
std::map< G4int, G4IDataSet *, std::less< G4int > > dataMap
virtual G4bool LoadData(const G4String &fileName)=0
std::vector< G4IDataSet * > * crossSections
std::vector< G4String > crossModel
virtual G4IInterpolator * Clone() const =0
◆ MicroscopicCrossSection()
Definition at line 695 of file G4PixeCrossSectionHandler.cc.
712 G4double gamma = energy / particleMass;
713 G4double beta2 = 1. - 1. / (gamma * gamma);
719 if ( tMax > deltaCut )
721 var = deltaCut / tMax;
722 cross = (1. - var * (1. - beta2 * std::log(var))) / deltaCut;
732 else if (spin > 0.9 )
734 cross += -std::log(var) / (3.*deltaCut) + (tMax-deltaCut) *
735 ((5.+1./var)*0.25 /(
energy*
energy) - beta2 / (tMax*deltaCut))/3.;
G4double GetPDGSpin() const
G4double GetPDGMass() const
◆ NumberOfComponents()
G4int G4PixeCrossSectionHandler::NumberOfComponents |
( |
G4int |
Z | ) |
const |
|
private |
Definition at line 611 of file G4PixeCrossSectionHandler.cc.
615 std::map<G4int,G4IDataSet*,std::less<G4int> >::const_iterator
pos;
624 G4cout <<
"WARNING: G4PixeCrossSectionHandler::NumberOfComponents did not " virtual size_t NumberOfComponents(void) const =0
G4GLOB_DLL std::ostream G4cout
std::map< G4int, G4IDataSet *, std::less< G4int > > dataMap
static const G4double pos
◆ operator=()
◆ PrintData()
void G4PixeCrossSectionHandler::PrintData |
( |
void |
| ) |
const |
Definition at line 159 of file G4PixeCrossSectionHandler.cc.
161 std::map<G4int,G4IDataSet*,std::less<G4int> >::const_iterator
pos;
172 G4cout <<
"---- Data set for Z = " 176 G4cout <<
"--------------------------------------------------" <<
G4endl;
G4GLOB_DLL std::ostream G4cout
std::map< G4int, G4IDataSet *, std::less< G4int > > dataMap
virtual void PrintData(void) const =0
static const G4double pos
◆ SelectRandomAtom()
Definition at line 448 of file G4PixeCrossSectionHandler.cc.
466 size_t materialIndex = material->
GetIndex();
468 G4IDataSet* materialSet = (*crossSections)[materialIndex];
469 G4double materialCrossSection0 = 0.0;
472 for (
G4int i=0; i < nElements; i++ )
475 materialCrossSection0 += cr;
476 cross.push_back(materialCrossSection0);
481 for (
G4int k=0 ; k < nElements ; k++ )
483 if (random <= cross[k])
return (
G4int) (*elementVector)[k]->GetZ();
virtual const G4IDataSet * GetComponent(G4int componentId) const =0
std::vector< G4Element * > G4ElementVector
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
size_t GetNumberOfElements() const
const G4ElementVector * GetElementVector() const
◆ SelectRandomShell()
Definition at line 538 of file G4PixeCrossSectionHandler.cc.
553 std::map<G4int,G4IDataSet*,std::less<G4int> >::const_iterator
pos;
559 if (pos !=
dataMap.end()) dataSet = (*pos).second;
562 for (
size_t i=0; i<nShells; i++)
565 if (shellDataSet != 0)
569 if (random <= partialSum)
return i;
virtual const G4IDataSet * GetComponent(G4int componentId) const =0
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual size_t NumberOfComponents(void) const =0
std::map< G4int, G4IDataSet *, std::less< G4int > > dataMap
G4double FindValue(G4int Z, G4double e) const
static const G4double pos
◆ ValueForMaterial()
Definition at line 299 of file G4PixeCrossSectionHandler.cc.
308 for (
G4int i=0 ; i<nElements ; i++)
312 G4double nAtomsVol = nAtomsPerVolume[i];
313 value += nAtomsVol * elementValue;
std::vector< G4Element * > G4ElementVector
const G4double * GetVecNbOfAtomsPerVolume() const
G4double FindValue(G4int Z, G4double e) const
size_t GetNumberOfElements() const
const G4ElementVector * GetElementVector() const
◆ activeZ
◆ crossModel
std::vector<G4String> G4PixeCrossSectionHandler::crossModel |
|
private |
◆ crossSections
std::vector<G4IDataSet*>* G4PixeCrossSectionHandler::crossSections |
|
private |
◆ dataMap
◆ eMax
G4double G4PixeCrossSectionHandler::eMax |
|
private |
◆ eMin
G4double G4PixeCrossSectionHandler::eMin |
|
private |
◆ interpolation
◆ nBins
G4int G4PixeCrossSectionHandler::nBins |
|
private |
◆ unit1
G4double G4PixeCrossSectionHandler::unit1 |
|
private |
◆ unit2
G4double G4PixeCrossSectionHandler::unit2 |
|
private |
◆ zMax
G4int G4PixeCrossSectionHandler::zMax |
|
private |
◆ zMin
G4int G4PixeCrossSectionHandler::zMin |
|
private |
The documentation for this class was generated from the following files: