Changeset 1055 for trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QStringChipsParticleLevelInterface.cc
- Timestamp:
- May 28, 2009, 4:26:57 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QStringChipsParticleLevelInterface.cc
r819 r1055 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // 25 // Short description: Interface of QGSC to CHIPS (Energy Flow of soft hadrons) 26 // ---------------------------------------------------------------------------- 26 27 27 28 //#define debug … … 143 144 } 144 145 G4int targetPDGCode = 90000000 + 1000*resZ + (resA-resZ); // PDG of theResidualNucleus 145 G4double targetMass = theNucleus->GetMass(); // Its mass 146 targetMass -= hitMass; // subtract masses of knocked out nucleons (binding?! M.K.) E/M 146 G4double targetMass=mNeut; 147 if (!resZ) // Nucleus of only neutrons 148 { 149 if (resA>1) targetMass*=resA; 150 } 151 else targetMass=G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ) 152 ->GetPDGMass(); 147 153 G4double targetEnergy = std::sqrt(hitMomentum.mag2()+targetMass*targetMass); 148 154 // !! @@ Target should be at rest: hitMomentum=(0,0,0) @@ !! M.K. (go to this system) … … 153 159 G4double impactX = theImpact.first; 154 160 G4double impactY = theImpact.second; 155 G4double i npactPar2 = impactX*impactX + impactY*impactY;161 G4double impactPar2 = impactX*impactX + impactY*impactY; 156 162 157 163 G4double radius2 = theNucleus->GetNuclearRadius(theInnerCoreDensityCut*perCent); … … 160 166 #ifdef pdebug 161 167 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: r="<<std::sqrt(radius2)/fermi 162 <<", b="<<std::sqrt(i npactPar2)/fermi<<", R="<<theNucleus->GetOuterRadius()/fermi163 <<", b/r="<<std::sqrt(i npactPar2/radius2)<<G4endl;164 #endif 165 if(radius2 - i npactPar2>0) pathlength = 2.*std::sqrt(radius2 - inpactPar2);168 <<", b="<<std::sqrt(impactPar2)/fermi<<", R="<<theNucleus->GetOuterRadius()/fermi 169 <<", b/r="<<std::sqrt(impactPar2/radius2)<<G4endl; 170 #endif 171 if(radius2 - impactPar2>0) pathlength = 2.*std::sqrt(radius2 - impactPar2); 166 172 G4double theEnergyLostInFragmentation = theEnergyLossPerFermi*pathlength/fermi; 167 173 … … 176 182 << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGCharge()<<" " 177 183 << theSecondaries->operator[](secondary)->GetDefinition()->GetPDGEncoding()<<" " 178 184 << a4Mom <<G4endl; 179 185 #endif 180 186 #ifdef pdebug … … 193 199 if((*current).first > toSort) // The current is smaller then existing 194 200 { 195 196 197 201 theSorted.insert(current, it); // It shifts the others up 202 inserted = true; 203 break; 198 204 } 199 205 } … … 234 240 <<theSorted.size()<<G4endl; 235 241 #endif 236 242 G4bool EscapeExists = false; 237 243 for(current = theSorted.begin(); current!=theSorted.end(); current++) 238 244 { 239 245 #ifdef pdebug 240 246 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: nq=" 241 247 <<(*current).second->GetDefinition()->GetQuarkContent(3)<<", naq=" 242 248 <<(*current).second->GetDefinition()->GetAntiQuarkContent(3)<<", PDG=" … … 306 312 307 313 #ifdef pdebug 308 314 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: E="<<runningEnergy<<", EL=" 309 315 <<theEnergyLostInFragmentation<<G4endl; 310 316 #endif 311 312 if(runningEnergy > theEnergyLostInFragmentation) break; 313 317 if(runningEnergy > theEnergyLostInFragmentation) 318 { 319 EscapeExists = true; 320 break; 321 } 314 322 #ifdef CHIPSdebug 315 323 G4cout <<"G4QStringChipsParticleLevelInterface::Propagate: ABSORBED STRING particles " 316 324 <<(*current).second->GetDefinition()->GetPDGCharge()<<" " 317 325 << (*current).second->GetDefinition()->GetPDGEncoding()<<" " 318 326 << (*current).second->Get4Momentum() <<G4endl; 319 327 #endif 320 328 #ifdef pdebug … … 322 330 <<current->second->GetDefinition()->GetPDGCharge()<<", PDG=" 323 331 <<current->second->GetDefinition()->GetPDGEncoding()<<", 4M=" 324 332 <<current->second->Get4Momentum()<<G4endl; 325 333 #endif 326 334 … … 382 390 { 383 391 theFinalContents[hp] +=theContents[running]; 384 385 386 392 *(theFinalMomenta[hp])+=*(theMomenta[running]); 393 running++; 394 if(running == theContents.size()) break; 387 395 } 388 396 } … … 402 410 G4QNucleus::SetParameters(fractionOfSingleQuasiFreeNucleons, 403 411 fractionOfPairedQuasiFreeNucleons, 404 405 412 clusteringCoefficient, 413 fusionToExchange); 406 414 G4Quasmon::SetParameters(temperature, halfTheStrangenessOfSee, etaToEtaPrime); 407 415 … … 424 432 G4QCHIPSWorld::Get()->GetParticles(nop); 425 433 G4QEnvironment* pan= new G4QEnvironment(projHV, targetPDGCode); 434 #ifdef pdebug 435 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: CHIPS fragmentation, rA=" 436 <<resA<<", #AbsPt="<<particleCount<<G4endl; 437 #endif 426 438 try 427 439 { … … 438 450 { 439 451 G4cerr <<" Incoming 4-momentum and PDG code of "<<i<<"'th hadron: " 440 452 <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl; 441 453 } 442 454 throw; … … 447 459 delete pan; 448 460 } 449 else output = new G4QHadronVector; 450 461 else 462 { 463 #ifdef pdebug 464 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: NO CHIPS fragmentation, rA=" 465 <<resA<<", #AbsPt="<<particleCount<<G4endl; 466 #endif 467 output = new G4QHadronVector; 468 } 451 469 // Fill the result. 452 470 #ifdef CHIPSdebug 453 G4cout << "NEXT EVENT "<<endl;471 G4cout << "NEXT EVENT, EscapeExists="<<EscapeExists<<G4endl; 454 472 #endif 455 473 456 474 // first decay and add all escaping particles. 457 for(current = firstEscape; current!=theSorted.end(); current++)475 if (EscapeExists) for (current = firstEscape; current!=theSorted.end(); current++) 458 476 { 459 477 G4KineticTrack* aResult = (*current).second; … … 472 490 theSec->SetMomentum(current4Mom.vect()); 473 491 #ifdef pdebug 474 492 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS stable PDG=" 475 493 <<aResult->GetDefinition()->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 476 494 #endif … … 487 505 theSec->SetMomentum(current4Mom.vect()); 488 506 #ifdef pdebug 489 507 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* QGS decay PDG=" 490 508 <<secondaries->operator[](aSecondary)->GetDefinition()->GetPDGEncoding() 491 509 <<",4M="<<current4Mom<<G4endl; … … 561 579 theSec->SetMomentum(current4Mom.vect()); 562 580 #ifdef pdebug 563 581 G4cout<<"G4QStringChipsParticleLevelInterface::Propagate: *OUT* CHIPS PDG=" 564 582 <<theDefinition->GetPDGEncoding()<<",4M="<<current4Mom<<G4endl; 565 583 #endif … … 576 594 G4cout <<"CHIPS particles "<<theDefinition->GetPDGCharge()<<" " 577 595 << theDefinition->GetPDGEncoding()<<" " 578 596 << output->operator[](particle)->Get4Momentum() <<G4endl; 579 597 #endif 580 598 581 599 delete output->operator[](particle); 600 } 601 else 602 { 603 if(resA>0) 604 { 605 G4ParticleDefinition* theDefinition = G4Neutron::Neutron(); 606 if(resA==1) // The residual nucleus at rest must be added to conserve BaryN & Charge 607 { 608 if(resZ == 1) theDefinition = G4Proton::Proton(); 609 } 610 else theDefinition = G4ParticleTable::GetParticleTable()->FindIon(resZ,resA,0,resZ); 611 theSec = new G4ReactionProduct(theDefinition); 612 theSec->SetTotalEnergy(theDefinition->GetPDGMass()); 613 theSec->SetMomentum(G4ThreeVector(0.,0.,0.)); 614 theResult->push_back(theSec); 615 if(!resZ && resA>0) for(G4int ni=1; ni<resA; ni++) 616 { 617 theSec = new G4ReactionProduct(theDefinition); 618 theSec->SetTotalEnergy(theDefinition->GetPDGMass()); 619 theSec->SetMomentum(G4ThreeVector(0.,0.,0.)); 620 theResult->push_back(theSec); 621 } 622 } 582 623 } 583 624 delete output; … … 588 629 G4cout << "QUASMON preparation info " 589 630 << 1./MeV*proj4Mom<<" " 590 591 592 593 594 595 596 631 << 1./MeV*targ4Mom<<" " 632 << nD<<" "<<nU<<" "<<nS<<" "<<nAD<<" "<<nAU<<" "<<nAS<<" " 633 << hitCount<<" " 634 << particleCount<<" " 635 << theLow<<" " 636 << theHigh<<" " 637 << G4endl; 597 638 #endif 598 639
Note: See TracChangeset
for help on using the changeset viewer.