51 stringFragmentationModel(0),
70 #ifdef debug_PartonStringModel
71 G4cout<<
"Parton-String model is runnung ------------"<<
G4endl;
81 toZ.rotateZ(-1*Ptmp.phi());
82 toZ.rotateY(-1*Ptmp.theta());
86 G4int attempts = 0, maxAttempts=20;
87 while ( strings == NULL )
89 if (attempts++ > maxAttempts )
92 "G4VPartonStringModel::Scatter(): fails to generate strings");
102 #ifdef debug_PartonStringModel
103 G4cout<<
"Parton-String model: Number of produced strings "<<strings->size()<<
G4endl;
106 for (
unsigned int astring=0; astring < strings->size(); astring++)
109 stringEnergy += (*strings)[astring]->GetLeftParton()->Get4Momentum().t();
110 stringEnergy += (*strings)[astring]->GetRightParton()->Get4Momentum().t();
111 (*strings)[astring]->LorentzRotate(toLab);
112 SumStringMom+=(*strings)[astring]->Get4Momentum();
115 G4double InvMass=SumStringMom.mag();
117 #ifdef debug_PartonStringModel
118 G4cout<<
"Parton-String model: SumStringMom "<<SumStringMom<<
G4endl;
123 G4int hits(0), charged_hits(0);
127 while( theCurrentNucleon )
132 hitNucleonMomentum += theCurrentNucleon->
Get4Momentum().vect();
144 initialZ-charged_hits, initialA-hits);
145 G4cout <<
"G4VPSM: " <<G4endl
146 <<
"strE "<<stringEnergy <<G4endl
147 <<
"hit nucleons "<<hits <<G4endl
148 <<
"Primary "<<Ptmp.e() <<G4endl
149 <<
"SumStringE "<<SumStringMom.e() <<G4endl
150 <<
"Nucleus intial "<<initial_mass <<G4endl
151 <<
"Nucleus final "<<final_mass <<G4endl
152 <<
"Excitation estimate "
153 <<Ptmp.e() + initial_mass - final_mass - stringEnergy <<
G4endl;
154 G4cout <<
"momentum balance "
156 SumStringMom.vect()<<
G4endl;
174 if(attempts > maxAttempts )
break;
176 #ifdef debug_PartonStringModel
177 G4cout<<
"Parton-String model: Number of produced particles "<<theResult->size()<<
G4endl;
183 for (
unsigned int i=0; i < theResult->size(); i++)
185 SumMass+=(*theResult)[i]->GetDefinition()->GetPDGMass();
187 #ifdef debug_PartonStringModel
188 G4cout<<i<<
" : "<<(*theResult)[i]->GetDefinition()->GetParticleName()<<
" "
189 <<(*theResult)[i]->Get4Momentum()<<
" "
190 <<(*theResult)[i]->Get4Momentum().mag()<<
G4endl;
191 SumPsecondr+=(*theResult)[i]->Get4Momentum();
194 #ifdef debug_PartonStringModel
197 }
while(SumMass > InvMass);
199 std::for_each(strings->begin(), strings->end(),
DeleteString() );
202 #ifdef debug_PartonStringModel
203 G4cout<<
"End of string model work ------------"<<G4endl<<
G4endl;
210 outFile <<
GetModelName() <<
" has no description yet.\n";
G4VPartonStringModel(const G4String &modelName="Parton String Model")
std::vector< G4ExcitedString * > G4ExcitedStringVector
virtual G4KineticTrackVector * FragmentStrings(const G4ExcitedStringVector *theStrings)=0
G4VPartonStringModel * theThis
virtual G4int GetCharge()=0
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepLorentzRotation G4LorentzRotation
virtual G4bool StartLoop()=0
virtual G4V3DNucleus * GetWoundedNucleus() const =0
virtual G4int GetMassNumber()=0
virtual G4V3DNucleus * GetProjectileNucleus() const
virtual const G4LorentzVector & Get4Momentum() const
G4ParticleDefinition * GetDefinition() const
static void ConstructParticle()
const G4String & GetParticleName() const
G4KineticTrackVector * Scatter(const G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary)
virtual void ModelDescription(std::ostream &outFile) const
G4IonTable * GetIonTable() const
G4GLOB_DLL std::ostream G4cout
G4VStringFragmentation * stringFragmentationModel
G4double GetIonMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const
static G4Proton * Proton()
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &momentum)
virtual G4String GetModelName() const
virtual ~G4VPartonStringModel()
static G4ParticleTable * GetParticleTable()
virtual void Init(const G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary)=0
virtual G4ExcitedStringVector * GetStrings()=0
virtual G4ParticleDefinition * GetDefinition() const
virtual G4Nucleon * GetNextNucleon()=0
G4ThreeVector GetMomentum() const
CLHEP::HepLorentzVector G4LorentzVector