72 G4cout <<
"MicroElec Elastic model is constructed " <<
G4endl
102 G4cout <<
"Calling G4MicroElecElasticModel::Initialise()" <<
G4endl;
107 G4cout <<
"G4MicroElecElasticModel: low energy limit increased from " <<
114 G4cout <<
"G4MicroElecElasticModel: high energy limit decreased from " <<
122 G4String fileElectron(
"microelec/sigma_elastic_e_Si");
136 char *path = std::getenv(
"G4LEDATA");
144 std::ostringstream eFullFileName;
145 eFullFileName << path <<
"/microelec/sigmadiff_cumulated_elastic_e_Si.dat";
146 std::ifstream eDiffCrossSection(eFullFileName.str().c_str());
148 if (!eDiffCrossSection)
150 "Missing data file: /microelec/sigmadiff_cumulated_elastic_e_Si.dat");
160 while(!eDiffCrossSection.eof())
164 eDiffCrossSection>>tDummy>>eDummy;
169 eVecm[tDummy].push_back(0.);
174 if (eDummy !=
eVecm[tDummy].back())
eVecm[tDummy].push_back(eDummy);
179 G4cout <<
"Loaded cross section files for MicroElec Elastic model" <<
G4endl;
183 G4cout <<
"MicroElec Elastic model is initialized " <<
G4endl
204 G4cout <<
"Calling CrossSectionPerVolume() of G4MicroElecElasticModel" <<
G4endl;
224 if (table !=
nullptr)
231 G4Exception(
"G4MicroElecElasticModel::ComputeCrossSectionPerVolume",
"em0002",
240 G4cout <<
" - Cross section per Si atom (cm^-1)=" << sigma*density/(1./
cm) <<
G4endl;
243 return sigma*density;
256 G4cout <<
"Calling SampleSecondaries() of G4MicroElecElasticModel" <<
G4endl;
276 G4double xDir = std::sqrt(1. - cosTheta*cosTheta);
278 xDir *= std::cos(phi);
279 yDir *= std::sin(phi);
281 G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers));
309 auto e12 = std::upper_bound(
eVecm[(*t1)].begin(),
eVecm[(*t1)].end(), integrDiff);
311 auto e22 = std::upper_bound(
eVecm[(*t2)].begin(),
eVecm[(*t2)].end(), integrDiff);
326 if (xs11==0 || xs12==0 ||xs21==0 ||xs22==0)
return (0.);
374 G4double a = (std::log10(xs2)-std::log10(xs1)) / (std::log10(
e2)-std::log10(
e1));
375 G4double b = std::log10(xs2) - a*std::log10(
e2);
376 G4double sigma = a*std::log10(e) + b;
377 G4double value = (std::pow(10.,sigma));
423 cosTheta= std::cos(theta*
pi/180);
static const G4double e1[44]
static const G4double e2[44]
static const G4double pos
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
static constexpr double eV
static constexpr double MeV
static constexpr double pi
static constexpr double cm
G4GLOB_DLL std::ostream G4cout
Hep3Vector orthogonal() const
Hep3Vector cross(const Hep3Vector &) const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
static G4Electron * ElectronDefinition()
G4bool LoadData(const G4String &argFileName) override
G4double FindValue(G4double e, G4int componentId=0) const override
G4MicroElecElasticModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="MicroElecElasticModel")
std::vector< G4double > eTdummyVec
G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax) override
G4ParticleChangeForGamma * fParticleChangeForGamma
G4double lowEnergyLimitOfModel
G4double RandomizeCosTheta(G4double k)
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double QuadInterpolator(G4double e11, G4double e12, G4double e21, G4double e22, G4double x11, G4double x12, G4double x21, G4double x22, G4double t1, G4double t2, G4double t, G4double e)
G4double Theta(G4ParticleDefinition *aParticleDefinition, G4double k, G4double integrDiff)
G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2)
virtual ~G4MicroElecElasticModel()
G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2)
TriDimensionMap eDiffCrossSectionData
G4double LinLinInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2)
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static G4NistManager * Instance()
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
const G4String & GetParticleName() const
void SetHighEnergyLimit(G4double)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void SetLowEnergyLimit(G4double)
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)