47 std::vector<G4int> G4QNGamma::ElementZ;
48 std::vector<G4double> G4QNGamma::ElProbInMat;
49 std::vector<std::vector<G4int>*> G4QNGamma::ElIsoN;
50 std::vector<std::vector<G4double>*>G4QNGamma::IsoProbInEl;
71 G4int IPIE=IsoProbInEl.size();
72 if(IPIE)
for(
G4int ip=0; ip<IPIE; ++ip)
74 std::vector<G4double>* SPI=IsoProbInEl[ip];
77 std::vector<G4int>* IsN=ElIsoN[ip];
90 return EnMomConservation;
105 G4cout<<
"G4QNGamma::GetMeanFreePath: Called Fc="<<*Fc<<
G4endl;
109 G4cout<<
"G4QNGamma::GetMeanFreePath: Before GetDynPart"<<
G4endl;
113 G4cout<<
"G4QNGamma::GetMeanFreePath: Before GetDef"<<
G4endl;
119 G4cout<<
"-W-G4QNGamma::GetMeanFreePath called for not implemented particle"<<
G4endl;
123 G4cout<<
"G4QNGamma::GetMeanFreePath: BeforeGetMaterial P="<<Momentum<<
G4endl;
126 if(Momentum > 500.)
return DBL_MAX;
133 G4cout<<
"G4QNGamma::GetMeanFreePath:"<<nE<<
" Elem's in theMaterial"<<
G4endl;
145 G4cout<<
"G4QNGamma::GetMeanFreePath: CSmanager is defined for neutrons"<<
G4endl;
151 G4cout<<
"-Warning-G4QNGamma::GetMeanFreePath:Particle "
157 G4int IPIE=IsoProbInEl.size();
158 if(IPIE)
for(
G4int ip=0; ip<IPIE; ++ip)
160 std::vector<G4double>* SPI=IsoProbInEl[ip];
163 std::vector<G4int>* IsN=ElIsoN[ip];
171 for(
G4int i=0; i<nE; ++i)
173 G4Element* pElement=(*theElementVector)[i];
175 ElementZ.push_back(Z);
179 if(isoVector) isoSize=isoVector->size();
181 G4cout<<
"G4QNGamma::GetMeanFreePath: isovectorLength="<<isoSize<<
G4endl;
188 std::vector<std::pair<G4int,G4double>*>* newAbund =
189 new std::vector<std::pair<G4int,G4double>*>;
191 for(
G4int j=0; j<isoSize; j++)
197 std::pair<G4int,G4double>*
pr=
new std::pair<G4int,G4double>(
N,abund);
199 G4cout<<
"G4QNGamma::GetMeanFreePath: p#="<<j<<
",N="<<N<<
",ab="<<abund<<
G4endl;
201 newAbund->push_back(pr);
204 G4cout<<
"G4QNGamma::GetMeanFreePath: pairVectLength="<<newAbund->size()<<
G4endl;
207 for(
G4int k=0; k<isoSize; k++)
delete (*newAbund)[k];
211 std::vector<std::pair<G4int,G4double>*>* cs= Isotopes->
GetCSVector(Z,indEl);
212 std::vector<G4double>* SPI =
new std::vector<G4double>;
213 IsoProbInEl.push_back(SPI);
214 std::vector<G4int>* IsN =
new std::vector<G4int>;
215 ElIsoN.push_back(IsN);
216 G4int nIs=cs->size();
219 G4cout<<
"G4QNGamma::GetMeanFreePath: Before Loop nIs="<<nIs<<
G4endl;
221 if(nIs)
for(
G4int j=0; j<nIs; j++)
223 std::pair<G4int,G4double>* curIs=(*cs)[j];
227 G4cout<<
"G4QNGam::GetMeanFrP: Before CS, P="<<Momentum<<
",Z="<<Z<<
",N="<<N<<
G4endl;
233 G4cout<<
"GQC::GMF:X="<<CSI<<
",M="<<Momentum<<
",Z="<<Z<<
",N="<<N<<
",P="<<pPDG<<
G4endl;
237 SPI->push_back(susi);
240 ElProbInMat.push_back(sigma);
245 if(sigma > 0.)
return 1./sigma;
269 G4cout<<
"G4QNGamma::PostStepDoIt: Before the GetMeanFreePath is called"<<
G4endl;
274 G4cout<<
"G4QNGamma::PostStepDoIt: After the GetMeanFreePath is called"<<
G4endl;
279 if(std::fabs(Momentum-momentum)>.001)
280 G4cerr<<
"*G4QNGamma::PostStepDoIt: P="<<Momentum<<
"#"<<momentum<<
G4endl;
283 if(std::fabs(mp-mNeut)>.001)
G4cerr<<
"*G4QNGamma::PostStDoIt: M="<<mp<<
"#"<<mNeut<<
G4endl;
284 G4cout<<
"->G4QNGam::PostStDoIt:*called*,4M="<<proj4M<<
",P="<<Momentum<<
",m="<<mp<<
G4endl;
289 G4cerr<<
"G4QNGamma::PostStepDoIt: Only neutrons with P="<<Momentum<<
" < 500"<<
G4endl;
297 G4cout<<
"G4QNGamma::PostStepDoIt: "<<nE<<
" elements in the material."<<
G4endl;
299 G4int EPIM=ElProbInMat.size();
301 G4cout<<
"G4QNGam::PostStDoIt: m="<<EPIM<<
",n="<<nE<<
",T="<<ElProbInMat[EPIM-1]<<
G4endl;
310 G4cout<<
"G4QNGamma::PostStepDoIt:E["<<i<<
"]="<<ElProbInMat[i]<<
",r="<<rnd<<
G4endl;
312 if (rnd<ElProbInMat[i])
break;
316 G4Element* pElement=(*theElementVector)[i];
319 G4cout<<
"G4QNGamma::PostStepDoIt: i="<<i<<
", Z(element)="<<Z<<
G4endl;
323 G4cerr<<
"---Warning---G4QNGamma::PostStepDoIt: Element with Z="<<Z<<
G4endl;
326 std::vector<G4double>* SPI = IsoProbInEl[i];
327 std::vector<G4int>* IsN = ElIsoN[i];
328 G4int nofIsot=SPI->size();
330 G4cout<<
"G4QNGam::PosStDoIt:n="<<nofIsot<<
",T="<<(*SPI)[nofIsot-1]<<
G4endl;
336 for(j=0; j<nofIsot; ++j)
339 G4cout<<
"G4QNGamma::PostStepDoIt: SP["<<j<<
"]="<<(*SPI)[j]<<
", r="<<rndI<<
G4endl;
341 if(rndI < (*SPI)[j])
break;
343 if(j>=nofIsot) j=nofIsot-1;
347 G4cout<<
"G4QNGamma::PostStepDoIt: Z="<<Z<<
", j="<<i<<
", N(isotope)="<<N<<
G4endl;
361 G4cerr<<
"-Warning-G4QNGamma::PostStepDoIt: Isotope with Z="<<Z<<
", 0>N="<<N<<
G4endl;
366 G4cout<<
"G4QNGamma::PostStepDoIt: N="<<N<<
" for element with Z="<<Z<<
G4endl;
371 G4cout<<
"G4QNGamma::PostStepDoIt: weight="<<weight<<
G4endl;
375 G4cout<<
"G4QNGamma::PostStepDoIt: localtime="<<localtime<<
G4endl;
380 G4cout<<
"G4QNGamma::PostStepDoIt: position="<<position<<
G4endl;
382 G4int targPDG = 90000000 + Z*1000 +
N;
386 G4cout<<
"G4QNGamma::PostStepDoIt: n + targPDG="<<targPDG<<
G4endl;
393 G4int resPDG = targPDG + 1;
398 G4cout<<
"G4QNGamma::PostStepDoIt: tM="<<tM <<
", rM="<<rM <<
", Q="<<tM+mNeut-rM<<
G4endl;
405 G4cerr<<
"-Warning-G4QNGamma::PostStDoIt: tM="<<std::sqrt(totM2)<<
" < rM="<<rM<<
G4endl;
415 EnMomConservation = tot4M - r4M - g4M;