101 #define _CheckChargeAndBaryonNumber_(val) CheckChargeAndBaryonNumber(val)
104 #define _CheckChargeAndBaryonNumber_(val)
108 #define _DebugEpConservation(val) DebugEpConservation(val)
111 #define _DebugEpConservation(val)
114G4int G4BinaryCascade::theBIC_ID = -1;
128 theImR.push_back(theDecay);
131 theImR.push_back(aAb);
134 theImR.push_back(aSc);
140 theCutOnPAbsorb= 0*MeV;
154 thePrimaryEscape =
true;
163 projectileA=projectileZ=0;
164 currentInitialEnergy=initial_nuclear_mass=0.;
172 ClearAndDestroy(&theTargetList);
173 ClearAndDestroy(&theSecondaryList);
174 ClearAndDestroy(&theCapturedList);
175 delete thePropagator;
176 delete theCollisionMgr;
177 for(
auto & ptr : theImR) {
delete ptr; }
179 delete theLateParticle;
180 delete theH1Scatterer;
185 outFile <<
"G4BinaryCascade is an intra-nuclear cascade model in which\n"
186 <<
"an incident hadron collides with a nucleon, forming two\n"
187 <<
"final-state particles, one or both of which may be resonances.\n"
188 <<
"The resonances then decay hadronically and the decay products\n"
189 <<
"are then propagated through the nuclear potential along curved\n"
190 <<
"trajectories until they re-interact or leave the nucleus.\n"
191 <<
"This model is valid for incident pions up to 1.5 GeV and\n"
192 <<
"nucleons up to 10 GeV.\n"
193 <<
"The remaining excited nucleus is handed on to ";
199 else if (theExcitationHandler)
201 outFile <<
"G4ExcitationHandler";
206 outFile <<
"void.\n";
212 outFile <<
"G4BinaryCascade propagtes secondaries produced by a high\n"
213 <<
"energy model through the wounded nucleus.\n"
214 <<
"Secondaries are followed after the formation time and if\n"
215 <<
"within the nucleus are propagated through the nuclear\n"
216 <<
"potential along curved trajectories until they interact\n"
217 <<
"with a nucleon, decay, or leave the nucleus.\n"
218 <<
"An interaction of a secondary with a nucleon produces two\n"
219 <<
"final-state particles, one or both of which may be resonances.\n"
220 <<
"Resonances decay hadronically and the decay products\n"
221 <<
"are in turn propagated through the nuclear potential along curved\n"
222 <<
"trajectories until they re-interact or leave the nucleus.\n"
223 <<
"This model is valid for pions up to 1.5 GeV and\n"
224 <<
"nucleons up to about 3.5 GeV.\n"
225 <<
"The remaining excited nucleus is handed on to ";
231 else if (theExcitationHandler)
233 outFile <<
"G4ExcitationHandler";
238 outFile <<
"void.\n";
255 if(std::getenv(
"BCDEBUG") )
G4cerr <<
" ######### Binary Cascade Reaction starts ######### "<<
G4endl;
260 if(initial4Momentum.
e()-initial4Momentum.
m()<theBCminP &&
274 if(!std::getenv(
"I_Am_G4BinaryCascade_Developer") )
282 G4cerr <<
"G4BinaryCascade should not be used for projectiles other than nucleons or pions."<<
G4endl;
283 G4cerr <<
"If you want to continue, please switch on the developer environment: "<<
G4endl;
285 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade - used for unvalid particle type - Fatal");
290 thePrimaryType = definition;
291 thePrimaryEscape =
false;
297 G4int interactionCounter = 0,collisionLoopMaxCount;
305 ClearAndDestroy(products);
314 collisionLoopMaxCount = 200;
319 initialPosition=GetSpherePoint(1.1*radius, initial4Momentum);
320 kt =
new G4KineticTrack(definition, 0., initialPosition, initial4Momentum);
324 secondaries->push_back(kt);
332 }
while(! products && --collisionLoopMaxCount>0);
334 if(++interactionCounter>99)
break;
336 }
while(products && products->size() == 0);
338 if(products && products->size()>0)
344 G4ReactionProductVector::iterator iter;
346 for(iter = products->begin(); iter != products->end(); ++iter)
350 (*iter)->GetTotalEnergy(),
351 (*iter)->GetMomentum());
353 G4double time=(*iter)->GetFormationTime();
354 if(time < 0.0) { time = 0.0; }
355 aNew.
SetTime(timePrimary + time);
366 if(std::getenv(
"BCDEBUG") )
G4cerr <<
" ######### Binary Cascade Reaction void, return initial state ######### "<<
G4endl;
374 ClearAndDestroy(products);
381 if(std::getenv(
"BCDEBUG") )
G4cerr <<
" ######### Binary Cascade Reaction ends ######### "<<
G4endl;
390 G4ping debug(
"debug_G4BinaryCascade");
391#ifdef debug_BIC_Propagate
392 G4cout <<
"G4BinaryCascade Propagate starting -------------------------------------------------------" <<
G4endl;
402 ClearAndDestroy(&theCapturedList);
403 ClearAndDestroy(&theSecondaryList);
404 theSecondaryList.clear();
405 ClearAndDestroy(&theFinalState);
406 std::vector<G4KineticTrack *>::iterator iter;
417#ifdef debug_BIC_GetExcitationEnergy
418 G4cout <<
"ExcitationEnergy0 " << GetExcitationEnergy() <<
G4endl;
423 G4bool success = BuildLateParticleCollisions(secondaries);
426 products=HighEnergyModelFSProducts(products, secondaries);
427 ClearAndDestroy(secondaries);
430#ifdef debug_G4BinaryCascade
431 G4cout <<
"G4BinaryCascade::Propagate: warning - high energy model failed energy conservation, returning unchanged high energy final state" <<
G4endl;
442 FindCollisions(&theSecondaryList);
445 if(theCollisionMgr->
Entries() == 0 )
449#ifdef debug_BIC_return
459 G4bool haveProducts =
false;
460#ifdef debug_BIC_Propagate_Collisions
461 G4int collisionCount=0;
463 G4int collisionLoopMaxCount=1000000;
464 while(theCollisionMgr->
Entries() > 0 && currentZ && --collisionLoopMaxCount>0)
475 if(theCollisionMgr->
Entries() > 0)
479#ifdef debug_BIC_Propagate_Collisions
480 G4cout <<
" NextCollision * , Time, curtime = " << nextCollision <<
" "
496 if (ApplyCollision(nextCollision))
500#ifdef debug_BIC_Propagate_Collisions
515 for(iter = theTargetList.begin(); iter != theTargetList.end(); ++iter)
519 if ( ! theTargetList.size() || ! nProtons ){
521 products = FillVoidNucleusProducts(products);
522#ifdef debug_BIC_return
523 G4cout <<
"return @ Z=0 after collision loop "<<
G4endl;
524 PrintKTVector(&theSecondaryList,std::string(
" theSecondaryList"));
525 G4cout <<
"theTargetList size: " << theTargetList.size() <<
G4endl;
526 PrintKTVector(&theTargetList,std::string(
" theTargetList"));
527 PrintKTVector(&theCapturedList,std::string(
" theCapturedList"));
529 G4cout <<
" ExcitE be4 Correct : " <<GetExcitationEnergy() <<
G4endl;
530 G4cout <<
" Mom Transfered to nucleus : " << theMomentumTransfer <<
" " << theMomentumTransfer.
mag() <<
G4endl;
531 PrintKTVector(&theFinalState,std::string(
" FinalState uncorrected"));
532 G4cout <<
"returned products: " << products->size() <<
G4endl;
553#ifdef debug_BIC_return
560#ifdef debug_BIC_Propagate
561 G4cout <<
" Momentum transfer to Nucleus " << theMomentumTransfer <<
" " << theMomentumTransfer.
mag() <<
G4endl;
569 if ( theSecondaryList.size() > 0 )
571#ifdef debug_G4BinaryCascade
572 G4cerr <<
"G4BinaryCascade: Warning, have active particles at end" <<
G4endl;
573 PrintKTVector(&theSecondaryList,
"active particles @ end added to theFinalState");
576 for ( iter =theSecondaryList.begin(); iter != theSecondaryList.end(); ++iter)
578 theFinalState.push_back(*iter);
580 theSecondaryList.clear();
583 while ( theCollisionMgr->
Entries() > 0 )
585#ifdef debug_G4BinaryCascade
586 G4cerr <<
" Warning: remove left over collision(s) " <<
G4endl;
591#ifdef debug_BIC_Propagate_Excitation
593 PrintKTVector(&theSecondaryList,std::string(
" theSecondaryList"));
594 G4cout <<
"theTargetList size: " << theTargetList.size() <<
G4endl;
596 PrintKTVector(&theCapturedList,std::string(
" theCapturedList"));
598 G4cout <<
" ExcitE be4 Correct : " <<GetExcitationEnergy() <<
G4endl;
599 G4cout <<
" Mom Transfered to nucleus : " << theMomentumTransfer <<
" " << theMomentumTransfer.
mag() <<
G4endl;
600 PrintKTVector(&theFinalState,std::string(
" FinalState uncorrected"));
606 G4double ExcitationEnergy=GetExcitationEnergy();
608#ifdef debug_BIC_Propagate_finals
609 PrintKTVector(&theFinalState,std::string(
" FinalState be4 corr"));
610 G4cout <<
" Excitation Energy prefinal, #collisions:, out, captured "
611 << ExcitationEnergy <<
" "
612 << collisionCount <<
" "
613 << theFinalState.size() <<
" "
614 << theCapturedList.size()<<
G4endl;
617 if (ExcitationEnergy < 0 )
619 G4int maxtry=5, ntry=0;
622 ExcitationEnergy=GetExcitationEnergy();
623 }
while ( ++ntry < maxtry && ExcitationEnergy < 0 );
627#ifdef debug_BIC_Propagate_finals
628 PrintKTVector(&theFinalState,std::string(
" FinalState corrected"));
629 G4cout <<
" Excitation Energy final, #collisions:, out, captured "
630 << ExcitationEnergy <<
" "
631 << collisionCount <<
" "
632 << theFinalState.size() <<
" "
633 << theCapturedList.size()<<
G4endl;
637 if ( ExcitationEnergy < 0. )
639 #ifdef debug_G4BinaryCascade
640 G4cerr <<
"G4BinaryCascade-Warning: negative excitation energy ";
642 PrintKTVector(&theFinalState,std::string(
"FinalState"));
643 PrintKTVector(&theCapturedList,std::string(
"captured"));
644 G4cout <<
"negative ExE:Final 4Momentum .mag: " << GetFinal4Momentum()
645 <<
" "<< GetFinal4Momentum().
mag()<<
G4endl
646 <<
"negative ExE:FinalNucleusMom .mag: " << GetFinalNucleusMomentum()
647 <<
" "<< GetFinalNucleusMomentum().
mag()<<
G4endl;
649 #ifdef debug_BIC_return
650 G4cout <<
" negative Excitation E return empty products " << products <<
G4endl;
654 ClearAndDestroy(products);
664 products= ProductsAddFinalState(products, theFinalState);
666 products= ProductsAddPrecompound(products, precompoundProducts);
671 thePrimaryEscape =
true;
673 #ifdef debug_BIC_return
682G4double G4BinaryCascade::GetExcitationEnergy()
687#if defined(debug_G4BinaryCascade) || defined(debug_BIC_GetExcitationEnergy)
688 G4int finalA = theTargetList.size()+theCapturedList.size();
689 G4int finalZ = GetTotalCharge(theTargetList)+GetTotalCharge(theCapturedList);
690 if ( (currentA - finalA) != 0 || (currentZ - finalZ) != 0 )
692 G4cerr <<
"G4BIC:GetExcitationEnergy(): Nucleon counting error current/final{A,Z} "
693 <<
"("<< currentA <<
"," << finalA <<
") ("<< currentZ <<
"," << finalZ <<
")" <<
G4endl;
702 nucleusMass = GetIonMass(currentZ,currentA);
704 else if (currentZ==0 )
707 else {nucleusMass = GetFinalNucleusMomentum().
mag() - 3.*MeV*currentA;}
711#ifdef debug_G4BinaryCascade
712 G4cout <<
"G4BinaryCascade::GetExcitationEnergy(): Warning - invalid nucleus (A,Z)=("
713 << currentA <<
"," << currentZ <<
")" <<
G4endl;
718#ifdef debug_BIC_GetExcitationEnergy
719 G4ping debug(
"debug_ExcitationEnergy");
720 debug.push_back(
"====> current A, Z");
721 debug.push_back(currentZ);
722 debug.push_back(currentA);
723 debug.push_back(
"====> final A, Z");
724 debug.push_back(finalZ);
725 debug.push_back(finalA);
726 debug.push_back(nucleusMass);
727 debug.push_back(GetFinalNucleusMomentum().mag());
733 excitationE = GetFinalNucleusMomentum().
mag() - nucleusMass;
739#ifdef debug_BIC_GetExcitationEnergy
741 if ( excitationE < 0 )
743 G4cout <<
"negative ExE final Ion mass " <<nucleusMass<<
G4endl;
745 if(finalZ>.5)
G4cout <<
" Final nuclmom/mass " << Nucl_mom <<
" " << Nucl_mom.
mag()
746 <<
" (A,Z)=("<< finalA <<
","<<finalZ <<
")"
747 <<
" mass " << nucleusMass <<
" "
748 <<
" excitE " << excitationE <<
G4endl;
756 initialExc = theInitial4Mom.
mag()- GetIonMass(
Z,
A);
757 G4cout <<
"GetExcitationEnergy: Initial nucleus A Z " <<
A <<
" " <<
Z <<
" " << initialExc <<
G4endl;
774void G4BinaryCascade::BuildTargetList()
785 ClearAndDestroy(&theTargetList);
794 initial_nuclear_mass=GetIonMass(initialZ,initialA);
803 definition =
nucleon->GetDefinition();
813 theTargetList.push_back(kt);
818#ifdef debug_BIC_BuildTargetList
825 massInNucleus = GetIonMass(currentZ,currentA);
826 }
else if (currentZ==0 && currentA>=1 )
831 G4cerr <<
"G4BinaryCascade::BuildTargetList(): Fatal Error - invalid nucleus (A,Z)=("
832 << currentA <<
"," << currentZ <<
")" <<
G4endl;
835 currentInitialEnergy= theInitial4Mom.
e() + theProjectile4Momentum.
e();
837#ifdef debug_BIC_BuildTargetList
838 G4cout <<
"G4BinaryCascade::BuildTargetList(): nucleus (A,Z)=("
839 << currentA <<
"," << currentZ <<
") mass: " << massInNucleus <<
840 ", theInitial4Mom " << theInitial4Mom <<
841 ", currentInitialEnergy " << currentInitialEnergy <<
G4endl;
851 std::vector<G4KineticTrack *>::iterator iter;
854 projectileA=projectileZ=0;
857 for(iter = secondaries->begin(); iter != secondaries->end(); ++iter)
859 if((*iter)->GetFormationTime() < StartingTime)
860 StartingTime = (*iter)->GetFormationTime();
865 for(iter = secondaries->begin(); iter != secondaries->end(); ++iter)
869 G4double FormTime = (*iter)->GetFormationTime() - StartingTime;
870 (*iter)->SetFormationTime(FormTime);
873 FindLateParticleCollision(*iter);
874 lateParticles4Momentum += (*iter)->GetTrackingMomentum();
875 lateA += (*iter)->GetDefinition()->GetBaryonNumber();
876 lateZ +=
G4lrint((*iter)->GetDefinition()->GetPDGCharge()/eplus);
880 theSecondaryList.push_back(*iter);
882 theProjectile4Momentum += (*iter)->GetTrackingMomentum();
883 projectileA += (*iter)->GetDefinition()->GetBaryonNumber();
884 projectileZ +=
G4lrint((*iter)->GetDefinition()->GetPDGCharge()/eplus);
885#ifdef debug_BIC_Propagate
886 G4cout <<
" Adding initial secondary " << *iter
887 <<
" time" << (*iter)->GetFormationTime()
888 <<
", state " << (*iter)->GetState() <<
G4endl;
897 theProjectile4Momentum += mom;
901 G4double excitation= theProjectile4Momentum.
e() + initial_nuclear_mass - lateParticles4Momentum.e() - massInNucleus;
902#ifdef debug_BIC_GetExcitationEnergy
903 G4cout <<
"BIC: Proj.e, nucl initial, nucl final, lateParticles"
904 << theProjectile4Momentum <<
", "
905 << initial_nuclear_mass<<
", " << massInNucleus <<
", "
906 << lateParticles4Momentum <<
G4endl;
907 G4cout <<
"BIC: Proj.e / initial excitation: " << theProjectile4Momentum.
e() <<
" / " << excitation <<
G4endl;
909 success = excitation > 0;
910#ifdef debug_G4BinaryCascade
912 G4cout <<
"G4BinaryCascade::BuildLateParticleCollisions(): Proj.e / initial excitation: " << theProjectile4Momentum.
e() <<
" / " << excitation <<
G4endl;
922 secondaries->clear();
939 fragment = FindFragments();
951 else if (theExcitationHandler)
953 precompoundProducts=theExcitationHandler->
BreakItUp(*fragment);
958 if (theTargetList.size() + theCapturedList.size() > 1 ) {
962 std::vector<G4KineticTrack *>::iterator i;
963 if ( theTargetList.size() == 1 ) {i=theTargetList.begin();}
964 if ( theCapturedList.size() == 1 ) {i=theCapturedList.begin();}
972 precompoundProducts->push_back(aNew);
980 precompoundProducts = DecayVoidNucleus();
982 #ifdef debug_BIC_DeexcitationProducts
986 if ( precompoundProducts )
988 std::vector<G4ReactionProduct *>::iterator j;
989 for(j = precompoundProducts->begin(); j != precompoundProducts->end(); ++j)
992 Preco_momentum += pProduct;
995 G4cout <<
"finalNuclMom / sum preco products" << fragment_momentum <<
" / " << Preco_momentum
996 <<
" delta E "<< fragment_momentum.
e() - Preco_momentum.
e() <<
G4endl;
1000 return precompoundProducts;
1008 if ( (theTargetList.size()+theCapturedList.size()) > 0 )
1011 std::vector<G4KineticTrack *>::iterator aNuc;
1013 std::vector<G4double> masses;
1016 if ( theTargetList.size() != 0)
1018 for ( aNuc=theTargetList.begin(); aNuc != theTargetList.end(); aNuc++)
1020 G4double mass=(*aNuc)->GetDefinition()->GetPDGMass();
1021 masses.push_back(mass);
1026 if ( theCapturedList.size() != 0)
1028 for(aNuc = theCapturedList.begin(); aNuc != theCapturedList.end(); aNuc++)
1030 G4double mass=(*aNuc)->GetDefinition()->GetPDGMass();
1031 masses.push_back(mass);
1042 if ( eCMS < sumMass )
1044 eCMS=sumMass + 2*MeV*masses.size();
1049 std::vector<G4LorentzVector*> * momenta=
decay.Decay(eCMS,masses);
1050 std::vector<G4LorentzVector*>::iterator aMom=momenta->begin();
1053 if ( theTargetList.size() != 0)
1055 for ( aNuc=theTargetList.begin();
1056 (aNuc != theTargetList.end()) && (aMom!=momenta->end());
1065 result->push_back(aNew);
1070 if ( theCapturedList.size() != 0)
1072 for ( aNuc=theCapturedList.begin();
1073 (aNuc != theCapturedList.end()) && (aMom!=momenta->end());
1082 result->push_back(aNew);
1098#ifdef debug_BIC_Propagate_finals
1101 for(i = 0; i< fs.size(); i++)
1111 products->push_back(aNew);
1113#ifdef debug_BIC_Propagate_finals
1123#ifdef debug_BIC_Propagate_finals
1124 G4cout <<
" Final state momentum " << mom_fs <<
G4endl;
1135 if ( precompoundProducts )
1137 std::vector<G4ReactionProduct *>::iterator j;
1138 for(j = precompoundProducts->begin(); j != precompoundProducts->end(); ++j)
1143#ifdef debug_BIC_Propagate_finals
1144 G4cout <<
"BIC: pProduct be4 boost " <<pProduct <<
G4endl;
1146 pProduct *= precompoundLorentzboost;
1147#ifdef debug_BIC_Propagate_finals
1148 G4cout <<
"BIC: pProduct aft boost " <<pProduct <<
G4endl;
1150 pSumPreco += pProduct;
1151 (*j)->SetTotalEnergy(pProduct.e());
1152 (*j)->SetMomentum(pProduct.vect());
1153 (*j)->SetNewlyAdded(
true);
1154 products->push_back(*j);
1158 precompoundProducts->clear();
1159 delete precompoundProducts;
1167 for(std::vector<G4KineticTrack *>::iterator i = secondaries->begin();
1168 i != secondaries->end(); ++i)
1170 for(std::vector<G4BCAction *>::iterator j = theImR.begin();
1171 j!=theImR.end(); j++)
1174 const std::vector<G4CollisionInitialState *> & aCandList
1175 = (*j)->GetCollisions(*i, theTargetList, theCurrentTime);
1176 for(
size_t count=0; count<aCandList.size(); count++)
1188void G4BinaryCascade::FindDecayCollision(
G4KineticTrack * secondary)
1191 const std::vector<G4CollisionInitialState *> & aCandList
1192 = theDecay->
GetCollisions(secondary, theTargetList, theCurrentTime);
1193 for(
size_t count=0; count<aCandList.size(); count++)
1200void G4BinaryCascade::FindLateParticleCollision(
G4KineticTrack * secondary)
1205 if (((
G4RKPropagation*)thePropagator)->GetSphereIntersectionTimes(secondary,tin,tout))
1210 }
else if ( tout > 0 )
1223#ifdef debug_BIC_FindCollision
1224 G4cout <<
"FindLateP Particle, 4-mom, times newState "
1227 <<
" times " << tin <<
" " << tout <<
" "
1231 const std::vector<G4CollisionInitialState *> & aCandList
1232 = theLateParticle->
GetCollisions(secondary, theTargetList, theCurrentTime);
1233 for(
size_t count=0; count<aCandList.size(); count++)
1235#ifdef debug_BIC_FindCollision
1236 G4cout <<
" Adding a late Col : " << aCandList[count] <<
G4endl;
1249#ifdef debug_BIC_ApplyCollision
1250 G4cerr <<
"G4BinaryCascade::ApplyCollision start"<<
G4endl;
1251 theCollisionMgr->
Print();
1256 G4bool haveTarget=target_collection.size()>0;
1259#ifdef debug_G4BinaryCascade
1260 G4cout <<
"G4BinaryCasacde::ApplyCollision(): StateError " << primary <<
G4endl;
1261 PrintKTVector(primary,std::string(
"primay- ..."));
1262 PrintKTVector(&target_collection,std::string(
"... targets"));
1265 theCollisionMgr->
Print();
1282 G4int initialBaryon(0);
1283 G4int initialCharge(0);
1291 G4double initial_Efermi=CorrectShortlivedPrimaryForFermi(primary,target_collection);
1297#ifdef debug_BIC_ApplyCollision
1298 DebugApplyCollisionFail(collision, products);
1304 G4bool lateParticleCollision= (!haveTarget) && products && products->size() == 1;
1305 G4bool decayCollision= (!haveTarget) && products && products->size() > 1;
1309#ifdef debug_G4BinaryCascade
1310 G4int lateBaryon(0), lateCharge(0);
1313 if ( lateParticleCollision )
1317#ifdef debug_G4BinaryCascade
1318 lateBaryon = initialBaryon;
1319 lateCharge = initialCharge;
1321 initialBaryon=initialCharge=0;
1328 if (!lateParticleCollision)
1330 if( !products || products->size()==0 || !CheckPauliPrinciple(products) )
1332#ifdef debug_BIC_ApplyCollision
1333 if (products)
G4cout <<
" ======Failed Pauli =====" <<
G4endl;
1334 G4cerr <<
"G4BinaryCascade::ApplyCollision blocked"<<
G4endl;
1342 if (! CorrectShortlivedFinalsForFermi(products, initial_Efermi)){
1348#ifdef debug_BIC_ApplyCollision
1349 DebugApplyCollision(collision, products);
1353 if (products) ClearAndDestroy(products);
1354 if ( decayCollision ) FindDecayCollision(primary);
1360 G4int finalBaryon(0);
1361 G4int finalCharge(0);
1363 for(std::vector<G4KineticTrack *>::iterator i =products->begin(); i != products->end(); i++)
1365 if ( ! lateParticleCollision )
1367 (*i)->SetState(primary->
GetState());
1369 finalBaryon+=(*i)->GetDefinition()->GetBaryonNumber();
1370 finalCharge+=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/eplus);
1373 if (((
G4RKPropagation*)thePropagator)->GetSphereIntersectionTimes((*i),tin,tout) &&
1374 tin < 0 && tout > 0 )
1376 PrintKTVector((*i),
"particle inside marked not-inside");
1377 G4cout <<
"tin tout: " << tin <<
" " << tout <<
G4endl;
1382 if (((
G4RKPropagation*)thePropagator)->GetSphereIntersectionTimes((*i),tin,tout))
1389 else if ( tout > 0 )
1392 finalBaryon+=(*i)->GetDefinition()->GetBaryonNumber();
1393 finalCharge+=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/eplus);
1398 toFinalState.push_back((*i));
1404 toFinalState.push_back((*i));
1409 if(!toFinalState.empty())
1411 theFinalState.insert(theFinalState.end(),
1412 toFinalState.begin(),toFinalState.end());
1413 std::vector<G4KineticTrack *>::iterator iter1, iter2;
1414 for(iter1 = toFinalState.begin(); iter1 != toFinalState.end();
1417 iter2 = std::find(products->begin(), products->end(),
1419 if ( iter2 != products->end() ) products->erase(iter2);
1425 currentA += finalBaryon-initialBaryon;
1426 currentZ += finalCharge-initialCharge;
1430 oldSecondaries.push_back(primary);
1433#ifdef debug_G4BinaryCascade
1434 if ( (finalBaryon-initialBaryon-lateBaryon) != 0 || (finalCharge-initialCharge-lateCharge) != 0 )
1436 G4cout <<
"G4BinaryCascade: Error in Balancing: " <<
G4endl;
1437 G4cout <<
"initial/final baryon number, initial/final Charge "
1438 << initialBaryon <<
" "<< finalBaryon <<
" "
1439 << initialCharge <<
" "<< finalCharge <<
" "
1441 <<
", with number of products: "<< products->size() <<
G4endl;
1455 for(
size_t ii=0; ii< oldTarget.size(); ii++)
1457 oldTarget[ii]->Hit();
1460 UpdateTracksAndCollisions(&oldSecondaries, &oldTarget, products);
1470G4bool G4BinaryCascade::Absorb()
1478 std::vector<G4KineticTrack *>::iterator iter;
1480 for(iter = theSecondaryList.begin();
1481 iter != theSecondaryList.end(); ++iter)
1486 if(absorber.WillBeAbsorbed(*kt))
1488 absorbList.push_back(kt);
1493 if(absorbList.empty())
1497 for(iter = absorbList.begin(); iter != absorbList.end(); ++iter)
1500 if(!absorber.FindAbsorbers(*kt, theTargetList))
1501 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::Absorb(): Cannot absorb a particle.");
1503 if(!absorber.FindProducts(*kt))
1504 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::Absorb(): Cannot absorb a particle.");
1507 G4int maxLoopCount = 1000;
1508 while(!CheckPauliPrinciple(products) && --maxLoopCount>0)
1510 ClearAndDestroy(products);
1511 if(!absorber.FindProducts(*kt))
1513 "G4BinaryCascade::Absorb(): Cannot absorb a particle.");
1515 if ( --maxLoopCount < 0 )
throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::Absorb(): Cannot absorb a particle.");
1520 toRemove.push_back(kt);
1521 toDelete.push_back(kt);
1523 UpdateTracksAndCollisions(&toRemove, absorbers, products);
1524 ClearAndDestroy(absorbers);
1526 ClearAndDestroy(&toDelete);
1539 std::vector<G4KineticTrack *>::iterator i;
1544 G4int particlesAboveCut=0;
1545 G4int particlesBelowCut=0;
1546 if ( verbose )
G4cout <<
" Capture: secondaries " << theSecondaryList.size() <<
G4endl;
1547 for(i = theSecondaryList.begin(); i != theSecondaryList.end(); ++i)
1564 ++particlesBelowCut;
1572 if (verbose)
G4cout <<
"Capture particlesAboveCut,particlesBelowCut, capturedEnergy,capturedEnergy/particlesBelowCut <? 0.2*theCutOnP "
1573 << particlesAboveCut <<
" " << particlesBelowCut <<
" " << capturedEnergy
1577 if(particlesBelowCut>0 && capturedEnergy/particlesBelowCut<0.2*theCutOnP)
1580 for(i = theSecondaryList.begin(); i != theSecondaryList.end(); ++i)
1588 captured.push_back(kt);
1590 theCapturedList.push_back(kt);
1594 UpdateTracksAndCollisions(&captured, NULL, NULL);
1613 G4KineticTrackVector::iterator i;
1620 for(i = products->begin(); i != products->end(); ++i)
1622 definition = (*i)->GetDefinition();
1648 if(mom.
e() < eFermi )
1657#ifdef debug_BIC_CheckPauli
1660 for(i = products->begin(); i != products->end(); ++i)
1662 definition = (*i)->GetDefinition();
1671 if ( mom.
e()-mom.
mag()+field > 160*MeV )
1673 G4cout <<
"momentum problem pFermi=" << pFermi
1674 <<
" mom, mom.m " << mom <<
" " << mom.
mag()
1675 <<
" field " << field <<
G4endl;
1686void G4BinaryCascade::StepParticlesOut()
1693 while( theSecondaryList.size() > 0 )
1698 std::vector<G4KineticTrack *>::iterator i;
1699 for(i = theSecondaryList.begin(); i != theSecondaryList.end(); ++i)
1706 ((
G4RKPropagation*)thePropagator)->GetSphereIntersectionTimes(kt,tdummy,tStep);
1707#ifdef debug_BIC_StepParticlesOut
1708 G4cout <<
" minTimeStep, tStep Particle " <<minTimeStep <<
" " <<tStep
1713 PrintKTVector(&theSecondaryList, std::string(
" state ERROR....."));
1714 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::StepParticlesOut() particle not in nucleus");
1717 if(intersect && tStep<minTimeStep && tStep> 0 )
1719 minTimeStep = tStep;
1722 PrintKTVector(&theSecondaryList, std::string(
" state ERROR....."));
1723 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::StepParticlesOut() particle not in nucleus");
1729 if(theCollisionMgr->
Entries() > 0)
1735 if ( timeToCollision > minTimeStep )
1737 DoTimeStep(minTimeStep);
1741 if (!DoTimeStep(timeToCollision) )
1753 if ( ApplyCollision(nextCollision))
1765#ifdef debug_G4BinaryCascade
1766 G4cerr <<
"G4BinaryCascade.cc: Warning - aborting looping particle(s)" <<
G4endl;
1767 PrintKTVector(&theSecondaryList,
" looping particles added to theFinalState");
1771 std::vector<G4KineticTrack *>::iterator iter;
1772 for ( iter =theSecondaryList.begin(); iter != theSecondaryList.end(); ++iter)
1774 theFinalState.push_back(*iter);
1776 theSecondaryList.clear();
1790#ifdef debug_BIC_StepParticlesOut
1794 if ( counter > 100 && theCollisionMgr->
Entries() == 0)
1796#ifdef debug_BIC_StepParticlesOut
1797 PrintKTVector(&theSecondaryList,std::string(
"stepping 100 steps"));
1799 FindCollisions(&theSecondaryList);
1807 #ifdef debug_BIC_return
1808 G4cout <<
"return @ Z=0 after collision loop "<<
G4endl;
1809 PrintKTVector(&theSecondaryList,std::string(
" theSecondaryList"));
1810 G4cout <<
"theTargetList size: " << theTargetList.size() <<
G4endl;
1811 PrintKTVector(&theTargetList,std::string(
" theTargetList"));
1812 PrintKTVector(&theCapturedList,std::string(
" theCapturedList"));
1814 G4cout <<
" ExcitE be4 Correct : " <<GetExcitationEnergy() <<
G4endl;
1815 G4cout <<
" Mom Transfered to nucleus : " << theMomentumTransfer <<
" " << theMomentumTransfer.
mag() <<
G4endl;
1816 PrintKTVector(&theFinalState,std::string(
" FinalState uncorrected"));
1832G4double G4BinaryCascade::CorrectShortlivedPrimaryForFermi(
1841 if ( std::abs(PDGcode) > 1000 && PDGcode != 2112 && PDGcode != 2212 )
1848 std::vector<G4KineticTrack *>::iterator titer;
1849 for ( titer=target_collection.begin() ; titer!=target_collection.end(); ++titer)
1867 for ( std::vector<G4KineticTrack *>::iterator i =products->begin(); i != products->end(); i++)
1869 G4int PDGcode=(*i)->GetDefinition()->GetPDGEncoding();
1871 final_Efermi+=((
G4RKPropagation *)thePropagator)->GetField(PDGcode,(*i)->GetPosition());
1872 if ( std::abs(PDGcode) > 1000 && PDGcode != 2112 && PDGcode != 2212 )
1874 resonances.push_back(*i);
1877 if ( resonances.size() > 0 )
1879 G4double delta_Fermi= (initial_Efermi-final_Efermi)/resonances.size();
1880 for (std::vector<G4KineticTrack *>::iterator res=resonances.begin(); res != resonances.end(); res++)
1884 G4double newEnergy=mom.
e() + delta_Fermi;
1885 G4double newEnergy2= newEnergy*newEnergy;
1887 if ( newEnergy2 < mass2 )
1901void G4BinaryCascade::CorrectFinalPandE()
1909#ifdef debug_BIC_CorrectFinalPandE
1913 if ( theFinalState.size() == 0 )
return;
1915 G4KineticTrackVector::iterator i;
1917 if ( pNucleus.
e() == 0 )
return;
1918#ifdef debug_BIC_CorrectFinalPandE
1922 for(i = theFinalState.begin(); i != theFinalState.end(); ++i)
1924 pFinals += (*i)->Get4Momentum();
1925#ifdef debug_BIC_CorrectFinalPandE
1926 G4cout <<
"CorrectFinalPandE a final " << (*i)->GetDefinition()->GetParticleName()
1927 <<
" 4mom " << (*i)->Get4Momentum()<<
G4endl;
1930#ifdef debug_BIC_CorrectFinalPandE
1931 G4cout <<
"CorrectFinalPandE pN pF: " <<pNucleus <<
" " <<pFinals <<
G4endl;
1937#ifdef debug_BIC_CorrectFinalPandE
1938 G4cout <<
"CorrectFinalPandE pCM, CMS pCM " << pCM <<
" " <<toCMS*pCM<<
G4endl;
1939 G4cout <<
"CorrectFinal CMS pN pF " <<toCMS*pNucleus <<
" "
1941 <<
" nucleus initial mass : " <<GetFinal4Momentum().
mag()
1942 <<
" massInNucleus m(nucleus) m(finals) std::sqrt(s): " << massInNucleus <<
" " <<pNucleus.
mag()<<
" "
1943 << pFinals.mag() <<
" " << pCM.
mag() <<
G4endl;
1949 G4double m10 = GetIonMass(currentZ,currentA);
1951 if( s0-(m10+m20)*(m10+m20) < 0 )
1953#ifdef debug_BIC_CorrectFinalPandE
1954 G4cout <<
"G4BinaryCascade::CorrectFinalPandE() : error! " <<
G4endl;
1956 G4cout <<
"not enough mass to correct: mass^2, A,Z, mass(nucl), mass(finals) "
1957 << (
s0-(m10+m20)*(m10+m20)) <<
" "
1958 << currentA <<
" " << currentZ <<
" "
1959 << m10 <<
" " << m20
1963 PrintKTVector(&theFinalState,
" mass problem");
1969 G4double pInCM = std::sqrt((s0-(m10+m20)*(m10+m20))*(s0-(m10-m20)*(m10-m20))/(4.*s0));
1970#ifdef debug_BIC_CorrectFinalPandE
1971 G4cout <<
" CorrectFinalPandE pInCM new, CURRENT, ratio : " << pInCM
1972 <<
" " << (pFinals).vect().mag()<<
" " << pInCM/(pFinals).vect().mag() <<
G4endl;
1974 if ( pFinals.vect().mag() > pInCM )
1978 G4double factor=std::max(0.98,pInCM/pFinals.vect().mag());
1980 for(i = theFinalState.begin(); i != theFinalState.end(); ++i)
1983 G4ThreeVector p3(factor*(toCMS*(*i)->Get4Momentum()).vect());
1984 G4LorentzVector p(p3,std::sqrt((*i)->Get4Momentum().mag2() + p3.mag2()));
1987#ifdef debug_BIC_CorrectFinalPandE
1990 (*i)->Set4Momentum(p);
1992#ifdef debug_BIC_CorrectFinalPandE
1993 G4cout <<
"CorrectFinalPandE nucleus corrected mass : " << GetFinal4Momentum() <<
" "
1995 <<
" CMS pFinals , mag, 3.mag : " << qFinals <<
" " << qFinals.mag() <<
" " << qFinals.vect().mag()<<
G4endl;
1996 G4cerr <<
" -CorrectFinalPandE 5 " << factor <<
G4endl;
1999#ifdef debug_BIC_CorrectFinalPandE
2000 else {
G4cerr <<
" -CorrectFinalPandE 6 - no correction done" <<
G4endl; }
2006void G4BinaryCascade::UpdateTracksAndCollisions(
2012 std::vector<G4KineticTrack *>::iterator iter1, iter2;
2017 if(!oldSecondaries->empty())
2019 for(iter1 = oldSecondaries->begin(); iter1 != oldSecondaries->end();
2022 iter2 = std::find(theSecondaryList.begin(), theSecondaryList.end(),
2024 if ( iter2 != theSecondaryList.end() ) theSecondaryList.erase(iter2);
2034 if(oldTarget->size()!=0)
2038 for(iter1 = oldTarget->begin(); iter1 != oldTarget->end(); ++iter1)
2040 iter2 = std::find(theTargetList.begin(), theTargetList.end(),
2042 theTargetList.erase(iter2);
2050 if(!newSecondaries->empty())
2053 for(iter1 = newSecondaries->begin(); iter1 != newSecondaries->end();
2056 theSecondaryList.push_back(*iter1);
2059 PrintKTVector(*iter1,
"undefined in FindCollisions");
2065 FindCollisions(newSecondaries);
2080 ktv(out), wanted_state(astate)
2084 if ( (kt)->GetState() == wanted_state ) ktv->push_back(kt);
2095#ifdef debug_BIC_DoTimeStep
2096 G4ping debug(
"debug_G4BinaryCascade");
2097 debug.push_back(
"======> DoTimeStep 1"); debug.dump();
2098 G4cerr <<
"G4BinaryCascade::DoTimeStep: enter step="<< theTimeStep
2099 <<
" , time="<<theCurrentTime <<
G4endl;
2100 PrintKTVector(&theSecondaryList, std::string(
"DoTimeStep - theSecondaryList"));
2105 std::vector<G4KineticTrack *>::iterator iter;
2108 std::for_each( theSecondaryList.begin(),theSecondaryList.end(),
2113 std::for_each( theSecondaryList.begin(),theSecondaryList.end(),
2118#ifdef debug_BIC_DoTimeStep
2124 thePropagator->
Transport(theSecondaryList, dummy, theTimeStep);
2131#ifdef debug_BIC_DoTimeStep
2132 G4cout <<
"DoTimeStep : theMomentumTransfer = " << theMomentumTransfer <<
G4endl;
2133 PrintKTVector(&theSecondaryList, std::string(
"DoTimeStep - secondaries aft trsprt"));
2141 std::for_each( kt_outside->begin(),kt_outside->end(),
2148 std::for_each( kt_inside->begin(),kt_inside->end(),
2158 kt_gone_in->clear();
2159 std::for_each( kt_outside->begin(),kt_outside->end(),
2162 kt_gone_out->clear();
2163 std::for_each( kt_inside->begin(),kt_inside->end(),
2166#ifdef debug_BIC_DoTimeStep
2167 PrintKTVector(fail,std::string(
" Failed to go in/out -> miss_nucleus/captured"));
2168 PrintKTVector(kt_gone_in, std::string(
"recreated kt_gone_in"));
2169 PrintKTVector(kt_gone_out, std::string(
"recreated kt_gone_out"));
2175 std::for_each( kt_outside->begin(),kt_outside->end(),
2178 std::for_each( kt_outside->begin(),kt_outside->end(),
2181#ifdef debug_BIC_DoTimeStep
2182 PrintKTVector(kt_gone_out, std::string(
"append gone_outs to final state.. theFinalState"));
2185 theFinalState.insert(theFinalState.end(),
2186 kt_gone_out->begin(),kt_gone_out->end());
2190 std::for_each( theSecondaryList.begin(),theSecondaryList.end(),
2196 if ( theCollisionMgr->
Entries()> 0 )
2198 if (kt_gone_out->size() )
2201 iter = std::find(kt_gone_out->begin(),kt_gone_out->end(),nextPrimary);
2202 if ( iter != kt_gone_out->end() )
2205#ifdef debug_BIC_DoTimeStep
2206 G4cout <<
" DoTimeStep - WARNING: deleting current collision!" <<
G4endl;
2210 if ( kt_captured->size() )
2213 iter = std::find(kt_captured->begin(),kt_captured->end(),nextPrimary);
2214 if ( iter != kt_captured->end() )
2217#ifdef debug_BIC_DoTimeStep
2218 G4cout <<
" DoTimeStep - WARNING: deleting current collision!" <<
G4endl;
2225 UpdateTracksAndCollisions(kt_gone_out,0 ,0);
2228 if ( kt_captured->size() )
2230 theCapturedList.insert(theCapturedList.end(),
2231 kt_captured->begin(),kt_captured->end());
2235 std::vector<G4KineticTrack *>::iterator i_captured;
2236 for(i_captured=kt_captured->begin();i_captured!=kt_captured->end();i_captured++)
2238 (*i_captured)->Hit();
2241 UpdateTracksAndCollisions(kt_captured, NULL, NULL);
2244#ifdef debug_G4BinaryCascade
2247 std::for_each( theSecondaryList.begin(),theSecondaryList.end(),
2249 if ( currentZ != (GetTotalCharge(theTargetList)
2250 + GetTotalCharge(theCapturedList)
2251 + GetTotalCharge(*kt_inside)) )
2253 G4cout <<
" error-DoTimeStep aft, A, Z: " << currentA <<
" " << currentZ
2254 <<
" sum(tgt,capt,active) "
2255 << GetTotalCharge(theTargetList) + GetTotalCharge(theCapturedList) + GetTotalCharge(*kt_inside)
2256 <<
" targets: " << GetTotalCharge(theTargetList)
2257 <<
" captured: " << GetTotalCharge(theCapturedList)
2258 <<
" active: " << GetTotalCharge(*kt_inside)
2270 theCurrentTime += theTimeStep;
2284 std::vector<G4KineticTrack *>::iterator iter;
2289 G4int secondaries_in(0);
2290 G4int secondaryBarions_in(0);
2291 G4int secondaryCharge_in(0);
2294 for ( iter =in->begin(); iter != in->end(); ++iter)
2297 secondaryCharge_in +=
G4lrint((*iter)->GetDefinition()->GetPDGCharge()/eplus);
2298 if ((*iter)->GetDefinition()->GetBaryonNumber()!=0 )
2300 secondaryBarions_in += (*iter)->GetDefinition()->GetBaryonNumber();
2304 secondaryMass_in += (*iter)->GetDefinition()->GetPDGMass();
2310 G4double mass_initial= GetIonMass(currentZ,currentA);
2312 currentZ += secondaryCharge_in;
2313 currentA += secondaryBarions_in;
2318 G4double mass_final= GetIonMass(currentZ,currentA);
2320 G4double correction= secondaryMass_in + mass_initial - mass_final;
2321 if (secondaries_in>1)
2322 {correction /= secondaries_in;}
2324#ifdef debug_BIC_CorrectBarionsOnBoundary
2325 G4cout <<
"CorrectBarionsOnBoundary,currentZ,currentA,"
2326 <<
"secondaryCharge_in,secondaryBarions_in,"
2327 <<
"energy correction,m_secondry,m_nucl_init,m_nucl_final "
2328 << currentZ <<
" "<< currentA <<
" "
2329 << secondaryCharge_in<<
" "<<secondaryBarions_in<<
" "
2330 << correction <<
" "
2331 << secondaryMass_in <<
" "
2332 << mass_initial <<
" "
2333 << mass_final <<
" "
2335 PrintKTVector(in,std::string(
"in be4 correction"));
2337 for ( iter = in->begin(); iter != in->end(); ++iter)
2339 if ((*iter)->GetTrackingMomentum().e()+correction > (*iter)->GetActualMass())
2341 (*iter)->UpdateTrackingMomentum((*iter)->GetTrackingMomentum().e() + correction);
2348 (*iter)->UpdateTrackingMomentum((*iter)->GetTrackingMomentum().e() + barrier);
2350 kt_fail->push_back(*iter);
2351 currentZ -=
G4lrint((*iter)->GetDefinition()->GetPDGCharge()/eplus);
2352 currentA -= (*iter)->GetDefinition()->GetBaryonNumber();
2357#ifdef debug_BIC_CorrectBarionsOnBoundary
2358 G4cout <<
" CorrectBarionsOnBoundary, aft, Z, A, sec-Z,A,m,m_in_nucleus "
2359 << currentZ <<
" " << currentA <<
" "
2360 << secondaryCharge_in <<
" " << secondaryBarions_in <<
" "
2361 << secondaryMass_in <<
" "
2363 PrintKTVector(in,std::string(
"in AFT correction"));
2370 G4int secondaries_out(0);
2371 G4int secondaryBarions_out(0);
2372 G4int secondaryCharge_out(0);
2375 for ( iter =out->begin(); iter != out->end(); ++iter)
2378 secondaryCharge_out +=
G4lrint((*iter)->GetDefinition()->GetPDGCharge()/eplus);
2379 if ((*iter)->GetDefinition()->GetBaryonNumber() !=0 )
2381 secondaryBarions_out += (*iter)->GetDefinition()->GetBaryonNumber();
2385 secondaryMass_out += (*iter)->GetDefinition()->GetPDGMass();
2392 G4double mass_initial= GetIonMass(currentZ,currentA);
2393 currentA -=secondaryBarions_out;
2394 currentZ -=secondaryCharge_out;
2403 G4cerr <<
"G4BinaryCascade - secondaryBarions_out,secondaryCharge_out " <<
2404 secondaryBarions_out <<
" " << secondaryCharge_out <<
G4endl;
2405 PrintKTVector(&theTargetList,
"CorrectBarionsOnBoundary Target");
2406 PrintKTVector(&theCapturedList,
"CorrectBarionsOnBoundary Captured");
2407 PrintKTVector(&theSecondaryList,
"CorrectBarionsOnBoundary Secondaries");
2408 G4cerr <<
"G4BinaryCascade - currentA, currentZ " << currentA <<
" " << currentZ <<
G4endl;
2409 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::CorrectBarionsOnBoundary() - fatal error");
2411 G4double mass_final=GetIonMass(currentZ,currentA);
2412 G4double correction= mass_initial - mass_final - secondaryMass_out;
2415 if (secondaries_out>1) correction /= secondaries_out;
2416#ifdef debug_BIC_CorrectBarionsOnBoundary
2417 G4cout <<
"DoTimeStep,(current Z,A),"
2418 <<
"(secondaries out,Charge,Barions),"
2419 <<
"* energy correction,(m_secondry,m_nucl_init,m_nucl_final) "
2420 <<
"("<< currentZ <<
","<< currentA <<
") ("
2421 << secondaries_out <<
","
2422 << secondaryCharge_out<<
","<<secondaryBarions_out<<
") * "
2423 << correction <<
" ("
2424 << secondaryMass_out <<
", "
2425 << mass_initial <<
", "
2426 << mass_final <<
")"
2428 PrintKTVector(out,std::string(
"out be4 correction"));
2431 for ( iter = out->begin(); iter != out->end(); ++iter)
2433 if ((*iter)->GetTrackingMomentum().e()+correction > (*iter)->GetActualMass())
2435 (*iter)->UpdateTrackingMomentum((*iter)->GetTrackingMomentum().e() + correction);
2446 (*iter)->UpdateTrackingMomentum((*iter)->GetTrackingMomentum().e() - barrier);
2448 kt_fail->push_back(*iter);
2449 currentZ +=
G4lrint((*iter)->GetDefinition()->GetPDGCharge()/eplus);
2450 currentA += (*iter)->GetDefinition()->GetBaryonNumber();
2452#ifdef debug_BIC_CorrectBarionsOnBoundary
2455 G4cout <<
"Not correcting outgoing " << *iter <<
" "
2456 << (*iter)->GetDefinition()->GetPDGEncoding() <<
" "
2457 << (*iter)->GetDefinition()->GetParticleName() <<
G4endl;
2458 PrintKTVector(out,std::string(
"outgoing, one not corrected"));
2464#ifdef debug_BIC_CorrectBarionsOnBoundary
2465 PrintKTVector(out,std::string(
"out AFTER correction"));
2466 G4cout <<
" DoTimeStep, nucl-update, A, Z, sec-Z,A,m,m_in_nucleus, table-mass, delta "
2467 << currentA <<
" "<< currentZ <<
" "
2468 << secondaryCharge_out <<
" "<< secondaryBarions_out <<
" "<<
2469 secondaryMass_out <<
" "
2470 << massInNucleus <<
" "
2471 << GetIonMass(currentZ,currentA)
2472 <<
" " << massInNucleus - GetIonMass(currentZ,currentA)
2487#ifdef debug_BIC_FindFragments
2488 G4cout <<
"target, captured, secondary: "
2489 << theTargetList.size() <<
" "
2490 << theCapturedList.size()<<
" "
2491 << theSecondaryList.size()
2495 G4int a =
G4int(theTargetList.size()+theCapturedList.size());
2497 G4KineticTrackVector::iterator i;
2498 for(i = theTargetList.begin(); i != theTargetList.end(); ++i)
2500 if(
G4lrint((*i)->GetDefinition()->GetPDGCharge()/eplus) == 1 )
2506 G4int zCaptured = 0;
2508 for(i = theCapturedList.begin(); i != theCapturedList.end(); ++i)
2510 CapturedMomentum += (*i)->Get4Momentum();
2511 if(
G4lrint((*i)->GetDefinition()->GetPDGCharge()/eplus) == 1 )
2517 G4int z = zTarget+zCaptured;
2519#ifdef debug_G4BinaryCascade
2520 if ( z != (GetTotalCharge(theTargetList) + GetTotalCharge(theCapturedList)) )
2522 G4cout <<
" FindFragment Counting error z a " << z <<
" " <<a <<
" "
2523 << GetTotalCharge(theTargetList) <<
" " << GetTotalCharge(theCapturedList)<<
2525 PrintKTVector(&theTargetList, std::string(
"theTargetList"));
2526 PrintKTVector(&theCapturedList, std::string(
"theCapturedList"));
2540 if ( z < 1 )
return 0;
2543 G4int excitons = (
G4int)theCapturedList.size();
2544#ifdef debug_BIC_FindFragments
2545 G4cout <<
"Fragment: a= " << a <<
" z= " << z <<
" particles= " << excitons
2546 <<
" Charged= " << zCaptured <<
" holes= " << holes
2547 <<
" excitE= " <<GetExcitationEnergy()
2548 <<
" Final4Momentum= " << GetFinalNucleusMomentum() <<
" capturMomentum= " << CapturedMomentum
2570 G4LorentzVector final4Momentum = theInitial4Mom + theProjectile4Momentum;
2572 for(G4KineticTrackVector::iterator i = theFinalState.begin(); i != theFinalState.end(); ++i)
2574 final4Momentum -= (*i)->Get4Momentum();
2575 finals += (*i)->Get4Momentum();
2578 if(final4Momentum.
e()> 0 && (final4Momentum.
vect()/final4Momentum.
e()).mag()>1.0 && currentA > 0)
2580#ifdef debug_BIC_Final4Momentum
2582 G4cerr <<
"G4BinaryCascade::GetFinal4Momentum - Fatal"<<
G4endl;
2583 G4KineticTrackVector::iterator i;
2584 G4cerr <<
"Total initial 4-momentum " << theProjectile4Momentum <<
G4endl;
2585 G4cerr <<
" GetFinal4Momentum: Initial nucleus "<<theInitial4Mom<<
G4endl;
2586 for(i = theFinalState.begin(); i != theFinalState.end(); ++i)
2588 G4cerr <<
" Final state: "<<(*i)->Get4Momentum()<<(*i)->GetDefinition()->GetParticleName()<<
G4endl;
2591 G4cerr<<
" Final4Momentum = "<<final4Momentum <<
" "<<final4Momentum.
m()<<
G4endl;
2592 G4cerr <<
" current A, Z = "<< currentA<<
", "<<currentZ<<
G4endl;
2598 return final4Momentum;
2609 G4KineticTrackVector::iterator i;
2611 for(i = theCapturedList.begin(); i != theCapturedList.end(); ++i)
2613 CapturedMomentum += (*i)->Get4Momentum();
2619 if ( NucleusMomentum.
e() > 0 )
2623 G4ThreeVector boost= (NucleusMomentum.
vect() -CapturedMomentum.vect())/NucleusMomentum.
e();
2624 if(boost.
mag2()>1.0)
2626# ifdef debug_BIC_FinalNucleusMomentum
2627 G4cerr <<
"G4BinaryCascade::GetFinalNucleusMomentum - Fatal"<<
G4endl;
2629 G4cerr <<
"it 01"<<NucleusMomentum<<
" "<<CapturedMomentum<<
" "<<
G4endl;
2636 precompoundLorentzboost.
set( boost );
2637#ifdef debug_debug_BIC_FinalNucleusMomentum
2638 G4cout <<
"GetFinalNucleusMomentum be4 boostNucleusMomentum, CapturedMomentum"<<NucleusMomentum<<
" "<<CapturedMomentum<<
" "<<
G4endl;
2640 NucleusMomentum *= nucleusBoost;
2641#ifdef debug_BIC_FinalNucleusMomentum
2642 G4cout <<
"GetFinalNucleusMomentum aft boost GetFinal4Momentum= " <<NucleusMomentum <<
G4endl;
2645 return NucleusMomentum;
2662 std::vector<G4KineticTrack *>::iterator iter, jter;
2667 while(!done && tryCount++ <200)
2674 secs = theH1Scatterer->
Scatter(*(*secondaries).front(), aTarget);
2675#ifdef debug_H1_BinaryCascade
2676 PrintKTVector(secs,
" From Scatter");
2678 for(
size_t ss=0; secs && ss<secs->size(); ss++)
2681 if((*secs)[ss]->GetDefinition()->IsShortLived()) done =
true;
2685 ClearAndDestroy(&theFinalState);
2686 ClearAndDestroy(secondaries);
2689 for(
size_t current=0; secs && current<secs->size(); current++)
2691 if((*secs)[current]->GetDefinition()->IsShortLived())
2695 for(jter=dec->begin(); jter != dec->end(); jter++)
2698 secs->push_back(*jter);
2701 delete (*secs)[current];
2708 theFinalState.push_back((*secs)[current]);
2713#ifdef debug_H1_BinaryCascade
2714 PrintKTVector(&theFinalState,
" FinalState");
2716 for(iter = theFinalState.begin(); iter != theFinalState.end(); ++iter)
2725 products->push_back(aNew);
2726#ifdef debug_H1_BinaryCascade
2731 G4cout <<
"final shortlived : ";
2734 G4cout <<
"final un stable : ";
2741 theFinalState.clear();
2766 }
while (
sqr(x1) +
sqr(x2) > 1.);
2792 std::vector<G4KineticTrack *>::iterator i;
2793 for(i = ktv->begin(); i != ktv->end(); ++i)
2802 std::vector<G4ReactionProduct *>::iterator i;
2803 for(i = rpv->begin(); i != rpv->end(); ++i)
2812 if (comment.size() > 0 )
G4cout <<
"G4BinaryCascade::PrintKTVector() " << comment <<
G4endl;
2814 G4cout <<
" vector: " << ktv <<
", number of tracks: " << ktv->size()
2816 std::vector<G4KineticTrack *>::iterator i;
2819 for(count = 0, i = ktv->begin(); i != ktv->end(); ++i, ++count)
2822 G4cout <<
" track n. " << count;
2826 G4cout <<
"G4BinaryCascade::PrintKTVector():No KineticTrackVector given " <<
G4endl;
2830void G4BinaryCascade::PrintKTVector(
G4KineticTrack * kt, std::string comment)
2833 if (comment.size() > 0 )
G4cout <<
"G4BinaryCascade::PrintKTVector() "<< comment <<
G4endl;
2841 << 1/fermi*
pos <<
" R: " << 1/fermi*
pos.mag() <<
" 4mom: "
2842 << 1/MeV*mom <<
"Tr_mom" << 1/MeV*tmom <<
" P: " << 1/MeV*mom.
vect().
mag()
2846 G4cout <<
"G4BinaryCascade::PrintKTVector(): No Kinetictrack given" <<
G4endl;
2856 if (
Z > 0 &&
A >=
Z )
2860 }
else if (
A > 0 &&
Z>0 )
2865 }
else if (
A >= 0 &&
Z<=0 )
2870 }
else if (
A == 0 )
2877 G4cerr <<
"G4BinaryCascade::GetIonMass() - invalid (A,Z) = ("
2879 throw G4HadronicException(__FILE__, __LINE__,
"G4BinaryCascade::GetIonMass() - giving up");
2890 std::vector<G4KineticTrack *>::const_iterator iter;
2891 std::vector<G4ReactionProduct *>::const_iterator rpiter;
2892 decayKTV.
Decay(&theFinalState);
2894 for(iter = theFinalState.cbegin(); iter != theFinalState.cend(); ++iter)
2897 aNew->
SetMomentum((*iter)->Get4Momentum().vect());
2902 Esecondaries +=(*iter)->Get4Momentum().e();
2903 psecondaries +=(*iter)->Get4Momentum();
2906 products->push_back(aNew);
2911 while(theCollisionMgr->
Entries() > 0)
2918 if ( lates->size() == 1 ) {
2931 products->push_back(aNew);
2941 decayKTV.
Decay(&theSecondaryList);
2945 if ( (theSecondaryList.size() + theCapturedList.size()) > 0)
2947 transferCorrection= theMomentumTransfer /(theSecondaryList.size() + theCapturedList.size());
2950 for(iter = theSecondaryList.cbegin(); iter != theSecondaryList.cend(); ++iter)
2953 (*iter)->Update4Momentum((*iter)->Get4Momentum().vect()+transferCorrection);
2954 aNew->
SetMomentum((*iter)->Get4Momentum().vect());
2959 Esecondaries +=(*iter)->Get4Momentum().e();
2960 psecondaries +=(*iter)->Get4Momentum();
2962 products->push_back(aNew);
2965 for(iter = theCapturedList.cbegin(); iter != theCapturedList.cend(); ++iter)
2968 (*iter)->Update4Momentum((*iter)->Get4Momentum().vect()+transferCorrection);
2969 aNew->
SetMomentum((*iter)->Get4Momentum().vect());
2974 Esecondaries +=(*iter)->Get4Momentum().e();
2975 psecondaries +=(*iter)->Get4Momentum();
2977 products->push_back(aNew);
2982 for(iter = theTargetList.cbegin(); iter != theTargetList.cend(); ++iter)
2984 SumMassNucleons += (*iter)->GetDefinition()->GetPDGMass();
2985 pNucleons += (*iter)->Get4Momentum();
2988 G4double Ekinetic=theProjectile4Momentum.e() + initial_nuclear_mass - Esecondaries - SumMassNucleons;
2989 #ifdef debug_BIC_FillVoidnucleus
2991 psecondaries - pNucleons;
2995 if (Ekinetic > 0. && theTargetList.size()){
2996 Ekinetic /= theTargetList.size();
2999 if (theTargetList.size()) Ekineticrdm = ( 0.1 +
G4UniformRand()*5.) * MeV;
3001 for (rpiter=products->cbegin(); rpiter!=products->cend(); ++rpiter){
3002 TotalEkin+=(*rpiter)->GetKineticEnergy();
3005 if ( std::abs(Ekinetic) < 20*perCent * TotalEkin ){
3006 correction=1. + (Ekinetic-Ekineticrdm)/TotalEkin;
3008 #ifdef debug_G4BinaryCascade
3010 G4cout <<
"BLIC::FillVoidNucleus() fail correction, Ekinetic, TotalEkin " << Ekinetic <<
""<< TotalEkin <<
G4endl;
3014 for (rpiter=products->cbegin(); rpiter!=products->cend(); ++rpiter){
3015 (*rpiter)->SetKineticEnergy((*rpiter)->GetKineticEnergy()*correction);
3016 (*rpiter)->SetMomentum((*rpiter)->GetTotalMomentum() * (*rpiter)->GetMomentum().unit());
3020 Ekinetic=Ekineticrdm*correction;
3021 if (theTargetList.size())Ekinetic /= theTargetList.size();
3025 for(iter = theTargetList.cbegin(); iter != theTargetList.cend(); ++iter) {
3035 products->push_back(aNew);
3040 for (rpiter=products->cbegin(); rpiter!=products->cend(); ++rpiter){
3041 psecondaries +=
G4LorentzVector((*rpiter)->GetMomentum(),(*rpiter)->GetTotalEnergy() );
3051 SumMom=initial4Mom.
vect()-SumMom;
3055 while ( SumMom.
mag() > 0.1*MeV && loopcount++ < 10)
3058 for (
auto reverse=products->crbegin(); reverse!=products->crend(); ++reverse, --index){
3059 SumMom=initial4Mom.
vect();
3060 for (rpiter=products->cbegin(); rpiter!=products->cend(); ++rpiter){
3061 SumMom-=(*rpiter)->GetMomentum();
3063 G4double p=((*reverse)->GetMomentum()).mag();
3064 (*reverse)->SetMomentum( p*(((*reverse)->GetMomentum()+SumMom).unit()));
3073 std::vector<G4KineticTrack *>::iterator iter;
3074 for(iter = secondaries->begin(); iter != secondaries->end(); ++iter)
3077 aNew->
SetMomentum((*iter)->Get4Momentum().vect());
3084 products->push_back(aNew);
3087 if (currentA == 1 && currentZ == 0) {
3089 }
else if (currentA == 1 && currentZ == 1) {
3091 }
else if (currentA == 2 && currentZ == 1) {
3093 }
else if (currentA == 3 && currentZ == 1) {
3095 }
else if (currentA == 3 && currentZ == 2) {
3097 }
else if (currentA == 4 && currentZ == 2) {
3103 if (fragment != 0) {
3110 products->push_back(theNew);
3115void G4BinaryCascade::PrintWelcomeMessage()
3117 G4cout <<
"Thank you for using G4BinaryCascade. "<<
G4endl;
3127 for ( std::vector<G4KineticTrack *>::iterator i =products->begin(); i != products->end(); i++)
3129 G4int PDGcode=std::abs((*i)->GetDefinition()->GetPDGEncoding());
3130 if (std::abs(PDGcode)==211 || PDGcode==111 ) havePion=
true;
3133 if ( !products || havePion)
3136 G4cout <<
" Collision " << collision <<
", type: "<<
typeid(action).
name()
3137 <<
", with NO products! " <<
G4endl;
3154G4bool G4BinaryCascade::CheckChargeAndBaryonNumber(
G4String where)
3156 static G4int lastdA(0), lastdZ(0);
3163 std::vector<G4KineticTrack *>::iterator i;
3164 G4int CapturedA(0), CapturedZ(0);
3165 G4int secsA(0), secsZ(0);
3166 for ( i=theCapturedList.begin(); i!=theCapturedList.end(); ++i) {
3167 CapturedA += (*i)->GetDefinition()->GetBaryonNumber();
3168 CapturedZ +=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/eplus);
3171 for ( i=theSecondaryList.begin(); i!=theSecondaryList.end(); ++i) {
3173 secsA += (*i)->GetDefinition()->GetBaryonNumber();
3174 secsZ +=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/eplus);
3178 for ( i=theFinalState.begin(); i!=theFinalState.end(); ++i) {
3179 fStateA += (*i)->GetDefinition()->GetBaryonNumber();
3180 fStateZ +=
G4lrint((*i)->GetDefinition()->GetPDGCharge()/eplus);
3183 G4int deltaA= iStateA - secsA - fStateA -currentA - lateA;
3184 G4int deltaZ= iStateZ - secsZ - fStateZ -currentZ - lateZ;
3186#ifdef debugCheckChargeAndBaryonNumberverbose
3187 G4cout << where <<
" A: iState= "<< iStateA<<
", secs= "<< secsA<<
", fState= "<< fStateA<<
", current= "<<currentA<<
", late= " <<lateA <<
G4endl;
3188 G4cout << where <<
" Z: iState= "<< iStateZ<<
", secs= "<< secsZ<<
", fState= "<< fStateZ<<
", current= "<<currentZ<<
", late= " <<lateZ <<
G4endl;
3191 if (deltaA != 0 || deltaZ!=0 ) {
3192 if (deltaA != lastdA || deltaZ != lastdZ ) {
3193 G4cout <<
"baryon/charge imbalance - " << where <<
G4endl
3194 <<
"deltaA " <<deltaA<<
", iStateA "<<iStateA<<
", CapturedA "<<CapturedA <<
", secsA "<<secsA
3195 <<
", fStateA "<<fStateA <<
", currentA "<<currentA <<
", lateA "<<lateA <<
G4endl
3196 <<
"deltaZ "<<deltaZ<<
", iStateZ "<<iStateZ<<
", CapturedZ "<<CapturedZ <<
", secsZ "<<secsZ
3197 <<
", fStateZ "<<fStateZ <<
", currentZ "<<currentZ <<
", lateZ "<<lateZ <<
G4endl<<
G4endl;
3201 }
else { lastdA=lastdZ=0;}
3210 PrintKTVector(collision->
GetPrimary(),std::string(
" Primary particle"));
3212 PrintKTVector(products,std::string(
" Scatterer products"));
3232 for (
unsigned int it=0; it < ktv.size(); it++)
3250 G4int product_barions(0);
3253 for (
unsigned int it=0; it < products->size(); it++)
3265 <<
" " <<
final <<
G4endl;;
3270 G4int finalA = currentA;
3271 G4int finalZ = currentZ;
3274 finalA -= product_barions;
3275 finalZ -= GetTotalCharge(*products);
3277 G4double delta = GetIonMass(currentZ,currentA) - (GetIonMass(finalZ,finalA) + mass_out);
3278 G4cout <<
" current/final a,z " << currentA <<
" " << currentZ <<
" "<< finalA<<
" "<< finalZ
3279 <<
" delta-mass " << delta<<
G4endl;
3281 mass_out = GetIonMass(finalZ,finalA);
3282 G4cout <<
" initE/ E_out/ Mfinal/ Excit " << currentInitialEnergy
3283 <<
" " <<
final <<
" "
3285 << currentInitialEnergy -
final - mass_out
3287 currentInitialEnergy-=
final;
3296 G4ReactionProductVector::iterator iter;
3304 for(iter = products->begin(); iter != products->end(); ++iter)
3307 G4cout <<
" Secondary E - Ekin / p " <<
3308 (*iter)->GetDefinition()->GetParticleName() <<
" " <<
3309 (*iter)->GetTotalEnergy() <<
" - " <<
3310 (*iter)->GetKineticEnergy()<<
" / " <<
3311 (*iter)->GetMomentum().x() <<
" " <<
3312 (*iter)->GetMomentum().y() <<
" " <<
3313 (*iter)->GetMomentum().z() <<
G4endl;
3314 Efinal += (*iter)->GetTotalEnergy();
3315 pFinal += (*iter)->GetMomentum();
3318 G4cout <<
"e outgoing/ total : " << Efinal <<
" " << Efinal+GetFinal4Momentum().
e()<<
G4endl;
3319 G4cout <<
"BIC E/p delta " <<
3337 std::vector<G4KineticTrack *>::iterator ktiter;
3338 for(ktiter = theSecondaryList.begin(); ktiter != theSecondaryList.end(); ++ktiter)
3341 G4cout <<
" Secondary E - Ekin / p " <<
3342 (*ktiter)->GetDefinition()->GetParticleName() <<
" " <<
3343 (*ktiter)->Get4Momentum().e() <<
" - " <<
3344 (*ktiter)->Get4Momentum().e() - (*ktiter)->Get4Momentum().mag() <<
" / " <<
3345 (*ktiter)->Get4Momentum().vect() <<
G4endl;
3346 psecs += (*ktiter)->Get4Momentum();
3349 for(ktiter = theTargetList.begin(); ktiter != theTargetList.end(); ++ktiter)
3352 G4cout <<
" Target E - Ekin / p " <<
3353 (*ktiter)->GetDefinition()->GetParticleName() <<
" " <<
3354 (*ktiter)->Get4Momentum().e() <<
" - " <<
3355 (*ktiter)->Get4Momentum().e() - (*ktiter)->Get4Momentum().mag() <<
" / " <<
3356 (*ktiter)->Get4Momentum().vect() <<
G4endl;
3357 ptgts += (*ktiter)->Get4Momentum();
3360 for(ktiter = theCapturedList.begin(); ktiter != theCapturedList.end(); ++ktiter)
3363 G4cout <<
" Captured E - Ekin / p " <<
3364 (*ktiter)->GetDefinition()->GetParticleName() <<
" " <<
3365 (*ktiter)->Get4Momentum().e() <<
" - " <<
3366 (*ktiter)->Get4Momentum().e() - (*ktiter)->Get4Momentum().mag() <<
" / " <<
3367 (*ktiter)->Get4Momentum().vect() <<
G4endl;
3368 pcpts += (*ktiter)->Get4Momentum();
3371 for(ktiter = theFinalState.begin(); ktiter != theFinalState.end(); ++ktiter)
3374 G4cout <<
" Finals E - Ekin / p " <<
3375 (*ktiter)->GetDefinition()->GetParticleName() <<
" " <<
3376 (*ktiter)->Get4Momentum().e() <<
" - " <<
3377 (*ktiter)->Get4Momentum().e() - (*ktiter)->Get4Momentum().mag() <<
" / " <<
3378 (*ktiter)->Get4Momentum().vect() <<
G4endl;
3379 pfins += (*ktiter)->Get4Momentum();
3382 G4cout <<
" Secondaries " << psecs <<
", Targets " << ptgts <<
G4endl
3383 <<
" Captured " << pcpts <<
", Finals " << pfins <<
G4endl
3384 <<
" Sum " << psecs + ptgts + pcpts + pfins <<
" PTransfer " << theMomentumTransfer
3385 <<
" Sum+PTransfer " << psecs + ptgts + pcpts + pfins + theMomentumTransfer
#define _CheckChargeAndBaryonNumber_(val)
#define _DebugEpConservation(val)
const G4DNABoundingBox initial
CLHEP::HepLorentzVector G4LorentzVector
std::vector< G4ReactionProduct * > G4ReactionProductVector
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
Hep3Vector orthogonal() const
Hep3Vector cross(const Hep3Vector &) const
HepLorentzRotation inverse() const
HepLorentzRotation & set(double bx, double by, double bz)
Hep3Vector boostVector() const
static G4Alpha * AlphaDefinition()
virtual const std::vector< G4CollisionInitialState * > & GetCollisions(G4KineticTrack *aProjectile, std::vector< G4KineticTrack * > &, G4double theCurrentTime)
virtual const std::vector< G4CollisionInitialState * > & GetCollisions(G4KineticTrack *aProjectile, std::vector< G4KineticTrack * > &, G4double theCurrentTime)
virtual void PropagateModelDescription(std::ostream &) const
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &theNucleus)
virtual G4ReactionProductVector * Propagate(G4KineticTrackVector *, G4V3DNucleus *)
G4BinaryCascade(G4VPreCompoundModel *ptr=0)
virtual void ModelDescription(std::ostream &) const
virtual ~G4BinaryCascade()
G4KineticTrackVector & GetTargetCollection(void)
G4KineticTrackVector * GetFinalState()
const G4BCAction * GetGenerator()
G4int GetTargetBaryonNumber()
G4double GetCollisionTime(void)
G4KineticTrack * GetPrimary(void)
void AddCollision(G4double time, G4KineticTrack *proj, G4KineticTrack *target=nullptr)
void RemoveCollision(G4CollisionInitialState *collision)
void RemoveTracksCollisions(G4KineticTrackVector *ktv)
G4CollisionInitialState * GetNextCollision()
void Decay(G4KineticTrackVector *tracks) const
static G4Deuteron * DeuteronDefinition()
void ModelDescription(std::ostream &outFile) const
G4ReactionProductVector * BreakItUp(const G4Fragment &theInitialState)
G4double GetFermiMomentum(G4double density)
void Init(G4int anA, G4int aZ)
void SetNumberOfCharged(G4int value)
const G4LorentzVector & GetMomentum() const
void SetCreatorModelID(G4int value)
void SetNumberOfHoles(G4int valueTot, G4int valueP=0)
void SetNumberOfParticles(G4int value)
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
G4double GetWeightChange() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4double GetGlobalTime() const
void SetParentResonanceDef(const G4ParticleDefinition *parentDef)
void SetTime(G4double aT)
void SetCreatorModelID(G4int id)
void SetParentResonanceID(const G4int parentID)
G4HadronicInteraction * FindModel(const G4String &name)
static G4HadronicInteractionRegistry * Instance()
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
G4HadFinalState theParticleChange
void SetMinEnergy(G4double anEnergy)
const G4String & GetModelName() const
void SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double absoluteLevel)
void SetMaxEnergy(const G4double anEnergy)
static G4He3 * He3Definition()
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
G4double GetIonMass(G4int Z, G4int A, G4int nL=0, G4int lvl=0) const
CascadeState SetState(const CascadeState new_state)
G4int GetParentResonanceID() const
G4int GetCreatorModelID() const
CascadeState GetState() const
void SetNucleon(G4Nucleon *aN)
void Set4Momentum(const G4LorentzVector &a4Momentum)
const G4ThreeVector & GetPosition() const
const G4ParticleDefinition * GetDefinition() const
G4bool IsParticipant() const
const G4LorentzVector & GetTrackingMomentum() const
void Update4Momentum(G4double aEnergy)
const G4ParticleDefinition * GetParentResonanceDef() const
const G4LorentzVector & Get4Momentum() const
G4double GetActualMass() const
static G4Neutron * NeutronDefinition()
static G4Neutron * Neutron()
G4bool GetPDGStable() const
G4bool IsShortLived() const
G4double GetPDGMass() const
G4int GetPDGEncoding() const
G4double GetPDGCharge() const
G4int GetBaryonNumber() const
const G4String & GetParticleName() const
G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()
static G4int GetModelID(const G4int modelIndex)
static G4PionMinus * PionMinusDefinition()
static G4PionPlus * PionPlusDefinition()
static G4Proton * ProtonDefinition()
static G4Proton * Proton()
G4double GetField(G4int encoding, G4ThreeVector pos)
G4double GetBarrier(G4int encoding)
virtual void Transport(G4KineticTrackVector &theActive, const G4KineticTrackVector &theSpectators, G4double theTimeStep)
G4ThreeVector GetMomentumTransfer() const
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
void SetParentResonanceDef(const G4ParticleDefinition *parentDef)
G4double GetTotalMomentum() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
void SetCreatorModelID(const G4int mod)
void SetNewlyAdded(const G4bool f)
G4ThreeVector GetMomentum() const
void SetKineticEnergy(const G4double en)
void SetParentResonanceID(const G4int parentID)
virtual G4KineticTrackVector * Scatter(const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
static void ConstructParticle()
static G4Triton * TritonDefinition()
virtual G4double CoulombBarrier()=0
virtual G4double GetOuterRadius()=0
virtual const G4VNuclearDensity * GetNuclearDensity() const =0
virtual G4Nucleon * GetNextNucleon()=0
virtual G4int GetCharge()=0
virtual G4bool StartLoop()=0
virtual G4double GetMass()=0
virtual void Init(G4int theA, G4int theZ, G4int numberOfLambdas=0)=0
virtual G4int GetMassNumber()=0
virtual void Init(G4V3DNucleus *theNucleus)=0
G4VPreCompoundModel * theDeExcitation
G4V3DNucleus * the3DNucleus
G4VPreCompoundModel * GetDeExcitation() const
const G4HadProjectile * GetPrimaryProjectile() const
void SetDeExcitation(G4VPreCompoundModel *ptr)
G4double GetDensity(const G4ThreeVector &aPosition) const
virtual void DeExciteModelDescription(std::ostream &outFile) const =0
virtual G4ReactionProductVector * DeExcite(G4Fragment &aFragment)=0
G4ExcitationHandler * GetExcitationHandler() const
SelectFromKTV(G4KineticTrackVector *out, G4KineticTrack::CascadeState astate)
void operator()(G4KineticTrack *&kt) const
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
G4double energy(const ThreeVector &p, const G4double m)
const char * name(G4int ptype)
G4bool nucleon(G4int ityp)