Import Geant4 11.1.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2022-07-01 10:44:02 +02:00
parent b3bf75a2a1
commit c07cea1fe0
2172 changed files with 183300 additions and 123938 deletions
@@ -1,18 +1,33 @@
-------------------------------------------------------------------
# Category hadr-string-diff History
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
History file for hadronic/models/parton_string/diffraction directory
-------------------------------------------------------------
## 2021-06-09 Laurie Nevay (hadr-string-diff-V11-00-02)
- Allow control of diffraction for baryon number greater than 10
in G4FPFParameters. The option comes from G4HadronicParameters and
the default behaviour remains the same (off).
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
## 2022-06-07 Alberto Ribon (hadr-string-diff-V11-00-01)
Fixes made by Vladimir Uzhinsky to get isotropic distributions in
annihilations at rest:
- G4DiffractiveSplitableHadron : set proper parton index.
- G4DiffractiveExcitation : in the CreateStrings method, take into account
that strings are created in G4FTFAnnihilation; by default, the method
CreateStrings creates a string from a wounded nucleon/hadron, but this
is not needed in the case of annihilation.
- G4FTFAnnihilation : splitting of hadron is removed; fixed bugs in the
calculations of kinematical properties; set quark momenta at string ends
to properly account for string order on rapidity.
## 2021-12-10 Ben Morgan (hadr-string-diff-V11-00-00)
- Change to new Markdown History format
---
# History entries prior to 11.0
10-Nov-2021 A. Ribon (hadr-string-diff-V10-07-04)
- G4FTFModel, G4FTFParticipants : Vladimir Uzhinsky interface extension
@@ -463,6 +463,8 @@ class G4FTFParameters {
G4double Pt2ofNuclearDestruction; // Pt2
G4double MaxPt2ofNuclearDestruction; // Max Pt2
G4bool EnableDiffDissociationForBGreater10; ///< Control over whether to do nucleon-hadron diffractive dissociation or not.
private:
G4LundStringFragmentation* StringMass;
G4double GetMinMass( const G4ParticleDefinition* aParticle );
@@ -71,7 +71,7 @@
//============================================================================
//#define debugFTFexictation
//#define debugFTFexcitation
//#define debug_heavyHadrons
//============================================================================
@@ -91,7 +91,7 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
G4FTFParameters* theParameters,
G4ElasticHNScattering* theElastic ) const {
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << G4endl << "FTF ExciteParticipants --------------" << G4endl;
#endif
@@ -159,7 +159,7 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
common.TargetNonDiffStateMinMass += 140.0*MeV;
}
};
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Proj Targ PDGcodes " << common.ProjectilePDGcode << " " << common.TargetPDGcode << G4endl
<< "Mprojectile Y " << common.Pprojectile.mag() << " " << ProjectileRapidity << G4endl // Uzhi Aug.2019
<< "M0projectile Y " << common.M0projectile << " " << ProjectileRapidity << G4endl;
@@ -179,7 +179,7 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
common.Ptarget.transform( common.toCms );
G4double SumMasses = common.M0projectile + common.M0target; // + 220.0*MeV;
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "SqrtS " << common.SqrtS << G4endl << "M0pr M0tr SumM " << common.M0projectile
<< " " << common.M0target << " " << SumMasses << G4endl;
#endif
@@ -188,7 +188,7 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
common.PZcms2 = ( sqr( common.S ) + sqr( common.M0projectile2 ) + sqr( common.M0target2 )
- 2.0 * ( common.S * ( common.M0projectile2 + common.M0target2 )
+ common.M0projectile2 * common.M0target2 ) ) / 4.0 / common.S;
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "PZcms2 after toBePutOnMassShell " << common.PZcms2 << G4endl;
#endif
if ( common.PZcms2 < 0.0 ) return false; // It can be in an interaction with off-shell nuclear nucleon
@@ -211,7 +211,7 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
+ common.Ptarget.y() * common.Ptarget.y()
+ common.PZcms2 ) );
}
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Start --------------------" << G4endl << "Proj M0 Mdif Mndif " << common.M0projectile
<< " " << common.ProjectileDiffStateMinMass << " " << common.ProjectileNonDiffStateMinMass
<< G4endl
@@ -231,7 +231,7 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
common.ProbTargetDiffraction =
theParameters->GetProcProb( 3, ProjectileRapidity - TargetRapidity );
common.ProbOfDiffraction = common.ProbProjectileDiffraction + common.ProbTargetDiffraction;
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Proc Probs " << QeNoExc << " " << QeExc << " "
<< common.ProbProjectileDiffraction << " " << common.ProbTargetDiffraction << G4endl
<< "ProjectileRapidity " << ProjectileRapidity << G4endl;
@@ -247,7 +247,7 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
common.ProbProjectileDiffraction /= ( 1.0 - QeExc - QeNoExc );
common.ProbTargetDiffraction /= ( 1.0 - QeExc - QeNoExc );
}
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Proc Probs " << QeNoExc << " " << QeExc << " "
<< common.ProbProjectileDiffraction << " " << common.ProbTargetDiffraction << G4endl
<< "ProjectileRapidity " << ProjectileRapidity << G4endl;
@@ -266,7 +266,7 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
} else if ( returnCode == 1 ) {
common.ProbOfDiffraction = common.ProbProjectileDiffraction + common.ProbTargetDiffraction;
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Excitation --------------------" << G4endl
<< "Proj M0 MdMin MndMin " << common.M0projectile << " "
<< common.ProjectileDiffStateMinMass << " " << common.ProjectileNonDiffStateMinMass
@@ -282,7 +282,7 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
} else {
common.ProbProjectileDiffraction = 0.0;
}
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Prob: ProjDiff TargDiff + Sum " << common.ProbProjectileDiffraction << " "
<< common.ProbTargetDiffraction << " " << common.ProbOfDiffraction << G4endl;
#endif
@@ -306,7 +306,7 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
// Transform back and update SplitableHadron Participant.
common.Pprojectile.transform( common.toLab );
common.Ptarget.transform( common.toLab );
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Mproj " << common.Pprojectile.mag() << G4endl << "Mtarg " << common.Ptarget.mag()
<< G4endl;
#endif
@@ -340,7 +340,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
G4ParticleDefinition* TestParticle = 0;
G4double MtestPr = 0.0, MtestTr = 0.0;
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Q exchange --------------------------" << G4endl;
#endif
@@ -364,7 +364,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
// Target unpacking
G4int TargQ1 = 0, TargQ2 = 0, TargQ3 = 0;
UnpackBaryon( common.TargetPDGcode, TargQ1, TargQ2, TargQ3 );
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Proj Quarks " << ProjQ1 << " " << ProjQ2 << " " << ProjQ3 << G4endl
<< "Targ Quarks " << TargQ1 << " " << TargQ2 << " " << TargQ3 << G4endl;
#endif
@@ -404,7 +404,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
isProjQ1Quark ? ProjQ1 = TargExchangeQ : ProjQ2 = TargExchangeQ;
}
}
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Exchanged Qs in Pr Tr " << ProjExchangeQ << " " << TargExchangeQ << G4endl;
#endif
@@ -442,7 +442,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
NewProjCode = aProjQ2*100 + aProjQ1*10 + 1;
}
}
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "NewProjCode " << NewProjCode << G4endl;
#endif
// Decide (with 50% probability) whether the projectile hadrons is excited,
@@ -486,7 +486,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
if ( Qquarks < 0 || ( Qquarks == 0 && aProjQ1 != aProjQ2 && aProjQ1%2 == 0 ) ) {
NewProjCode *= -1;
}
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "NewProjCode +2 or 0 " << NewProjCode << G4endl;
G4cout<<"+++++++++++++++++++++++++++++++++++++++"<<G4endl;
G4cout<<ProjQ1<<" "<<ProjQ2<<" "<<Qquarks<<G4endl;
@@ -500,7 +500,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
if ( common.SqrtS - common.M0target < common.MminProjectile ) continue;
MtestPr = common.BrW.SampleMass( TestParticle, TestParticle->GetPDGMass()
+ 5.0*TestParticle->GetPDGWidth() );
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "TestParticle Name " << NewProjCode << " " << TestParticle->GetParticleName()
<< G4endl
<< "MtestPart MtestPart0 "<<MtestPr<<" "<<TestParticle->GetPDGMass()<<G4endl
@@ -510,7 +510,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
// Targ
NewTargCode = NewNucleonId( TargQ1, TargQ2, TargQ3 );
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "New TrQ " << TargQ1 << " " << TargQ2 << " " << TargQ3 << G4endl
<< "NewTargCode " << NewTargCode << G4endl;
#endif
@@ -572,7 +572,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
TestParticle = G4ParticleTable::GetParticleTable()->FindParticle( NewTargCode );
if ( ! TestParticle ) continue;
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "New targ " << NewTargCode << " " << TestParticle->GetParticleName() << G4endl;
#endif
common.MminTarget = common.BrW.GetMinimumMass( TestParticle );
@@ -587,7 +587,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
if ( MtestPr >= common.Pprojectile.mag() || projectile->GetStatus() != 0 ) {
common.M0projectile = MtestPr;
}
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "M0projectile After check " << common.M0projectile << G4endl;
#endif
common.M0projectile2 = common.M0projectile * common.M0projectile;
@@ -597,7 +597,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
common.M0target = MtestTr;
}
common.M0target2 = common.M0target * common.M0target;
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "New targ M0 M0^2 " << common.M0target << " " << common.M0target2 << G4endl;
#endif
common.TargetDiffStateMinMass = common.M0target + 220.0*MeV; // 220 MeV=m_pi+80 MeV;
@@ -631,7 +631,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
} else {
exchangedQ = thirdQ;
}
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Exchange Qs isProjectile Q " << isProjectileExchangedQ << " " << exchangedQ << " ";
#endif
// The exchanged quarks (one of the projectile hadron and one of the target hadron)
@@ -670,7 +670,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
TargQ1 = firstQ; TargQ2 = secondQ; TargQ3 = thirdQ;
ProjQ1 = otherFirstQ; ProjQ2 = otherSecondQ; ProjQ3 = otherThirdQ;
}
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Exchange Qs Pr Tr " << ( isProjectileExchangedQ ? exchangedQ : otherExchangedQ )
<< " " << ( isProjectileExchangedQ ? otherExchangedQ : exchangedQ ) << G4endl;
#endif
@@ -718,7 +718,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
NewTargCode = newHadCode;
}
}
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "NewProjCode NewTargCode " << NewProjCode << " " << NewTargCode << G4endl;
#endif
@@ -859,7 +859,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
common.PZcms2 = ( sqr( common.S ) + sqr( common.M0projectile2 ) + sqr( common.M0target2 )
- 2.0 * ( common.S * ( common.M0projectile2 + common.M0target2 )
+ common.M0projectile2 * common.M0target2 ) ) / 4.0 / common.S;
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "At the end// NewProjCode " << NewProjCode << G4endl
<< "At the end// NewTargCode " << NewTargCode << G4endl
<< "M0pr M0tr SqS " << common.M0projectile << " " << common.M0target << " "
@@ -877,7 +877,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
common.Pprojectile.setE( std::sqrt( common.M0projectile2 + common.PZcms2 ) );
common.Ptarget.setPz( -common.PZcms );
common.Ptarget.setE( std::sqrt( common.M0target2 + common.PZcms2 ) );
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Proj Targ and Proj+Targ in CMS" << G4endl << common.Pprojectile << G4endl
<< common.Ptarget << G4endl << common.Pprojectile + common.Ptarget << G4endl;
#endif
@@ -891,7 +891,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
common.ProbOfDiffraction == 0.0 ) common.ProbExc = 0.0;
if ( G4UniformRand() > common.ProbExc ) { // Make elastic scattering
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Make elastic scattering of new hadrons" << G4endl;
#endif
common.Pprojectile.transform( common.toLab );
@@ -899,7 +899,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
projectile->Set4Momentum( common.Pprojectile );
target->Set4Momentum( common.Ptarget );
G4bool Result = theElastic->ElasticScattering( projectile, target, theParameters );
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Result of el. scatt " << Result << G4endl << "Proj Targ and Proj+Targ in Lab"
<< G4endl << projectile->Get4Momentum() << G4endl << target->Get4Momentum() << G4endl
<< projectile->Get4Momentum() + target->Get4Momentum() << " "
@@ -909,7 +909,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
return returnCode;
}
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Make excitation of new hadrons" << G4endl;
#endif
@@ -935,7 +935,7 @@ ExciteParticipants_doDiffraction( G4VSplitableHadron* projectile, G4VSplitableHa
G4bool isProjectileDiffraction = false;
if ( G4UniformRand() < common.ProbProjectileDiffraction ) { // projectile diffraction
isProjectileDiffraction = true;
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "projectile diffraction" << G4endl;
#endif
common.ProjMassT2 = common.ProjectileDiffStateMinMass2;
@@ -943,7 +943,7 @@ ExciteParticipants_doDiffraction( G4VSplitableHadron* projectile, G4VSplitableHa
common.TargMassT2 = common.M0target2;
common.TargMassT = common.M0target;
} else { // target diffraction
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Target diffraction" << G4endl;
#endif
common.ProjMassT2 = common.M0projectile2;
@@ -1041,7 +1041,7 @@ ExciteParticipants_doNonDiffraction( G4VSplitableHadron* projectile,
// Third of the three utility methods used only by ExciteParticipants:
// it does the sampling for the non-diffraction case.
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout << "Non-diffraction process" << G4endl;
#endif
@@ -1114,7 +1114,7 @@ ExciteParticipants_doNonDiffraction( G4VSplitableHadron* projectile,
common.Qplus = -( common.TPlusNew - common.Ptarget.plus() );
common.Qmomentum.setPz( (common.Qplus - common.Qminus)/2.0 );
common.Qmomentum.setE( (common.Qplus + common.Qminus)/2.0 );
#ifdef debugFTFexictation
#ifdef debugFTFexcitation
G4cout <<"Sampled: Mpr, MdifPr, Mtr, MdifTr "<<G4endl
<< ( common.Pprojectile + common.Qmomentum ).mag() << " "
<< common.ProjectileNonDiffStateMinMass << G4endl
@@ -1145,17 +1145,18 @@ void G4DiffractiveExcitation::CreateStrings( G4VSplitableHadron* hadron,
// << "Defin " << hadron->GetDefinition() << G4endl
// << "Defin " << hadron->GetDefinition()->GetPDGEncoding() << G4endl;
hadron->SplitUp();
G4bool HadronIsString = hadron->IsSplit();
if( ! HadronIsString ) hadron->SplitUp();
G4Parton* start = hadron->GetNextParton();
if ( start == NULL ) {
if ( start == nullptr ) {
G4cout << " G4FTFModel::String() Error: No start parton found" << G4endl;
FirstString = 0; SecondString = 0;
return;
}
G4Parton* end = hadron->GetNextParton();
if ( end == NULL ) {
if ( end == nullptr ) {
G4cout << " G4FTFModel::String() Error: No end parton found" << G4endl;
FirstString = 0; SecondString = 0;
return;
@@ -1165,6 +1166,18 @@ void G4DiffractiveExcitation::CreateStrings( G4VSplitableHadron* hadron,
// << G4endl
// << "Create string " << start->GetPDGcode() << " " << end->GetPDGcode() << G4endl;
if ( HadronIsString ) {
if ( isProjectile ) {
FirstString = new G4ExcitedString( end, start, +1 );
} else {
FirstString = new G4ExcitedString( end, start, -1 );
}
FirstString->SetTimeOfCreation( hadron->GetTimeOfCreation() );
FirstString->SetPosition( hadron->GetPosition() );
SecondString = 0;
return;
}
G4LorentzVector Phadron = hadron->Get4Momentum();
//G4cout << "String mom " << Phadron << G4endl;
G4LorentzVector Pstart( 0.0, 0.0, 0.0, 0.0 );
@@ -58,8 +58,9 @@ G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron()
G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron( const G4ReactionProduct& aPrimary ) :
G4VSplitableHadron( aPrimary )
{
PartonIndex = -2;
Parton[0] = NULL;
PartonIndex = -1;
Parton[0] = nullptr;
Parton[1] = nullptr;
}
@@ -68,8 +69,9 @@ G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron( const G4ReactionProd
G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron( const G4Nucleon& aNucleon ) :
G4VSplitableHadron( aNucleon )
{
PartonIndex = -2;
Parton[0] = NULL;
PartonIndex = -1;
Parton[0] = nullptr;
Parton[1] = nullptr;
}
@@ -78,8 +80,9 @@ G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron( const G4Nucleon& aNu
G4DiffractiveSplitableHadron::G4DiffractiveSplitableHadron( const G4VKineticNucleon* aNucleon ) :
G4VSplitableHadron( aNucleon )
{
PartonIndex = -2;
Parton[0] = NULL;
PartonIndex = -1;
Parton[0] = nullptr;
Parton[1] = nullptr;
}
@@ -95,7 +98,7 @@ void G4DiffractiveSplitableHadron::SplitUp() {
if ( IsSplit() ) return;
Splitting();
// Split once only...
if ( Parton[0] != NULL ) return;
if ( Parton[0] != nullptr ) return;
// flavours of quark ends
G4int PDGcode = GetDefinition()->GetPDGEncoding();
@@ -126,7 +129,7 @@ void G4DiffractiveSplitableHadron::SplitUp() {
G4Parton* G4DiffractiveSplitableHadron::GetNextParton() {
++PartonIndex;
if ( PartonIndex > 1 || PartonIndex < 0 ) return NULL;
if ( PartonIndex > 1 || PartonIndex < 0 ) return nullptr;
G4int PartonInd( PartonIndex );
if ( PartonIndex == 1 ) PartonIndex = -1;
return Parton[ PartonInd ];
@@ -137,7 +140,7 @@ G4Parton* G4DiffractiveSplitableHadron::GetNextParton() {
G4Parton* G4DiffractiveSplitableHadron::GetNextAntiParton() {
++PartonIndex;
if ( PartonIndex > 1 || PartonIndex < 0 ) return NULL;
if ( PartonIndex > 1 || PartonIndex < 0 ) return nullptr;
G4int PartonInd( PartonIndex );
if ( PartonIndex == 1 ) PartonIndex = -1;
return Parton[ PartonInd ];
@@ -135,7 +135,7 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
common.RotateStrings = true;
common.RandomRotation.rotateZ( 2.0*pi*G4UniformRand() );
common.RandomRotation.rotateY( std::acos( 2.0*G4UniformRand() - 1.0 ) );
common.RandomRotation.rotateZ( 2.0*pi*G4UniformRand() ); //AR-Jun2018
common.RandomRotation.rotateZ( 2.0*pi*G4UniformRand() );
}
G4double MesonProdThreshold = projectile->GetDefinition()->GetPDGMass() +
@@ -232,6 +232,7 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
G4cout << "Unknown anti-baryon for FTF annihilation: PDGcodes - "
<< ProjectilePDGcode << " " << TargetPDGcode << G4endl;
}
#ifdef debugFTFannih
G4cout << "Annih Actual X a b c d " << X_a << " " << X_b << " " << X_c << " " << X_d << G4endl;
#endif
@@ -276,6 +277,7 @@ G4bool G4FTFAnnihilation::Annihilate( G4VSplitableHadron* projectile,
return true;
}
//-----------------------------------------------------------------------
G4bool G4FTFAnnihilation::
@@ -313,13 +315,11 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
for ( G4int iString = 0; iString < 3; ++iString ) { // Loop over the 3 string cases
if ( iString == 0 ) {
antiQuark = common.AQ[0]; quark = common.Q[0];
projectile->SplitUp();
projectile->SetFirstParton( antiQuark );
projectile->SetSecondParton( quark );
projectile->SetStatus( 0 );
} else if ( iString == 1 ) {
quark = common.Q[1]; antiQuark = common.AQ[1];
target->SplitUp();
target->SetFirstParton( quark );
target->SetSecondParton( antiQuark );
target->SetStatus( 0 );
@@ -363,7 +363,6 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
theParameters->SetTarMinNonDiffMass( 0.5 );
} else { // iString == 2
AdditionalString->SetDefinition( TestParticle );
AdditionalString->SplitUp();
AdditionalString->SetFirstParton( common.AQ[2] );
AdditionalString->SetSecondParton( common.Q[2] );
AdditionalString->SetStatus( 0 );
@@ -406,16 +405,12 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
// Sampling X's of anti-baryon and baryon
G4double WminusTarget = 0.0, WplusProjectile = 0.0;
G4double Alfa_R = 0.5; ScaleFactor = 1.0;
G4double Alfa_R = 0.5;
G4bool Success = true;
NumberOfTries = 0; loopCounter = 0;
do {
Success = true;
++NumberOfTries;
if ( NumberOfTries == 100*(NumberOfTries/100) ) {
// At large number of tries it would be better to reduce the values of Pt's
ScaleFactor /= 2.0;
}
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;
@@ -432,7 +427,7 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
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 = ( ScaleFactor * ModMom2[index+i] + MassQ2 ) / Quark_Mom[index+i].getZ();
G4double val = ( ModMom2[index+i] + MassQ2 ) / Quark_Mom[index+i].getZ();
if ( iCase == 0 ) { // anti-baryon
Alfa += val;
} else { // baryon (iCase == 1)
@@ -458,7 +453,7 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
return false;
}
G4double SqrtScaleF = std::sqrt( ScaleFactor );
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
@@ -475,12 +470,12 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
}
}
G4LorentzVector Pstring1, Pstring2, Pstring3;
G4int QuarkOrder[3] = { 0 };
G4double YstringMax = 0.0, YstringMin = 0.0;
for ( G4int i = 0; i < 3; ++i ) {
G4ThreeVector tmp = Quark_Mom[i] + Quark_Mom[i+3];
G4LorentzVector Pstring( tmp, std::sqrt( Quark_Mom[i].mag2() + MassQ2 ) +
std::sqrt( Quark_Mom[i+3].mag2() + MassQ2 ) );
//AR-Jun2018 if ( common.RotateStrings ) Pstring *= common.RandomRotation;
// Add protection for rapidity = 0.5*ln( (E+Pz)/(E-Pz) )
G4double Ystring = 0.0;
if ( Pstring.e() > 1.0e-30 ) {
@@ -495,41 +490,58 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
}
// Keep ordering in rapidity: "1" highest, "2" middle, "3" smallest
if ( i == 0 ) {
Pstring1 = Pstring; YstringMax = Ystring;
Pstring1 = Pstring; YstringMax = Ystring;
QuarkOrder[0] = 0;
} else if ( i == 1 ) {
if ( Ystring > YstringMax ) {
Pstring2 = Pstring1; YstringMin = YstringMax;
Pstring1 = Pstring; YstringMax = Ystring;
Pstring2 = Pstring1; YstringMin = YstringMax;
Pstring1 = Pstring; YstringMax = Ystring;
QuarkOrder[0] = 1; QuarkOrder[1] = 0;
} else {
Pstring2 = Pstring; YstringMin = Ystring;
Pstring2 = Pstring; YstringMin = Ystring;
QuarkOrder[1] = 1;
}
} else { // i == 2
if ( Ystring > YstringMax ) {
Pstring3 = Pstring2;
Pstring2 = Pstring1;
Pstring1 = Pstring;
QuarkOrder[1] = QuarkOrder[0];
QuarkOrder[2] = QuarkOrder[1];
QuarkOrder[0] = 2;
} else if ( Ystring > YstringMin ) {
Pstring3 = Pstring2;
Pstring2 = Pstring;
} else {
Pstring3 = Pstring;
Pstring3 = Pstring;
QuarkOrder[2] = 2;
}
}
}
G4LorentzVector Quark_4Mom[6];
for ( G4int i = 0; i < 6; ++i ) {
Quark_4Mom[i] = G4LorentzVector( Quark_Mom[i], std::sqrt( Quark_Mom[i].mag2() + MassQ2 ) );
if ( common.RotateStrings ) Quark_4Mom[i] *= common.RandomRotation;
Quark_4Mom[i].transform( common.toLab );
}
projectile->Splitting();
projectile->GetNextAntiParton()->Set4Momentum( Quark_4Mom[QuarkOrder[0]] );
projectile->GetNextParton()->Set4Momentum( Quark_4Mom[QuarkOrder[0]+3] );
target->Splitting();
target->GetNextParton()->Set4Momentum( Quark_4Mom[QuarkOrder[2]] );
target->GetNextAntiParton()->Set4Momentum( Quark_4Mom[QuarkOrder[2]+3] );
AdditionalString->Splitting();
AdditionalString->GetNextAntiParton()->Set4Momentum( Quark_4Mom[QuarkOrder[1]] );
AdditionalString->GetNextParton()->Set4Momentum( Quark_4Mom[QuarkOrder[1]+3] );
common.Pprojectile = Pstring1; // Highest rapidity
common.Ptarget = Pstring3; // Lowest rapidity
G4LorentzVector LeftString( Pstring2 ); // Middle rapidity
if ( common.RotateStrings ) { //AR-Jun2018
common.Pprojectile *= common.RandomRotation;
LeftString *= common.RandomRotation;
common.Ptarget *= common.RandomRotation;
}
common.Pprojectile.transform( common.toLab );
LeftString.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() );
@@ -540,6 +552,7 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
projectile->Set4Momentum( common.Pprojectile );
AdditionalString->Set4Momentum( LeftString );
target->Set4Momentum( common.Ptarget );
projectile->IncrementCollisionCount( 1 );
AdditionalString->IncrementCollisionCount( 1 );
target->IncrementCollisionCount( 1 );
@@ -547,6 +560,7 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
return true;
}
//-----------------------------------------------------------------------
G4int G4FTFAnnihilation::
@@ -605,19 +619,25 @@ Create1DiquarkAntiDiquarkString( G4VSplitableHadron* projectile,
}
// Set the string properties
projectile->SplitUp();
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 );
if ( common.RotateStrings ) {
G4LorentzVector Pquark = G4LorentzVector( 0.0, 0.0, common.SqrtS/2.0, common.SqrtS/2.0 );
Pquark *= common.RandomRotation;
G4LorentzVector Paquark = G4LorentzVector( 0.0, 0.0, -common.SqrtS/2.0, common.SqrtS/2.0 );
Paquark *= common.RandomRotation;
Pquark.transform( common.toLab ); projectile->GetNextParton()->Set4Momentum( Pquark );
Paquark.transform( common.toLab ); projectile->GetNextAntiParton()->Set4Momentum( Paquark );
}
Pquark.transform( common.toLab );
Paquark.transform( common.toLab );
projectile->GetNextParton()->Set4Momentum( Pquark );
projectile->GetNextAntiParton()->Set4Momentum( Paquark );
projectile->Splitting();
projectile->SetStatus( 0 );
target->SetStatus( 4 ); // The target nucleon has annihilated 3->4
common.Pprojectile.setPx( 0.0 );
@@ -631,6 +651,7 @@ Create1DiquarkAntiDiquarkString( G4VSplitableHadron* projectile,
projectile->SetTimeOfCreation( target->GetTimeOfCreation() );
projectile->SetPosition( target->GetPosition() );
projectile->Set4Momentum( common.Pprojectile );
projectile->IncrementCollisionCount( 1 );
target->IncrementCollisionCount( 1 );
@@ -640,6 +661,7 @@ Create1DiquarkAntiDiquarkString( G4VSplitableHadron* projectile,
return 1; // Successfully ended, but the work is not over
}
//-----------------------------------------------------------------------
G4int G4FTFAnnihilation::
@@ -697,13 +719,11 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
for ( G4int iString = 0; iString < 2; ++iString ) { // Loop over the 2 string cases
if ( iString == 0 ) {
antiQuark = LeftAQ1; quark = LeftQ1;
projectile->SplitUp();
projectile->SetFirstParton( antiQuark );
projectile->SetSecondParton( quark );
projectile->SetStatus( 0 );
} else { // iString == 1
quark = LeftQ2; antiQuark = LeftAQ2;
target->SplitUp();
target->SetFirstParton( quark );
target->SetSecondParton( antiQuark );
target->SetStatus( 0 );
@@ -784,10 +804,6 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
do {
Success = true;
++NumberOfTries;
if ( NumberOfTries == 100*(NumberOfTries/100) ) {
// At large number of tries it would be better to reduce the values of Pt's
ScaleFactor /= 2.0;
}
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();
@@ -804,7 +820,7 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
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 = ( ScaleFactor * ModMom2[index+i] + MassQ2 ) / Quark_Mom[index+i].getZ();
G4double val = ( ModMom2[index+i] + MassQ2 ) / Quark_Mom[index+i].getZ();
if ( iCase == 0 ) { // first string
Alfa += val;
} else { // second string
@@ -830,9 +846,7 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
return 99; // unsuccessfully ended, nothing else can be done
}
G4double SqrtScaleF = std::sqrt( ScaleFactor );
G4LorentzVector Pstring1, Pstring2;
G4double Ystring1 = 0.0, Ystring2 = 0.0;
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 ) {
@@ -848,11 +862,15 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
}
}
}
G4int QuarkOrder[2];
G4LorentzVector Pstring1, Pstring2;
G4double Ystring1 = 0.0, Ystring2 = 0.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // Loop over the two strings
G4ThreeVector tmp = Quark_Mom[iCase] + Quark_Mom[iCase+2];
G4LorentzVector Pstring( tmp, std::sqrt( Quark_Mom[iCase].mag2() + MassQ2 ) +
std::sqrt( Quark_Mom[iCase+2].mag2() + MassQ2 ) );
//AR-Jun2018 if ( common.RotateStrings ) Pstring *= common.RandomRotation;
// Add protection for rapidity = 0.5*ln( (E+Pz)/(E-Pz) )
G4double Ystring = 0.0;
if ( Pstring.e() > 1.0e-30 ) {
@@ -873,11 +891,28 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
}
if ( Ystring1 > Ystring2 ) {
common.Pprojectile = Pstring1; common.Ptarget = Pstring2;
QuarkOrder[0] = 0; QuarkOrder[1] = 1;
} else {
common.Pprojectile = Pstring2; common.Ptarget = Pstring1;
QuarkOrder[0] = 1; QuarkOrder[1] = 0;
}
if ( common.RotateStrings ) { //AR-Jun2018
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 ) );
if ( common.RotateStrings ) Quark_4Mom[i] *= common.RandomRotation;
Quark_4Mom[i].transform( common.toLab );
}
projectile->Splitting();
projectile->GetNextAntiParton()->Set4Momentum( Quark_4Mom[QuarkOrder[0]] );
projectile->GetNextParton()->Set4Momentum( Quark_4Mom[QuarkOrder[0]+2] );
target->Splitting();
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;
}
@@ -891,6 +926,7 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
projectile->SetPosition( target->GetPosition() );
projectile->Set4Momentum( common.Pprojectile );
target->Set4Momentum( common.Ptarget );
projectile->IncrementCollisionCount( 1 );
target->IncrementCollisionCount( 1 );
@@ -900,6 +936,7 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
return 1; // Successfully ended, but the work is not over
}
//-----------------------------------------------------------------------
G4bool G4FTFAnnihilation::
@@ -954,7 +991,6 @@ Create1QuarkAntiQuarkString( G4VSplitableHadron* projectile,
LeftQ = common.Q[ CandQ[SampledCase] ];
// Set the string properties
projectile->SplitUp();
projectile->SetFirstParton( LeftQ );
projectile->SetSecondParton( LeftAQ );
projectile->SetStatus( 0 );
@@ -997,7 +1033,6 @@ Create1QuarkAntiQuarkString( G4VSplitableHadron* projectile,
common.Pprojectile.setPy( 0.0 );
common.Pprojectile.setPz( 0.0 );
common.Pprojectile.setE( common.SqrtS );
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 );
@@ -1007,11 +1042,14 @@ Create1QuarkAntiQuarkString( G4VSplitableHadron* projectile,
Pquark.transform(common.toLab); projectile->GetNextParton()->Set4Momentum(Pquark);
Paquark.transform(common.toLab); projectile->GetNextAntiParton()->Set4Momentum(Paquark);
projectile->Splitting();
// Calculation of the creation time
// Creation time and position of target nucleon were determined in ReggeonCascade() of G4FTFModel
projectile->SetTimeOfCreation( target->GetTimeOfCreation() );
projectile->SetPosition( target->GetPosition() );
projectile->Set4Momentum( common.Pprojectile );
projectile->IncrementCollisionCount( 1 );
target->IncrementCollisionCount( 1 );
@@ -1092,4 +1130,3 @@ G4bool G4FTFAnnihilation::operator!=( const G4FTFAnnihilation& ) const {
throw G4HadronicException( __FILE__, __LINE__,
"G4DiffractiveExcitation != operator not meant to be called" );
}
@@ -52,6 +52,7 @@
#include "G4Pow.hh"
#include "G4HadronicDeveloperParameters.hh"
#include "G4HadronicParameters.hh"
//============================================================================
@@ -69,6 +70,8 @@ G4FTFParameters::G4FTFParameters()
csGGinstance = new G4ComponentGGHadronNucleusXsc();
}
EnableDiffDissociationForBGreater10 = G4HadronicParameters::Instance()->EnableDiffDissociationForBGreater10();
// Set parameters of a string kink
SetPt2Kink( 0.0*GeV*GeV ); // To switch off kinky strings (bad results obtained with 6.0*GeV*GeV)
G4double Puubar( 1.0/3.0 ), Pddbar( 1.0/3.0 ), Pssbar( 1.0/3.0 ); // SU(3) symmetry
@@ -427,7 +430,7 @@ void G4FTFParameters::InitForInteraction( const G4ParticleDefinition* particle,
SetParams( 4, 0.0, 0.0 ,0.0, 0.0 , 0.0, 0.0 , 0.0);
}
if ( AbsProjectileBaryonNumber > 10 || NumberOfTargetNucleons > 10 ) {
if ( (AbsProjectileBaryonNumber > 10 || NumberOfTargetNucleons > 10) && !EnableDiffDissociationForBGreater10 ) {
//
// It is not decided what to do with diffraction dissociation in Had-Nucl and Nucl-Nucl interactions
// For the moment both ProjDiffDisso & TgtDiffDisso for A > 10 are set to false,