48 stringFragmentationModel(0),
67 #ifdef debug_PartonStringModel
69 G4cout<<
"-----------------------Parton-String model is runnung ------------"<<
G4endl;
79 toZ.rotateZ(-1*Ptmp.phi());
80 toZ.rotateY(-1*Ptmp.theta());
84 G4int attempts = 0, maxAttempts=20;
85 while ( strings == NULL )
87 if (attempts++ > maxAttempts )
90 "G4VPartonStringModel::Scatter(): fails to generate strings");
100 #ifdef debug_PartonStringModel
101 G4cout<<
"Parton-String model: Number of produced strings "<<strings->size()<<
G4endl;
104 for (
unsigned int astring=0; astring < strings->size(); astring++)
107 if((*strings)[astring]->IsExcited())
109 stringEnergy += (*strings)[astring]->GetLeftParton()->Get4Momentum().t();
110 stringEnergy += (*strings)[astring]->GetRightParton()->Get4Momentum().t();
111 (*strings)[astring]->LorentzRotate(toLab);
112 SumStringMom+=(*strings)[astring]->Get4Momentum();
113 #ifdef debug_PartonStringModel
114 G4cout<<
"String No "<<astring+1<<
" "<<(*strings)[astring]->Get4Momentum()<<
" "
115 <<(*strings)[astring]->Get4Momentum().mag()<<
G4endl;
120 stringEnergy += (*strings)[astring]->GetKineticTrack()->Get4Momentum().t();
121 (*strings)[astring]->LorentzRotate(toLab);
122 SumStringMom+=(*strings)[astring]->GetKineticTrack()->Get4Momentum();
123 #ifdef debug_PartonStringModel
124 G4cout<<
"A track No "<<astring+1<<
" "
125 <<(*strings)[astring]->GetKineticTrack()->Get4Momentum()<<
" "
126 <<(*strings)[astring]->GetKineticTrack()->Get4Momentum().mag()<<
G4endl;
131 G4double InvMass=SumStringMom.mag();
137 while( theNuclNucleon )
149 #ifdef debug_PartonStringModel
153 if(ProjResNucleus != 0)
155 theNuclNucleon = ProjResNucleus->
StartLoop() ?
157 while( theNuclNucleon )
162 #ifdef debug_PartonStringModel
163 hitNucleonMomentum += tmp.vect();
171 #ifdef debug_PartonStringModel
172 G4cout<<
"Parton-String model: SumStringMom "<<SumStringMom<<
G4endl;
177 G4int hits(0), charged_hits(0);
181 while( theCurrentNucleon )
186 hitNucleonMomentum += theCurrentNucleon->
Get4Momentum().vect();
197 if(initialA-hits != 0) final_mass =
199 initialZ-charged_hits, initialA-hits);
200 G4cout <<
"G4VPSM: " <<G4endl
201 <<
"strE "<<stringEnergy <<G4endl
202 <<
"Hit targeet nucleons "<<hits <<G4endl
203 <<
"Primary "<<Ptmp.e() <<G4endl
204 <<
"SumStringE "<<SumStringMom.e() <<G4endl
205 <<
"Target nucleus intial "<<initial_mass <<G4endl
206 <<
"Target nucleus final "<<final_mass <<G4endl
207 <<
"Excitation estimate "
208 <<Ptmp.e() + initial_mass - final_mass - stringEnergy <<
G4endl;
209 G4cout <<
"momentum balance "
211 SumStringMom.vect()<<
G4endl;
231 if(attempts > maxAttempts )
break;
233 #ifdef debug_PartonStringModel
234 G4cout<<
"Parton-String model: Number of produced particles "<<theResult->size()<<
G4endl;
240 for (
unsigned int i=0; i < theResult->size(); i++)
242 SumMass+=(*theResult)[i]->GetDefinition()->GetPDGMass();
244 #ifdef debug_PartonStringModel
245 G4cout<<i<<
" : "<<(*theResult)[i]->GetDefinition()->GetParticleName()<<
" "
246 <<(*theResult)[i]->Get4Momentum()<<
" "
247 <<(*theResult)[i]->Get4Momentum().mag()<<
G4endl;
248 SumPsecondr+=(*theResult)[i]->Get4Momentum();
251 #ifdef debug_PartonStringModel
254 }
while(SumMass > InvMass);
256 std::for_each(strings->begin(), strings->end(),
DeleteString() );
259 #ifdef debug_PartonStringModel
260 G4cout<<
"End of string model work ------------"<<G4endl<<
G4endl;
267 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
void SetMomentum(G4LorentzVector &aMomentum)
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 const G4ParticleDefinition * GetDefinition() const
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 G4Nucleon * GetNextNucleon()=0
G4ThreeVector GetMomentum() const
CLHEP::HepLorentzVector G4LorentzVector