Import Geant4 11.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2022-12-09 14:43:28 +01:00
parent c07cea1fe0
commit 9f34590941
3810 changed files with 200490 additions and 182326 deletions
@@ -292,8 +292,99 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
G4cout << "Process a, 3 shirt diagram" << G4endl;
#endif
// Sampling kinematical properties of quark. It can be done before string's creation
const G4int maxNumberOfLoops = 1000;
G4double MassQ2 = 0.0; // Simplest case is considered with Mass_Q = 0.0
// In principle, this must work with Mass_Q != 0.0
G4double Quark_Xs[6];
G4ThreeVector Quark_Mom[6];
G4double Alfa_R = 0.5;
G4double AveragePt2 = 200.0*200.0, maxPtSquare = common.S;
G4double ScaleFactor = 1.0;
G4double Alfa = 0.0, Beta = 0.0;
G4int NumberOfTries = 0, loopCounter = 0;
do {
// Sampling X's of anti-baryon and baryon
G4double x1 = 0.0, x2 = 0.0, x3 = 0.0;
G4double Product = 1.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // anti-baryon (1st case), baryon (2nd case)
G4double r1 = G4UniformRand(), r2 = G4UniformRand();
if ( Alfa_R == 1.0 ) {
x1 = 1.0 - std::sqrt( r1 );
x2 = (1.0 - x1) * r2;
} else {
x1 = sqr( r1 );
x2 = (1.0 - x1) * sqr( std::sin( pi/2.0*r2 ) );
}
x3 = 1.0 - x1 - x2;
G4int index = iCase*3; // 0 for anti-baryon, 3 for baryon
Quark_Xs[index] = x1; Quark_Xs[index+1] = x2; Quark_Xs[index+2] = x3;
Product *= (x1*x2*x3);
}
if ( Product == 0.0 ) continue;
++NumberOfTries;
if ( NumberOfTries == 100*(NumberOfTries/100) ) {
// After a large number of tries, it is better to reduce the values of <Pt^2>
ScaleFactor /= 2.0;
AveragePt2 *= ScaleFactor;
}
G4ThreeVector PtSum( 0.0, 0.0, 0.0 );
for ( G4int i = 0; i < 6; ++i ) {
Quark_Mom [i] = GaussianPt( AveragePt2, maxPtSquare );
PtSum += Quark_Mom[i];
}
PtSum /= 6.0;
Alfa = 0.0; Beta = 0.0;
for ( G4int i = 0; i < 6; ++i ) { // Loop over the quarks and (anti-)quarks
Quark_Mom[i] -= PtSum;
G4double val = ( Quark_Mom[i].mag2() + MassQ2 ) / Quark_Xs[i];
if ( i < 3 ) { // anti-baryon
Alfa += val;
} else { // baryon (iCase == 1)
Beta += val;
}
}
} while ( ( std::sqrt( Alfa ) + std::sqrt( Beta ) > common.SqrtS ) &&
++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
return false;
}
G4double DecayMomentum2 = sqr(common.S) + sqr(Alfa) + sqr(Beta)
- 2.0*( common.S*(Alfa + Beta) + Alfa*Beta );
G4double WminusTarget = 0.0, WplusProjectile = 0.0;
WminusTarget = ( common.S - Alfa + Beta + std::sqrt( DecayMomentum2 ) ) / 2.0 / common.SqrtS;
WplusProjectile = common.SqrtS - Beta/WminusTarget;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // anti-baryon (1st case), baryon (2nd case)
G4int index = iCase*3; // 0 for anti-baryon, 3 for baryon
G4double w = WplusProjectile; // for anti-baryon
if ( iCase == 1 ) w = - WminusTarget; // for baryon
for ( G4int i = 0; i < 3; ++i ) {
G4double Pz = w * Quark_Xs[index+i] / 2.0 -
( Quark_Mom[index+i].mag2() + MassQ2 ) /
( 2.0 * w * Quark_Xs[index+i] );
Quark_Mom[index+i].setZ( Pz );
}
}
// Sampling of anti-quark order in projectile
G4int SampledCase = G4RandFlat::shootInt( G4long( 6 ) );
G4int SampledCase = (G4int)G4RandFlat::shootInt( 6 );
G4int Tmp1 = 0, Tmp2 = 0;
switch ( SampledCase ) {
case 1 : Tmp1 = common.AQ[1]; common.AQ[1] = common.AQ[2]; common.AQ[2] = Tmp1; break;
@@ -329,7 +420,7 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
G4int absAntiQuark = std::abs( antiQuark ), absQuark = std::abs( quark );
G4double aKsi = G4UniformRand();
if ( absAntiQuark == absQuark ) {
if ( absAntiQuark != 3 ) {
if ( absAntiQuark != 3 ) { // Not yet considered the case absAntiQuark 4 (charm) and 5 (bottom)
NewCode = 111; // Pi0-meson
if ( aKsi < 0.5 ) {
NewCode = 221; // Eta -meson
@@ -343,7 +434,7 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
NewCode = 331; // Eta'-meson
}
}
} else {
} else { // Vector mesons - rho, omega, phi (not yet considered the analogous cases for charm and bottom)
if ( absAntiQuark > absQuark ) {
NewCode = absAntiQuark*100 + absQuark*10 + 1; NewCode *= absAntiQuark/antiQuark;
} else {
@@ -355,8 +446,8 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
if ( ! TestParticle ) return false;
if ( iString == 0 ) {
projectile->SetDefinition( TestParticle );
theParameters->SetProjMinDiffMass( 0.5 );
theParameters->SetProjMinNonDiffMass( 0.5 );
theParameters->SetProjMinDiffMass( 0.5 ); // 0.5 GeV : Min diffractive mass of pi-meson
theParameters->SetProjMinNonDiffMass( 0.5 ); // It must be self-consistent with Parameters
} else if ( iString == 1 ) {
target->SetDefinition( TestParticle );
theParameters->SetTarMinDiffMass( 0.5 );
@@ -369,106 +460,8 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
}
} // End of the for loop over the 3 string cases
// Sampling kinematical properties:
// 1st string AQ[0]-Q[0], 2nd string AQ[1]-Q[1], 3rd string AQ[2]-Q[2]
G4ThreeVector Quark_Mom[6];
G4double ModMom2[6];
G4double AveragePt2 = 200.0*200.0, maxPtSquare = common.S, SumMt = 0.0, MassQ2 = 0.0,
ScaleFactor = 1.0;
G4int NumberOfTries = 0, loopCounter = 0;
const G4int maxNumberOfLoops = 1000;
do {
++NumberOfTries;
if ( NumberOfTries == 100*(NumberOfTries/100) ) {
// At large number of tries it would be better to reduce the values of <Pt^2>
ScaleFactor /= 2.0;
AveragePt2 *= ScaleFactor;
}
G4ThreeVector PtSum( 0.0, 0.0, 0.0 );
for ( G4int i = 0; i < 6; ++i ) {
Quark_Mom [i] = GaussianPt( AveragePt2, maxPtSquare );
PtSum += Quark_Mom[i];
}
PtSum /= 6.0;
SumMt = 0.0;
for ( G4int i = 0; i < 6; ++i ) {
Quark_Mom[i] -= PtSum;
ModMom2[i] = Quark_Mom[i].mag2();
SumMt += std::sqrt( ModMom2[i] + MassQ2 );
}
} while ( ( SumMt > common.SqrtS ) &&
++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
return false;
}
// Sampling X's of anti-baryon and baryon
G4double WminusTarget = 0.0, WplusProjectile = 0.0;
G4double Alfa_R = 0.5;
G4bool Success = true;
NumberOfTries = 0; loopCounter = 0;
do {
Success = true;
++NumberOfTries;
G4double Alfa = 0.0, Beta = 0.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // anti-baryon (1st case), baryon (2nd case)
G4double x1 = 0.0, x2 = 0.0;
G4double r1 = G4UniformRand(), r2 = G4UniformRand();
if ( Alfa_R == 1.0 ) {
x1 = 1.0 - std::sqrt( r1 );
x2 = (1.0 - x1) * r2;
} else {
x1 = sqr( r1 );
x2 = (1.0 - x1) * sqr( std::sin( pi/2.0*r2 ) );
}
G4double x3 = 1.0 - x1 - x2;
G4int index = iCase*3; // 0 for anti-baryon, 3 for baryon
Quark_Mom[index].setZ( x1 ); Quark_Mom[index+1].setZ( x2 ); Quark_Mom[index+2].setZ( x3 );
for ( G4int i = 0; i < 3; ++i ) { // Loop over the 3 (anti-)quarks
if ( Quark_Mom[index+i].getZ() != 0.0 ) {
G4double val = ( ModMom2[index+i] + MassQ2 ) / Quark_Mom[index+i].getZ();
if ( iCase == 0 ) { // anti-baryon
Alfa += val;
} else { // baryon (iCase == 1)
Beta += val;
}
} else {
Success = false;
}
}
}
if ( ! Success ) continue;
if ( std::sqrt( Alfa ) + std::sqrt( Beta ) > common.SqrtS ) {
Success = false;
continue;
}
G4double DecayMomentum2 = sqr(common.S) + sqr(Alfa) + sqr(Beta)
- 2.0*( common.S*(Alfa + Beta) + Alfa*Beta );
WminusTarget = ( common.S - Alfa + Beta + std::sqrt( DecayMomentum2 ) ) / 2.0 / common.SqrtS;
WplusProjectile = common.SqrtS - Beta/WminusTarget;
} while ( ( ! Success ) &&
++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
return false;
}
G4double SqrtScaleF = 1.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // anti-baryon (1st case), baryon (2nd case)
G4int index = iCase*3; // 0 for anti-baryon, 3 for baryon
G4double w = WplusProjectile; // for anti-baryon
if ( iCase == 1 ) w = - WminusTarget; // for baryon
for ( G4int i = 0; i < 3; ++i ) {
G4double Pz = w * Quark_Mom[index+i].getZ() / 2.0 -
( ScaleFactor * ModMom2[index+i] + MassQ2 ) /
( 2.0 * w * Quark_Mom[index+i].getZ() );
Quark_Mom[index+i].setZ( Pz );
if ( ScaleFactor != 1.0 ) {
Quark_Mom[index+i].setX( SqrtScaleF * Quark_Mom[index+i].getX() );
Quark_Mom[index+i].setY( SqrtScaleF * Quark_Mom[index+i].getY() );
}
}
}
G4LorentzVector Pstring1, Pstring2, Pstring3;
G4int QuarkOrder[3] = { 0 };
G4double YstringMax = 0.0, YstringMin = 0.0;
@@ -542,6 +535,16 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
common.Ptarget = Pstring3; // Lowest rapidity
G4LorentzVector LeftString( Pstring2 ); // Middle rapidity
if ( common.RotateStrings ) {
common.Pprojectile *= common.RandomRotation;
common.Ptarget *= common.RandomRotation;
LeftString *= common.RandomRotation;
}
common.Pprojectile.transform( common.toLab );
common.Ptarget.transform( common.toLab );
LeftString.transform( common.toLab );
// Calculation of the creation time
// Creation time and position of target nucleon were determined in ReggeonCascade() of G4FTFModel
projectile->SetTimeOfCreation( target->GetTimeOfCreation() );
@@ -579,7 +582,7 @@ Create1DiquarkAntiDiquarkString( G4VSplitableHadron* projectile,
G4int CandidatsN = 0, CandAQ[9][2] = {}, CandQ[9][2] = {};
for ( G4int iAQ = 0; iAQ < 3; ++iAQ ) { // index of the 3 constituent anti-quarks of the antibaryon projectile
for ( G4int iQ = 0; iQ < 3; ++iQ ) { // index of the 3 constituent quarks of the nucleon target
for ( G4int iQ = 0; iQ < 3; ++iQ ) { // index of the 3 constituent quarks of the target nucleon
if ( -common.AQ[iAQ] == common.Q[iQ] ) { // antiquark - quark that can annihilate
// Here "0", "1", "2" means, respectively, "first", "second" and "third" constituent
// of the (anti-baryon) projectile or (nucleon) target.
@@ -597,7 +600,7 @@ Create1DiquarkAntiDiquarkString( G4VSplitableHadron* projectile,
// Remaining two (anti-)quarks that form the (anti-)diquark
G4int LeftAQ1 = 0, LeftAQ2 = 0, LeftQ1 = 0, LeftQ2 = 0;
if ( CandidatsN != 0 ) {
G4int SampledCase = G4RandFlat::shootInt( G4long( CandidatsN ) );
G4int SampledCase = (G4int)G4RandFlat::shootInt( CandidatsN );
LeftAQ1 = common.AQ[ CandAQ[SampledCase][0] ];
LeftAQ2 = common.AQ[ CandAQ[SampledCase][1] ];
LeftQ1 = common.Q[ CandQ[SampledCase][0] ];
@@ -622,8 +625,9 @@ Create1DiquarkAntiDiquarkString( G4VSplitableHadron* projectile,
projectile->SetFirstParton( DQ );
projectile->SetSecondParton( Anti_DQ );
G4LorentzVector Pquark = G4LorentzVector( 0.0, 0.0, common.SqrtS/2.0, common.SqrtS/2.0 );
G4LorentzVector Paquark = G4LorentzVector( 0.0, 0.0, -common.SqrtS/2.0, common.SqrtS/2.0 );
// It is assumed that quark and di-quark masses are 0.
G4LorentzVector Pquark = G4LorentzVector( 0.0, 0.0, -common.SqrtS/2.0, common.SqrtS/2.0 );
G4LorentzVector Paquark = G4LorentzVector( 0.0, 0.0, common.SqrtS/2.0, common.SqrtS/2.0 );
if ( common.RotateStrings ) {
Pquark *= common.RandomRotation;
@@ -658,6 +662,9 @@ Create1DiquarkAntiDiquarkString( G4VSplitableHadron* projectile,
return 0; // Completed successfully: nothing else to be done
} // End of if ( CandidatsN != 0 )
// If we allow the string to interact with other nuclear nucleons, we have to
// set up MinDiffrMass in Parameters, and ascribe a PDGEncoding. To be done yet!
return 1; // Successfully ended, but the work is not over
}
@@ -680,6 +687,91 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
<< G4endl;
#endif
// Sampling kinematical properties: 1st string LeftAQ1-LeftQ1, 2nd string LeftAQ2-LeftQ2
G4ThreeVector Quark_Mom[4];
G4double Quark_Xs[4];
G4double AveragePt2 = 200.0*200.0, maxPtSquare = common.S, MassQ2 = 0.0, ScaleFactor = 1.0;
G4int NumberOfTries = 0, loopCounter = 0;
const G4int maxNumberOfLoops = 1000;
G4double Alfa = 0.0, Beta = 0.0;
G4double WminusTarget = 0.0, WplusProjectile = 0.0, Alfa_R = 0.5;
do {
// Sampling X's of the 2 quarks and 2 anti-quarks
G4double Product = 1.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // Loop over the two strings
G4double x = 0.0, r = G4UniformRand();
if ( Alfa_R == 1.0 ) {
if ( iCase == 0 ) { // first string
x = std::sqrt( r );
} else { // second string
x = 1.0 - std::sqrt( r );
}
} else {
x = sqr( std::sin( pi/2.0*r ) );
}
G4int index = iCase*2; // 0 for the first string, 2 for the second string
Quark_Xs[index] = x ; Quark_Xs[index+1] = 1.0 - x ;
Product *= x*(1.0-x);
}
if ( Product == 0.0 ) continue;
++NumberOfTries;
if ( NumberOfTries == 100*(NumberOfTries/100) ) {
// After a large number of tries, it is better to reduce the values of <Pt^2>
ScaleFactor /= 2.0;
AveragePt2 *= ScaleFactor;
}
G4ThreeVector PtSum( 0.0, 0.0, 0.0 );
for( G4int i = 0; i < 4; ++i ) {
Quark_Mom[i] = GaussianPt( AveragePt2, maxPtSquare );
PtSum += Quark_Mom[i];
}
PtSum /= 4.0;
for ( G4int i = 0; i < 4; ++i ) {
Quark_Mom[i] -= PtSum;
}
Alfa = 0.0; Beta = 0.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) {
G4int index = iCase * 2;
for ( G4int i = 0; i < 2; ++i ) {
G4double val = ( Quark_Mom[index+i].mag2() + MassQ2 ) / Quark_Xs[index+i];
if ( iCase == 0 ) { // first string
Alfa += val;
} else { // second string
Beta += val;
}
}
}
} while ( ( std::sqrt( Alfa ) + std::sqrt( Beta ) > common.SqrtS ) &&
++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
return 99; // unsuccessfully ended, nothing else can be done
}
G4double DecayMomentum2 = sqr(common.S) + sqr(Alfa) + sqr(Beta)
- 2.0*( common.S*(Alfa + Beta) + Alfa*Beta );
WminusTarget = ( common.S - Alfa + Beta + std::sqrt( DecayMomentum2 ) ) / 2.0 / common.SqrtS;
WplusProjectile = common.SqrtS - Beta/WminusTarget;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // Loop over the two strings
G4int index = iCase*2; // 0 for the first string, 2 for the second string
for ( G4int i = 0; i < 2; ++i ) {
G4double w = WplusProjectile; // For the first string
if ( iCase == 1 ) w = - WminusTarget; // For the second string
G4double Pz = w * Quark_Xs[index+i] / 2.0
- ( Quark_Mom[index+i].mag2() + MassQ2 ) /
( 2.0 * w * Quark_Xs[index+i] );
Quark_Mom[index+i].setZ( Pz );
}
}
G4int CandidatsN = 0, CandAQ[9][2] = {}, CandQ[9][2] = {};
G4int LeftAQ1 = 0, LeftAQ2 = 0, LeftQ1 = 0, LeftQ2 = 0;
for ( G4int iAQ = 0; iAQ < 3; ++iAQ ) { // index of the 3 constituent anti-quarks of the antibaryon projectile
@@ -699,7 +791,7 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
}
if ( CandidatsN != 0 ) {
G4int SampledCase = G4RandFlat::shootInt( G4long( CandidatsN ) );
G4int SampledCase = (G4int)G4RandFlat::shootInt( CandidatsN );
LeftAQ1 = common.AQ[ CandAQ[SampledCase][0] ];
LeftAQ2 = common.AQ[ CandAQ[SampledCase][1] ];
if ( G4UniformRand() < 0.5 ) {
@@ -765,104 +857,6 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
}
} // End of loop over the 2 string cases
// Sampling kinematical properties: 1st string LeftAQ1-LeftQ1, 2nd string LeftAQ2-LeftQ2
G4ThreeVector Quark_Mom[4];
G4double ModMom2[4];
G4double AveragePt2 = 200.0*200.0, maxPtSquare = common.S, SumMt = 0.0, MassQ2 = 0.0,
ScaleFactor = 1.0;
G4int NumberOfTries = 0, loopCounter = 0;
const G4int maxNumberOfLoops = 1000;
do {
++NumberOfTries;
if ( NumberOfTries == 100*(NumberOfTries/100) ) {
// At large number of tries it would be better to reduce the values of <Pt^2>
ScaleFactor /= 2.0;
AveragePt2 *= ScaleFactor;
}
G4ThreeVector PtSum( 0.0, 0.0, 0.0 );
for( G4int i = 0; i < 4; ++i ) {
Quark_Mom[i] = GaussianPt( AveragePt2, maxPtSquare );
PtSum += Quark_Mom[i];
}
PtSum /= 4.0;
SumMt = 0.0;
for ( G4int i = 0; i < 4; ++i ) {
Quark_Mom[i] -= PtSum;
ModMom2[i] = Quark_Mom[i].mag2();
SumMt += std::sqrt( ModMom2[i] + MassQ2 );
}
} while ( ( SumMt > common.SqrtS ) &&
++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
return 99; // unsuccessfully ended, nothing else can be done
}
// Sampling X's of the two strings
G4double WminusTarget = 0.0, WplusProjectile = 0.0, Alfa_R = 0.5; ScaleFactor = 1.0;
G4bool Success = true;
NumberOfTries = 0, loopCounter = 0;
do {
Success = true;
++NumberOfTries;
G4double Alfa = 0.0, Beta = 0.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // Loop over the two strings
G4double x = 0.0, r = G4UniformRand();
if ( Alfa_R == 1.0 ) {
if ( iCase == 0 ) { // first string
x = std::sqrt( r );
} else { // second string
x = 1.0 - std::sqrt( r);
}
} else {
x = sqr( std::sin( pi/2.0*r ) );
}
G4int index = iCase*2; // 0 for the first string, 2 for the second string
Quark_Mom[index].setZ( x ); Quark_Mom[index+1].setZ( 1.0 - x );
for ( G4int i = 0; i < 2; ++i ) {
if ( Quark_Mom[i].getZ() != 0.0 ) {
G4double val = ( ModMom2[index+i] + MassQ2 ) / Quark_Mom[index+i].getZ();
if ( iCase == 0 ) { // first string
Alfa += val;
} else { // second string
Beta += val;
}
} else {
Success = false;
}
}
}
if ( ! Success ) continue;
if ( std::sqrt( Alfa ) + std::sqrt( Beta ) > common.SqrtS ) {
Success = false;
continue;
}
G4double DecayMomentum2 = sqr(common.S) + sqr(Alfa) + sqr(Beta)
- 2.0*( common.S*(Alfa + Beta) + Alfa*Beta );
WminusTarget = ( common.S - Alfa + Beta + std::sqrt( DecayMomentum2 ) ) / 2.0 / common.SqrtS;
WplusProjectile = common.SqrtS - Beta/WminusTarget;
} while ( ( ! Success ) &&
++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
return 99; // unsuccessfully ended, nothing else can be done
}
G4double SqrtScaleF = 1.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // Loop over the two strings
G4int index = iCase*2; // 0 for the first string, 2 for the second string
for ( G4int i = 0; i < 2; ++i ) {
G4double w = WplusProjectile; // For the first string
if ( iCase == 1 ) w = - WminusTarget; // For the second string
G4double Pz = w * Quark_Mom[index+i].getZ() / 2.0
- ( ScaleFactor * ModMom2[index+i] + MassQ2 ) /
( 2.0 * w * Quark_Mom[index+i].getZ() );
Quark_Mom[index+i].setZ( Pz );
if ( ScaleFactor != 1.0 ) {
Quark_Mom[index+i].setX( SqrtScaleF * Quark_Mom[index+i].getX() );
Quark_Mom[index+i].setY( SqrtScaleF * Quark_Mom[index+i].getY() );
}
}
}
G4int QuarkOrder[2];
G4LorentzVector Pstring1, Pstring2;
G4double Ystring1 = 0.0, Ystring2 = 0.0;
@@ -897,6 +891,14 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
QuarkOrder[0] = 1; QuarkOrder[1] = 0;
}
if ( common.RotateStrings ) {
common.Pprojectile *= common.RandomRotation;
common.Ptarget *= common.RandomRotation;
}
common.Pprojectile.transform( common.toLab );
common.Ptarget.transform( common.toLab );
G4LorentzVector Quark_4Mom[4];
for ( G4int i = 0; i < 4; ++i ) {
Quark_4Mom[i] = G4LorentzVector( Quark_Mom[i], std::sqrt( Quark_Mom[i].mag2() + MassQ2 ) );
@@ -912,14 +914,6 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
target->GetNextParton()->Set4Momentum( Quark_4Mom[QuarkOrder[1]] );
target->GetNextAntiParton()->Set4Momentum( Quark_4Mom[QuarkOrder[1]+2] );
if ( common.RotateStrings ) {
common.Pprojectile *= common.RandomRotation;
common.Ptarget *= common.RandomRotation;
}
common.Pprojectile.transform( common.toLab );
common.Ptarget.transform( common.toLab );
// Calculation of the creation time
// Creation time and position of target nucleon were determined in ReggeonCascade() of G4FTFModel
projectile->SetTimeOfCreation( target->GetTimeOfCreation() );
@@ -986,7 +980,7 @@ Create1QuarkAntiQuarkString( G4VSplitableHadron* projectile,
}
if ( CandidatsN != 0 ) {
G4int SampledCase = G4RandFlat::shootInt( G4long( CandidatsN ) );
G4int SampledCase = (G4int)G4RandFlat::shootInt( CandidatsN );
LeftAQ = common.AQ[ CandAQ[SampledCase] ];
LeftQ = common.Q[ CandQ[SampledCase] ];
@@ -1034,8 +1028,11 @@ Create1QuarkAntiQuarkString( G4VSplitableHadron* projectile,
common.Pprojectile.setPz( 0.0 );
common.Pprojectile.setE( common.SqrtS );
G4LorentzVector Pquark = G4LorentzVector( 0.0, 0.0, common.SqrtS/2.0, common.SqrtS/2.0 );
G4LorentzVector Paquark = G4LorentzVector( 0.0, 0.0, -common.SqrtS/2.0, common.SqrtS/2.0 );
common.Pprojectile.transform( common.toLab );
G4LorentzVector Pquark = G4LorentzVector( 0.0, 0.0, -common.SqrtS/2.0, common.SqrtS/2.0 );
G4LorentzVector Paquark = G4LorentzVector( 0.0, 0.0, +common.SqrtS/2.0, common.SqrtS/2.0 );
if ( common.RotateStrings ) {
Pquark *= common.RandomRotation; Paquark *= common.RandomRotation;
}