55 if ((fp=fopen(fileName.c_str(),
"r"))==
nullptr){
67 (void) fscanf(fp,
"%d %d %s", &NumAng, &NumEn, DXSTypeName);
68 if( strcmp(DXSTypeName,
"KTC") == 0 ) DXSType = 2;
69 else if( strcmp(DXSTypeName,
"KT") == 0 ) DXSType = 1;
75 for (
G4int eBin=1; eBin<=NumEn; eBin++){
76 (void) fscanf(fp,
"%f ",&data);
85 for (
G4int aBin=0;aBin<NumAng;aBin++){
86 (void) fscanf(fp,
"%f ",&data);
88 for (
G4int eBin=1;eBin<=NumEn;eBin++){
89 (void) fscanf(fp,
"%f %f ",&data2, &data);
96 for(
G4int aBin=0; aBin<NumAng; aBin++){
97 for(
G4int eBin=0; eBin<=NumEn; eBin++){
98 (void) fscanf(fp,
"%f ",&data);
102 for(
G4int aBin=0; aBin<NumAng; aBin++){
103 for(
G4int eBin=1; eBin<=NumEn; eBin++){
106 G4double p = std::sqrt(std::pow( (E/27.2/137),2) +2*E/27.2);
107 KT[eBin][aBin] = p *std::sqrt(2.-2.*std::cos(
A*CLHEP::twopi/360.));
122 for(
G4int aBin=0;aBin<NumAng;aBin++) {
123 for(
G4int eBin=0;eBin<=NumEn;eBin++){
124 CDXS[eBin][aBin]=0.0;
128 for(
G4int aBin=0;aBin<NumAng;aBin++)
129 CDXS[0][aBin] = DXS[0][aBin];
131 for (
G4int eBin=1;eBin<=NumEn;eBin++){
133 for (
G4int aBin=0;aBin<NumAng;aBin++){
134 sum += std::pow(DXS[eBin][aBin], (1.0-El/E) );
135 CDXS[eBin][aBin]=sum;
173 for(
G4int aBin=0; aBin<NumAng-1; aBin++) {
175 G4double x2 = CDXS[0][aBin+1] + eps;
180 for(
G4double x=x1; x < (x2-dx/10); x += dx) {
181 for(
G4int eBin=0; eBin<=NumEn; eBin++) {
193 ICDXS[eBin][ia] = (y1*(x2-x) + y2*(x-x1))/(x2-x1);
196 ICDXS[eBin][ia] =
G4Exp( (std::log(y1)*std::log(x2/x)+std::log(y2)*std::log(x/x1))/std::log(x2/x1) );
199 IKT[eBin][ia] = (z1*(x2-x) + z2*(x-x1))/(x2-x1);
259 G4int ii, jj, kk=0, Ebin, iMin, iMax;
263 G4double Pi = std::sqrt( std::pow( (Ei/27.2/137),2) +2*Ei/27.2);
264 G4double Pd = std::sqrt( std::pow( (Ed/27.2/137),2) +2*Ed/27.2);
268 if(Pd <= 1e-9 )
return (0.0);
273 for(ii=2; ii<=NumEn; ii++)
274 if(Energy > Eb[ii]) Ebin=ii;
275 if(Energy > Eb[NumEn]) Ebin=NumEn;
276 else if(Energy > (Eb[Ebin]+Eb[Ebin+1])*0.5 ) Ebin++;
283 if( IKT[Ebin][kk] < Kmin ) ii=kk;
291 if( IKT[Ebin][kk] < Kmax ) ii=kk;
299 rnd = (1-rnd)*ICDXS[Ebin][iMin] + rnd*ICDXS[Ebin][iMax];
306 if( ICDXS[Ebin][kk] < rnd) ii=kk;
313 G4double co = (Pi*Pi + Pd*Pd - KR*KR) / (2*Pi*Pd);