Import Geant4 10.3.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2016-06-30 14:12:05 +02:00
parent a654a7ab1f
commit 4ec577e5c4
2021 changed files with 100995 additions and 78277 deletions
@@ -1,4 +1,4 @@
$Id: History 92048 2015-08-14 07:24:57Z gcosmo $
$Id: History 97394 2016-06-02 10:13:06Z gcosmo $
-------------------------------------------------------------------
==========================================================
@@ -14,6 +14,35 @@ code and to keep track of all tags.
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
1-June-2016 V. Uzhinsky (hadr-string-diff-V10-02-04)
Fine tuning of G4DiffractiveExcitation.cc of FTFmodel has been done
to describe NA49 exp. data, especially, <Pt> on Xf.
28-May-2016 V. Uzhinsky (hadr-string-diff-V10-02-03)
- Various <Pt^2> for diffr. and non-diffr. interactions were introduced
in G4FTFModel.cc for NA49 and NA61/SHINE exp. data.
23-May-2016 V. Uzhinsky (hadr-string-diff-V10-02-02)
- Tunning of FTF model parameters has been done.
17-May-2016 V. Uzhinsky (hadr-string-diff-V10-02-01)
- FTF model was essential improved:
Smearing of Delta-isobar mass was introduced;
Delta-isobars are now treated as a kinetic track;
Parameterisation the quark exchange process with excitation is improved also.
Na61/SHINE exp. data on Pi+, Pi-, K+, K- and protons in PP interactions at
20, 31, 40, 80 and 158 GeV/c are described. The ratio of <Strane Q>/<Normal Q>
in PP interactions is reproduced. The kink in AA interactions does not described.
5-May-2016 V. Uzhinsky (hadr-string-diff-V10-02-00)
- A bug was fixed in G4FTFModel for nucleus-nucleus interactions
if ( G4UniformRand() <
( 1.0 - target->GetSoftCollisionCount() / MaxNumOfInelCollisions ) * // Uzhi March 2015
( 1.0 - projectile->GetSoftCollisionCount() / MaxNumOfInelCollisions ) ) {
There are also some improvements in sampling of kinematical variables.
- G4FTFAnnihilation was improved. Now the code create Pi0, Eta and Eta_prime.
13-Aug-2015 A. Ribon (hadr-string-diff-V10-01-14)
- G4FTFModel and G4DiffractiveExcitation : Coverity fixes.
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4DiffractiveExcitation.cc 92048 2015-08-14 07:24:57Z gcosmo $
// $Id: G4DiffractiveExcitation.cc 97394 2016-06-02 10:13:06Z gcosmo $
//
// ------------------------------------------------------------
@@ -114,73 +114,76 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
G4int TargetPDGcode = target->GetDefinition()->GetPDGEncoding();
G4int absTargetPDGcode = std::abs( TargetPDGcode );
G4double M0target = Ptarget.mag();
//G4double TargetRapidity = Ptarget.rapidity();
G4double TargetRapidity = Ptarget.rapidity();
// Kinematical properties of the interactions
G4LorentzVector Psum = Pprojectile + Ptarget; // 4-momentum in CMS
G4LorentzVector Psum = Pprojectile + Ptarget; // Total 4-momentum in Lab.
G4double S = Psum.mag2();
G4double SqrtS = std::sqrt( S );
//Uzhi_SqrtS = std::sqrt( S );
// Check off-shellness of the participants
G4SampleResonance BrW; // Uzhi Oct. 2014
G4SampleResonance BrW;
G4bool PutOnMassShell( false );
G4double MminProjectile(0.); // Uzhi Oct. 2014
MminProjectile = BrW.GetMinimumMass(projectile->GetDefinition()); // Uzhi Oct. 2014
//G4double M0projectile = MminProjectile; // With de-excitation Uzhi Oct. 2014
//G4double M0projectile = Pprojectile.mag(); // Without de-excitation, see above
G4double MminProjectile = BrW.GetMinimumMass(projectile->GetDefinition());
//G4double M0projectile = MminProjectile; // With de-excitation
//G4double M0projectile = Pprojectile.mag(); // Without de-excitation
if ( M0projectile < MminProjectile )
{
PutOnMassShell = true;
M0projectile = BrW.SampleMass(projectile->GetDefinition(),projectile->GetDefinition()->GetPDGMass() + 5.0*projectile->GetDefinition()->GetPDGWidth());
M0projectile = BrW.SampleMass(projectile->GetDefinition(),
projectile->GetDefinition()->GetPDGMass() +
5.0*projectile->GetDefinition()->GetPDGWidth() );
}
G4double M0projectile2 = M0projectile * M0projectile;
G4double ProjectileDiffStateMinMass = theParameters->GetProjMinDiffMass(); // Uzhi Oct 2014
G4double ProjectileNonDiffStateMinMass = theParameters->GetProjMinNonDiffMass(); // Uzhi Oct 2014
if ( M0projectile > ProjectileDiffStateMinMass ) { // Uzhi Oct 2014
G4double ProjectileDiffStateMinMass = theParameters->GetProjMinDiffMass();
G4double ProjectileNonDiffStateMinMass = theParameters->GetProjMinNonDiffMass();
if ( M0projectile > ProjectileDiffStateMinMass ) {
ProjectileDiffStateMinMass = M0projectile + 220.0*MeV;
ProjectileNonDiffStateMinMass = M0projectile + 220.0*MeV;
if(absProjectilePDGcode > 3000) { // Strange baryon // Uzhi Nov. 2014
ProjectileDiffStateMinMass += 140.0*MeV; // Uzhi Nov. 2014
ProjectileNonDiffStateMinMass += 140.0*MeV; // Uzhi Nov. 2014
} // Uzhi Nov. 2014
if(absProjectilePDGcode > 3000) { // Strange baryon
ProjectileDiffStateMinMass += 140.0*MeV;
ProjectileNonDiffStateMinMass += 140.0*MeV;
}
}
G4double MminTarget(0.); // Uzhi Oct. 2014
MminTarget = BrW.GetMinimumMass(target->GetDefinition()); // Uzhi Oct. 2014
G4double MminTarget = BrW.GetMinimumMass(target->GetDefinition());
if ( M0target < MminTarget )
{
PutOnMassShell = true;
M0target = BrW.SampleMass(target->GetDefinition(),target->GetDefinition()->GetPDGMass() + 5.0*target->GetDefinition()->GetPDGWidth());
M0target = BrW.SampleMass(target->GetDefinition(),
target->GetDefinition()->GetPDGMass() +
5.0*target->GetDefinition()->GetPDGWidth() );
}
G4double M0target2 = M0target * M0target;
G4double TargetDiffStateMinMass = theParameters->GetTarMinDiffMass(); // Uzhi Oct 2014
G4double TargetNonDiffStateMinMass = theParameters->GetTarMinNonDiffMass(); // Uzhi Oct 2014
if ( M0target > TargetDiffStateMinMass ) { // Uzhi Oct 2014
G4double TargetDiffStateMinMass = theParameters->GetTarMinDiffMass();
G4double TargetNonDiffStateMinMass = theParameters->GetTarMinNonDiffMass();
if ( M0target > TargetDiffStateMinMass ) {
TargetDiffStateMinMass = M0target + 220.0*MeV;
TargetNonDiffStateMinMass = M0target + 220.0*MeV;
if(absTargetPDGcode > 3000) { // Strange baryon // Uzhi Nov. 2014
TargetDiffStateMinMass += 140.0*MeV; // Uzhi Nov. 2014
TargetNonDiffStateMinMass += 140.0*MeV; // Uzhi Nov. 2014
} // Uzhi Nov. 2014
if(absTargetPDGcode > 3000) { // Strange baryon
TargetDiffStateMinMass += 140.0*MeV;
TargetNonDiffStateMinMass += 140.0*MeV;
}
};
#ifdef debugFTFexictation
G4cout << "Proj Targ PDGcodes " << ProjectilePDGcode << " " << TargetPDGcode << G4endl
<< "M0projectile Y " << M0projectile << " " << ProjectileRapidity << G4endl;
//G4cout << "M0target Y " << M0target << " " << TargetRapidity << G4endl;
G4cout << "M0target Y " << M0target << " " << TargetRapidity << G4endl;
G4cout << "Pproj " << Pprojectile << G4endl << "Ptarget " << Ptarget << G4endl;
#endif
G4double AveragePt2 = theParameters->GetAveragePt2();
// G4double ProbLogDistrPrD = theParameters->GetProbLogDistrPrD(); // Uzhi Oct 2014 ***
G4double DiffrAveragePt2 =theParameters->GetAvaragePt2ofElasticScattering()*1.5;
// G4double ProbLogDistrPrD = theParameters->GetProbLogDistrPrD(); // It is not clear, is it need?
G4double ProbLogDistr = theParameters->GetProbLogDistr();
G4double SumMasses = M0projectile + M0target; // + 220.0*MeV; // Uzhi Nov. 2014
G4double SumMasses = M0projectile + M0target; // + 220.0*MeV; // Maybe, it can be opened.
// Transform momenta to cms and then rotate parallel to z axis;
G4LorentzRotation toCms( -1 * Psum.boostVector() );
@@ -197,11 +200,10 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
G4double PZcms2, PZcms;
#ifdef debugFTFexictation
G4cout << "SqrtS " << SqrtS << G4endl << "M0pr M0tr SumM+220 " << M0projectile << " "
G4cout << "SqrtS " << SqrtS << G4endl << "M0pr M0tr SumM " << M0projectile << " "
<< M0target << " " << SumMasses << G4endl;
#endif
if ( SqrtS < M0projectile + M0target ) return false;
if ( SqrtS < SumMasses ) return false;
// The model cannot work at low energy
@@ -235,14 +237,14 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
}
G4double maxPtSquare(0.); // = PZcms2;
//Uzhi_QEnex = 0;
//Uzhi_QEexc = 0;
//Uzhi_targetdiffraction = 0;
//Uzhi_projectilediffraction = 0;
//Uzhi_nondiffraction = 0;
//G4int UzhiPrD( 0 ), UzhiTrD( 0 ), UzhiND( 0 );
/*
Uzhi_QEnex = 0;
Uzhi_QEexc = 0;
Uzhi_targetdiffraction = 0;
Uzhi_projectilediffraction = 0;
Uzhi_nondiffraction = 0;
G4int UzhiPrD( 0 ), UzhiTrD( 0 ), UzhiND( 0 );
*/
#ifdef debugFTFexictation
G4cout << "Start --------------------" << G4endl << "Proj M0 Mdif Mndif " << M0projectile
<< " " << ProjectileDiffStateMinMass << " " << ProjectileNonDiffStateMinMass << G4endl
@@ -254,30 +256,51 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
// Charge exchange can be possible
// Getting the values needed for exchange
// Check for possible quark exchange
G4double QeNoExc = theParameters->GetProcProb( 0, ProjectileRapidity );
G4double QeExc = theParameters->GetProcProb( 1, ProjectileRapidity )*theParameters->GetProcProb( 4, ProjectileRapidity );
G4double ProbProjectileDiffraction = theParameters->GetProcProb( 2, ProjectileRapidity );
G4double ProbTargetDiffraction = theParameters->GetProcProb( 3, ProjectileRapidity );
ProjectileRapidity=Pprojectile.rapidity(); // Uzhi March 2016
TargetRapidity=Ptarget.rapidity(); // Uzhi March 2016
// Uzhi March 2016 TargetRapidity was introduced
G4double QeNoExc = theParameters->GetProcProb( 0, ProjectileRapidity - TargetRapidity );
G4double QeExc = theParameters->GetProcProb( 1, ProjectileRapidity - TargetRapidity)*
theParameters->GetProcProb( 4, ProjectileRapidity - TargetRapidity);
G4double ProbProjectileDiffraction = theParameters->GetProcProb( 2, ProjectileRapidity - TargetRapidity);
G4double ProbTargetDiffraction = theParameters->GetProcProb( 3, ProjectileRapidity - TargetRapidity);
if(QeNoExc+QeExc+ProbProjectileDiffraction+ProbTargetDiffraction > 1.) // Uzhi Nov. 2014
#ifdef debugFTFexictation
G4cout << "Proc Probs " << QeNoExc << " " << QeExc << " " << ProbProjectileDiffraction
<< " " << ProbTargetDiffraction << G4endl
<< "ProjectileRapidity " << ProjectileRapidity << G4endl;
//G4int Uzhi; G4cin >> Uzhi;
#endif
if(QeNoExc+QeExc+ProbProjectileDiffraction+ProbTargetDiffraction > 1.)
{QeNoExc=1.0-QeExc-ProbProjectileDiffraction-ProbTargetDiffraction;}
/* =================================== Apr. ========================================= Uzhi 2016
QeNoExc = 0.;
QeExc = 0.;
ProbProjectileDiffraction = 0.0;
ProbTargetDiffraction = 0.0;
//AveragePt2 = 0.;
*/ //=================================== Apr. ========================================= Uzhi 2016
//QeExc*=0.8;
G4double ProbExc( 0.0 );
if ( QeExc + QeNoExc != 0.0 ) ProbExc = QeExc/(QeExc + QeNoExc);
G4double DeltaProbAtQuarkExchange = theParameters->GetDeltaProbAtQuarkExchange();
G4double DeltaMass = G4ParticleTable::GetParticleTable()->FindParticle( 2224 )->GetPDGMass();
//ProbProjectileDiffraction = 0.5; // Uzhi 2016
//ProbTargetDiffraction = 0.5; // Uzhi 2016
G4double ProbOfDiffraction = ProbProjectileDiffraction + ProbTargetDiffraction;
#ifdef debugFTFexictation
G4cout << "Proc Probs " << QeNoExc << " " << QeExc << " " << ProbProjectileDiffraction
<< " " << ProbTargetDiffraction << G4endl
<< "ProjectileRapidity " << ProjectileRapidity << G4endl;
// G4int Uzhi; G4cin >> Uzhi;
//G4int Uzhi; G4cin >> Uzhi;
#endif
G4ParticleDefinition* TestParticle(0); // Uzhi Oct. 2014
G4double MtestPr(0.), MtestTr(0.); // Uzhi Oct. 2014
G4ParticleDefinition* TestParticle(0);
G4double MtestPr(0.), MtestTr(0.);
if ( 1.0 - QeExc - QeNoExc > 0.0 ) {
ProbProjectileDiffraction /= ( 1.0 - QeExc - QeNoExc );
@@ -320,72 +343,59 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
{ // ProjQ1 is quark
ProjExchangeQ = ProjQ1;
//------------------------------- Exchange of non-identical quarks is allowed
G4int NpossibleStates=3; // =====================================================
//
NpossibleStates=0; // =====================================================
G4int NpossibleStates=0; // =====================================================
if(ProjQ1 != TargQ1) NpossibleStates++;
if(ProjQ1 != TargQ2) NpossibleStates++;
if(ProjQ1 != TargQ3) NpossibleStates++;
//
G4int Nsampled = G4RandFlat::shootInt( G4long( NpossibleStates ) ) + 1;
//G4cout<<"NpossibleStates Nsampled "<<NpossibleStates<<" "<<Nsampled<<G4endl;
//
NpossibleStates=0;
if(ProjQ1 != TargQ1)
{
NpossibleStates++;
if(NpossibleStates == Nsampled) {TargExchangeQ = TargQ1; TargQ1 = ProjExchangeQ; ProjQ1 = TargExchangeQ;}
}
if(NpossibleStates == Nsampled)
{TargExchangeQ = TargQ1; TargQ1 = ProjExchangeQ; ProjQ1 = TargExchangeQ;}}
if(ProjQ1 != TargQ2)
{
NpossibleStates++;
if(NpossibleStates == Nsampled) {TargExchangeQ = TargQ2; TargQ2 = ProjExchangeQ; ProjQ1 = TargExchangeQ;}
}
if(NpossibleStates == Nsampled)
{TargExchangeQ = TargQ2; TargQ2 = ProjExchangeQ; ProjQ1 = TargExchangeQ;}}
if(ProjQ1 != TargQ3)
{
NpossibleStates++;
if(NpossibleStates == Nsampled) {TargExchangeQ = TargQ3; TargQ3 = ProjExchangeQ; ProjQ1 = TargExchangeQ;}
}
//
//if(Nsampled == 1) {TargExchangeQ = TargQ1; TargQ1 = ProjExchangeQ; ProjQ1 = TargExchangeQ;}
//else if(Nsampled == 2) {TargExchangeQ = TargQ2; TargQ2 = ProjExchangeQ; ProjQ1 = TargExchangeQ;}
//else {TargExchangeQ = TargQ3; TargQ3 = ProjExchangeQ; ProjQ1 = TargExchangeQ;}
if(NpossibleStates == Nsampled)
{TargExchangeQ = TargQ3; TargQ3 = ProjExchangeQ; ProjQ1 = TargExchangeQ;}}
}
else
{ // ProjQ2 is quark
ProjExchangeQ = ProjQ2;
//------------------------------- Exchange of non-identical quarks is allowed
G4int NpossibleStates=3;
//
NpossibleStates=0;
G4int NpossibleStates=0;
if(ProjQ2 != TargQ1) NpossibleStates++;
if(ProjQ2 != TargQ2) NpossibleStates++;
if(ProjQ2 != TargQ3) NpossibleStates++;
//
G4int Nsampled = G4RandFlat::shootInt( G4long( NpossibleStates ) ) + 1;
//
NpossibleStates=0;
if(ProjQ2 != TargQ1)
{
NpossibleStates++;
if(NpossibleStates == Nsampled) {TargExchangeQ = TargQ1; TargQ1 = ProjExchangeQ; ProjQ2 = TargExchangeQ;}
}
if(NpossibleStates == Nsampled)
{TargExchangeQ = TargQ1; TargQ1 = ProjExchangeQ; ProjQ2 = TargExchangeQ;}}
if(ProjQ2 != TargQ2)
{
NpossibleStates++;
if(NpossibleStates == Nsampled) {TargExchangeQ = TargQ2; TargQ2 = ProjExchangeQ; ProjQ2 = TargExchangeQ;}
}
if(NpossibleStates == Nsampled)
{TargExchangeQ = TargQ2; TargQ2 = ProjExchangeQ; ProjQ2 = TargExchangeQ;}}
if(ProjQ2 != TargQ3)
{
NpossibleStates++;
if(NpossibleStates == Nsampled) {TargExchangeQ = TargQ3; TargQ3 = ProjExchangeQ; ProjQ2 = TargExchangeQ;}
}
//
//if(Nsampled == 1) {TargExchangeQ = TargQ1; TargQ1 = ProjExchangeQ; ProjQ2 = TargExchangeQ;}
//else if(Nsampled == 2) {TargExchangeQ = TargQ2; TargQ2 = ProjExchangeQ; ProjQ2 = TargExchangeQ;}
//else {TargExchangeQ = TargQ3; TargQ3 = ProjExchangeQ; ProjQ2 = TargExchangeQ;}
if(NpossibleStates == Nsampled)
{TargExchangeQ = TargQ3; TargQ3 = ProjExchangeQ; ProjQ2 = TargExchangeQ;}}
} // End of if ( ProjQ1 > 0 )
#ifdef debugFTFexictation
@@ -395,9 +405,9 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
G4int aProjQ1 = std::abs( ProjQ1 );
G4int aProjQ2 = std::abs( ProjQ2 );
G4bool ProjExcited = false; // Uzhi Oct 2014
G4bool ProjExcited = false;
G4int attempts=0; // Uzhi Oct 2014 start
G4int attempts=0;
while(attempts < 50) /* Loop checking, 10.08.2015, A.Ribon */
{// Determination of a new projectile ID which garanty energy-momentum conservation
attempts++;
@@ -440,8 +450,7 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
NewProjCode += 2; // Excited meson
ProjExcited = true;
}
// if ( aProjQ1 != aProjQ2 ) NewProjCode *= ( ProjectilePDGcode / absProjectilePDGcode ); // Uzhi 27 Nov. 2014
// Uzhi 27 Nov. 2014
G4int Qquarks=0;
if ( aProjQ1 == 1 ) {Qquarks -= ProjQ1;}
else if( aProjQ1 == 2 ) {Qquarks += ProjQ1;}
@@ -452,7 +461,6 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
else {Qquarks -= ProjQ2/aProjQ2;}
if( Qquarks < 0 ) NewProjCode *=(-1);
// Uzhi 27 Nov. 2014
#ifdef debugFTFexictation
G4cout << "NewProjCode +2 or 0 " << NewProjCode << G4endl;
@@ -465,13 +473,13 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewProjCode );
if(!TestParticle) continue;
//MminProjectile=TestParticle->GetPDGMass(); // ??????????????????????
MminProjectile=BrW.GetMinimumMass(TestParticle);
if(SqrtS-M0target < MminProjectile) continue;
MtestPr = BrW.SampleMass(TestParticle, TestParticle->GetPDGMass() + 5.0*TestParticle->GetPDGWidth());
// G4ParticleTable::GetParticleTable()->FindParticle( NewProjCode )->GetPDGMass(); // Uzhi 2014
MtestPr = BrW.SampleMass(TestParticle,
TestParticle->GetPDGMass() +
5.0*TestParticle->GetPDGWidth() );
#ifdef debugFTFexictation
G4cout << "TestParticle Name " << NewProjCode << " " << TestParticle->GetParticleName()<< G4endl;
@@ -518,24 +526,17 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
if(SqrtS-MtestPr < MminTarget) continue;
MtestTr = BrW.SampleMass(TestParticle,TestParticle->GetPDGMass() + 5.0*TestParticle->GetPDGWidth());
MtestTr = BrW.SampleMass(TestParticle,
TestParticle->GetPDGMass() +
5.0*TestParticle->GetPDGWidth() );
if(SqrtS > MtestPr+MtestTr) break;
} // End of while(attempts < 50)//===============================
if(attempts >= 50) return false; // ==============================
/*
if ( MtestPr > Pprojectile.mag() ) {M0projectile = MtestPr;}
else
{
if ( std::abs( MtestPr - M0projectile ) //projectile->GetDefinition()->GetPDGMass() ) // Uzhi Oct. 2014
< 140.0*MeV ) {
M0projectile = MtestPr;
}
}
*/
if ( MtestPr >= Pprojectile.mag() ) {M0projectile = MtestPr;} // Uzhi 18 Nov. 2014
else if (projectile->GetStatus() != 0 ) {M0projectile = MtestPr;} // Uzhi 18 Nov. 2014
if ( MtestPr >= Pprojectile.mag() ) {M0projectile = MtestPr;}
else if (projectile->GetStatus() != 0 ) {M0projectile = MtestPr;}
#ifdef debugFTFexictation
@@ -546,19 +547,9 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
ProjectileDiffStateMinMass = M0projectile + 220.0*MeV; //220 MeV=m_pi+80 MeV
ProjectileNonDiffStateMinMass = M0projectile + 220.0*MeV; //220 MeV=m_pi+80 MeV
if ( MtestTr >= Ptarget.mag() ) {M0target = MtestTr;} // Uzhi 18 Nov. 2014
else if (target->GetStatus() != 0 ) {M0target = MtestTr;} // Uzhi 18 Nov. 2014
/*
M0target = MtestTr; // Uzhi 18 Nov. 2014
if ( MtestTr > Ptarget.mag() ) {M0target = MtestTr;}
else
{
if ( std::abs( MtestTr - M0target ) // target->GetDefinition()->GetPDGMass() ) Uzhi Oct. 2014
< 140.0*MeV ) {
M0target = MtestTr;
}
}
*/
if ( MtestTr >= Ptarget.mag() ) {M0target = MtestTr;}
else if (target->GetStatus() != 0 ) {M0target = MtestTr;}
M0target2 = M0target * M0target;
#ifdef debugFTFexictation
@@ -569,11 +560,11 @@ M0target = MtestTr;
TargetNonDiffStateMinMass = M0target + 220.0*MeV; // 220 MeV=m_pi+80 MeV;
} else { // of the if ( absProjectilePDGcode < 1000 ) ;
// The projectile is baryon now
// The projectile is baryon now ===========================================
G4double Same = theParameters->GetProbOfSameQuarkExchange(); //0.3; //0.5; 0.
// G4bool ProjDeltaHasCreated( false ); // Uzhi Oct. 2014
// G4bool TargDeltaHasCreated( false ); // Uzhi Oct. 2014
// G4bool ProjDeltaHasCreated( false ); // Uzhi 2016
// G4bool TargDeltaHasCreated( false ); // Uzhi 2016
G4double Ksi = G4UniformRand();
if ( G4UniformRand() < 0.5 ) { // Sampling exchange quark from proj. or targ.
@@ -587,18 +578,28 @@ M0target = MtestTr;
ProjExchangeQ = ProjQ3;
}
if ( ProjExchangeQ != TargQ1 || G4UniformRand() < Same ) {
TargExchangeQ = TargQ1; TargQ1 = ProjExchangeQ; ProjExchangeQ = TargExchangeQ;
} else {
if ( ProjExchangeQ != TargQ2 || G4UniformRand() < Same ) {
TargExchangeQ = TargQ2; TargQ2 = ProjExchangeQ; ProjExchangeQ = TargExchangeQ;
#ifdef debugFTFexictation
G4cout << "Exchange Qs Pr Tr " << ProjExchangeQ << " ";
#endif
G4int count(0), MaxCount(100); // Uzhi Oct. 2015 -------------
do {
if ( ProjExchangeQ != TargQ1 || G4UniformRand() < Same ) {
TargExchangeQ = TargQ1; TargQ1 = ProjExchangeQ; ProjExchangeQ = TargExchangeQ;
} else {
TargExchangeQ = TargQ3; TargQ3 = ProjExchangeQ; ProjExchangeQ = TargExchangeQ;
if ( ProjExchangeQ != TargQ2 || G4UniformRand() < Same ) {
TargExchangeQ = TargQ2; TargQ2 = ProjExchangeQ; ProjExchangeQ = TargExchangeQ;
} else {
TargExchangeQ = TargQ3; TargQ3 = ProjExchangeQ; ProjExchangeQ = TargExchangeQ;
}
}
}
count++;
} while((TargExchangeQ == 0) && (count < MaxCount));
if(count >= MaxCount) return false; // Uzhi March 2016 -------------
#ifdef debugFTFexictation
G4cout << "Exchange Qs Pr Tr " << ProjExchangeQ << " " << TargExchangeQ << G4endl;
G4cout << TargExchangeQ << G4endl; // Uzhi March 2016
#endif
if ( Ksi < 0.333333 ) {
@@ -618,15 +619,21 @@ M0target = MtestTr;
} else {
TargExchangeQ = TargQ3;
}
if ( TargExchangeQ != ProjQ1 || G4UniformRand() < Same ) {
ProjExchangeQ = ProjQ1; ProjQ1 = TargExchangeQ; TargExchangeQ = ProjExchangeQ;
} else {
if ( TargExchangeQ != ProjQ2 || G4UniformRand() < Same ) {
ProjExchangeQ = ProjQ2; ProjQ2 = TargExchangeQ; TargExchangeQ = ProjExchangeQ;
G4int count(0), MaxCount(100); // Uzhi March 2016 -------------
do {
if ( TargExchangeQ != ProjQ1 || G4UniformRand() < Same ) {
ProjExchangeQ = ProjQ1; ProjQ1 = TargExchangeQ; TargExchangeQ = ProjExchangeQ;
} else {
ProjExchangeQ = ProjQ3; ProjQ3 = TargExchangeQ; TargExchangeQ = ProjExchangeQ;
if ( TargExchangeQ != ProjQ2 || G4UniformRand() < Same ) {
ProjExchangeQ = ProjQ2; ProjQ2 = TargExchangeQ; TargExchangeQ = ProjExchangeQ;
} else {
ProjExchangeQ = ProjQ3; ProjQ3 = TargExchangeQ; TargExchangeQ = ProjExchangeQ;
}
}
}
count++;
} while((ProjExchangeQ == 0) && (count < MaxCount));
if(count >= MaxCount) return false; // Uzhi March 2016 -------------
if ( Ksi < 0.333333 ) {
TargQ1 = TargExchangeQ;
@@ -641,113 +648,191 @@ M0target = MtestTr;
NewProjCode = NewNucleonId( ProjQ1, ProjQ2, ProjQ3 );
NewTargCode = NewNucleonId( TargQ1, TargQ2, TargQ3 );
G4int attempts=0; // Uzhi Oct 2014 start
while(attempts < 50) /* Loop checking, 10.08.2015, A.Ribon */
{// Determination of a new projectile ID which garanty energy-momentum conservation
attempts++;
if ( ProjQ1 == ProjQ2 && ProjQ1 == ProjQ3 ) {
NewProjCode += 2; // ProjDeltaHasCreated = true; // Uzhi Oct. 2014
NewProjCode += 2; // ProjDeltaHasCreated = true;
} else if ( projectile->GetDefinition()->GetPDGiIsospin() == 3 ) { // Projectile was Delta
if ( G4UniformRand() > DeltaProbAtQuarkExchange ) {
NewProjCode += 2; //ProjDeltaHasCreated = true; // Uzhi Oct. 2014
NewProjCode += 2; //ProjDeltaHasCreated = true;
} else {
NewProjCode += 0; //ProjDeltaHasCreated = false; // Uzhi Oct. 2014
NewProjCode += 0; //ProjDeltaHasCreated = false;
}
} else { // Projectile was Nucleon
if ( G4UniformRand() < DeltaProbAtQuarkExchange && SqrtS > DeltaMass + M0target ) {
NewProjCode += 2; //ProjDeltaHasCreated = true; // Uzhi Oct. 2014
NewProjCode += 2; //ProjDeltaHasCreated = true;
} else {
NewProjCode += 0; //ProjDeltaHasCreated = false; // Uzhi Oct. 2014
NewProjCode += 0; //ProjDeltaHasCreated = false;
}
}
if ( TargQ1 == TargQ2 && TargQ1 == TargQ3 ) {
NewTargCode += 2; //TargDeltaHasCreated = true; // Uzhi Oct. 2014
NewTargCode += 2; //TargDeltaHasCreated = true;
} else if ( target->GetDefinition()->GetPDGiIsospin() == 3 ) { // Target was Delta
if ( G4UniformRand() > DeltaProbAtQuarkExchange ) {
NewTargCode += 2; //TargDeltaHasCreated = true; // Uzhi Oct. 2014
NewTargCode += 2; //TargDeltaHasCreated = true;
} else {
NewTargCode += 0; //TargDeltaHasCreated = false; // Uzhi Oct. 2014
NewTargCode += 0; //TargDeltaHasCreated = false;
}
} else { // Target was Nucleon
if ( G4UniformRand() < DeltaProbAtQuarkExchange && SqrtS > M0projectile + DeltaMass ) {
NewTargCode += 2; //TargDeltaHasCreated = true; // Uzhi Oct. 2014
NewTargCode += 2; //TargDeltaHasCreated = true;
} else {
NewTargCode += 0; //TargDeltaHasCreated = false; // Uzhi Oct. 2014
NewTargCode += 0; //TargDeltaHasCreated = false;
}
}
#ifdef debugFTFexictation
G4cout << "NewProjCode NewTargCode " << NewProjCode << " " << NewTargCode << G4endl;
// G4int Uzhi; G4cin >> Uzhi;
//G4int Uzhi; G4cin >> Uzhi;
#endif
if ( absProjectilePDGcode == NewProjCode && absTargetPDGcode == NewTargCode ) {
} // Nothing was changed! It is not right!?
// Forming baryons
/*
if ( G4UniformRand() > 0.5 ) { // Uzhi Oct. 2014
ProbProjectileDiffraction = 0.0; ProbTargetDiffraction = 1.0;
} else {
ProbProjectileDiffraction = 1.0; ProbTargetDiffraction = 0.0;
}
*/
/*
if ( ProjDeltaHasCreated ) {
if ( G4UniformRand() > 0.5 ) {
ProbProjectileDiffraction = 0.0; ProbTargetDiffraction = 1.0;
} else {
ProbProjectileDiffraction = 1.0; ProbTargetDiffraction = 0.0;
// Uzhi March 2016 - Oct. 2015
if ( G4UniformRand() < 0.5 ) { // Determination mass of Proj + Targ, or Tart+Proj?
// --------------------------------------------------------------------------------- Proj
//G4cout<<"Pr status NoC "<<projectile->GetStatus()<<" "<<projectile->GetSoftCollisionCount()<<G4endl;
//2016 if(((projectile->GetStatus() == 1) && (projectile->GetSoftCollisionCount() == 0)) ||
//2016 ((projectile->GetStatus() == 2) && (projectile->GetDefinition()->GetPDGiIsospin() == 1)) )
if((projectile->GetStatus() == 1) || (projectile->GetStatus() == 2)) // Uzhi 2016
{ // Mass is determined only at the first quark exchange
TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewProjCode );
if(!TestParticle) return false;
//G4cout<<"Pr "<<TestParticle->GetParticleName()<<G4endl;
MminProjectile=BrW.GetMinimumMass(TestParticle);
if(SqrtS-M0target < MminProjectile) return false;
if( TestParticle->GetPDGWidth() == 0. )
{ MtestPr = BrW.SampleMass(TestParticle,TestParticle->GetPDGMass());}
else
{
G4int attempts=0;
while(attempts < 50)
{// Determination of a new projectile mass which garanty energy-momentum conservation
attempts++;
MtestPr = BrW.SampleMass(TestParticle,
TestParticle->GetPDGMass() +
5.0*TestParticle->GetPDGWidth() );
if(SqrtS < MtestPr + M0target) {continue;}
else {break; } // Uzhi March 2016
// if(SqrtS > MtestPr + M0target + 140.0*MeV) break;
}
}
if(attempts >= 50) return false;
}
} // End of the projectile mass determination
// --------------------------------------------------------------------------------- Targ
//G4cout<<"Tr statusNoC "<<target->GetStatus()<<" "<<target->GetSoftCollisionCount()<<G4endl;
//2016 if(((target->GetStatus() == 1) && (target->GetSoftCollisionCount() == 0)) ||
//2016 ((target->GetStatus() == 2) && (target->GetDefinition()->GetPDGiIsospin() == 1)) )
if((target->GetStatus() == 1) || (target->GetStatus() == 2)) // 2016
{ // Mass is determined only at the first quark exchange
TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewTargCode );
if(!TestParticle) return false;
//G4cout<<"Tr "<<TestParticle->GetParticleName()<<G4endl;
if ( TargDeltaHasCreated ) {
if ( G4UniformRand() > 0.5 ) {
ProbProjectileDiffraction = 1.0; ProbTargetDiffraction = 0.0;
} else {
ProbProjectileDiffraction = 0.0; ProbTargetDiffraction = 1.0;
MminTarget=BrW.GetMinimumMass(TestParticle);
if(SqrtS-MtestPr < MminTarget) return false;
if( TestParticle->GetPDGWidth() == 0. )
{ MtestTr = BrW.SampleMass(TestParticle,TestParticle->GetPDGMass());}
else
{
G4int attempts=0;
while(attempts < 50)
{// Determination of a new target mass which garanty energy-momentum conservation
attempts++;
MtestTr = BrW.SampleMass(TestParticle,
TestParticle->GetPDGMass() +
5.0*TestParticle->GetPDGWidth() );
if(SqrtS < MtestPr + MtestTr) {continue;}
else {break; } // Uzhi March 2016
// if(SqrtS > MtestPr+MtestTr+140.*MeV) break;
}
}
*/
// --------------------------------------------------------------------------------- Proj
TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewProjCode );
if(!TestParticle) continue;
if(attempts >= 50) return false;
}
} // End of the mass determination
MminProjectile=BrW.GetMinimumMass(TestParticle);
} else {
// --------------------------------------------------------------------------------- Targ
//G4cout<<"Tr statusNoC "<<target->GetStatus()<<" "<<target->GetSoftCollisionCount()<<G4endl;
//2016 if(((target->GetStatus() == 1) && (target->GetSoftCollisionCount() == 0)) ||
//2016 ((target->GetStatus() == 2) && (target->GetDefinition()->GetPDGiIsospin() == 1)) )
if((target->GetStatus() == 1) || (target->GetStatus() == 2)) // 2016
{ // Mass is determined only at the first quark exchange
TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewTargCode );
if(!TestParticle) return false;
//G4cout<<"Tr "<<TestParticle->GetParticleName()<<G4endl;
if(SqrtS-M0target < MminProjectile) continue;
MminTarget=BrW.GetMinimumMass(TestParticle);
if(SqrtS-M0projectile < MminTarget) return false;
MtestPr = BrW.SampleMass(TestParticle,TestParticle->GetPDGMass() + 5.0*TestParticle->GetPDGWidth());
if( TestParticle->GetPDGWidth() == 0. )
{ MtestTr = BrW.SampleMass(TestParticle,TestParticle->GetPDGMass());}
else
{
G4int attempts=0;
while(attempts < 50)
{// Determination of a new target mass which garanty energy-momentum conservation
attempts++;
MtestTr = BrW.SampleMass(TestParticle,
TestParticle->GetPDGMass() +
5.0*TestParticle->GetPDGWidth() );
if(SqrtS < M0projectile + MtestTr) {continue;}
else {break; } // Uzhi March 2016
// if(SqrtS > M0projectile + MtestTr+140.*MeV) break;
}
if(attempts >= 50) return false;
}
} // End of the mass determination
// --------------------------------------------------------------------------------- Proj
//G4cout<<"Pr status NoC "<<projectile->GetStatus()<<" "<<projectile->GetSoftCollisionCount()<<G4endl;
//2016 if(((projectile->GetStatus() == 1) && (projectile->GetSoftCollisionCount() == 0)) ||
//2016 ((projectile->GetStatus() == 2) && (projectile->GetDefinition()->GetPDGiIsospin() == 1)) )
if((projectile->GetStatus() == 1) || (projectile->GetStatus() == 2)) // 2016
{ // Mass is determined only at the first quark exchange
TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewProjCode );
if(!TestParticle) return false;
//G4cout<<"Pr "<<TestParticle->GetParticleName()<<G4endl;
// --------------------------------------------------------------------------------- Targ
TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewTargCode );
if(!TestParticle) continue;
MminProjectile=BrW.GetMinimumMass(TestParticle);
if(SqrtS-MtestTr < MminProjectile) return false;
MminTarget=BrW.GetMinimumMass(TestParticle);
if(SqrtS-MtestPr < MminTarget) continue;
MtestTr = BrW.SampleMass(TestParticle,TestParticle->GetPDGMass() + 5.0*TestParticle->GetPDGWidth());
if(SqrtS > MtestPr+MtestTr) break;
} // End of while(attempts < 50)//===============================
if(attempts >= 50) return false; // ==============================
if ( MtestPr >= Pprojectile.mag() ) {M0projectile = MtestPr;}
else if (projectile->GetStatus() != 0 ) {M0projectile = MtestPr;} // Uzhi 18 Nov. 2014
M0projectile2 = M0projectile * M0projectile;
ProjectileDiffStateMinMass = M0projectile + 220.0*MeV; //220 MeV=m_pi+80 MeV
ProjectileNonDiffStateMinMass = M0projectile + 220.0*MeV; //220 MeV=m_pi+80 MeV
if ( MtestTr >= Ptarget.mag() ) {M0target = MtestTr;}
else if (target->GetStatus() != 0 ) {M0target = MtestTr;} // Uzhi 18 Nov. 2014
M0target2 = M0target * M0target;
TargetDiffStateMinMass = M0target + 220.0*MeV; //220 MeV=m_pi+80 MeV;
TargetNonDiffStateMinMass = M0target + 220.0*MeV; //220 MeV=m_pi+80 MeV;
if( TestParticle->GetPDGWidth() == 0. )
{ MtestPr = BrW.SampleMass(TestParticle,TestParticle->GetPDGMass());}
else
{
G4int attempts=0;
while(attempts < 50)
{// Determination of a new projectile mass which garanty energy-momentum conservation
attempts++;
MtestPr = BrW.SampleMass(TestParticle,
TestParticle->GetPDGMass() +
5.0*TestParticle->GetPDGWidth() );
if(SqrtS < MtestPr + MtestTr) {continue;} // Uzhi March 2016
else {break; }
// Uzhi if(SqrtS > MtestPr + MtestTr + 140.0*MeV) break;
}
if(attempts >= 50) return false;
}
} // End of the projectile mass determination
}
// End of Uzhi March 2016 - Oct. 2015
if ( MtestPr != 0.) { // Uzhi March 2016
M0projectile = MtestPr;
M0projectile2 = M0projectile * M0projectile;
ProjectileDiffStateMinMass = M0projectile + 220.0*MeV; //220 MeV=m_pi+80 MeV
ProjectileNonDiffStateMinMass = M0projectile + 220.0*MeV; //220 MeV=m_pi+80 MeV
}
if ( MtestTr != 0.) { // Uzhi March 2016
M0target = MtestTr;
M0target2 = M0target * M0target;
TargetDiffStateMinMass = M0target + 220.0*MeV; //220 MeV=m_pi+80 MeV;
TargetNonDiffStateMinMass = M0target + 220.0*MeV; //220 MeV=m_pi+80 MeV;
}
} // End of if ( absProjectilePDGcode < 1000 )
//--------------------------------------------------------------------------------------
@@ -777,18 +862,25 @@ M0target = MtestTr;
Ptarget.setPz( -PZcms );
Ptarget.setE( std::sqrt( M0target2 + PZcms2 ) );
if(projectile->GetStatus() != 0 ) projectile->SetStatus(2); // Uzhi 18 Nov. 2014
if(target->GetStatus() != 0 ) target->SetStatus(2); // Uzhi 18 Nov. 2014
if(projectile->GetStatus() != 0 ) projectile->SetStatus(2);
if(target->GetStatus() != 0 ) target->SetStatus(2);
#ifdef debugFTFexictation
G4cout << "Proj Targ and Proj+Targ in CMS" << G4endl << Pprojectile << G4endl << Ptarget
<< G4endl << Pprojectile + Ptarget << G4endl;
G4cout<<"Mpr "<<Pprojectile.mag()<<" Mtr "<<Ptarget.mag()<<G4endl;
#endif
//--------------------- Check for possible excitation of the participants -------------------
if((SqrtS < M0projectile + TargetDiffStateMinMass) || // Uzhi Oct 2014
if((SqrtS < M0projectile + TargetDiffStateMinMass) || // Uzhi 2016
(SqrtS < ProjectileDiffStateMinMass + M0target) ||
(ProbOfDiffraction == 0.) ) ProbExc=0.;// Uzhi Oct 2014
(ProbOfDiffraction == 0.) ) ProbExc=0.;// Uzhi 2016
// if((SqrtS < ProjectileDiffStateMinMass + TargetDiffStateMinMass) && (ProbExc != 0.)) // Uzhi March 2016
// {
// ProbProjectileDiffraction /= ProbOfDiffraction;
// ProbTargetDiffraction /= ProbOfDiffraction;
// }
if ( G4UniformRand() > ProbExc ) { // Make elastic scattering
@@ -819,9 +911,9 @@ M0target = MtestTr;
G4cout << "Make excitation of new hadrons" << G4endl;
#endif
// Redefinition of ProbOfDiffraction because the probabilities are changed due to quark exchange
// Redefinition of ProbOfDiffraction because the probabilities may be changed due to quark exchange
ProbOfDiffraction = ProbProjectileDiffraction + ProbTargetDiffraction; // Uzhi Oct. 2014
ProbOfDiffraction = ProbProjectileDiffraction + ProbTargetDiffraction;
if ( ProbOfDiffraction != 0.0 ) {
ProbProjectileDiffraction /= ProbOfDiffraction;
ProbTargetDiffraction /= ProbOfDiffraction;
@@ -877,12 +969,12 @@ M0target = MtestTr;
G4cout << "projectile diffraction" << G4endl;
#endif
//UzhiPrD++;
// UzhiPrD++;
do { // while ( ( Pprojectile + Qmomentum ).mag2() < ProjectileDiffStateMinMass2 )
//Uzhi_projectilediffraction = 1;
//Uzhi_targetdiffraction = 0;
// Uzhi_projectilediffraction = 1;
// Uzhi_targetdiffraction = 0;
//Uzhi_Mx2 = 1.0;
// Generate pt and mass of projectile
@@ -907,7 +999,8 @@ M0target = MtestTr;
maxPtSquare = PZcms2;
Qmomentum = G4LorentzVector( GaussianPt( AveragePt2, maxPtSquare ), 0 );
// Qmomentum = G4LorentzVector( GaussianPt( AveragePt2/2.*0.01, maxPtSquare ), 0 ); // Uzhi 28 May 2016
Qmomentum = G4LorentzVector( GaussianPt( DiffrAveragePt2, maxPtSquare ), 0 ); // Uzhi 28 May 2016
Pt2 = G4ThreeVector( Qmomentum.vect() ).mag2();
ProjMassT2 = ProjectileDiffStateMinMass2 + Pt2;
@@ -923,8 +1016,10 @@ M0target = MtestTr;
PZcms = std::sqrt( PZcms2 );
PMinusMin = std::sqrt( ProjMassT2 + PZcms2 ) - PZcms;
PMinusMax = SqrtS - TargMassT;
// PMinusMax = PMinusMin + 2.*PZcms; // Uzhi March 2016
PMinusMax = SqrtS - TargMassT; // Uzhi March 2016
// PMinusNew = PMinusMax; //ChooseP( PMinusMin, PMinusMax ); ==== Apr. 19 ===== Uzhi 2016
PMinusNew = ChooseP( PMinusMin, PMinusMax );
TMinusNew = SqrtS - PMinusNew;
@@ -933,15 +1028,12 @@ M0target = MtestTr;
Qplus = Ptarget.plus() - TPlusNew;
Qmomentum.setPz( (Qplus - Qminus)/2 );
Qmomentum.setE( (Qplus + Qminus)/2 );
} while ( ( Pprojectile + Qmomentum ).mag2() < ProjectileDiffStateMinMass2 ); /* Loop checking, 10.08.2015, A.Ribon */
/* Loop checking, 10.08.2015, A.Ribon */
} while ( ( Pprojectile + Qmomentum ).mag2() < ProjectileDiffStateMinMass2 );
// || ( ( Pprojectile + Qmomentum ).pz() < 0.)); // Uzhi March 2016
// Repeat the sampling because there was not any excitation
// projectile->SetStatus( 1*projectile->GetStatus() ); // Uzhi Oct 2014
if(projectile->GetStatus() == 2) projectile->SetStatus(1); // Uzhi Oct 2014
if((target->GetStatus() == 1) && (target->GetSoftCollisionCount() == 0)) // Uzhi Oct 2014
target->SetStatus(2); // Uzhi Oct 2014
projectile->SetStatus(0);
} else { // Target diffraction
@@ -949,12 +1041,12 @@ M0target = MtestTr;
G4cout << "Target diffraction" << G4endl;
#endif
//UzhiTrD++;
// UzhiTrD++;
do { // while ( ( Ptarget - Qmomentum ).mag2() < TargetDiffStateMinMass2 )
//Uzhi_projectilediffraction = 0;
//Uzhi_targetdiffraction = 1;
// Uzhi_projectilediffraction = 0;
// Uzhi_targetdiffraction = 1;
//Uzhi_Mx2 = 1.0;
// Generate pt and target mass
@@ -981,7 +1073,8 @@ M0target = MtestTr;
maxPtSquare = PZcms2;
Qmomentum = G4LorentzVector( GaussianPt( AveragePt2, maxPtSquare ), 0 );
// Qmomentum = G4LorentzVector( GaussianPt( AveragePt2/2.*0.01, maxPtSquare ), 0 ); // Uzhi 28 May 2016
Qmomentum = G4LorentzVector( GaussianPt( DiffrAveragePt2, maxPtSquare ), 0 ); // Uzhi 28 May 2016
Pt2 = G4ThreeVector( Qmomentum.vect() ).mag2();
ProjMassT2 = M0projectile2 + Pt2;
@@ -997,8 +1090,8 @@ M0target = MtestTr;
PZcms = std::sqrt( PZcms2 );
TPlusMin = std::sqrt( TargMassT2 + PZcms2 ) - PZcms;
//TPlusMax = std::sqrt( TargMassT2 + PZcms2 ) + PZcms;
TPlusMax = SqrtS - ProjMassT;
// TPlusMax = TPlusMin + 2.*PZcms; // Uzhi March 2016
TPlusMax = SqrtS - ProjMassT; // Uzhi March 2016
TPlusNew = ChooseP( TPlusMin, TPlusMax );
//TPlusNew = TPlusMin;
@@ -1009,15 +1102,12 @@ M0target = MtestTr;
Qminus = PMinusNew - Pprojectile.minus();
Qmomentum.setPz( (Qplus - Qminus)/2 );
Qmomentum.setE( (Qplus + Qminus)/2 );
} while ( ( Ptarget - Qmomentum ).mag2() < TargetDiffStateMinMass2 ); /* Loop checking, 10.08.2015, A.Ribon */
/* Loop checking, 10.08.2015, A.Ribon */
} while ( ( Ptarget - Qmomentum ).mag2() < TargetDiffStateMinMass2 );
// || ( ( Pprojectile + Qmomentum ).pz() < 0.)); //Uzhi March 2016
// Repeat the sampling because there was not any excitation
// target->SetStatus( 1*target->GetStatus() ); // Uzhi Oct 2014
if((projectile->GetStatus() == 1) && (projectile->GetSoftCollisionCount() == 0)) // Uzhi Oct 2014
projectile->SetStatus(2); // Uzhi Oct 2014
if(target->GetStatus() == 2) target->SetStatus(1); // Uzhi Oct 2014
target->SetStatus(0); // Uzhi March 2016
} // End of if ( G4UniformRand() < ProbProjectileDiffraction )
@@ -1029,10 +1119,11 @@ M0target = MtestTr;
//UzhiND++;
//Uzhi_QEnex++;
//Uzhi_nondiffraction++;
do { // while ( ( Pprojectile + Qmomentum ).mag2() < ProjectileNonDiffStateMinMass2 || ...
//Uzhi_projectilediffraction = 0;
//Uzhi_targetdiffraction = 0;
// Uzhi_projectilediffraction = 0;
// Uzhi_targetdiffraction = 0;
//Uzhi_Mx2 = 1.0;
// Generate pt and masses
@@ -1057,7 +1148,7 @@ M0target = MtestTr;
maxPtSquare = PZcms2;
Qmomentum = G4LorentzVector( GaussianPt( AveragePt2, maxPtSquare ), 0 );
Qmomentum = G4LorentzVector( GaussianPt( AveragePt2, maxPtSquare ), 0 ); // 0.6
Pt2 = G4ThreeVector( Qmomentum.vect() ).mag2();
ProjMassT2 = ProjectileNonDiffStateMinMass2 + Pt2;
@@ -1073,30 +1164,19 @@ M0target = MtestTr;
PZcms = std::sqrt( PZcms2 );
PMinusMin = std::sqrt( ProjMassT2 + PZcms2 ) - PZcms;
//PMinusMax = std::sqrt( ProjMassT2 + PZcms2 ) + PZcms;
//PMinusMax = std::sqrt( ProjMassT2 + PZcms2 ) + PZcms; // Uzhi 2016
PMinusMax = SqrtS - TargMassT;
TPlusMin = std::sqrt( TargMassT2 + PZcms2 ) - PZcms;
//TPlusMax = std::sqrt( TargMassT2 + PZcms2 ) + PZcms;
TPlusMax = SqrtS - ProjMassT; // Uzhi 18 Sept. 2014
/*
if ( G4UniformRand() < ProbLogDistrPrD ) { // Uzhi Oct 2014
PMinusNew = ChooseP( PMinusMin, PMinusMax );
} else {
PMinusNew = ( PMinusMax - PMinusMin )*G4UniformRand() + PMinusMin;
}
// Qminus = PMinusNew - Pprojectile.minus();
*/
// TPlusMax = SqrtS - PMinusNew;
TPlusMax = SqrtS - ProjMassT; // Uzhi 2016
if ( G4UniformRand() < ProbLogDistr ) {
PMinusNew = ChooseP( PMinusMin, PMinusMax );
TPlusNew = ChooseP( TPlusMin, TPlusMax );
TPlusNew = ChooseP( TPlusMin, TPlusMax );
} else {
PMinusNew = ( PMinusMax - PMinusMin )*G4UniformRand() + PMinusMin;
TPlusNew = ( TPlusMax - TPlusMin )*G4UniformRand() + TPlusMin;
TPlusNew = ( TPlusMax - TPlusMin )*G4UniformRand() + TPlusMin;
}
Qminus = PMinusNew - Pprojectile.minus();
@@ -1106,10 +1186,10 @@ M0target = MtestTr;
Qmomentum.setE( (Qplus + Qminus)/2 );
#ifdef debugFTFexictation
G4cout << ( Pprojectile + Qmomentum ).mag2() << " " << ProjectileNonDiffStateMinMass2
<< G4endl << ( Ptarget - Qmomentum ).mag2() << " "
<< TargetNonDiffStateMinMass2 << G4endl;
G4cout<<"To continue - enter any integer"<<G4endl;
G4cout <<"Sampled: Mpr, MdifPr, Mtr, MdifTr "<<G4endl
<< ( Pprojectile + Qmomentum ).mag() << " " << ProjectileNonDiffStateMinMass
<< G4endl << ( Ptarget - Qmomentum ).mag() << " "<< TargetNonDiffStateMinMass << G4endl;
// G4cout<<"To continue - enter any integer"<<G4endl;
// G4int Uzhi; G4cin >> Uzhi;
#endif
@@ -1117,8 +1197,8 @@ M0target = MtestTr;
( Ptarget - Qmomentum ).mag2() < TargetNonDiffStateMinMass2 || // ); //
( Pprojectile + Qmomentum ).pz() < 0.); /* Loop checking, 10.08.2015, A.Ribon */
projectile->SetStatus( 0*projectile->GetStatus() );
target->SetStatus( 0*target->GetStatus() );
projectile->SetStatus( 0 ); // Uzhi March 2016
target->SetStatus( 0 ); // Uzhi March 2016
} // End of if ( G4UniformRand() < ProbOfDiffraction )
@@ -1129,26 +1209,9 @@ M0target = MtestTr;
Pprojectile.transform( toLab );
Ptarget.transform( toLab );
// Calculation of the creation time
//Uzhi 9.11 projectile->SetTimeOfCreation( target->GetTimeOfCreation() );
//Uzhi 9.11 projectile->SetPosition( target->GetPosition() );
// Creation time and position of target nucleon were determined in
// ReggeonCascade() of G4FTFModel
//
//if ( Uzhi_projectilediffraction != 0 ) {
// Uzhi_Mx2 = Pprojectile.mag2(); Uzhi_modT = ( target->Get4Momentum() - Ptarget ).mag2();
//}
//if ( Uzhi_targetdiffraction != 0 ) {
// Uzhi_Mx2 = Ptarget.mag2(); Uzhi_modT = ( projectile->Get4Momentum() - Pprojectile ).mag2();
//}
//if ( Uzhi_QE != 0 ) {
// Uzhi_projectilediffraction = 0;
// Uzhi_targetdiffraction = 0;
// Uzhi_Mx2 = 1.0;
//}
#ifdef debugFTFexictation
G4cout << "Mproj " << Pprojectile.mag() << G4endl << "Mtarg " << Ptarget.mag() << G4endl;
G4cout << "Final Mproj " << Pprojectile.mag() <<" "<<Pprojectile<< G4endl
<< "Final Mtarg " << Ptarget.mag() <<" "<<Ptarget <<G4endl;
#endif
projectile->Set4Momentum( Pprojectile );
@@ -1156,9 +1219,9 @@ M0target = MtestTr;
projectile->IncrementCollisionCount( 1 );
target->IncrementCollisionCount( 1 );
//Uzhi_projectilediffraction = UzhiPrD;
//Uzhi_targetdiffraction = UzhiTrD;
//Uzhi_nondiffraction = UzhiND;
// Uzhi_projectilediffraction = UzhiPrD;
// Uzhi_targetdiffraction = UzhiTrD;
// Uzhi_nondiffraction = UzhiND;
//G4cout << Uzhi_projectilediffraction << " " << Uzhi_targetdiffraction << " "
// << Uzhi_nondiffraction << G4endl;
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4ElasticHNScattering.cc 91914 2015-08-11 07:00:39Z gcosmo $
// $Id: G4ElasticHNScattering.cc 96935 2016-05-18 09:12:22Z gcosmo $
//
// ------------------------------------------------------------
@@ -49,7 +49,7 @@
#include "G4ExcitedString.hh"
#include "G4FTFParameters.hh"
#include "G4SampleResonance.hh" // Uzhi Oct 2014
#include "G4SampleResonance.hh"
#include "G4Exp.hh"
#include "G4Log.hh"
@@ -67,18 +67,17 @@ G4bool G4ElasticHNScattering::ElasticScattering( G4VSplitableHadron* projectile,
projectile->IncrementCollisionCount( 1 );
target->IncrementCollisionCount( 1 );
G4SampleResonance BrW; // Uzhi Oct 2014
G4SampleResonance BrW;
// Projectile parameters
G4LorentzVector Pprojectile = projectile->Get4Momentum();
if ( Pprojectile.z() < 0.0 ) return false;
G4bool PutOnMassShell( false );
G4double M0projectile = Pprojectile.mag();
// if ( M0projectile < projectile->GetDefinition()->GetPDGMass() ) { // Uzhi Oct 2014
G4double MminProjectile=BrW.GetMinimumMass(projectile->GetDefinition()); // Uzhi Oct 2014
G4double MminProjectile=BrW.GetMinimumMass(projectile->GetDefinition());
if ( M0projectile < MminProjectile ) { // Uzhi Oct 2014
if ( M0projectile < MminProjectile ) {
PutOnMassShell = true;
M0projectile = projectile->GetDefinition()->GetPDGMass();
}
@@ -88,11 +87,10 @@ G4bool G4ElasticHNScattering::ElasticScattering( G4VSplitableHadron* projectile,
// Target parameters
G4LorentzVector Ptarget = target->Get4Momentum();
G4double M0target = Ptarget.mag();
// if ( M0target < target->GetDefinition()->GetPDGMass() ) { // Uzhi Oct 2014
G4double MminTarget=BrW.GetMinimumMass(target->GetDefinition()); // Uzhi Oct 2014
G4double MminTarget=BrW.GetMinimumMass(target->GetDefinition());
if ( M0target < MminTarget ) { // Uzhi Oct 2014
if ( M0target < MminTarget ) {
PutOnMassShell = true;
M0target = target->GetDefinition()->GetPDGMass();
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4FTFAnnihilation.cc 91914 2015-08-11 07:00:39Z gcosmo $
// $Id: G4FTFAnnihilation.cc 96766 2016-05-04 13:31:27Z gcosmo $
//
// ------------------------------------------------------------
@@ -66,10 +66,10 @@
//#include "G4ios.hh"
//#include "UZHI_diffraction.hh"
#include "G4ParticleTable.hh" // Uzhi March 2016
//============================================================================
//define debugFTFannih
//#define debugFTFannih
//============================================================================
@@ -89,6 +89,8 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
G4VSplitableHadron*& AdditionalString,
G4FTFParameters* theParameters ) const {
//theParameters->SetProbabilityOfAnnihilation( 0.0 ); // Uzhi March 2016 ??? for other Anti_bar annih.
#ifdef debugFTFannih
G4cout << "---------------------------- Annihilation----------------" << G4endl;
#endif
@@ -142,6 +144,7 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
G4double SqrtS = std::sqrt( S );
G4double maxPtSquare;
G4double X_a( 0.0 ), X_b( 0.0 ), X_c( 0.0 ), X_d( 0.0 );
G4double MesonProdThreshold = projectile->GetDefinition()->GetPDGMass() +
target->GetDefinition()->GetPDGMass() +
( 2.0*140.0 + 16.0 )*MeV; // 2 Mpi + DeltaE
@@ -235,6 +238,11 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
#endif
G4double Xannihilation = X_a + X_b + X_c + X_d;
//X_a=0.; // Uzhi
//X_b=0.;
//X_c=0.;
//X_d=0.;
//Xannihilation = X_a + X_b + X_c + X_d;
// Projectile unpacking
G4int AQ[3];
@@ -279,14 +287,110 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
projectile->SetSecondParton( Q[0] );
projectile->SetStatus( 0 );
// Uzhi March 2016 start
G4int aAQ, aQ;
aAQ=std::abs( AQ[0] ); aQ=std::abs( Q[0] );
G4int NewCode;
G4double aKsi = G4UniformRand();
if ( aAQ == aQ )
{
if ( aAQ != 3 )
{
NewCode = 111; // Pi0-meson
if ( aKsi < 0.5 )
{
NewCode = 221; // Eta -meson
if ( aKsi < 0.25 ) {NewCode = 331;} // Eta'-meson
}
} else
{
NewCode = 221; // Eta -meson
if( aKsi < 0.5 ) {NewCode = 331;} // Eta'-meson
}
} else
{
if ( aAQ > aQ ){ NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/AQ[0]; }
else { NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/Q[0]; }
}
G4ParticleDefinition* TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewCode );
if(!TestParticle) return false;
projectile->SetDefinition( TestParticle );
theParameters->SetProjMinDiffMass( 0.5 ); // Uzhi 2016 M+140 ??
theParameters->SetProjMinNonDiffMass( 0.5 ); // Uzhi 2016 M+140 ??
// Uzhi March 2016 end
//G4cout << "String 2 " << Q[1] << " " << AQ[1] << G4endl;
target->SplitUp();
target->SetFirstParton( Q[1] );
target->SetSecondParton( AQ[1] );
target->SetStatus( 0 );
// Uzhi March 2016 Start
aAQ=std::abs( AQ[1] ); aQ=std::abs( Q[1] ); aKsi = G4UniformRand();
if ( aAQ == aQ )
{
if ( aAQ != 3 )
{
NewCode = 111; // Pi0-meson
if ( aKsi < 0.5 )
{
NewCode = 221; // Eta -meson
if ( aKsi < 0.25 ) {NewCode = 331;} // Eta'-meson
}
} else
{
NewCode = 221; // Eta -meson
if( aKsi < 0.5 ) {NewCode = 331;} // Eta'-meson
}
} else
{
if ( aAQ > aQ ){ NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/AQ[1]; }
else { NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/Q[1]; }
}
TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewCode );
if(!TestParticle) return false;
target->SetDefinition( TestParticle );
theParameters->SetTarMinDiffMass( 0.5 ); // Uzhi 2016 M+140 ??
theParameters->SetTarMinNonDiffMass( 0.5 ); // Uzhi 2016 M+140 ??
// Uzhi March 2016 end
//G4cout << "String 3 " << AQ[2] << " " << Q[2] << G4endl;
AdditionalString = new G4DiffractiveSplitableHadron();
// Uzhi March 2016 start
aAQ=std::abs( AQ[2] ); aQ=std::abs( Q[2] ); aKsi = G4UniformRand();
if ( aAQ == aQ )
{
if ( aAQ != 3 )
{
NewCode = 111; // Pi0-meson
if ( aKsi < 0.5 )
{
NewCode = 221; // Eta -meson
if ( aKsi < 0.25 ) {NewCode = 331;} // Eta'-meson
}
} else
{
NewCode = 221; // Eta -meson
if( aKsi < 0.5 ) {NewCode = 331;} // Eta'-meson
}
} else
{
if ( aAQ > aQ ){ NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/AQ[2]; }
else { NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/Q[2]; }
}
TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewCode );
if(!TestParticle) return false;
AdditionalString->SetDefinition( TestParticle );
// Uzhi March 2016 end
AdditionalString->SplitUp();
AdditionalString->SetFirstParton( AQ[2] );
AdditionalString->SetSecondParton( Q[2] );
@@ -539,6 +643,8 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
AdditionalString->IncrementCollisionCount( 1 );
target->IncrementCollisionCount( 1 );
theParameters->SetProbabilityOfAnnihilation( 0.0 ); // Uzhi March 2016
return true;
} // End of if ( Ksi < X_a / Xannihilation )
@@ -605,6 +711,7 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
Pprojectile.setPz( 0.0 );
Pprojectile.setE( SqrtS );
Pprojectile.transform( toLab );
// Uzhi March 2016 if QQ_QQbar will interact Set Mmin, MdifMin
// Calculation of the creation time
projectile->SetTimeOfCreation( target->GetTimeOfCreation() );
@@ -619,6 +726,9 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
projectile->IncrementCollisionCount( 1 );
target->IncrementCollisionCount( 1 );
//theParameters->SetProbabilityOfAnnihilation( 0.0 ); // Uzhi March 2016
// In the case baryon and anti-baryon are created. Thus the antibaryon can annihilate latter.
return true;
}
@@ -669,12 +779,79 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
projectile->SetFirstParton( LeftAQ1 );
projectile->SetSecondParton( LeftQ1 );
projectile->SetStatus( 0 );
// Uzhi March 2016 start
G4int aAQ, aQ;
aAQ=std::abs( LeftAQ1 ); aQ=std::abs( LeftQ1 );
G4int NewCode;
G4double aKsi = G4UniformRand();
if ( aAQ == aQ )
{
if ( aAQ != 3 )
{
NewCode = 111; // Pi0-meson
if ( aKsi < 0.5 )
{
NewCode = 221; // Eta -meson
if ( aKsi < 0.25 ) {NewCode = 331;} // Eta'-meson
}
} else
{
NewCode = 221; // Eta -meson
if( aKsi < 0.5 ) {NewCode = 331;} // Eta'-meson
}
} else
{
if ( aAQ > aQ ){ NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/LeftAQ1; }
else { NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/LeftQ1; }
}
G4ParticleDefinition* TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewCode );
if(!TestParticle) return false;
projectile->SetDefinition( TestParticle );
theParameters->SetProjMinDiffMass( 0.5 ); // (0.5) // GeV Uzhi March 2016 ???
theParameters->SetProjMinNonDiffMass( 0.5 );
// Uzhi March 2016 end
//G4cout << "String 2 " << LeftAQ2 << " " << LeftQ2 << G4endl;
target->SplitUp();
target->SetFirstParton( LeftQ2 );
target->SetSecondParton( LeftAQ2 );
target->SetStatus( 0 );
// Uzhi March 2016 start
aAQ=std::abs( LeftAQ2 ); aQ=std::abs( LeftQ2 ); aKsi = G4UniformRand();
if ( aAQ == aQ )
{
if ( aAQ != 3 )
{
NewCode = 111; // Pi0-meson
if ( aKsi < 0.5 )
{
NewCode = 221; // Eta -meson
if ( aKsi < 0.25 ) {NewCode = 331;} // Eta'-meson
}
} else
{
NewCode = 221; // Eta -meson
if( aKsi < 0.5 ) {NewCode = 331;} // Eta'-meson
}
} else
{
if ( aAQ > aQ ){ NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/LeftAQ2; }
else { NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/LeftQ2; }
}
TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewCode );
if(!TestParticle) return false;
target->SetDefinition( TestParticle );
theParameters->SetTarMinDiffMass( 0.5 ); // Uzhi March 2016 ???
theParameters->SetTarMinNonDiffMass( 0.5 );
// Uzhi March 2016
// Sampling kinematical properties
// 1 string LeftAQ1-LeftQ1// 2 string LeftAQ2-LeftQ2
G4ThreeVector Quark_Mom[4];
@@ -857,6 +1034,8 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
projectile->IncrementCollisionCount( 1 );
target->IncrementCollisionCount( 1 );
theParameters->SetProbabilityOfAnnihilation( 0.0 ); // Uzhi March 2016
return true;
} // End of if ( CandidatsN != 0 )
@@ -920,6 +1099,42 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
projectile->SetFirstParton( LeftQ );
projectile->SetSecondParton( LeftAQ );
projectile->SetStatus( 0 );
// Uzhi March 2016 start
G4int aAQ, aQ;
aAQ=std::abs( LeftAQ ); aQ=std::abs( LeftQ );
G4int NewCode;
G4double aKsi = G4UniformRand();
if ( aAQ == aQ )
{
if ( aAQ != 3 )
{
NewCode = 111; // Pi0-meson
if ( aKsi < 0.5 )
{
NewCode = 221; // Eta -meson
if ( aKsi < 0.25 ) {NewCode = 331;} // Eta'-meson
}
} else
{
NewCode = 221; // Eta -meson
if( aKsi < 0.5 ) {NewCode = 331;} // Eta'-meson
}
} else
{
if ( aAQ > aQ ){ NewCode = aAQ*100 + aQ*10 + 1; NewCode *= aAQ/LeftAQ; }
else { NewCode = aQ*100 + aAQ*10 + 1; NewCode *= aQ/LeftQ; }
}
G4ParticleDefinition* TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewCode );
if(!TestParticle) return false;
projectile->SetDefinition( TestParticle );
theParameters->SetProjMinDiffMass( 0.5 ); // (0.5) // GeV Uzhi March 2016
theParameters->SetProjMinNonDiffMass( 0.5 );
// Uzhi March 2016 end
target->SetStatus( 4 ); // The target nucleon has annihilated 3->4 Uzhi Oct 2014
Pprojectile.setPx( 0.0 );
Pprojectile.setPy( 0.0 );
@@ -938,6 +1153,9 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
projectile->IncrementCollisionCount( 1 );
target->IncrementCollisionCount( 1 );
theParameters->SetProbabilityOfAnnihilation( 0.0 ); // Uzhi March 2016
return true;
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4FTFModel.cc 94688 2015-12-02 17:15:08Z gunter $
// $Id: G4FTFModel.cc 97044 2016-05-23 09:48:46Z gcosmo $
// GEANT4 tag $Name: $
//
@@ -246,6 +246,7 @@ void G4FTFModel::Init( const G4Nucleus& aNucleus, const G4DynamicParticle& aProj
// Init target nucleus
theParticipants.Init( aNucleus.GetA_asInt(), aNucleus.GetZ_asInt() );
//theParticipants.Init( aNucleus.GetA_asInt(), 0 ); //For h+neutron // Uzhi March 2016
if ( theParameters != 0 ) delete theParameters;
theParameters = new G4FTFParameters( theProjectile.GetDefinition(), aNucleus.GetA_asInt(),
@@ -261,8 +262,8 @@ void G4FTFModel::Init( const G4Nucleus& aNucleus, const G4DynamicParticle& aProj
G4cout << "FTF end of Init" << G4endl << G4endl;
#endif
if ( (std::abs( theProjectile.GetDefinition()->GetBaryonNumber() ) <= 1 ) && // Uzhi 29.05.2015
(aNucleus.GetA_asInt() < 2) ) theParameters->SetProbabilityOfElasticScatt(0.);
// if ( (std::abs( theProjectile.GetDefinition()->GetBaryonNumber() ) <= 1 ) && // Uzhi 29.05.2015
// (aNucleus.GetA_asInt() < 2) ) theParameters->SetProbabilityOfElasticScatt(0.);
}
@@ -425,8 +426,6 @@ void G4FTFModel::StoreInvolvedNucleon() {
void G4FTFModel::ReggeonCascade() {
// Implementation of the reggeon theory inspired model
// G4double ExcitationE = theParameters->GetExcitationEnergyPerWoundedNucleon(); // Uzhi May 2015
#ifdef debugReggeonCascade
G4cout << "G4FTFModel::ReggeonCascade -----------" << G4endl
<< "theProjectile.GetTotalMomentum() " << theProjectile.GetTotalMomentum() << G4endl
@@ -439,7 +438,6 @@ void G4FTFModel::ReggeonCascade() {
// Reggeon cascading in target nucleus
for ( G4int InvTN = 0; InvTN < InitNINt; InvTN++ ) {
G4Nucleon* aTargetNucleon = TheInvolvedNucleonsOfTarget[ InvTN ];
// aTargetNucleon->SetBindingEnergy( ExcitationE ); // Uzhi April 2015
G4double CreationTime = aTargetNucleon->GetSplitableHadron()->GetTimeOfCreation();
@@ -486,7 +484,6 @@ void G4FTFModel::ReggeonCascade() {
// for ( G4int InvPN = 0; InvPN < NumberOfInvolvedNucleonsOfProjectile; InvPN++ ) {
for ( G4int InvPN = 0; InvPN < InitNINp; InvPN++ ) {
G4Nucleon* aProjectileNucleon = TheInvolvedNucleonsOfProjectile[ InvPN ];
// aProjectileNucleon->SetBindingEnergy( ExcitationE ); // Uzhi May 2015
G4double CreationTime = aProjectileNucleon->GetSplitableHadron()->GetTimeOfCreation();
@@ -502,7 +499,7 @@ void G4FTFModel::ReggeonCascade() {
G4double impact2= sqr( XofWoundedNucleon - Neighbour->GetPosition().x() ) +
sqr( YofWoundedNucleon - Neighbour->GetPosition().y() );
if ( G4UniformRand() < theParameters->GetCofNuclearDestructionPr() * // Uzhi May 2015
if ( G4UniformRand() < theParameters->GetCofNuclearDestructionPr() *
G4Exp( -impact2 / theParameters->GetR2ofNuclearDestruction() )
) {
// The neighbour nucleon is involved in the reggeon cascade
@@ -514,7 +511,7 @@ void G4FTFModel::ReggeonCascade() {
Neighbour->Hit( projectileSplitable );
projectileSplitable->SetTimeOfCreation( CreationTime );
projectileSplitable->SetStatus( 3 ); // 2->3 Uzhi Oct 2014
projectileSplitable->SetStatus( 3 );
}
}
}
@@ -908,6 +905,7 @@ G4bool G4FTFModel::ExciteParticipants() {
if ( ! Result ) continue;
}
if ( G4UniformRand() <
( 1.0 - target->GetSoftCollisionCount() / MaxNumOfInelCollisions ) * // Uzhi March 2015
( 1.0 - projectile->GetSoftCollisionCount() / MaxNumOfInelCollisions ) ) {
//if ( ! HighEnergyInter ) {
// G4bool Annihilation = false;
@@ -955,7 +953,7 @@ G4bool G4FTFModel::ExciteParticipants() {
#ifdef debugBuildString
G4cout << "Annihilation" << G4endl;
#endif
// // Uzhi March 2016
// Skipping possible interactions of the annihilated nucleons
while ( theParticipants.Next() ) { /* Loop checking, 10.08.2015, A.Ribon */
G4InteractionContent& acollision = theParticipants.GetInteraction();
@@ -965,7 +963,7 @@ G4bool G4FTFModel::ExciteParticipants() {
acollision.SetStatus( 0 );
}
}
// // Uzhi March 2016
// Return to the annihilation
theParticipants.StartLoop();
for ( G4int I = 0; I < CurrentInteraction; I++ ) theParticipants.Next();
@@ -989,6 +987,19 @@ G4bool G4FTFModel::ExciteParticipants() {
#endif
if ( AdditionalString != 0 ) theAdditionalString.push_back( AdditionalString );
/* Uzhi March 2016
if(target->GetStatus() == 4){
// Skipping possible interactions of the annihilated nucleons
while ( theParticipants.Next() ) {
G4InteractionContent& acollision = theParticipants.GetInteraction();
G4VSplitableHadron* NextProjectileNucleon = acollision.GetProjectile();
G4VSplitableHadron* NextTargetNucleon = acollision.GetTarget();
if ( target == NextTargetNucleon ) {acollision.SetStatus( 0 );}
}
}
theParticipants.StartLoop();
for ( G4int I = 0; I < CurrentInteraction; I++ ) theParticipants.Next();
*/ //Uzhi March 2016
}
}
}
@@ -2260,11 +2271,28 @@ G4ExcitedStringVector* G4FTFModel::BuildStrings() {
//G4cout << "primaries[ahadron] " << primaries[ahadron] << G4endl;
//if ( primaries[ahadron]->GetStatus() <= 1 ) isProjectile=true;
FirstString = 0; SecondString = 0;
if ( primaries[ahadron]->GetStatus() <= 1 ) // Uzhi Oct 2014 start
if ( primaries[ahadron]->GetStatus() == 0 ) // Uzhi May 2016
{
theExcitation->CreateStrings( primaries[ ahadron ], isProjectile,
FirstString, SecondString, theParameters );
}
else if ( primaries[ahadron]->GetStatus() == 1
&& primaries[ahadron]->GetSoftCollisionCount() != 0 ) // Uzhi May 2016
{
theExcitation->CreateStrings( primaries[ ahadron ], isProjectile,
FirstString, SecondString, theParameters );
}
else if ( primaries[ahadron]->GetStatus() == 1
&& primaries[ahadron]->GetSoftCollisionCount() == 0 ) // Uzhi May 2016
{
G4LorentzVector ParticleMomentum=primaries[ahadron]->Get4Momentum();
G4KineticTrack* aTrack=new G4KineticTrack(
primaries[ahadron]->GetDefinition(),
primaries[ahadron]->GetTimeOfCreation(),
primaries[ahadron]->GetPosition(),
ParticleMomentum);
FirstString=new G4ExcitedString(aTrack);
}
else if(primaries[ahadron]->GetStatus() == 2)
{
G4LorentzVector ParticleMomentum=primaries[ahadron]->Get4Momentum();
@@ -2275,7 +2303,7 @@ G4ExcitedStringVector* G4FTFModel::BuildStrings() {
ParticleMomentum);
FirstString=new G4ExcitedString(aTrack);
}
else {G4cout<<"Something wrong in FTF Model Build String" << G4endl;} // Uzhi Oct 2014 end
else {G4cout<<"Something wrong in FTF Model Build String" << G4endl;}
if ( FirstString != 0 ) strings->push_back( FirstString );
if ( SecondString != 0 ) strings->push_back( SecondString );
@@ -2326,18 +2354,17 @@ G4ExcitedStringVector* G4FTFModel::BuildStrings() {
<< " " << aProjectile->GetStatus() << G4endl;
#endif
FirstString = 0; SecondString = 0;
if ( aProjectile->GetStatus() == 0 ) { // A nucleon took part in non-diffractive interaction
#ifdef debugBuildString
G4cout << "Case1 aProjectile->GetStatus() == 0 " << G4endl;
#endif
FirstString = 0; SecondString = 0;
theExcitation->CreateStrings(
TheInvolvedNucleonsOfProjectile[ ahadron ]->GetSplitableHadron(),
isProjectile, FirstString, SecondString, theParameters );
if ( FirstString != 0 ) strings->push_back( FirstString );
if ( SecondString != 0 ) strings->push_back( SecondString );
} else if ( aProjectile->GetStatus() == 1 && aProjectile->GetSoftCollisionCount() != 0 ) {
// Nucleon took part in diffractive interaction
@@ -2345,12 +2372,10 @@ G4ExcitedStringVector* G4FTFModel::BuildStrings() {
G4cout << "Case2 aProjectile->GetStatus() !=0 St==1 SoftCol!=0" << G4endl;
#endif
FirstString = 0; SecondString = 0;
theExcitation->CreateStrings(
TheInvolvedNucleonsOfProjectile[ ahadron ]->GetSplitableHadron(),
isProjectile, FirstString, SecondString, theParameters );
if ( FirstString != 0 ) strings->push_back( FirstString );
if ( SecondString != 0 ) strings->push_back( SecondString );
} else if ( aProjectile->GetStatus() == 1 && aProjectile->GetSoftCollisionCount() == 0 &&
HighEnergyInter ) {
// Nucleon was considered as a paricipant of an interaction,
@@ -2361,12 +2386,13 @@ G4ExcitedStringVector* G4FTFModel::BuildStrings() {
G4cout << "Case3 aProjectile->GetStatus() !=0 St==1 SoftCol==0" << G4endl;
#endif
FirstString = 0; SecondString = 0;
theExcitation->CreateStrings(
TheInvolvedNucleonsOfProjectile[ ahadron ]->GetSplitableHadron(),
isProjectile, FirstString, SecondString, theParameters );
if ( FirstString != 0 ) strings->push_back( FirstString );
if ( SecondString != 0 ) strings->push_back( SecondString );
G4LorentzVector ParticleMomentum=aProjectile->Get4Momentum();
G4KineticTrack* aTrack=new G4KineticTrack(
aProjectile->GetDefinition(),
aProjectile->GetTimeOfCreation(),
aProjectile->GetPosition(),
ParticleMomentum);
FirstString=new G4ExcitedString(aTrack);
#ifdef debugBuildString
G4cout << " Strings are built for nucleon marked for an interaction, but"
@@ -2380,15 +2406,16 @@ G4ExcitedStringVector* G4FTFModel::BuildStrings() {
G4cout << "Case4 aProjectile->GetStatus() !=0 St==2 " << G4endl;
#endif
FirstString = 0; SecondString = 0;
theExcitation->CreateStrings(
TheInvolvedNucleonsOfProjectile[ ahadron ]->GetSplitableHadron(),
isProjectile, FirstString, SecondString, theParameters );
if ( FirstString != 0 ) strings->push_back( FirstString );
if ( SecondString != 0 ) strings->push_back( SecondString );
G4LorentzVector ParticleMomentum=aProjectile->Get4Momentum();
G4KineticTrack* aTrack=new G4KineticTrack(
aProjectile->GetDefinition(),
aProjectile->GetTimeOfCreation(),
aProjectile->GetPosition(),
ParticleMomentum);
FirstString=new G4ExcitedString(aTrack);
#ifdef debugBuildString
G4cout << " Strings are build for involved nucleon." << G4endl;
G4cout << " A track is build for involved nucleon." << G4endl;
#endif
} else {
@@ -2405,8 +2432,11 @@ G4ExcitedStringVector* G4FTFModel::BuildStrings() {
#endif
}
}
}
if ( FirstString != 0 ) strings->push_back( FirstString );
if ( SecondString != 0 ) strings->push_back( SecondString );
} // end of for ( G4int ahadron = 0; ahadron < NumberOfInvolvedNucleonsOfProjectile
} // ens of if ( ! GetProjectileNucleus() )
#ifdef debugBuildString
G4cout << "Building of target-like strings" << G4endl;
@@ -2421,25 +2451,20 @@ G4ExcitedStringVector* G4FTFModel::BuildStrings() {
<< aNucleon->GetStatus() << " " << aNucleon->GetSoftCollisionCount()<<G4endl;;
#endif
if ( aNucleon->GetStatus() == 0 ) { // A nucleon took part in non-diffractive interaction
FirstString = 0 ; SecondString = 0;
FirstString = 0 ; SecondString = 0;
if ( aNucleon->GetStatus() == 0 ) {
// A nucleon took part in non-diffractive interaction
theExcitation->CreateStrings( aNucleon, isProjectile,
FirstString, SecondString, theParameters );
if ( FirstString != 0 ) strings->push_back( FirstString );
if ( SecondString != 0 ) strings->push_back( SecondString );
#ifdef debugBuildString
G4cout << " 1 case A string is build" << G4endl;
#endif
} else if ( aNucleon->GetStatus() == 1 && aNucleon->GetSoftCollisionCount() != 0 ) {
// A nucleon took part in diffractive interaction
FirstString = 0; SecondString = 0;
theExcitation->CreateStrings( aNucleon, isProjectile,
FirstString, SecondString, theParameters );
if ( FirstString != 0 ) strings->push_back( FirstString );
if ( SecondString != 0 ) strings->push_back( SecondString );
#ifdef debugBuildString
G4cout << " 2 case A string is build, nucleon was excited." << G4endl;
#endif
@@ -2449,27 +2474,18 @@ G4ExcitedStringVector* G4FTFModel::BuildStrings() {
// A nucleon was considered as a participant but due to annihilation
// its interactions were skipped. It will be considered as involved one
// at high energies.
FirstString = 0; SecondString = 0;
theExcitation->CreateStrings( aNucleon, isProjectile,
FirstString, SecondString, theParameters );
if(SecondString == 0) // Uzhi Oct 2014 start
{
G4LorentzVector ParticleMomentum=aNucleon->Get4Momentum();
G4KineticTrack* aTrack=new G4KineticTrack(
G4LorentzVector ParticleMomentum=aNucleon->Get4Momentum();
G4KineticTrack* aTrack=new G4KineticTrack(
aNucleon->GetDefinition(),
aNucleon->GetTimeOfCreation(),
FirstString->GetPosition(),
aNucleon->GetPosition(),
ParticleMomentum);
delete FirstString;
FirstString=new G4ExcitedString(aTrack);
}; // Uzhi Oct 2014 end
if ( FirstString != 0 ) strings->push_back( FirstString );
if ( SecondString != 0 ) strings->push_back( SecondString );
FirstString=new G4ExcitedString(aTrack);
#ifdef debugBuildString
G4cout << "3 case A string is build" << G4endl;
G4cout << "3 case A track is build" << G4endl;
#endif
} else if ( aNucleon->GetStatus() == 1 && aNucleon->GetSoftCollisionCount() == 0 &&
@@ -2477,36 +2493,28 @@ G4ExcitedStringVector* G4FTFModel::BuildStrings() {
// A nucleon was considered as a participant but due to annihilation
// its interactions were skipped. It will be returned to nucleus
// at low energies energies.
aNucleon->SetStatus( 5 ); // 4->5 Uzhi Oct 2014
aNucleon->SetStatus( 5 );
// ????????? delete aNucleon;
#ifdef debugBuildString
G4cout << "4 case A string is not build" << G4endl;
#endif
} else if(( aNucleon->GetStatus() == 2 )|| // A nucleon took part in quark exchange Uzhi Oct 2014
} else if(( aNucleon->GetStatus() == 2 )|| // A nucleon took part in quark exchange
( aNucleon->GetStatus() == 3 ) ){ // A nucleon was involved in Reggeon cascading
FirstString = 0; SecondString = 0;
theExcitation->CreateStrings( aNucleon, isProjectile,
FirstString, SecondString, theParameters );
if(SecondString == 0) // Uzhi Oct 2014 start
{
G4LorentzVector ParticleMomentum=aNucleon->Get4Momentum();
G4KineticTrack* aTrack=new G4KineticTrack(
aNucleon->GetDefinition(),
aNucleon->GetTimeOfCreation(),
aNucleon->GetPosition(), //FirstString->GetPosition(),
ParticleMomentum);
delete FirstString;
G4LorentzVector ParticleMomentum=aNucleon->Get4Momentum();
G4KineticTrack* aTrack=new G4KineticTrack(
aNucleon->GetDefinition(),
aNucleon->GetTimeOfCreation(),
aNucleon->GetPosition(), //FirstString->GetPosition(),
ParticleMomentum);
FirstString=new G4ExcitedString(aTrack);
}; // Uzhi Oct 2014 end
if ( FirstString != 0 ) strings->push_back( FirstString );
if ( SecondString != 0 ) strings->push_back( SecondString );
#ifdef debugBuildString
G4cout << "5 case A string is build" << G4endl;
G4cout << "5 case A track is build" << G4endl;
#endif
} else {
@@ -2516,7 +2524,11 @@ G4ExcitedStringVector* G4FTFModel::BuildStrings() {
#endif
}
}
if ( FirstString != 0 ) strings->push_back( FirstString );
if ( SecondString != 0 ) strings->push_back( SecondString );
} // end of for ( G4int ahadron = 0; ahadron < NumberOfInvolvedNucleonsOfTarget
#ifdef debugBuildString
G4cout << G4endl << "theAdditionalString.size() " << theAdditionalString.size()
@@ -2943,9 +2955,8 @@ ComputeNucleusProperties( G4V3DNucleus* nucleus, // input paramete
+ aNucleon->Get4Momentum().perp2() );
sumMasses += 20.0*MeV; // Separation energy for a nucleon
// residualExcitationEnergy += ExcitationEnergyPerWoundedNucleon; // Uzhi April 2015
residualExcitationEnergy += -ExcitationEnergyPerWoundedNucleon*
G4Log( G4UniformRand()); // Uzhi April 2015
G4Log( G4UniformRand());
residualMassNumber--;
// The absolute value below is needed only in the case of anti-nucleus.
residualCharge -= std::abs( G4int( aNucleon->GetDefinition()->GetPDGCharge() ) );
@@ -2970,6 +2981,7 @@ ComputeNucleusProperties( G4V3DNucleus* nucleus, // input paramete
if ( residualMassNumber == 1 ) {
residualExcitationEnergy = 0.0;
}
residualMass += residualExcitationEnergy; // Uzhi March 2016 ????
}
sumMasses += std::sqrt( sqr( residualMass ) + residualMomentum.perp2() );
return true;
@@ -3002,7 +3014,7 @@ GenerateDeltaIsobar( const G4double sqrtS, // input parameter
//const G4double ProbDeltaIsobar = 0.05; // Uzhi 6.07.2012
//const G4double ProbDeltaIsobar = 0.25; // Uzhi 13.06.2013
const G4double probDeltaIsobar = 0.10; // A.R. 07.08.2013
const G4double probDeltaIsobar = 0.05; // A.R. 07.08.2013 0.10 -> 0.05 Uzhi March 2016
G4int maxNumberOfDeltas = G4int( (sqrtS - sumMasses)/(400.0*MeV) );
G4int numberOfDeltas = 0;
@@ -3032,7 +3044,7 @@ GenerateDeltaIsobar( const G4double sqrtS, // input parameter
splitableHadron->SetDefinition( old_def );
break;
} else { // Change is accepted
sumMasses += ( massDelta - massNuc );
sumMasses += ( massDelta - massNuc ); // Uzhi March 2016 ???
}
}
}
@@ -3076,35 +3088,67 @@ SamplingNucleonKinematics( G4double averagePt2, // input param
G4bool success = true;
G4double SumMasses = residualMass;
/* // Uzhi March 2016 ???
for ( G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
G4Nucleon* aNucleon = involvedNucleons[i];
if ( ! aNucleon ) continue;
SumMasses += aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass();
}
*/
const G4int maxNumberOfLoops = 1000;
G4int loopCounter = 0;
do { // while ( ! success )
success = true;
//======================================= Sampling of nucleon Pt ===============
G4ThreeVector ptSum( 0.0, 0.0, 0.0 );
G4double xSum = 0.0;
for ( G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
G4Nucleon* aNucleon = involvedNucleons[i];
if ( ! aNucleon ) continue;
G4ThreeVector tmpPt = GaussianPt( averagePt2, maxPt2 );
ptSum += tmpPt;
// Uzhi 2016
G4LorentzVector tmp( tmpPt.x(), tmpPt.y(), 0., 0.);
aNucleon->SetMomentum( tmp );
}
G4double deltaPx = ( ptSum.x() - pResidual.x() ) / numberOfInvolvedNucleons;
G4double deltaPy = ( ptSum.y() - pResidual.y() ) / numberOfInvolvedNucleons;
SumMasses = residualMass;
for ( G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
G4Nucleon* aNucleon = involvedNucleons[i];
if ( ! aNucleon ) continue;
G4double px = aNucleon->Get4Momentum().px() - deltaPx;
G4double py = aNucleon->Get4Momentum().py() - deltaPy;
G4double MtN = std::sqrt( sqr( aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass() )
+ sqr( px ) + sqr( py ) );
SumMasses += MtN;
G4LorentzVector tmp( px, py, 0., MtN);
aNucleon->SetMomentum( tmp );
}
//======================================== Sampling X of nucleon ===============
G4double xSum = 0.0;
for ( G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
G4Nucleon* aNucleon = involvedNucleons[i];
if ( ! aNucleon ) continue;
// Uzhi 2016
G4ThreeVector tmpX = GaussianPt( dCor*dCor, 1.0 );
G4double x = tmpX.x() +
aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass()/SumMasses;
// G4double x = tmpX.x() + // Uzhi 2016
// aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass()/SumMasses;
G4double x = tmpX.x() + aNucleon->Get4Momentum().e()/SumMasses;
if ( x < 0.0 || x > 1.0 ) {
success = false;
break;
}
xSum += x;
//AR The energy is in the lab (instead of cms) frame but it will not be used.
G4LorentzVector tmp( tmpPt.x(), tmpPt.y(), x, aNucleon->Get4Momentum().e() );
// G4LorentzVector tmp( tmpPt.x(), tmpPt.y(), x, aNucleon->Get4Momentum().e() ); // Uzhi
G4LorentzVector tmp( aNucleon->Get4Momentum().x(), aNucleon->Get4Momentum().y(),
x, aNucleon->Get4Momentum().e() );
aNucleon->SetMomentum( tmp );
}
@@ -3112,8 +3156,8 @@ SamplingNucleonKinematics( G4double averagePt2, // input param
if ( ! success ) continue;
G4double deltaPx = ( ptSum.x() - pResidual.x() ) / numberOfInvolvedNucleons;
G4double deltaPy = ( ptSum.y() - pResidual.y() ) / numberOfInvolvedNucleons;
// G4double deltaPx = ( ptSum.x() - pResidual.x() ) / numberOfInvolvedNucleons; // Uzhi 2016
// G4double deltaPy = ( ptSum.y() - pResidual.y() ) / numberOfInvolvedNucleons;
G4double delta = 0.0;
if ( residualMassNumber == 0 ) {
delta = ( xSum - 1.0 ) / numberOfInvolvedNucleons;
@@ -3139,16 +3183,23 @@ SamplingNucleonKinematics( G4double averagePt2, // input param
break;
}
}
/* // Uzhi 2016
G4double px = aNucleon->Get4Momentum().px() - deltaPx;
G4double py = aNucleon->Get4Momentum().py() - deltaPy;
mass2 += ( sqr( aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass() )
+ sqr( px ) + sqr( py ) ) / x;
G4LorentzVector tmp( px, py, x, aNucleon->Get4Momentum().e() );
*/
mass2 += sqr( aNucleon->Get4Momentum().e() ) / x;
G4LorentzVector tmp( aNucleon->Get4Momentum().px(), aNucleon->Get4Momentum().py(),
x, aNucleon->Get4Momentum().e() );
aNucleon->SetMomentum( tmp );
}
if ( ! success ) continue;
//=======================================================
if ( success && residualMassNumber != 0 ) {
mass2 += ( sqr( residualMass ) + pResidual.perp2() ) / xSum;
// mass2 += ( sqr( residualMass ) + pResidual.perp2() ) / xSum; // Uzhi 2016
mass2 += sqr( residualMass ) / xSum;
}
#ifdef debugPutOnMassShell
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4FTFParameters.cc 91775 2015-08-05 14:42:39Z gcosmo $
// $Id: G4FTFParameters.cc 97394 2016-06-02 10:13:06Z gcosmo $
// GEANT4 tag $Name: $
//
@@ -513,7 +513,7 @@ G4FTFParameters::G4FTFParameters( const G4ParticleDefinition* particle,
// Parameters of elastic scattering
// Gaussian parametrization of elastic scattering amplitude assumed
SetAvaragePt2ofElasticScattering( 1.0/( Xtotal*Xtotal/16.0/pi/Xelastic/0.3894 )*GeV*GeV );
//G4cout << "AvaragePt2ofElasticScattering " << GetAvaragePt2ofElasticScattering() << G4endl;
// G4cout << "AvaragePt2ofElasticScattering " << GetAvaragePt2ofElasticScattering() << G4endl;
// Parameters of excitations
@@ -522,12 +522,13 @@ G4FTFParameters::G4FTFParameters( const G4ParticleDefinition* particle,
if ( ProjectilePDGcode > 1000 ) { // Projectile is baryon
// Proc# A1 B1 A2 B2 A3 Atop Ymin
SetParams( 0, 13.71, 1.75, -214.5, 4.25, 0.0, 0.5 , 1.1 ); // Qexchange without Exc.
SetParams( 1, 25.0, 1.0, -50.34, 1.5 , 0.0, 0.0 , 1.4 ); // Qexchange with Exc.
// SetParams( 0, 13.71, 1.75, -214.5, 4.25, 0.0, 0.5 , 1.1 ); // Qexchange without Exc.
SetParams( 0, 13.71, 1.75, -30.69, 3.0 , 0.0, 1.0 , 0.93 ); // Qexchange without Exc.
SetParams( 1, 25.0 , 1.0 , -50.34, 1.5 , 0.0, 0.0 , 1.4 ); // Qexchange with Exc.
if( Xinel > 0.) {
SetParams( 2, 6.0/Xinel, 0.0 ,-6.0/Xinel*16.28, 3.0 , 0.0, 0.0 , 0.93);// Projectile diffraction
SetParams( 3, 6.0/Xinel, 0.0 ,-6.0/Xinel*16.28, 3.0 , 0.0, 0.0 , 0.93);// Target diffraction
SetParams( 4, 1.0, 0.0 , -2.01 , 0.5 , 0.0, 0.0 , 1.4 );// Qexchange with Exc. Additional multiply
SetParams( 4, 0.6 , 0.0 , -1.20, 0.5 , 0.0, 0.0 , 1.4 );// Qexchange with Exc. Additional multiply
} else {
SetParams( 2, 0.0, 0.0 ,0.0, 0.0 , 0.0, 0.0 , 0.0);
SetParams( 3, 0.0, 0.0 ,0.0, 0.0 , 0.0, 0.0 , 0.0);
@@ -550,9 +551,9 @@ G4FTFParameters::G4FTFParameters( const G4ParticleDefinition* particle,
SetProjMinNonDiffMass( 1.16 ); // GeV
SetTarMinDiffMass( 1.16 ); // GeV
SetTarMinNonDiffMass( 1.16 ); // GeV
SetAveragePt2( 0.15 ); // GeV^2 // Uzhi Oct 2014
SetProbLogDistrPrD( 0.3 ); // Uzhi Oct 2014 0.5
SetProbLogDistr(0.3 ); // 0.5
SetAveragePt2( 0.3 ); // GeV^2 // Uzhi Oct 2014
SetProbLogDistrPrD( 0.3 ); // Uzhi Oct 2014 0.5
SetProbLogDistr(0.3); // 0.5
} else if( ProjectilePDGcode < -1000 ) { // Projectile is anti_baryon
@@ -580,7 +581,7 @@ G4FTFParameters::G4FTFParameters( const G4ParticleDefinition* particle,
SetProjMinNonDiffMass( ProjectileMass + 0.22 ); // GeV
SetTarMinDiffMass( TargetMass + 0.22 ); // GeV
SetTarMinNonDiffMass( TargetMass + 0.22 ); // GeV
SetAveragePt2( 0.15 ); // GeV^2 // Uzhi Oct 2014
SetAveragePt2( 0.3 ); // GeV^2 // Uzhi Oct 2014
SetProbLogDistrPrD( 0.3 ); // Uzhi Oct 2014
SetProbLogDistr( 0.3 );
@@ -603,7 +604,7 @@ G4FTFParameters::G4FTFParameters( const G4ParticleDefinition* particle,
SetProjMinNonDiffMass( 0.5 ); // (0.5) // GeV
SetTarMinDiffMass( 1.16 ); // GeV
SetTarMinNonDiffMass( 1.16 ); // GeV
SetAveragePt2( 0.15 ); // GeV^2 // Uzhi Oct 2014
SetAveragePt2( 0.3 ); // GeV^2 // Uzhi Oct 2014
SetProbLogDistrPrD( 0.3 ); // Uzhi Oct 2014
SetProbLogDistr( 0.3 );
@@ -626,14 +627,15 @@ G4FTFParameters::G4FTFParameters( const G4ParticleDefinition* particle,
SetProjMinNonDiffMass( 0.7 ); // (1.4) // (0.7) // GeV
SetTarMinDiffMass( 1.16 ); // GeV
SetTarMinNonDiffMass( 1.16 ); // GeV
SetAveragePt2( 0.15 ); // GeV^2 // Uzhi Oct 2014
SetAveragePt2( 0.3 ); // GeV^2 // Uzhi Oct 2014
SetProbLogDistrPrD( 0.5 ); // Uzhi Oct 2014
SetProbLogDistr( 0.3 ); // Uzhi 5.06.2012
} else { // Projectile is undefined, Nucleon assumed
// Proc# A1 B1 A2 B2 A3 Atop Ymin
SetParams( 0, 13.71, 1.75, -214.5, 4.25, 0.0, 0.5 , 1.1 ); // Qexchange without Exc.
// SetParams( 0, 13.71, 1.75, -214.5, 4.25, 0.0, 0.5 , 1.1 ); // Qexchange without Exc. May 2016
SetParams( 0, 13.71, 1.75, -30.69, 3.0 , 0.0, 1.0 , 0.93 ); // Qexchange without Exc.
SetParams( 1, 25.0, 1.0, -50.34, 1.5 , 0.0, 0.0 , 1.4 ); // Qexchange with Exc.
if( Xinel > 0.) {
SetParams( 2, 6.0/Xinel, 0.0 ,-6.0/Xinel*16.28, 3.0 , 0.0, 0.0 , 0.93); // Projectile diffraction
@@ -654,7 +656,7 @@ G4FTFParameters::G4FTFParameters( const G4ParticleDefinition* particle,
SetProjMinNonDiffMass( ProjectileMass + 0.22 ); // GeV
SetTarMinDiffMass( TargetMass + 0.22 ); // GeV
SetTarMinNonDiffMass( TargetMass + 0.22 ); // GeV
SetAveragePt2( 0.15 ); // GeV^2 // Uzhi Oct 2014
SetAveragePt2( 0.3 ); // GeV^2 // Uzhi Oct 2014
SetProbLogDistrPrD( 0.3 ); // Uzhi Oct 2014
SetProbLogDistr( 0.3 );
@@ -1,4 +1,4 @@
$Id: History 92025 2015-08-13 14:17:05Z gcosmo $
$Id: History 97675 2016-06-07 08:29:49Z gcosmo $
-------------------------------------------------------------------
==========================================================
@@ -14,6 +14,33 @@ code and to keep track of all tags.
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
6-June-2016 V. Uzhinsky (had-hadronization-V10-02-05)
Re-tag of previouse tag. Compilation warning is erased.
4-June-2016 V. Uzhinsky (had-hadronization-V10-02-04)
A solution of the baryon puzzle of NA49 data has been found! <Pt>
of baryons 1/2 at a string fragmentation is setting up at 435 MeV/c,
and <Pt> for barion 3/2 production - 900 MeV/c.
1-June-2016 V. Uzhinsky (had-hadronization-V10-02-03)
Fine tuning of G4LundStringFragmentation.cc. <Pt> of mesons created at
quark fragmentation is decreased. <Pt> of baryons created at quark and
diquark is increased. Fragmentation functions of qq-> B(1/2) and B(3/2)
are implemented correctly.
28-May-2016 V. Uzhinsky (had-hadronization-V10-02-02)
<Pt^2> is increased in 2 times in G4LundStringFragmentation.cc.
It is very important for a description of NA49 exp. data on
pp-interactions at 158 GeV/c, especially for xF and Pt distributions.
23-May-2016 V. Uzhinsky (had-hadronization-V10-02-01)
Di-quark fragmentation into baryons is improved in LUND
string fragmentation. Description of NA49 and NA61/SHINE
exp. data on p+p->p+X is improved.
12-May-2016 V. Uzhinsky (had-hadronization-V10-02-00)
- G4LundStringFragmentation.cc, the method SetMinimalStringMass was improved
which is important for Pbar P annihilation.
13-Aug-2015 A. Ribon (had-hadronization-V10-01-09)
- G4QGSMFragmentation, G4FragmentingString : Coverity fix.
@@ -84,17 +84,20 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings(const G4ExcitedStrin
#endif
for ( unsigned int astring=0; astring < theStrings->size(); astring++)
// for ( unsigned int astring=0; astring < 1; astring++)
{
if ( theStrings->operator[](astring)->IsExcited() )
{KTsum+= theStrings->operator[](astring)->Get4Momentum();}
else {KTsum+=theStrings->operator[](astring)->GetKineticTrack()->Get4Momentum();}
}
G4LorentzRotation toCms( -1 * KTsum.boostVector() ); // Uzhi 22 June 2014
G4LorentzRotation toLab(toCms.inverse()); // Uzhi 22 June 2014
G4LorentzRotation toCms( -1 * KTsum.boostVector() );
G4LorentzRotation toLab(toCms.inverse());
G4LorentzVector Ptmp;
KTsum=G4LorentzVector(0.,0.,0.,0.);
for ( unsigned int astring=0; astring < theStrings->size(); astring++) // Uzhi 22 June 2014
for ( unsigned int astring=0; astring < theStrings->size(); astring++)
// for ( unsigned int astring=0; astring < 1; astring++)
{
if ( theStrings->operator[](astring)->IsExcited() )
{
@@ -112,7 +115,7 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings(const G4ExcitedStrin
theStrings->operator[](astring)->GetKineticTrack()->Set4Momentum(Ptmp);
KTsum+= theStrings->operator[](astring)->GetKineticTrack()->Get4Momentum();
}
} // Uzhi 22 June 2014
}
G4KineticTrackVector * theResult = new G4KineticTrackVector;
G4int attempts(0);
@@ -132,7 +135,7 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings(const G4ExcitedStrin
NeedEnergyCorrector=false;
for ( unsigned int astring=0; astring < theStrings->size(); astring++)
// for ( unsigned int astring=0; astring < 1; astring++)
// for ( unsigned int astring=0; astring < 1; astring++) // Vova
{
#ifdef debug_G4ExcitedStringDecay
G4cout<<"String No "<<astring+1<<" Excited? "<<theStrings->operator[](astring)->IsExcited()<<G4endl;
@@ -152,7 +155,8 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings(const G4ExcitedStrin
#endif
generatedKineticTracks=FragmentString(*theStrings->operator[](astring));
#ifdef debug_G4ExcitedStringDecay
G4cout<<"(G4ExcitedStringDecay) Number of produced hadrons = "<<generatedKineticTracks->size()<<G4endl;
G4cout<<"(G4ExcitedStringDecay) Number of produced hadrons = "
<<generatedKineticTracks->size()<<G4endl;
#endif
} else {
#ifdef debug_G4ExcitedStringDecay
@@ -174,8 +178,7 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings(const G4ExcitedStrin
generatedKineticTracks->push_back(aTrack);
}
// if (generatedKineticTracks == NULL) // Uzhi 02.06.2015
if (generatedKineticTracks->size() == 0) // Uzhi 02.06.2015
if (generatedKineticTracks->size() == 0) // Uzhi 02.06.2015
{
// G4cerr << "G4VPartonStringModel:No KineticTracks produced" << G4endl; // Uzhi 02.06.2015
// continue; // Uzhi 02.06.2015
@@ -220,12 +223,12 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings(const G4ExcitedStrin
if ( NeedEnergyCorrector ) success=EnergyAndMomentumCorrector(theResult, KTsum);
} while(!success && (attempts < 10)); /* Loop checking, 07.08.2015, A.Ribon */
for ( unsigned int aTrack=0; aTrack<theResult->size();aTrack++) // Uzhi 22 June 2014
for ( unsigned int aTrack=0; aTrack<theResult->size();aTrack++)
{
Ptmp=(*theResult)[aTrack]->Get4Momentum();
Ptmp.transform( toLab);
(*theResult)[aTrack]->Set4Momentum(Ptmp);
} // Uzhi 22 June 2014
}
#ifdef debug_G4ExcitedStringDecay
G4cout<<"End of the strings fragmentation (G4ExcitedStringDecay)"<<G4endl;
@@ -240,13 +243,15 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings(const G4ExcitedStrin
KTsum1+= (*theResult)[aTrack]->Get4Momentum();
}
G4cout << "Needcorrector/success " << NeedEnergyCorrector << "/" << success << ", Corrected total 4 momentum " << KTsum1 << G4endl;
G4cout << "Needcorrector/success " << NeedEnergyCorrector << "/" << success
<< ", Corrected total 4 momentum " << KTsum1 << G4endl;
if ( ! success ) G4cout << "failed to correct E/p" << G4endl;
G4cout<<"End of the Hadronization (G4ExcitedStringDecay)"<<G4endl;
#endif
for ( unsigned int astring=0; astring < theStrings->size(); astring++) // Uzhi 24 Oct. 2014
// for ( unsigned int astring=0; astring < theStrings->size(); astring++) // Uzhi 24 Oct. 2014
for ( unsigned int astring=0; astring < 1; astring++) // Uzhi 24 Oct. 2014
{
if ( theStrings->operator[](astring)->IsExcited() )
{
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4LundStringFragmentation.cc 91857 2015-08-07 13:55:49Z gcosmo $
// $Id: G4LundStringFragmentation.cc 97675 2016-06-07 08:29:49Z gcosmo $
// GEANT4 tag $Name: $ 1.8
//
// -----------------------------------------------------------------------------
@@ -63,10 +63,12 @@ G4LundStringFragmentation::G4LundStringFragmentation()
// ------ smearing sharp mass cut-off ---------------------------
SmoothParam = 0.2;
SigmaQT = 0.435 * GeV; // 0.5 -> 0.471 <Pt^2> = 0.5 GeV^2 Uzhi 28 May
SetStringTensionParameter(1.);
SetDiquarkBreakProbability(0.05);
SetStrangenessSuppression(0.46); //(0.447); Uzhi 25.05.2015
SetDiquarkSuppression(0.05);
SetStrangenessSuppression(0.45); //(0.46); //(0.447); Uzhi 25.05.2015
SetDiquarkSuppression(0.06); // 0.05 -> 0.06 Uzhi 28 May 2016
// For treating of small string decays
for(G4int i=0; i<3; i++)
@@ -394,7 +396,7 @@ G4LundStringFragmentation::G4LundStringFragmentation()
Prob_QQbar[0]=StrangeSuppress; // Probability of ddbar production
Prob_QQbar[1]=StrangeSuppress; // Probability of uubar production
Prob_QQbar[2]=1.0-2.*StrangeSuppress; // Probability of ssbar production
SetStrangenessSuppression(0.46); //(0.447); // Uzhi May 2014
SetStrangenessSuppression(0.45); //(0.46); //(0.447); // Uzhi May 2014
//A.R. 25-Jul-2012 : Coverity fix.
for ( G4int i=0 ; i<35 ; i++ ) {
@@ -475,26 +477,40 @@ void G4LundStringFragmentation::SetMinimalStringMass(const G4FragmentingString
// G4cout<<"Number_of_quarks "<<Number_of_quarks<<" Number_of_squarks "<<Number_of_squarks<<G4endl;
#endif
if(Number_of_quarks==2){EstimatedMass += 70.*MeV;} //100.*MeV;}
// if(Number_of_quarks==3){EstimatedMass += 20.*MeV;}
if(Number_of_quarks==2){
if(Number_of_squarks < 2) {EstimatedMass += 70.*MeV;}
else {EstimatedMass += 230.*MeV;}
}
if(Number_of_quarks==3)
{
if(Number_of_squarks==0) {EstimatedMass += 740.*MeV;} // 700 Uzhi July 2014
if(Number_of_squarks==1) {EstimatedMass += 740.*MeV;} // 740 Uzhi Nov 2014
if(Number_of_squarks==2) {EstimatedMass += 400.*MeV;}
if(Number_of_squarks==3) {EstimatedMass += 382.*MeV;}
if(Number_of_squarks==0) {EstimatedMass += 740.*MeV;}
else if(Number_of_squarks==1) {EstimatedMass += 600.*MeV;} // 740. Uzhi May 2016
else if(Number_of_squarks==2) {EstimatedMass += 400.*MeV;}
else {EstimatedMass += 400.*MeV;} // 382. Uzhi May 2016
}
if(Number_of_quarks==4)
{
if(StringM > 1880.) { // 382. Uzhi May 2016 // 2*Mn = 1880
if(Number_of_squarks==0) {EstimatedMass += 1320.*MeV;}//560+1320=1880=2*Mn
else if(Number_of_squarks==1) {EstimatedMass += 1150.*MeV;}//920+1150=2070=M(Lam+N)
else if(Number_of_squarks==2) {EstimatedMass += 960.*MeV;}//1280+960=2240= 2*M Lam
else if(Number_of_squarks==3) {EstimatedMass += 800.*MeV;}//1640+800=2440=Mxi+Mlam
else if(Number_of_squarks==4) {EstimatedMass += 640.*MeV;}//2000+640=2640=2*Mxi
else {}
}
/*
if((StringM > 1880.) && ( EstimatedMass < 2100)) {EstimatedMass = 2020.;}//1880.;}
// if((StringM > 1880.) && ( EstimatedMass < 2100)) {EstimatedMass = 2051.;}
else if((StringM > 2232.) && ( EstimatedMass < 2730)){EstimatedMass = 2570.;}
else if((StringM > 5130.) && ( EstimatedMass < 3450)){EstimatedMass = 5130.;}
*/
else
{
// VU 30 May 2014 EstimatedMass -=2.*Mass_of_string_junction;
if(EstimatedMass <= 1600.*MeV){EstimatedMass-=200.*MeV;}
else {EstimatedMass+=100.*MeV;}
if(Number_of_squarks < 3) {EstimatedMass -= 200.*MeV;}
else if(Number_of_squarks==3) {EstimatedMass -= 50.*MeV;}
else if(Number_of_squarks==4) {EstimatedMass -= 40.*MeV;}
else {}
}
}
@@ -847,6 +863,7 @@ G4LorentzVector * G4LundStringFragmentation::SplitEandP(G4ParticleDefinition * p
G4double StringMT =std::sqrt(StringMT2);
G4double HadronMass = pHadron->GetPDGMass();
// G4int AbsBaryonNumber =std::abs(pHadron->GetBaryonNumber()); // Uzhi 30 May
SetMinimalStringMass(newString);
@@ -874,10 +891,13 @@ G4LorentzVector * G4LundStringFragmentation::SplitEandP(G4ParticleDefinition * p
G4double HadronMassT2, ResidualMassT2;
//... sample Pt of the hadron
G4double InitSigmaQT=SigmaQT; // Uzhi 30 May 2016
// if(AbsBaryonNumber > 0) SigmaQT=0.7 * GeV; // Uzhi 30 May 2016 0.66
if(pHadron->GetPDGIsospin() >= 1.5 ) SigmaQT=0.9 * GeV; // Uzhi 30 May 2016 0.66 0.70
G4int attempt=0;
do
{
attempt++; if(attempt > StringLoopInterrupt) return 0;
attempt++; if(attempt > StringLoopInterrupt) {SigmaQT=InitSigmaQT; return 0;} // Uzhi 30 May 2016
HadronPt =SampleQuarkPt() + string->DecayPt();
HadronPt.setZ(0);
@@ -888,6 +908,8 @@ G4LorentzVector * G4LundStringFragmentation::SplitEandP(G4ParticleDefinition * p
} while(std::sqrt(HadronMassT2) + std::sqrt(ResidualMassT2) > StringMT); /* Loop checking, 07.08.2015, A.Ribon */
// if(AbsBaryonNumber > 0) SigmaQT=InitSigmaQT; // Uzhi 30 May 2016
if(pHadron->GetPDGIsospin() >= 1.5 ) SigmaQT=InitSigmaQT;
//... sample z to define hadron longitudinal momentum and energy
//... but first check the available phase space
@@ -905,7 +927,7 @@ G4LorentzVector * G4LundStringFragmentation::SplitEandP(G4ParticleDefinition * p
if (zMin >= zMax) return 0; // have to start all over!
G4double z = GetLightConeZ(zMin, zMax,
G4double z = GetLightConeZ(zMin, zMax,
string->GetDecayParton()->GetPDGEncoding(), pHadron,
HadronPt.x(), HadronPt.y());
@@ -937,13 +959,14 @@ G4double G4LundStringFragmentation::GetLightConeZ(G4double zmin, G4double zmax,
G4double Px, G4double Py)
{
G4double Mass = pHadron->GetPDGMass();
// G4int HadronEncoding=std::abs(pHadron->GetPDGEncoding());
G4int HadronEncoding=std::abs(pHadron->GetPDGEncoding());
G4double Mt2 = Px*Px + Py*Py + Mass*Mass;
G4double alund;
G4double zOfMaxyf(0.), maxYf(1.), z(0.), yf(1.);
if(std::abs(PDGEncodingOfDecayParton) < 1000)
if(!((std::abs(PDGEncodingOfDecayParton) > 1000) && (HadronEncoding > 1000)))
{ // ---------------- Quark fragmentation ----------------------
alund=0.7/GeV/GeV;
// If blund get restored, you MUST adapt the calculation of zOfMaxyf.
@@ -967,25 +990,12 @@ G4double G4LundStringFragmentation::GetLightConeZ(G4double zmin, G4double zmax,
return z;
}
if(std::abs(PDGEncodingOfDecayParton) > 1000) // Uzhi Sept. 2014
if(std::abs(PDGEncodingOfDecayParton) > 1000) // Uzhi May. 2016
{
/*
if(HadronEncoding < 3000)
{
maxYf=(zmax-zmin);
do
{
z = zmin + G4UniformRand()*(zmax-zmin);
//yf=G4Exp(-sqr(z-Zc)/2/sqr(0.28)); // 0.42 0.632 0.28 a'la UrQMD
yf =(z-zmin);
}
while (G4UniformRand()*maxYf > yf);
}
else
{ // Strange baryons
*/
z = zmin + G4UniformRand()*(zmax-zmin);
// }
G4double an=2.5;
if(pHadron->GetPDGIsospin() > 0.5) an=0.75;
z=zmin + (zmax-zmin)*G4Pow::GetInstance()->powA(G4UniformRand(),1./an);
}
return z;
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VLongitudinalStringDecay.cc 91773 2015-08-05 13:59:07Z gcosmo $
// $Id: G4VLongitudinalStringDecay.cc 97393 2016-06-02 10:12:05Z gcosmo $
//
// -----------------------------------------------------------------------------
// GEANT 4 class implementation file
@@ -72,7 +72,7 @@ G4VLongitudinalStringDecay::G4VLongitudinalStringDecay()
ClusterLoopInterrupt = 500;
// Changable Parameters below.
SigmaQT = 0.5 * GeV; // 0.5 0.1
SigmaQT = 0.5 * GeV;
StrangeSuppress = 0.44; // 27 % strange quarks produced, ie. u:d:s=1:1:0.27
DiquarkSuppress = 0.07;
@@ -86,9 +86,9 @@ G4VLongitudinalStringDecay::G4VLongitudinalStringDecay()
//... vectorMesonMix[] is quark mixing parameters for vector mesons (Variable spin = 3)
vectorMesonMix.resize(6);
vectorMesonMix[0] = 0.0; //AR-20Oct2014 : it was 0.5
vectorMesonMix[0] = 0.5; //AR-20Oct2014 : it was 0.5
vectorMesonMix[1] = 0.0;
vectorMesonMix[2] = 0.0; //AR-20Oct2014 : it was 0.5
vectorMesonMix[2] = 0.5; //AR-20Oct2014 : it was 0.5
vectorMesonMix[3] = 0.0;
vectorMesonMix[4] = 1.0;
vectorMesonMix[5] = 1.0;
@@ -489,7 +489,9 @@ G4VLongitudinalStringDecay::pDefPair G4VLongitudinalStringDecay::CreatePartonPai
} else {
// Create a Quark - AntiQuark pair, first in pair IsParticle
//G4double StrSup=StrangeSuppress; StrangeSuppress=0.5;
G4int PDGcode=SampleQuarkFlavor()*NeedParticle;
//StrangeSuppress=StrSup;
return pDefPair (FindParticle(PDGcode),FindParticle(-PDGcode));
}
@@ -1,4 +1,4 @@
$Id: History 91858 2015-08-07 13:57:22Z gcosmo $
$Id: History 96953 2016-05-18 12:22:54Z gcosmo $
-------------------------------------------------------------------
==========================================================
@@ -15,6 +15,9 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
18-May-2016 A. Ribon hadr-partonstring-mgt-V10-02-00
- G4PomeronCrossSection : moved into the qgsm/ directory.
07-Aug-2015 A. Ribon hadr-partonstring-mgt-V10-01-02
- G4VPartonStringModel : checking of 'while' loops.
@@ -11,7 +11,7 @@
#
# Generated on : 24/9/2010
#
# $Id: sources.cmake 66892 2013-01-17 10:57:59Z gunter $
# $Id: sources.cmake 96953 2016-05-18 12:22:54Z gcosmo $
#
#------------------------------------------------------------------------------
@@ -49,7 +49,6 @@ GEANT4_DEFINE_MODULE(NAME G4had_string_man
G4EventGenerator.hh
G4InteractionCode.hh
G4InteractionContent.hh
G4PomeronCrossSection.hh
G4StringModel.hh
G4VParticipants.hh
G4VPartonStringModel.hh
@@ -59,7 +58,6 @@ GEANT4_DEFINE_MODULE(NAME G4had_string_man
SOURCES
G4EventGenerator.cc
G4InteractionContent.cc
G4PomeronCrossSection.cc
G4StringModel.cc
G4VParticipants.cc
G4VPartonStringModel.cc
@@ -1,4 +1,4 @@
$Id: History 93563 2015-10-26 14:46:09Z gcosmo $
$Id: History 96952 2016-05-18 12:21:34Z gcosmo $
-------------------------------------------------------------------
==========================================================
@@ -15,6 +15,22 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
18 May 2016 Alberto Ribon (hadr-qgsm-V10-02-02)
- G4PomeronCrossSection : added class originally in the management/
directory.
14 April 2016 Alberto Ribon (hadr-qgsm-V10-02-01)
G4QGSMSplitableHadron : fixed bug in the case of gamma projectile
with P_minus = 0.
04 December 2015 Alberto Ribon (hadr-qgsm-V10-02-00)
Resumed the tag hadr-qgsm-V10-01-14, i.e. the new QGS model.
The files that are changed are: G4QGSDiffractiveExcitation.hh,
G4QGSMSplitableHadron.hh, G4QGSModel.icc, G4QGSParticipants.hh,
G4QGSMSplitableHadron.cc, G4GammaParticipants.cc, G4QGSParticipants.cc,
G4SingleDiffractiveExcitation.cc, G4QGSDiffractiveExcitation.cc and
G4SPBaryon.cc .
26 October 2015 Alberto Ribon (hadr-qgsm-V10-01-16)
After bringing the QGS string formation as it was in G4 10.1 (and before)
in the previous tag, check of 'while' loops and deploy the
@@ -26,7 +26,7 @@
#ifndef G4PomeronCrossSection_h
#define G4PomeronCrossSection_h 1
//
// $Id: G4PomeronCrossSection.hh 67999 2013-03-13 11:14:32Z gcosmo $
// $Id: G4PomeronCrossSection.hh 96952 2016-05-18 12:21:34Z gcosmo $
//
#include "G4Proton.hh"
#include "G4Neutron.hh"
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4QGSDiffractiveExcitation.hh 93511 2015-10-23 13:43:49Z gcosmo $
// $Id: G4QGSDiffractiveExcitation.hh 94750 2015-12-07 08:24:29Z gcosmo $
#ifndef G4QGSDiffractiveExcitation_h
#define G4QGSDiffractiveExcitation_h 1
@@ -53,7 +53,7 @@ class G4QGSDiffractiveExcitation
public:
G4QGSDiffractiveExcitation(); // Uzhi
G4QGSDiffractiveExcitation();
virtual ~G4QGSDiffractiveExcitation();
virtual G4bool ExciteParticipants (G4VSplitableHadron *aPartner, G4VSplitableHadron * bPartner) const;
@@ -68,23 +68,15 @@ private:
G4QGSDiffractiveExcitation(const G4QGSDiffractiveExcitation &right);
// G4double ChooseX(G4double Xmin, G4double Xmax) const; // Uzhi
G4double ChooseP(G4double Pmin, G4double Pmax) const; // Uzhi
G4double ChooseP(G4double Pmin, G4double Pmax) const;
// G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare) const;
G4ThreeVector GaussianPt(G4double AveragePt2, G4double maxPtSquare) const; // Uzhi
G4ThreeVector GaussianPt(G4double AveragePt2, G4double maxPtSquare) const;
const G4QGSDiffractiveExcitation & operator=(const G4QGSDiffractiveExcitation &right);
int operator==(const G4QGSDiffractiveExcitation &right) const;
int operator!=(const G4QGSDiffractiveExcitation &right) const;
private:
// Model Parameters:
/* // Uzhi
const G4double widthOfPtSquare; // width^2 of pt for string excitation
const G4double minExtraMass; // minimum excitation mass
const G4double minmass; // mean pion transverse mass; used for Xmin
*/ // Uzhi
};
#endif
@@ -64,6 +64,7 @@ private:
void InitParameters();
void DiffractiveSplitUp();
void SoftSplitUp();
G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare);
void GetValenceQuarkFlavors(const G4ParticleDefinition * aPart,
G4Parton *& Parton1, G4Parton *& Parton2);
@@ -76,7 +77,12 @@ private:
std::deque<G4Parton *> Color;
std::deque<G4Parton *> AntiColor;
//std::deque<G4Parton *>::iterator iP; // Uzhi
//std::deque<G4Parton *>::iterator iAP; // Uzhi
unsigned int iP; // Uzhi 5.06.2015
unsigned int iAP; // Uzhi 5.06.2015
private:
// associated classes
G4MesonSplitter theMesonSplitter;
G4BaryonSplitter theBaryonSplitter;
@@ -95,16 +101,29 @@ private:
inline G4Parton* G4QGSMSplitableHadron::GetNextParton()
{
if(Color.size()==0) return 0;
G4Parton * result = Color.back();
Color.pop_back();
//Uzhi G4Parton * result = Color.back();
//Uzhi Color.pop_back();
/*
G4Parton * result = *iP;
iP++; if( iP == Color.end()) iP=Color.begin();
*/
G4Parton * result = Color.operator[](iP);
iP++; if(iP == Color.size()) iP=0;
return result;
}
inline G4Parton* G4QGSMSplitableHadron::GetNextAntiParton()
{
if(AntiColor.size() == 0) return 0;
G4Parton * result = AntiColor.front();
AntiColor.pop_front();
//Uzhi G4Parton * result = AntiColor.front();
//Uzhi AntiColor.pop_front();
/*
G4Parton * result = *iAP;
iAP++; if( iAP == AntiColor.end()) iAP=AntiColor.begin();
*/
G4Parton * result = AntiColor.operator[](iAP);
iAP++; if(iAP == AntiColor.size()) iAP=0;
return result;
}
@@ -58,6 +58,11 @@ template<class ParticipantType>
void G4QGSModel<ParticipantType>::Init(const G4Nucleus & aNucleus, const G4DynamicParticle & aProjectile)
{
// clean-up and consistency with design, HPW Feb 1999
/*
G4cout<<"QGSM Init A Z "<<aNucleus.GetA_asInt()<<" "<<aNucleus.GetZ_asInt()<<G4endl;
G4cout<<"Projectile "<<aProjectile.GetDefinition()->GetParticleName()<<" "<<aProjectile.GetDefinition()->GetBaryonNumber()<<G4endl;
G4cout<<" "<<aProjectile.Get4Momentum()<<G4endl;
*/
theParticipants.Init(aNucleus.GetA_asInt(),aNucleus.GetZ_asInt());
theCurrentVelocity.setX(0);
theCurrentVelocity.setY(0);
@@ -65,66 +70,62 @@ void G4QGSModel<ParticipantType>::Init(const G4Nucleus & aNucleus, const G4Dynam
// this is an approximation, neglecting the motion of nucleons in the nucleus & p,n mass differences. @@@
// G4double vz_old = aProjectile.Get4Momentum().pz()/
// (aProjectile.Get4Momentum().e() + G4Proton::Proton()->GetPDGMass());
/* //Uzhi 15.05.2015
G4double nCons = 1;
if(std::abs(aProjectile.GetDefinition()->GetBaryonNumber()) !=0)
{
nCons = std::abs(aProjectile.GetDefinition()->GetBaryonNumber());
}
G4double pz_per_projectile = aProjectile.Get4Momentum().pz()/nCons;
// G4double e_per_projectile = aProjectile.Get4Momentum().vect()*aProjectile.Get4Momentum().vect();
// e_per_projectile /=nCons*nCons;
// e_per_projectile += G4Proton::Proton()->GetPDGMass()*G4Proton::Proton()->GetPDGMass();
G4double e_per_projectile = aProjectile.Get4Momentum()*aProjectile.Get4Momentum();
e_per_projectile += aProjectile.Get4Momentum().vect()*aProjectile.Get4Momentum().vect();
e_per_projectile /=nCons*nCons;
e_per_projectile = std::sqrt(e_per_projectile);
e_per_projectile += G4Proton::Proton()->GetPDGMass();
G4double vz = pz_per_projectile/e_per_projectile;
//--DEBUG-- G4cout << "IncomingMomentum - vz "<<aProjectile.Get4Momentum()<< ", " << vz <<G4endl;
*/
// Transformation to hN/NN CMS system ---------------------------------
//Uzhi 15.05.2015 G4double pz_per_projectile = aProjectile.Get4Momentum().pz()/nCons;
//Uzhi 15.05.2015 G4double EperHN=aProjectile.Get4Momentum().e()/nCons + G4Proton::Proton()->GetPDGMass();
G4double vz = 0.; //pz_per_projectile/EperHN;
theCurrentVelocity.setZ(vz);
theParticipants.DoLorentzBoost(-theCurrentVelocity);
theParticipants.DoLorentzBoost(-theCurrentVelocity); // Lorentz boost of the target nucleus
G4LorentzVector Mom = aProjectile.Get4Momentum();
Mom.boost(-theCurrentVelocity);
Mom.boost(-theCurrentVelocity); // Lorentz boost of the projectile
// End of the transformation ------------------------------------------
G4ReactionProduct theProjectile;
theProjectile.SetDefinition(aProjectile.GetDefinition());
theProjectile.SetTotalEnergy(Mom.e());
theProjectile.SetMomentum(Mom.vect());
//--DEBUG-- G4cout << "PreInteractionMomentum "<<Mom<<G4endl;
theParticipants.BuildInteractions(theProjectile);
theParticipants.GetWoundedNucleus()->DoLorentzBoost(theCurrentVelocity);
theParticipants.GetWoundedNucleus()->DoLorentzBoost(theCurrentVelocity); // Backward transformation
}
template<class ParticipantType>
G4ExcitedStringVector * G4QGSModel<ParticipantType>::GetStrings()
{
//G4cout<<"G4ExcitedStringVector * G4QGSModel<ParticipantType>::GetStrings()"<<G4endl;
// clean-up and consistancy with design, HPW Feb 1999
// also fixing a memory leak, removing unnecessary caching, and
// streamlining of logic
G4PartonPair* aPair;
G4ExcitedStringVector* theStrings = new G4ExcitedStringVector;
G4ExcitedString * aString;
while( (aPair = theParticipants.GetNextPartonPair()) ) /* Loop checking, 26.10.2015, A.Ribon */
while( (aPair = theParticipants.GetNextPartonPair()) ) /* Loop checking, 07.08.2015, A.Ribon */
{
//G4cout<<"aPair->GetCollisionType() "<<aPair->GetCollisionType()<<G4endl;
if (aPair->GetCollisionType() == G4PartonPair::DIFFRACTIVE)
{
aString = theDiffractiveStringBuilder.BuildString(aPair);
// G4cout << "diffractive "<<aString->Get4Momentum()<<G4endl;
//G4cout << "diffractive "<<aString->Get4Momentum()<<G4endl;
}
else
{
aString = theSoftStringBuilder.BuildString(aPair);
// G4cout << "soft "<<aString->Get4Momentum()<<G4endl;
//G4cout << "soft "<<aString->Get4Momentum()<<G4endl;
}
//--DEBUG-- G4cout << " QGSModel.icc::GetStrings() theCurrentVelocity " << theCurrentVelocity << G4endl;
aString->Boost(theCurrentVelocity);
theStrings->push_back(aString);
delete aPair;
}
//--DEBUG-- G4cout << G4endl;
// for(G4int i=0; i<theStrings->size(); i++)
// {
// G4cout << "String = "<<theStrings->operator[](i)->Get4Momentum()<<G4endl;
// }
return theStrings;
}
@@ -37,6 +37,7 @@
#include "G4QGSMSplitableHadron.hh"
#include "G4V3DNucleus.hh"
#include "G4VSplitableHadron.hh" // Uzhi
class G4QGSParticipants : public G4VParticipants
{
@@ -51,6 +52,7 @@ public:
virtual void DoLorentzBoost(G4ThreeVector aBoost)
{
theCurrentVelocity = -aBoost; // Uzhi 17 Apr. 2015
if(theNucleus) theNucleus->DoLorentzBoost(aBoost);
theBoost = aBoost;
}
@@ -59,11 +61,95 @@ public:
void BuildInteractions(const G4ReactionProduct &thePrimary);
void StartPartonPairLoop();
//Uzhi Start copy from FTFmodel
private:
//Uzhi G4V3DNucleus* GetWoundedNucleus() const;
G4V3DNucleus* GetTargetNucleus() const;
G4V3DNucleus* GetProjectileNucleus() const;
void PrepareInitialState( const G4ReactionProduct& thePrimary );
void GetList( const G4ReactionProduct& thePrimary );
void StoreInvolvedNucleon();
void ReggeonCascade();
G4bool PutOnMassShell();
//Uzhi G4bool ExciteParticipants();
//Uzhi G4ExcitedStringVector* BuildStrings();
void GetResiduals();
//Uzhi G4bool AdjustNucleons( G4VSplitableHadron* SelectedAntiBaryon,
//Uzhi G4Nucleon* ProjectileNucleon,
//Uzhi G4VSplitableHadron* SelectedTargetNucleon,
//Uzhi G4Nucleon* TargetNucleon,
//Uzhi G4bool Annihilation );
G4ThreeVector GaussianPt( G4double AveragePt2, G4double maxPtSquare ) const;
G4bool ComputeNucleusProperties( G4V3DNucleus* nucleus, G4LorentzVector& nucleusMomentum,
G4LorentzVector& residualMomentum, G4double& sumMasses,
G4double& residualExcitationEnergy, G4double& residualMass,
G4int& residualMassNumber, G4int& residualCharge );
// Utility method used by PutOnMassShell.
G4bool GenerateDeltaIsobar( const G4double sqrtS, const G4int numberOfInvolvedNucleons,
G4Nucleon* involvedNucleons[], G4double& sumMasses );
// Utility method used by PutOnMassShell.
G4bool SamplingNucleonKinematics( G4double averagePt2, const G4double maxPt2,
G4double dCor, G4V3DNucleus* nucleus,
const G4LorentzVector& pResidual,
const G4double residualMass, const G4int residualMassNumber,
const G4int numberOfInvolvedNucleons,
G4Nucleon* involvedNucleons[], G4double& mass2 );
// Utility method used by PutOnMassShell.
G4bool CheckKinematics( const G4double sValue, const G4double sqrtS,
const G4double projectileMass2, const G4double targetMass2,
const G4double nucleusY, const G4bool isProjectileNucleus,
const G4int numberOfInvolvedNucleons, G4Nucleon* involvedNucleons[],
G4double& targetWminus, G4double& projectileWplus, G4bool& success );
// Utility method used by PutOnMassShell.
G4bool FinalizeKinematics( const G4double w, const G4bool isProjectileNucleus,
const G4LorentzRotation& boostFromCmsToLab,
const G4double residualMass, const G4int residualMassNumber,
const G4int numberOfInvolvedNucleons,
G4Nucleon* involvedNucleons[],
G4LorentzVector& residual4Momentum );
// Utility method used by PutOnMassShell.
//Uzhi End copy from FTFmodel
void CreateStrings();
//Uzhi Start copy from FTFparameters
private:
// Set parameters of nuclear destruction
void SetCofNuclearDestruction( const G4double aValue );
void SetR2ofNuclearDestruction( const G4double aValue );
void SetExcitationEnergyPerWoundedNucleon( const G4double aValue );
void SetDofNuclearDestruction( const G4double aValue );
void SetPt2ofNuclearDestruction( const G4double aValue );
void SetMaxPt2ofNuclearDestruction( const G4double aValue );
// Get parameters of nuclear destruction
G4double GetCofNuclearDestruction();
G4double GetR2ofNuclearDestruction();
G4double GetExcitationEnergyPerWoundedNucleon();
G4double GetDofNuclearDestruction();
G4double GetPt2ofNuclearDestruction();
G4double GetMaxPt2ofNuclearDestruction();
//Uzhi End copy from FTFparameters
protected:
virtual G4VSplitableHadron* SelectInteractions(const G4ReactionProduct &thePrimary);
void SplitHadrons();
void PerformSoftCollisions();
void PerformDiffractiveCollisions();
G4bool DeterminePartonMomenta();
protected:
struct DeleteInteractionContent {void operator()(G4InteractionContent*aC){delete aC;}};
@@ -79,7 +165,7 @@ protected:
G4bool IsSingleDiffractive();
G4ThreeVector theBoost;
G4double SampleX(G4double anXmin, G4int nSea, G4int theTotalSea, G4double aBeta);
protected:
// model parameters HPW
enum { SOFT, DIFFRACTIVE };
@@ -88,6 +174,60 @@ protected:
const G4double QGSMThreshold;
const G4double theNucleonRadius;
// cash theCurrentVelocity for lorentztrafo HPW
G4ThreeVector theCurrentVelocity; // Uzhi 17 Apr. 2015
G4QGSMSplitableHadron* theProjectileSplitable; // Uzhi 21.05.2015
private:
//Uzhi Start copy from FTFmodel
G4ReactionProduct theProjectile;
// G4QGSMSplitableHadron* theProjectileSplitable;
G4double alpha;
G4double beta;
G4double sigmaPt;
//Uzhi G4FTFParticipants theParticipants;
G4Nucleon* TheInvolvedNucleonsOfTarget[250];
G4int NumberOfInvolvedNucleonsOfTarget;
G4Nucleon* TheInvolvedNucleonsOfProjectile[250];
G4int NumberOfInvolvedNucleonsOfProjectile;
//Uzhi G4FTFParameters* theParameters;
//Uzhi G4DiffractiveExcitation* theExcitation;
//Uzhi G4ElasticHNScattering* theElastic;
//Uzhi G4FTFAnnihilation* theAnnihilation;
//Uzhi std::vector< G4VSplitableHadron* > theAdditionalString;
//Uzhi G4double LowEnergyLimit;
//Uzhi G4bool HighEnergyInter;
G4LorentzVector ProjectileResidual4Momentum;
G4int ProjectileResidualMassNumber;
G4int ProjectileResidualCharge;
G4double ProjectileResidualExcitationEnergy;
G4LorentzVector TargetResidual4Momentum;
G4int TargetResidualMassNumber;
G4int TargetResidualCharge;
G4double TargetResidualExcitationEnergy;
//Uzhi End copy from FTFmodel
//Uzhi Start copy from FTFparameters
private:
// Parameters of nuclear destruction
G4double CofNuclearDestruction; // Cnd of nuclear destruction
G4double R2ofNuclearDestruction; // R2nd
G4double ExcitationEnergyPerWoundedNucleon;
G4double DofNuclearDestruction; // D for momentum sampling
G4double Pt2ofNuclearDestruction; // Pt2
G4double MaxPt2ofNuclearDestruction; // Max Pt2
//Uzhi End copy from FTFparameters
};
@@ -113,13 +253,102 @@ inline G4PartonPair* G4QGSParticipants::GetNextPartonPair()
inline void G4QGSParticipants::SplitHadrons()
{
//G4cout<<"----------------------------------- SplitHadrons -------------"<<G4endl;
//G4cout<<"theInteractions.size() "<<theInteractions.size()<<G4endl;
unsigned int i;
for(i = 0; i < theInteractions.size(); i++)
{
//G4cout<<i<<" "<<theInteractions[i]->GetProjectile()<<" "<<theInteractions[i]->GetProjectileNucleon()<<" "
// <<theInteractions[i]->GetTarget()<<" "<<theInteractions[i]->GetTargetNucleon()<<G4endl;
//G4cout<<i<<" "<<theInteractions[i]->GetProjectile()->GetDefinition()->GetParticleName()<<G4endl;
//G4cout<<i<<" "<<theInteractions[i]->GetTarget()->GetDefinition()->GetParticleName()<<G4endl;
}
for(i = 0; i < theInteractions.size(); i++)
{
//G4cout<<i<<" "<<theInteractions[i]->GetNumberOfSoftCollisions()<<" "
// <<theInteractions[i]->GetNumberOfHardCollisions()<<" "
// <<theInteractions[i]->GetNumberOfDiffractiveCollisions()<<G4endl;
}
//G4cout<<"******************************** SplitHadrons ************"<<G4endl;
for(i = 0; i < theInteractions.size(); i++)
{
//G4cout<<"Interaction # "<<i<<" QGSPartic"<<G4endl;
theInteractions[i]->SplitHadrons();
}
}
//--------------------------------------
//Uzhi Copy from FTF Model.hh
/*
inline G4V3DNucleus* G4QGSParticipants::GetWoundedNucleus() const {
return theNucleus;
}
*/
inline G4V3DNucleus* G4QGSParticipants::GetTargetNucleus() const {
return theNucleus;
}
inline G4V3DNucleus* G4QGSParticipants::GetProjectileNucleus() const {
return 0;
}
//Uzhi Start copy from FTFparameters
// Set parameters of nuclear destruction
inline void G4QGSParticipants::SetCofNuclearDestruction( const G4double aValue ) {
CofNuclearDestruction = aValue;
}
inline void G4QGSParticipants::SetR2ofNuclearDestruction( const G4double aValue ) {
R2ofNuclearDestruction = aValue;
}
inline void G4QGSParticipants::SetExcitationEnergyPerWoundedNucleon( const G4double aValue ) {
ExcitationEnergyPerWoundedNucleon = aValue;
}
inline void G4QGSParticipants::SetDofNuclearDestruction( const G4double aValue ) {
DofNuclearDestruction = aValue;
}
inline void G4QGSParticipants::SetPt2ofNuclearDestruction( const G4double aValue ) {
Pt2ofNuclearDestruction = aValue;
}
inline void G4QGSParticipants::SetMaxPt2ofNuclearDestruction( const G4double aValue ) {
MaxPt2ofNuclearDestruction = aValue;
}
// Get parameters of nuclear destruction
inline G4double G4QGSParticipants::GetCofNuclearDestruction() {
return CofNuclearDestruction;
}
inline G4double G4QGSParticipants::GetR2ofNuclearDestruction() {
return R2ofNuclearDestruction;
}
inline G4double G4QGSParticipants::GetExcitationEnergyPerWoundedNucleon() {
return ExcitationEnergyPerWoundedNucleon;
}
inline G4double G4QGSParticipants::GetDofNuclearDestruction() {
return DofNuclearDestruction;
}
inline G4double G4QGSParticipants::GetPt2ofNuclearDestruction() {
return Pt2ofNuclearDestruction;
}
inline G4double G4QGSParticipants::GetMaxPt2ofNuclearDestruction() {
return MaxPt2ofNuclearDestruction;
}
//Uzhi End copy from FTFparameters
#endif
@@ -11,7 +11,7 @@
#
# Generated on : 24/9/2010
#
# $Id: sources.cmake 66892 2013-01-17 10:57:59Z gunter $
# $Id: sources.cmake 96952 2016-05-18 12:21:34Z gcosmo $
#
#------------------------------------------------------------------------------
@@ -69,6 +69,7 @@ GEANT4_DEFINE_MODULE(NAME G4hadronic_qgstring
G4SingleDiffractiveExcitation.hh
G4SoftStringBuilder.hh
G4VAnnihilationCrossSection.hh
G4PomeronCrossSection.hh
SOURCES
G4ASCCrossSection.cc
G4AnnihilationCrossSection.cc
@@ -85,6 +86,7 @@ GEANT4_DEFINE_MODULE(NAME G4hadronic_qgstring
G4SPBaryon.cc
G4SingleDiffractiveExcitation.cc
G4SoftStringBuilder.cc
G4PomeronCrossSection.cc
GRANULAR_DEPENDENCIES
G4baryons
G4bosons
@@ -40,17 +40,19 @@
G4VSplitableHadron* G4GammaParticipants::SelectInteractions(const G4ReactionProduct &thePrimary)
{
// Check reaction threshold - goes to CheckThreshold
G4VSplitableHadron* aProjectile = new G4QGSMSplitableHadron(thePrimary, TRUE); // @@@ check the TRUE
const std::vector<G4Nucleon>& theTargetNuc = theNucleus->GetNucleons();
theProjectileSplitable = new G4QGSMSplitableHadron(thePrimary, TRUE); // @@@ check the TRUE
theProjectileSplitable->SetStatus(1); // Uzhi 21.05.2015
G4LorentzVector aPrimaryMomentum(thePrimary.GetMomentum(), thePrimary.GetTotalEnergy());
G4LorentzVector aTargetNMomentum(0.,0.,0.,938.);
if((!(aPrimaryMomentum.e()>-1)) && (!(aPrimaryMomentum.e()<1)) )
{
throw G4HadronicException(__FILE__, __LINE__,
"G4GammaParticipants::SelectInteractions: primary nan energy.");
}
G4double S = (aPrimaryMomentum + theTargetNuc[0].Get4Momentum()).mag2();
G4double ThresholdMass = thePrimary.GetMass() + theTargetNuc[0].GetDefinition()->GetPDGMass();
G4double S = (aPrimaryMomentum + aTargetNMomentum).mag2();
G4double ThresholdMass = thePrimary.GetMass() + 938.;
ModelMode = SOFT;
if (sqr(ThresholdMass + ThresholdParameter) > S)
{
@@ -69,16 +71,26 @@ G4VSplitableHadron* G4GammaParticipants::SelectInteractions(const G4ReactionProd
#ifdef debug_G4GammaParticipants
G4double eK = thePrimary.GetKineticEnergy()/GeV;
G4int nucleonCount = theTargetNuc.size(); // debug
G4int nucleonCount = theNucleus->GetMassNumber();
#endif
G4int theCurrent = static_cast<G4int> (theTargetNuc.size()*G4UniformRand());
const G4Nucleon& pNucleon = theTargetNuc[theCurrent];
G4QGSMSplitableHadron* aTarget = new G4QGSMSplitableHadron(pNucleon);
theTargets.push_back(aTarget);
const_cast<G4Nucleon&>(pNucleon).Hit(aTarget);
if ( (0.06 > G4UniformRand() &&(ModelMode==SOFT)) || (ModelMode==DIFFRACTIVE ) )
{
G4int theCurrent = G4int(theNucleus->GetMassNumber()*G4UniformRand());
G4int NucleonNo=0;
theNucleus->StartLoop();
G4Nucleon * pNucleon =0; // theNucleus->GetNextNucleon(); // Uzhi 27.05.2015
while( (pNucleon = theNucleus->GetNextNucleon()) ) /* Loop checking, 07.08.2015, A.Ribon */
{if(NucleonNo == theCurrent) break; NucleonNo++;}
if ( pNucleon ) {
G4QGSMSplitableHadron* aTarget = new G4QGSMSplitableHadron(*pNucleon);
pNucleon->Hit(aTarget);
if ( (0.06 > G4UniformRand() &&(ModelMode==SOFT)) || (ModelMode==DIFFRACTIVE ) )
{
/*
// diffractive interaction occurs
if(IsSingleDiffractive())
{
@@ -88,22 +100,41 @@ G4VSplitableHadron* G4GammaParticipants::SelectInteractions(const G4ReactionProd
{
theDiffExcitaton.ExciteParticipants(aProjectile, aTarget);
}
G4InteractionContent * aInteraction = new G4InteractionContent(aProjectile);
aInteraction->SetTarget(aTarget);
theInteractions.push_back(aInteraction);
aInteraction->SetNumberOfDiffractiveCollisions(1);
*/
G4InteractionContent * aInteraction = new G4InteractionContent(theProjectileSplitable);
theProjectileSplitable->SetStatus(1*theProjectileSplitable->GetStatus());
aInteraction->SetTarget(aTarget);
aInteraction->SetTargetNucleon(pNucleon);
aTarget->SetCollisionCount(0);
aTarget->SetStatus(1);
aInteraction->SetNumberOfDiffractiveCollisions(1);
aInteraction->SetNumberOfSoftCollisions(0);
aInteraction->SetStatus(1);
theInteractions.push_back(aInteraction);
totalCuts += 1;
}
else
{
}
else
{
// nondiffractive soft interaction occurs
aTarget->IncrementCollisionCount(1);
aProjectile->IncrementCollisionCount(1);
G4InteractionContent * aInteraction = new G4InteractionContent(aProjectile);
aTarget->SetStatus(0);
theTargets.push_back(aTarget);
theProjectileSplitable->IncrementCollisionCount(1);
theProjectileSplitable->SetStatus(0*theProjectileSplitable->GetStatus());
G4InteractionContent * aInteraction =
new G4InteractionContent(theProjectileSplitable);
aInteraction->SetTarget(aTarget);
aInteraction->SetTargetNucleon(pNucleon);
aInteraction->SetNumberOfSoftCollisions(1);
aInteraction->SetStatus(0);
theInteractions.push_back(aInteraction);
totalCuts += 1;
}
return aProjectile;
}
}
return theProjectileSplitable; //aProjectile;
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4PomeronCrossSection.cc 91774 2015-08-05 14:00:19Z gcosmo $
// $Id: G4PomeronCrossSection.cc 96952 2016-05-18 12:21:34Z gcosmo $
//
#include "G4PomeronCrossSection.hh"
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4QGSDiffractiveExcitation.cc 93563 2015-10-26 14:46:09Z gcosmo $
// $Id: G4QGSDiffractiveExcitation.cc 94750 2015-12-07 08:24:29Z gcosmo $
// ------------------------------------------------------------
// GEANT 4 class implemetation file
//
@@ -60,8 +60,13 @@
#include "G4Log.hh"
#include "G4Pow.hh"
//============================================================================
G4QGSDiffractiveExcitation::G4QGSDiffractiveExcitation() // Uzhi
//#define debugQGSdiffExictation
//============================================================================
G4QGSDiffractiveExcitation::G4QGSDiffractiveExcitation()
{
}
@@ -73,6 +78,8 @@ G4QGSDiffractiveExcitation::~G4QGSDiffractiveExcitation()
G4bool G4QGSDiffractiveExcitation::
ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) const
{
G4cout<<"G4QGSDiffractiveExcitation::ExciteParticipants"<<G4endl;
G4cout<<"Proj Targ "<<projectile->GetDefinition()->GetPDGEncoding()<<" "<<target->GetDefinition()->GetPDGEncoding()<<G4endl;
G4LorentzVector Pprojectile=projectile->Get4Momentum();
@@ -122,6 +129,9 @@ ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) c
// -------------------- Target parameters ----------------------------------------------
G4LorentzVector Ptarget=target->Get4Momentum();
//G4cout<<"Pr Tr 4-Mom "<<Pprojectile<<" "<<Pprojectile.mag()<<G4endl
// <<" "<<Ptarget <<" "<<Ptarget.mag() <<G4endl;
G4double M0target = Ptarget.mag();
if(M0target < target->GetDefinition()->GetPDGMass())
@@ -217,11 +227,8 @@ ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) c
G4LorentzVector Qmomentum;
G4double Qminus, Qplus;
// /* Vova
G4int whilecount=0;
do {
// Generate pt
if (whilecount++ >= 500 && (whilecount%100)==0)
// G4cout << "G4QGSDiffractiveExcitation::ExciteParticipants possibly looping"
// << ", loop count/ maxPtSquare : "
@@ -232,27 +239,9 @@ ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) c
return false; // Ignore this interaction
}
// Generate pt
Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0);
//G4cout << "generated Pt " << Qmomentum << G4endl;
//G4cout << "Pprojectile with pt : " << Pprojectile+Qmomentum << G4endl;
//G4cout << "Ptarget with pt : " << Ptarget-Qmomentum << G4endl;
// Momentum transfer
/* // Uzhi
G4double Xmin = minmass / ( Pprojectile.e() + Ptarget.e() );
G4double Xmax=1.;
G4double Xplus =ChooseX(Xmin,Xmax);
G4double Xminus=ChooseX(Xmin,Xmax);
// G4cout << " X-plus " << Xplus << G4endl;
// G4cout << " X-minus " << Xminus << G4endl;
G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();
G4double Qplus =-1 * pt2 / Xminus/Ptarget.minus();
G4double Qminus= pt2 / Xplus /Pprojectile.plus();
*/ // Uzhi *
Pt2=G4ThreeVector(Qmomentum.vect()).mag2();
ProjMassT2=Mprojectile2+Pt2;
ProjMassT =std::sqrt(ProjMassT2);
@@ -293,12 +282,13 @@ ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) c
*/ // Uzhi *
} while ( /* Loop checking, 26.10.2015, A.Ribon */
( (Pprojectile+Qmomentum).mag2() < Mprojectile2 || // Uzhi No without excitation
(Ptarget -Qmomentum).mag2() < Mtarget2 ) || // Uzhi
( (Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2 && // Uzhi No double Diffraction
(Ptarget -Qmomentum).mag2() < NuclearNucleonDiffCut2) );// Uzhi
} while (( (Pprojectile+Qmomentum).mag2() < Mprojectile2 || // Uzhi No without excitation
(Ptarget -Qmomentum).mag2() < Mtarget2 ) || // Uzhi
( (Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2 && // Uzhi No double Diffraction
(Ptarget -Qmomentum).mag2() < NuclearNucleonDiffCut2) ); /* Loop checking, 07.08.2015, A.Ribon */
//G4cout<<"(Ptarget-Qmomentum).mag2() < NuclearNucleonDiffCut2 "<<(Ptarget-Qmomentum).mag2() <<" "<<NuclearNucleonDiffCut2<<G4endl;
//G4cout<<"(Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2 "<<(Pprojectile+Qmomentum).mag2()<<" "<< ProjectileDiffCut2<<G4endl;
if((Ptarget-Qmomentum).mag2() < NuclearNucleonDiffCut2) // Uzhi Projectile diffraction
{
G4double TMinusNew=SqrtS-PMinusNew;
@@ -323,37 +313,17 @@ ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) c
Pprojectile += Qmomentum;
Ptarget -= Qmomentum;
// Vova
/*
Pprojectile.setPz(0.);
Pprojectile.setE(SqrtS-M0target);
Ptarget.setPz(0.);
Ptarget.setE(M0target);
*/
//G4cout << "Pprojectile with Q : " << Pprojectile << G4endl;
//G4cout << "Ptarget with Q : " << Ptarget << G4endl;
// G4cout << "Projectile back: " << toLab * Pprojectile << G4endl;
// G4cout << "Target back: " << toLab * Ptarget << G4endl;
// Transform back and update SplitableHadron Participant.
Pprojectile.transform(toLab);
Ptarget.transform(toLab);
//G4cout << "Pprojectile with Q M: " << Pprojectile<<" "<< Pprojectile.mag() << G4endl;
//G4cout << "Ptarget with Q M: " << Ptarget <<" "<< Ptarget.mag() << G4endl;
//G4cout << "Target mass " << Ptarget.mag() << G4endl;
//G4cout << "Pprojectile with Q and Mass: " << Pprojectile<<" "<< Pprojectile.mag() << G4endl;
//G4cout << "Ptarget with Q and Mass: " << Ptarget <<" "<< Ptarget.mag() << G4endl;
target->Set4Momentum(Ptarget);
//G4cout << "Projectile mass " << Pprojectile.mag() << G4endl;
projectile->Set4Momentum(Pprojectile);
//G4int Uzhi; G4cin>>Uzhi;
return true;
}
@@ -364,12 +334,12 @@ String(G4VSplitableHadron * hadron, G4bool isProjectile) const
hadron->SplitUp();
G4Parton *start= hadron->GetNextParton();
if ( start==NULL)
{ G4cout << " G4FTFModel::String() Error:No start parton found"<< G4endl;
{ G4cout << " G4QGSDiffractiveExcitation::String() Error:No start parton found"<< G4endl;
return NULL;
}
G4Parton *end = hadron->GetNextParton();
if ( end==NULL)
{ G4cout << " G4FTFModel::String() Error:No end parton found"<< G4endl;
{ G4cout << " G4QGSDiffractiveExcitation::String() Error:No end parton found"<< G4endl;
return NULL;
}
@@ -424,10 +394,10 @@ String(G4VSplitableHadron * hadron, G4bool isProjectile) const
start->Set4Momentum(Pstart);
end->Set4Momentum(Pend);
#ifdef G4_FTFDEBUG
G4cout << " generated string flavors " << start->GetPDGcode() << " / " << end->GetPDGcode() << G4endl;
#ifdef debugQGSdiffExictation
G4cout << " generated string flavors " << start->GetPDGcode() << " / " << end->GetPDGcode() << G4endl;
G4cout << " generated string momenta: quark " << start->Get4Momentum() << "mass : " <<start->Get4Momentum().mag()<< G4endl;
G4cout << " generated string momenta: Diquark " << end ->Get4Momentum() << "mass : " <<end->Get4Momentum().mag()<< G4endl;
G4cout << " generated string momenta: Diquark " << end ->Get4Momentum() << "mass : " <<end->Get4Momentum().mag()<< G4endl;
G4cout << " sum of ends " << Pstart+Pend << G4endl;
G4cout << " Original " << hadron->Get4Momentum() << G4endl;
#endif
@@ -438,13 +408,12 @@ String(G4VSplitableHadron * hadron, G4bool isProjectile) const
// --------- private methods ----------------------
G4double G4QGSDiffractiveExcitation::ChooseP(G4double Pmin, G4double Pmax) const // Uzhi
G4double G4QGSDiffractiveExcitation::ChooseP(G4double Pmin, G4double Pmax) const
{
// choose an x between Xmin and Xmax with P(x) ~ 1/x
// to be improved...
G4double range=Pmax-Pmin; // Uzhi
G4double range=Pmax-Pmin;
if ( Pmin <= 0. || range <=0. )
{
@@ -453,29 +422,17 @@ G4double G4QGSDiffractiveExcitation::ChooseP(G4double Pmin, G4double Pmax) const
}
G4double P;
/* // Uzhi
do {
x=Xmin + G4UniformRand() * range;
} while ( Xmin/x < G4UniformRand() );
*/ // Uzhi
P=Pmin * G4Pow::GetInstance()->powA(Pmax/Pmin,G4UniformRand()); // Uzhi
P=Pmin * G4Pow::GetInstance()->powA(Pmax/Pmin,G4UniformRand());
//debug-hpw cout << "DiffractiveX "<<x<<G4endl;
return P;
}
G4ThreeVector G4QGSDiffractiveExcitation::GaussianPt(G4double AveragePt2, G4double maxPtSquare) const // Uzhi
G4ThreeVector G4QGSDiffractiveExcitation::GaussianPt(G4double AveragePt2, G4double maxPtSquare) const
{ // @@ this method is used in FTFModel as well. Should go somewhere common!
G4double Pt2;
/* // Uzhi
do {
pt2=widthSquare * G4Log( G4UniformRand() );
} while ( pt2 > maxPtSquare);
*/ // Uzhi
Pt2 = -AveragePt2 * G4Log(1. + G4UniformRand() * (G4Exp(-maxPtSquare/AveragePt2)-1.));// Uzhi
Pt2 = -AveragePt2 * G4Log(1. + G4UniformRand() * (G4Exp(-maxPtSquare/AveragePt2)-1.));
G4double Pt=std::sqrt(Pt2);
@@ -37,7 +37,6 @@
#include "G4Log.hh"
#include "G4Pow.hh"
// based on prototype by Maxim Komogorov
// Splitting into methods, and centralizing of model parameters HPW Feb 1999
// restructuring HPW Feb 1999
@@ -71,6 +70,8 @@ void G4QGSMSplitableHadron::InitParameters()
widthOfPtSquare = 0.01*GeV*GeV;
Direction = FALSE;
minTransverseMass = 1*keV;
iP =0;// Color.begin(); // Uzhi
iAP =0;// AntiColor.begin(); // Uzhi
}
G4QGSMSplitableHadron::G4QGSMSplitableHadron()
@@ -105,7 +106,22 @@ G4QGSMSplitableHadron::G4QGSMSplitableHadron(const G4Nucleon & aNucleon, G4bool
Direction = aDirection;
}
G4QGSMSplitableHadron::~G4QGSMSplitableHadron(){}
G4QGSMSplitableHadron::~G4QGSMSplitableHadron()
{
/*
G4cout<<"Destructor "<<Color.size()<<" "<<AntiColor.size()<<G4endl;
for(unsigned int i=0; i<Color.size();i++) {
G4cout<<"i "<<i<<G4endl;
delete Color.operator[](i);
delete AntiColor.operator[](i);
}
G4cout<<"empty"<<G4endl;
while(!Color.empty()) {Color.pop_back();}
while(!AntiColor.empty()) {AntiColor.pop_back();}
G4cout<<"clear"<<G4endl;
Color.clear(); AntiColor.clear();
*/
}
@@ -113,10 +129,13 @@ G4QGSMSplitableHadron::~G4QGSMSplitableHadron(){}
void G4QGSMSplitableHadron::SplitUp()
{
//G4cout<<G4endl<<"SplitUp() this "<<this<<" IsSplit() "<<IsSplit()<<G4endl;
if (IsSplit()) return;
Splitting();
Splitting(); // Uzhi To mark that a hadron is split
//G4cout<<"Color.size() "<<Color.size()<<G4endl;
if (Color.size()!=0) return;
if (GetSoftCollisionCount() == 0)
//G4cout<<"GetSoftCollisionCount() "<<GetSoftCollisionCount()<<G4endl;
if (GetSoftCollisionCount() == 0) // GetSoftCollisionCount() from G4VSplitableHadron
{
DiffractiveSplitUp();
}
@@ -124,10 +143,14 @@ void G4QGSMSplitableHadron::SplitUp()
{
SoftSplitUp();
}
//G4cout<<"Color.size() "<<Color.size()<<G4endl;
}
void G4QGSMSplitableHadron::DiffractiveSplitUp()
{
//G4cout<<G4endl<<"G4QGSMSplitableHadron::DiffractiveSplitUp() "<<GetDefinition()->GetParticleName()<<G4endl;
//G4cout<<" GetSoftCollisionCount() "<<GetSoftCollisionCount()<<G4endl;
//G4cout<<"Mom M "<<Get4Momentum()<<" "<<Get4Momentum().mag()<<G4endl;
// take the particle definitions and get the partons HPW
G4Parton * Left = NULL;
G4Parton * Right = NULL;
@@ -135,14 +158,25 @@ void G4QGSMSplitableHadron::DiffractiveSplitUp()
Left->SetPosition(GetPosition());
Right->SetPosition(GetPosition());
//G4cout<<"Partons Left Right "<<Left->GetDefinition()->GetParticleName()<<" "<<Right->GetDefinition()->GetParticleName()<<G4endl;
/*
G4LorentzVector tmp(0., 0., 0., 0.);
Left->Set4Momentum(tmp);
Right->Set4Momentum(tmp);
Color.push_back(Left);
AntiColor.push_back(Right);
*/ // Uzhi
G4LorentzVector HadronMom = Get4Momentum();
//std::cout << "DSU 1 - "<<HadronMom<<std::endl;
// momenta of string ends
G4double pt2 = HadronMom.perp2();
G4double transverseMass2 = HadronMom.plus()*HadronMom.minus();
G4double maxAvailMomentum2 = sqr(std::sqrt(transverseMass2) - std::sqrt(pt2));
// G4double pt2 = HadronMom.perp2();
// G4double transverseMass2 = HadronMom.plus()*HadronMom.minus();
// G4double maxAvailMomentum2 = sqr(std::sqrt(transverseMass2) - std::sqrt(pt2)); // It is wrong! Uzhi
G4double maxAvailMomentum2 = sqr(HadronMom.mag()/2.); // Uzhi
//G4cout<<"Hadron M M estimated Pt "<<HadronMom.mag()<<" "<<std::sqrt(transverseMass2) - std::sqrt(pt2)<<" "<<std::sqrt(pt2)<<G4endl;
G4ThreeVector pt(minTransverseMass, minTransverseMass, 0);
//G4cout<<"maxAvailMomentum2 widthOfPtSquare "<<maxAvailMomentum2<<" "<<widthOfPtSquare<<G4endl;
if(maxAvailMomentum2/widthOfPtSquare>0.01) pt = GaussianPt(widthOfPtSquare, maxAvailMomentum2);
//std::cout << "DSU 1.1 - "<< maxAvailMomentum2<< pt <<std::endl;
@@ -158,6 +192,10 @@ void G4QGSMSplitableHadron::DiffractiveSplitUp()
if (Direction) Local2 = -Local2;
G4double RightMinus = 0.5*(Local1 + Local2);
G4double LeftMinus = HadronMom.minus() - RightMinus;
if (LeftMinus <= 0.0) { // Uzhi-14Apr2016
RightMinus = 0.5*(Local1 - Local2);
LeftMinus = HadronMom.minus() - RightMinus;
}
//std::cout << "DSU 4 - "<< RightMinus <<" "<< LeftMinus << " "<<HadronMom.minus() <<std::endl;
G4double LeftPlus = LeftMom.perp2()/LeftMinus;
@@ -170,26 +208,77 @@ void G4QGSMSplitableHadron::DiffractiveSplitUp()
//std::cout << "DSU 6 - "<< LeftMom <<" "<< RightMom <<std::endl;
Left->Set4Momentum(LeftMom);
Right->Set4Momentum(RightMom);
//G4cout<<"Momenta H q AntiQ"<<G4endl;
//G4cout<<Get4Momentum()<<G4endl<<Left->Get4Momentum()<<G4endl<<Right->Get4Momentum()<<G4endl;
//G4cout<<"Color AntiColor "<<Left<<" "<<Right<<G4endl;
Color.push_back(Left);
AntiColor.push_back(Right);
iP=0; iAP=0; // Vova
// Uzhi
}
void G4QGSMSplitableHadron::SoftSplitUp()
{
//G4cout<<"G4QGSMSplitableHadron::SoftSplitUp()"<<G4endl;
//G4cout<<" GetSoftCollisionCount() "<<GetSoftCollisionCount()<<G4endl;
//... sample transversal momenta for sea and valence quarks
/* Uzhi
G4double phi, pts;
G4double SumPy = 0.;
G4double SumPx = 0.;
G4ThreeVector Pos = GetPosition();
*/ // Uzhi
G4int nSeaPair = GetSoftCollisionCount()-1;
G4LorentzVector tmp(0., 0., 0., 0.);
G4int aSeaPair;
for (aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
{
// choose quark flavour, d:u:s = 1:1:(1/StrangeSuppress-2)
G4int aPDGCode = 1 + (G4int)(G4UniformRand()/StrangeSuppress);
// BuildSeaQuark() determines quark spin, isospin and colour
// via parton-constructor G4Parton(aPDGCode)
G4Parton * aParton = BuildSeaQuark(false, aPDGCode, nSeaPair);
G4int firstPartonColour = aParton->GetColour();
G4double firstPartonSpinZ = aParton->GetSpinZ();
aParton->Set4Momentum(tmp);
Color.push_back(aParton);
// create anti-quark
aParton = BuildSeaQuark(true, aPDGCode, nSeaPair);
aParton->SetSpinZ(-firstPartonSpinZ);
aParton->SetColour(-firstPartonColour);
AntiColor.push_back(aParton);
}
// Valence quark
G4Parton* pColorParton = NULL;
G4Parton* pAntiColorParton = NULL;
GetValenceQuarkFlavors(GetDefinition(), pColorParton, pAntiColorParton);
// G4int ColorEncoding = pColorParton->GetPDGcode();
pColorParton->Set4Momentum(tmp);
pAntiColorParton->Set4Momentum(tmp);
//G4cout<<"Color AntiColor "<<pColorParton<<" "<<pAntiColorParton<<G4endl;
Color.push_back(pColorParton);
AntiColor.push_back(pAntiColorParton);
iP=0; iAP=0; // Vova
/* Uzhi
// here the condition,to ensure viability of splitting, also in cases
// where difractive excitation occured together with soft scattering.
// G4double LightConeMomentum = (Direction)? Get4Momentum().plus() : Get4Momentum().minus();
// G4double Xmin = theMinPz/LightConeMomentum;
G4double Xmin = theMinPz/( Get4Momentum().e() - GetDefinition()->GetPDGMass() );
while(Xmin>=1-(2*nSeaPair+1)*Xmin) Xmin*=0.95; /* Loop checking, 26.10.2015, A.Ribon */
while(Xmin>=1-(2*nSeaPair+1)*Xmin) Xmin*=0.95;
G4int aSeaPair;
for (aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
@@ -239,6 +328,8 @@ void G4QGSMSplitableHadron::SoftSplitUp()
SumPy += aParton->Get4Momentum().py();
AntiColor.push_back(aParton);
}
*/ // Uzhi
/* Uzhi
// Valence quark
G4Parton* pColorParton = NULL;
G4Parton* pAntiColorParton = NULL;
@@ -280,7 +371,6 @@ void G4QGSMSplitableHadron::SoftSplitUp()
if (GetDefinition() == G4PionZero::PionZeroDefinition()) aBeta = 1.;
if (GetDefinition() == G4KaonPlus::KaonPlusDefinition()) aBeta = 0.;
if (GetDefinition() == G4KaonMinus::KaonMinusDefinition()) aBeta = 0.;
const G4int maxNumberOfAttempts = 1000;
do
{
SumX = 0;
@@ -301,8 +391,7 @@ void G4QGSMSplitableHadron::SoftSplitUp()
if (1. - SumX <= Xmin) break;
}
}
while ( (1. - SumX <= Xmin) && nAttempt < maxNumberOfAttempts ); /* Loop checking, 26.10.2015, A.Ribon */
if ( nAttempt >= maxNumberOfAttempts ) return;
while (1. - SumX <= Xmin);
(*(AntiColor.end()-1))->SetX(1. - SumX); // the di-quark takes the rest, then go to momentum
G4double lightCone = ((!Direction) ? Get4Momentum().minus() : Get4Momentum().plus());
@@ -315,6 +404,7 @@ void G4QGSMSplitableHadron::SoftSplitUp()
aParton = AntiColor[aSeaPair];
aParton->DefineMomentumInZ(lightCone, lightCone2, Direction);
}
*/ // Uzhi
return;
}
@@ -386,9 +476,11 @@ G4ThreeVector G4QGSMSplitableHadron::GaussianPt(G4double widthSquare, G4double m
G4double R;
const G4int maxNumberOfLoops = 1000;
G4int loopCounter = -1;
while ( ((R = -widthSquare*G4Log(G4UniformRand())) > maxPtSquare) && /* Loop checking, 26.10.2015, A.Ribon */
++loopCounter < maxNumberOfLoops ) {;}
if ( loopCounter >= maxNumberOfLoops ) R = 0.0;
while( ((R = -widthSquare*G4Log(G4UniformRand())) > maxPtSquare) &&
++loopCounter < maxNumberOfLoops ) {;} /* Loop checking, 07.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
R = 0.99*maxPtSquare; // Just an acceptable value, without any physics consideration.
}
R = std::sqrt(R);
G4double phi = twopi*G4UniformRand();
return G4ThreeVector (R*std::cos(phi), R*std::sin(phi), 0.);
@@ -415,32 +507,34 @@ SampleX(G4double anXmin, G4int nSea, G4int totalSea, G4double aBeta)
for(G4int ii=1; ii<100; ii++)
{
G4double y = G4Pow::GetInstance()->powA(1./G4double(ii), alpha);
y *= G4Pow::GetInstance()->powN( G4Pow::GetInstance()->powA(1-anXmin-totalSea*anXmin, alpha+1) - G4Pow::GetInstance()->powA(anXmin, alpha+1), nSea);
y *= G4Pow::GetInstance()->powA(1-anXmin-totalSea*anXmin, aBeta+1) - G4Pow::GetInstance()->powA(anXmin, aBeta+1);
y *= G4Pow::GetInstance()->powN( G4Pow::GetInstance()->powA(1-anXmin-totalSea*anXmin, alpha+1) -
G4Pow::GetInstance()->powA(anXmin, alpha+1), nSea);
y *= G4Pow::GetInstance()->powA(1-anXmin-totalSea*anXmin, aBeta+1) -
G4Pow::GetInstance()->powA(anXmin, aBeta+1);
if(y>ymax) ymax = y;
}
G4double y;
G4double xMax=1-(totalSea+1)*anXmin;
if(anXmin > xMax)
{
G4cout << "anXmin = "<<anXmin<<" nSea = "<<nSea<<" totalSea = "<< totalSea<<G4endl;
// G4cout << "anXmin = "<<anXmin<<" nSea = "<<nSea<<" totalSea = "<< totalSea<<G4endl;
throw G4HadronicException(__FILE__, __LINE__, "G4QGSMSplitableHadron - Fatal: Cannot sample parton densities under these constraints.");
}
const G4int maxNumberOfLoops = 10000;
G4int loopCounter = -1;
const G4int maxNumberOfLoops = 1000;
G4int loopCounter = 0;
do
{
x1 = G4RandFlat::shoot(anXmin, xMax);
y = G4Pow::GetInstance()->powA(x1, alpha);
y *= G4Pow::GetInstance()->powN( G4Pow::GetInstance()->powA(1-x1-totalSea*anXmin, alpha+1) - G4Pow::GetInstance()->powA(anXmin, alpha+1), nSea);
y *= G4Pow::GetInstance()->powA(1-x1-totalSea*anXmin, aBeta+1) - G4Pow::GetInstance()->powA(anXmin, aBeta+1);
y *= G4Pow::GetInstance()->powN( G4Pow::GetInstance()->powA(1-x1-totalSea*anXmin, alpha+1) -
G4Pow::GetInstance()->powA(anXmin, alpha+1), nSea);
y *= G4Pow::GetInstance()->powA(1-x1-totalSea*anXmin, aBeta+1) -
G4Pow::GetInstance()->powA(anXmin, aBeta+1);
x2 = ymax*G4UniformRand();
}
while ( (x2>y) && ++loopCounter < maxNumberOfLoops ); /* Loop checking, 26.10.2015, A.Ribon */
while( (x2>y) && ++loopCounter < maxNumberOfLoops ); /* Loop checking, 07.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
G4ExceptionDescription ed;
ed << " Failed sampling after maxNumberOfLoops attempts : forced exit! " << G4endl;
G4Exception( "G4QGSMSplitableHadron::SampleX ", "HAD_QGS_002", JustWarning, ed );
x1 = 0.5*( anXmin + xMax ); // Just an acceptable value, without any physics consideration.
}
result = x1;
return result;
File diff suppressed because it is too large Load Diff
@@ -97,6 +97,7 @@ void G4SPBaryon::
SampleQuarkAndDiquark(G4int & quark, G4int & diQuark) const
{
typedef std::vector<G4SPPartonInfo *>::const_iterator iter;
G4double random = G4UniformRand();
G4double sum = 0;
iter i;
@@ -153,9 +154,9 @@ FindDiquark(G4int quark, G4int & diQuark) const
G4SPBaryon::
G4SPBaryon(G4Proton * aProton)
{
theDefinition = aProton;
thePartonInfo.push_back(new G4SPPartonInfo(2203, 1, 1./3.)); // uu_1, d
thePartonInfo.push_back(new G4SPPartonInfo(2103, 2, 1./6.)); // ud_1, u
theDefinition = aProton; // Uzhi
thePartonInfo.push_back(new G4SPPartonInfo(2203, 1, 1./3./2.)); // uu_1, d
thePartonInfo.push_back(new G4SPPartonInfo(2103, 2, 1./6.*2.)); // ud_1, u
thePartonInfo.push_back(new G4SPPartonInfo(2101, 2, 1./2.)); // ud_0, u
}
@@ -171,10 +172,10 @@ G4SPBaryon(G4AntiProton * aAntiProton)
G4SPBaryon::
G4SPBaryon(G4Neutron * aNeutron)
{
theDefinition = aNeutron;
thePartonInfo.push_back(new G4SPPartonInfo(2103, 1, 1./6.)); // ud_1, d
thePartonInfo.push_back(new G4SPPartonInfo(2101, 1, 1./2.)); // ud_0, d
thePartonInfo.push_back(new G4SPPartonInfo(1103, 2, 1./3.)); // dd_1, u
theDefinition = aNeutron; // Uzhi
thePartonInfo.push_back(new G4SPPartonInfo(2103, 1, 1./6.*2.)); // ud_1, d
thePartonInfo.push_back(new G4SPPartonInfo(2101, 1, 1./2. )); // ud_0, d
thePartonInfo.push_back(new G4SPPartonInfo(1103, 2, 1./3./2 )); // dd_1, u
}
G4SPBaryon::
@@ -348,7 +349,8 @@ G4SPBaryon(G4ParticleDefinition * aDefinition)
G4ParticleTable::GetParticleTable()->FindParticle(2114))// D0
{
thePartonInfo.push_back(new G4SPPartonInfo(2103, 1, 2./3.));
thePartonInfo.push_back(new G4SPPartonInfo(2103, 2, 1./3.));
// Uzhi thePartonInfo.push_back(new G4SPPartonInfo(2103, 2, 1./3.));
thePartonInfo.push_back(new G4SPPartonInfo(1103, 2, 1./3.)); // Uzhi 14.05.2014
}
else if(theDefinition ==
G4ParticleTable::GetParticleTable()->FindParticle(-2114))// anti D0
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4SingleDiffractiveExcitation.cc 93563 2015-10-26 14:46:09Z gcosmo $
// $Id: G4SingleDiffractiveExcitation.cc 94750 2015-12-07 08:24:29Z gcosmo $
// ------------------------------------------------------------
// GEANT 4 class implemetation file
//
@@ -47,6 +47,7 @@
#include "G4ExcitedString.hh"
#include "G4Log.hh"
#include "G4Pow.hh"
G4SingleDiffractiveExcitation::G4SingleDiffractiveExcitation(G4double sigmaPt, G4double minextraMass,G4double x0mass)
@@ -61,31 +62,39 @@ G4SingleDiffractiveExcitation::~G4SingleDiffractiveExcitation()
G4bool G4SingleDiffractiveExcitation::
ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) const
{
/*
G4cout<<G4endl<<"G4SingleDiffractiveExcitation::ExciteParticipants"<<G4endl;
G4cout<<"Proj Targ "<<projectile->GetDefinition()->GetPDGEncoding()<<" "<<target->GetDefinition()->GetPDGEncoding()<<G4endl;
G4cout<<"minExtraMass "<<minExtraMass<<" minmass "<<minmass<<" widthOfPtSquare "<<widthOfPtSquare<<G4endl;
*/
G4LorentzVector Pprojectile=projectile->Get4Momentum();
G4double Mprojectile2=sqr(projectile->GetDefinition()->GetPDGMass() + minExtraMass);
G4double Mprojectile = projectile->GetDefinition()->GetPDGMass();
G4double Mprojectile2=sqr(projectile->GetDefinition()->GetPDGMass()); // + minExtraMass);
G4LorentzVector Ptarget=target->Get4Momentum();
G4double Mtarget2=sqr(target->GetDefinition()->GetPDGMass() + minExtraMass);
// G4cout << "E proj, target :" << Pprojectile.e() << ", " <<
// Ptarget.e() << G4endl;
G4double Mtarget = target->GetDefinition()->GetPDGMass();
G4double Mtarget2=sqr(target->GetDefinition()->GetPDGMass()); // + minExtraMass);
G4bool KeepProjectile= G4UniformRand() > 0.5;
// reset the min.mass of the non diffractive particle to its value, ( minus a bit for rounding...)
if ( KeepProjectile )
{
// cout << " Projectile fix" << G4endl;
Mprojectile2 = sqr(projectile->GetDefinition()->GetPDGMass() * (1-perCent) );
} else {
// cout << " Target fix" << G4endl;
Mtarget2=sqr(target->GetDefinition()->GetPDGMass() * (1-perCent) );
}
//G4cout<<"Pr Tr 4-Mom "<<Pprojectile<<" "<<Pprojectile.mag()<<G4endl<<" "<<Ptarget <<" "<<Ptarget.mag() <<G4endl;
// Transform momenta to cms and then rotate parallel to z axis;
G4double AveragePt2=sqr(400.*MeV);
G4LorentzVector Psum;
Psum=Pprojectile+Ptarget;
G4LorentzVector Psum=Pprojectile+Ptarget;
G4double SqrtS=Psum.mag();
G4double S =Psum.mag2();
if(SqrtS-Mprojectile-Mtarget <= 250.0*MeV) {
return true;
/*
G4cerr<<"Projectile: "<<projectile->GetDefinition()->GetPDGEncoding()<<" "
<<Pprojectile<<" "<<Pprojectile.mag()<<G4endl;
G4cerr<<"Target: "<<target->GetDefinition()->GetPDGEncoding()<<" "
<<Ptarget<<" "<<Ptarget.mag()<<G4endl;
G4cerr<<"sqrt(S) = "<<SqrtS<<" Mp + Mt = "<<Pprojectile.mag()+Ptarget.mag()<<G4endl;
throw G4HadronicException(__FILE__, __LINE__, "The QGSM cannot work at such low energy!");
*/
}
G4LorentzRotation toCms(-1*Psum.boostVector());
@@ -101,101 +110,119 @@ ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) c
toCms.rotateZ(-1*Ptmp.phi());
toCms.rotateY(-1*Ptmp.theta());
// G4cout << "Pprojectile be4 boost " << Pprojectile << G4endl;
// G4cout << "Ptarget be4 boost : " << Ptarget << G4endl;
G4LorentzRotation toLab(toCms.inverse());
//G4cout << "Pprojectile be4 boost " << Pprojectile << G4endl;
//G4cout << "Ptarget be4 boost : " << Ptarget << G4endl;
Pprojectile.transform(toCms);
Ptarget.transform(toCms);
//G4cout << "Pprojectile aft boost " << Pprojectile << G4endl;
//G4cout << "Ptarget aft boost : " << Ptarget << G4endl;
G4double maxPtSquare=sqr(Ptarget.pz());
G4double Pt2, PZcms, PZcms2;
G4double ProjMassT2, ProjMassT;
G4double TargMassT2, TargMassT;
G4double PMinusMin, PMinusMax;
//G4double PPlusMin , PPlusMax;
G4double TPlusMin, TPlusMax;
G4double PMinusNew, PPlusNew, TPlusNew, TMinusNew;
G4LorentzVector Qmomentum;
G4double Qminus, Qplus;
G4bool ProjectileDiffraction= G4UniformRand() > 0.5;
if ( ProjectileDiffraction )
{ // The projectile will fragment, the target will saved.
Mprojectile2=sqr(Mprojectile + 250.*MeV );
} else {// The target will fragment, the projectile will saved.
Mtarget2 = sqr(Mtarget + 250.*MeV );
}
G4int whilecount=0;
do {
whilecount++;
if (whilecount > 1000 )
{
//G4cout<<"whilecount > 1000 "<<whilecount<<G4endl;
Qmomentum=G4LorentzVector(0.,0.,0.,0.);
return false; // Ignore this interaction
}
// Generate pt
Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0);
G4double maxPtSquare=sqr(Ptarget.pz());
if (whilecount++ >= 500 && (whilecount%100)==0)
// G4cout << "G4SingleDiffractiveExcitation::ExciteParticipants possibly looping"
// << ", loop count/ maxPtSquare : "
// << whilecount << " / " << maxPtSquare << G4endl;
if (whilecount > 1000 )
{
Qmomentum=G4LorentzVector(0.,0.,0.,0.);
// G4cout << "G4SingleDiffractiveExcitation::ExciteParticipants: Aborting loop!" << G4endl;
return false; // Ignore this interaction
}
Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);
Pt2 = G4ThreeVector( Qmomentum.vect() ).mag2();
ProjMassT2 = Mprojectile2 + Pt2;
ProjMassT = std::sqrt( ProjMassT2 );
TargMassT2 = Mtarget2 + Pt2;
TargMassT = std::sqrt( TargMassT2 );
//G4cout<<whilecount<<" "<<Pt2<<" "<<ProjMassT<<" "<<TargMassT<<" "<<SqrtS<<" "<<S<<" "<<ProjectileDiffraction<<G4endl;
if ( SqrtS < ProjMassT + TargMassT ) continue;
PZcms2 = ( S*S + ProjMassT2*ProjMassT2 + TargMassT2*TargMassT2
- 2.0*S*ProjMassT2 - 2.0*S*TargMassT2 - 2.0*ProjMassT2*TargMassT2 ) / 4.0 / S;
if ( PZcms2 < 0 ) continue;
PZcms = std::sqrt( PZcms2 );
if ( ProjectileDiffraction )
{ // The projectile will fragment, the target will saved.
PMinusMin = std::sqrt( ProjMassT2 + PZcms2 ) - PZcms;
PMinusMax = SqrtS - TargMassT;
PMinusNew = ChooseX( PMinusMin, PMinusMax );
TMinusNew = SqrtS - PMinusNew;
Qminus = Ptarget.minus() - TMinusNew;
TPlusNew = TargMassT2 / TMinusNew;
Qplus = Ptarget.plus() - TPlusNew;
} else {// The target will fragment, the projectile will saved.
TPlusMin = std::sqrt( TargMassT2 + PZcms2 ) - PZcms;
TPlusMax = SqrtS - ProjMassT;
TPlusNew = ChooseX( TPlusMin, TPlusMax );
PPlusNew = SqrtS - TPlusNew;
Qplus = PPlusNew - Pprojectile.plus();
PMinusNew = ProjMassT2 / PPlusNew;
Qminus = PMinusNew - Pprojectile.minus();
}
// Momentum transfer
G4double Xmin = minmass / ( Pprojectile.e() + Ptarget.e() );
G4double Xmax=1.;
G4double Xplus =ChooseX(Xmin,Xmax);
G4double Xminus=ChooseX(Xmin,Xmax);
Qmomentum.setPz( (Qplus - Qminus)/2 );
Qmomentum.setE( (Qplus + Qminus)/2 );
//G4cout<<ProjectileDiffraction<<" "<<( Pprojectile + Qmomentum ).mag2()<<" "<< Mprojectile2<<G4endl;
//G4cout<<!ProjectileDiffraction<<" "<<( Ptarget + Qmomentum ).mag2()<<" "<< Mtarget2<<G4endl;
} while ( ( ProjectileDiffraction&&( Pprojectile + Qmomentum ).mag2() < Mprojectile2 ) ||
(!ProjectileDiffraction&&( Ptarget - Qmomentum ).mag2() < Mtarget2 ) ); /* Loop checking, 07.08.2015, A.Ribon */
// Repeat the sampling because there was not any excitation
G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();
G4double Qplus =-1 * pt2 / Xminus/Ptarget.minus();
G4double Qminus= pt2 / Xplus /Pprojectile.plus();
if ( KeepProjectile )
{
Qminus = (sqr(projectile->GetDefinition()->GetPDGMass()) + pt2 )
/ (Pprojectile.plus() + Qplus )
- Pprojectile.minus();
} else
{
Qplus = Ptarget.plus()
- (sqr(target->GetDefinition()->GetPDGMass()) + pt2 )
/ (Ptarget.minus() - Qminus );
}
Qmomentum.setPz( (Qplus-Qminus)/2 );
Qmomentum.setE( (Qplus+Qminus)/2 );
// G4cout << "Qplus / Qminus " << Qplus << " / " << Qminus<<G4endl;
// G4cout << "pt2 " << pt2 << G4endl;
// G4cout << "Qmomentum " << Qmomentum << G4endl;
// G4cout << " Masses (P/T) : " << (Pprojectile+Qmomentum).mag() <<
// " / " << (Ptarget-Qmomentum).mag() << G4endl;
} while ( (Ptarget-Qmomentum).mag2() <= Mtarget2 /* Loop checking, 26.10.2015, A.Ribon */
|| (Pprojectile+Qmomentum).mag2() <= Mprojectile2
|| (Ptarget-Qmomentum).e() < 0.
|| (Pprojectile+Qmomentum).e() < 0. );
// G4double Ecms=Pprojectile.e() + Ptarget.e();
Pprojectile += Qmomentum;
Ptarget -= Qmomentum;
// G4cout << "Pprojectile.e() : " << Pprojectile.e() << G4endl;
// G4cout << "Ptarget.e() : " << Ptarget.e() << G4endl;
// G4cout << "end event_______________________________________________"<<G4endl;
//
// G4cout << "Pprojectile with Q : " << Pprojectile << G4endl;
// G4cout << "Ptarget with Q : " << Ptarget << G4endl;
// G4cout << "Projectile back: " << toLab * Pprojectile << G4endl;
// G4cout << "Target back: " << toLab * Ptarget << G4endl;
// Transform back and update SplitableHadron Participant.
Pprojectile.transform(toLab);
Ptarget.transform(toLab);
// G4cout << "G4SingleDiffractiveExcitation- Target mass " << Ptarget.mag() << G4endl;
// G4cout << "G4SingleDiffractiveExcitation- Projectile mass " << Pprojectile.mag() << G4endl;
//G4cout << "Pprojectile aft boost " << Pprojectile << G4endl;
//G4cout << "Ptarget aft boost : " << Ptarget << G4endl;
//G4cout << "G4SingleDiffractiveExcitation- Target mass " << Ptarget.mag() << G4endl;
//G4cout << "G4SingleDiffractiveExcitation- Projectile mass " << Pprojectile.mag() << G4endl;
//G4int Uzhi; G4cin>>Uzhi;
target->Set4Momentum(Ptarget);
projectile->Set4Momentum(Pprojectile);
return true;
}
@@ -207,9 +234,6 @@ ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) c
G4double G4SingleDiffractiveExcitation::ChooseX(G4double Xmin, G4double Xmax) const
{
// choose an x between Xmin and Xmax with P(x) ~ 1/x
// to be improved...
G4double range=Xmax-Xmin;
if ( Xmin <= 0. || range <=0. )
@@ -218,12 +242,7 @@ G4double G4SingleDiffractiveExcitation::ChooseX(G4double Xmin, G4double Xmax) co
throw G4HadronicException(__FILE__, __LINE__, "G4SingleDiffractiveExcitation::ChooseX : Invalid arguments ");
}
G4double x;
do {
x=Xmin + G4UniformRand() * range;
} while ( Xmin/x < G4UniformRand() ); /* Loop checking, 26.10.2015, A.Ribon */
// cout << "DiffractiveX "<<x<<G4endl;
G4double x = Xmin*G4Pow::GetInstance()->powA(Xmax/Xmin, G4UniformRand() );
return x;
}
@@ -233,11 +252,13 @@ G4ThreeVector G4SingleDiffractiveExcitation::GaussianPt(G4double widthSquare, G4
G4double pt2;
const G4int maxNumberOfLoops = 1000;
G4int loopCounter = -1;
G4int loopCounter = 0;
do {
pt2=widthSquare * G4Log( G4UniformRand() );
} while ( ( pt2 > maxPtSquare) && ++loopCounter < maxNumberOfLoops ); /* Loop checking, 26.10.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) pt2 = 0.0;
pt2=-widthSquare * G4Log( G4UniformRand() );
} while ( ( pt2 > maxPtSquare) && ++loopCounter < maxNumberOfLoops ); /* Loop checking, 07.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
pt2 = 0.99*maxPtSquare; // Just an acceptable value, without any physics consideration.
}
pt2=std::sqrt(pt2);