93 #if defined(debug_G4BinaryCascade)
94 #define _CheckChargeAndBaryonNumber_(val) CheckChargeAndBaryonNumber(val)
97 #define _CheckChargeAndBaryonNumber_(val)
175 outFile <<
"G4BinaryCascade is an intra-nuclear cascade model in which\n"
176 <<
"an incident hadron collides with a nucleon, forming two\n"
177 <<
"final-state particles, one or both of which may be resonances.\n"
178 <<
"The resonances then decay hadronically and the decay products\n"
179 <<
"are then propagated through the nuclear potential along curved\n"
180 <<
"trajectories until they re-interact or leave the nucleus.\n"
181 <<
"This model is valid for incident pions up to 1.5 GeV and\n"
182 <<
"nucleons up to 10 GeV.\n";
186 outFile <<
"G4BinaryCascade propagtes secondaries produced by a high\n"
187 <<
"energy model through the wounded nucleus.\n"
188 <<
"Secondaries are followed after the formation time and if\n"
189 <<
"within the nucleus are propagated through the nuclear\n"
190 <<
"potential along curved trajectories until they interact\n"
191 <<
"with a nucleon, decay, or leave the nucleus.\n"
192 <<
"An interaction of a secondary with a nucleon produces two\n"
193 <<
"final-state particles, one or both of which may be resonances.\n"
194 <<
"Resonances decay hadronically and the decay products\n"
195 <<
"are in turn propagated through the nuclear potential along curved\n"
196 <<
"trajectories until they re-interact or leave the nucleus.\n"
197 <<
"This model is valid for pions up to 1.5 GeV and\n"
198 <<
"nucleons up to about 3.5 GeV.\n";
213 if(getenv(
"BCDEBUG") )
G4cerr <<
" ######### Binary Cascade Reaction starts ######### "<<
G4endl;
218 if(initial4Momentum.e()-initial4Momentum.m()<
theBCminP &&
232 if(!getenv(
"I_Am_G4BinaryCascade_Developer") )
239 G4cerr <<
"You are trying to use G4BinaryCascade with " <<definition->GetParticleName()<<
" as projectile."<<
G4endl;
240 G4cerr <<
"G4BinaryCascade should not be used for projectiles other than nucleons or pions."<<
G4endl;
241 G4cerr <<
"If you want to continue, please switch on the developer environment: "<<
G4endl;
242 G4cerr <<
"setenv I_Am_G4BinaryCascade_Developer 1 "<<G4endl<<
G4endl;
243 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade - used for unvalid particle type - Fatal");
253 G4int interactionCounter = 0;
276 kt =
new G4KineticTrack(definition, 0., initialPosition, initial4Momentum);
280 secondaries->push_back(kt);
287 }
while(! products );
289 if(++interactionCounter>99)
break;
290 }
while(products->size() == 0);
292 if(products->size()>0)
298 G4ReactionProductVector::iterator iter;
300 for(iter = products->begin(); iter != products->end(); ++iter)
304 (*iter)->GetTotalEnergy(),
305 (*iter)->GetMomentum());
313 if(getenv(
"BCDEBUG") )
G4cerr <<
" ######### Binary Cascade Reaction void, return intial state ######### "<<
G4endl;
325 if(getenv(
"BCDEBUG") )
G4cerr <<
" ######### Binary Cascade Reaction ends ######### "<<
G4endl;
335 #ifdef debug_BIC_Propagate
336 G4cout <<
"G4BinaryCascade Propagate starting -------------------------------------------------------" <<
G4endl;
349 std::vector<G4KineticTrack *>::iterator iter;
360 #ifdef debug_BIC_GetExcitationEnergy
373 #ifdef debug_G4BinaryCascade
374 G4cout <<
"G4BinaryCascade::Propagate: warning - high energy model failed energy conservation, returning unchanged high energy final state" <<
G4endl;
391 #ifdef debug_BIC_return
401 G4bool haveProducts =
false;
402 G4int collisionCount=0;
421 #ifdef debug_BIC_Propagate_Collisions
422 G4cout <<
" NextCollision * , Time, curtime = " << nextCollision <<
" "
457 #ifdef debug_BIC_return
458 G4cout <<
"return @ Z=0 after collision loop "<<
G4endl;
467 G4cout <<
"returned products: " << products->size() <<
G4endl;
486 #ifdef debug_BIC_return
493 #ifdef debug_BIC_Propagate
503 #ifdef debug_G4BinaryCascade
504 G4cerr <<
"G4BinaryCascade: Warning, have active particles at end" <<
G4endl;
517 #ifdef debug_G4BinaryCascade
518 G4cerr <<
" Warning: remove left over collision(s) " <<
G4endl;
523 #ifdef debug_BIC_Propagate_Excitation
540 #ifdef debug_BIC_Propagate_finals
542 G4cout <<
" Excitation Energy prefinal, #collisions:, out, captured "
543 << ExcitationEnergy <<
" "
544 << collisionCount <<
" "
549 if (ExcitationEnergy < 0 )
551 G4int maxtry=5, ntry=0;
555 }
while ( ++ntry < maxtry && ExcitationEnergy < 0 );
558 #ifdef debug_BIC_Propagate_finals
560 G4cout <<
" Excitation Energy final, #collisions:, out, captured "
561 << ExcitationEnergy <<
" "
562 << collisionCount <<
" "
568 if ( ExcitationEnergy < 0. )
585 #ifdef debug_BIC_return
605 #ifdef debug_BIC_return
619 #if defined(debug_G4BinaryCascade) || defined(debug_BIC_GetExcitationEnergy)
624 G4cerr <<
"G4BIC:GetExcitationEnergy(): Nucleon counting error current/final{A,Z} "
644 #ifdef debug_G4BinaryCascade
645 G4cout <<
"G4BinaryCascade::GetExcitationEnergy(): Warning - invalid nucleus (A,Z)=("
651 #ifdef debug_BIC_GetExcitationEnergy
672 #ifdef debug_BIC_GetExcitationEnergy
674 if ( excitationE < 0 )
676 G4cout <<
"negative ExE final Ion mass " <<nucleusMass<<
G4endl;
678 if(finalZ>.5)
G4cout <<
" Final nuclmom/mass " << Nucl_mom <<
" " << Nucl_mom.mag()
679 <<
" (A,Z)=("<< finalA <<
","<<finalZ <<
")"
680 <<
" mass " << nucleusMass <<
" "
681 <<
" excitE " << excitationE <<
G4endl;
690 G4cout <<
"GetExcitationEnergy: Initial nucleus A Z " << A <<
" " << Z <<
" " << initialExc <<
G4endl;
742 mom.setE( std::sqrt( mom.vect().mag2() +
sqr(definition->
GetPDGMass()) ) );
751 #ifdef debug_BIC_BuildTargetList
752 else {
G4cout <<
"nucleon is hit" << nucleon <<
G4endl;}
764 G4cerr <<
"G4BinaryCascade::BuildTargetList(): Fatal Error - invalid nucleus (A,Z)=("
770 #ifdef debug_BIC_BuildTargetList
771 G4cout <<
"G4BinaryCascade::BuildTargetList(): nucleus (A,Z)=("
784 std::vector<G4KineticTrack *>::iterator iter;
790 for(iter = secondaries->begin(); iter != secondaries->end(); ++iter)
792 if((*iter)->GetFormationTime() < StartingTime)
793 StartingTime = (*iter)->GetFormationTime();
798 for(iter = secondaries->begin(); iter != secondaries->end(); ++iter)
802 G4double FormTime = (*iter)->GetFormationTime() - StartingTime;
803 (*iter)->SetFormationTime(FormTime);
807 lateParticles4Momentum += (*iter)->GetTrackingMomentum();
808 lateA += (*iter)->GetDefinition()->GetBaryonNumber();
816 projectileA += (*iter)->GetDefinition()->GetBaryonNumber();
818 #ifdef debug_BIC_Propagate
819 G4cout <<
" Adding initial secondary " << *iter
820 <<
" time" << (*iter)->GetFormationTime()
821 <<
", state " << (*iter)->GetState() <<
G4endl;
835 #ifdef debug_BIC_GetExcitationEnergy
836 G4cout <<
"BIC: Proj.e, nucl initial, nucl final, lateParticles"
839 << lateParticles4Momentum <<
G4endl;
842 success = excitation > 0;
843 #ifdef debug_G4BinaryCascade
855 secondaries->clear();
877 if(fragment->
GetA() >1.5)
896 std::vector<G4KineticTrack *>::iterator i;
903 precompoundProducts->push_back(aNew);
913 return precompoundProducts;
924 std::vector<G4KineticTrack *>::iterator aNuc;
926 std::vector<G4double> masses;
933 G4double mass=(*aNuc)->GetDefinition()->GetPDGMass();
934 masses.push_back(mass);
944 G4double mass=(*aNuc)->GetDefinition()->GetPDGMass();
945 masses.push_back(mass);
956 if ( eCMS < sumMass )
958 eCMS=sumMass + 2*
MeV*masses.size();
959 finalP.setE(std::sqrt(finalP.vect().mag2() +
sqr(eCMS)));
963 std::vector<G4LorentzVector*> * momenta=decay.
Decay(eCMS,masses);
964 std::vector<G4LorentzVector*>::iterator aMom=momenta->begin();
976 result->push_back(aNew);
989 (*aNuc)->GetDefinition());
992 result->push_back(aNew);
1008 for(i = 0; i< fs.size(); i++)
1015 products->push_back(aNew);
1017 #ifdef debug_BIC_Propagate_finals
1033 if ( precompoundProducts )
1035 std::vector<G4ReactionProduct *>::iterator j;
1036 for(j = precompoundProducts->begin(); j != precompoundProducts->end(); ++j)
1041 #ifdef debug_BIC_Propagate_finals
1045 #ifdef debug_BIC_Propagate_finals
1048 pSumPreco += pProduct;
1049 (*j)->SetTotalEnergy(pProduct.e());
1050 (*j)->SetMomentum(pProduct.vect());
1051 (*j)->SetNewlyAdded(
true);
1052 products->push_back(*j);
1056 precompoundProducts->clear();
1057 delete precompoundProducts;
1065 for(std::vector<G4KineticTrack *>::iterator i = secondaries->begin();
1066 i != secondaries->end(); ++i)
1069 for(std::vector<G4BCAction *>::iterator j =
theImR.begin();
1073 const std::vector<G4CollisionInitialState *> & aCandList
1075 for(
size_t count=0; count<aCandList.size(); count++)
1090 const std::vector<G4CollisionInitialState *> & aCandList
1092 for(
size_t count=0; count<aCandList.size(); count++)
1109 }
else if ( tout > 0 )
1122 #ifdef debug_BIC_FindCollision
1123 G4cout <<
"FindLateP Particle, 4-mom, times newState "
1126 <<
" times " << tin <<
" " << tout <<
" "
1130 const std::vector<G4CollisionInitialState *> & aCandList
1132 for(
size_t count=0; count<aCandList.size(); count++)
1134 #ifdef debug_BIC_FindCollision
1135 G4cout <<
" Adding a late Col : " << aCandList[count] <<
G4endl;
1148 #ifdef debug_BIC_ApplyCollision
1149 G4cerr <<
"G4BinaryCascade::ApplyCollision start"<<
G4endl;
1155 G4bool haveTarget=target_collection.size()>0;
1158 #ifdef debug_G4BinaryCascade
1159 G4cout <<
"G4BinaryCasacde::ApplyCollision(): StateError " << primary <<
G4endl;
1161 PrintKTVector(&target_collection,std::string(
"... targets"));
1181 G4int initialBaryon(0);
1182 G4int initialCharge(0);
1196 #ifdef debug_BIC_ApplyCollision
1203 G4bool lateParticleCollision= (!haveTarget) && products && products->size() == 1;
1204 G4bool decayCollision= (!haveTarget) && products && products->size() > 1;
1208 #ifdef debug_G4BinaryCascade
1209 G4int lateBaryon(0), lateCharge(0);
1212 if ( lateParticleCollision )
1216 #ifdef debug_G4BinaryCascade
1217 lateBaryon = initialBaryon;
1218 lateCharge = initialCharge;
1220 initialBaryon=initialCharge=0;
1227 if (!lateParticleCollision)
1231 #ifdef debug_BIC_ApplyCollision
1232 if (products)
G4cout <<
" ======Failed Pauli =====" <<
G4endl;
1233 G4cerr <<
"G4BinaryCascade::ApplyCollision blocked"<<
G4endl;
1247 #ifdef debug_BIC_ApplyCollision
1259 G4int finalBaryon(0);
1260 G4int finalCharge(0);
1262 for(std::vector<G4KineticTrack *>::iterator i =products->begin(); i != products->end(); i++)
1264 if ( ! lateParticleCollision )
1266 (*i)->SetState(primary->
GetState());
1268 finalBaryon+=(*i)->GetDefinition()->GetBaryonNumber();
1269 finalCharge+=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus);
1273 tin < 0 && tout > 0 )
1276 G4cout <<
"tin tout: " << tin <<
" " << tout <<
G4endl;
1288 else if ( tout > 0 )
1291 finalBaryon+=(*i)->GetDefinition()->GetBaryonNumber();
1292 finalCharge+=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus);
1297 toFinalState.push_back((*i));
1303 toFinalState.push_back((*i));
1308 if(!toFinalState.empty())
1311 toFinalState.begin(),toFinalState.end());
1312 std::vector<G4KineticTrack *>::iterator iter1, iter2;
1313 for(iter1 = toFinalState.begin(); iter1 != toFinalState.end();
1316 iter2 = std::find(products->begin(), products->end(),
1318 if ( iter2 != products->end() ) products->erase(iter2);
1324 currentA += finalBaryon-initialBaryon;
1325 currentZ += finalCharge-initialCharge;
1329 oldSecondaries.push_back(primary);
1332 #ifdef debug_G4BinaryCascade
1333 if ( (finalBaryon-initialBaryon-lateBaryon) != 0 || (finalCharge-initialCharge-lateCharge) != 0 )
1335 G4cout <<
"G4BinaryCascade: Error in Balancing: " <<
G4endl;
1336 G4cout <<
"initial/final baryon number, initial/final Charge "
1337 << initialBaryon <<
" "<< finalBaryon <<
" "
1338 << initialCharge <<
" "<< finalCharge <<
" "
1340 <<
", with number of products: "<< products->size() <<
G4endl;
1341 G4cout << G4endl<<
"Initial condition are these:"<<
G4endl;
1354 for(
size_t ii=0; ii< oldTarget.size(); ii++)
1356 oldTarget[ii]->Hit();
1377 std::vector<G4KineticTrack *>::iterator iter;
1387 absorbList.push_back(kt);
1392 if(absorbList.empty())
1396 for(iter = absorbList.begin(); iter != absorbList.end(); ++iter)
1400 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::Absorb(): Cannot absorb a particle.");
1403 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::Absorb(): Cannot absorb a particle.");
1417 "G4BinaryCascade::Absorb(): Cannot absorb a particle.");
1423 toRemove.push_back(kt);
1424 toDelete.push_back(kt);
1442 std::vector<G4KineticTrack *>::iterator i;
1447 G4int particlesAboveCut=0;
1448 G4int particlesBelowCut=0;
1467 ++particlesBelowCut;
1475 if (verbose)
G4cout <<
"Capture particlesAboveCut,particlesBelowCut, capturedEnergy,capturedEnergy/particlesBelowCut <? 0.2*theCutOnP "
1476 << particlesAboveCut <<
" " << particlesBelowCut <<
" " << capturedEnergy
1480 if(particlesBelowCut>0 && capturedEnergy/particlesBelowCut<0.2*
theCutOnP)
1491 captured.push_back(kt);
1512 fermiMom.
Init(A, Z);
1516 G4KineticTrackVector::iterator i;
1523 for(i = products->begin(); i != products->end(); ++i)
1525 definition = (*i)->GetDefinition();
1551 if(mom.e() < eFermi )
1560 #ifdef debug_BIC_CheckPauli
1563 for(i = products->begin(); i != products->end(); ++i)
1565 definition = (*i)->GetDefinition();
1574 if ( mom.e()-mom.mag()+field > 160*
MeV )
1576 G4cout <<
"momentum problem pFermi=" << pFermi
1577 <<
" mom, mom.m " << mom <<
" " << mom.mag()
1578 <<
" field " << field <<
G4endl;
1601 std::vector<G4KineticTrack *>::iterator i;
1611 #ifdef debug_BIC_StepParticlesOut
1612 G4cout <<
" minTimeStep, tStep Particle " <<minTimeStep <<
" " <<tStep
1618 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::StepParticlesOut() particle not in nucleus");
1621 if(intersect && tStep<minTimeStep && tStep> 0 )
1623 minTimeStep = tStep;
1627 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::StepParticlesOut() particle not in nucleus");
1638 G4cout <<
" NextCollision * , Time= " << nextCollision <<
" "
1639 <<timeToCollision<<
G4endl;
1641 if ( timeToCollision > minTimeStep )
1671 #ifdef debug_G4BinaryCascade
1672 G4cerr <<
"G4BinaryCascade.cc: Warning - aborting looping particle(s)" <<
G4endl;
1677 std::vector<G4KineticTrack *>::iterator iter;
1696 #ifdef debug_BIC_StepParticlesOut
1702 #ifdef debug_BIC_StepParticlesOut
1729 if ( std::abs(PDGcode) > 1000 && PDGcode != 2112 && PDGcode != 2212 )
1736 std::vector<G4KineticTrack *>::iterator titer;
1737 for ( titer=target_collection.begin() ; titer!=target_collection.end(); ++titer)
1755 for ( std::vector<G4KineticTrack *>::iterator i =products->begin(); i != products->end(); i++)
1757 G4int PDGcode=(*i)->GetDefinition()->GetPDGEncoding();
1760 if ( std::abs(PDGcode) > 1000 && PDGcode != 2112 && PDGcode != 2212 )
1762 resonances.push_back(*i);
1765 if ( resonances.size() > 0 )
1767 G4double delta_Fermi= (initial_Efermi-final_Efermi)/resonances.size();
1768 for (std::vector<G4KineticTrack *>::iterator res=resonances.begin(); res != resonances.end(); res++)
1772 G4double newEnergy=mom.e() + delta_Fermi;
1773 G4double newEnergy2= newEnergy*newEnergy;
1775 if ( newEnergy2 < mass2 )
1780 G4ThreeVector mom3=std::sqrt(newEnergy2 - mass2) * mom.vect().unit();
1796 #ifdef debug_BIC_CorrectFinalPandE
1802 G4KineticTrackVector::iterator i;
1804 if ( pNucleus.e() == 0 )
return;
1805 #ifdef debug_BIC_CorrectFinalPandE
1812 pFinals += (*i)->Get4Momentum();
1814 #ifdef debug_BIC_CorrectFinalPandE
1815 G4cout <<
"CorrectFinalPandE a final " << (*i)->GetDefinition()->GetParticleName()
1816 <<
" 4mom " << (*i)->Get4Momentum()<<
G4endl;
1819 #ifdef debug_BIC_CorrectFinalPandE
1820 G4cout <<
"CorrectFinalPandE pN pF: " <<pNucleus <<
" " <<pFinals <<
G4endl;
1826 #ifdef debug_BIC_CorrectFinalPandE
1827 G4cout <<
"CorrectFinalPandE pCM, CMS pCM " << pCM <<
" " <<toCMS*pCM<<
G4endl;
1828 G4cout <<
"CorrectFinal CMS pN pF " <<toCMS*pNucleus <<
" "
1831 <<
" massInNucleus m(nucleus) m(finals) std::sqrt(s): " <<
massInNucleus <<
" " <<pNucleus.mag()<<
" "
1832 << pFinals.mag() <<
" " << pCM.mag() <<
G4endl;
1840 if( s0-(m10+m20)*(m10+m20) < 0 )
1842 #ifdef debug_BIC_CorrectFinalPandE
1843 G4cout <<
"G4BinaryCascade::CorrectFinalPandE() : error! " <<
G4endl;
1845 G4cout <<
"not enough mass to correct: mass, A,Z, mass(nucl), mass(finals) "
1846 << std::sqrt(s0-(m10+m20)*(m10+m20)) <<
" "
1848 << m10 <<
" " << m20
1858 G4double pInCM = std::sqrt((s0-(m10+m20)*(m10+m20))*(s0-(m10-m20)*(m10-m20))/(4.*s0));
1859 #ifdef debug_BIC_CorrectFinalPandE
1860 G4cout <<
" CorrectFinalPandE pInCM new, CURRENT, ratio : " << pInCM
1861 <<
" " << (pFinals).vect().mag()<<
" " << pInCM/(pFinals).vect().mag() <<
G4endl;
1863 if ( pFinals.vect().mag() > pInCM )
1873 G4ThreeVector p3(factor*(toCMS*(*i)->Get4Momentum()).vect());
1874 G4LorentzVector p(p3,std::sqrt((*i)->Get4Momentum().mag2() + p3.mag2()));
1877 #ifdef debug_BIC_CorrectFinalPandE
1880 (*i)->Set4Momentum(p);
1882 #ifdef debug_BIC_CorrectFinalPandE
1885 <<
" CMS pFinals , mag, 3.mag : " << qFinals <<
" " << qFinals.mag() <<
" " << qFinals.vect().mag()<<
G4endl;
1886 G4cerr <<
" -CorrectFinalPandE 5 " << factor <<
G4endl;
1889 #ifdef debug_BIC_CorrectFinalPandE
1890 else {
G4cerr <<
" -CorrectFinalPandE 6 - no correction done" <<
G4endl; }
1902 std::vector<G4KineticTrack *>::iterator iter1, iter2;
1907 if(!oldSecondaries->empty())
1909 for(iter1 = oldSecondaries->begin(); iter1 != oldSecondaries->end();
1924 if(oldTarget->size()!=0)
1928 for(iter1 = oldTarget->begin(); iter1 != oldTarget->end(); ++iter1)
1940 if(!newSecondaries->empty())
1943 for(iter1 = newSecondaries->begin(); iter1 != newSecondaries->end();
1970 ktv(out), wanted_state(astate)
1974 if ( (kt)->GetState() == wanted_state ) ktv->push_back(kt);
1985 #ifdef debug_BIC_DoTimeStep
1988 G4cerr <<
"G4BinaryCascade::DoTimeStep: enter step="<< theTimeStep
1995 std::vector<G4KineticTrack *>::iterator iter;
2008 #ifdef debug_BIC_DoTimeStep
2021 #ifdef debug_BIC_DoTimeStep
2029 std::for_each( kt_outside->begin(),kt_outside->end(),
2036 std::for_each( kt_inside->begin(),kt_inside->end(),
2046 kt_gone_in->clear();
2047 std::for_each( kt_outside->begin(),kt_outside->end(),
2050 kt_gone_out->clear();
2051 std::for_each( kt_inside->begin(),kt_inside->end(),
2054 #ifdef debug_BIC_DoTimeStep
2055 PrintKTVector(fail,std::string(
" Failed to go in/out -> miss_nucleus/captured"));
2056 PrintKTVector(kt_gone_in, std::string(
"recreated kt_gone_in"));
2057 PrintKTVector(kt_gone_out, std::string(
"recreated kt_gone_out"));
2063 std::for_each( kt_outside->begin(),kt_outside->end(),
2066 std::for_each( kt_outside->begin(),kt_outside->end(),
2069 #ifdef debug_BIC_DoTimeStep
2070 PrintKTVector(kt_gone_out, std::string(
"append gone_outs to final state.. theFinalState"));
2074 kt_gone_out->begin(),kt_gone_out->end());
2086 if (kt_gone_out->size() )
2089 iter = std::find(kt_gone_out->begin(),kt_gone_out->end(),nextPrimary);
2090 if ( iter != kt_gone_out->end() )
2093 #ifdef debug_BIC_DoTimeStep
2094 G4cout <<
" DoTimeStep - WARNING: deleting current collision!" <<
G4endl;
2098 if ( kt_captured->size() )
2101 iter = std::find(kt_captured->begin(),kt_captured->end(),nextPrimary);
2102 if ( iter != kt_captured->end() )
2105 #ifdef debug_BIC_DoTimeStep
2106 G4cout <<
" DoTimeStep - WARNING: deleting current collision!" <<
G4endl;
2116 if ( kt_captured->size() )
2119 kt_captured->begin(),kt_captured->end());
2123 std::vector<G4KineticTrack *>::iterator i_captured;
2124 for(i_captured=kt_captured->begin();i_captured!=kt_captured->end();i_captured++)
2126 (*i_captured)->Hit();
2132 #ifdef debug_G4BinaryCascade
2142 <<
" sum(tgt,capt,active) "
2172 std::vector<G4KineticTrack *>::iterator iter;
2177 G4int secondaries_in(0);
2178 G4int secondaryBarions_in(0);
2179 G4int secondaryCharge_in(0);
2182 for ( iter =in->begin(); iter != in->end(); ++iter)
2185 secondaryCharge_in +=
G4lrint((*iter)->GetDefinition()->GetPDGCharge()/
eplus);
2186 if ((*iter)->GetDefinition()->GetBaryonNumber()!=0 )
2188 secondaryBarions_in += (*iter)->GetDefinition()->GetBaryonNumber();
2192 secondaryMass_in += (*iter)->GetDefinition()->GetPDGMass();
2208 G4double correction= secondaryMass_in + mass_initial - mass_final;
2209 if (secondaries_in>1)
2210 {correction /= secondaries_in;}
2212 #ifdef debug_BIC_CorrectBarionsOnBoundary
2213 G4cout <<
"CorrectBarionsOnBoundary,currentZ,currentA,"
2214 <<
"secondaryCharge_in,secondaryBarions_in,"
2215 <<
"energy correction,m_secondry,m_nucl_init,m_nucl_final "
2217 << secondaryCharge_in<<
" "<<secondaryBarions_in<<
" "
2218 << correction <<
" "
2219 << secondaryMass_in <<
" "
2220 << mass_initial <<
" "
2221 << mass_final <<
" "
2225 for ( iter = in->begin(); iter != in->end(); ++iter)
2227 if ((*iter)->GetTrackingMomentum().e()+correction > (*iter)->GetActualMass())
2229 (*iter)->UpdateTrackingMomentum((*iter)->GetTrackingMomentum().e() + correction);
2236 (*iter)->UpdateTrackingMomentum((*iter)->GetTrackingMomentum().e() + barrier);
2238 kt_fail->push_back(*iter);
2240 currentA -= (*iter)->GetDefinition()->GetBaryonNumber();
2245 #ifdef debug_BIC_CorrectBarionsOnBoundary
2246 G4cout <<
" CorrectBarionsOnBoundary, aft, Z, A, sec-Z,A,m,m_in_nucleus "
2248 << secondaryCharge_in <<
" " << secondaryBarions_in <<
" "
2249 << secondaryMass_in <<
" "
2258 G4int secondaries_out(0);
2259 G4int secondaryBarions_out(0);
2260 G4int secondaryCharge_out(0);
2263 for ( iter =out->begin(); iter != out->end(); ++iter)
2266 secondaryCharge_out +=
G4lrint((*iter)->GetDefinition()->GetPDGCharge()/
eplus);
2267 if ((*iter)->GetDefinition()->GetBaryonNumber() !=0 )
2269 secondaryBarions_out += (*iter)->GetDefinition()->GetBaryonNumber();
2273 secondaryMass_out += (*iter)->GetDefinition()->GetPDGMass();
2291 G4cerr <<
"G4BinaryCascade - secondaryBarions_out,secondaryCharge_out " <<
2292 secondaryBarions_out <<
" " << secondaryCharge_out <<
G4endl;
2297 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::CorrectBarionsOnBoundary() - fatal error");
2300 G4double correction= mass_initial - mass_final - secondaryMass_out;
2303 if (secondaries_out>1) correction /= secondaries_out;
2304 #ifdef debug_BIC_CorrectBarionsOnBoundary
2305 G4cout <<
"DoTimeStep,currentZ,currentA,"
2306 <<
"secondaries_out,"
2307 <<
"secondaryCharge_out,secondaryBarions_out,"
2308 <<
"energy correction,m_secondry,m_nucl_init,m_nucl_final "
2310 << secondaries_out <<
" "
2311 << secondaryCharge_out<<
" "<<secondaryBarions_out<<
" "
2312 << correction <<
" "
2313 << secondaryMass_out <<
" "
2314 << mass_initial <<
" "
2315 << mass_final <<
" "
2320 for ( iter = out->begin(); iter != out->end(); ++iter)
2322 if ((*iter)->GetTrackingMomentum().e()+correction > (*iter)->GetActualMass())
2324 (*iter)->UpdateTrackingMomentum((*iter)->GetTrackingMomentum().e() + correction);
2335 (*iter)->UpdateTrackingMomentum((*iter)->GetTrackingMomentum().e() - barrier);
2337 kt_fail->push_back(*iter);
2339 currentA += (*iter)->GetDefinition()->GetBaryonNumber();
2341 #ifdef debug_BIC_CorrectBarionsOnBoundary
2344 G4cout <<
"Not correcting outgoing " << *iter <<
" "
2345 << (*iter)->GetDefinition()->GetPDGEncoding() <<
" "
2346 << (*iter)->GetDefinition()->GetParticleName() <<
G4endl;
2347 PrintKTVector(out,std::string(
"outgoing, one not corrected"));
2353 #ifdef debug_BIC_CorrectBarionsOnBoundary
2355 G4cout <<
" DoTimeStep, nucl-update, A, Z, sec-Z,A,m,m_in_nucleus, table-mass, delta "
2357 << secondaryCharge_out <<
" "<< secondaryBarions_out <<
" "<<
2358 secondaryMass_out <<
" "
2376 #ifdef debug_BIC_FindFragments
2377 G4cout <<
"target, captured, secondary: "
2386 G4KineticTrackVector::iterator i;
2389 if(
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus) == 1 )
2395 G4int zCaptured = 0;
2399 CapturedMomentum += (*i)->Get4Momentum();
2400 if(
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus) == 1 )
2406 G4int z = zTarget+zCaptured;
2408 #ifdef debug_G4BinaryCascade
2411 G4cout <<
" FindFragment Counting error z a " << z <<
" " <<a <<
" "
2429 if ( z < 1 )
return 0;
2433 #ifdef debug_BIC_FindFragments
2434 G4cout <<
"Fragment: a= " << a <<
" z= " << z <<
" particles= " << excitons
2435 <<
" Charged= " << zCaptured <<
" holes= " << holes
2462 final4Momentum -= (*i)->Get4Momentum();
2463 finals += (*i)->Get4Momentum();
2466 if((final4Momentum.vect()/final4Momentum.e()).mag()>1.0 &&
currentA > 0)
2468 #ifdef debug_BIC_Final4Momentum
2470 G4cerr <<
"G4BinaryCascade::GetFinal4Momentum - Fatal"<<
G4endl;
2471 G4KineticTrackVector::iterator i;
2472 G4cerr <<
"Total initial 4-momentum " << theProjectile4Momentum <<
G4endl;
2476 G4cerr <<
" Final state: "<<(*i)->Get4Momentum()<<(*i)->GetDefinition()->GetParticleName()<<
G4endl;
2479 G4cerr<<
" Final4Momentum = "<<final4Momentum <<
" "<<final4Momentum.m()<<
G4endl;
2486 return final4Momentum;
2497 G4KineticTrackVector::iterator i;
2501 CapturedMomentum += (*i)->Get4Momentum();
2507 if ( NucleusMomentum.e() > 0 )
2511 G4ThreeVector boost= (NucleusMomentum.vect() -CapturedMomentum.vect())/NucleusMomentum.e();
2512 if(boost.mag2()>1.0)
2514 # ifdef debug_BIC_FinalNucleusMomentum
2515 G4cerr <<
"G4BinaryCascade::GetFinalNucleusMomentum - Fatal"<<
G4endl;
2517 G4cerr <<
"it 01"<<NucleusMomentum<<
" "<<CapturedMomentum<<
" "<<
G4endl;
2518 G4cout <<
" testing boost "<<boost<<
" "<<boost.mag()<<
G4endl;
2525 #ifdef debug_debug_BIC_FinalNucleusMomentum
2526 G4cout <<
"GetFinalNucleusMomentum be4 boostNucleusMomentum, CapturedMomentum"<<NucleusMomentum<<
" "<<CapturedMomentum<<
" "<<
G4endl;
2528 NucleusMomentum *= nucleusBoost;
2529 #ifdef debug_BIC_FinalNucleusMomentum
2530 G4cout <<
"GetFinalNucleusMomentum aft boost GetFinal4Momentum= " <<NucleusMomentum <<
G4endl;
2533 return NucleusMomentum;
2550 std::vector<G4KineticTrack *>::iterator iter, jter;
2555 while(!done && tryCount++ <200)
2563 #ifdef debug_H1_BinaryCascade
2566 for(
size_t ss=0; secs && ss<secs->size(); ss++)
2569 if((*secs)[ss]->GetDefinition()->IsShortLived()) done =
true;
2577 for(
size_t current=0; secs && current<secs->size(); current++)
2579 if((*secs)[current]->GetDefinition()->IsShortLived())
2583 for(jter=dec->begin(); jter != dec->end(); jter++)
2586 secs->push_back(*jter);
2589 delete (*secs)[current];
2601 #ifdef debug_H1_BinaryCascade
2610 products->push_back(aNew);
2611 #ifdef debug_H1_BinaryCascade
2616 G4cout <<
"final shortlived : ";
2619 G4cout <<
"final un stable : ";
2642 o1= mom.orthogonal();
2651 }
while (
sqr(x1) +
sqr(x2) > 1.);
2653 return G4ThreeVector(r*(x1*o1.unit() + x2*o2.unit() - 1.5* mom.unit()));
2677 std::vector<G4KineticTrack *>::iterator i;
2678 for(i = ktv->begin(); i != ktv->end(); ++i)
2687 std::vector<G4ReactionProduct *>::iterator i;
2688 for(i = rpv->begin(); i != rpv->end(); ++i)
2697 if (comment.size() > 0 )
G4cout <<
"G4BinaryCascade::PrintKTVector() " << comment <<
G4endl;
2699 G4cout <<
" vector: " << ktv <<
", number of tracks: " << ktv->size()
2701 std::vector<G4KineticTrack *>::iterator i;
2704 for(count = 0, i = ktv->begin(); i != ktv->end(); ++i, ++count)
2707 G4cout <<
" track n. " << count;
2711 G4cout <<
"G4BinaryCascade::PrintKTVector():No KineticTrackVector given " <<
G4endl;
2718 if (comment.size() > 0 )
G4cout <<
"G4BinaryCascade::PrintKTVector() "<< comment <<
G4endl;
2726 << 1/
fermi*pos <<
" R: " << 1/
fermi*pos.mag() <<
" 4mom: "
2727 << 1/
MeV*mom <<
"Tr_mom" << 1/
MeV*tmom <<
" P: " << 1/
MeV*mom.vect().mag()
2731 G4cout <<
"G4BinaryCascade::PrintKTVector(): No Kinetictrack given" <<
G4endl;
2741 if ( Z > 0 && A >= Z )
2745 }
else if ( A > 0 && Z>0 )
2750 }
else if ( A >= 0 && Z<=0 )
2755 }
else if ( A == 0 )
2762 G4cerr <<
"G4BinaryCascade::GetIonMass() - invalid (A,Z) = ("
2763 << A <<
"," << Z <<
")" <<
G4endl;
2764 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::GetIonMass() - giving up");
2774 std::vector<G4KineticTrack *>::iterator iter;
2780 aNew->
SetMomentum((*iter)->Get4Momentum().vect());
2782 Esecondaries +=(*iter)->Get4Momentum().e();
2785 products->push_back(aNew);
2792 aNew->
SetMomentum((*iter)->Get4Momentum().vect());
2794 Esecondaries +=(*iter)->Get4Momentum().e();
2797 products->push_back(aNew);
2808 if ( lates->size() == 1 ) {
2816 products->push_back(aNew);
2831 aNew->
SetMomentum((*iter)->Get4Momentum().vect());
2833 Esecondaries +=(*iter)->Get4Momentum().e();
2836 products->push_back(aNew);
2842 SumMassNucleons += (*iter)->GetDefinition()->GetPDGMass();
2859 G4double p=std::sqrt(
sqr(Ekinetic) + 2.*Ekinetic*mass);
2860 aNew->
SetMomentum(p*(*iter)->Get4Momentum().vect().unit());
2864 products->push_back(aNew);
2872 std::vector<G4KineticTrack *>::iterator iter;
2873 for(iter = secondaries->begin(); iter != secondaries->end(); ++iter)
2876 aNew->
SetMomentum((*iter)->Get4Momentum().vect());
2880 products->push_back(aNew);
2899 if (fragment != 0) {
2905 products->push_back(theNew);
2912 G4cout <<
"Thank you for using G4BinaryCascade. "<<
G4endl;
2922 for ( std::vector<G4KineticTrack *>::iterator i =products->begin(); i != products->end(); i++)
2924 G4int PDGcode=std::abs((*i)->GetDefinition()->GetPDGEncoding());
2925 if (std::abs(PDGcode)==211 || PDGcode==111 ) havePion=
true;
2928 if ( !products || havePion)
2931 <<
", with NO products! " <<
G4endl;
2932 G4cout << G4endl<<
"Initial condition are these:"<<
G4endl;
2950 static G4int lastdA(0), lastdZ(0);
2957 std::vector<G4KineticTrack *>::iterator i;
2958 G4int CapturedA(0), CapturedZ(0);
2959 G4int secsA(0), secsZ(0);
2961 CapturedA += (*i)->GetDefinition()->GetBaryonNumber();
2962 CapturedZ +=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus);
2967 secsA += (*i)->GetDefinition()->GetBaryonNumber();
2968 secsZ +=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus);
2973 fStateA += (*i)->GetDefinition()->GetBaryonNumber();
2974 fStateZ +=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/
eplus);
2980 #ifdef debugCheckChargeAndBaryonNumberverbose
2981 G4cout << where <<
" A: iState= "<< iStateA<<
", secs= "<< secsA<<
", fState= "<< fStateA<<
", current= "<<
currentA<<
", late= " <<lateA <<
G4endl;
2982 G4cout << where <<
" Z: iState= "<< iStateZ<<
", secs= "<< secsZ<<
", fState= "<< fStateZ<<
", current= "<<
currentZ<<
", late= " <<lateZ <<
G4endl;
2985 if (deltaA != 0 || deltaZ!=0 ) {
2986 if (deltaA != lastdA || deltaZ != lastdZ ) {
2987 G4cout <<
"baryon/charge imbalance - " << where << G4endl
2988 <<
"deltaA " <<deltaA<<
", iStateA "<<iStateA<<
", CapturedA "<<CapturedA <<
", secsA "<<secsA
2989 <<
", fStateA "<<fStateA <<
", currentA "<<
currentA <<
", lateA "<<lateA << G4endl
2990 <<
"deltaZ "<<deltaZ<<
", iStateZ "<<iStateZ<<
", CapturedZ "<<CapturedZ <<
", secsZ "<<secsZ
2991 <<
", fStateZ "<<fStateZ <<
", currentZ "<<
currentZ <<
", lateZ "<<lateZ << G4endl<<
G4endl;
2995 }
else { lastdA=lastdZ=0;}
3023 <<
" " << initial <<
G4endl;;
3026 for (
unsigned int it=0; it < ktv.size(); it++)
3039 <<
" " << initial <<
" Excit " << thisExcitation <<
G4endl;;
3044 G4int product_barions(0);
3047 for (
unsigned int it=0; it < products->size(); it++)
3059 <<
" " <<
final <<
G4endl;;
3068 finalA -= product_barions;
3073 <<
" delta-mass " << delta<<
G4endl;
3077 <<
" " <<
final <<
" "
3090 G4ReactionProductVector::iterator iter;
3098 for(iter = products->begin(); iter != products->end(); ++iter)
3108 Efinal += (*iter)->GetTotalEnergy();
3109 pFinal += (*iter)->GetMomentum();
3113 G4cout <<
"BIC E/p delta " <<
G4double GetWeightChange() const
G4bool DebugEpConservation(const G4HadProjectile &aTrack, G4ReactionProductVector *products)
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()
CascadeState GetState() 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 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
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
virtual G4KineticTrackVector * Scatter(const G4KineticTrack &trk1, const G4KineticTrack &trk2)
void PrintWelcomeMessage()
G4ReactionProductVector * DecayVoidNucleus()
G4Fragment * FindFragments()
G4LorentzVector GetFinal4Momentum()
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) const
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
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &theNucleus)
G4ParticleDefinition * GetDefinition() const
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)
G4ParticleDefinition * GetDefinition() const
virtual ~G4BinaryCascade()
G4ExcitationHandler * GetExcitationHandler() const
G4IonTable * GetIonTable() const
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
G4bool IsShortLived() const
void SetEnergyChange(G4double anEnergy)
virtual void ModelDescription(std::ostream &) const
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &thePrimary, G4Nucleus &theNucleus)=0
void Init(G4int anA, G4int aZ)
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
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)
G4BCAction * GetGenerator()
G4KineticTrackVector * GetProducts()
G4bool CheckChargeAndBaryonNumber(G4String where)
G4VPreCompoundModel * theDeExcitation
G4double GetField(G4int encoding, G4ThreeVector pos)
void SetMaxEnergy(const G4double anEnergy)
void SetDeExcitation(G4VPreCompoundModel *ptr)
G4HadFinalState theParticleChange
virtual G4double GetMass()=0
G4BCLateParticle * theLateParticle
G4ReactionProductVector * DeExcite()
virtual G4ParticleDefinition * GetDefinition() const
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)
static G4Deuteron * DeuteronDefinition()
static G4Alpha * AlphaDefinition()
static G4Neutron * NeutronDefinition()
void SetMomentumChange(const G4ThreeVector &aV)
G4KineticTrackVector theSecondaryList
G4ParticleDefinition * thePrimaryType
SelectFromKTV(G4KineticTrackVector *out, G4KineticTrack::CascadeState astate)
static const G4double pos
void AddSecondary(G4DynamicParticle *aP)
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 *)