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
109 G4int hits(0), charged_hits(0);
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";
std::vector< G4ExcitedString * > G4ExcitedStringVector
G4DLLIMPORT std::ostream G4cout
HepLorentzRotation & rotateY(double delta)
HepLorentzRotation & rotateZ(double delta)
HepLorentzRotation inverse() const
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &momentum)
G4ThreeVector GetMomentum() const
G4double GetIonMass(G4int Z, G4int A, G4int L=0) const
!! Only ground states are supported now
virtual const G4LorentzVector & Get4Momentum() const
virtual G4ParticleDefinition * GetDefinition() const
static G4ParticleTable * GetParticleTable()
G4IonTable * GetIonTable()
static G4Proton * Proton()
static void ConstructParticle()
virtual G4Nucleon * GetNextNucleon()=0
virtual G4int GetCharge()=0
virtual G4bool StartLoop()=0
virtual G4int GetMassNumber()=0
virtual G4String GetModelName() const
G4KineticTrackVector * Scatter(const G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary)
virtual G4V3DNucleus * GetWoundedNucleus() const =0
G4VPartonStringModel(const G4String &modelName="Parton String Model")
virtual void Init(const G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary)=0
virtual G4ExcitedStringVector * GetStrings()=0
virtual ~G4VPartonStringModel()
virtual void ModelDescription(std::ostream &outFile) const
virtual G4KineticTrackVector * FragmentStrings(const G4ExcitedStringVector *theStrings)=0