Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
@@ -55,9 +55,7 @@
#include "G4FTFParameters.hh"
#include "G4ElasticHNScattering.hh"
#include "G4LorentzRotation.hh"
#include "G4RotationMatrix.hh"
#include "G4ThreeVector.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4SampleResonance.hh"
@@ -104,14 +102,14 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
if ( common.Pprojectile.z() < 0.0 ) return false;
common.ProjectilePDGcode = projectile->GetDefinition()->GetPDGEncoding();
common.absProjectilePDGcode = std::abs( common.ProjectilePDGcode );
common.M0projectile = common.Pprojectile.mag();
common.M0projectile = projectile->GetDefinition()->GetPDGMass(); //Uzhi Aug.2019 common.Pprojectile.mag();
G4double ProjectileRapidity = common.Pprojectile.rapidity();
// Target parameters
common.Ptarget = target->Get4Momentum();
common.TargetPDGcode = target->GetDefinition()->GetPDGEncoding();
common.absTargetPDGcode = std::abs( common.TargetPDGcode );
common.M0target = common.Ptarget.mag();
common.M0target = target->GetDefinition()->GetPDGMass(); //Uzhi Aug.2019 common.Ptarget.mag();
G4double TargetRapidity = common.Ptarget.rapidity();
// Kinematical properties of the interactions
@@ -120,38 +118,42 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
common.SqrtS = std::sqrt( common.S );
// Check off-shellness of the participants
G4bool toBePutOnMassShell = false;
G4bool toBePutOnMassShell = true; //Uzhi Aug.2019 false;
common.MminProjectile = common.BrW.GetMinimumMass( projectile->GetDefinition() );
/* Uzhi Aug.2019
if ( common.M0projectile < common.MminProjectile ) {
toBePutOnMassShell = true;
common.M0projectile = common.BrW.SampleMass( projectile->GetDefinition(),
projectile->GetDefinition()->GetPDGMass()
+ 5.0*projectile->GetDefinition()->GetPDGWidth() );
}
*/
common.M0projectile2 = common.M0projectile * common.M0projectile;
common.ProjectileDiffStateMinMass = theParameters->GetProjMinDiffMass();
common.ProjectileNonDiffStateMinMass = theParameters->GetProjMinNonDiffMass();
if ( common.M0projectile > common.ProjectileDiffStateMinMass ) {
common.ProjectileDiffStateMinMass = common.M0projectile + 220.0*MeV;
common.ProjectileNonDiffStateMinMass = common.M0projectile + 220.0*MeV;
common.ProjectileDiffStateMinMass = common.MminProjectile + 220.0*MeV; //Uzhi Aug.2019 common.M0projectile + 220.0*MeV;
common.ProjectileNonDiffStateMinMass = common.MminProjectile + 220.0*MeV; //Uzhi Aug.2019 common.M0projectile + 220.0*MeV;
if ( common.absProjectilePDGcode > 3000 ) { // Strange baryon
common.ProjectileDiffStateMinMass += 140.0*MeV;
common.ProjectileNonDiffStateMinMass += 140.0*MeV;
}
}
common.MminTarget = common.BrW.GetMinimumMass( target->GetDefinition() );
/* Uzhi Aug.2019
if ( common.M0target < common.MminTarget ) {
toBePutOnMassShell = true;
common.M0target = common.BrW.SampleMass( target->GetDefinition(),
target->GetDefinition()->GetPDGMass()
+ 5.0*target->GetDefinition()->GetPDGWidth() );
}
*/
common.M0target2 = common.M0target * common.M0target;
common.TargetDiffStateMinMass = theParameters->GetTarMinDiffMass();
common.TargetNonDiffStateMinMass = theParameters->GetTarMinNonDiffMass();
if ( common.M0target > common.TargetDiffStateMinMass ) {
common.TargetDiffStateMinMass = common.M0target + 220.0*MeV;
common.TargetNonDiffStateMinMass = common.M0target + 220.0*MeV;
common.TargetDiffStateMinMass = common.MminTarget + 220.0*MeV; //Uzhi Aug.2019 common.M0target + 220.0*MeV;
common.TargetNonDiffStateMinMass = common.MminTarget + 220.0*MeV; //Uzhi Aug.2019 common.M0target + 220.0*MeV;
if ( common.absTargetPDGcode > 3000 ) { // Strange baryon
common.TargetDiffStateMinMass += 140.0*MeV;
common.TargetNonDiffStateMinMass += 140.0*MeV;
@@ -159,8 +161,10 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
};
#ifdef debugFTFexictation
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;
//G4cout << "M0target Y " << common.M0target << " " << TargetRapidity << G4endl;
G4cout << "Mtarget Y " << common.Ptarget.mag() << " " << TargetRapidity << G4endl // Uzhi Aug.2019
<< "M0target Y " << common.M0target << " " << TargetRapidity << G4endl;
G4cout << "Pproj " << common.Pprojectile << G4endl << "Ptarget " << common.Ptarget << G4endl;
#endif
@@ -232,6 +236,7 @@ G4bool G4DiffractiveExcitation::ExciteParticipants( G4VSplitableHadron* proje
<< common.ProbProjectileDiffraction << " " << common.ProbTargetDiffraction << G4endl
<< "ProjectileRapidity " << ProjectileRapidity << G4endl;
#endif
if ( QeNoExc + QeExc + common.ProbProjectileDiffraction + common.ProbTargetDiffraction > 1.0 ) {
QeNoExc = 1.0 - QeExc - common.ProbProjectileDiffraction - common.ProbTargetDiffraction;
}
@@ -1031,8 +1036,6 @@ void G4DiffractiveExcitation::CreateStrings( G4VSplitableHadron* hadron,
}
G4double W = hadron->Get4Momentum().mag();
//G4cout << "Wmin W " << Wmin << " " << W << G4endl;
//G4int Uzhi; G4cin >> Uzhi;
G4double W2 = W*W;
G4double Pt( 0.0 ), x1( 0.0 ), x3( 0.0 ); // x2( 0.0 )
G4bool Kink = false;
@@ -1136,12 +1139,6 @@ void G4DiffractiveExcitation::CreateStrings( G4VSplitableHadron* hadron,
} // End of if ( W > Wmin ) : check for a kink
} // end of qq-q string selection
//G4cout << "Kink " << Kink << " " << start->GetDefinition()->GetParticleSubType() << " "
// << end->GetDefinition()->GetParticleSubType() << G4endl;
//G4cout << "Kink " << Kink << " " << start->GetDefinition()->GetPDGEncoding() << " "
// << end->GetDefinition()->GetPDGEncoding() << G4endl;
//G4int Uzhi; G4cin >> Uzhi;
if ( Kink ) { // Kink is possible
//G4cout << "Kink is sampled!" << G4endl;
@@ -1,56 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#include "G4DiffractiveHHScatterer.hh"
#include "G4DiffractiveExcitation.hh"
#include "G4ExcitedString.hh"
#include "G4LundStringFragmentation.hh"
#include "G4KineticTrack.hh"
#include "G4DiffractiveSplitableHadron.hh"
#include "G4FTFParameters.hh"
//============================================================================
G4DiffractiveHHScatterer::G4DiffractiveHHScatterer() :
theExcitation( new G4DiffractiveExcitation() ),
theStringFragmentation( new G4LundStringFragmentation() )
{}
//============================================================================
G4DiffractiveHHScatterer::~G4DiffractiveHHScatterer()
{
delete theExcitation;
delete theStringFragmentation;
}
//============================================================================
void G4DiffractiveHHScatterer::CreateStrings() const {}
@@ -39,6 +39,7 @@
#include "globals.hh"
#include "Randomize.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4ElasticHNScattering.hh"
#include "G4LorentzRotation.hh"
@@ -66,36 +67,19 @@ G4bool G4ElasticHNScattering::ElasticScattering( G4VSplitableHadron* projectile,
projectile->IncrementCollisionCount( 1 );
target->IncrementCollisionCount( 1 );
G4SampleResonance BrW;
if ( projectile->Get4Momentum().z() < 0.0 ) return false; //Uzhi Aug.2019
// 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() ) {
G4double MminProjectile=BrW.GetMinimumMass(projectile->GetDefinition());
if ( M0projectile < MminProjectile ) {
PutOnMassShell = true;
M0projectile = projectile->GetDefinition()->GetPDGMass();
}
G4double M0projectile = Pprojectile.mag();
G4double M0projectile2 = M0projectile * M0projectile;
G4double AveragePt2 = theParameters->GetAvaragePt2ofElasticScattering();
// Target parameters
G4LorentzVector Ptarget = target->Get4Momentum();
G4double M0target = Ptarget.mag();
//if ( M0target < target->GetDefinition()->GetPDGMass() ) {
G4double M0target2 = M0target * M0target;
G4double MminTarget=BrW.GetMinimumMass(target->GetDefinition());
if ( M0target < MminTarget ) {
PutOnMassShell = true;
M0target = target->GetDefinition()->GetPDGMass();
}
G4double M0target2 = M0target * M0target;
G4double AveragePt2 = theParameters->GetAvaragePt2ofElasticScattering();
// Transform momenta to cms and then rotate parallel to z axis;
G4LorentzVector Psum;
@@ -111,7 +95,6 @@ G4bool G4ElasticHNScattering::ElasticScattering( G4VSplitableHadron* projectile,
Pprojectile.transform( toCms );
Ptarget.transform( toCms );
// Putting on mass-on-shell, if needed
G4double PZcms2, PZcms;
G4double S = Psum.mag2();
G4double SqrtS = std::sqrt( S );
@@ -120,36 +103,7 @@ G4bool G4ElasticHNScattering::ElasticScattering( G4VSplitableHadron* projectile,
PZcms2 = ( S*S + sqr( M0projectile2 ) + sqr( M0target2 )
- 2*S*M0projectile2 - 2*S*M0target2 - 2*M0projectile2*M0target2 ) / 4.0 / S;
if ( PZcms2 < 0.0 ) { // It can be in an interaction with off-shell nuclear nucleon
if ( M0projectile > projectile->GetDefinition()->GetPDGMass() ) {
// An attempt to de-excite the projectile
// It is assumed that the target is in the ground state
M0projectile = projectile->GetDefinition()->GetPDGMass();
M0projectile2 = M0projectile * M0projectile;
PZcms2= ( S*S + sqr( M0projectile2 ) + sqr( M0target2 )
- 2*S*M0projectile2 - 2*S*M0target2 - 2*M0projectile2*M0target2 ) / 4.0 / S;
if ( PZcms2 < 0.0 ) { return false; } // Nonsuccesful attempt to de-excitate the projectile
} else {
return false; // The projectile was not excited, but the energy was too low to put
// the target nucleon on mass-shell
}
}
PZcms = std::sqrt( PZcms2 );
if ( PutOnMassShell ) {
if ( Pprojectile.z() > 0.0 ) {
Pprojectile.setPz( PZcms );
Ptarget.setPz( -PZcms );
} else {
Pprojectile.setPz( -PZcms );
Ptarget.setPz( PZcms );
};
Pprojectile.setE( std::sqrt( M0projectile2 + Pprojectile.x() * Pprojectile.x() +
Pprojectile.y() * Pprojectile.y() + PZcms2 ) );
Ptarget.setE( std::sqrt( M0target2 + Ptarget.x() * Ptarget.x() + Ptarget.y() * Ptarget.y() +
PZcms2 ) );
}
PZcms = ( PZcms2 > 0.0 ? std::sqrt( PZcms2 ) : 0.0 );
G4double maxPtSquare = PZcms2;
@@ -214,10 +168,9 @@ G4ThreeVector G4ElasticHNScattering::GaussianPt( G4double AveragePt2,
if ( AveragePt2 <= 0.0 ) {
Pt2 = 0.0;
} else {
Pt2 = -AveragePt2 * G4Log( 1.0 + G4UniformRand() *
( G4Exp( -maxPtSquare/AveragePt2 ) -1.0 ) );
Pt2 = -AveragePt2 * G4Log( 1.0 + G4UniformRand() * ( G4Exp( -maxPtSquare/AveragePt2 ) -1.0 ) );
}
G4double Pt = std::sqrt( Pt2 );
G4double Pt = ( Pt2 > 0.0 ? std::sqrt( Pt2 ) : 0.0 );
G4double phi = G4UniformRand() * twopi;
return G4ThreeVector( Pt * std::cos( phi ), Pt * std::sin( phi ), 0.0 );
}
@@ -852,7 +852,7 @@ G4bool G4FTFModel::ExciteParticipants() {
G4cout << "G4FTFModel::ExciteParticipants() " << G4endl;
#endif
G4bool Successfull( true );
G4bool Success( false ); //Uzhi Aug.2019
G4int MaxNumOfInelCollisions = G4int( theParameters->GetMaxNumberOfCollisions() );
if ( MaxNumOfInelCollisions > 0 ) { // Plab > Pbound, normal application of FTF is possible
G4double ProbMaxNumber = theParameters->GetMaxNumberOfCollisions() - MaxNumOfInelCollisions;
@@ -863,14 +863,14 @@ G4bool G4FTFModel::ExciteParticipants() {
}
#ifdef debugBuildString
G4cout << "MaxNumOfInelCollisions MaxNumOfInelCollisions " << MaxNumOfInelCollisions << G4endl;
G4cout << "MaxNumOfInelCollisions per hadron/nucleon " << MaxNumOfInelCollisions << G4endl;
#endif
G4int CurrentInteraction( 0 );
theParticipants.StartLoop();
while ( theParticipants.Next() ) { /* Loop checking, 10.08.2015, A.Ribon */
G4bool InnerSuccess( true ); //Uzhi Aug.2019
while ( theParticipants.Next() ) { /* Loop checking, 10.08.2015, A.Ribon */
CurrentInteraction++;
const G4InteractionContent& collision = theParticipants.GetInteraction();
G4VSplitableHadron* projectile = collision.GetProjectile();
@@ -901,14 +901,13 @@ G4bool G4FTFModel::ExciteParticipants() {
TargetNucleon, Annihilation );
if ( ! Result ) continue;
}
Successfull = theElastic->ElasticScattering( projectile, target, theParameters )
|| Successfull;
InnerSuccess = theElastic->ElasticScattering( projectile, target, theParameters ); //Uzhi Aug.2019
} else if ( G4UniformRand() > theParameters->GetProbabilityOfAnnihilation() ) {
// Inelastic scattering
#ifdef debugBuildString
G4cout << "Inelastic interaction" << G4endl
<< "MaxNumOfInelCollisions " << MaxNumOfInelCollisions << G4endl;
<< "MaxNumOfInelCollisions per hadron/nucleon " << MaxNumOfInelCollisions << G4endl;
#endif
if ( ! HighEnergyInter ) {
@@ -926,8 +925,8 @@ G4bool G4FTFModel::ExciteParticipants() {
// TargetNucleon, Annihilation );
// if ( ! Result ) continue;
//}
if (theExcitation->ExciteParticipants( projectile, target, theParameters, theElastic )){
if ( theExcitation->ExciteParticipants( projectile, target, theParameters, theElastic ) ) {
InnerSuccess = true; //Uzhi Aug.2019
#ifdef debugBuildString
G4cout << "FTF excitation Successfull " << G4endl;
// G4cout << "After pro " << projectile->Get4Momentum() << " "
@@ -935,31 +934,24 @@ G4bool G4FTFModel::ExciteParticipants() {
// << "After tar " << target->Get4Momentum() << " "
// << target->Get4Momentum().mag() << G4endl;
#endif
} else {
Successfull = theElastic->ElasticScattering( projectile, target, theParameters )
&& Successfull;
InnerSuccess = theElastic->ElasticScattering( projectile, target, theParameters ); //Uzhi Aug.2019
#ifdef debugBuildString
G4cout << "FTF excitation Non Successfull -> Elastic scattering "
<< Successfull << G4endl;
G4cout << "FTF excitation Non InnerSuccess of Elastic scattering "
<< InnerSuccess << G4endl;
#endif
}
} else { // The inelastic interactition was rejected -> elastic scattering
} else { // The inelastic interactition was rejected -> elastic scattering
#ifdef debugBuildString
G4cout << "Elastic scat. at rejection inelastic scattering" << G4endl;
#endif
//if ( ! HighEnergyInter ) {
// G4bool Annihilation = false;
// G4bool Result = AdjustNucleons( projectile, ProjectileNucleon, target,
// TargetNucleon, Annihilation );
// if ( ! Result) continue;
//}
Successfull = theElastic->ElasticScattering( projectile, target, theParameters )
|| Successfull;
InnerSuccess = theElastic->ElasticScattering( projectile, target, theParameters ); //Uzhi Aug.2019
}
} else { // Annihilation
@@ -989,9 +981,8 @@ G4bool G4FTFModel::ExciteParticipants() {
if ( ! Result ) continue;
}
G4VSplitableHadron* AdditionalString = 0;
if ( theAnnihilation->Annihilate( projectile, target, AdditionalString, theParameters ) ){
Successfull = Successfull || true;
if ( theAnnihilation->Annihilate( projectile, target, AdditionalString, theParameters ) ) {
InnerSuccess = true; //Uzhi Aug.2019
#ifdef debugBuildString
G4cout << "Annihilation successfull. " << "*AdditionalString "
<< AdditionalString << G4endl;
@@ -1019,17 +1010,19 @@ G4bool G4FTFModel::ExciteParticipants() {
}
}
if( InnerSuccess ) Success = true; //Uzhi Aug.2019
#ifdef debugBuildString
G4cout << "----------------------------- Final properties " << G4endl
<< "projectile->GetStatus target->GetStatus " << projectile->GetStatus()
<< " " << target->GetStatus() << G4endl << "projectile->GetSoftC target->GetSoftC "
<< projectile->GetSoftCollisionCount() << " " << target->GetSoftCollisionCount()
<< G4endl << "ExciteParticipants() Successfull? " << Successfull << G4endl;
<< G4endl << "ExciteParticipants() Success? " << Success << G4endl;
#endif
} // end of while ( theParticipants.Next() )
return Successfull;
return Success;
}
@@ -1254,7 +1247,7 @@ G4int G4FTFModel::AdjustNucleonsAlgorithm_beforeSampling( G4int interactionCase,
common.PResidualMass = G4ParticleTable::GetParticleTable()->GetIonTable()
->GetIonMass( common.PResidualCharge, common.PResidualMassNumber );
}
common.PNucleonMass = ProjectileNucleon->GetDefinition()->GetPDGMass();
common.PNucleonMass = ProjectileNucleon->GetDefinition()->GetPDGMass(); // On-shell (anti-)nucleon mass
common.TResidualMassNumber = TargetResidualMassNumber - 1;
common.TResidualCharge = TargetResidualCharge
- G4int( TargetNucleon->GetDefinition()->GetPDGCharge() );
@@ -1269,7 +1262,7 @@ G4int G4FTFModel::AdjustNucleonsAlgorithm_beforeSampling( G4int interactionCase,
common.TResidualMass = G4ParticleTable::GetParticleTable()->GetIonTable()
->GetIonMass( common.TResidualCharge, common.TResidualMassNumber );
}
common.TNucleonMass = TargetNucleon->GetDefinition()->GetPDGMass();
common.TNucleonMass = TargetNucleon->GetDefinition()->GetPDGMass(); // On-shell nucleon mass
common.SumMasses = common.PNucleonMass + common.PResidualMass + common.TNucleonMass
+ common.TResidualMass;
#ifdef debugAdjust
@@ -1339,7 +1332,7 @@ G4int G4FTFModel::AdjustNucleonsAlgorithm_beforeSampling( G4int interactionCase,
common.TResidualExcitationEnergy = 0.0;
}
common.TNucleonMass = common.SqrtS - ( common.SumMasses - common.TNucleonMass )
- common.TResidualExcitationEnergy;
- common.TResidualExcitationEnergy; // Off-shell nucleon mass
#ifdef debugAdjust
G4cout << "TNucleonMass " << common.TNucleonMass << G4endl;
#endif
@@ -1391,7 +1384,12 @@ G4int G4FTFModel::AdjustNucleonsAlgorithm_beforeSampling( G4int interactionCase,
G4cout << "Proj stop " << common.Ptmp << G4endl;
#endif
common.Pprojectile = common.Ptmp;
common.Pprojectile.transform( common.toLab );
common.Pprojectile.transform( common.toLab ); // From center-of-mass to Lab frame
//---AR-Jul2019 : To avoid unphysical projectile (anti-)fragments at rest, save the
// original momentum of the anti-baryon in the center-of-mass frame.
G4LorentzVector saveSelectedAntiBaryon4Momentum = SelectedAntiBaryon->Get4Momentum();
saveSelectedAntiBaryon4Momentum.transform( common.toCms ); // From Lab to center-of-mass frame
//---
SelectedAntiBaryon->Set4Momentum( common.Pprojectile );
// New target nucleon
if ( interactionCase == 1 || interactionCase == 3 ) {
@@ -1403,7 +1401,12 @@ G4int G4FTFModel::AdjustNucleonsAlgorithm_beforeSampling( G4int interactionCase,
G4cout << "Targ stop " << common.Ptmp << G4endl;
#endif
common.Ptarget = common.Ptmp;
common.Ptarget.transform( common.toLab );
common.Ptarget.transform( common.toLab ); // From center-of-mass to Lab frame
//---AR-Jul2019 : To avoid unphysical target fragments at rest, save the original
// momentum of the target nucleon in the center-of-mass frame.
G4LorentzVector saveSelectedTargetNucleon4Momentum = SelectedTargetNucleon->Get4Momentum();
saveSelectedTargetNucleon4Momentum.transform( common.toCms ); // From Lab to center-of-mass frame
//---
SelectedTargetNucleon->Set4Momentum( common.Ptarget );
// New target residual
if ( interactionCase == 1 || interactionCase == 3 ) {
@@ -1411,11 +1414,19 @@ G4int G4FTFModel::AdjustNucleonsAlgorithm_beforeSampling( G4int interactionCase,
TargetResidualMassNumber = common.TResidualMassNumber;
TargetResidualCharge = common.TResidualCharge;
TargetResidualExcitationEnergy = common.TResidualExcitationEnergy;
common.Ptmp.setE( common.TResidualMass + TargetResidualExcitationEnergy );
//---AR-Jul2019 : To avoid unphysical target fragments at rest, use the saved
// original momentum of the target nucleon (instead of setting 0).
// This is a rough and simple approach!
//common.Ptmp.setE( common.TResidualMass + TargetResidualExcitationEnergy );
common.Ptmp.setPx( -saveSelectedTargetNucleon4Momentum.x() );
common.Ptmp.setPy( -saveSelectedTargetNucleon4Momentum.y() );
common.Ptmp.setPz( -saveSelectedTargetNucleon4Momentum.z() );
common.Ptmp.setE( std::sqrt( sqr( common.TResidualMass + TargetResidualExcitationEnergy ) + common.Ptmp.vect().mag2() ) );
//---
#ifdef debugAdjust
G4cout << "Targ Resi stop " << common.Ptmp << G4endl;
#endif
common.Ptmp.transform( common.toLab );
common.Ptmp.transform( common.toLab ); // From center-of-mass to Lab frame
TargetResidual4Momentum = common.Ptmp;
}
// New projectile residual
@@ -1430,12 +1441,20 @@ G4int G4FTFModel::AdjustNucleonsAlgorithm_beforeSampling( G4int interactionCase,
ProjectileResidualMassNumber = common.PResidualMassNumber;
ProjectileResidualCharge = common.PResidualCharge;
ProjectileResidualExcitationEnergy = common.PResidualExcitationEnergy;
common.Ptmp.setE( common.PResidualMass + ProjectileResidualExcitationEnergy );
//---AR-Jul2019 : To avoid unphysical projectile (anti-)fragments at rest, use the
// saved original momentum of the anti-baryon (instead of setting 0).
// This is a rough and simple approach!
//common.Ptmp.setE( common.PResidualMass + ProjectileResidualExcitationEnergy );
common.Ptmp.setPx( -saveSelectedAntiBaryon4Momentum.x() );
common.Ptmp.setPy( -saveSelectedAntiBaryon4Momentum.y() );
common.Ptmp.setPz( -saveSelectedAntiBaryon4Momentum.z() );
common.Ptmp.setE( std::sqrt( sqr( common.PResidualMass + ProjectileResidualExcitationEnergy ) + common.Ptmp.vect().mag2() ) );
//---
}
#ifdef debugAdjust
G4cout << "Proj Resi stop " << common.Ptmp << G4endl;
#endif
common.Ptmp.transform( common.toLab );
common.Ptmp.transform( common.toLab ); // From center-of-mass to Lab frame
ProjectileResidual4Momentum = common.Ptmp;
}
return returnCode = 0; // successfully ended and nothing else needs to be done (i.e. no sampling)
@@ -1469,6 +1488,7 @@ G4int G4FTFModel::AdjustNucleonsAlgorithm_beforeSampling( G4int interactionCase,
return returnCode = 1; // successfully completed, but the work needs to be continued, i.e. try to sample
}
//-------------------------------------------------------------------
G4bool G4FTFModel::AdjustNucleonsAlgorithm_Sampling( G4int interactionCase,
@@ -2464,7 +2484,7 @@ void G4FTFModel::GetResiduals() {
G4cout << "End projectile" << G4endl;
#endif
} else {
} else { // Related to the condition: if ( HighEnergyInter )
#ifdef debugFTFmodel
G4cout << "Low energy interaction: Target nucleus --------------" << G4endl
@@ -2521,51 +2541,48 @@ void G4FTFModel::GetResiduals() {
for ( G4int i = 0; i < NumberOfInvolvedNucleonsOfProjectile; i++ ) {
G4Nucleon* aNucleon = TheInvolvedNucleonsOfProjectile[i];
G4VSplitableHadron* projectileSplitable = aNucleon->GetSplitableHadron();
if ( projectileSplitable->GetSoftCollisionCount() != 0 )
NumberOfProjectileParticipant++;
}
#ifdef debugFTFmodel
G4cout << "NumberOfProjectileParticipant" << G4endl;
#endif
DeltaExcitationE = 0.0;
DeltaPResidualNucleus = G4LorentzVector( 0.0, 0.0, 0.0, 0.0 );
if ( NumberOfProjectileParticipant != 0 ) {
DeltaExcitationE = ProjectileResidualExcitationEnergy /
G4double( NumberOfProjectileParticipant );
DeltaPResidualNucleus = ProjectileResidual4Momentum /
G4double( NumberOfProjectileParticipant );
}
//G4cout << "DeltaExcitationE DeltaPResidualNucleus " << DeltaExcitationE
// << " " << DeltaPResidualNucleus << G4endl;
for ( G4int i = 0; i < NumberOfInvolvedNucleonsOfProjectile; i++ ) {
G4Nucleon* aNucleon = TheInvolvedNucleonsOfProjectile[i];
G4VSplitableHadron* projectileSplitable = aNucleon->GetSplitableHadron();
if ( projectileSplitable->GetSoftCollisionCount() != 0 ) {
G4LorentzVector tmp = -DeltaPResidualNucleus;
aNucleon->SetMomentum( tmp );
aNucleon->SetBindingEnergy( DeltaExcitationE );
} else {
delete projectileSplitable;
projectileSplitable = 0;
aNucleon->Hit( projectileSplitable );
aNucleon->SetBindingEnergy( 0.0 );
}
}
#ifdef debugFTFmodel
G4cout << "NumberOfProjectileParticipant " << NumberOfProjectileParticipant << G4endl
<< "ProjectileResidual4Momentum " << ProjectileResidual4Momentum << G4endl;
#endif
if ( projectileSplitable->GetSoftCollisionCount() != 0 ) NumberOfProjectileParticipant++;
}
#ifdef debugFTFmodel
G4cout << "NumberOfProjectileParticipant" << G4endl;
#endif
DeltaExcitationE = 0.0;
DeltaPResidualNucleus = G4LorentzVector( 0.0, 0.0, 0.0, 0.0 );
if ( NumberOfProjectileParticipant != 0 ) {
DeltaExcitationE = ProjectileResidualExcitationEnergy / G4double( NumberOfProjectileParticipant );
DeltaPResidualNucleus = ProjectileResidual4Momentum / G4double( NumberOfProjectileParticipant );
}
//G4cout << "DeltaExcitationE DeltaPResidualNucleus " << DeltaExcitationE
// << " " << DeltaPResidualNucleus << G4endl;
for ( G4int i = 0; i < NumberOfInvolvedNucleonsOfProjectile; i++ ) {
G4Nucleon* aNucleon = TheInvolvedNucleonsOfProjectile[i];
G4VSplitableHadron* projectileSplitable = aNucleon->GetSplitableHadron();
if ( projectileSplitable->GetSoftCollisionCount() != 0 ) {
G4LorentzVector tmp = -DeltaPResidualNucleus;
aNucleon->SetMomentum( tmp );
aNucleon->SetBindingEnergy( DeltaExcitationE );
} else {
delete projectileSplitable;
projectileSplitable = 0;
aNucleon->Hit( projectileSplitable );
aNucleon->SetBindingEnergy( 0.0 );
}
}
#ifdef debugFTFmodel
G4cout << "End GetResiduals -----------------" << G4endl;
G4cout << "NumberOfProjectileParticipant " << NumberOfProjectileParticipant << G4endl
<< "ProjectileResidual4Momentum " << ProjectileResidual4Momentum << G4endl;
#endif
} // End of the condition: if ( HighEnergyInter )
#ifdef debugFTFmodel
G4cout << "End GetResiduals -----------------" << G4endl;
#endif
}
@@ -2703,8 +2720,7 @@ GenerateDeltaIsobar( const G4double sqrtS, // input parameter
G4int numberOfDeltas = 0;
for ( G4int i = 0; i < numberOfInvolvedNucleons; i++ ) {
//G4cout << "i maxNumberOfDeltas probDeltaIsobar " << i << " " << maxNumberOfDeltas
// << " " << probDeltaIsobar << G4endl;
if ( G4UniformRand() < probDeltaIsobar && numberOfDeltas < maxNumberOfDeltas ) {
numberOfDeltas++;
if ( ! involvedNucleons[i] ) continue;
@@ -2731,8 +2747,7 @@ GenerateDeltaIsobar( const G4double sqrtS, // input parameter
}
}
}
//G4cout << "maxNumberOfDeltas numberOfDeltas " << maxNumberOfDeltas << " "
// << numberOfDeltas << G4endl;
return true;
}
File diff suppressed because it is too large Load Diff