72 G4cout <<
"MicroElec Elastic model is constructed " <<
G4endl
87 std::map< G4String,G4MicroElecCrossSectionDataSet*,std::less<G4String> >::iterator
pos;
107 G4cout <<
"Calling G4MicroElecElasticModel::Initialise()" <<
G4endl;
113 G4cout <<
"G4MicroElecElasticModel: low energy limit increased from " <<
120 G4cout <<
"G4MicroElecElasticModel: high energy limit decreased from " <<
129 G4String fileElectron(
"microelec/sigma_elastic_e_Si");
146 char *path = std::getenv(
"G4LEDATA");
154 std::ostringstream eFullFileName;
155 eFullFileName << path <<
"/microelec/sigmadiff_cumulated_elastic_e_Si.dat";
156 std::ifstream eDiffCrossSection(eFullFileName.str().c_str());
158 if (!eDiffCrossSection)
159 G4Exception(
"G4MicroElecElasticModel::Initialise",
"em0003",
FatalException,
"Missing data file: /microelec/sigmadiff_cumulated_elastic_e_Si.dat");
174 while(!eDiffCrossSection.eof())
178 eDiffCrossSection>>tDummy>>eDummy;
185 eVecm[tDummy].push_back(0.);
190 if (eDummy !=
eVecm[tDummy].back())
eVecm[tDummy].push_back(eDummy);
197 G4cout <<
"Loaded cross section files for MicroElec Elastic model" <<
G4endl;
201 G4cout <<
"MicroElec Elastic model is initialized " << G4endl
223 G4cout <<
"Calling CrossSectionPerVolume() of G4MicroElecElasticModel" <<
G4endl;
241 std::map< G4String,G4MicroElecCrossSectionDataSet*,std::less<G4String> >::iterator
pos;
254 G4Exception(
"G4MicroElecElasticModel::ComputeCrossSectionPerVolume",
"em0002",
FatalException,
"Model not applicable to particle type.");
262 G4cout <<
" - Cross section per Si atom (cm^-1)=" << sigma*density/(1./
cm) << G4endl;
267 return sigma*density;
280 G4cout <<
"Calling SampleSecondaries() of G4MicroElecElasticModel" <<
G4endl;
302 G4double xDir = std::sqrt(1. - cosTheta*cosTheta);
304 xDir *= std::cos(phi);
305 yDir *= std::sin(phi);
307 G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers));
337 std::vector<double>::iterator
t2 = std::upper_bound(eTdummyVec.begin(),eTdummyVec.end(),
k);
338 std::vector<double>::iterator
t1 = t2-1;
340 std::vector<double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),eVecm[(*t1)].end(), integrDiff);
341 std::vector<double>::iterator e11 = e12-1;
343 std::vector<double>::iterator e22 = std::upper_bound(eVecm[(*t2)].begin(),eVecm[(*t2)].end(), integrDiff);
344 std::vector<double>::iterator e21 = e22-1;
353 xs11 = eDiffCrossSectionData[valueT1][valueE11];
354 xs12 = eDiffCrossSectionData[valueT1][valueE12];
355 xs21 = eDiffCrossSectionData[valueT2][valueE21];
356 xs22 = eDiffCrossSectionData[valueT2][valueE22];
360 if (xs11==0 || xs12==0 ||xs21==0 ||xs22==0)
return (0.);
362 theta = QuadInterpolator( valueE11, valueE12,
408 G4double a = (std::log10(xs2)-std::log10(xs1)) / (std::log10(e2)-std::log10(e1));
409 G4double b = std::log10(xs2) - a*std::log10(e2);
451 integrdiff = uniformRand;
457 cosTheta= std::cos(theta*
pi/180);