99 #define _CheckChargeAndBaryonNumber_(val) CheckChargeAndBaryonNumber(val)
102 #define _CheckChargeAndBaryonNumber_(val)
106 #define _DebugEpConservation(val) DebugEpConservation(val)
109 #define _DebugEpConservation(val)
187 outFile <<
"G4BinaryCascade is an intra-nuclear cascade model in which\n"
188 <<
"an incident hadron collides with a nucleon, forming two\n"
189 <<
"final-state particles, one or both of which may be resonances.\n"
190 <<
"The resonances then decay hadronically and the decay products\n"
191 <<
"are then propagated through the nuclear potential along curved\n"
192 <<
"trajectories until they re-interact or leave the nucleus.\n"
193 <<
"This model is valid for incident pions up to 1.5 GeV and\n"
194 <<
"nucleons up to 10 GeV.\n"
195 <<
"The remaining excited nucleus is handed on to ";
203 outFile <<
"G4ExcitationHandler";
208 outFile <<
"void.\n";
214 outFile <<
"G4BinaryCascade propagtes secondaries produced by a high\n"
215 <<
"energy model through the wounded nucleus.\n"
216 <<
"Secondaries are followed after the formation time and if\n"
217 <<
"within the nucleus are propagated through the nuclear\n"
218 <<
"potential along curved trajectories until they interact\n"
219 <<
"with a nucleon, decay, or leave the nucleus.\n"
220 <<
"An interaction of a secondary with a nucleon produces two\n"
221 <<
"final-state particles, one or both of which may be resonances.\n"
222 <<
"Resonances decay hadronically and the decay products\n"
223 <<
"are in turn propagated through the nuclear potential along curved\n"
224 <<
"trajectories until they re-interact or leave the nucleus.\n"
225 <<
"This model is valid for pions up to 1.5 GeV and\n"
226 <<
"nucleons up to about 3.5 GeV.\n"
227 <<
"The remaining excited nucleus is handed on to ";
235 outFile <<
"G4ExcitationHandler";
240 outFile <<
"void.\n";
257 if(getenv(
"BCDEBUG") )
G4cerr <<
" ######### Binary Cascade Reaction starts ######### "<<
G4endl;
262 if(initial4Momentum.e()-initial4Momentum.m()<
theBCminP &&
276 if(!getenv(
"I_Am_G4BinaryCascade_Developer") )
283 G4cerr <<
"You are trying to use G4BinaryCascade with " <<definition->GetParticleName()<<
" as projectile."<<
G4endl;
284 G4cerr <<
"G4BinaryCascade should not be used for projectiles other than nucleons or pions."<<
G4endl;
285 G4cerr <<
"If you want to continue, please switch on the developer environment: "<<
G4endl;
286 G4cerr <<
"setenv I_Am_G4BinaryCascade_Developer 1 "<<G4endl<<
G4endl;
287 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade - used for unvalid particle type - Fatal");
297 G4int interactionCounter = 0;
320 kt =
new G4KineticTrack(definition, 0., initialPosition, initial4Momentum);
324 secondaries->push_back(kt);
331 }
while(! products );
333 if(++interactionCounter>99)
break;
334 }
while(products->size() == 0);
336 if(products->size()>0)
342 G4ReactionProductVector::iterator iter;
344 for(iter = products->begin(); iter != products->end(); ++iter)
348 (*iter)->GetTotalEnergy(),
349 (*iter)->GetMomentum());
357 if(getenv(
"BCDEBUG") )
G4cerr <<
" ######### Binary Cascade Reaction void, return intial state ######### "<<
G4endl;
369 if(getenv(
"BCDEBUG") )
G4cerr <<
" ######### Binary Cascade Reaction ends ######### "<<
G4endl;
379 #ifdef debug_BIC_Propagate
380 G4cout <<
"G4BinaryCascade Propagate starting -------------------------------------------------------" <<
G4endl;
394 std::vector<G4KineticTrack *>::iterator iter;
405 #ifdef debug_BIC_GetExcitationEnergy
418 #ifdef debug_G4BinaryCascade
419 G4cout <<
"G4BinaryCascade::Propagate: warning - high energy model failed energy conservation, returning unchanged high energy final state" <<
G4endl;
437 #ifdef debug_BIC_return
447 G4bool haveProducts =
false;
448 G4int collisionCount=0;
464 #ifdef debug_BIC_Propagate_Collisions
465 G4cout <<
" NextCollision * , Time, curtime = " << nextCollision <<
" "
507 #ifdef debug_BIC_return
508 G4cout <<
"return @ Z=0 after collision loop "<<
G4endl;
517 G4cout <<
"returned products: " << products->size() <<
G4endl;
538 #ifdef debug_BIC_return
545 #ifdef debug_BIC_Propagate
556 #ifdef debug_G4BinaryCascade
557 G4cerr <<
"G4BinaryCascade: Warning, have active particles at end" <<
G4endl;
570 #ifdef debug_G4BinaryCascade
571 G4cerr <<
" Warning: remove left over collision(s) " <<
G4endl;
576 #ifdef debug_BIC_Propagate_Excitation
593 #ifdef debug_BIC_Propagate_finals
595 G4cout <<
" Excitation Energy prefinal, #collisions:, out, captured "
596 << ExcitationEnergy <<
" "
597 << collisionCount <<
" "
602 if (ExcitationEnergy < 0 )
604 G4int maxtry=5, ntry=0;
608 }
while ( ++ntry < maxtry && ExcitationEnergy < 0 );
612 #ifdef debug_BIC_Propagate_finals
614 G4cout <<
" Excitation Energy final, #collisions:, out, captured "
615 << ExcitationEnergy <<
" "
616 << collisionCount <<
" "
622 if ( ExcitationEnergy < 0. )
624 #ifdef debug_G4BinaryCascade
625 G4cerr <<
"G4BinaryCascade-Warning: negative excitation energy ";
634 #ifdef debug_BIC_return
635 G4cout <<
" negative Excitation E return empty products " << products <<
G4endl;
658 #ifdef debug_BIC_return
672 #if defined(debug_G4BinaryCascade) || defined(debug_BIC_GetExcitationEnergy)
677 G4cerr <<
"G4BIC:GetExcitationEnergy(): Nucleon counting error current/final{A,Z} "
697 #ifdef debug_G4BinaryCascade
698 G4cout <<
"G4BinaryCascade::GetExcitationEnergy(): Warning - invalid nucleus (A,Z)=("
704 #ifdef debug_BIC_GetExcitationEnergy
725 #ifdef debug_BIC_GetExcitationEnergy
727 if ( excitationE < 0 )
729 G4cout <<
"negative ExE final Ion mass " <<nucleusMass<<
G4endl;
731 if(finalZ>.5)
G4cout <<
" Final nuclmom/mass " << Nucl_mom <<
" " << Nucl_mom.mag()
732 <<
" (A,Z)=("<< finalA <<
","<<finalZ <<
")"
733 <<
" mass " << nucleusMass <<
" "
734 <<
" excitE " << excitationE <<
G4endl;
743 G4cout <<
"GetExcitationEnergy: Initial nucleus A Z " << A <<
" " << Z <<
" " << initialExc <<
G4endl;
795 mom.setE( std::sqrt( mom.vect().mag2() +
sqr(definition->
GetPDGMass()) ) );
804 #ifdef debug_BIC_BuildTargetList
805 else {
G4cout <<
"nucleon is hit" << nucleon <<
G4endl;}
817 G4cerr <<
"G4BinaryCascade::BuildTargetList(): Fatal Error - invalid nucleus (A,Z)=("
823 #ifdef debug_BIC_BuildTargetList
824 G4cout <<
"G4BinaryCascade::BuildTargetList(): nucleus (A,Z)=("
837 std::vector<G4KineticTrack *>::iterator iter;
843 for(iter = secondaries->begin(); iter != secondaries->end(); ++iter)
845 if((*iter)->GetFormationTime() < StartingTime)
846 StartingTime = (*iter)->GetFormationTime();
851 for(iter = secondaries->begin(); iter != secondaries->end(); ++iter)
855 G4double FormTime = (*iter)->GetFormationTime() - StartingTime;
856 (*iter)->SetFormationTime(FormTime);
860 lateParticles4Momentum += (*iter)->GetTrackingMomentum();
861 lateA += (*iter)->GetDefinition()->GetBaryonNumber();
869 projectileA += (*iter)->GetDefinition()->GetBaryonNumber();
871 #ifdef debug_BIC_Propagate
872 G4cout <<
" Adding initial secondary " << *iter
873 <<
" time" << (*iter)->GetFormationTime()
874 <<
", state " << (*iter)->GetState() <<
G4endl;
888 #ifdef debug_BIC_GetExcitationEnergy
889 G4cout <<
"BIC: Proj.e, nucl initial, nucl final, lateParticles"
892 << lateParticles4Momentum <<
G4endl;
895 success = excitation > 0;
896 #ifdef debug_G4BinaryCascade
908 secondaries->clear();
951 std::vector<G4KineticTrack *>::iterator i;
958 precompoundProducts->push_back(aNew);
968 #ifdef debug_BIC_DeexcitationProducts
972 if ( precompoundProducts )
974 std::vector<G4ReactionProduct *>::iterator j;
975 for(j = precompoundProducts->begin(); j != precompoundProducts->end(); ++j)
978 Preco_momentum += pProduct;
981 G4cout <<
"finalNuclMom / sum preco products" << fragment_momentum <<
" / " << Preco_momentum
982 <<
" delta E "<< fragment_momentum.e() - Preco_momentum.e() <<
G4endl;
986 return precompoundProducts;
997 std::vector<G4KineticTrack *>::iterator aNuc;
999 std::vector<G4double> masses;
1006 G4double mass=(*aNuc)->GetDefinition()->GetPDGMass();
1007 masses.push_back(mass);
1017 G4double mass=(*aNuc)->GetDefinition()->GetPDGMass();
1018 masses.push_back(mass);
1029 if ( eCMS < sumMass )
1031 eCMS=sumMass + 2*
MeV*masses.size();
1032 finalP.setE(std::sqrt(finalP.vect().mag2() +
sqr(eCMS)));
1036 std::vector<G4LorentzVector*> * momenta=decay.
Decay(eCMS,masses);
1037 std::vector<G4LorentzVector*>::iterator aMom=momenta->begin();
1049 result->push_back(aNew);
1062 (*aNuc)->GetDefinition());
1065 result->push_back(aNew);
1081 #ifdef debug_BIC_Propagate_finals
1084 for(i = 0; i< fs.size(); i++)
1091 products->push_back(aNew);
1093 #ifdef debug_BIC_Propagate_finals
1103 #ifdef debug_BIC_Propagate_finals
1104 G4cout <<
" Final state momentum " << mom_fs <<
G4endl;
1115 if ( precompoundProducts )
1117 std::vector<G4ReactionProduct *>::iterator j;
1118 for(j = precompoundProducts->begin(); j != precompoundProducts->end(); ++j)
1123 #ifdef debug_BIC_Propagate_finals
1124 G4cout <<
"BIC: pProduct be4 boost " <<pProduct <<
G4endl;
1127 #ifdef debug_BIC_Propagate_finals
1128 G4cout <<
"BIC: pProduct aft boost " <<pProduct <<
G4endl;
1130 pSumPreco += pProduct;
1131 (*j)->SetTotalEnergy(pProduct.e());
1132 (*j)->SetMomentum(pProduct.vect());
1133 (*j)->SetNewlyAdded(
true);
1134 products->push_back(*j);
1138 precompoundProducts->clear();
1139 delete precompoundProducts;
1147 for(std::vector<G4KineticTrack *>::iterator i = secondaries->begin();
1148 i != secondaries->end(); ++i)
1150 for(std::vector<G4BCAction *>::iterator j =
theImR.begin();
1154 const std::vector<G4CollisionInitialState *> & aCandList
1156 for(
size_t count=0; count<aCandList.size(); count++)
1171 const std::vector<G4CollisionInitialState *> & aCandList
1173 for(
size_t count=0; count<aCandList.size(); count++)
1190 }
else if ( tout > 0 )
1203 #ifdef debug_BIC_FindCollision
1204 G4cout <<
"FindLateP Particle, 4-mom, times newState "
1207 <<
" times " << tin <<
" " << tout <<
" "
1211 const std::vector<G4CollisionInitialState *> & aCandList
1213 for(
size_t count=0; count<aCandList.size(); count++)
1215 #ifdef debug_BIC_FindCollision
1216 G4cout <<
" Adding a late Col : " << aCandList[count] <<
G4endl;
1229 #ifdef debug_BIC_ApplyCollision
1230 G4cerr <<
"G4BinaryCascade::ApplyCollision start"<<
G4endl;
1236 G4bool haveTarget=target_collection.size()>0;
1239 #ifdef debug_G4BinaryCascade
1240 G4cout <<
"G4BinaryCasacde::ApplyCollision(): StateError " << primary <<
G4endl;
1242 PrintKTVector(&target_collection,std::string(
"... targets"));
1262 G4int initialBaryon(0);
1263 G4int initialCharge(0);
1277 #ifdef debug_BIC_ApplyCollision
1284 G4bool lateParticleCollision= (!haveTarget) && products && products->size() == 1;
1285 G4bool decayCollision= (!haveTarget) && products && products->size() > 1;
1289 #ifdef debug_G4BinaryCascade
1290 G4int lateBaryon(0), lateCharge(0);
1293 if ( lateParticleCollision )
1297 #ifdef debug_G4BinaryCascade
1298 lateBaryon = initialBaryon;
1299 lateCharge = initialCharge;
1301 initialBaryon=initialCharge=0;
1308 if (!lateParticleCollision)
1312 #ifdef debug_BIC_ApplyCollision
1313 if (products)
G4cout <<
" ======Failed Pauli =====" <<
G4endl;
1314 G4cerr <<
"G4BinaryCascade::ApplyCollision blocked"<<
G4endl;
1328 #ifdef debug_BIC_ApplyCollision
1340 G4int finalBaryon(0);
1341 G4int finalCharge(0);
1343 for(std::vector<G4KineticTrack *>::iterator i =products->begin(); i != products->end(); i++)
1345 if ( ! lateParticleCollision )
1347 (*i)->SetState(primary->
GetState());
1349 finalBaryon+=(*i)->GetDefinition()->GetBaryonNumber();
1350 finalCharge+=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus);
1354 tin < 0 && tout > 0 )
1357 G4cout <<
"tin tout: " << tin <<
" " << tout <<
G4endl;
1369 else if ( tout > 0 )
1372 finalBaryon+=(*i)->GetDefinition()->GetBaryonNumber();
1373 finalCharge+=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus);
1378 toFinalState.push_back((*i));
1384 toFinalState.push_back((*i));
1389 if(!toFinalState.empty())
1392 toFinalState.begin(),toFinalState.end());
1393 std::vector<G4KineticTrack *>::iterator iter1, iter2;
1394 for(iter1 = toFinalState.begin(); iter1 != toFinalState.end();
1397 iter2 = std::find(products->begin(), products->end(),
1399 if ( iter2 != products->end() ) products->erase(iter2);
1405 currentA += finalBaryon-initialBaryon;
1406 currentZ += finalCharge-initialCharge;
1410 oldSecondaries.push_back(primary);
1413 #ifdef debug_G4BinaryCascade
1414 if ( (finalBaryon-initialBaryon-lateBaryon) != 0 || (finalCharge-initialCharge-lateCharge) != 0 )
1416 G4cout <<
"G4BinaryCascade: Error in Balancing: " <<
G4endl;
1417 G4cout <<
"initial/final baryon number, initial/final Charge "
1418 << initialBaryon <<
" "<< finalBaryon <<
" "
1419 << initialCharge <<
" "<< finalCharge <<
" "
1421 <<
", with number of products: "<< products->size() <<
G4endl;
1422 G4cout << G4endl<<
"Initial condition are these:"<<
G4endl;
1435 for(
size_t ii=0; ii< oldTarget.size(); ii++)
1437 oldTarget[ii]->Hit();
1458 std::vector<G4KineticTrack *>::iterator iter;
1468 absorbList.push_back(kt);
1473 if(absorbList.empty())
1477 for(iter = absorbList.begin(); iter != absorbList.end(); ++iter)
1481 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::Absorb(): Cannot absorb a particle.");
1484 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::Absorb(): Cannot absorb a particle.");
1498 "G4BinaryCascade::Absorb(): Cannot absorb a particle.");
1504 toRemove.push_back(kt);
1505 toDelete.push_back(kt);
1523 std::vector<G4KineticTrack *>::iterator i;
1528 G4int particlesAboveCut=0;
1529 G4int particlesBelowCut=0;
1548 ++particlesBelowCut;
1556 if (verbose)
G4cout <<
"Capture particlesAboveCut,particlesBelowCut, capturedEnergy,capturedEnergy/particlesBelowCut <? 0.2*theCutOnP "
1557 << particlesAboveCut <<
" " << particlesBelowCut <<
" " << capturedEnergy
1561 if(particlesBelowCut>0 && capturedEnergy/particlesBelowCut<0.2*
theCutOnP)
1572 captured.push_back(kt);
1593 fermiMom.
Init(A, Z);
1597 G4KineticTrackVector::iterator i;
1604 for(i = products->begin(); i != products->end(); ++i)
1606 definition = (*i)->GetDefinition();
1632 if(mom.e() < eFermi )
1641 #ifdef debug_BIC_CheckPauli
1644 for(i = products->begin(); i != products->end(); ++i)
1646 definition = (*i)->GetDefinition();
1655 if ( mom.e()-mom.mag()+field > 160*
MeV )
1657 G4cout <<
"momentum problem pFermi=" << pFermi
1658 <<
" mom, mom.m " << mom <<
" " << mom.mag()
1659 <<
" field " << field <<
G4endl;
1682 std::vector<G4KineticTrack *>::iterator i;
1692 #ifdef debug_BIC_StepParticlesOut
1693 G4cout <<
" minTimeStep, tStep Particle " <<minTimeStep <<
" " <<tStep
1699 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::StepParticlesOut() particle not in nucleus");
1702 if(intersect && tStep<minTimeStep && tStep> 0 )
1704 minTimeStep = tStep;
1708 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::StepParticlesOut() particle not in nucleus");
1721 if ( timeToCollision > minTimeStep )
1751 #ifdef debug_G4BinaryCascade
1752 G4cerr <<
"G4BinaryCascade.cc: Warning - aborting looping particle(s)" <<
G4endl;
1757 std::vector<G4KineticTrack *>::iterator iter;
1776 #ifdef debug_BIC_StepParticlesOut
1782 #ifdef debug_BIC_StepParticlesOut
1793 #ifdef debug_BIC_return
1794 G4cout <<
"return @ Z=0 after collision loop "<<
G4endl;
1827 if ( std::abs(PDGcode) > 1000 && PDGcode != 2112 && PDGcode != 2212 )
1834 std::vector<G4KineticTrack *>::iterator titer;
1835 for ( titer=target_collection.begin() ; titer!=target_collection.end(); ++titer)
1853 for ( std::vector<G4KineticTrack *>::iterator i =products->begin(); i != products->end(); i++)
1855 G4int PDGcode=(*i)->GetDefinition()->GetPDGEncoding();
1858 if ( std::abs(PDGcode) > 1000 && PDGcode != 2112 && PDGcode != 2212 )
1860 resonances.push_back(*i);
1863 if ( resonances.size() > 0 )
1865 G4double delta_Fermi= (initial_Efermi-final_Efermi)/resonances.size();
1866 for (std::vector<G4KineticTrack *>::iterator res=resonances.begin(); res != resonances.end(); res++)
1870 G4double newEnergy=mom.e() + delta_Fermi;
1871 G4double newEnergy2= newEnergy*newEnergy;
1873 if ( newEnergy2 < mass2 )
1877 G4ThreeVector mom3=std::sqrt(newEnergy2 - mass2) * mom.vect().unit();
1895 #ifdef debug_BIC_CorrectFinalPandE
1901 G4KineticTrackVector::iterator i;
1903 if ( pNucleus.e() == 0 )
return;
1904 #ifdef debug_BIC_CorrectFinalPandE
1911 pFinals += (*i)->Get4Momentum();
1913 #ifdef debug_BIC_CorrectFinalPandE
1914 G4cout <<
"CorrectFinalPandE a final " << (*i)->GetDefinition()->GetParticleName()
1915 <<
" 4mom " << (*i)->Get4Momentum()<<
G4endl;
1918 #ifdef debug_BIC_CorrectFinalPandE
1919 G4cout <<
"CorrectFinalPandE pN pF: " <<pNucleus <<
" " <<pFinals <<
G4endl;
1925 #ifdef debug_BIC_CorrectFinalPandE
1926 G4cout <<
"CorrectFinalPandE pCM, CMS pCM " << pCM <<
" " <<toCMS*pCM<<
G4endl;
1927 G4cout <<
"CorrectFinal CMS pN pF " <<toCMS*pNucleus <<
" "
1930 <<
" massInNucleus m(nucleus) m(finals) std::sqrt(s): " <<
massInNucleus <<
" " <<pNucleus.mag()<<
" "
1931 << pFinals.mag() <<
" " << pCM.mag() <<
G4endl;
1939 if( s0-(m10+m20)*(m10+m20) < 0 )
1941 #ifdef debug_BIC_CorrectFinalPandE
1942 G4cout <<
"G4BinaryCascade::CorrectFinalPandE() : error! " <<
G4endl;
1944 G4cout <<
"not enough mass to correct: mass^2, A,Z, mass(nucl), mass(finals) "
1945 << (s0-(m10+m20)*(m10+m20)) <<
" "
1947 << m10 <<
" " << m20
1957 G4double pInCM = std::sqrt((s0-(m10+m20)*(m10+m20))*(s0-(m10-m20)*(m10-m20))/(4.*s0));
1958 #ifdef debug_BIC_CorrectFinalPandE
1959 G4cout <<
" CorrectFinalPandE pInCM new, CURRENT, ratio : " << pInCM
1960 <<
" " << (pFinals).vect().mag()<<
" " << pInCM/(pFinals).vect().mag() <<
G4endl;
1962 if ( pFinals.vect().mag() > pInCM )
1972 G4ThreeVector p3(factor*(toCMS*(*i)->Get4Momentum()).vect());
1973 G4LorentzVector p(p3,std::sqrt((*i)->Get4Momentum().mag2() + p3.mag2()));
1976 #ifdef debug_BIC_CorrectFinalPandE
1979 (*i)->Set4Momentum(p);
1981 #ifdef debug_BIC_CorrectFinalPandE
1984 <<
" CMS pFinals , mag, 3.mag : " << qFinals <<
" " << qFinals.mag() <<
" " << qFinals.vect().mag()<<
G4endl;
1985 G4cerr <<
" -CorrectFinalPandE 5 " << factor <<
G4endl;
1988 #ifdef debug_BIC_CorrectFinalPandE
1989 else {
G4cerr <<
" -CorrectFinalPandE 6 - no correction done" <<
G4endl; }
2001 std::vector<G4KineticTrack *>::iterator iter1, iter2;
2006 if(!oldSecondaries->empty())
2008 for(iter1 = oldSecondaries->begin(); iter1 != oldSecondaries->end();
2023 if(oldTarget->size()!=0)
2027 for(iter1 = oldTarget->begin(); iter1 != oldTarget->end(); ++iter1)
2039 if(!newSecondaries->empty())
2042 for(iter1 = newSecondaries->begin(); iter1 != newSecondaries->end();
2069 ktv(out), wanted_state(astate)
2073 if ( (kt)->GetState() == wanted_state ) ktv->push_back(kt);
2084 #ifdef debug_BIC_DoTimeStep
2087 G4cerr <<
"G4BinaryCascade::DoTimeStep: enter step="<< theTimeStep
2094 std::vector<G4KineticTrack *>::iterator iter;
2107 #ifdef debug_BIC_DoTimeStep
2120 #ifdef debug_BIC_DoTimeStep
2130 std::for_each( kt_outside->begin(),kt_outside->end(),
2137 std::for_each( kt_inside->begin(),kt_inside->end(),
2147 kt_gone_in->clear();
2148 std::for_each( kt_outside->begin(),kt_outside->end(),
2151 kt_gone_out->clear();
2152 std::for_each( kt_inside->begin(),kt_inside->end(),
2155 #ifdef debug_BIC_DoTimeStep
2156 PrintKTVector(fail,std::string(
" Failed to go in/out -> miss_nucleus/captured"));
2157 PrintKTVector(kt_gone_in, std::string(
"recreated kt_gone_in"));
2158 PrintKTVector(kt_gone_out, std::string(
"recreated kt_gone_out"));
2164 std::for_each( kt_outside->begin(),kt_outside->end(),
2167 std::for_each( kt_outside->begin(),kt_outside->end(),
2170 #ifdef debug_BIC_DoTimeStep
2171 PrintKTVector(kt_gone_out, std::string(
"append gone_outs to final state.. theFinalState"));
2175 kt_gone_out->begin(),kt_gone_out->end());
2187 if (kt_gone_out->size() )
2190 iter = std::find(kt_gone_out->begin(),kt_gone_out->end(),nextPrimary);
2191 if ( iter != kt_gone_out->end() )
2194 #ifdef debug_BIC_DoTimeStep
2195 G4cout <<
" DoTimeStep - WARNING: deleting current collision!" <<
G4endl;
2199 if ( kt_captured->size() )
2202 iter = std::find(kt_captured->begin(),kt_captured->end(),nextPrimary);
2203 if ( iter != kt_captured->end() )
2206 #ifdef debug_BIC_DoTimeStep
2207 G4cout <<
" DoTimeStep - WARNING: deleting current collision!" <<
G4endl;
2217 if ( kt_captured->size() )
2220 kt_captured->begin(),kt_captured->end());
2224 std::vector<G4KineticTrack *>::iterator i_captured;
2225 for(i_captured=kt_captured->begin();i_captured!=kt_captured->end();i_captured++)
2227 (*i_captured)->Hit();
2233 #ifdef debug_G4BinaryCascade
2243 <<
" sum(tgt,capt,active) "
2273 std::vector<G4KineticTrack *>::iterator iter;
2278 G4int secondaries_in(0);
2279 G4int secondaryBarions_in(0);
2280 G4int secondaryCharge_in(0);
2283 for ( iter =in->begin(); iter != in->end(); ++iter)
2286 secondaryCharge_in +=
G4lrint((*iter)->GetDefinition()->GetPDGCharge()/
eplus);
2287 if ((*iter)->GetDefinition()->GetBaryonNumber()!=0 )
2289 secondaryBarions_in += (*iter)->GetDefinition()->GetBaryonNumber();
2293 secondaryMass_in += (*iter)->GetDefinition()->GetPDGMass();
2309 G4double correction= secondaryMass_in + mass_initial - mass_final;
2310 if (secondaries_in>1)
2311 {correction /= secondaries_in;}
2313 #ifdef debug_BIC_CorrectBarionsOnBoundary
2314 G4cout <<
"CorrectBarionsOnBoundary,currentZ,currentA,"
2315 <<
"secondaryCharge_in,secondaryBarions_in,"
2316 <<
"energy correction,m_secondry,m_nucl_init,m_nucl_final "
2318 << secondaryCharge_in<<
" "<<secondaryBarions_in<<
" "
2319 << correction <<
" "
2320 << secondaryMass_in <<
" "
2321 << mass_initial <<
" "
2322 << mass_final <<
" "
2326 for ( iter = in->begin(); iter != in->end(); ++iter)
2328 if ((*iter)->GetTrackingMomentum().e()+correction > (*iter)->GetActualMass())
2330 (*iter)->UpdateTrackingMomentum((*iter)->GetTrackingMomentum().e() + correction);
2337 (*iter)->UpdateTrackingMomentum((*iter)->GetTrackingMomentum().e() + barrier);
2339 kt_fail->push_back(*iter);
2341 currentA -= (*iter)->GetDefinition()->GetBaryonNumber();
2346 #ifdef debug_BIC_CorrectBarionsOnBoundary
2347 G4cout <<
" CorrectBarionsOnBoundary, aft, Z, A, sec-Z,A,m,m_in_nucleus "
2349 << secondaryCharge_in <<
" " << secondaryBarions_in <<
" "
2350 << secondaryMass_in <<
" "
2359 G4int secondaries_out(0);
2360 G4int secondaryBarions_out(0);
2361 G4int secondaryCharge_out(0);
2364 for ( iter =out->begin(); iter != out->end(); ++iter)
2367 secondaryCharge_out +=
G4lrint((*iter)->GetDefinition()->GetPDGCharge()/
eplus);
2368 if ((*iter)->GetDefinition()->GetBaryonNumber() !=0 )
2370 secondaryBarions_out += (*iter)->GetDefinition()->GetBaryonNumber();
2374 secondaryMass_out += (*iter)->GetDefinition()->GetPDGMass();
2392 G4cerr <<
"G4BinaryCascade - secondaryBarions_out,secondaryCharge_out " <<
2393 secondaryBarions_out <<
" " << secondaryCharge_out <<
G4endl;
2398 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::CorrectBarionsOnBoundary() - fatal error");
2401 G4double correction= mass_initial - mass_final - secondaryMass_out;
2404 if (secondaries_out>1) correction /= secondaries_out;
2405 #ifdef debug_BIC_CorrectBarionsOnBoundary
2406 G4cout <<
"DoTimeStep,(current Z,A),"
2407 <<
"(secondaries out,Charge,Barions),"
2408 <<
"* energy correction,(m_secondry,m_nucl_init,m_nucl_final) "
2410 << secondaries_out <<
","
2411 << secondaryCharge_out<<
","<<secondaryBarions_out<<
") * "
2412 << correction <<
" ("
2413 << secondaryMass_out <<
", "
2414 << mass_initial <<
", "
2415 << mass_final <<
")"
2420 for ( iter = out->begin(); iter != out->end(); ++iter)
2422 if ((*iter)->GetTrackingMomentum().e()+correction > (*iter)->GetActualMass())
2424 (*iter)->UpdateTrackingMomentum((*iter)->GetTrackingMomentum().e() + correction);
2435 (*iter)->UpdateTrackingMomentum((*iter)->GetTrackingMomentum().e() - barrier);
2437 kt_fail->push_back(*iter);
2439 currentA += (*iter)->GetDefinition()->GetBaryonNumber();
2441 #ifdef debug_BIC_CorrectBarionsOnBoundary
2444 G4cout <<
"Not correcting outgoing " << *iter <<
" "
2445 << (*iter)->GetDefinition()->GetPDGEncoding() <<
" "
2446 << (*iter)->GetDefinition()->GetParticleName() <<
G4endl;
2447 PrintKTVector(out,std::string(
"outgoing, one not corrected"));
2453 #ifdef debug_BIC_CorrectBarionsOnBoundary
2455 G4cout <<
" DoTimeStep, nucl-update, A, Z, sec-Z,A,m,m_in_nucleus, table-mass, delta "
2457 << secondaryCharge_out <<
" "<< secondaryBarions_out <<
" "<<
2458 secondaryMass_out <<
" "
2476 #ifdef debug_BIC_FindFragments
2477 G4cout <<
"target, captured, secondary: "
2486 G4KineticTrackVector::iterator i;
2489 if(
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus) == 1 )
2495 G4int zCaptured = 0;
2499 CapturedMomentum += (*i)->Get4Momentum();
2500 if(
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus) == 1 )
2506 G4int z = zTarget+zCaptured;
2508 #ifdef debug_G4BinaryCascade
2511 G4cout <<
" FindFragment Counting error z a " << z <<
" " <<a <<
" "
2529 if ( z < 1 )
return 0;
2533 #ifdef debug_BIC_FindFragments
2534 G4cout <<
"Fragment: a= " << a <<
" z= " << z <<
" particles= " << excitons
2535 <<
" Charged= " << zCaptured <<
" holes= " << holes
2562 final4Momentum -= (*i)->Get4Momentum();
2563 finals += (*i)->Get4Momentum();
2566 if(final4Momentum.e()> 0 && (final4Momentum.vect()/final4Momentum.e()).mag()>1.0 &&
currentA > 0)
2568 #ifdef debug_BIC_Final4Momentum
2570 G4cerr <<
"G4BinaryCascade::GetFinal4Momentum - Fatal"<<
G4endl;
2571 G4KineticTrackVector::iterator i;
2572 G4cerr <<
"Total initial 4-momentum " << theProjectile4Momentum <<
G4endl;
2576 G4cerr <<
" Final state: "<<(*i)->Get4Momentum()<<(*i)->GetDefinition()->GetParticleName()<<
G4endl;
2579 G4cerr<<
" Final4Momentum = "<<final4Momentum <<
" "<<final4Momentum.m()<<
G4endl;
2586 return final4Momentum;
2597 G4KineticTrackVector::iterator i;
2601 CapturedMomentum += (*i)->Get4Momentum();
2607 if ( NucleusMomentum.e() > 0 )
2611 G4ThreeVector boost= (NucleusMomentum.vect() -CapturedMomentum.vect())/NucleusMomentum.e();
2612 if(boost.mag2()>1.0)
2614 # ifdef debug_BIC_FinalNucleusMomentum
2615 G4cerr <<
"G4BinaryCascade::GetFinalNucleusMomentum - Fatal"<<
G4endl;
2617 G4cerr <<
"it 01"<<NucleusMomentum<<
" "<<CapturedMomentum<<
" "<<
G4endl;
2618 G4cout <<
" testing boost "<<boost<<
" "<<boost.mag()<<
G4endl;
2625 #ifdef debug_debug_BIC_FinalNucleusMomentum
2626 G4cout <<
"GetFinalNucleusMomentum be4 boostNucleusMomentum, CapturedMomentum"<<NucleusMomentum<<
" "<<CapturedMomentum<<
" "<<
G4endl;
2628 NucleusMomentum *= nucleusBoost;
2629 #ifdef debug_BIC_FinalNucleusMomentum
2630 G4cout <<
"GetFinalNucleusMomentum aft boost GetFinal4Momentum= " <<NucleusMomentum <<
G4endl;
2633 return NucleusMomentum;
2650 std::vector<G4KineticTrack *>::iterator iter, jter;
2655 while(!done && tryCount++ <200)
2663 #ifdef debug_H1_BinaryCascade
2666 for(
size_t ss=0; secs && ss<secs->size(); ss++)
2669 if((*secs)[ss]->GetDefinition()->IsShortLived()) done =
true;
2677 for(
size_t current=0; secs && current<secs->size(); current++)
2679 if((*secs)[current]->GetDefinition()->IsShortLived())
2683 for(jter=dec->begin(); jter != dec->end(); jter++)
2686 secs->push_back(*jter);
2689 delete (*secs)[current];
2701 #ifdef debug_H1_BinaryCascade
2710 products->push_back(aNew);
2711 #ifdef debug_H1_BinaryCascade
2716 G4cout <<
"final shortlived : ";
2719 G4cout <<
"final un stable : ";
2742 o1= mom.orthogonal();
2751 }
while (
sqr(x1) +
sqr(x2) > 1.);
2753 return G4ThreeVector(r*(x1*o1.unit() + x2*o2.unit() - 1.5* mom.unit()));
2777 std::vector<G4KineticTrack *>::iterator i;
2778 for(i = ktv->begin(); i != ktv->end(); ++i)
2787 std::vector<G4ReactionProduct *>::iterator i;
2788 for(i = rpv->begin(); i != rpv->end(); ++i)
2797 if (comment.size() > 0 )
G4cout <<
"G4BinaryCascade::PrintKTVector() " << comment <<
G4endl;
2799 G4cout <<
" vector: " << ktv <<
", number of tracks: " << ktv->size()
2801 std::vector<G4KineticTrack *>::iterator i;
2804 for(count = 0, i = ktv->begin(); i != ktv->end(); ++i, ++count)
2807 G4cout <<
" track n. " << count;
2811 G4cout <<
"G4BinaryCascade::PrintKTVector():No KineticTrackVector given " <<
G4endl;
2818 if (comment.size() > 0 )
G4cout <<
"G4BinaryCascade::PrintKTVector() "<< comment <<
G4endl;
2826 << 1/
fermi*pos <<
" R: " << 1/
fermi*pos.mag() <<
" 4mom: "
2827 << 1/
MeV*mom <<
"Tr_mom" << 1/
MeV*tmom <<
" P: " << 1/
MeV*mom.vect().mag()
2831 G4cout <<
"G4BinaryCascade::PrintKTVector(): No Kinetictrack given" <<
G4endl;
2841 if ( Z > 0 && A >= Z )
2845 }
else if ( A > 0 && Z>0 )
2850 }
else if ( A >= 0 && Z<=0 )
2855 }
else if ( A == 0 )
2862 G4cerr <<
"G4BinaryCascade::GetIonMass() - invalid (A,Z) = ("
2863 << A <<
"," << Z <<
")" <<
G4endl;
2864 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::GetIonMass() - giving up");
2875 std::vector<G4KineticTrack *>::iterator iter;
2876 std::vector<G4ReactionProduct *>::iterator rpiter;
2882 aNew->
SetMomentum((*iter)->Get4Momentum().vect());
2884 Esecondaries +=(*iter)->Get4Momentum().e();
2885 psecondaries +=(*iter)->Get4Momentum();
2888 products->push_back(aNew);
2900 if ( lates->size() == 1 ) {
2910 products->push_back(aNew);
2932 (*iter)->Update4Momentum((*iter)->Get4Momentum().vect()+transferCorrection);
2933 aNew->
SetMomentum((*iter)->Get4Momentum().vect());
2935 Esecondaries +=(*iter)->Get4Momentum().e();
2936 psecondaries +=(*iter)->Get4Momentum();
2938 products->push_back(aNew);
2945 (*iter)->Update4Momentum((*iter)->Get4Momentum().vect()+transferCorrection);
2946 aNew->
SetMomentum((*iter)->Get4Momentum().vect());
2948 Esecondaries +=(*iter)->Get4Momentum().e();
2949 psecondaries +=(*iter)->Get4Momentum();
2951 products->push_back(aNew);
2958 SumMassNucleons += (*iter)->GetDefinition()->GetPDGMass();
2959 pNucleons += (*iter)->Get4Momentum();
2963 #ifdef debug_BIC_FillVoidnucleus
2965 psecondaries - pNucleons;
2975 for (rpiter=products->begin(); rpiter!=products->end(); ++rpiter){
2976 TotalEkin+=(*rpiter)->GetKineticEnergy();
2979 if ( std::abs(Ekinetic) < 20*
perCent * TotalEkin ){
2980 correction=1. + (Ekinetic-Ekineticrdm)/TotalEkin;
2982 #ifdef debug_G4BinaryCascade
2984 G4cout <<
"BLIC::FillVoidNucleus() fail correction, Ekinetic, TotalEkin " << Ekinetic <<
""<< TotalEkin <<
G4endl;
2988 for (rpiter=products->begin(); rpiter!=products->end(); ++rpiter){
2989 (*rpiter)->SetKineticEnergy((*rpiter)->GetKineticEnergy()*correction);
2990 (*rpiter)->SetMomentum((*rpiter)->GetTotalMomentum() * (*rpiter)->GetMomentum().unit());
2994 Ekinetic=Ekineticrdm*correction;
3006 products->push_back(aNew);
3011 for (rpiter=products->begin(); rpiter!=products->end(); ++rpiter){
3012 psecondaries +=
G4LorentzVector((*rpiter)->GetMomentum(),(*rpiter)->GetTotalEnergy() );
3024 SumMom=initial4Mom.vect()-SumMom;
3027 std::vector<G4ReactionProduct *>::reverse_iterator
reverse;
3028 while ( SumMom.mag() > 0.1*
MeV && loopcount++ < 10){
3029 G4int index=products->size();
3030 for (reverse=products->rbegin(); reverse!=products->rend(); ++
reverse, --index){
3031 SumMom=initial4Mom.vect();
3032 for (rpiter=products->begin(); rpiter!=products->end(); ++rpiter){
3033 SumMom-=(*rpiter)->GetMomentum();
3036 G4double p=((*reverse)->GetMomentum()).mag();
3037 (*reverse)->SetMomentum( p*(((*reverse)->GetMomentum()+SumMom).unit()));
3048 std::vector<G4KineticTrack *>::iterator iter;
3049 for(iter = secondaries->begin(); iter != secondaries->end(); ++iter)
3052 aNew->
SetMomentum((*iter)->Get4Momentum().vect());
3056 products->push_back(aNew);
3075 if (fragment != 0) {
3081 products->push_back(theNew);
3088 G4cout <<
"Thank you for using G4BinaryCascade. "<<
G4endl;
3098 for ( std::vector<G4KineticTrack *>::iterator i =products->begin(); i != products->end(); i++)
3100 G4int PDGcode=std::abs((*i)->GetDefinition()->GetPDGEncoding());
3101 if (std::abs(PDGcode)==211 || PDGcode==111 ) havePion=
true;
3104 if ( !products || havePion)
3107 G4cout <<
" Collision " << collision <<
", type: "<<
typeid(action).
name()
3108 <<
", with NO products! " <<
G4endl;
3109 G4cout << G4endl<<
"Initial condition are these:"<<
G4endl;
3127 static G4int lastdA(0), lastdZ(0);
3134 std::vector<G4KineticTrack *>::iterator i;
3135 G4int CapturedA(0), CapturedZ(0);
3136 G4int secsA(0), secsZ(0);
3138 CapturedA += (*i)->GetDefinition()->GetBaryonNumber();
3139 CapturedZ +=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus);
3144 secsA += (*i)->GetDefinition()->GetBaryonNumber();
3145 secsZ +=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus);
3150 fStateA += (*i)->GetDefinition()->GetBaryonNumber();
3151 fStateZ +=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus);
3157 #ifdef debugCheckChargeAndBaryonNumberverbose
3158 G4cout << where <<
" A: iState= "<< iStateA<<
", secs= "<< secsA<<
", fState= "<< fStateA<<
", current= "<<
currentA<<
", late= " <<lateA <<
G4endl;
3159 G4cout << where <<
" Z: iState= "<< iStateZ<<
", secs= "<< secsZ<<
", fState= "<< fStateZ<<
", current= "<<
currentZ<<
", late= " <<lateZ <<
G4endl;
3162 if (deltaA != 0 || deltaZ!=0 ) {
3163 if (deltaA != lastdA || deltaZ != lastdZ ) {
3164 G4cout <<
"baryon/charge imbalance - " << where << G4endl
3165 <<
"deltaA " <<deltaA<<
", iStateA "<<iStateA<<
", CapturedA "<<CapturedA <<
", secsA "<<secsA
3166 <<
", fStateA "<<fStateA <<
", currentA "<<
currentA <<
", lateA "<<lateA << G4endl
3167 <<
"deltaZ "<<deltaZ<<
", iStateZ "<<iStateZ<<
", CapturedZ "<<CapturedZ <<
", secsZ "<<secsZ
3168 <<
", fStateZ "<<fStateZ <<
", currentZ "<<
currentZ <<
", lateZ "<<lateZ << G4endl<<
G4endl;
3172 }
else { lastdA=lastdZ=0;}
3200 <<
" " << initial <<
G4endl;;
3203 for (
unsigned int it=0; it < ktv.size(); it++)
3216 <<
" " << initial <<
" Excit " << thisExcitation <<
G4endl;;
3221 G4int product_barions(0);
3224 for (
unsigned int it=0; it < products->size(); it++)
3236 <<
" " <<
final <<
G4endl;;
3245 finalA -= product_barions;
3250 <<
" delta-mass " << delta<<
G4endl;
3254 <<
" " <<
final <<
" "
3267 G4ReactionProductVector::iterator iter;
3275 for(iter = products->begin(); iter != products->end(); ++iter)
3278 G4cout <<
" Secondary E - Ekin / p " <<
3279 (*iter)->GetDefinition()->GetParticleName() <<
" " <<
3280 (*iter)->GetTotalEnergy() <<
" - " <<
3281 (*iter)->GetKineticEnergy()<<
" / " <<
3282 (*iter)->GetMomentum().x() <<
" " <<
3283 (*iter)->GetMomentum().y() <<
" " <<
3284 (*iter)->GetMomentum().z() <<
G4endl;
3285 Efinal += (*iter)->GetTotalEnergy();
3286 pFinal += (*iter)->GetMomentum();
3290 G4cout <<
"BIC E/p delta " <<
3308 std::vector<G4KineticTrack *>::iterator ktiter;
3312 G4cout <<
" Secondary E - Ekin / p " <<
3313 (*ktiter)->GetDefinition()->GetParticleName() <<
" " <<
3314 (*ktiter)->Get4Momentum().e() <<
" - " <<
3315 (*ktiter)->Get4Momentum().e() - (*ktiter)->Get4Momentum().mag() <<
" / " <<
3316 (*ktiter)->Get4Momentum().vect() <<
G4endl;
3317 psecs += (*ktiter)->Get4Momentum();
3323 G4cout <<
" Target E - Ekin / p " <<
3324 (*ktiter)->GetDefinition()->GetParticleName() <<
" " <<
3325 (*ktiter)->Get4Momentum().e() <<
" - " <<
3326 (*ktiter)->Get4Momentum().e() - (*ktiter)->Get4Momentum().mag() <<
" / " <<
3327 (*ktiter)->Get4Momentum().vect() <<
G4endl;
3328 ptgts += (*ktiter)->Get4Momentum();
3334 G4cout <<
" Captured E - Ekin / p " <<
3335 (*ktiter)->GetDefinition()->GetParticleName() <<
" " <<
3336 (*ktiter)->Get4Momentum().e() <<
" - " <<
3337 (*ktiter)->Get4Momentum().e() - (*ktiter)->Get4Momentum().mag() <<
" / " <<
3338 (*ktiter)->Get4Momentum().vect() <<
G4endl;
3339 pcpts += (*ktiter)->Get4Momentum();
3345 G4cout <<
" Finals E - Ekin / p " <<
3346 (*ktiter)->GetDefinition()->GetParticleName() <<
" " <<
3347 (*ktiter)->Get4Momentum().e() <<
" - " <<
3348 (*ktiter)->Get4Momentum().e() - (*ktiter)->Get4Momentum().mag() <<
" / " <<
3349 (*ktiter)->Get4Momentum().vect() <<
G4endl;
3350 pfins += (*ktiter)->Get4Momentum();
3353 G4cout <<
" Secondaries " << psecs <<
", Targets " << ptgts << G4endl
3354 <<
" Captured " << pcpts <<
", Finals " << pfins << G4endl
G4double GetWeightChange() const
void FindDecayCollision(G4KineticTrack *)
G4VFieldPropagation * thePropagator
G4bool IsParticipant() const
static G4Triton * TritonDefinition()
G4bool Capture(G4bool verbose=false)
void DebugApplyCollisionFail(G4CollisionInitialState *collision, G4KineticTrackVector *products)
void Update4Momentum(G4double aEnergy)
G4KineticTrackVector theFinalState
static G4He3 * He3Definition()
void ModelDescription(std::ostream &outFile) const
CascadeState GetState() const
G4double GetTotalMomentum() const
const G4LorentzVector & GetMomentum() const
G4double initial_nuclear_mass
virtual G4int GetCharge()=0
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepLorentzRotation G4LorentzRotation
const G4HadProjectile * GetPrimaryProjectile() const
virtual G4ReactionProductVector * DeExcite(G4Fragment &aFragment)=0
G4ReactionProductVector * ProductsAddFinalState(G4ReactionProductVector *products, G4KineticTrackVector &finalState)
const G4ThreeVector & GetPosition() const
virtual G4bool StartLoop()=0
G4LorentzVector theInitial4Mom
G4VPreCompoundModel * GetDeExcitation() const
virtual void Transport(G4KineticTrackVector &theActive, const G4KineticTrackVector &theSpectators, G4double theTimeStep)=0
void SetKineticEnergy(const G4double en)
void RemoveCollision(G4CollisionInitialState *collision)
virtual const G4VNuclearDensity * GetNuclearDensity() const =0
G4LorentzRotation precompoundLorentzboost
G4KineticTrackVector * ktv
G4KineticTrack * GetPrimary(void)
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4bool GetPDGStable() const
G4CollisionInitialState * GetNextCollision()
void ClearAndDestroy(G4KineticTrackVector *ktv)
G4ExcitationHandler * theExcitationHandler
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
virtual G4int GetMassNumber()=0
static G4Proton * ProtonDefinition()
G4ThreeVector GetSpherePoint(G4double r, const G4LorentzVector &momentumdirection)
virtual G4ThreeVector GetMomentumTransfer() const =0
#define _DebugEpConservation(val)
virtual const std::vector< G4CollisionInitialState * > & GetCollisions(G4KineticTrack *aProjectile, std::vector< G4KineticTrack * > &, G4double theCurrentTime)
G4ReactionProductVector * Propagate1H1(G4KineticTrackVector *, G4V3DNucleus *)
void SetNumberOfHoles(G4int valueTot, G4int valueP=0)
G4double currentInitialEnergy
G4int GetPDGEncoding() const
G4double GetActualMass() const
void PrintWelcomeMessage()
G4ReactionProductVector * DecayVoidNucleus()
G4Fragment * FindFragments()
G4LorentzVector GetFinal4Momentum()
const G4String & GetModelName() const
virtual const G4ThreeVector & GetPosition() const
G4bool BuildLateParticleCollisions(G4KineticTrackVector *secondaries)
static void ConstructParticle()
#define _CheckChargeAndBaryonNumber_(val)
virtual void PropagateModelDescription(std::ostream &) const
G4ReactionProductVector * BreakItUp(const G4Fragment &theInitialState)
virtual G4double CoulombBarrier()=0
const G4String & GetParticleName() const
std::vector< G4LorentzVector * > * Decay(const G4double, const std::vector< G4double > &) const
void RemoveTracksCollisions(G4KineticTrackVector *ktv)
G4LorentzVector theProjectile4Momentum
std::vector< G4BCAction * > theImR
G4KineticTrack::CascadeState wanted_state
virtual const G4ParticleDefinition * GetDefinition() const
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &theNucleus)
void SetNewlyAdded(const G4bool f)
G4double GetBarrier(G4int encoding)
void SetStatusChange(G4HadFinalStateStatus aS)
G4int GetTotalCharge(std::vector< G4KineticTrack * > &aV)
std::vector< G4ReactionProduct * > G4ReactionProductVector
void push_back(G4String aS)
virtual G4double GetOuterRadius()=0
G4double GetExcitationEnergy()
G4KineticTrackVector * GetFinalState()
void SetMinEnergy(G4double anEnergy)
G4double GetIonMass(G4int Z, G4int A)
virtual ~G4BinaryCascade()
G4ExcitationHandler * GetExcitationHandler() const
G4IonTable * GetIonTable() const
G4bool DebugEpConservation(const G4String where)
G4GLOB_DLL std::ostream G4cout
G4bool FindAbsorbers(G4KineticTrack &kt, G4KineticTrackVector &tgt)
CascadeState SetState(const CascadeState new_state)
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
const G4ParticleDefinition * GetDefinition() const
G4LorentzVector GetFinalNucleusMomentum()
virtual void Init(G4int theA, G4int theZ)=0
void UpdateTracksAndCollisions(G4KineticTrackVector *oldSecondaries, G4KineticTrackVector *oldTarget, G4KineticTrackVector *newSecondaries)
G4bool nucleon(G4int ityp)
static G4PionMinus * PionMinusDefinition()
G4double GetIonMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const
const G4LorentzVector & GetMomentum() const
void SetNucleon(G4Nucleon *aN)
G4double GetKineticEnergy() const
void SetTotalEnergy(const G4double en)
G4ThreeVector theMomentumTransfer
G4CollisionManager * theCollisionMgr
G4double GetFermiMomentum(G4double density)
G4bool CheckPauliPrinciple(G4KineticTrackVector *)
static G4PionPlus * PionPlusDefinition()
static G4Proton * Proton()
virtual void Init(G4V3DNucleus *theNucleus)=0
static const double perCent
G4KineticTrackVector theCapturedList
G4ReactionProductVector * ProductsAddPrecompound(G4ReactionProductVector *products, G4ReactionProductVector *preco)
G4Scatterer * theH1Scatterer
G4int GetTargetBaryonNumber()
static G4Neutron * Neutron()
void Set4Momentum(const G4LorentzVector &a4Momentum)
void SetNumberOfParticles(G4int value)
G4KineticTrackVector & GetTargetCollection(void)
void PrintKTVector(G4KineticTrackVector *ktv, std::string comment=std::string(""))
virtual G4ReactionProductVector * Propagate(G4KineticTrackVector *, G4V3DNucleus *)
G4KineticTrackVector * GetAbsorbers()
static const G4double A[nN]
const G4LorentzVector & Get4Momentum() const
G4bool WillBeAbsorbed(const G4KineticTrack &kt)
G4bool ApplyCollision(G4CollisionInitialState *)
virtual const std::vector< G4CollisionInitialState * > & GetCollisions(G4KineticTrack *aProjectile, std::vector< G4KineticTrack * > &, G4double theCurrentTime)
G4ReactionProductVector * HighEnergyModelFSProducts(G4ReactionProductVector *, G4KineticTrackVector *secondaries)
G4BinaryCascade(G4VPreCompoundModel *ptr=0)
void AddCollision(G4double time, G4KineticTrack *proj, G4KineticTrack *target=NULL)
G4bool CorrectShortlivedFinalsForFermi(G4KineticTrackVector *products, G4double initial_Efermi)
G4double GetKineticEnergy() const
G4HadronicInteraction * FindModel(const G4String &name)
void DebugApplyCollision(G4CollisionInitialState *collision, G4KineticTrackVector *products)
G4bool DoTimeStep(G4double timeStep)
void operator()(G4KineticTrack *&kt) const
virtual void DeExciteModelDescription(std::ostream &outFile) const
G4bool IsShortLived() const
void SetEnergyChange(G4double anEnergy)
virtual void ModelDescription(std::ostream &) const
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &thePrimary, G4Nucleus &theNucleus)=0
G4double GetTotalEnergy() const
void Init(G4int anA, G4int aZ)
static const G4double factor
void Decay(G4KineticTrackVector *tracks) const
G4double GetPDGMass() const
G4double GetDensity(const G4ThreeVector &aPosition) const
static G4ParticleTable * GetParticleTable()
G4bool FindProducts(G4KineticTrack &kt)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
virtual G4KineticTrackVector * Scatter(const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
G4double energy(const ThreeVector &p, const G4double m)
const G4LorentzVector & GetTrackingMomentum() const
void FindLateParticleCollision(G4KineticTrack *)
G4DecayKineticTracks decayKTV
static G4HadronicInteractionRegistry * Instance()
G4KineticTrackVector theTargetList
G4ReactionProductVector * FillVoidNucleusProducts(G4ReactionProductVector *)
G4ReactionProductVector * ProductsAddFakeGamma(G4ReactionProductVector *products)
G4KineticTrackVector * GetProducts()
G4bool CheckChargeAndBaryonNumber(G4String where)
G4VPreCompoundModel * theDeExcitation
G4double GetField(G4int encoding, G4ThreeVector pos)
G4bool DebugFinalEpConservation(const G4HadProjectile &aTrack, G4ReactionProductVector *products)
void SetMaxEnergy(const G4double anEnergy)
G4ThreeVector GetMomentum() const
void SetDeExcitation(G4VPreCompoundModel *ptr)
G4HadFinalState theParticleChange
virtual G4double GetMass()=0
G4BCLateParticle * theLateParticle
G4ReactionProductVector * DeExcite()
const G4ParticleDefinition * thePrimaryType
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
G4V3DNucleus * the3DNucleus
virtual G4Nucleon * GetNextNucleon()=0
void SetNumberOfCharged(G4int value)
G4double GetCollisionTime(void)
static const double eplus
const G4LorentzVector & Get4Momentum() const
G4double GetPDGCharge() const
void SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double absoluteLevel)
const G4ParticleDefinition * GetDefinition() const
static G4Deuteron * DeuteronDefinition()
static G4Alpha * AlphaDefinition()
static G4Neutron * NeutronDefinition()
void SetMomentumChange(const G4ThreeVector &aV)
G4KineticTrackVector theSecondaryList
const G4BCAction * GetGenerator()
SelectFromKTV(G4KineticTrackVector *out, G4KineticTrack::CascadeState astate)
static const G4double pos
G4KineticTrackVector * CorrectBarionsOnBoundary(G4KineticTrackVector *in, G4KineticTrackVector *out)
static const double fermi
G4double CorrectShortlivedPrimaryForFermi(G4KineticTrack *primary, G4KineticTrackVector target_collection)
G4GLOB_DLL std::ostream G4cerr
G4int GetBaryonNumber() const
CLHEP::HepLorentzVector G4LorentzVector
void FindCollisions(G4KineticTrackVector *)