Import Geant4 6.1.0 source tree
This commit is contained in:
@@ -93,6 +93,7 @@
|
||||
{
|
||||
// G4cout << "Using pre-compound only, E= "<<mom.t()-mom.mag()<<G4endl;
|
||||
// m_nucl = mom.mag();
|
||||
delete cascaders;
|
||||
G4Fragment aPreFrag;
|
||||
aPreFrag.SetA(a1+a2);
|
||||
aPreFrag.SetZ(z1+z2);
|
||||
@@ -236,7 +237,9 @@
|
||||
G4double deltaE = localFermiEnergy - (aNuc->GetMomentum().t()-aNuc->GetMomentum().mag());
|
||||
theStatisticalExEnergy += deltaE;
|
||||
}
|
||||
debug.push_back("collected a hit"); debug.dump();
|
||||
debug.push_back("collected a hit");
|
||||
debug.push_back(aNuc->GetMomentum());
|
||||
debug.dump();
|
||||
}
|
||||
delete fancyNucleus;
|
||||
delete projectile;
|
||||
@@ -253,6 +256,7 @@
|
||||
G4LorentzVector fState(0,0,0,0);
|
||||
G4LorentzVector pspectators(0,0,0,0);
|
||||
unsigned int i(0);
|
||||
// G4int spectA(0),spectZ(0);
|
||||
for(i=0; i<result->size(); i++)
|
||||
{
|
||||
if( (*result)[i]->GetNewlyAdded() )
|
||||
@@ -260,11 +264,21 @@
|
||||
fState += G4LorentzVector( (*result)[i]->GetMomentum(), (*result)[i]->GetTotalEnergy() );
|
||||
cascaders->push_back((*result)[i]);
|
||||
// G4cout <<" secondary ... ";
|
||||
debug.push_back("secondary ");
|
||||
debug.push_back((*result)[i]->GetDefinition()->GetParticleName());
|
||||
debug.push_back(G4LorentzVector((*result)[i]->GetMomentum(),(*result)[i]->GetTotalEnergy()));
|
||||
debug.dump();
|
||||
}
|
||||
else {
|
||||
// G4cout <<" spectator ... ";
|
||||
pspectators += G4LorentzVector( (*result)[i]->GetMomentum(), (*result)[i]->GetTotalEnergy() );
|
||||
spectators->push_back((*result)[i]);
|
||||
debug.push_back("spectator ");
|
||||
debug.push_back((*result)[i]->GetDefinition()->GetParticleName());
|
||||
debug.push_back(G4LorentzVector((*result)[i]->GetMomentum(),(*result)[i]->GetTotalEnergy()));
|
||||
debug.dump();
|
||||
// spectA++;
|
||||
// spectZ+= G4lrint((*result)[i]->GetDefinition()->GetPDGCharge());
|
||||
}
|
||||
|
||||
// G4cout << (*result)[i]<< " "
|
||||
@@ -272,6 +286,11 @@
|
||||
// << (*result)[i]->GetMomentum()<< " "
|
||||
// << (*result)[i]->GetTotalEnergy() << G4endl;
|
||||
}
|
||||
// if ( spectA-resA !=0 || spectZ-resZ !=0)
|
||||
// {
|
||||
// G4cout << "spect Nucl != spectators: nucl a,z; spect a,z" <<
|
||||
// resA <<" "<< resZ <<" ; " << spectA <<" "<< spectZ << G4endl;
|
||||
// }
|
||||
delete result;
|
||||
debug.push_back(" iState - (fState+pspectators) ");
|
||||
debug.push_back(iState-fState-pspectators);
|
||||
@@ -328,6 +347,7 @@
|
||||
// G4cout << " == post boost 1 "<< momentum.e()<< " "<< momentum.mag()<<G4endl;
|
||||
// G4LorentzRotation boost_spectator_mom(-momentum.boostVector());
|
||||
// G4cout << "- momentum " << boost_spectator_mom * momentum << G4endl;
|
||||
G4LorentzVector pFragments(0);
|
||||
if(resZ>0 && resA>1)
|
||||
{
|
||||
// Make the fragment
|
||||
@@ -361,6 +381,11 @@
|
||||
// << momentum.mag() <<" "<< momentum.mag() - mFragment
|
||||
// << " "<<theStatisticalExEnergy
|
||||
// << " "<< boost_fragments*pFragment<< G4endl;
|
||||
G4ReactionProductVector::iterator ispectator;
|
||||
for (ispectator=spectators->begin();ispectator!=spectators->end();ispectator++)
|
||||
{
|
||||
delete *ispectator;
|
||||
}
|
||||
}
|
||||
else if(resA!=0)
|
||||
{
|
||||
@@ -368,6 +393,8 @@
|
||||
for (ispectator=spectators->begin();ispectator!=spectators->end();ispectator++)
|
||||
{
|
||||
(*ispectator)->SetNewlyAdded(true);
|
||||
cascaders->push_back(*ispectator);
|
||||
pFragments+=G4LorentzVector((*ispectator)->GetMomentum(),(*ispectator)->GetTotalEnergy());
|
||||
// G4cout << "from spectator "
|
||||
// << (*ispectator)->GetDefinition()->GetParticleName() << " "
|
||||
// << (*ispectator)->GetMomentum()<< " "
|
||||
@@ -383,7 +410,6 @@
|
||||
if(proFrag) debug.push_back(proFrag->size());
|
||||
debug.dump();
|
||||
G4ReactionProductVector::iterator ii;
|
||||
G4LorentzVector pFragments(0);
|
||||
if(proFrag) for(ii=proFrag->begin(); ii!=proFrag->end(); ii++)
|
||||
{
|
||||
(*ii)->SetNewlyAdded(true);
|
||||
@@ -414,6 +440,8 @@
|
||||
{
|
||||
cascaders->push_back(*ii);
|
||||
}
|
||||
if (proFrag) delete proFrag;
|
||||
|
||||
if ( ! EnergyIsCorrect )
|
||||
{
|
||||
if (! EnergyAndMomentumCorrector(cascaders,iState))
|
||||
@@ -459,6 +487,7 @@
|
||||
// <<" "<< aNew->GetTotalEnergy()
|
||||
// << G4endl;
|
||||
}
|
||||
delete (*cascaders)[i];
|
||||
}
|
||||
if(cascaders) delete cascaders;
|
||||
|
||||
|
||||
@@ -517,10 +517,12 @@ G4bool G4RKPropagation::FieldTransport(G4KineticTrack * kt, const G4double timeS
|
||||
// G4cout << "currTimeStep = " << currTimeStep << G4endl;
|
||||
if(!driver->AccurateAdvance(track, timeStep, eps))
|
||||
{ // cannot track this particle
|
||||
#ifdef debug_1_RKPropagation
|
||||
std::cerr << "G4RKPropagation::FieldTransport() warning: integration error."
|
||||
<< G4endl << "position " << kt->GetPosition() << " 4mom " <<kt->GetTrackingMomentum()
|
||||
<<G4endl << " timestep " <<timeStep
|
||||
<< G4endl;
|
||||
#endif
|
||||
delete driver;
|
||||
delete stepper;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user