213 for ( std::vector<G4PhysicsTable*>::iterator it =
fBankT.begin();
214 it !=
fBankT.end(); ++it ) {
215 if ( (*it) ) (*it)->clearAndDestroy();
257 G4int iTkin, jTransfer;
259 G4double t1, t2, dt, delta = 0., sum = 0.;
275 plab = std::sqrt( Tkin*( Tkin + 2*
fMassProj ) );
284 if( tMax > 15.*
GeV*
GeV ) tMax = 15.*GeV*
GeV;
292 for( jTransfer =
fBinT-1; jTransfer >= 1; jTransfer--)
294 t1 = dt*(jTransfer-1);
308 vectorT->
PutValue( jTransfer-1, t1, sum );
326 G4int iTkin, iTransfer;
328 G4double Tkin = std::sqrt(m1*m1+p*p) - m1;
346 if ( delta < deltaMax ) iTkin =
fInTkin;
351 if( Tkin < fEnergyVector->GetLowEdgeEnergy(iTkin) )
break;
355 if ( iTkin < 0 ) iTkin = 0;
366 for(iTransfer = 0; iTransfer <
fBinT-1; iTransfer++)
368 if( position >= (*(*
fTableT)(iTkin))(iTransfer) )
break;
370 if (iTransfer >= fBinT-1) iTransfer = fBinT-2;
385 for(iTransfer = 0; iTransfer <
fBinT-1; iTransfer++)
388 if( position >= (*(*
fTableT)(iTkin))(iTransfer) )
break;
390 if (iTransfer >= fBinT-1) iTransfer = fBinT-2;
442 G4int iTkin, iTransfer;
444 G4double Tkin = std::sqrt(m1*m1+p*p) - m1;
461 if ( delta < deltaMax ) iTkin =
fInTkin;
466 if( Tkin < fEnergyVector->GetLowEdgeEnergy(iTkin) )
break;
470 if ( iTkin < 0 ) iTkin = 0;
479 for(iTransfer = 0; iTransfer <
fBinT-1; iTransfer++)
481 if( position >= (*(*
fTableT)(iTkin))(iTransfer) )
break;
483 if (iTransfer >= fBinT-1) iTransfer = fBinT-2;
492 position = (*(*fTableT)(iTkin))(0)*rand;
496 G4int sTransfer = 0, fTransfer =
fBinT - 2, dTransfer = fTransfer - sTransfer;
499 for( iTransfer = 0; iTransfer <
fBinT - 1; iTransfer++ )
504 y2 = (*(*fTableT)(iTkin))( sTransfer + dTransfer );
506 if( y2 > position ) sTransfer += dTransfer;
509 if( dTransfer < 1 )
break;
511 t = (*fTableT)(iTkin)->GetLowEdgeEnergy(sTransfer);
525 G4double t1, t2, dt, delta = 0., sum = 0. ;
538 if( tMax > 15.*
GeV*
GeV ) tMax = 15.*GeV*
GeV;
547 G4cout<<
"s = "<<std::sqrt(
fSpp)/GeV<<
" GeV; fPcms = "<<fPcms/GeV
548 <<
" GeV; qMax = "<<tMax/GeV/GeV<<
" GeV2; dt = "<<dt/GeV/GeV<<
" GeV2"<<
G4endl;
553 for( jTransfer =
fBinT-1; jTransfer >= 1; jTransfer-- )
555 t1 = dt*(jTransfer-1);
558 if( fMassProj > 900.*
MeV )
577 vectorT->
PutValue( jTransfer-1, t1, sum );
596 G4int iTkin, iTransfer, iTmin;
603 for(iTransfer = 0; iTransfer <
fBinT-1; iTransfer++)
606 if( tMin <= (*
fTableT)(iTkin)->GetLowEdgeEnergy(iTransfer) )
break;
609 if(iTmin < 0 ) iTmin = 0;
613 for( iTmin = 0; iTransfer < fBinT-1; iTransfer++)
615 if( position > (*(*
fTableT)(iTkin))(iTransfer) )
break;
617 if (iTransfer >= fBinT-1) iTransfer = fBinT-2;
636 randTransfer = (*fTableT)(iTkin)->GetLowEdgeEnergy(iTransfer);
641 if ( iTransfer >=
G4int((*
fTableT)(iTkin)->GetVectorLength()) )
643 iTransfer = (*fTableT)(iTkin)->GetVectorLength() - 1;
645 y1 = (*(*fTableT)(iTkin))(iTransfer-1);
646 y2 = (*(*fTableT)(iTkin))(iTransfer);
648 x1 = (*fTableT)(iTkin)->GetLowEdgeEnergy(iTransfer-1);
649 x2 = (*fTableT)(iTkin)->GetLowEdgeEnergy(iTransfer);
654 if ( x1 == x2 ) randTransfer = x2;
658 if ( delta < epsilon*mean )
660 else randTransfer = x1 + ( position - y1 )*( x2 - x1 )/delta;
670 { 2.76754, 4.8, 4.8, 0.05, 0.742441, 10.5 },
671 { 3.07744, 5.4, 5.4, 0.02, 0.83818, 6.5 },
672 { 3.36305, 5.2, 5.2, 0.02, 0.838893, 7.5 },
673 { 4.32941, 6, 6, 0.03, 0.769389, 7.5 },
674 { 4.62126, 6, 6, 0.03, 0.770111, 6.5 },
676 { 5.47416, 4.5, 4.5, 0.03, 0.813185, 7.5 },
677 { 6.15088, 6.5, 6.5, 0.02, 0.799539, 6.5 },
678 { 6.77474, 5.2, 5.2, 0.03, 0.784901, 7.5 },
679 { 9.77775, 7, 7, 0.03, 0.742531, 6.5 },
681 { 10.4728, 5.2, 5.2, 0.03, 0.780439, 7.5 },
683 { 13.7631, 7, 7, 0.008, 0.8664, 5.0 },
684 { 19.4184, 6.8, 6.8, 0.009, 0.861337, 2.5 },
685 { 23.5, 6.8, 6.8, 0.007, 0.878112, 1.5 },
687 { 24.1362, 7.2, 7.2, 0.008, 0.864745, 5.5 },
688 { 52.8, 6.8, 6.8, 0.008, 0.871929, 1.5 },
690 { 546, 7.4, 7.4, 0.013, 0.845877, 5.5 },
691 { 1960, 7.8, 7.8, 0.022, 0.809062, 7.5 },
692 { 7000, 8, 8, 0.024, 0.820441, 5.5 }
702 { 2.5627, 3.8, 3.3, 0.22, 0.222, 1.5 },
703 { 2.93928, 4.3, 3.8, 0.2, 0.250601, 1.3 },
704 { 3.22326, 4.8, 4.3, 0.13, 0.32751, 2.5 },
705 { 7.80704, 5.5, 5, 0.13, 0.340631, 2.5 },
706 { 9.7328, 5, 4.5, 0.05, 0.416319, 5.5 },
708 { 13.7315, 5.3, 4.8, 0.05, 0.418426, 5.5 },
709 { 16.6359, 6.3, 5.8, 0.05, 0.423817, 5.5 },
710 { 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)
G4ParticleDefinition * thePionMinus
void PutValue(size_t binNumber, G4double binValue, G4double dataValue)
G4PhysicsLogVector * fEnergyVector
static const G4double theNuclNuclData[18][6]
G4double lowEnergyRecoilLimit
G4double GetLowEdgeEnergy(size_t binNumber) const
G4double lowestEnergyLimit
G4ParticleDefinition * theProton
static G4KaonMinus * KaonMinus()
void BuildTableT(G4ParticleDefinition *target, G4ParticleDefinition *projectile)
std::vector< G4PhysicsTable * > fBankT
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)
G4double lowEnergyLimitHE
G4HadronNucleonXsc * fHadrNuclXsc
static G4Proton * Proton()
static G4PionPlus * PionPlus()
G4double GetdsdtF123qQgG(G4double q)
G4double GetdsdtF123(G4double q)
G4ParticleDefinition * fProjectile
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()
void insertAt(size_t, G4PhysicsVector *)
void SetMaxEnergy(const G4double anEnergy)
G4ParticleDefinition * thePionPlus
static const G4double thePiKaNuclData[8][6]
static G4KaonPlus * KaonPlus()
G4ParticleDefinition * fTarget
G4ParticleDefinition * theNeutron
double epsilon(double density, double temperature)
G4double SampleTest(G4double tMin)