45 G4cout <<
"Please enter the energy loss per fermi in GeV"<<
G4endl;
46 G4cin >> theEnergyLossPerFermi;
49 G4cout<<
"G4StringChipsInterface::Constructor is called"<<
G4endl;
51 theEnergyLossPerFermi = 0.5*GeV;
59 G4cout<<
"G4StringChipsInterface::ApplyYourself is called"<<
G4endl;
68 G4cout<<
"G4StringChipsInterface::Propagate is called"<<
G4endl;
72 if(theSecondaries->size() == 1)
73 throw G4HadronicException(__FILE__, __LINE__,
"G4StringChipsInterface: Only one particle from String models!");
79 G4double inpactPar2 = impactX*impactX + impactY*impactY;
84 if(radius2 - inpactPar2>0) pathlength = 2.*std::sqrt(radius2 - inpactPar2);
85 G4double theEnergyLostInFragmentation = theEnergyLossPerFermi*pathlength/fermi;
88 std::list<std::pair<G4double, G4KineticTrack *> > theSorted;
89 std::list<std::pair<G4double, G4KineticTrack *> >::iterator current;
90 for(
unsigned int secondary = 0; secondary<theSecondaries->size(); secondary++)
92 G4LorentzVector a4Mom = theSecondaries->operator[](secondary)->Get4Momentum();
95 G4cout <<
"ALL STRING particles "<<theSecondaries->operator[](secondary)->GetDefinition()->GetPDGCharge()<<
" "
96 << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGEncoding()<<
" "
101 std::pair<G4double, G4KineticTrack *> it;
103 it.second = theSecondaries->operator[](secondary);
105 for(current = theSorted.begin(); current!=theSorted.end(); current++)
107 if((*current).first > toSort)
109 theSorted.insert(current, it);
116 theSorted.push_front(it);
133 std::list<std::pair<G4double, G4KineticTrack *> >::iterator firstEscaping = theSorted.begin();
135 G4int particleCount = 0;
136 G4LorentzVector theLow = (*(theSorted.begin())).second->Get4Momentum();
140 G4cout <<
"CHIPS ENERGY LOST "<<theEnergyLostInFragmentation<<
G4endl;
148 G4cout<<
"G4StringChipsInterface::Propagate: Absorption"<<
G4endl;
152 for(current = theSorted.begin(); current!=theSorted.end(); current++)
154 firstEscaping = current;
155 if((*current).second->GetDefinition()->GetQuarkContent(3)!=0 ||
156 (*current).second->GetDefinition()->GetAntiQuarkContent(3) !=0)
163 secondaries = aResult->
Decay();
165 if ( secondaries == NULL )
171 theResult->push_back(theSec);
175 for (
unsigned int aSecondary=0; aSecondary<secondaries->size(); aSecondary++)
177 theSec =
new G4ReactionProduct(secondaries->operator[](aSecondary)->GetDefinition());
178 G4LorentzVector current4Mom = secondaries->operator[](aSecondary)->Get4Momentum();
181 theResult->push_back(theSec);
188 runningEnergy += (*current).second->Get4Momentum().t();
189 if(runningEnergy > theEnergyLostInFragmentation)
break;
192 G4cout <<
"ABSORBED STRING particles "<<current->second->GetDefinition()->GetPDGCharge()<<
" "
193 << current->second->GetDefinition()->GetPDGEncoding()<<
" "
194 << current->second->Get4Momentum() <<
G4endl;
197 G4cout<<
"G4StringChipsInterface::Propagate:C="
198 <<current->second->GetDefinition()->GetPDGCharge()<<
", PDG="
199 << current->second->GetDefinition()->GetPDGEncoding()<<
", 4M="
200 << current->second->Get4Momentum() <<
G4endl;
205 theHigh = (*current).second->Get4Momentum();
206 proj4Mom += (*current).second->Get4Momentum();
209 G4cout <<
"sorted rapidities "<<current->second->Get4Momentum().rapidity()<<
G4endl;
213 nD += (*current).second->GetDefinition()->GetQuarkContent(1);
214 nU += (*current).second->GetDefinition()->GetQuarkContent(2);
215 nS += (*current).second->GetDefinition()->GetQuarkContent(3);
216 nAD += (*current).second->GetDefinition()->GetAntiQuarkContent(1);
217 nAU += (*current).second->GetDefinition()->GetAntiQuarkContent(2);
218 nAS += (*current).second->GetDefinition()->GetAntiQuarkContent(3);
223 G4cout <<
"Quark content: d="<<nD<<
", u="<<nU<<
", s="<< nS <<
G4endl;
224 G4cout <<
"Anti-quark content: anit-d="<<nAD<<
", anti-u="<<nAU<<
", anti-s="<< nAS <<
G4endl;
227 G4QContent theProjectiles(nD, nU, nS, nAD, nAU, nAS);
230 G4cout <<
"G4QContent is constructed"<<endl;
256 G4int targetPDGCode = 90000000 + 1000*resZ + (resA-resZ);
258 targetMass -= hitMass;
259 G4double targetEnergy = std::sqrt(hitMomentum.
mag2()+targetMass*targetMass);
267 G4double fractionOfSingleQuasiFreeNucleons = 0.5;
268 G4double fractionOfPairedQuasiFreeNucleons = 0.05;
269 G4double clusteringCoefficient = 5.;
271 G4double halfTheStrangenessOfSee = 0.3;
275 fractionOfPairedQuasiFreeNucleons,
276 clusteringCoefficient);
278 halfTheStrangenessOfSee,
282 G4cout <<
"G4QNucleus parameters "<< fractionOfSingleQuasiFreeNucleons <<
" "
283 << fractionOfPairedQuasiFreeNucleons <<
" "<< clusteringCoefficient <<
G4endl;
284 G4cout <<
"G4Quasmon parameters "<< temperature <<
" "<< halfTheStrangenessOfSee <<
" "
285 <<etaToEtaPrime <<
G4endl;
286 G4cout <<
"The Target PDG code = "<<targetPDGCode<<
G4endl;
287 G4cout <<
"The projectile momentum = "<<1./MeV*proj4Mom<<
G4endl;
288 G4cout <<
"The target momentum = "<<1./MeV*targ4Mom<<
G4endl;
302 proj4Mom = toZ*proj4Mom;
306 G4cout <<
"a Boosted projectile vector along z"<<proj4Mom<<
" "<<proj4Mom.
mag()<<
G4endl;
310 projHV.push_back(iH);
314 if (particleCount!=0)
323 G4cerr <<
"Exception thrown passing through G4ChiralInvariantPhaseSpace "<<
G4endl;
325 G4cerr <<
" Dumping the information in the pojectile list"<<
G4endl;
326 for(
size_t i=0; i< projHV.size(); i++)
328 G4cerr <<
" Incoming 4-momentum and PDG code of "<<i<<
"'th hadron: "
329 <<
" "<< projHV[i]->Get4Momentum()<<
" "<<projHV[i]->GetPDGCode()<<
G4endl;
333 std::for_each(projHV.begin(), projHV.end(),
DeleteQHadron());
341 G4cout <<
"NEXT EVENT"<<endl;
345 for(current = firstEscaping; current!=theSorted.end(); current++)
352 secondaries = aResult->
Decay();
354 if ( secondaries == NULL )
358 current4Mom = toLab*current4Mom;
362 theResult->push_back(theSec);
366 for (
unsigned int aSecondary=0; aSecondary<secondaries->size(); aSecondary++)
368 theSec =
new G4ReactionProduct(secondaries->operator[](aSecondary)->GetDefinition());
369 G4LorentzVector current4Mom = secondaries->operator[](aSecondary)->Get4Momentum();
370 current4Mom = toLab*current4Mom;
374 theResult->push_back(theSec);
381 delete theSecondaries;
385 G4cout <<
"Number of particles from string"<<theResult->size()<<
G4endl;
386 G4cout <<
"Number of particles from chips"<<output->size()<<
G4endl;
389 for(
unsigned int particle = 0; particle < output->size(); particle++)
391 if(output->operator[](particle)->GetNFragments() != 0)
393 delete output->operator[](particle);
397 G4int pdgCode = output->operator[](particle)->GetPDGCode();
406 G4int aZ = (pdgCode-90000000)/1000;
407 if (aZ>1000) aZ=aZ%1000;
408 G4int anN = pdgCode-90000000-1000*aZ;
409 if(anN>1000) anN=anN%1000;
426 G4cout <<
"Particle code produced = "<< pdgCode <<
G4endl;
430 G4LorentzVector current4Mom = output->operator[](particle)->Get4Momentum();
431 current4Mom = toLab*current4Mom;
435 theResult->push_back(theSec);
443 delete output->operator[](particle);
447 G4cout <<
"Number of particles"<<theResult->size()<<
G4endl;
450 G4cout <<
"QUASMON preparation info "
451 << 1./MeV*proj4Mom<<
" "
452 << 1./MeV*targ4Mom<<
" "
453 << nD<<
" "<<nU<<
" "<<nS<<
" "<<nAD<<
" "<<nAU<<
" "<<nAS<<
" "
455 << particleCount<<
" "
std::vector< G4QHadron * > G4QHadronVector
std::vector< G4ReactionProduct * > G4ReactionProductVector
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
HepLorentzRotation & rotateY(double delta)
HepLorentzRotation & rotateZ(double delta)
HepLorentzRotation inverse() const
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus, G4HadFinalState *aChange=0)
G4KineticTrackVector * Decay()
G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
static G4Lambda * LambdaDefinition()
static G4Neutron * Neutron()
virtual G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & GetMomentum() const
G4int GetPDGEncoding() const
G4double GetPDGWidth() const
G4double GetPDGCharge() const
G4double GetPDGLifeTime() const
G4ParticleDefinition * FindIon(G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
static G4QCHIPSWorld * Get()
G4QParticleVector * GetParticles(G4int nOfParts=0)
G4QHadronVector * Fragment()
static void SetParameters(G4double fN=.1, G4double fD=.05, G4double cP=4., G4double mR=1., G4double nD=.8 *CLHEP::fermi)
static void SetParameters(G4double temper=180., G4double ssin2g=.3, G4double etaetap=.3)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
virtual G4ReactionProductVector * Propagate(G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus)
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &theNucleus)
std::pair< G4double, G4double > RefetchImpactXandY()
virtual G4Nucleon * GetNextNucleon()=0
virtual G4bool StartLoop()=0
virtual G4double GetMass()=0
virtual G4double GetNuclearRadius()=0