51 G4cout<<
"G4QStringChipsParticleLevelInterface::Constructor is called"<<
G4endl;
53 theEnergyLossPerFermi = 1.*GeV;
55 fractionOfSingleQuasiFreeNucleons = 0.5;
56 fractionOfPairedQuasiFreeNucleons = 0.05;
57 clusteringCoefficient = 5.;
59 halfTheStrangenessOfSee = 0.3;
61 fusionToExchange = 1.;
62 theInnerCoreDensityCut = 50.;
64 if(getenv(
"ChipsParameterTuning"))
66 G4cout <<
"Please enter the energy loss per fermi in GeV"<<
G4endl;
67 G4cin >> theEnergyLossPerFermi;
68 theEnergyLossPerFermi *= GeV;
71 G4cout <<
"Please enter the fractionOfSingleQuasiFreeNucleons"<<
G4endl;
72 G4cin >> fractionOfSingleQuasiFreeNucleons;
73 G4cout <<
"Please enter the fractionOfPairedQuasiFreeNucleons"<<
G4endl;
74 G4cin >> fractionOfPairedQuasiFreeNucleons;
75 G4cout <<
"Please enter the clusteringCoefficient"<<
G4endl;
76 G4cin >> clusteringCoefficient;
79 G4cout <<
"Please enter halfTheStrangenessOfSee"<<
G4endl;
80 G4cin >> halfTheStrangenessOfSee;
82 G4cin >> etaToEtaPrime;
84 G4cin >> fusionToExchange;
85 G4cout <<
"Please enter cut-off for calculating the nuclear radius in percent"<<
G4endl;
86 G4cin >> theInnerCoreDensityCut;
94 G4cout<<
"G4QStringChipsParticleLevelInterface::ApplyYourself is called"<<
G4endl;
106 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate is called"<<
G4endl;
110 if(theSecondaries->size() == 1)
118 theFastResult->push_back(theFastSec);
119 return theFastResult;
133 unsigned int hitCount = 0;
148 G4int targetPDGCode = 90000000 + 1000*resZ + (resA-resZ);
152 if (resA>1) targetMass*=resA;
156 G4double targetEnergy = std::sqrt(hitMomentum.
mag2()+targetMass*targetMass);
163 G4double impactY = theImpact.second;
164 G4double impactPar2 = impactX*impactX + impactY*impactY;
170 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: r="<<std::sqrt(radius2)/fermi
171 <<
", b="<<std::sqrt(impactPar2)/fermi<<
", R="<<theNucleus->
GetOuterRadius()/fermi
172 <<
", b/r="<<std::sqrt(impactPar2/radius2)<<
G4endl;
174 if(radius2 - impactPar2>0) pathlength = 2.*std::sqrt(radius2 - impactPar2);
175 G4double theEnergyLostInFragmentation = theEnergyLossPerFermi*pathlength/fermi;
178 std::list<std::pair<G4double, G4KineticTrack *> > theSorted;
179 std::list<std::pair<G4double, G4KineticTrack *> >::iterator current;
180 for(
unsigned int secondary = 0; secondary<theSecondaries->size(); secondary++)
182 G4LorentzVector a4Mom = theSecondaries->operator[](secondary)->Get4Momentum();
184 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: ALL STRING particles "
185 << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGCharge()<<
" "
186 << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGEncoding()<<
" "
190 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: in C="
191 <<theSecondaries->operator[](secondary)->GetDefinition()->GetPDGCharge()<<
",PDG="
192 <<theSecondaries->operator[](secondary)->GetDefinition()->GetPDGEncoding()
193 <<
",4M="<<a4Mom<<
", current nS="<<theSorted.size()<<
G4endl;
196 std::pair<G4double, G4KineticTrack *> it;
198 it.second = theSecondaries->operator[](secondary);
200 for(current = theSorted.begin(); current!=theSorted.end(); current++)
202 if((*current).first > toSort)
204 theSorted.insert(current, it);
209 if(!inserted) theSorted.push_back(it);
219 std::list<std::pair<G4double,G4KineticTrack*> >::iterator firstEscape=theSorted.begin();
221 G4int particleCount = 0;
222 G4LorentzVector theLow = (*(theSorted.begin())).second->Get4Momentum();
226 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: CHIPS ENERGY LOST "
227 <<theEnergyLostInFragmentation<<
". Sorted rapidities event start"<<
G4endl;
230 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: total CHIPS energy = "
231 <<theEnergyLostInFragmentation<<
". Start rapidity sorting nS="<<theSorted.size()
236 std::vector<G4QContent> theContents;
237 std::vector<G4LorentzVector*> theMomenta;
242 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: Absorption nS="
243 <<theSorted.size()<<
G4endl;
245 G4bool EscapeExists =
false;
246 for(current = theSorted.begin(); current!=theSorted.end(); current++)
249 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: nq="
250 <<(*current).second->GetDefinition()->GetQuarkContent(3)<<
", naq="
251 <<(*current).second->GetDefinition()->GetAntiQuarkContent(3)<<
", PDG="
252 <<(*current).second->GetDefinition()->GetPDGEncoding()<<
",4M="
253 <<(*current).second->Get4Momentum()<<
G4endl;
255 firstEscape = current;
306 if (baryn>0 && charge>0 && strang<1) runningEnergy-=mProt;
307 else if(baryn>0 && strang<1) runningEnergy-=mNeut;
308 else if(baryn>0) runningEnergy-=mLamb;
309 else if(baryn<0) runningEnergy+=mProt;
312 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: sorted rapidities "
313 <<(*current).second->Get4Momentum().rapidity()<<
G4endl;
317 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: E="<<runningEnergy<<
", EL="
318 <<theEnergyLostInFragmentation<<
G4endl;
320 if(runningEnergy > theEnergyLostInFragmentation)
326 G4cout <<
"G4QStringChipsParticleLevelInterface::Propagate: ABSORBED STRING particles "
327 <<(*current).second->GetDefinition()->GetPDGCharge()<<
" "
328 << (*current).second->GetDefinition()->GetPDGEncoding()<<
" "
329 << (*current).second->Get4Momentum() <<
G4endl;
332 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate:C="
333 <<current->second->GetDefinition()->GetPDGCharge()<<
", PDG="
334 <<current->second->GetDefinition()->GetPDGEncoding()<<
", 4M="
335 <<current->second->Get4Momentum()<<
G4endl;
340 theHigh = (*current).second->Get4Momentum();
341 proj4Mom = (*current).second->Get4Momentum();
343 nD = (*current).second->GetDefinition()->GetQuarkContent(1);
344 nU = (*current).second->GetDefinition()->GetQuarkContent(2);
345 nS = (*current).second->GetDefinition()->GetQuarkContent(3);
346 nAD = (*current).second->GetDefinition()->GetAntiQuarkContent(1);
347 nAU = (*current).second->GetDefinition()->GetAntiQuarkContent(2);
348 nAS = (*current).second->GetDefinition()->GetAntiQuarkContent(3);
349 G4QContent aProjectile(nD, nU, nS, nAD, nAU, nAS);
353 G4cout <<
"G4QStringChipsParticleLevelInterface::Propagate: Quark content: d="<<nD
354 <<
", u="<<nU<<
", s="<<nS<<
"Anti-quark content: anit-d="<<nAD<<
", anti-u="<<nAU
355 <<
", anti-s="<<nAS<<
". G4QContent is constructed"<<endl;
358 theContents.push_back(aProjectile);
362 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: projectile momentum = "
367 theMomenta.push_back(aVec);
369 std::vector<G4QContent> theFinalContents;
370 std::vector<G4LorentzVector*> theFinalMomenta;
372 for(
unsigned int hp = 0; hp<theContents.size(); hp++)
375 projHV.push_back(aHadron);
380 for (i=0; i<theFinalMomenta.size(); i++)
delete theFinalMomenta[i];
381 for (i=0; i<theMomenta.size(); i++)
delete theMomenta[i];
382 theFinalMomenta.clear();
386 fractionOfPairedQuasiFreeNucleons,
387 clusteringCoefficient,
392 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: G4QNucleus parameters "
393 <<fractionOfSingleQuasiFreeNucleons<<
" "<<fractionOfPairedQuasiFreeNucleons
394 <<
" "<<clusteringCoefficient<<
G4endl;
395 G4cout<<
"G4Quasmon parameters "<<temperature<<
" "<<halfTheStrangenessOfSee<<
" "
396 <<etaToEtaPrime <<
G4endl;
397 G4cout<<
"The Target PDG code = "<<targetPDGCode<<
G4endl;
398 G4cout<<
"The projectile momentum = "<<1./MeV*proj4Mom<<
G4endl;
399 G4cout<<
"The target momentum = "<<1./MeV*targ4Mom<<
G4endl;
404 if (particleCount!=0 && resA!=0)
410 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: CHIPS fragmentation, rA="
411 <<resA<<
", #AbsPt="<<particleCount<<
G4endl;
419 G4cerr <<
"Exception thrown of G4QStringChipsParticleLevelInterface "<<
G4endl;
421 G4cerr <<
" The projectile momentum = "<<1./MeV*proj4Mom<<
G4endl;
423 G4cerr <<
" Dumping the information in the pojectile list"<<
G4endl;
424 for(i=0; i< projHV.size(); i++)
426 G4cerr <<
" Incoming 4-momentum and PDG code of "<<i<<
"'th hadron: "
427 <<
" "<< projHV[i]->Get4Momentum()<<
" "<<projHV[i]->GetPDGCode()<<
G4endl;
432 std::for_each(projHV.begin(), projHV.end(),
DeleteQHadron());
439 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: NO CHIPS fragmentation, rA="
440 <<resA<<
", #AbsPt="<<particleCount<<
G4endl;
446 G4cout <<
"NEXT EVENT, EscapeExists="<<EscapeExists<<
G4endl;
450 if (EscapeExists)
for (current = firstEscape; current!=theSorted.end(); current++)
457 secondaries = aResult->
Decay();
459 if ( secondaries == NULL )
467 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG="
470 theResult->push_back(theSec);
474 for (
unsigned int aSecondary=0; aSecondary<secondaries->size(); aSecondary++)
476 theSec=
new G4ReactionProduct(secondaries->operator[](aSecondary)->GetDefinition());
477 G4LorentzVector current4Mom = secondaries->operator[](aSecondary)->Get4Momentum();
482 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS decay PDG="
483 <<secondaries->operator[](aSecondary)->GetDefinition()->GetPDGEncoding()
484 <<
",4M="<<current4Mom<<
G4endl;
486 theResult->push_back(theSec);
493 delete theSecondaries;
496 G4int maxParticle=output->size();
498 G4cout <<
"Number of particles from string"<<theResult->size()<<
G4endl;
499 G4cout <<
"Number of particles from chips"<<maxParticle<<
G4endl;
502 G4cout <<
"Number of particles from QGS="<<theResult->size()<<
G4endl;
503 G4cout <<
"Number of particles from CHIPS="<<maxParticle<<
G4endl;
505 if(maxParticle)
for(
G4int particle = 0; particle < maxParticle; particle++)
507 if(output->operator[](particle)->GetNFragments() != 0)
509 delete output->operator[](particle);
512 G4int pdgCode = output->operator[](particle)->GetPDGCode();
516 G4cerr <<
"PDG code of chips particle = "<<pdgCode<<
G4endl;
527 G4int aZ = (pdgCode-90000000)/1000;
528 if (aZ>1000) aZ=aZ%1000;
529 G4int anN = pdgCode-90000000-1000*aZ;
530 if(anN>1000) anN=anN%1000;
545 G4cout <<
"Particle code produced = "<< pdgCode <<
G4endl;
551 G4LorentzVector current4Mom = output->operator[](particle)->Get4Momentum();
556 G4cout<<
"G4QStringChipsParticleLevelInterface::Propagate: *OUT* CHIPS PDG="
559 theResult->push_back(theSec);
564 G4cerr <<
"Getting unknown pdgCode from chips in ParticleLevelInterface"<<
G4endl;
571 << output->operator[](particle)->Get4Momentum() <<
G4endl;
574 delete output->operator[](particle);
589 theResult->push_back(theSec);
590 if(!resZ && resA>0)
for(
G4int ni=1; ni<resA; ni++)
595 theResult->push_back(theSec);
602 G4cout <<
"Number of particles"<<theResult->size()<<
G4endl;
604 G4cout <<
"QUASMON preparation info "
605 << 1./MeV*proj4Mom<<
" "
606 << 1./MeV*targ4Mom<<
" "
607 << nD<<
" "<<nU<<
" "<<nS<<
" "<<nAD<<
" "<<nAU<<
" "<<nAS<<
" "
609 << particleCount<<
" "
CLHEP::HepLorentzVector G4LorentzVector
std::vector< G4QHadron * > G4QHadronVector
std::vector< G4ReactionProduct * > G4ReactionProductVector
CLHEP::Hep3Vector G4ThreeVector
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
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 * Lambda()
static G4Lambda * LambdaDefinition()
static G4Neutron * Neutron()
virtual G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & GetMomentum() const
G4double GetPDGMass() const
G4int GetPDGEncoding() const
G4int GetQuarkContent(G4int flavor) const
G4double GetPDGWidth() const
G4double GetPDGCharge() const
G4int GetBaryonNumber() const
G4double GetPDGLifeTime() const
G4ParticleDefinition * FindIon(G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
static G4Proton * Proton()
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)
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &theNucleus)
virtual G4ReactionProductVector * Propagate(G4KineticTrackVector *theSecondaries, G4V3DNucleus *theNucleus)
G4QStringChipsParticleLevelInterface()
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)
std::pair< G4double, G4double > RefetchImpactXandY()
virtual G4double GetOuterRadius()=0
virtual G4Nucleon * GetNextNucleon()=0
virtual G4bool StartLoop()=0
virtual G4double GetNuclearRadius()=0