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
@@ -14,6 +14,64 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
28-Nov-2019 A. Ribon (hadr-string-diff-V10-05-10)
- G4FTFParameters: set parameters of a string kink in the constructor
(instead of setting it at each interaction, causing memory leaks).
Notice that string kinks are currently switched off, so this fix does
not affect any physics result.
26-Nov-2019 V. Ivanchenko (hadr-string-diff-V10-05-09)
- G4FTFParameters:
o Added protection for division by zero due to zero elastic x-section
19-Nov-2019 A. Ribon (hadr-string-diff-V10-05-08)
- G4FTFParameters:
o Diffraction minimal mass is now correctly set in GeV (instead of MeV),
for hadron projectiles different from pions, kaons, nucleons and
anti-nucleons, in the method InitForInteraction.
o In the method GetMinMass, fixed a bug in the computation of the
quark type (which affects the estimated minimal string mass produced
in diffraction); added also protections to make sure that the quark
type is always one of the five considered (u, d, s, c, b).
o Absolute (rather than signed) charge for antibaryon is now correctly
taken in the method InitForInteraction.
15-Nov-2019 V. Ivanchenko (hadr-string-diff-V10-05-07)
- G4FTFParameters: fixed creation/destruction/use of Glauber-Gribov
cross section
14-Nov-2019 A. Ribon (hadr-string-diff-V10-05-06)
- G4FTFParameters: fixed memory leak.
- G4ElasticHNScattering: added a few protections to avoid rare cases of
floating point exceptions.
07-Nov-2019 A. Ribon (hadr-string-diff-V10-05-05)
- G4FTFParameters: Vladimir Uzhinsky replaced the Chips hadron-nucleon
(total and elastic) cross sections with the Barashenkov-Glauber-Gribov (BGG)
cross sections for ordinary (i.e. non-heavy) hadrons.
Note: for heavy hadrons, only BGG cross section are available and used.
17-Sep-2019 A. Ribon (hadr-string-diff-V10-05-04)
- Vladimir Uzhinsky improvements of FTF model for nucleus-nucleus
interactions (with negligible effects for hadron-nucleus).
- G4DiffractiveExcitation: the range of excited hadron masses has been
extended, starting from ground-state values (before it was starting
from current hadron masses). This is the main improvement.
- G4ElasticHNScattering: improvement and simplification of the algorithm
of elastic scattering (before the masses of resonances were sampled,
now it is not needed any longer).
- G4FTFModel: improvement of the algorithm of string creation.
- Deleted G4DiffractiveHHScatterer : not used anywhere.
01-Aug-2019 A. Ribon (hadr-string-diff-V10-05-03)
- G4FTFModel: minor improvement in the annihilation at rest of light
anti-ions to avoid the unphysical production of (target and projectile)
fragments at rest.
08 July 2019 J. Yarba (hadr-string-diff-V10-05-02)
- G4FTFParameters: extend FTF configuration interface to include parameters
for pion projectile
06-Mar-2019 A. Ribon (hadr-string-diff-V10-05-01)
- G4FTFModel: fixed a memory leak in G4FTFModel::GetStrings() reported as
bug #2138.
@@ -42,6 +42,8 @@
#include "G4FTFParameters.hh"
#include "G4ElasticHNScattering.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4LorentzRotation.hh"
class G4VSplitableHadron;
class G4ExcitedString;
@@ -1,63 +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. *
// ********************************************************************
//
//
#ifndef G4DiffractiveHHScatterer_h
#define G4DiffractiveHHScatterer_h 1
// ------------------------------------------------------------
// GEANT 4 class header file
//
// ---------------- G4DiffractiveExcitation --------------
// by Gunter Folger, October 1998.
// diffractive Excitation used by strings models
// Take a projectile and a target
// excite the projectile and target
// ------------------------------------------------------------
#include "globals.hh"
#include "G4KineticTrackVector.hh"
#include "G4FTFParameters.hh"
#include "G4ExcitedString.hh"
class G4DiffractiveExcitation;
class G4LundStringFragmentation;
class G4KineticTrack;
class G4DiffractiveHHScatterer {
public:
G4DiffractiveHHScatterer();
virtual ~G4DiffractiveHHScatterer();
virtual void CreateStrings() const;
private:
const G4DiffractiveExcitation* theExcitation;
G4LundStringFragmentation* theStringFragmentation;
};
#endif
@@ -29,13 +29,15 @@
#define G4FTFParameters_h 1
#include <CLHEP/Units/SystemOfUnits.h>
#include "G4Proton.hh"
#include "G4Neutron.hh"
#include "G4ChipsComponentXS.hh"
#include <vector>
#include "G4Types.hh"
#include "G4Exp.hh"
class G4ParticleDefinition;
class G4VComponentCrossSection;
class G4LundStringFragmentation;
// NOTE: the settings are different for:
// * baryons projectile
// * anti-baryons projectile
@@ -63,19 +65,43 @@ class G4FTFParamCollection {
//
// Proc=1 --> Qexchg w/excitation
//
// Proc=2 & Proc=3 for the case ( AbsProjectileBaryonNumber > 1 || NumberOfTargetNucleons > 1 )
// (diffraction dissociation)
//
bool IsProjDiffDissociation() const { return fProjDiffDissociation; }
bool IsTgtDiffDissociation() const { return fTgtDiffDissociation; }
//
double GetProc1A1() const { return fProc1A1; }
double GetProc1B1() const { return fProc1B1; }
double GetProc1A2() const { return fProc1A2; }
double GetProc1B2() const { return fProc1B2; }
double GetProc1A3() const { return fProc1A3; }
double GetProc1Atop() const { return fProc1Atop; }
double GetProc1Ymin() const { return fProc0Ymin; }
double GetProc1Ymin() const { return fProc1Ymin; }
//
// Proc=2 & Proc=3 in case ( AbsProjectileBaryonNumber > 1 || NumberOfTargetNucleons > 1 )
// Update: Proc=2 & Proc=3 in case ( AbsProjectileBaryonNumber > 10 || NumberOfTargetNucleons > 10 )
// (diffraction dissociation)
//
// Other parameters have a complex form for baryon projectile
// although they're just numbers for e.g. pions projectile
//
// Proc=2 --> Projectile diffraction
//
double GetProc2A1() const { return fProc2A1; }
double GetProc2B1() const { return fProc2B1; }
double GetProc2A2() const { return fProc2A2; }
double GetProc2B2() const { return fProc2B2; }
double GetProc2A3() const { return fProc2A3; }
double GetProc2Atop() const { return fProc2Atop; }
double GetProc2Ymin() const { return fProc2Ymin; }
//
// Proc=3 --> Target diffraction
//
double GetProc3A1() const { return fProc3A1; }
double GetProc3B1() const { return fProc3B1; }
double GetProc3A2() const { return fProc3A2; }
double GetProc3B2() const { return fProc3B2; }
double GetProc3A3() const { return fProc3A3; }
double GetProc3Atop() const { return fProc3Atop; }
double GetProc3Ymin() const { return fProc3Ymin; }
//
bool IsProjDiffDissociation() const { return fProjDiffDissociation; }
bool IsTgtDiffDissociation() const { return fTgtDiffDissociation; }
//
// Proc=4 --> Qexchg "w/additional multiplier" in excitation
//
@@ -102,8 +128,6 @@ class G4FTFParamCollection {
// --> FIXME !!! --> void Get/SetBaryonMaxNumberOfCollisions( const double, const double ); // 1st is Plab, 2nd - D=2.
//
// NOTE (JVY): These parameters are COMMON among various projectiles !!!
//
double GetNuclearProjDestructP1() const { return fNuclearProjDestructP1; }
bool IsNuclearProjDestructP1_NBRNDEP() const { return fNuclearProjDestructP1_NBRNDEP; }
double GetNuclearTgtDestructP1() const { return fNuclearTgtDestructP1; }
@@ -157,7 +181,8 @@ class G4FTFParamCollection {
//
// NOTE: Proc #2 & 3 are projectile & target diffraction
// they have more complex definition of A1 & A2
// (see around line 540 or so)
// for *baryons* although they're just numbers for pions
// (example for baryons below)
// 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
//
@@ -165,7 +190,22 @@ class G4FTFParamCollection {
// projectile and/or target diffraction (dissociation) may be switched ON/OFF
bool fProjDiffDissociation;
bool fTgtDiffDissociation;
//
// Proc=2 --> Projectile diffraction
double fProc2A1;
double fProc2B1;
double fProc2A2;
double fProc2B2;
double fProc2A3;
double fProc2Atop;
double fProc2Ymin;
// Proc=3 --> Target diffraction
double fProc3A1;
double fProc3B1;
double fProc3A2;
double fProc3B2;
double fProc3A3;
double fProc3Atop;
double fProc3Ymin;
// Proc=4 --> Qexchg w/additional multiplier in excitation
double fProc4A1; // D=0.6 (or 1. as in Doc ?)
double fProc4B1; // D=0.
@@ -175,7 +215,13 @@ class G4FTFParamCollection {
double fProc4Atop; // D=0.
double fProc4Ymin; // D=1.4
//
// parameters of participating baryon excitation
// parameters of participating baryon excitation
// NOTE: baryon ot HADRON ???
// NOTE: this parameters (as C++ class data members) are used for all types of hadrons
// but the values for a specific group of particles can be are different from
// another group of particles
// the defaults listed under coments are for baryons,
// and they may be different or the same for other hadrons (e.g. mesons)
//
double fDeltaProbAtQuarkExchange; // D=0.
double fProbOfSameQuarkExchange; // D=0. if A<=26, otherwise D=1.
@@ -184,8 +230,8 @@ class G4FTFParamCollection {
double fTgtMinDiffMass; // target, D=1.16GeV
double fTgtMinNonDiffMass; // target, D=1.16GeV
double fAveragePt2; // D=0.3GeV**2 ( or 0.15 as in the Doc ???)
double fProbLogDistrPrD; // D=0.6 (or 0.3 ???)
double fProbLogDistr; // D=0.6 (or 0.3 ???)
double fProbLogDistrPrD; // D=0.55 (or 0.6 ??? or 0.3 ???)
double fProbLogDistr; // D=0.55 (or 0.6 ??? or 0.3 ???)
// parameters of nuclear distruction
//
@@ -217,11 +263,13 @@ class G4FTFParamCollection {
double fPt2NuclearDestructP2; // D=0.04
double fPt2NuclearDestructP3; // D=4.0
double fPt2NuclearDestructP4; // D=2.5
// baryons
// baryons... well, in fact also mesons...
double fR2ofNuclearDestruct; // D=1.5*fermi*fermi
double fExciEnergyPerWoundedNucleon; // D=40MeV
double fDofNuclearDestruct; // D=0.3
// NOTE: this parameter has changed from 1. to 9. between 10.2 and 10.4.ref04 !!!
// ... but that's for baryons !
// ... while for mesons it's 1GeV**2
double fMaxPt2ofNuclearDestruct; // D=9GeV**2
private:
@@ -236,6 +284,23 @@ class G4FTFParamCollBaryonProj : public G4FTFParamCollection {
G4FTFParamCollBaryonProj();
};
class G4FTFParamCollMesonProj : public G4FTFParamCollection {
public:
// ctor
G4FTFParamCollMesonProj();
};
class G4FTFParamCollPionProj : public G4FTFParamCollMesonProj {
public:
// ctor
G4FTFParamCollPionProj();
};
class G4FTFParameters {
public:
@@ -356,9 +421,6 @@ class G4FTFParameters {
// Initial energy of hN interactions
G4double FTFhNcmsEnergy; // Initial hN CMS energy
// hN cross section manager
G4ChipsComponentXS* FTFxsManager;
// Geometrical parameteres
G4double FTFXtotal; // Total X in mb
G4double FTFXelastic; // Elastic X in mb
@@ -400,22 +462,26 @@ class G4FTFParameters {
G4double ExcitationEnergyPerWoundedNucleon;
G4double DofNuclearDestruction; // D for momentum sampling
G4double DofNuclearDestruction; // Dispersion for momentum sampling
G4double Pt2ofNuclearDestruction; // Pt2
G4double MaxPt2ofNuclearDestruction; // Max Pt2
private:
G4LundStringFragmentation* StringMass;
G4double GetMinMass( const G4ParticleDefinition* aParticle );
void Reset();
// JVY, July 31, 2017: encapsulates (current set of) parameters for the baryon projectile
//
G4FTFParamCollBaryonProj fParCollBaryonProj;
// JVY, Feb 14, 2019: encapsulates (current set of) parameters for meson/pion (+/-/0) projectile
G4FTFParamCollMesonProj fParCollMesonProj;
G4FTFParamCollPionProj fParCollPionProj;
// G4-MT changes
private:
static G4ThreadLocal bool chipsComponentXSisInitialized;
static G4ThreadLocal G4ChipsComponentXS* chipsComponentXSinstance;
// Glauber-Gribov hN x-section
G4VComponentCrossSection* csGGinstance;
};
@@ -50,7 +50,6 @@ include(Geant4MacroDefineModule)
GEANT4_DEFINE_MODULE(NAME G4had_string_diff
HEADERS
G4DiffractiveExcitation.hh
G4DiffractiveHHScatterer.hh
G4DiffractiveSplitableHadron.hh
G4ElasticHNScattering.hh
G4FTFAnnihilation.hh
@@ -59,7 +58,6 @@ GEANT4_DEFINE_MODULE(NAME G4had_string_diff
G4FTFParticipants.hh
SOURCES
G4DiffractiveExcitation.cc
G4DiffractiveHHScatterer.cc
G4DiffractiveSplitableHadron.cc
G4ElasticHNScattering.cc
G4FTFAnnihilation.cc
@@ -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