50 stringFragmentationModel(0),
76 G4int attempts = 0, maxAttempts=20;
77 while ( strings == NULL )
79 if (attempts++ > maxAttempts )
81 throw G4HadronicException(__FILE__, __LINE__,
"G4VPartonStringModel::Scatter(): fails to generate strings");
84 theThis->
Init(theNucleus,thePrimary);
92 for (
unsigned int astring=0; astring < strings->size(); astring++)
95 stringEnergy += (*strings)[astring]->GetLeftParton()->Get4Momentum().t();
96 stringEnergy += (*strings)[astring]->GetRightParton()->Get4Momentum().t();
97 (*strings)[astring]->LorentzRotate(toLab);
98 SumStringMom+=(*strings)[astring]->Get4Momentum();
104 #ifdef debug_PartonStringModel
112 while( theCurrentNucleon )
127 G4cout <<
"G4VPSM: strE, hit nucleons, Primary, SumStringE, nucleus intial, nucleus final, excitation estimate "
128 << stringEnergy <<
" " <<
hits <<
", " << Ptmp.e() <<
", "<< SumStringMom.
e() <<
", "
129 << initial_mass<<
", " << final_mass<<
", " << Ptmp.e() + initial_mass - final_mass - stringEnergy <<
G4endl;
148 if(attempts > maxAttempts )
break;
154 for (
unsigned int i=0; i < theResult->size(); i++)
156 SumMass+=(*theResult)[i]->GetDefinition()->GetPDGMass();
163 }
while(SumMass > InvMass);
165 std::for_each(strings->begin(), strings->end(),
DeleteString() );
173 outFile <<
GetModelName() <<
" has no description yet.\n";