79 lowEnergyRecoilLimit = 100.*
keV;
80 lowEnergyLimitQ = 0.0*
GeV;
81 lowEnergyLimitHE = 0.0*
GeV;
82 lowestEnergyLimit= 0.0*
keV;
83 plabLowLimit = 20.0*
MeV;
85 fRhoReIm=fSigmaTot=fOptRatio=fSpp=fPcms=0.0;
120 lowEnergyRecoilLimit = 100.*
keV;
121 lowEnergyLimitQ = 0.0*
GeV;
122 lowEnergyLimitHE = 0.0*
GeV;
123 lowestEnergyLimit = 0.0*
keV;
124 plabLowLimit = 20.0*
MeV;
126 fRhoReIm=fSigmaTot=fOptRatio=fSpp=fPcms=0.0;
134 fProjectile = projectile;
137 fMassSum2 = (fMassTarg+fMassProj)*(fMassTarg+fMassProj);
138 fMassDif2 = (fMassTarg-fMassProj)*(fMassTarg-fMassProj);
165 lowEnergyRecoilLimit = 100.*
keV;
166 lowEnergyLimitQ = 0.0*
GeV;
167 lowEnergyLimitHE = 0.0*
GeV;
168 lowestEnergyLimit= 0.0*
keV;
169 plabLowLimit = 20.0*
MeV;
171 fRhoReIm=fSigmaTot=fOptRatio=fSpp=fPcms=0.0;
175 fProjectile = projectile;
184 fMassSum2 = (fMassTarg+fMassProj)*(fMassTarg+fMassProj);
185 fMassDif2 = (fMassTarg-fMassProj)*(fMassTarg-fMassProj);
207 if ( fEnergyVector ) {
208 delete fEnergyVector;
212 for ( std::vector<G4PhysicsTable*>::iterator it = fBankT.begin();
213 it != fBankT.end(); ++it ) {
214 if ( (*it) ) (*it)->clearAndDestroy();
219 if(fHadrNuclXsc)
delete fHadrNuclXsc;
236 fBankT.push_back(fTableT);
242 fBankT.push_back(fTableT);
246 fBankT.push_back(fTableT);
256 G4int iTkin, jTransfer;
258 G4double t1, t2, dt, delta = 0., sum = 0.;
261 fProjectile = projectile;
264 fMassSum2 = (fMassTarg+fMassProj)*(fMassTarg+fMassProj);
265 fMassDif2 = (fMassTarg-fMassProj)*(fMassTarg-fMassProj);
271 for( iTkin = 0; iTkin < fEnergyBin; iTkin++)
274 plab = std::sqrt( Tkin*( Tkin + 2*fMassProj ) );
282 tMax = 4.*fPcms*fPcms;
283 if( tMax > 15.*
GeV*
GeV ) tMax = 15.*GeV*
GeV;
291 for( jTransfer = fBinT-1; jTransfer >= 1; jTransfer--)
293 t1 = dt*(jTransfer-1);
296 if( fMassProj > 900.*
MeV )
307 vectorT->
PutValue( jTransfer-1, t1, sum );
310 fTableT->
insertAt( iTkin, vectorT );
325 G4int iTkin, iTransfer;
327 G4double Tkin = std::sqrt(m1*m1+p*p) - m1;
342 G4double delta = std::abs(Tkin - fOldTkin)/(Tkin + fOldTkin);
345 if ( delta < deltaMax ) iTkin = fInTkin;
348 for( iTkin = 0; iTkin < fEnergyBin; iTkin++)
350 if( Tkin < fEnergyVector->GetLowEdgeEnergy(iTkin) )
break;
353 if ( iTkin >= fEnergyBin ) iTkin = fEnergyBin-1;
354 if ( iTkin < 0 ) iTkin = 0;
359 if (iTkin == fEnergyBin -1 || iTkin == 0 )
365 for(iTransfer = 0; iTransfer < fBinT-1; iTransfer++)
367 if( position >= (*(*fTableT)(iTkin))(iTransfer) )
break;
369 if (iTransfer >= fBinT-1) iTransfer = fBinT-2;
384 for(iTransfer = 0; iTransfer < fBinT-1; iTransfer++)
387 if( position >= (*(*fTableT)(iTkin))(iTransfer) )
break;
389 if (iTransfer >= fBinT-1) iTransfer = fBinT-2;
441 G4int iTkin, iTransfer;
443 G4double Tkin = std::sqrt(m1*m1+p*p) - m1;
457 G4double delta = std::abs(Tkin - fOldTkin)/(Tkin + fOldTkin);
460 if ( delta < deltaMax ) iTkin = fInTkin;
463 for( iTkin = 0; iTkin < fEnergyBin; iTkin++ )
465 if( Tkin < fEnergyVector->GetLowEdgeEnergy(iTkin) )
break;
468 if ( iTkin >= fEnergyBin ) iTkin = fEnergyBin-1;
469 if ( iTkin < 0 ) iTkin = 0;
474 if (iTkin == fEnergyBin -1 || iTkin == 0 )
478 for(iTransfer = 0; iTransfer < fBinT-1; iTransfer++)
480 if( position >= (*(*fTableT)(iTkin))(iTransfer) )
break;
482 if (iTransfer >= fBinT-1) iTransfer = fBinT-2;
491 position = (*(*fTableT)(iTkin))(0)*rand;
495 G4int sTransfer = 0, fTransfer = fBinT - 2, dTransfer = fTransfer - sTransfer;
498 for( iTransfer = 0; iTransfer < fBinT - 1; iTransfer++ )
503 y2 = (*(*fTableT)(iTkin))( sTransfer + dTransfer );
505 if( y2 > position ) sTransfer += dTransfer;
508 if( dTransfer < 1 )
break;
510 t = (*fTableT)(iTkin)->GetLowEdgeEnergy(sTransfer);
524 G4double t1, t2, dt, delta = 0., sum = 0. ;
527 fProjectile = projectile;
530 fMassSum2 = (fMassTarg+fMassProj)*(fMassTarg+fMassProj);
531 fMassDif2 = (fMassTarg-fMassProj)*(fMassTarg-fMassProj);
532 fSpp = fMassProj*fMassProj + fMassTarg*fMassTarg + 2.*fMassTarg*std::sqrt(plab*plab + fMassProj*fMassProj);
533 fPcms = std::sqrt( (fSpp - fMassSum2)*(fSpp - fMassDif2)/4./fSpp);
535 G4cout<<
"fMassTarg = "<<fMassTarg<<
" MeV; fMassProj = "<<fMassProj<<
" MeV"<<
G4endl;
536 tMax = 4.*fPcms*fPcms;
537 if( tMax > 15.*
GeV*
GeV ) tMax = 15.*GeV*
GeV;
546 G4cout<<
"s = "<<std::sqrt(fSpp)/GeV<<
" GeV; fPcms = "<<fPcms/GeV
547 <<
" GeV; qMax = "<<tMax/GeV/GeV<<
" GeV2; dt = "<<dt/GeV/GeV<<
" GeV2"<<
G4endl;
552 for( jTransfer = fBinT-1; jTransfer >= 1; jTransfer-- )
554 t1 = dt*(jTransfer-1);
557 if( fMassProj > 900.*
MeV )
576 vectorT->
PutValue( jTransfer-1, t1, sum );
580 fBankT.push_back( fTableT );
595 G4int iTkin, iTransfer, iTmin;
602 for(iTransfer = 0; iTransfer < fBinT-1; iTransfer++)
605 if( tMin <= (*fTableT)(iTkin)->GetLowEdgeEnergy(iTransfer) )
break;
608 if(iTmin < 0 ) iTmin = 0;
612 for( iTmin = 0; iTransfer < fBinT-1; iTransfer++)
614 if( position > (*(*fTableT)(iTkin))(iTransfer) )
break;
616 if (iTransfer >= fBinT-1) iTransfer = fBinT-2;
635 randTransfer = (*fTableT)(iTkin)->GetLowEdgeEnergy(iTransfer);
640 if ( iTransfer >=
G4int((*fTableT)(iTkin)->GetVectorLength()) )
642 iTransfer = (*fTableT)(iTkin)->GetVectorLength() - 1;
644 y1 = (*(*fTableT)(iTkin))(iTransfer-1);
645 y2 = (*(*fTableT)(iTkin))(iTransfer);
647 x1 = (*fTableT)(iTkin)->GetLowEdgeEnergy(iTransfer-1);
648 x2 = (*fTableT)(iTkin)->GetLowEdgeEnergy(iTransfer);
653 if ( x1 == x2 ) randTransfer = x2;
657 if ( delta < epsilon*mean )
659 else randTransfer = x1 + ( position - y1 )*( x2 - x1 )/delta;
665 const G4double G4hhElastic::theNuclNuclData[18][6] =
669 { 2.76754, 4.8, 4.8, 0.05, 0.742441, 10.5 },
670 { 3.07744, 5.4, 5.4, 0.02, 0.83818, 6.5 },
671 { 3.36305, 5.2, 5.2, 0.02, 0.838893, 7.5 },
672 { 4.32941, 6, 6, 0.03, 0.769389, 7.5 },
673 { 4.62126, 6, 6, 0.03, 0.770111, 6.5 },
675 { 5.47416, 4.5, 4.5, 0.03, 0.813185, 7.5 },
676 { 6.15088, 6.5, 6.5, 0.02, 0.799539, 6.5 },
677 { 6.77474, 5.2, 5.2, 0.03, 0.784901, 7.5 },
678 { 9.77775, 7, 7, 0.03, 0.742531, 6.5 },
680 { 10.4728, 5.2, 5.2, 0.03, 0.780439, 7.5 },
682 { 13.7631, 7, 7, 0.008, 0.8664, 5.0 },
683 { 19.4184, 6.8, 6.8, 0.009, 0.861337, 2.5 },
684 { 23.5, 6.8, 6.8, 0.007, 0.878112, 1.5 },
686 { 24.1362, 7.2, 7.2, 0.008, 0.864745, 5.5 },
687 { 52.8, 6.8, 6.8, 0.008, 0.871929, 1.5 },
689 { 546, 7.4, 7.4, 0.013, 0.845877, 5.5 },
690 { 1960, 7.8, 7.8, 0.022, 0.809062, 7.5 },
691 { 7000, 8, 8, 0.024, 0.820441, 5.5 }
697 const G4double G4hhElastic::thePiKaNuclData[8][6] =
701 { 2.5627, 3.8, 3.3, 0.22, 0.222, 1.5 },
702 { 2.93928, 4.3, 3.8, 0.2, 0.250601, 1.3 },
703 { 3.22326, 4.8, 4.3, 0.13, 0.32751, 2.5 },
704 { 7.80704, 5.5, 5, 0.13, 0.340631, 2.5 },
705 { 9.7328, 5, 4.5, 0.05, 0.416319, 5.5 },
707 { 13.7315, 5.3, 4.8, 0.05, 0.418426, 5.5 },
708 { 16.6359, 6.3, 5.8, 0.05, 0.423817, 5.5 },
709 { 19.3961, 5, 4.5, 0.05, 0.413477, 3.5 }
G4double Legendre10(T &typeT, F f, G4double a, G4double b)
void SetParametersCMS(G4double plab)
void PutValue(size_t index, G4double energy, G4double dataValue)
G4double GetLowEdgeEnergy(size_t binNumber) const
static G4KaonMinus * KaonMinus()
static constexpr double TeV
void BuildTableT(G4ParticleDefinition *target, G4ParticleDefinition *projectile)
void SetMinEnergy(G4double anEnergy)
void BuildTableTest(G4ParticleDefinition *target, G4ParticleDefinition *projectile, G4double plab)
G4GLOB_DLL std::ostream G4cout
G4double GetTransfer(G4int iMomentum, G4int iTransfer, G4double position)
static G4Proton * Proton()
static G4PionPlus * PionPlus()
G4double GetdsdtF123qQgG(G4double q)
G4double GetdsdtF123(G4double q)
static G4Neutron * Neutron()
G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int, G4int)
G4double GetPDGMass() const
G4double SampleBisectionalT(const G4ParticleDefinition *p, G4double plab)
static G4PionMinus * PionMinus()
static constexpr double GeV
void insertAt(size_t, G4PhysicsVector *)
void SetMaxEnergy(const G4double anEnergy)
static constexpr double MeV
static G4KaonPlus * KaonPlus()
static constexpr double keV
double epsilon(double density, double temperature)
G4double SampleTest(G4double tMin)