53 G4int G4QLowEnergy::nPartCWorld=85;
54 std::vector<G4int> G4QLowEnergy::ElementZ;
55 std::vector<G4double> G4QLowEnergy::ElProbInMat;
56 std::vector<std::vector<G4int>*> G4QLowEnergy::ElIsoN;
57 std::vector<std::vector<G4double>*>G4QLowEnergy::IsoProbInEl;
66 G4cout<<
"G4QLowEnergy::Constructor is called processName="<<processName<<
G4endl;
89 G4cout<<
"-Warning-G4QLowEnergy::GetMeanFreePath for notImplemented Particle"<<
G4endl;
94 G4cout<<
"G4QLowEnergy::GetMeanFreePath:Prpj, kinE="<<KinEn<<
", Mom="<<Momentum<<
G4endl;
101 G4cout<<
"G4QLowEnergy::GetMeanFreePath:"<<nE<<
" Elems"<<
G4endl;
108 else if ( incidentParticleDefinition ==
G4Alpha::Alpha() ) pPDG = 1000020040;
109 else if ( incidentParticleDefinition ==
G4Triton::Triton() ) pPDG = 1000010030;
110 else if ( incidentParticleDefinition ==
G4He3::He3() ) pPDG = 1000020030;
115 G4int prPDG=1000000000+10000*A+10*
Z;
116 G4cout<<
"G4QIonIonElastic::GetMeanFreePath: PDG="<<prPDG<<
"="<<pPDG<<
G4endl;
119 else G4cout<<
"-Warning-G4QLowEnergy::GetMeanFreePath: only AA & pA implemented"<<
G4endl;
125 G4int IPIE=IsoProbInEl.size();
126 if(IPIE)
for(
G4int ip=0; ip<IPIE; ++ip)
128 std::vector<G4double>* SPI=IsoProbInEl[ip];
131 std::vector<G4int>* IsN=ElIsoN[ip];
139 for(
G4int i=0; i<nE; ++i)
141 G4Element* pElement=(*theElementVector)[i];
142 Z =
static_cast<G4int>(pElement->
GetZ());
143 ElementZ.push_back(Z);
147 if(isoVector) isoSize=isoVector->size();
149 G4cout<<
"G4QLowEnergy::GetMeanFreePath: isovector Length="<<isoSize<<
G4endl;
159 std::vector<std::pair<G4int,G4double>*>* newAbund =
160 new std::vector<std::pair<G4int,G4double>*>;
162 for(
G4int j=0; j<isoSize; j++)
168 std::pair<G4int,G4double>*
pr=
new std::pair<G4int,G4double>(
N,abund);
170 G4cout<<
"G4QLowEnergy::GetMeanFreePath:pair#"<<j<<
",N="<<N<<
",a="<<abund<<
G4endl;
172 newAbund->push_back(pr);
175 G4cout<<
"G4QLowEnergy::GetMeanFreePath: pairVectLength="<<newAbund->size()<<
G4endl;
178 for(
G4int k=0; k<isoSize; k++)
delete (*newAbund)[k];
182 std::vector<std::pair<G4int,G4double>*>* cs= Isotopes->
GetCSVector(Z,indEl);
183 std::vector<G4double>* SPI =
new std::vector<G4double>;
184 IsoProbInEl.push_back(SPI);
185 std::vector<G4int>* IsN =
new std::vector<G4int>;
186 ElIsoN.push_back(IsN);
187 G4int nIs=cs->size();
189 G4cout<<
"G4QLowEnergy::GetMFP:***=>,#isot="<<nIs<<
", Z="<<Z<<
", indEl="<<indEl<<
G4endl;
192 if(nIs)
for(
G4int j=0; j<nIs; j++)
194 std::pair<G4int,G4double>* curIs=(*cs)[j];
198 G4cout<<
"G4QLoE::GMFP:true,P="<<Momentum<<
",Z="<<Z<<
",N="<<N<<
",pPDG="<<pPDG<<
G4endl;
206 G4cout<<
"G4QLowEnergy::GetMeanFreePath: jI="<<j<<
", Zt="<<Z<<
", Nt="<<N<<
", Mom="
211 SPI->push_back(susi);
218 ElProbInMat.push_back(sigma);
222 G4cout<<
"G4QLowEnergy::GetMeanFreePath: MeanFreePath="<<1./sigma<<
G4endl;
224 if(sigma > 0.000000001)
return 1./sigma;
237 else if (particle == *(
G4He3::He3() ))
return true;
239 else if (Z > 0 && A > 0)
return true;
250 static const G4double mPro2= mProt*mProt;
252 static const G4double mNeu2= mNeut*mNeut;
272 static const G4int nCh=26;
276 static G4bool CWinit =
true;
286 G4cout<<
"G4QLowEnergy::PostStepDoIt: *** Called *** In4M="
293 G4cout<<
"G4QLowEnergy::PostStepDoIt: After GetMeanFreePath is called"<<
G4endl;
295 std::vector<G4Track*> result;
299 if(std::fabs(Momentum-momentum)>.000001)
300 G4cerr<<
"-Warning-G4QLowEnergy::PostStepDoIt:P_IU="<<Momentum<<
"#"<<momentum<<
G4endl;
302 G4cout<<
"G4QLowEnergy::PostStepDoIt: pP(IU)="<<Momentum<<
"="<<momentum<<
",proj4M,m="
307 G4cerr<<
"G4QLowEnergy::PostStepDoIt: Only NA is implemented."<<
G4endl;
314 G4cout<<
"G4QLowEnergy::PostStepDoIt: "<<nE<<
" elements in the material."<<
G4endl;
325 else if (particle ==
G4He3::He3() ) projPDG= 1000020030;
330 G4int prPDG=1000000000+10000*Z+10*A;
331 G4cout<<
"G4QLowEnergy::PostStepDoIt: PDG="<<prPDG<<
"="<<projPDG<<
G4endl;
334 else G4cout<<
"-Warning-G4QLowEnergy::PostStepDoIt:Unknown projectile Ion"<<
G4endl;
337 G4cout<<
"G4QLowEnergy::PostStepDoIt: projPDG="<<projPDG<<
", stPDG="<<prPDG<<
G4endl;
341 G4cerr<<
"-Warning-G4QLowEnergy::PostStepDoIt:UndefProjHadron(PDG=0) ->ret 0"<<
G4endl;
345 G4int EPIM=ElProbInMat.size();
347 G4cout<<
"G4QLowEn::PostStDoIt: m="<<EPIM<<
", n="<<nE<<
",T="<<ElProbInMat[EPIM-1]<<
G4endl;
356 G4cout<<
"G4QLowEn::PostStepDoIt: EPM["<<i<<
"]="<<ElProbInMat[i]<<
", r="<<rnd<<
G4endl;
358 if (rnd<ElProbInMat[i])
break;
362 G4Element* pElement=(*theElementVector)[i];
365 G4cout<<
"G4QLowEnergy::PostStepDoIt: i="<<i<<
", Z(element)="<<tZ<<
G4endl;
369 G4cerr<<
"-Warning-G4QLowEnergy::PostStepDoIt: Element with Z="<<tZ<<
G4endl;
372 std::vector<G4double>* SPI = IsoProbInEl[i];
373 std::vector<G4int>* IsN = ElIsoN[i];
374 G4int nofIsot=SPI->size();
376 G4cout<<
"G4QLowEnergy::PostStepDoIt: nI="<<nofIsot<<
", T="<<(*SPI)[nofIsot-1]<<
G4endl;
382 for(j=0; j<nofIsot; ++j)
385 G4cout<<
"G4QLowEnergy::PostStepDoIt: SP["<<j<<
"]="<<(*SPI)[j]<<
",r="<<rndI<<
G4endl;
387 if(rndI < (*SPI)[j])
break;
389 if(j>=nofIsot) j=nofIsot-1;
391 G4int tN =(*IsN)[j]; ;
393 G4cout<<
"G4QLowEnergy::PostStepDoIt: j="<<i<<
", N(isotope)="<<tN<<
", MeV="<<
MeV<<
G4endl;
397 G4cerr<<
"-Warning-G4QLowEnergy::PostStepDoIt: Isotope Z="<<tZ<<
" has 0>N="<<tN<<
G4endl;
402 G4cout<<
"G4QLowEnergy::PostStepDoIt: N="<<tN<<
" for element with Z="<<tZ<<
G4endl;
406 G4cerr<<
"***Warning***G4QLowEnergy::PostStepDoIt: Element with N="<<tN<<
G4endl;
411 G4cout<<
"G4QLowEnergy::PostStepDoIt: track is initialized"<<
G4endl;
417 G4cout<<
"G4QLowEnergy::PostStepDoIt: before Touchable extraction"<<
G4endl;
421 G4cout<<
"G4QLowEnergy::PostStepDoIt: Touchable is extracted"<<
G4endl;
423 G4int targPDG=90000000+tZ*1000+tN;
430 G4double cosp=-14*Momentum*(tM-pM)/tM/pM;
432 G4cout<<
"G4QLowEnergy::PoStDoIt: Proj("<<pZ<<
","<<pN<<
","<<pL<<
")p="<<pM<<
",Targ=("<<tZ
433 <<
","<<tN<<
"), cosp="<<cosp<<
G4endl;
440 G4cout<<
"G4QLowEnergy::PostStepDoIt: tM="<<tM<<
",p4M="<<proj4M<<
",t4M="<<tot4M<<
G4endl;
442 EnMomConservation=tot4M;
449 G4cout<<
"G4QLowEnergy::PoStDoIt: Proj("<<pZ<<
","<<pN<<
","<<pL<<
")p="<<pM<<
",Targ=("<<tZ
450 <<
","<<tN<<
"), dE="<<dER<<
", CB="<<CBE<<
G4endl;
455 G4cerr<<
"-Warning-G4QLowEnergy::PSDoIt: *Below Coulomb barrier* PDG="<<projPDG
456 <<
",Z="<<tZ<<
",tN="<<tN<<
",P="<<Momentum<<
G4endl;
467 G4cout<<
"G4QLE::PSDI:false,P="<<Momentum<<
",Z="<<pZ<<
",N="<<pN<<
",PDG="<<projPDG<<
G4endl;
469 G4double xSec=CalculateXS(Momentum, tZ, tN, projPDG);
471 G4cout<<
"G4QLowEn::PSDI:PDG="<<projPDG<<
",P="<<Momentum<<
",tZ="<<tZ<<
",N="<<tN<<
",XS="
475 if(xSec>0. || xSec<0. || xSec==0);
482 G4cerr<<
"-Warning-G4QLowEnergy::PSDoIt: *Zero cross-section* PDG="<<projPDG
483 <<
",Z="<<tZ<<
",tN="<<tN<<
",P="<<Momentum<<
G4endl;
497 G4cout<<
"G4QLowEn::PSDI: Projectile track is killed"<<
", tA="<<tB<<
", pA="<<pB<<
G4endl;
503 if(tB > 1) tR*=std::pow(tA,third);
505 if(pB > 1) pR*=std::pow(pA,third);
520 while((!tD && !pD && ++nAt<nAtM) || tcM<tnM)
526 G4cout<<
">G4QLEn::PSDI:#"<<nAt<<
",tC="<<totChg<<
",tA="<<totBaN<<
",t4M="<<tch4M<<
G4endl;
529 G4int resultSize=result.size();
532 for(i=0; i<resultSize; ++i)
delete result[i];
537 G4cout<<
"G4QLowEn::PSDI: D="<<D<<
", tR="<<tR<<
", pR="<<pR<<
G4endl;
539 if(D > std::fabs(tR-pR))
557 G4double tF=tA*(6*tR2*(pR2-DtR2)-4*D*(tR3-DpR3)+3*(tR4-DpR4))/HD/tR3;
559 tD=
static_cast<G4int>(tF);
560 pD=
static_cast<G4int>(pF);
564 if(std::fabs(tF-4.) < 1.) tD=4;
566 if(std::fabs(pF-4.) < 1.) pD=4;
574 G4cout<<
"G4QLE::PSDI:#"<<nAt<<
",pF="<<pF<<
",tF="<<tF<<
",pD="<<pD<<
",tD="<<tD<<
G4endl;
578 if((tD || pD) && tD<tB && pD<pB)
612 G4double rNE=std::sqrt(fm*fm+rNM*rNM);
615 rNuc4M.
boost(boostV);
619 if(rNE >= prM) Mom = std::sqrt(pNE*pNE-prM2);
623 if(pPDG==2212) xSec=PCSmanager->
GetCrossSection(
false, Mom, tZ, tN, pPDG);
625 if( xSec <= 0. )
break;
627 if(pPDG==2212) mint=PCSmanager->
GetExchangeT(tZ,tN,pPDG);
630 if(pPDG==2212) maxt=PCSmanager->
GetHMaxT();
633 if(cost>1. || cost<-1.)
break;
637 if(!
G4QHadron(com4M).RelDecayIn2(scat4M, reco4M, dir4M, cost, cost))
639 G4cout<<
"G4QLE::Pt="<<com4M.
m()<<
",p="<<prM<<
",r="<<rNM<<
",c="<<cost<<
G4endl;
651 if(!rZ) theDefinition = aNeutron;
652 else theDefinition = aProton;
656 projSpect =
new G4Track(resN, localtime, position );
660 G4cout<<
"G4QLowEn::PSDI:-->ProjQFSA="<<rA<<
",rZ="<<rZ<<
",4M="<<rNuc4M<<
G4endl;
667 aNucTrack =
new G4Track(scatN, localtime, position );
671 G4cout<<
"G4QLowEn::PSDI:-->TgQFNPDG="<<pPDG<<
", 4M="<<scat4M<<
G4endl;
677 if(!tZ) theDefinition = aNeutron;
678 else theDefinition = aProton;
680 else if(tA==8 && tC==4)
682 theDefinition = anAlpha;
685 if(!
G4QHadron(reco4M).DecayIn2(f4M, s4M))
687 G4cout<<
"*G4QLE::TS->A+A,t="<<reco4M.
m()<<
" >? 2*MAlpha="<<2*mAlph<<
G4endl;
690 aFraTrack =
new G4Track(pAl, localtime, position );
699 else if(tA==5 && (tC==2 || tC==3))
701 theDefinition = aProton;
705 theDefinition = aNeutron;
710 if(!
G4QHadron(reco4M).DecayIn2(f4M, s4M))
712 G4cout<<
"*G4QLE::TS->N+A,t="<<reco4M.
m()<<
" >? MA+MN="<<mAlph+mNuc<<
G4endl;
715 aFraTrack =
new G4Track(pAl, localtime, position );
722 theDefinition = anAlpha;
739 G4cout<<
"G4QLowEn::PSDI:-->TgR4M="<<reco4M<<
", checkNSec="<<nSec<<
G4endl;
760 Mom=prM*proj4M.
rho()/proj4M.
m();
768 G4double rNE=std::sqrt(fm*fm+rNM*rNM);
773 qfN4M.
boost(-boostV);
775 if(rNE >= prM) Mom = std::sqrt(tNE*tNE-prM2);
779 if(pPDG==2212) xSec=PCSmanager->
GetCrossSection(
false, Mom, tZ, tN, pPDG);
781 if( xSec <= 0. )
break;
783 if(pPDG==2212) mint=PCSmanager->
GetExchangeT(tZ,tN,pPDG);
786 if(pPDG==2212) maxt=PCSmanager->
GetHMaxT();
789 if(cost>1. || cost<-1.)
break;
793 if(!
G4QHadron(com4M).RelDecayIn2(scat4M, reco4M, dir4M, cost, cost))
795 G4cout<<
"G4QLE::Tt="<<com4M.
m()<<
",p="<<prM<<
",r="<<rNM<<
",c="<<cost<<
G4endl;
807 if(!rZ) theDefinition = aNeutron;
808 else theDefinition = aProton;
812 targSpect =
new G4Track(resN, localtime, position );
816 G4cout<<
"G4QLowEn::PSDI:-->TargQFSA="<<rA<<
",rZ="<<rZ<<
",4M="<<rNuc4M<<
G4endl;
823 aNucTrack =
new G4Track(scatN, localtime, position );
827 G4cout<<
"G4QLowEn::PSDI:-->PrQFNPDG="<<pPDG<<
", 4M="<<scat4M<<
G4endl;
833 if(!pZ) theDefinition = aNeutron;
834 else theDefinition = aProton;
836 else if(pA==8 && pC==4)
838 theDefinition = anAlpha;
841 if(!
G4QHadron(reco4M).DecayIn2(f4M, s4M))
843 G4cout<<
"*G4QLE::PS->A+A,t="<<reco4M.
m()<<
" >? 2*MAlpha="<<2*mAlph<<
G4endl;
846 aFraTrack =
new G4Track(pAl, localtime, position );
855 else if(pA==5 && (pC==2 || pC==3))
857 theDefinition = aProton;
861 theDefinition = aNeutron;
866 if(!
G4QHadron(reco4M).DecayIn2(f4M, s4M))
868 G4cout<<
"*G4QLE::PS->N+A,t="<<reco4M.
m()<<
" >? MA+MN="<<mAlph+mNuc<<
G4endl;
871 aFraTrack =
new G4Track(pAl, localtime, position );
878 theDefinition = anAlpha;
895 G4cout<<
"G4QLowEn::PSDI:-->TgR4M="<<reco4M<<
", checkNSec="<<nSec<<
G4endl;
900 G4cout<<
"G4QLowEnergy::PostStepDoIt:***PostStepDoIt is done:Quasi-El***"<<
G4endl;
908 else if(!pN) pC = pD;
912 G4cout<<
"G4QLowEn::PSDI: pD="<<pD<<
", pZ="<<pZ<<
", pA="<<pA<<
G4endl;
915 pC=
static_cast<G4int>(C);
923 G4cout<<
"G4QLowEn::PSDI: tD="<<tD<<
", tZ="<<tZ<<
", tA="<<tA<<
G4endl;
926 tC=
static_cast<G4int>(C);
934 if(pD+pD>pB) nc=pB-pD;
936 for(i=1; i < nc; ++i)
943 if(tD+tD>tB) nc=tB-tD;
945 for(i=1; i < nc; ++i)
949 G4cout<<
"G4QLE::PSDI:pC="<<pC<<
", tC="<<tC<<
", pFM="<<pFM<<
", tFM="<<tFM<<
G4endl;
953 G4int pF_value=pD-pC;
954 G4int rpN=pN-pF_value;
960 G4cout<<
"G4QLE::PSDI: boostV="<<boostV<<
",rp4M="<<rp4M<<
",pr4M="<<proj4M<<
G4endl;
964 G4cout<<
"G4QLE::PSDI: After boost, rp4M="<<rp4M<<
G4endl;
978 else if(rpA==2 && rpZ==0)
980 theDefinition = aNeutron;
984 G4cout<<
"G4QLE::CPS->n+n,nn="<<rp4M.m()<<
" >? 2*MNeutron="<<2*mNeutron<<
G4endl;
988 G4cout<<
"*W*G4QLE::CPS->n+n,t="<<rp4M.m()<<
" >? 2*Neutron="<<2*mAlph<<
G4endl;
991 aFraPTrack =
new G4Track(pNeu, localtime, position );
998 G4cout<<
">>G4QLEn::PSDI:n,tZ="<<totChg<<
",tB="<<totBaN<<
",t4M="<<tch4M<<
G4endl;
1001 G4cout<<
"G4QLowEn::PSDI:-->ProjSpectA4M="<<f4M<<
G4endl;
1005 else if(rpA>2 && rpZ==0)
1007 theDefinition = aNeutron;
1010 G4cout<<
"G4QLE::CPS->Nn,M="<<rp4M.m()<<
" >? N*MNeutron="<<rpA*mNeutron<<
G4endl;
1012 for(
G4int it=1; it<rpA; ++it)
1018 result.push_back(aNTrack);
1025 G4cout<<
">G4QLEn::PSDI:Nn,tZ="<<totChg<<
",tB="<<totBaN<<
",t4M="<<tch4M<<
G4endl;
1028 G4cout<<
"G4QLowEn::PSDI:-->ProjSpectA4M="<<f4M<<
G4endl;
1032 else if(rpA==8 && rpZ==4)
1034 theDefinition = anAlpha;
1038 G4cout<<
"G4QLE::CPS->A+A,mBe8="<<rp4M.m()<<
" >? 2*MAlpha="<<2*mAlph<<
G4endl;
1042 G4cout<<
"*W*G4QLE::CPS->A+A,t="<<rp4M.m()<<
" >? 2*MAlpha="<<2*mAlph<<
G4endl;
1045 aFraPTrack =
new G4Track(pAl, localtime, position );
1053 G4cout<<
">>G4QLEn::PSDI:1,tZ="<<totChg<<
",tB="<<totBaN<<
",t4M="<<tch4M<<
G4endl;
1056 G4cout<<
"G4QLowEn::PSDI:-->ProjSpectA4M="<<f4M<<
G4endl;
1060 else if(rpA==5 && (rpZ==2 || rpZ==3))
1062 theDefinition = aProton;
1066 theDefinition = aNeutron;
1072 G4cout<<
"G4QLowE::CPS->N+A, tM5="<<rp4M.m()<<
" >? MA+MN="<<mAlph+mNuc<<
G4endl;
1076 G4cout<<
"*W*G4QLE::CPS->N+A,t="<<rp4M.m()<<
" >? MA+MN="<<mAlph+mNuc<<
G4endl;
1079 aFraPTrack =
new G4Track(pAl, localtime, position );
1084 if(theDefinition == aProton) totChg-=1;
1087 G4cout<<
">>G4QLEn::PSDI:2,tZ="<<totChg<<
",tB="<<totBaN<<
",t4M="<<tch4M<<
G4endl;
1090 G4cout<<
"G4QLowEn::PSDI:-->ProjSpectN4M="<<f4M<<
G4endl;
1092 theDefinition = anAlpha;
1101 ed <<
"Particle definition is a null pointer: pDef=0, Z= " << rpZ
1102 <<
", A=" << rpA <<
G4endl;
1103 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0000",
1107 if(theDefinition == anAlpha)
1118 G4cout<<
">>G4QLEn::PSDI:3, tZ="<<totChg<<
",tB="<<totBaN<<
", t4M="<<tch4M<<
G4endl;
1126 G4cout<<
"G4QLowEn::PSDI:-->ProjSpectR4M="<<rp4M<<
",Z="<<rpZ<<
",A="<<rpA<<
G4endl;
1131 G4int tF_value=tD-tC;
1132 G4int rtN=tN-tF_value;
1147 else if(rtA==2 && rtZ==0)
1149 theDefinition = aNeutron;
1153 G4cout<<
"G4QLE::CPS->n+n,nn="<<rptM.m()<<
" >? 2*MNeutron="<<2*mNeutron<<
G4endl;
1156 G4cout<<
"*W*G4QLE::CPS->n+n,t="<<rt4M.m()<<
" >? 2*Neutron="<<2*mAlph<<
G4endl;
1158 aFraPTrack =
new G4Track(pNeu, localtime, position );
1165 G4cout<<
">>G4QLEn::PSDI:n,tZ="<<totChg<<
",tB="<<totBaN<<
",t4M="<<tch4M<<
G4endl;
1168 G4cout<<
"G4QLowEn::PSDI:-->ProjSpectA4M="<<f4M<<
G4endl;
1172 else if(rtA>2 && rtZ==0)
1174 theDefinition = aNeutron;
1177 G4cout<<
"G4QLE::CPS->Nn,M="<<rt4M.m()<<
" >? N*MNeutron="<<rtA*mNeutron<<
G4endl;
1179 for(
G4int it=1; it<rtA; ++it)
1185 result.push_back(aNTrack);
1192 G4cout<<
">G4QLEn::PSDI:Nn,tZ="<<totChg<<
",tB="<<totBaN<<
",t4M="<<tch4M<<
G4endl;
1195 G4cout<<
"G4QLowEn::PSDI:-->ProjSpectA4M="<<f4M<<
G4endl;
1199 else if(rtA==8 && rtZ==4)
1201 theDefinition = anAlpha;
1205 G4cout<<
"G4QLE::CPS->A+A,mBe8="<<rt4M.m()<<
" >? 2*MAlpha="<<2*mAlph<<
G4endl;
1209 G4cout<<
"*W*G4QLE::CTS->A+A,t="<<rt4M.m()<<
" >? 2*MAlpha="<<2*mAlph<<
G4endl;
1212 aFraTTrack =
new G4Track(pAl, localtime, position );
1220 G4cout<<
">>G4QLEn::PSDI:4,tZ="<<totChg<<
",tB="<<totBaN<<
",t4M="<<tch4M<<
G4endl;
1223 G4cout<<
"G4QLowEn::PSDI:-->TargSpectA4M="<<f4M<<
G4endl;
1227 else if(rtA==5 && (rtZ==2 || rtZ==3))
1229 theDefinition = aProton;
1233 theDefinition = aNeutron;
1239 G4cout<<
"G4QLowE::CPS->N+A, tM5="<<rt4M.m()<<
" >? MA+MN="<<mAlph+mNuc<<
G4endl;
1243 G4cout<<
"*W*G4QLE::CTS->N+A,t="<<rt4M.m()<<
" >? MA+MN="<<mAlph+mNuc<<
G4endl;
1246 aFraTTrack =
new G4Track(pAl, localtime, position );
1251 if(theDefinition == aProton) totChg-=1;
1254 G4cout<<
">>G4QLEn::PSDI:5,tZ="<<totChg<<
",tB="<<totBaN<<
",t4M="<<tch4M<<
G4endl;
1257 G4cout<<
"G4QLowEn::PSDI:-->TargSpectN4M="<<f4M<<
G4endl;
1259 theDefinition = anAlpha;
1268 ed <<
"Particle definition is a null pointer: tDef=0, Z= " << rtZ
1269 <<
", A=" << rtA <<
G4endl;
1270 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0000",
1274 if(theDefinition == anAlpha)
1285 G4cout<<
">>G4QLEn::PSDI:6, tZ="<<totChg<<
",tB="<<totBaN<<
", t4M="<<tch4M<<
G4endl;
1293 G4cout<<
"G4QLowEn::PSDI:-->TargSpectR4M="<<rt4M<<
",Z="<<rtZ<<
",A="<<rtA<<
G4endl;
1295 if(aFraPTrack) result.push_back(aFraPTrack);
1296 if(aNewPTrack) result.push_back(aNewPTrack);
1297 if(aFraTTrack) result.push_back(aFraTTrack);
1298 if(aNewTTrack) result.push_back(aNewTTrack);
1300 G4int sN=tF_value+pF_value;
1304 G4cout<<
"G4QLEn::PSDI:At#"<<nAt<<
",totM="<<tcM<<
",gsM="<<tnM<<
",Z="<<sZ<<
",N="
1322 else if(tD==tB || pD==pB)
1340 G4cout<<
">>>G4QLEn::PSDI: dZ="<<totChg-totZ<<
", dB="<<totBaN-totN-totZ<<
", d4M="
1341 <<tch4M-tot4M<<
",N="<<totN<<
",Z="<<totZ<<
G4endl;
1344 G4double mass[nCh]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
1346 mass[0] = tM = targQPDG.
GetNuclMass(totZ, totN, 0);
1348 G4cout<<
"G4QLEn::PSDI:TotM="<<totM<<
",NucM="<<tM<<
",totZ="<<totZ<<
",totN="<<totN<<
G4endl;
1350 if (totN>0 && totZ>0)
1355 if ( totZ > 1 && totN > 1 ) mass[3] = targQPDG.
GetNuclMass(totZ-1,totN-1,0);
1356 if ( totZ > 1 && totN > 2 ) mass[4] = targQPDG.
GetNuclMass(totZ-1,totN-2,0);
1357 if ( totZ > 2 && totN > 1 ) mass[5] = targQPDG.
GetNuclMass(totZ-2,totN-1,0);
1358 if ( totZ > 2 && totN > 2 ) mass[6] = targQPDG.
GetNuclMass(totZ-2,totN-2,0);
1359 if ( totZ > 0 && totN > 2 ) mass[7] = targQPDG.
GetNuclMass(totZ ,totN-2,0);
1361 if ( totZ > 2 ) mass[9] = targQPDG.
GetNuclMass(totZ-2,totN ,0);
1366 if ( totZ > 1 && totN > 3 ) mass[14] = targQPDG.
GetNuclMass(totZ-1,totN-3,0);
1367 if ( totZ > 3 && totN > 1 ) mass[15] = targQPDG.
GetNuclMass(totZ-3,totN-1,0);
1369 if ( totZ > 3 && totN > 2 ) mass[17] = targQPDG.
GetNuclMass(totZ-3,totN-2,0);
1370 if ( totZ > 2 && totN > 3 ) mass[18] = targQPDG.
GetNuclMass(totZ-2,totN-3,0);
1374 if(totN>0||totZ>0) mass[19] = targQPDG.
GetNuclMass(totZ ,totN ,pL1);
1375 if( (totN > 0 && totZ > 0) || totZ > 1 )
1377 if( (totN > 0 && totZ > 0) || totN > 0 )
1379 if( (totN > 1 && totZ > 0) || (totN > 0 && totZ > 1) )
1381 if( (totN > 2 && totZ > 0) || (totN > 1 && totZ > 1) )
1383 if( (totN > 0 && totZ > 2) || (totN > 1 && totZ > 1) )
1385 if( (totN > 1 && totZ > 2) || (totN > 2 && totZ > 1) )
1389 G4cout<<
"G4QLowEn::PSDI: Residual masses are calculated"<<
G4endl;
1402 G4double qval[nCh]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,
1404 qval[ 0] = (totM - mass[ 0])/137./137.;
1405 qval[ 1] = (totM - mass[ 1] - mNeut)*prN/137.;
1406 qval[ 2] = (totM - mass[ 2] - mProt)*prZ/137.;
1407 qval[ 3] = (totM - mass[ 3] - mDeut)*prD/3./137.;
1408 qval[ 4] = (totM - mass[ 4] - mTrit)*prT/6./137.;
1409 qval[ 5] = (totM - mass[ 5] - mHel3)*prH/fhe3/137.;
1410 qval[ 6] = (totM - mass[ 6] - mAlph)*prA/9./137.;
1411 qval[ 7] = (totM - mass[ 7] - mNeut - mNeut)*prN*prN;
1412 qval[ 8] = (totM - mass[ 8] - mNeut - mProt)*prD;
1413 qval[ 9] = (totM - mass[ 9] - mProt - mProt)*prZ*prZ;
1414 qval[10] = (totM - mass[10] - mProt - mDeut)*prH/3.;
1415 qval[11] = (totM - mass[11] - mNeut - mDeut)*prT/3.;
1416 qval[12] = (totM - mass[12] - mDeut - mDeut)*prA/3./3.;
1417 qval[13] = (totM - mass[13] - mProt - mTrit)*prA/6.;
1418 qval[14] = (totM - mass[14] - mNeut - mTrit)*prT*prN/6.;
1419 qval[15] = (totM - mass[15] - mProt - mHel3)*prH*prZ/fhe3;
1420 qval[16] = (totM - mass[16] - mNeut - mHel3)*prA/fhe3;
1421 qval[17] = (totM - mass[17] - mProt - mAlph)*prZ*prA/9.;
1422 qval[18] = (totM - mass[18] - mNeut - mAlph)*prN*prA/9.;
1425 qval[19] = (totM - mass[19] - mLamb)*prL;
1426 qval[20] = (totM - mass[20] - mProt - mLamb)*prL*prZ;
1427 qval[21] = (totM - mass[21] - mNeut - mLamb)*prL*prN;
1428 qval[22] = (totM - mass[22] - mDeut - mLamb)*prL*prD/2.;
1429 qval[23] = (totM - mass[23] - mTrit - mLamb)*prL*prT/3.;
1430 qval[24] = (totM - mass[24] - mHel3 - mLamb)*prL*prH/fhe3;
1431 qval[25] = (totM - mass[25] - mAlph - mLamb)*prL*prA/4;
1434 G4cout<<
"G4QLowEn::PSDI: Q-values are calculated, tgA="<<tA<<
", prA="<<pA<<
G4endl;
1438 for(i=0; i<nCh; ++i )
1441 G4cout<<
"G4QLowEn::PSDI: i="<<i<<
", q="<<qval[i]<<
",m="<<mass[i]<<
G4endl;
1443 if( mass[i] < 500.*
MeV ) qval[i] = 0.0;
1444 if( qval[i] < 0.0 ) qval[i] = 0.0;
1451 for( index=0; index<nCh; ++index ) if( qval[index] > 0.0 )
1454 if( ran <= qv1 )
break;
1457 G4cout<<
"G4QLowEn::PSDI: index="<<index<<
" < "<<nCh<<
G4endl;
1461 G4cout<<
"***G4QLowEnergy::PoStDI:Decay is impossible,totM="<<totM<<
",GSM="<<tM<<
G4endl;
1462 G4cout<<
"G4QLowEn::PoStDI:Reaction "<<projPDG<<
"+"<<targPDG<<
", P="<<Momentum<<
G4endl;
1463 G4int nRes=result.size();
1464 if(nRes)
G4cout<<
"G4QLowEnergy::PoStDI: result exists with N="<<nRes<<
" tracks"<<
G4endl;
1467 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0000",
1477 for(
G4int it=0; it<nRes; ++it)
1484 G4cout<<
" G4QLowEn::PoStDI: H["<<it<<
"] = [ "<<iPDG<<
", "<<ih4M<<
" ]"<<
G4endl;
1488 G4int ntN=totN + iB-iC;
1489 G4int ntZ=totZ + iC;
1495 if(found && nEx < minEx)
1514 delete result[cInd];
1515 G4int nR1 = nRes -1;
1516 if(cInd < nR1) result[cInd] = result[nR1];
1523 G4cout<<
"***G4QLowEnergy::PoStDI: One hadron coddection did not succeed***"<<
G4endl;
1524 if(nRes>1)
G4cout<<
"***G4QLowEnergy::PoStDI:nRes's big enough to use 2PtCor"<<
G4endl;
1526 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0000",
1535 G4cout<<
"G4QLowEn::PSDI: Dynamic particles are created pL="<<pL<<
G4endl;
1549 if(!evaporate || rA<2)
1551 if(!rZ) theDefinition=aNeutron;
1558 ed <<
"Particle definition is a null pointer: notDef(0), Z= " << rZ
1559 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1560 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0000",
1577 if(!evaporate || rA<2)
1579 if(!rZ) theDefinition=aNeutron;
1586 ed <<
"Particle definition is a null pointer: notDef(1), Z= " << rZ
1587 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1588 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0001",
1606 if(!evaporate || rA<2)
1608 if(!rZ) theDefinition=aNeutron;
1615 ed <<
"Particle definition is a null pointer: notDef(2), Z= " << rZ
1616 <<
", A=" << rA <<
", L="<< rL <<
G4endl;
1617 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0002",
1635 if(!evaporate || rA<2)
1637 if(!rZ) theDefinition=aNeutron;
1644 ed <<
"Particle definition is a null pointer: notDef(3), Z= " << rZ
1645 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1646 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0003",
1664 if(!evaporate || rA<2)
1666 if(!rZ) theDefinition=aNeutron;
1673 ed <<
"Particle definition is a null pointer: notDef(4), Z= " << rZ
1674 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1675 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0004",
1693 if(!evaporate || rA<2)
1695 if(!rZ) theDefinition=aNeutron;
1702 ed <<
"Particle definition is a null pointer: notDef(5), Z= " << rZ
1703 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1704 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0005",
1722 if(!evaporate || rA<2)
1724 if(!rZ) theDefinition=aNeutron;
1731 ed <<
"Particle definition is a null pointer: notDef(6), Z= " << rZ
1732 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1733 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0006",
1750 if(rA==1 && !rZ) theDefinition=aNeutron;
1757 ed <<
"Particle definition is a null pointer: notDef(7), Z= " << rZ
1758 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1759 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0007",
1771 if(rA==1 && !rZ) theDefinition=aNeutron;
1772 else if(rA==2 && !rZ)
1788 ed <<
"Particle definition is a null pointer: notDef(8), Z= " << rZ
1789 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1790 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0008",
1802 if(rA==1 && !rZ) theDefinition=aNeutron;
1809 ed <<
"Particle definition is a null pointer: notDef(9), Z= " << rZ
1810 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1811 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0009",
1823 if(rA==1 && !rZ) theDefinition=aNeutron;
1830 ed <<
"Particle definition is a null pointer: notDef(10), Z= " << rZ
1831 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1832 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0010",
1844 if(rA==1 && !rZ) theDefinition=aNeutron;
1851 ed <<
"Particle definition is a null pointer: notDef(0), Z= " << rZ
1852 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1853 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0011",
1865 if(rA==1 && !rZ) theDefinition=aNeutron;
1872 ed <<
"Particle definition is a null pointer: notDef(12), Z= " << rZ
1873 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1874 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0012",
1886 if(rA==1 && !rZ) theDefinition=aNeutron;
1893 ed <<
"Particle definition is a null pointer: notDef(13), Z= " << rZ
1894 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1895 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0013",
1907 if(rA==1 && !rZ) theDefinition=aNeutron;
1914 ed <<
"Particle definition is a null pointer: notDef(14), Z= " << rZ
1915 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1916 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0014",
1928 if(rA==1 && !rZ) theDefinition=aNeutron;
1935 ed <<
"Particle definition is a null pointer: notDef(15), Z= " << rZ
1936 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1937 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0015",
1949 if(rA==1 && !rZ) theDefinition=aNeutron;
1956 ed <<
"Particle definition is a null pointer: notDef(16), Z= " << rZ
1957 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1958 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0016",
1970 if(rA==1 && !rZ) theDefinition=aNeutron;
1977 ed <<
"Particle definition is a null pointer: notDef(17), Z= " << rZ
1978 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
1979 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0017",
1991 if(rA==1 && !rZ) theDefinition=aNeutron;
1998 ed <<
"Particle definition is a null pointer: notDef(18), Z= " << rZ
1999 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
2000 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0018",
2012 if(rA==1 && !rZ) theDefinition=aNeutron;
2019 ed <<
"Particle definition is a null pointer: notDef(19), Z= " << rZ
2020 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
2021 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0019",
2033 if(rA==1 && !rZ) theDefinition=aNeutron;
2040 ed <<
"Particle definition is a null pointer: notDef(20), Z= " << rZ
2041 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
2042 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0020",
2054 if(rA==1 && !rZ) theDefinition=aNeutron;
2061 ed <<
"Particle definition is a null pointer: notDef(21), Z= " << rZ
2062 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
2063 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0021",
2076 if(rA==1 && !rZ) theDefinition=aNeutron;
2083 ed <<
"Particle definition is a null pointer: notDef(22), Z= " << rZ
2084 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
2085 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0022",
2098 if(rA==1 && !rZ) theDefinition=aNeutron;
2105 ed <<
"Particle definition is a null pointer: notDef(23), Z= " << rZ
2106 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
2107 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0023",
2120 if(rA==1 && !rZ) theDefinition=aNeutron;
2127 ed <<
"Particle definition is a null pointer: notDef(24), Z= " << rZ
2128 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
2129 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0024",
2142 if(rA==1 && !rZ) theDefinition=aNeutron;
2149 ed <<
"Particle definition is a null pointer: notDef(25), Z= " << rZ
2150 <<
", A=" << rA <<
", L=" << rL <<
G4endl;
2151 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0025",
2162 G4cout<<
"G4QLowEn::PSDI:F="<<mF<<
",S="<<mS<<
",com="<<complete<<
",ev="<<evaporate<<
G4endl;
2167 dir4Mom.
setE(tot4M.
e()/2.);
2175 ed <<
"Can't decay the Compound: i=" << index <<
",tM=" << totM <<
"->M1="
2176 << res4Mom.
m() <<
"+M2=" << fst4Mom.
m() <<
"+M3=" << snd4Mom.
m() <<
"=="
2177 << res4Mom.
m()+fst4Mom.
m()+snd4Mom.
m() <<
G4endl;
2178 G4Exception(
"G4QLowEnergy::PostStepDoIt()",
"HAD_CHPS_0000",
2182 G4cout<<
"G4QLowEn::PSDI:r4M="<<res4Mom<<
",f4M="<<fst4Mom<<
",s4M="<<snd4Mom<<
G4endl;
2188 aNewTrack =
new G4Track(FstSec, localtime, position );
2191 result.push_back( aNewTrack );
2192 EnMomConservation-=fst4Mom;
2194 G4cout<<
"G4QLowEn::PSDI: ***Filled*** 1stH4M="<<fst4Mom
2200 aNewTrack =
new G4Track(ResSec, localtime, position );
2203 result.push_back( aNewTrack );
2204 EnMomConservation-=res4Mom;
2206 G4cout<<
"G4QLowEn::PSDI: ***Filled*** rA4M="<<res4Mom<<
",rZ="<<rZ<<
",rA="<<rA<<
",rL="
2210 aNewTrack =
new G4Track(SecSec, localtime, position );
2213 result.push_back( aNewTrack );
2214 EnMomConservation-=snd4Mom;
2216 G4cout<<
"G4QLowEn::PSDI: ***Filled*** 2ndH4M="<<snd4Mom
2220 else res4Mom+=snd4Mom;
2228 G4int nOut=evaHV->size();
2229 for(i=0; i<nOut; i++)
2234 EnMomConservation-=h4Mom;
2236 G4cout<<
"G4QLowEn::PSDI: ***FillingCand#"<<i<<
"*** evaH="<<hPDG<<h4Mom<<
G4endl;
2238 if (hPDG==90000001 || hPDG==2112) theDefinition = aNeutron;
2239 else if(hPDG==90001000 || hPDG==2212) theDefinition = aProton;
2240 else if(hPDG==91000000 || hPDG==3122) theDefinition = aLambda;
2241 else if(hPDG== 22 ) theDefinition = aGamma;
2242 else if(hPDG== 111) theDefinition = aPiZero;
2243 else if(hPDG== 211) theDefinition = aPiPlus;
2244 else if(hPDG== -211) theDefinition = aPiMinus;
2258 result.push_back( evaQH );
2260 else G4cerr<<
"-Warning-G4QLowEnergy::PostStepDoIt: Bad secondary PDG="<<hPDG<<
G4endl;
2264 G4int nres=result.size();
2268 G4cout<<
"G4QLowEnergy::PostStepDoIt:*** PostStepDoIt is done ***"<<
G4endl;
2275 static G4bool first=
true;
2284 G4cout<<
"G4QLowE::CXS: *DONE* p="<<p<<
",Z="<<Z<<
",N="<<N<<
",PDG="<<PDG<<
G4endl;