Import Geant4 11.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2022-12-09 14:43:28 +01:00
parent c07cea1fe0
commit 9f34590941
3810 changed files with 200490 additions and 182326 deletions
@@ -1,9 +1,13 @@
# Category hadr-prtn History
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!
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!
-------------------------------------------------------------------------------
## 2022-11-26 Gabriele Cosmo (hadr-prtn-V11-00-01)
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
## 2021-12-10 Ben Morgan (hadr-prtn-V11-00-00)
- Change to new Markdown History format
@@ -18,6 +18,7 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
-I$(G4BASE)/track/include \
-I$(G4BASE)/geometry/volumes/include \
-I$(G4BASE)/geometry/management/include \
-I$(G4BASE)/intercoms/include \
-I$(G4BASE)/processes/management/include \
-I$(G4BASE)/processes/hadronic/management/include/ \
-I$(G4BASE)/processes/hadronic/cross_sections/include/ \
@@ -1,15 +1,87 @@
# Category hadr-string-diff History
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!
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!
-------------------------------------------------------------------------------
## 2022-11-26 Gabriele Cosmo (hadr-string-diff-V11-00-12)
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
## 2022-11-13 Alberto Ribon (hadr-string-diff-V11-00-11)
- G4DiffractiveSplitableHadron : Vladimir Uzhinsky's fix of rare large energy
violations seen with FTF when dealing with charm and bottom hadron nuclear
interactions.
## 2022-11-11 Alberto Ribon (hadr-string-diff-V11-00-10)
- G4FTFModel : in the methods AdjustNucleonsAlgorithm_beforeSampling and
ComputeNucleusProperties, before calling either G4HyperNucleiProperties
or G4IonTable to get the mass of the residual, check if the residual
is a single nucleon (or lambda) or a pair of nucleons (or lambdas);
moreover, in the same two methods, the absolute value of the nuclear
residual charge is used, to take into account the case of anti-nuclei
projectiles.
## 2022-11-04 Alberto Ribon (hadr-string-diff-V11-00-09)
- G4FTFModel : Vladimir Uzhinsky's extension of the FTF model to deal with
the annihilation of light anti-hypernuclei.
- G4FTFAnnihilation : Vladimir Uzhinsky's reorganization of the two methods
Create2QuarkAntiQuarkStrings and Create3QuarkAntiQuarkStrings in order
to better handle unphysical configurations that need to be rejected.
The algorithm has been also speed-up by changing the order of the sampling:
light-cone variables are sampled first, then transverse momenta.
Moreover, the positions of quark and anti-quark in strings have been
corrected: this is expected to improve the kinematical properties of the
produced hadrons.
## 2022-10-27 Julia Yarba (hadr-string-diff-V11-00-08)
- Minor cleanup in tune naming
## 2022-10-27 Julia Yarba (hadr-string-diff-V11-00-07)
- G4FTFTunings - rename tune2022-v0 (#1) to baryon-tune2022-v0;
add pion-tune2022-v0 (#2) and combined-tune2022-v0 (#3, combo of #1&#2)
## 2022-10-19 Alberto Ribon (hadr-string-diff-V11-00-07)
- G4DiffractiveExcitation : Vladimir Uzhinsky's improvements in the method
ExciteParticipants_doChargeExchange.
For a projectile meson in the case of quark exchange, a more correct ratio
between pseudo-scalar and vector mesons is included: the pion after the
exchange can transform into pi0, eta, eta', rho0 and omega mesons.
This allows to improve the description of leading particle spectra in
meson-nucleon interactions.
## 2022-08-31 Vladimir Ivanchenko (hadr-string-diff-V11-00-06)
- G4FTFTunings - added extra braces at initialisation of std::array to
allow CMSSW compile Geant4
## 2022-08-16 Gabriele Cosmo (hadr-string-diff-V11-00-05)
- Added missing dependency on G4intercoms in sources.cmake and GNUmakefile.
## 2022-08-02 Alberto Ribon (hadr-string-diff-V11-00-04)
- G4FTFTuningsMessenger : created new messenger class for G4FTFTunings.
This allows to avoid the use of G4FTFTunings in G4HadronicParametersMessenger,
which created a circular dependency between G4hadronic_util and G4had_string_diff.
- G4FTFTunings : updated to use G4FTFTuningsMessenger instead of
G4HadronicParameterMessenger.
## 2022-07-28 Alberto Ribon (hadr-string-diff-V11-00-03)
- G4FTFTunings : created a new (singleton) class to allow the possibility
to specify alternative sets of FTF parameters, called "tunes".
Moved into this class some special, internal classes - useful for tuning
of parameters - that were originally in G4FTFParameters.
- G4FTFParameters : use of the new G4FTFTunings class; instead of having
one, single set of parameters, it has now an array of set of parameters,
with each element corresponding to one specific "tune";
clean-up of the class by moving to G4FTFTunings some code originally
present in G4FTFParameters.
These changes should not alter any results, nor even the random sequence.
## 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).
## 2022-06-07 Alberto Ribon (hadr-string-diff-V11-00-01)
Fixes made by Vladimir Uzhinsky to get isotropic distributions in
annihilations at rest:
@@ -32,273 +32,13 @@
#include <vector>
#include "G4Types.hh"
#include "G4Exp.hh"
#include "G4FTFTunings.hh"
class G4ParticleDefinition;
class G4VComponentCrossSection;
class G4LundStringFragmentation;
// NOTE: the settings are different for:
// * baryons projectile
// * anti-baryons projectile
// * pions (chg or pi0) projectile
// * kaons projectile (pdg = +/-321, 311, 130, or 310)
// * "undefined" projectile - nucleon assumed
class G4FTFParamCollection {
public:
//dtor
virtual ~G4FTFParamCollection() {}
// parameters of excitation
//
// Proc=0 --> Qexchg w/o excitation
//
double GetProc0A1() const { return fProc0A1; }
double GetProc0B1() const { return fProc0B1; }
double GetProc0A2() const { return fProc0A2; }
double GetProc0B2() const { return fProc0B2; }
double GetProc0A3() const { return fProc0A3; }
double GetProc0Atop() const { return fProc0Atop; }
double GetProc0Ymin() const { return fProc0Ymin; }
//
// Proc=1 --> Qexchg w/excitation
//
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 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
//
double GetProc4A1() const { return fProc4A1; }
double GetProc4B1() const { return fProc4B1; }
double GetProc4A2() const { return fProc4A2; }
double GetProc4B2() const { return fProc4B2; }
double GetProc4A3() const { return fProc4A3; }
double GetProc4Atop() const { return fProc4Atop; }
double GetProc4Ymin() const { return fProc4Ymin; }
//
//
double GetDeltaProbAtQuarkExchange() const { return fDeltaProbAtQuarkExchange; }
double GetProbOfSameQuarkExchange() const { return fProbOfSameQuarkExchange; }
double GetProjMinDiffMass() const { return fProjMinDiffMass; }
double GetProjMinNonDiffMass() const { return fProjMinNonDiffMass; }
double GetTgtMinDiffMass() const { return fTgtMinDiffMass; }
double GetTgtMinNonDiffMass() const { return fTgtMinNonDiffMass; }
double GetAveragePt2() const { return fAveragePt2; }
double GetProbLogDistrPrD() const { return fProbLogDistrPrD; }
double GetProbLogDistr() const { return fProbLogDistr; }
// NOTE (JVY): There is also the Pt2Kind parameter but for now it's set to 0., so we'll leave it aside
// --> FIXME !!! --> void Get/SetBaryonMaxNumberOfCollisions( const double, const double ); // 1st is Plab, 2nd - D=2.
//
double GetNuclearProjDestructP1() const { return fNuclearProjDestructP1; }
bool IsNuclearProjDestructP1_NBRNDEP() const { return fNuclearProjDestructP1_NBRNDEP; }
double GetNuclearTgtDestructP1() const { return fNuclearTgtDestructP1; }
bool IsNuclearTgtDestructP1_ADEP() const { return fNuclearTgtDestructP1_ADEP; }
double GetNuclearProjDestructP2() const { return fNuclearProjDestructP2; }
double GetNuclearProjDestructP3() const { return fNuclearProjDestructP3; }
double GetNuclearTgtDestructP2() const { return fNuclearTgtDestructP2; }
double GetNuclearTgtDestructP3() const { return fNuclearTgtDestructP3; }
double GetPt2NuclearDestructP1() const { return fPt2NuclearDestructP1; }
double GetPt2NuclearDestructP2() const { return fPt2NuclearDestructP2; }
double GetPt2NuclearDestructP3() const { return fPt2NuclearDestructP3; }
double GetPt2NuclearDestructP4() const { return fPt2NuclearDestructP4; }
//
// separately for baryons, mesons, etc.
//
double GetR2ofNuclearDestruct() const { return fR2ofNuclearDestruct; }
double GetExciEnergyPerWoundedNucleon() const { return fExciEnergyPerWoundedNucleon; }
double GetDofNuclearDestruct() const { return fDofNuclearDestruct; }
double GetMaxPt2ofNuclearDestruct() const { return fMaxPt2ofNuclearDestruct; }
protected:
// ctor
G4FTFParamCollection();
// parameters of excitation
//
//
// these are for Inelastic interactions, i.e. Xinelastic=(Xtotal-Xelastix)>0.
// for elastic, all the A's & B's, Atop & Ymin are zeros
// general formula: Pp = A1*exp(B1*Y) + A2*exp(B2*Y) + A3
// but if Y<Ymin, then Pp=max(0.,Atop)
// for details, see also G4FTFParameters::GetProcProb( ProcN, y )
//
// Proc=0 --> Qexchg w/o excitation
double fProc0A1; // D=13.71
double fProc0B1; // D=1.75
double fProc0A2; // D=-30.69 (or -214.5 as in Doc ?)
double fProc0B2; // D=3. ( or 4. as in Doc ?)
double fProc0A3; // D=0.
double fProc0Atop; // D=1. ( or 0.5 as in Doc ?)
double fProc0Ymin; // D=0.93 (or 1.1 as in Doc ?)
// Proc=1 --> Qexchg w/excitation
double fProc1A1; // D=25.
double fProc1B1; // D=1.
double fProc1A2; // D=-50.34
double fProc1B2; // D=1.5
double fProc1A3; // D=0.
double fProc1Atop; // D=0.
double fProc1Ymin; // D=1.4
//
// NOTE: Proc #2 & 3 are projectile & target diffraction
// they have more complex definition of A1 & A2
// 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
//
// Also, for ( AbsProjectileBaryonNumber > 1 || NumberOfTargetNucleons > 1 )
// 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.
double fProc4A2; // D=-1.2 (or -2.01 as in Doc ?)
double fProc4B2; // D=0.5
double fProc4A3; // D=0.
double fProc4Atop; // D=0.
double fProc4Ymin; // D=1.4
//
// 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.
double fProjMinDiffMass; // projectile, D=1.16GeV
double fProjMinNonDiffMass; // projectile, D=1.16GeV
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.55 (or 0.6 ??? or 0.3 ???)
double fProbLogDistr; // D=0.55 (or 0.6 ??? or 0.3 ???)
// parameters of nuclear distruction
//
// NOTE (JVY): there're 3 cases here:
// * baryon projectile
// * anti-baryon projectile
// * meson projectile
//
// double fBaryonMaxNumberOfCollisions; // D=2.
// void SetBaryonProbOfInteraction( const double ); // ??? this is prob. of inelastic interaction
// that is set internally based on certain conditions...
// general (i.e. for used for baryons,anti-baryons, and mesons)
// NOTE: these parameters have stayed THE SAME for quite a while
double fNuclearProjDestructP1; // D=0.00481 in 10.3.ref04 !!!
// BUT !!! In 10.3.ref04 as well as in 10.2-seriesit's multiplied of AbsProjectileBaryonNumber
// which somehow is 0 for the proton projectile (see in 10.3.ref04 around lines 130-140 In G4FTFParameters.cc).
// For the target destr. it's multipled by the number of target nucleons (12 for Carbon).
// In 10.3.p01 it's set to 1. FLAT OUT for both projectile & target, no multiplications, etc.
// Now, make default at 1.
bool fNuclearProjDestructP1_NBRNDEP;
double fNuclearTgtDestructP1; // Make D=1. as in 10.3.p01
bool fNuclearTgtDestructP1_ADEP;
double fNuclearProjDestructP2; // D=4.0
double fNuclearProjDestructP3; // D=2.1
double fNuclearTgtDestructP2; // D=4.0
double fNuclearTgtDestructP3; // D=2.1
//
double fPt2NuclearDestructP1; // D=0.035
double fPt2NuclearDestructP2; // D=0.04
double fPt2NuclearDestructP3; // D=4.0
double fPt2NuclearDestructP4; // D=2.5
// 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
};
class G4FTFParamCollBaryonProj : public G4FTFParamCollection {
public:
// ctor
G4FTFParamCollBaryonProj();
};
class G4FTFParamCollMesonProj : public G4FTFParamCollection {
public:
// ctor
G4FTFParamCollMesonProj();
};
class G4FTFParamCollPionProj : public G4FTFParamCollMesonProj {
public:
// ctor
G4FTFParamCollPionProj();
};
class G4FTFParameters {
public:
G4FTFParameters();
@@ -471,13 +211,17 @@ class G4FTFParameters {
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;
// Different sets of parameters (called "tunes") of the FTF model are possible.
// These tunes are kept as std::array - instead of std::vector - members of this class,
// because their size is fixed during a run, and expected to be small.
// For the time being, separate parameters are kept for "baryons", "pions", and
// the rest of "mesons"; if in the future we make more distinctions between
// projectile types (e.g. kaons, anti-baryon, hyperons, etc.), then corresponding
// new arrays will be introduced. In all cases, the size of these arrays is the
// same (and kept as a static constant in the singleton G4FTFTunings).
std::array< G4FTFParamCollBaryonProj, G4FTFTunings::sNumberOfTunes > fArrayParCollBaryonProj;
std::array< G4FTFParamCollMesonProj, G4FTFTunings::sNumberOfTunes > fArrayParCollMesonProj;
std::array< G4FTFParamCollPionProj, G4FTFTunings::sNumberOfTunes > fArrayParCollPionProj;
// Glauber-Gribov hN x-section
G4VComponentCrossSection* csGGinstance;
@@ -0,0 +1,475 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//---------------------------------------------------------------------------
//
// ClassName: G4FTFTunings
//
// Author: 2022 Alberto Ribon
//
// Description: Singleton to keep sets of parameters, called "tunes",
// for the FTF model.
//
// Please NOTE that, as of now (Fall 2022) ONLY ONE tune
// can be selected/applied; attempt to select multiple tunes
// will not results in any error messages, however further
// down the workflow only the FIRST of the activated tunes
// will be used.
//
// To use one of the tunes of this class, there is no need to
// change anything in this class, and use instead one of the
// following two UI commands, before initialization:
// /process/had/models/ftf/selectTuneByIndex integerIndex
// or /process/had/models/ftf/selectTuneByName stringName
// for instance:
// /process/had/models/ftf/selectTuneByIndex 1
// or
// /process/had/models/ftf/selectTuneByIndex 2
// or
// /process/had/models/ftf/selectTuneByIndex 3
// or
// /process/had/models/ftf/selectTuneByName baryon-tune2022-v0
// or
// /process/had/models/ftf/selectTuneByName pion-tune2022-v0
// or
// /process/had/models/ftf/selectTuneByName combined-tune2022-v0
//
// If you want to create a new tune, then you need to modify
// this class as follows: look for the first "dummy" tune
// available; if you find it, then specify its name in the
// std::array fNameOfTunes and the values of the parameters
// in the methods: G4FTFParamCollection::SetTuneN()
// G4FTFParamCollBaryonProj::SetTuneN()
// G4FTFParamCollMesonProj::SetTuneN()
// G4FTFParamCollPionProj::SetTuneN
// Note that you need to set explicitly only the parameters
// with non-default values - all the others inherit the
// corresponding default values.
// If you don't find available "dummy" tune, then you need
// to increase by (at least) 1 the number of tunes, and add
// the corresponding "SetTuneN()" methods in the 4 classes
// G4FTFParamCollection, G4FTFParamCollBaryonProj,
// G4FTFParamCollMesonProj, G4FTFParamCollPionProj
//
// In order to explore some variations of FTF parameters
// (for instance to find out a new tune), please select
// (via UI command, as explained above) the existing tune
// from which you want to start with as "baseline", and
// then set the values of the parameters you want to change
// via the following C++ code (to used before initialization):
// G4HadronicDeveloperParameters::GetInstance()->Set(...)
//
// Note: in its current, first version, of this class,
// any FTF tune is applied "globally", i.e. for all
// projectile hadrons and regardless of their kinetic
// energy.
// In future versions, we might try to have tunes that
// are meant for specific projectile type and/or for
// intervals of kinetic energy (e.g. low-energy,
// medium-energy, high-energy).
//
// Note: a few classes (written by Julia Yarba) used only in
// G4FTFParameters, related to the set of parameters of
// the FTF models, have been moved from the header and
// source files of the class G4FTFParameters to this
// (G4FTFTunings) class, with minimal modifications.
//
// Modified:
//
//----------------------------------------------------------------------------
//
#ifndef G4FTFTunings_h
#define G4FTFTunings_h 1
#include "globals.hh"
#include <CLHEP/Units/PhysicalConstants.h>
#include <array>
class G4ParticleDefinition;
class G4FTFTuningsMessenger;
class G4FTFTunings {
public:
static G4FTFTunings* Instance();
~G4FTFTunings();
inline G4String GetTuneName( const G4int index ) const;
// Returns the name of the specified tune (via its index).
// Note that the name of the tune cannot be changed
// (i.e. there is no corresponding "Set" method).
inline G4int GetTuneApplicabilityState( const G4int index ) const;
void SetTuneApplicabilityState( const G4int index, const G4int state );
// Get/Set methods for the "applicability state" of the specified tune
// (via its index). For the time being, there are only two states:
// 0: switched off; 1: switched on.
G4int GetIndexTune( const G4ParticleDefinition* particleDef, const G4double ekin ) const;
// Based on the projectile type and its kinetic energy (from the input arguments),
// this method returns the index of the tune which should be used.
// For the time being, it returns the first alternative tune which is switched on,
// else returns 0 which corresponds to the default set of parameters.
// Note: this is the key method that needs to be revised if we decide to have
// different tunes according to projectile type and/or projectile energy range.
static const G4int sNumberOfTunes = 10;
// Number of tunes: must be >= 1, with the first one (i.e. with index = 0)
// which corresponds to the default set of parameters.
// For the time being, we set it to 10 : the second one (index = 1) is a
// realistic alternative tune, whereas all the remaining 8 are "dummy" tunes,
// i.e. the same as the default set of parameters. These are meant to be
// replaced in the future with other, realistic alternative tunes.
// Note: below, for the names and "applicability" status of tunes we use
// std::array - instead of std::vector - because the number of tunes
// do not change dynamically during a run, and, moreover, we expect
// quite a small number of them (just a few).
private:
G4FTFTunings();
G4bool IsLocked() const;
static G4FTFTunings* sInstance;
G4FTFTuningsMessenger* fMessenger;
const std::array< G4String, sNumberOfTunes > fNameOfTunes = { {
"default", // 0th tuning: default set
"baryon-tune2022-v0", // 1st tuning: Julia Yarba's presentation on 20-Jul-2022
"pion-tune2022-v0", // 2nd tuning: Julia Yarba's presentations on 26-Sept-2022 and 19-Oct-2022
"combined-tune2022-v0", // 3rd tuning: combo of the 1st and 2nd tuning
"fourth-dummy", // 4th tuning: dummy
"fifth-dummy", // 5th tuning: dummy
"sixth-dummy", // 6th tuning: dummy
"seventh-dummy", // 7th tuning: dummy
"eighth-dummy", // 8th tuning: dummy
"nineth-dummy" // 9th tuning: dummy
} };
// The names of tunes can be useful for debugging.
std::array< G4int, sNumberOfTunes > fApplicabilityOfTunes = { { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
// Each tune has an integer that specifies its applicability.
// For the time being, there only two values:
// 0 : tune is switched off (i.e. not applicable);
// 1 : tune is switched on (i.e. applicable).
// Later on, it can be extended to indicate whether it is applicable to specific
// projectile hadrons (e.g. protons, pions, etc.), and/or for specific energy ranges
// (e.g. low-energy, medium-energy, high-energy - with energy thresholds to be
// defined in this class).
// The initial values can be changed (either via C++ interface or via UI command)
// before initialization.
//const G4double fLowEnergyThreshold = 5.0*CLHEP::GeV;
//const G4double fHighEnergyThreshold = 20.0*CLHEP::GeV;
// These constants can be used, later on, to have different tunes
// according to the energy of the projectile hadron (e.g. one set for
// low energy, one set for middle energy, and one for high energy).
};
inline G4String G4FTFTunings::GetTuneName( const G4int index ) const {
if ( index < 0 || index >= sNumberOfTunes ) return G4String();
return fNameOfTunes[index];
}
inline G4int G4FTFTunings::GetTuneApplicabilityState( const G4int index ) const {
if ( index < 0 || index >= sNumberOfTunes ) return 0; // Switched off
return fApplicabilityOfTunes[index];
}
//============================================================================
// Classes below have been created by Julia Yarba and were originally placed
// in the G4FTFParameters.{hh,cc} files ; some minimal changes and extensions
// have been included.
class G4FTFParamCollection {
// NOTE: the settings are different for:
// * baryons projectile
// * anti-baryons projectile
// * pions (chg or pi0) projectile
// * kaons projectile (pdg = +/-321, 311, 130, or 310)
// * "undefined" projectile - nucleon assumed
public:
// Set-up the tune specified in the input argument, only if that tune is switched on.
virtual void SetTune( const G4int tuneIndex );
virtual void SetTune1(); // Set-up the 1st tune
virtual void SetTune2(); // Set-up the 2nd tune
virtual void SetTune3(); // Set-up the 3rd tune
virtual void SetTune4(); // Set-up the 4th tune
virtual void SetTune5(); // Set-up the 5th tune
virtual void SetTune6(); // Set-up the 6th tune
virtual void SetTune7(); // Set-up the 7th tune
virtual void SetTune8(); // Set-up the 8th tune
virtual void SetTune9(); // Set-up the 9th tune
//...
virtual ~G4FTFParamCollection() {}
// parameters of excitation
// Proc=0 --> Qexchg w/o excitation
double GetProc0A1() const { return fProc0A1; }
double GetProc0B1() const { return fProc0B1; }
double GetProc0A2() const { return fProc0A2; }
double GetProc0B2() const { return fProc0B2; }
double GetProc0A3() const { return fProc0A3; }
double GetProc0Atop() const { return fProc0Atop; }
double GetProc0Ymin() const { return fProc0Ymin; }
// Proc=1 --> Qexchg w/excitation
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 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
double GetProc4A1() const { return fProc4A1; }
double GetProc4B1() const { return fProc4B1; }
double GetProc4A2() const { return fProc4A2; }
double GetProc4B2() const { return fProc4B2; }
double GetProc4A3() const { return fProc4A3; }
double GetProc4Atop() const { return fProc4Atop; }
double GetProc4Ymin() const { return fProc4Ymin; }
//
double GetDeltaProbAtQuarkExchange() const { return fDeltaProbAtQuarkExchange; }
double GetProbOfSameQuarkExchange() const { return fProbOfSameQuarkExchange; }
double GetProjMinDiffMass() const { return fProjMinDiffMass; }
double GetProjMinNonDiffMass() const { return fProjMinNonDiffMass; }
double GetTgtMinDiffMass() const { return fTgtMinDiffMass; }
double GetTgtMinNonDiffMass() const { return fTgtMinNonDiffMass; }
double GetAveragePt2() const { return fAveragePt2; }
double GetProbLogDistrPrD() const { return fProbLogDistrPrD; }
double GetProbLogDistr() const { return fProbLogDistr; }
// NOTE (JVY): There is also the Pt2Kind parameter but for now it's set to 0., so we'll leave it aside
// --> FIXME !!! --> void Get/SetBaryonMaxNumberOfCollisions( const double, const double ); // 1st is Plab, 2nd - D=2.
double GetNuclearProjDestructP1() const { return fNuclearProjDestructP1; }
bool IsNuclearProjDestructP1_NBRNDEP() const { return fNuclearProjDestructP1_NBRNDEP; }
double GetNuclearTgtDestructP1() const { return fNuclearTgtDestructP1; }
bool IsNuclearTgtDestructP1_ADEP() const { return fNuclearTgtDestructP1_ADEP; }
double GetNuclearProjDestructP2() const { return fNuclearProjDestructP2; }
double GetNuclearProjDestructP3() const { return fNuclearProjDestructP3; }
double GetNuclearTgtDestructP2() const { return fNuclearTgtDestructP2; }
double GetNuclearTgtDestructP3() const { return fNuclearTgtDestructP3; }
double GetPt2NuclearDestructP1() const { return fPt2NuclearDestructP1; }
double GetPt2NuclearDestructP2() const { return fPt2NuclearDestructP2; }
double GetPt2NuclearDestructP3() const { return fPt2NuclearDestructP3; }
double GetPt2NuclearDestructP4() const { return fPt2NuclearDestructP4; }
// separately for baryons, mesons, etc.
double GetR2ofNuclearDestruct() const { return fR2ofNuclearDestruct; }
double GetExciEnergyPerWoundedNucleon() const { return fExciEnergyPerWoundedNucleon; }
double GetDofNuclearDestruct() const { return fDofNuclearDestruct; }
double GetMaxPt2ofNuclearDestruct() const { return fMaxPt2ofNuclearDestruct; }
protected:
G4FTFParamCollection();
// parameters of excitation
// these are for Inelastic interactions, i.e. Xinelastic=(Xtotal-Xelastix)>0.
// for elastic, all the A's & B's, Atop & Ymin are zeros
// general formula: Pp = A1*exp(B1*Y) + A2*exp(B2*Y) + A3
// but if Y<Ymin, then Pp=max(0.,Atop)
// for details, see also G4FTFParameters::GetProcProb( ProcN, y )
// Proc=0 --> Qexchg w/o excitation
double fProc0A1;
double fProc0B1;
double fProc0A2;
double fProc0B2;
double fProc0A3;
double fProc0Atop;
double fProc0Ymin;
// Proc=1 --> Qexchg w/excitation
double fProc1A1;
double fProc1B1;
double fProc1A2;
double fProc1B2;
double fProc1A3;
double fProc1Atop;
double fProc1Ymin;
// NOTE: Proc #2 & 3 are projectile & target diffraction
// they have more complex definition of A1 & A2
// 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
//
// Also, for ( AbsProjectileBaryonNumber > 1 || NumberOfTargetNucleons > 1 )
// 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;
double fProc4B1;
double fProc4A2;
double fProc4B2;
double fProc4A3;
double fProc4Atop;
double fProc4Ymin;
// parameters of participating baryon excitation
// NOTE: baryon or 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;
double fProbOfSameQuarkExchange;
double fProjMinDiffMass;
double fProjMinNonDiffMass;
double fTgtMinDiffMass;
double fTgtMinNonDiffMass;
double fAveragePt2;
double fProbLogDistrPrD;
double fProbLogDistr;
// parameters of nuclear distruction
// NOTE (JVY): there're 3 cases here:
// * baryon projectile
// * anti-baryon projectile
// * meson projectile
// double fBaryonMaxNumberOfCollisions; // D=2.
// void SetBaryonProbOfInteraction( const double ); // ??? this is prob. of inelastic interaction
// that is set internally based on certain conditions...
// general (i.e. for used for baryons,anti-baryons, and mesons)
// NOTE: these parameters have stayed THE SAME for quite a while
double fNuclearProjDestructP1;
bool fNuclearProjDestructP1_NBRNDEP;
double fNuclearTgtDestructP1;
bool fNuclearTgtDestructP1_ADEP;
double fNuclearProjDestructP2;
double fNuclearProjDestructP3;
double fNuclearTgtDestructP2;
double fNuclearTgtDestructP3;
//
double fPt2NuclearDestructP1;
double fPt2NuclearDestructP2;
double fPt2NuclearDestructP3;
double fPt2NuclearDestructP4;
// baryons... well, in fact also mesons...
double fR2ofNuclearDestruct;
double fExciEnergyPerWoundedNucleon;
double fDofNuclearDestruct;
double fMaxPt2ofNuclearDestruct;
};
class G4FTFParamCollBaryonProj : public G4FTFParamCollection {
public:
G4FTFParamCollBaryonProj();
virtual void SetTune1() override; // Set-up the baryon part of the 1st tune
virtual void SetTune2() override; // Set-up the baryon part of the 2nd tune
virtual void SetTune3() override; // Set-up the baryon part of the 3rd tune
virtual void SetTune4() override; // Set-up the baryon part of the 4th tune
virtual void SetTune5() override; // Set-up the baryon part of the 5th tune
virtual void SetTune6() override; // Set-up the baryon part of the 6th tune
virtual void SetTune7() override; // Set-up the baryon part of the 7th tune
virtual void SetTune8() override; // Set-up the baryon part of the 8th tune
virtual void SetTune9() override; // Set-up the baryon part of the 9th tune
//...
};
class G4FTFParamCollMesonProj : public G4FTFParamCollection {
public:
G4FTFParamCollMesonProj();
virtual void SetTune1() override; // Set-up the meson part of the 1st tune
virtual void SetTune2() override; // Set-up the meson part of the 2nd tune
virtual void SetTune3() override; // Set-up the meson part of the 3rd tune
virtual void SetTune4() override; // Set-up the meson part of the 4th tune
virtual void SetTune5() override; // Set-up the meson part of the 5th tune
virtual void SetTune6() override; // Set-up the meson part of the 6th tune
virtual void SetTune7() override; // Set-up the meson part of the 7th tune
virtual void SetTune8() override; // Set-up the meson part of the 8th tune
virtual void SetTune9() override; // Set-up the meson part of the 9th tune
//...
};
class G4FTFParamCollPionProj : public G4FTFParamCollMesonProj {
public:
G4FTFParamCollPionProj();
virtual void SetTune1() override; // Set-up the pion part of the 1st tune
virtual void SetTune2() override; // Set-up the pion part of the 2nd tune
virtual void SetTune3() override; // Set-up the pion part of the 3rd tune
virtual void SetTune4() override; // Set-up the pion part of the 4th tune
virtual void SetTune5() override; // Set-up the pion part of the 5th tune
virtual void SetTune6() override; // Set-up the pion part of the 6th tune
virtual void SetTune7() override; // Set-up the pion part of the 7th tune
virtual void SetTune8() override; // Set-up the pion part of the 8th tune
virtual void SetTune9() override; // Set-up the pion part of the 9th tune
//...
};
#endif
@@ -0,0 +1,54 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//---------------------------------------------------------------------------
// ClassName: G4FTFTuningsMessenger
// Author: Alberto Ribon
// Date: August 2022
// Description: messenger class for the class G4FTFTunings
//---------------------------------------------------------------------------
#ifndef G4FTFTuningsMessenger_h
#define G4FTFTuningsMessenger_h 1
#include "G4UImessenger.hh"
#include "globals.hh"
class G4UIcommand;
class G4UIcmdWithAnInteger;
class G4UIcmdWithAString;
class G4FTFTuningsMessenger : public G4UImessenger {
public:
explicit G4FTFTuningsMessenger();
~G4FTFTuningsMessenger();
void SetNewValue ( G4UIcommand *command, G4String newValues ) override;
private:
G4UIcmdWithAnInteger* theFTFTuneIndexCmd;
G4UIcmdWithAString* theFTFTuneNameCmd;
};
#endif
@@ -10,6 +10,8 @@ geant4_add_module(G4had_string_diff
G4FTFModel.hh
G4FTFParameters.hh
G4FTFParticipants.hh
G4FTFTunings.hh
G4FTFTuningsMessenger.hh
SOURCES
G4DiffractiveExcitation.cc
G4DiffractiveSplitableHadron.cc
@@ -17,7 +19,9 @@ geant4_add_module(G4had_string_diff
G4FTFAnnihilation.cc
G4FTFModel.cc
G4FTFParameters.cc
G4FTFParticipants.cc)
G4FTFParticipants.cc
G4FTFTunings.cc
G4FTFTuningsMessenger.cc)
geant4_module_link_libraries(G4had_string_diff
PUBLIC
@@ -26,6 +30,7 @@ geant4_module_link_libraries(G4had_string_diff
G4had_string_man
G4hadronic_util
G4hepgeometry
G4intercoms
PRIVATE
G4had_string_frag
G4hadronic_xsect
@@ -384,7 +384,7 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
if ( ProjExchangeQ != TargQ1 ) NpossibleStates++;
if ( ProjExchangeQ != TargQ2 ) NpossibleStates++;
if ( ProjExchangeQ != TargQ3 ) NpossibleStates++;
G4int Nsampled = G4RandFlat::shootInt( G4long( NpossibleStates ) ) + 1;
G4int Nsampled = (G4int)G4RandFlat::shootInt( G4long( NpossibleStates ) )+1;
NpossibleStates = 0;
if ( ProjExchangeQ != TargQ1 ) {
if ( ++NpossibleStates == Nsampled ) {
@@ -415,26 +415,42 @@ ExciteParticipants_doChargeExchange( G4VSplitableHadron* projectile,
while ( attempts++ < maxNumberOfAttempts ) { /* Loop checking, 10.08.2015, A.Ribon */
// Determination of a new projectile ID which satisfies energy-momentum conservation
G4double ProbSpin0 = 0.5;
G4double Ksi = G4UniformRand();
if ( aProjQ1 == aProjQ2 ) {
if ( aProjQ1 < 3 ) {
NewProjCode = 111; // Pi0-meson
if ( Ksi < 0.5 ) {
NewProjCode = 221; // Eta-meson
if ( Ksi < 0.25 ) {
NewProjCode = 331; // Eta'-meson
}
}
} else if ( aProjQ1 == 3 ) {
NewProjCode = 221; // Eta-meson
if ( Ksi < 0.5 ) {
NewProjCode = 331; // Eta'-meson
}
} else if ( aProjQ1 == 4 ) {
NewProjCode = 441; // Eta_c
} else if ( aProjQ1 == 5 ) {
NewProjCode = 553; // Upsilon
}
if ( G4UniformRand() < ProbSpin0 ) { // Meson spin = 0 (pseudo-scalar)
if ( aProjQ1 < 3 ) {
NewProjCode = 111; // pi0
if ( Ksi < 0.5 ) {
NewProjCode = 221; // eta
if ( Ksi < 0.25 ) {
NewProjCode = 331; // eta'
}
}
} else if ( aProjQ1 == 3 ) {
NewProjCode = 221; // eta
if ( Ksi < 0.5 ) {
NewProjCode = 331; // eta'
}
} else if ( aProjQ1 == 4 ) {
NewProjCode = 441; // eta_c(1S)
} else if ( aProjQ1 == 5 ) {
NewProjCode = 551; // eta_b(1S)
}
} else { // Meson spin = 1 (vector meson)
if ( aProjQ1 < 3 ) {
NewProjCode = 113; // rho0
if ( Ksi < 0.5 ) {
NewProjCode = 223; // omega
}
} else if ( aProjQ1 == 3 ) {
NewProjCode = 333; // phi
} else if ( aProjQ1 == 4 ) {
NewProjCode = 443; // J/psi(1S)
} else if ( aProjQ1 == 5 ) {
NewProjCode = 553; // Upsilon(1S)
}
}
} else {
if ( aProjQ1 > aProjQ2 ) {
NewProjCode = aProjQ1*100 + aProjQ2*10 + 1;
@@ -202,6 +202,16 @@ void G4DiffractiveSplitableHadron::ChooseStringEnds( G4int PDGcode, G4int* aEnd,
G4int j100 = (PDGcode % 1000)/100;
G4int j10 = (PDGcode % 100)/10;
if ( absPDGcode > 4000 ) {
*aEnd = j10;
if ( G4UniformRand() > 0.25 ) {
*bEnd = Diquark( j1000, j100, 0 );
} else {
*bEnd = Diquark( j1000, j100, 1 );
}
return;
}
G4double SuppresUUDDSS=1.0/2.0;
if ((j1000 == j100) && (j1000 == j10)) SuppresUUDDSS=1.;
@@ -292,8 +292,99 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
G4cout << "Process a, 3 shirt diagram" << G4endl;
#endif
// Sampling kinematical properties of quark. It can be done before string's creation
const G4int maxNumberOfLoops = 1000;
G4double MassQ2 = 0.0; // Simplest case is considered with Mass_Q = 0.0
// In principle, this must work with Mass_Q != 0.0
G4double Quark_Xs[6];
G4ThreeVector Quark_Mom[6];
G4double Alfa_R = 0.5;
G4double AveragePt2 = 200.0*200.0, maxPtSquare = common.S;
G4double ScaleFactor = 1.0;
G4double Alfa = 0.0, Beta = 0.0;
G4int NumberOfTries = 0, loopCounter = 0;
do {
// Sampling X's of anti-baryon and baryon
G4double x1 = 0.0, x2 = 0.0, x3 = 0.0;
G4double Product = 1.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // anti-baryon (1st case), baryon (2nd case)
G4double r1 = G4UniformRand(), r2 = G4UniformRand();
if ( Alfa_R == 1.0 ) {
x1 = 1.0 - std::sqrt( r1 );
x2 = (1.0 - x1) * r2;
} else {
x1 = sqr( r1 );
x2 = (1.0 - x1) * sqr( std::sin( pi/2.0*r2 ) );
}
x3 = 1.0 - x1 - x2;
G4int index = iCase*3; // 0 for anti-baryon, 3 for baryon
Quark_Xs[index] = x1; Quark_Xs[index+1] = x2; Quark_Xs[index+2] = x3;
Product *= (x1*x2*x3);
}
if ( Product == 0.0 ) continue;
++NumberOfTries;
if ( NumberOfTries == 100*(NumberOfTries/100) ) {
// After a large number of tries, it is better to reduce the values of <Pt^2>
ScaleFactor /= 2.0;
AveragePt2 *= ScaleFactor;
}
G4ThreeVector PtSum( 0.0, 0.0, 0.0 );
for ( G4int i = 0; i < 6; ++i ) {
Quark_Mom [i] = GaussianPt( AveragePt2, maxPtSquare );
PtSum += Quark_Mom[i];
}
PtSum /= 6.0;
Alfa = 0.0; Beta = 0.0;
for ( G4int i = 0; i < 6; ++i ) { // Loop over the quarks and (anti-)quarks
Quark_Mom[i] -= PtSum;
G4double val = ( Quark_Mom[i].mag2() + MassQ2 ) / Quark_Xs[i];
if ( i < 3 ) { // anti-baryon
Alfa += val;
} else { // baryon (iCase == 1)
Beta += val;
}
}
} while ( ( std::sqrt( Alfa ) + std::sqrt( Beta ) > common.SqrtS ) &&
++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
return false;
}
G4double DecayMomentum2 = sqr(common.S) + sqr(Alfa) + sqr(Beta)
- 2.0*( common.S*(Alfa + Beta) + Alfa*Beta );
G4double WminusTarget = 0.0, WplusProjectile = 0.0;
WminusTarget = ( common.S - Alfa + Beta + std::sqrt( DecayMomentum2 ) ) / 2.0 / common.SqrtS;
WplusProjectile = common.SqrtS - Beta/WminusTarget;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // anti-baryon (1st case), baryon (2nd case)
G4int index = iCase*3; // 0 for anti-baryon, 3 for baryon
G4double w = WplusProjectile; // for anti-baryon
if ( iCase == 1 ) w = - WminusTarget; // for baryon
for ( G4int i = 0; i < 3; ++i ) {
G4double Pz = w * Quark_Xs[index+i] / 2.0 -
( Quark_Mom[index+i].mag2() + MassQ2 ) /
( 2.0 * w * Quark_Xs[index+i] );
Quark_Mom[index+i].setZ( Pz );
}
}
// Sampling of anti-quark order in projectile
G4int SampledCase = G4RandFlat::shootInt( G4long( 6 ) );
G4int SampledCase = (G4int)G4RandFlat::shootInt( 6 );
G4int Tmp1 = 0, Tmp2 = 0;
switch ( SampledCase ) {
case 1 : Tmp1 = common.AQ[1]; common.AQ[1] = common.AQ[2]; common.AQ[2] = Tmp1; break;
@@ -329,7 +420,7 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
G4int absAntiQuark = std::abs( antiQuark ), absQuark = std::abs( quark );
G4double aKsi = G4UniformRand();
if ( absAntiQuark == absQuark ) {
if ( absAntiQuark != 3 ) {
if ( absAntiQuark != 3 ) { // Not yet considered the case absAntiQuark 4 (charm) and 5 (bottom)
NewCode = 111; // Pi0-meson
if ( aKsi < 0.5 ) {
NewCode = 221; // Eta -meson
@@ -343,7 +434,7 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
NewCode = 331; // Eta'-meson
}
}
} else {
} else { // Vector mesons - rho, omega, phi (not yet considered the analogous cases for charm and bottom)
if ( absAntiQuark > absQuark ) {
NewCode = absAntiQuark*100 + absQuark*10 + 1; NewCode *= absAntiQuark/antiQuark;
} else {
@@ -355,8 +446,8 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
if ( ! TestParticle ) return false;
if ( iString == 0 ) {
projectile->SetDefinition( TestParticle );
theParameters->SetProjMinDiffMass( 0.5 );
theParameters->SetProjMinNonDiffMass( 0.5 );
theParameters->SetProjMinDiffMass( 0.5 ); // 0.5 GeV : Min diffractive mass of pi-meson
theParameters->SetProjMinNonDiffMass( 0.5 ); // It must be self-consistent with Parameters
} else if ( iString == 1 ) {
target->SetDefinition( TestParticle );
theParameters->SetTarMinDiffMass( 0.5 );
@@ -369,106 +460,8 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
}
} // End of the for loop over the 3 string cases
// Sampling kinematical properties:
// 1st string AQ[0]-Q[0], 2nd string AQ[1]-Q[1], 3rd string AQ[2]-Q[2]
G4ThreeVector Quark_Mom[6];
G4double ModMom2[6];
G4double AveragePt2 = 200.0*200.0, maxPtSquare = common.S, SumMt = 0.0, MassQ2 = 0.0,
ScaleFactor = 1.0;
G4int NumberOfTries = 0, loopCounter = 0;
const G4int maxNumberOfLoops = 1000;
do {
++NumberOfTries;
if ( NumberOfTries == 100*(NumberOfTries/100) ) {
// At large number of tries it would be better to reduce the values of <Pt^2>
ScaleFactor /= 2.0;
AveragePt2 *= ScaleFactor;
}
G4ThreeVector PtSum( 0.0, 0.0, 0.0 );
for ( G4int i = 0; i < 6; ++i ) {
Quark_Mom [i] = GaussianPt( AveragePt2, maxPtSquare );
PtSum += Quark_Mom[i];
}
PtSum /= 6.0;
SumMt = 0.0;
for ( G4int i = 0; i < 6; ++i ) {
Quark_Mom[i] -= PtSum;
ModMom2[i] = Quark_Mom[i].mag2();
SumMt += std::sqrt( ModMom2[i] + MassQ2 );
}
} while ( ( SumMt > common.SqrtS ) &&
++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
return false;
}
// Sampling X's of anti-baryon and baryon
G4double WminusTarget = 0.0, WplusProjectile = 0.0;
G4double Alfa_R = 0.5;
G4bool Success = true;
NumberOfTries = 0; loopCounter = 0;
do {
Success = true;
++NumberOfTries;
G4double Alfa = 0.0, Beta = 0.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // anti-baryon (1st case), baryon (2nd case)
G4double x1 = 0.0, x2 = 0.0;
G4double r1 = G4UniformRand(), r2 = G4UniformRand();
if ( Alfa_R == 1.0 ) {
x1 = 1.0 - std::sqrt( r1 );
x2 = (1.0 - x1) * r2;
} else {
x1 = sqr( r1 );
x2 = (1.0 - x1) * sqr( std::sin( pi/2.0*r2 ) );
}
G4double x3 = 1.0 - x1 - x2;
G4int index = iCase*3; // 0 for anti-baryon, 3 for baryon
Quark_Mom[index].setZ( x1 ); Quark_Mom[index+1].setZ( x2 ); Quark_Mom[index+2].setZ( x3 );
for ( G4int i = 0; i < 3; ++i ) { // Loop over the 3 (anti-)quarks
if ( Quark_Mom[index+i].getZ() != 0.0 ) {
G4double val = ( ModMom2[index+i] + MassQ2 ) / Quark_Mom[index+i].getZ();
if ( iCase == 0 ) { // anti-baryon
Alfa += val;
} else { // baryon (iCase == 1)
Beta += val;
}
} else {
Success = false;
}
}
}
if ( ! Success ) continue;
if ( std::sqrt( Alfa ) + std::sqrt( Beta ) > common.SqrtS ) {
Success = false;
continue;
}
G4double DecayMomentum2 = sqr(common.S) + sqr(Alfa) + sqr(Beta)
- 2.0*( common.S*(Alfa + Beta) + Alfa*Beta );
WminusTarget = ( common.S - Alfa + Beta + std::sqrt( DecayMomentum2 ) ) / 2.0 / common.SqrtS;
WplusProjectile = common.SqrtS - Beta/WminusTarget;
} while ( ( ! Success ) &&
++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
return false;
}
G4double SqrtScaleF = 1.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // anti-baryon (1st case), baryon (2nd case)
G4int index = iCase*3; // 0 for anti-baryon, 3 for baryon
G4double w = WplusProjectile; // for anti-baryon
if ( iCase == 1 ) w = - WminusTarget; // for baryon
for ( G4int i = 0; i < 3; ++i ) {
G4double Pz = w * Quark_Mom[index+i].getZ() / 2.0 -
( ScaleFactor * ModMom2[index+i] + MassQ2 ) /
( 2.0 * w * Quark_Mom[index+i].getZ() );
Quark_Mom[index+i].setZ( Pz );
if ( ScaleFactor != 1.0 ) {
Quark_Mom[index+i].setX( SqrtScaleF * Quark_Mom[index+i].getX() );
Quark_Mom[index+i].setY( SqrtScaleF * Quark_Mom[index+i].getY() );
}
}
}
G4LorentzVector Pstring1, Pstring2, Pstring3;
G4int QuarkOrder[3] = { 0 };
G4double YstringMax = 0.0, YstringMin = 0.0;
@@ -542,6 +535,16 @@ Create3QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
common.Ptarget = Pstring3; // Lowest rapidity
G4LorentzVector LeftString( Pstring2 ); // Middle rapidity
if ( common.RotateStrings ) {
common.Pprojectile *= common.RandomRotation;
common.Ptarget *= common.RandomRotation;
LeftString *= common.RandomRotation;
}
common.Pprojectile.transform( common.toLab );
common.Ptarget.transform( common.toLab );
LeftString.transform( common.toLab );
// Calculation of the creation time
// Creation time and position of target nucleon were determined in ReggeonCascade() of G4FTFModel
projectile->SetTimeOfCreation( target->GetTimeOfCreation() );
@@ -579,7 +582,7 @@ Create1DiquarkAntiDiquarkString( G4VSplitableHadron* projectile,
G4int CandidatsN = 0, CandAQ[9][2] = {}, CandQ[9][2] = {};
for ( G4int iAQ = 0; iAQ < 3; ++iAQ ) { // index of the 3 constituent anti-quarks of the antibaryon projectile
for ( G4int iQ = 0; iQ < 3; ++iQ ) { // index of the 3 constituent quarks of the nucleon target
for ( G4int iQ = 0; iQ < 3; ++iQ ) { // index of the 3 constituent quarks of the target nucleon
if ( -common.AQ[iAQ] == common.Q[iQ] ) { // antiquark - quark that can annihilate
// Here "0", "1", "2" means, respectively, "first", "second" and "third" constituent
// of the (anti-baryon) projectile or (nucleon) target.
@@ -597,7 +600,7 @@ Create1DiquarkAntiDiquarkString( G4VSplitableHadron* projectile,
// Remaining two (anti-)quarks that form the (anti-)diquark
G4int LeftAQ1 = 0, LeftAQ2 = 0, LeftQ1 = 0, LeftQ2 = 0;
if ( CandidatsN != 0 ) {
G4int SampledCase = G4RandFlat::shootInt( G4long( CandidatsN ) );
G4int SampledCase = (G4int)G4RandFlat::shootInt( CandidatsN );
LeftAQ1 = common.AQ[ CandAQ[SampledCase][0] ];
LeftAQ2 = common.AQ[ CandAQ[SampledCase][1] ];
LeftQ1 = common.Q[ CandQ[SampledCase][0] ];
@@ -622,8 +625,9 @@ Create1DiquarkAntiDiquarkString( G4VSplitableHadron* projectile,
projectile->SetFirstParton( DQ );
projectile->SetSecondParton( Anti_DQ );
G4LorentzVector Pquark = G4LorentzVector( 0.0, 0.0, common.SqrtS/2.0, common.SqrtS/2.0 );
G4LorentzVector Paquark = G4LorentzVector( 0.0, 0.0, -common.SqrtS/2.0, common.SqrtS/2.0 );
// It is assumed that quark and di-quark masses are 0.
G4LorentzVector Pquark = G4LorentzVector( 0.0, 0.0, -common.SqrtS/2.0, common.SqrtS/2.0 );
G4LorentzVector Paquark = G4LorentzVector( 0.0, 0.0, common.SqrtS/2.0, common.SqrtS/2.0 );
if ( common.RotateStrings ) {
Pquark *= common.RandomRotation;
@@ -658,6 +662,9 @@ Create1DiquarkAntiDiquarkString( G4VSplitableHadron* projectile,
return 0; // Completed successfully: nothing else to be done
} // End of if ( CandidatsN != 0 )
// If we allow the string to interact with other nuclear nucleons, we have to
// set up MinDiffrMass in Parameters, and ascribe a PDGEncoding. To be done yet!
return 1; // Successfully ended, but the work is not over
}
@@ -680,6 +687,91 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
<< G4endl;
#endif
// Sampling kinematical properties: 1st string LeftAQ1-LeftQ1, 2nd string LeftAQ2-LeftQ2
G4ThreeVector Quark_Mom[4];
G4double Quark_Xs[4];
G4double AveragePt2 = 200.0*200.0, maxPtSquare = common.S, MassQ2 = 0.0, ScaleFactor = 1.0;
G4int NumberOfTries = 0, loopCounter = 0;
const G4int maxNumberOfLoops = 1000;
G4double Alfa = 0.0, Beta = 0.0;
G4double WminusTarget = 0.0, WplusProjectile = 0.0, Alfa_R = 0.5;
do {
// Sampling X's of the 2 quarks and 2 anti-quarks
G4double Product = 1.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // Loop over the two strings
G4double x = 0.0, r = G4UniformRand();
if ( Alfa_R == 1.0 ) {
if ( iCase == 0 ) { // first string
x = std::sqrt( r );
} else { // second string
x = 1.0 - std::sqrt( r );
}
} else {
x = sqr( std::sin( pi/2.0*r ) );
}
G4int index = iCase*2; // 0 for the first string, 2 for the second string
Quark_Xs[index] = x ; Quark_Xs[index+1] = 1.0 - x ;
Product *= x*(1.0-x);
}
if ( Product == 0.0 ) continue;
++NumberOfTries;
if ( NumberOfTries == 100*(NumberOfTries/100) ) {
// After a large number of tries, it is better to reduce the values of <Pt^2>
ScaleFactor /= 2.0;
AveragePt2 *= ScaleFactor;
}
G4ThreeVector PtSum( 0.0, 0.0, 0.0 );
for( G4int i = 0; i < 4; ++i ) {
Quark_Mom[i] = GaussianPt( AveragePt2, maxPtSquare );
PtSum += Quark_Mom[i];
}
PtSum /= 4.0;
for ( G4int i = 0; i < 4; ++i ) {
Quark_Mom[i] -= PtSum;
}
Alfa = 0.0; Beta = 0.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) {
G4int index = iCase * 2;
for ( G4int i = 0; i < 2; ++i ) {
G4double val = ( Quark_Mom[index+i].mag2() + MassQ2 ) / Quark_Xs[index+i];
if ( iCase == 0 ) { // first string
Alfa += val;
} else { // second string
Beta += val;
}
}
}
} while ( ( std::sqrt( Alfa ) + std::sqrt( Beta ) > common.SqrtS ) &&
++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
return 99; // unsuccessfully ended, nothing else can be done
}
G4double DecayMomentum2 = sqr(common.S) + sqr(Alfa) + sqr(Beta)
- 2.0*( common.S*(Alfa + Beta) + Alfa*Beta );
WminusTarget = ( common.S - Alfa + Beta + std::sqrt( DecayMomentum2 ) ) / 2.0 / common.SqrtS;
WplusProjectile = common.SqrtS - Beta/WminusTarget;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // Loop over the two strings
G4int index = iCase*2; // 0 for the first string, 2 for the second string
for ( G4int i = 0; i < 2; ++i ) {
G4double w = WplusProjectile; // For the first string
if ( iCase == 1 ) w = - WminusTarget; // For the second string
G4double Pz = w * Quark_Xs[index+i] / 2.0
- ( Quark_Mom[index+i].mag2() + MassQ2 ) /
( 2.0 * w * Quark_Xs[index+i] );
Quark_Mom[index+i].setZ( Pz );
}
}
G4int CandidatsN = 0, CandAQ[9][2] = {}, CandQ[9][2] = {};
G4int LeftAQ1 = 0, LeftAQ2 = 0, LeftQ1 = 0, LeftQ2 = 0;
for ( G4int iAQ = 0; iAQ < 3; ++iAQ ) { // index of the 3 constituent anti-quarks of the antibaryon projectile
@@ -699,7 +791,7 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
}
if ( CandidatsN != 0 ) {
G4int SampledCase = G4RandFlat::shootInt( G4long( CandidatsN ) );
G4int SampledCase = (G4int)G4RandFlat::shootInt( CandidatsN );
LeftAQ1 = common.AQ[ CandAQ[SampledCase][0] ];
LeftAQ2 = common.AQ[ CandAQ[SampledCase][1] ];
if ( G4UniformRand() < 0.5 ) {
@@ -765,104 +857,6 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
}
} // End of loop over the 2 string cases
// Sampling kinematical properties: 1st string LeftAQ1-LeftQ1, 2nd string LeftAQ2-LeftQ2
G4ThreeVector Quark_Mom[4];
G4double ModMom2[4];
G4double AveragePt2 = 200.0*200.0, maxPtSquare = common.S, SumMt = 0.0, MassQ2 = 0.0,
ScaleFactor = 1.0;
G4int NumberOfTries = 0, loopCounter = 0;
const G4int maxNumberOfLoops = 1000;
do {
++NumberOfTries;
if ( NumberOfTries == 100*(NumberOfTries/100) ) {
// At large number of tries it would be better to reduce the values of <Pt^2>
ScaleFactor /= 2.0;
AveragePt2 *= ScaleFactor;
}
G4ThreeVector PtSum( 0.0, 0.0, 0.0 );
for( G4int i = 0; i < 4; ++i ) {
Quark_Mom[i] = GaussianPt( AveragePt2, maxPtSquare );
PtSum += Quark_Mom[i];
}
PtSum /= 4.0;
SumMt = 0.0;
for ( G4int i = 0; i < 4; ++i ) {
Quark_Mom[i] -= PtSum;
ModMom2[i] = Quark_Mom[i].mag2();
SumMt += std::sqrt( ModMom2[i] + MassQ2 );
}
} while ( ( SumMt > common.SqrtS ) &&
++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
return 99; // unsuccessfully ended, nothing else can be done
}
// Sampling X's of the two strings
G4double WminusTarget = 0.0, WplusProjectile = 0.0, Alfa_R = 0.5; ScaleFactor = 1.0;
G4bool Success = true;
NumberOfTries = 0, loopCounter = 0;
do {
Success = true;
++NumberOfTries;
G4double Alfa = 0.0, Beta = 0.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // Loop over the two strings
G4double x = 0.0, r = G4UniformRand();
if ( Alfa_R == 1.0 ) {
if ( iCase == 0 ) { // first string
x = std::sqrt( r );
} else { // second string
x = 1.0 - std::sqrt( r);
}
} else {
x = sqr( std::sin( pi/2.0*r ) );
}
G4int index = iCase*2; // 0 for the first string, 2 for the second string
Quark_Mom[index].setZ( x ); Quark_Mom[index+1].setZ( 1.0 - x );
for ( G4int i = 0; i < 2; ++i ) {
if ( Quark_Mom[i].getZ() != 0.0 ) {
G4double val = ( ModMom2[index+i] + MassQ2 ) / Quark_Mom[index+i].getZ();
if ( iCase == 0 ) { // first string
Alfa += val;
} else { // second string
Beta += val;
}
} else {
Success = false;
}
}
}
if ( ! Success ) continue;
if ( std::sqrt( Alfa ) + std::sqrt( Beta ) > common.SqrtS ) {
Success = false;
continue;
}
G4double DecayMomentum2 = sqr(common.S) + sqr(Alfa) + sqr(Beta)
- 2.0*( common.S*(Alfa + Beta) + Alfa*Beta );
WminusTarget = ( common.S - Alfa + Beta + std::sqrt( DecayMomentum2 ) ) / 2.0 / common.SqrtS;
WplusProjectile = common.SqrtS - Beta/WminusTarget;
} while ( ( ! Success ) &&
++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
if ( loopCounter >= maxNumberOfLoops ) {
return 99; // unsuccessfully ended, nothing else can be done
}
G4double SqrtScaleF = 1.0;
for ( G4int iCase = 0; iCase < 2; ++iCase ) { // Loop over the two strings
G4int index = iCase*2; // 0 for the first string, 2 for the second string
for ( G4int i = 0; i < 2; ++i ) {
G4double w = WplusProjectile; // For the first string
if ( iCase == 1 ) w = - WminusTarget; // For the second string
G4double Pz = w * Quark_Mom[index+i].getZ() / 2.0
- ( ScaleFactor * ModMom2[index+i] + MassQ2 ) /
( 2.0 * w * Quark_Mom[index+i].getZ() );
Quark_Mom[index+i].setZ( Pz );
if ( ScaleFactor != 1.0 ) {
Quark_Mom[index+i].setX( SqrtScaleF * Quark_Mom[index+i].getX() );
Quark_Mom[index+i].setY( SqrtScaleF * Quark_Mom[index+i].getY() );
}
}
}
G4int QuarkOrder[2];
G4LorentzVector Pstring1, Pstring2;
G4double Ystring1 = 0.0, Ystring2 = 0.0;
@@ -897,6 +891,14 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
QuarkOrder[0] = 1; QuarkOrder[1] = 0;
}
if ( common.RotateStrings ) {
common.Pprojectile *= common.RandomRotation;
common.Ptarget *= common.RandomRotation;
}
common.Pprojectile.transform( common.toLab );
common.Ptarget.transform( common.toLab );
G4LorentzVector Quark_4Mom[4];
for ( G4int i = 0; i < 4; ++i ) {
Quark_4Mom[i] = G4LorentzVector( Quark_Mom[i], std::sqrt( Quark_Mom[i].mag2() + MassQ2 ) );
@@ -912,14 +914,6 @@ Create2QuarkAntiQuarkStrings( G4VSplitableHadron* projectile,
target->GetNextParton()->Set4Momentum( Quark_4Mom[QuarkOrder[1]] );
target->GetNextAntiParton()->Set4Momentum( Quark_4Mom[QuarkOrder[1]+2] );
if ( common.RotateStrings ) {
common.Pprojectile *= common.RandomRotation;
common.Ptarget *= common.RandomRotation;
}
common.Pprojectile.transform( common.toLab );
common.Ptarget.transform( common.toLab );
// Calculation of the creation time
// Creation time and position of target nucleon were determined in ReggeonCascade() of G4FTFModel
projectile->SetTimeOfCreation( target->GetTimeOfCreation() );
@@ -986,7 +980,7 @@ Create1QuarkAntiQuarkString( G4VSplitableHadron* projectile,
}
if ( CandidatsN != 0 ) {
G4int SampledCase = G4RandFlat::shootInt( G4long( CandidatsN ) );
G4int SampledCase = (G4int)G4RandFlat::shootInt( CandidatsN );
LeftAQ = common.AQ[ CandAQ[SampledCase] ];
LeftQ = common.Q[ CandQ[SampledCase] ];
@@ -1034,8 +1028,11 @@ Create1QuarkAntiQuarkString( G4VSplitableHadron* projectile,
common.Pprojectile.setPz( 0.0 );
common.Pprojectile.setE( common.SqrtS );
G4LorentzVector Pquark = G4LorentzVector( 0.0, 0.0, common.SqrtS/2.0, common.SqrtS/2.0 );
G4LorentzVector Paquark = G4LorentzVector( 0.0, 0.0, -common.SqrtS/2.0, common.SqrtS/2.0 );
common.Pprojectile.transform( common.toLab );
G4LorentzVector Pquark = G4LorentzVector( 0.0, 0.0, -common.SqrtS/2.0, common.SqrtS/2.0 );
G4LorentzVector Paquark = G4LorentzVector( 0.0, 0.0, +common.SqrtS/2.0, common.SqrtS/2.0 );
if ( common.RotateStrings ) {
Pquark *= common.RandomRotation; Paquark *= common.RandomRotation;
}
@@ -704,7 +704,7 @@ G4bool G4FTFModel::PutOnMassShell() {
G4double M2target = 0.0;
G4double WminusTarget = 0.0;
G4int NumberOfTries = 0;
G4double ScaleFactor = 1.0;
G4double ScaleFactor = 2.0;
G4bool OuterSuccess = true;
const G4int maxNumberOfLoops = 1000;
@@ -958,29 +958,14 @@ G4bool G4FTFModel::ExciteParticipants() {
G4cout << "Annihilation" << G4endl;
#endif
NumberOfNNcollisions++;
// Skipping possible interactions of the annihilated nucleons
while ( theParticipants.Next() ) { /* Loop checking, 10.08.2015, A.Ribon */
G4InteractionContent& acollision = theParticipants.GetInteraction();
G4VSplitableHadron* NextProjectileNucleon = acollision.GetProjectile();
G4VSplitableHadron* NextTargetNucleon = acollision.GetTarget();
if ( projectile == NextProjectileNucleon || target == NextTargetNucleon ) {
acollision.SetStatus( 0 );
}
}
// Return to the annihilation
theParticipants.StartLoop();
for ( G4int I = 0; I < CurrentInteraction; ++I ) theParticipants.Next();
// At last, annihilation
if ( ! HighEnergyInter ) {
G4bool Annihilation = true;
G4bool Result = AdjustNucleons( projectile, ProjectileNucleon, target,
TargetNucleon, Annihilation );
if ( ! Result ) continue;
}
}
G4VSplitableHadron* AdditionalString = 0;
if ( theAnnihilation->Annihilate( projectile, target, AdditionalString, theParameters ) ) {
InnerSuccess = true;
@@ -993,6 +978,22 @@ G4bool G4FTFModel::ExciteParticipants() {
if ( AdditionalString != 0 ) theAdditionalString.push_back( AdditionalString );
NumberOfNNcollisions++;
// Skipping possible interactions of the annihilated nucleons
while ( theParticipants.Next() ) { /* Loop checking, 10.08.2015, A.Ribon */
G4InteractionContent& acollision = theParticipants.GetInteraction();
G4VSplitableHadron* NextProjectileNucleon = acollision.GetProjectile();
G4VSplitableHadron* NextTargetNucleon = acollision.GetTarget();
if ( projectile == NextProjectileNucleon || target == NextTargetNucleon ) {
acollision.SetStatus( 0 );
}
}
// Continue the interactions
theParticipants.StartLoop();
for ( G4int i = 0; i < CurrentInteraction; ++i ) theParticipants.Next();
/*
if ( target->GetStatus() == 4 ) {
// Skipping possible interactions of the annihilated nucleons
@@ -1046,7 +1047,7 @@ G4bool G4FTFModel::AdjustNucleons( G4VSplitableHadron* SelectedAntiBaryon,
<< "Tr ResidualMassNumber Tr ResidualCharge Tr ResidualExcitationEnergy "
<< TargetResidualMassNumber << " " << TargetResidualCharge << " "
<< TargetResidualExcitationEnergy << G4endl
<< "Collis. pr tr " << SelectedAntiBaryon->GetSoftCollisionCount()
<< "Collis. pr tr " << SelectedAntiBaryon->GetSoftCollisionCount() << " "
<< SelectedTargetNucleon->GetSoftCollisionCount() << G4endl;
#endif
@@ -1245,13 +1246,34 @@ G4int G4FTFModel::AdjustNucleonsAlgorithm_beforeSampling( G4int interactionCase,
common.PResidualExcitationEnergy = 0.0;
}
if ( common.PResidualMassNumber != 0 ) {
if ( common.PResidualLambdaNumber > 0 ) {
common.PResidualMass = G4HyperNucleiProperties::GetNuclearMass( common.PResidualMassNumber,
common.PResidualCharge,
common.PResidualLambdaNumber );
if ( common.PResidualMassNumber == 1 ) {
if ( std::abs( common.PResidualCharge ) == 1 ) {
common.PResidualMass = G4Proton::Definition()->GetPDGMass();
} else if ( common.PResidualLambdaNumber == 1 ) {
common.PResidualMass = G4Lambda::Definition()->GetPDGMass();
} else {
common.PResidualMass = G4Neutron::Definition()->GetPDGMass();
}
} else {
common.PResidualMass = G4ParticleTable::GetParticleTable()->GetIonTable()
->GetIonMass( common.PResidualCharge, common.PResidualMassNumber );
if ( common.PResidualLambdaNumber > 0 ) {
if ( common.PResidualMassNumber == 2 ) {
common.PResidualMass = G4Lambda::Definition()->GetPDGMass();
if ( std::abs( common.PResidualCharge ) == 1 ) { // lambda + proton
common.PResidualMass += G4Proton::Definition()->GetPDGMass();
} else if ( common.PResidualLambdaNumber == 1 ) { // lambda + neutron
common.PResidualMass += G4Neutron::Definition()->GetPDGMass();
} else { // lambda + lambda
common.PResidualMass += G4Lambda::Definition()->GetPDGMass();
}
} else {
common.PResidualMass = G4HyperNucleiProperties::GetNuclearMass( common.PResidualMassNumber,
std::abs( common.PResidualCharge ),
common.PResidualLambdaNumber );
}
} else {
common.PResidualMass = G4ParticleTable::GetParticleTable()->GetIonTable()->
GetIonMass( std::abs( common.PResidualCharge ), common.PResidualMassNumber );
}
}
}
common.PNucleonMass = ProjectileNucleon->GetDefinition()->GetPDGMass(); // On-shell (anti-)nucleon mass
@@ -1264,8 +1286,8 @@ G4int G4FTFModel::AdjustNucleonsAlgorithm_beforeSampling( G4int interactionCase,
common.TResidualExcitationEnergy = 0.0;
}
if ( common.TResidualMassNumber != 0 ) {
common.TResidualMass = G4ParticleTable::GetParticleTable()->GetIonTable()
->GetIonMass( common.TResidualCharge, common.TResidualMassNumber );
common.TResidualMass = G4ParticleTable::GetParticleTable()->GetIonTable()->
GetIonMass( common.TResidualCharge, common.TResidualMassNumber );
}
common.TNucleonMass = TargetNucleon->GetDefinition()->GetPDGMass(); // On-shell nucleon mass
common.SumMasses = common.PNucleonMass + common.PResidualMass + common.TNucleonMass
@@ -1930,14 +1952,17 @@ void G4FTFModel::AdjustNucleonsAlgorithm_afterSampling( G4int interactionCase,
ProjectileResidualMassNumber = common.TResidualMassNumber;
ProjectileResidualCharge = common.TResidualCharge;
ProjectileResidualExcitationEnergy = common.TResidualExcitationEnergy;
ProjectileResidualLambdaNumber = common.PResidualLambdaNumber;
} else { // interactionCase == 3
ProjectileResidualMassNumber = common.PResidualMassNumber;
ProjectileResidualCharge = common.PResidualCharge;
ProjectileResidualExcitationEnergy = common.PResidualExcitationEnergy;
ProjectileResidualLambdaNumber = common.PResidualLambdaNumber;
}
#ifdef debugAdjust
G4cout << "ProjectileResidualMassNumber ProjectileResidualCharge ProjectileResidualExcitationEnergy "
G4cout << "ProjectileResidualMassNumber ProjectileResidualCharge Lambdas ProjectileResidualExcitationEnergy "
<< ProjectileResidualMassNumber << " " << ProjectileResidualCharge << " "
<< ProjectileResidualLambdaNumber << " "
<< ProjectileResidualExcitationEnergy << G4endl;
#endif
if ( ProjectileResidualMassNumber != 0 ) {
@@ -2311,7 +2336,7 @@ void G4FTFModel::GetResiduals() {
#ifdef debugFTFmodel
G4VSplitableHadron* targetSplitable = aNucleon->GetSplitableHadron();
G4cout << i << " Hit? " << aNucleon->AreYouHit() << " " << targetSplitable << G4endl;
G4cout << i << " Hit? " << aNucleon->AreYouHit() << " pointer " << targetSplitable << G4endl;
if ( targetSplitable ) G4cout << i << "Status " << targetSplitable->GetStatus() << G4endl;
#endif
@@ -2413,7 +2438,7 @@ void G4FTFModel::GetResiduals() {
#ifdef debugFTFmodel
G4VSplitableHadron* projSplitable = aNucleon->GetSplitableHadron();
G4cout << i << " Hit? " << aNucleon->AreYouHit() << " " << projSplitable << G4endl;
G4cout << i << " Hit? " << aNucleon->AreYouHit() << " pointer " << projSplitable << G4endl;
if ( projSplitable ) G4cout << i << "Status " << projSplitable->GetStatus() << G4endl;
#endif
@@ -2691,7 +2716,7 @@ ComputeNucleusProperties( G4V3DNucleus* nucleus, // input paramete
}
#ifdef debugPutOnMassShell
G4cout << "ExcitationEnergyPerWoundedNucleon " << ExcitationEnergyPerWoundedNucleon << G4endl
<< "\t Residual Charge, MassNumber (LambdaNumber" << residualCharge << " "
<< "\t Residual Charge, MassNumber (Number of Lambdas)" << residualCharge << " "
<< residualMassNumber << " (" << residualNumberOfLambdas << ") "
<< G4endl << "\t Initial Momentum " << nucleusMomentum
<< G4endl << "\t Residual Momentum " << residualMomentum << G4endl;
@@ -2702,15 +2727,34 @@ ComputeNucleusProperties( G4V3DNucleus* nucleus, // input paramete
residualMass = 0.0;
residualExcitationEnergy = 0.0;
} else {
if ( residualNumberOfLambdas > 0 ) {
residualMass = G4HyperNucleiProperties::GetNuclearMass( residualMassNumber, residualCharge,
residualNumberOfLambdas );
} else {
residualMass = G4ParticleTable::GetParticleTable()->GetIonTable()->
GetIonMass( residualCharge, residualMassNumber );
}
if ( residualMassNumber == 1 ) {
if ( std::abs( residualCharge ) == 1 ) {
residualMass = G4Proton::Definition()->GetPDGMass();
} else if ( residualNumberOfLambdas == 1 ) {
residualMass = G4Lambda::Definition()->GetPDGMass();
} else {
residualMass = G4Neutron::Definition()->GetPDGMass();
}
residualExcitationEnergy = 0.0;
} else {
if ( residualNumberOfLambdas > 0 ) {
if ( residualMassNumber == 2 ) {
residualMass = G4Lambda::Definition()->GetPDGMass();
if ( std::abs( residualCharge ) == 1 ) { // lambda + proton
residualMass += G4Proton::Definition()->GetPDGMass();
} else if ( residualNumberOfLambdas == 1 ) { // lambda + neutron
residualMass += G4Neutron::Definition()->GetPDGMass();
} else { // lambda + lambda
residualMass += G4Lambda::Definition()->GetPDGMass();
}
} else {
residualMass = G4HyperNucleiProperties::GetNuclearMass( residualMassNumber, std::abs( residualCharge ),
residualNumberOfLambdas );
}
} else {
residualMass = G4ParticleTable::GetParticleTable()->GetIonTable()->
GetIonMass( std::abs( residualCharge ), residualMassNumber );
}
}
residualMass += residualExcitationEnergy;
}
@@ -2982,8 +3026,14 @@ CheckKinematics( const G4double sValue, // input parameter
G4cout << "decayMomentum2 " << decayMomentum2 << G4endl
<< "\t targetWminus projectileWplus " << targetWminus << " " << projectileWplus << G4endl
<< "\t projectileY targetY " << projectileY << " " << targetY << G4endl;
if ( isProjectileNucleus ) {
G4cout << "Order# of Wounded nucleon i, nucleon Y proj Y nuclY - proj Y " << G4endl;
} else {
G4cout << "Order# of Wounded nucleon i, nucleon Y targ Y nuclY - targ Y " << G4endl;
}
G4cout << G4endl;
#endif
for ( G4int i = 0; i < numberOfInvolvedNucleons; ++i ) {
G4Nucleon* aNucleon = involvedNucleons[i];
if ( ! aNucleon ) continue;
@@ -3000,7 +3050,12 @@ CheckKinematics( const G4double sValue, // input parameter
G4double nucleonY = 0.5 * G4Log( (e + pz)/(e - pz) );
#ifdef debugPutOnMassShell
G4cout << "i nY pY nY-AY AY " << i << " " << nucleonY << " " << projectileY <<G4endl;
if( isProjectileNucleus ) {
G4cout << " " << i << " " << nucleonY << " " << projectileY << " " <<nucleonY - projectileY << G4endl;
} else {
G4cout << " " << i << " " << nucleonY << " " << targetY << " " <<nucleonY - targetY << G4endl;
}
G4cout << G4endl;
#endif
if ( std::abs( nucleonY - nucleusY ) > 2 ||
@@ -3064,7 +3119,11 @@ FinalizeKinematics( const G4double w, // input parame
+ sqr( residual3Momentum.y() );
#ifdef debugPutOnMassShell
G4cout << "w residual3Momentum.z() " << w << " " << residual3Momentum.z() << G4endl;
if ( isProjectileNucleus ) {
G4cout << "Wminus Proj and residual3Momentum.z() " << w << " " << residual3Momentum.z() << G4endl;
} else {
G4cout << "Wplus Targ and residual3Momentum.z() " << w << " " << residual3Momentum.z() << G4endl;
}
#endif
G4double residualPz = 0.0;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,94 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//---------------------------------------------------------------------------
// ClassName: G4FTFTuningsMessenger
// Author: Alberto Ribon
// Date: August 2022
//---------------------------------------------------------------------------
#include "G4FTFTuningsMessenger.hh"
#include "G4UIcommand.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithAString.hh"
#include "G4FTFTunings.hh"
G4FTFTuningsMessenger::G4FTFTuningsMessenger() {
// These two commands select an alternative set of FTF parameters (called "tune"):
// either via its integer index
theFTFTuneIndexCmd = new G4UIcmdWithAnInteger( "/process/had/models/ftf/selectTuneByIndex", this );
theFTFTuneIndexCmd->SetGuidance( "Select one FTF set of parameters (tune) via its index: 0 (default), 1, 2, ..." );
theFTFTuneIndexCmd->SetParameterName( "indexFTFTune", true );
theFTFTuneIndexCmd->SetDefaultValue( 0 );
theFTFTuneIndexCmd->SetRange( "indexFTFTune>=0" );
theFTFTuneIndexCmd->AvailableForStates( G4State_PreInit );
// or via its string name
theFTFTuneNameCmd = new G4UIcmdWithAString( "/process/had/models/ftf/selectTuneByName", this );
theFTFTuneNameCmd->SetGuidance( "Select one FTF set of parametes (tune) via its name (string)." );
theFTFTuneNameCmd->SetGuidance( " (default) is the default." );
theFTFTuneNameCmd->SetParameterName( "nameFTFTune", true );
theFTFTuneNameCmd->SetDefaultValue( "default" );
theFTFTuneNameCmd->AvailableForStates( G4State_PreInit );
}
G4FTFTuningsMessenger::~G4FTFTuningsMessenger() {
delete theFTFTuneIndexCmd;
delete theFTFTuneNameCmd;
}
void G4FTFTuningsMessenger::SetNewValue( G4UIcommand *command, G4String newValues ) {
if ( command == theFTFTuneIndexCmd || command == theFTFTuneNameCmd ) {
G4int index = -999;
if ( command == theFTFTuneIndexCmd ) {
G4int value = theFTFTuneIndexCmd->GetNewIntValue( newValues );
if ( value >= 0 && value < G4FTFTunings::sNumberOfTunes ) {
index = value;
} else {
G4ExceptionDescription ed;
ed << "The FTF tune index=" << value << " value is wrong!";
command->CommandFailed( ed );
}
} else {
for ( G4int i = 0; i < G4FTFTunings::sNumberOfTunes; ++i ) {
if ( newValues == G4FTFTunings::Instance()->GetTuneName(i) ) {
index = i;
break;
}
}
if ( index < 0 ) {
G4ExceptionDescription ed;
ed << "The FTF tune name=" << newValues << " is not found!";
command->CommandFailed( ed );
}
}
if ( index >= 0 ) {
// Tune applicability state: 0 means switched off; 1 means switched on.
G4FTFTunings::Instance()->SetTuneApplicabilityState(index, 1);
}
}
}
@@ -4,6 +4,36 @@ 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!
## 2022-10-19 Alberto Ribon (had-hadronization-V11-00-03)
Change suggested by Vladimir Uzhinsky:
- G4HadronBuilder, G4VLongitudinalStringDecay, G4LundStringFragmentation,
G4QGSMFragmentation, G4ExcitedStringDecay : in order to describe the
NA61/SHINE data on K*0 and phi mesons production in proton-proton
interactions, different probabilities were introduced for the ratios
between pseudo-scalar and vector meson production. These ratios are
the following: for ordinary mesons from u- and d- quarks, the ratio is
0.5/0.5; for strange mesons the ratio is 0.4/0.6; for mesons with
hidden strangeness (as for phi), the ratio is 0.3/0.7.
This approach is similar to the one adopted in Pythia8.
It is also assumed that the probabilities for hidden strangeness (0.3/0.7)
apply for mesons with hidden charm and beauty.
- G4LundStringFragmentation : few changes were introduced for a special
treatment of last string decay to improve the yield of anti-Xi hyperons
in proton-proton interactions, according to the NA61/SHINE data.
Moreover, some parameters have been tuned to better describe the
NA61/SHINE data on various particles produced in proton-proton
interactions.
## 2022-07-04 Alberto Ribon (had-hadronization-V11-00-02)
Change suggested by Vladimir Uzhinsky:
- G4VLongitudinalStringDecay.cc : brought back the value (0.5) of the
mixing between (rho0 and omega) vector mesons as it was originally
until G4 10.0.
This should describe better NA61/SHINE experimental data.
The change might affect hadronic showers, giving that the various
vector mesons have different decay rates into neutral pions.
## 2022-06-07 Alberto Ribon (had-hadronization-V11-00-01)
Changes made by Vladimir Uzhinsky:
- G4HadronBuilder : a new argument is added in the constructor, and
@@ -50,9 +50,10 @@ class G4HadronBuilder
G4ParticleDefinition * BuildHighSpin(G4ParticleDefinition * black, G4ParticleDefinition * white);
// ctor
G4HadronBuilder(G4double mesonMix, G4double barionMix,
std::vector<double> scalarMesonMix, std::vector<double> vectorMesonMix,
G4double Eta_cProb, G4double Eta_bProb, G4double mesonMixSSbar);
G4HadronBuilder(const std::vector<G4double> & mesonMix, const G4double barionMix,
const std::vector<G4double> & scalarMesonMix,
const std::vector<G4double> & vectorMesonMix,
const G4double Eta_cProb, const G4double Eta_bProb);
private:
G4HadronBuilder(); // no default ctor
@@ -63,14 +64,12 @@ class G4HadronBuilder
G4ParticleDefinition * Barion(G4ParticleDefinition * black, G4ParticleDefinition * white, Spin spin);
G4double mesonSpinMix;
G4double mesonSpinMixSSbar;
std::vector<G4double> mesonSpinMix;
G4double barionSpinMix;
std::vector<double> scalarMesonMixings;
std::vector<double> vectorMesonMixings;
std::vector<G4double> scalarMesonMixings;
std::vector<G4double> vectorMesonMixings;
G4double ProbEta_c, ProbEta_b;
};
#endif
@@ -156,7 +156,6 @@ class G4VLongitudinalStringDecay : public G4HadronicInteraction
void SetDiquarkSuppression(G4double aValue);
void SetDiquarkBreakProbability(G4double aValue);
void SetVectorMesonProbability(G4double aValue);
void SetSpinThreeHalfBarionProbability(G4double aValue);
void SetScalarMesonMixings( std::vector<G4double> aVector);
@@ -193,8 +192,7 @@ class G4VLongitudinalStringDecay : public G4HadronicInteraction
G4HadronBuilder *hadronizer;
G4double pspin_meson;
G4double pspin_mesonSSbar;
std::vector<G4double> pspin_meson;
G4double pspin_barion;
std::vector<G4double> vectorMesonMix;
std::vector<G4double> scalarMesonMix;
@@ -170,8 +170,7 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings(const G4ExcitedStrin
if (generatedKineticTracks == nullptr || generatedKineticTracks->size() == 0)
{
// G4cerr << "G4VPartonStringModel:No KineticTracks produced" << G4endl;
// continue;
success=false; NeedEnergyCorrector=false; break;
continue;
}
G4LorentzVector KTsum1(0.,0.,0.,0.);
@@ -42,21 +42,21 @@
//#define debug_Hbuilder
//#define debug_heavyHadrons
G4HadronBuilder::G4HadronBuilder(G4double mesonMix, G4double barionMix,
std::vector<double> scalarMesonMix,
std::vector<double> vectorMesonMix,
G4double Eta_cProb, G4double Eta_bProb, G4double mesonMixSSbar)
G4HadronBuilder::G4HadronBuilder(const std::vector<G4double> & mesonMix, const G4double barionMix,
const std::vector<G4double> & scalarMesonMix,
const std::vector<G4double> & vectorMesonMix,
const G4double Eta_cProb, const G4double Eta_bProb)
{
mesonSpinMix = mesonMix;
mesonSpinMixSSbar = mesonMixSSbar;
barionSpinMix = barionMix;
scalarMesonMixings = scalarMesonMix;
vectorMesonMixings = vectorMesonMix;
ProbEta_c = Eta_cProb;
ProbEta_b = Eta_bProb;
}
//-------------------------------------------------------------------------
G4ParticleDefinition * G4HadronBuilder::Build(G4ParticleDefinition * black, G4ParticleDefinition * white)
{
if (black->GetParticleSubType()== "di_quark" || white->GetParticleSubType()== "di_quark" ) {
@@ -65,12 +65,10 @@ G4ParticleDefinition * G4HadronBuilder::Build(G4ParticleDefinition * black, G4Pa
return Barion(black,white,spin);
} else {
// Meson
Spin spin = SpinZero;
if ( std::abs(black->GetPDGEncoding()) == 3 && std::abs(white->GetPDGEncoding()) == 3 ) {
spin = (G4UniformRand() < mesonSpinMixSSbar) ? SpinZero : SpinOne;
} else {
spin = (G4UniformRand() < mesonSpinMix) ? SpinZero : SpinOne;
}
G4int StrangeQ = 0;
if( std::abs(black->GetPDGEncoding()) >= 3 ) StrangeQ++;
if( std::abs(white->GetPDGEncoding()) >= 3 ) StrangeQ++;
Spin spin = (G4UniformRand() < mesonSpinMix[StrangeQ]) ? SpinZero : SpinOne;
return Meson(black,white,spin);
}
}
@@ -309,7 +307,6 @@ G4ParticleDefinition * G4HadronBuilder::Meson(G4ParticleDefinition * black,
if (MesonDef == 0 ) {
G4cerr << " G4HadronBuilder - Warning: No particle for PDGcode= "
<< PDGEncoding << G4endl;
} else if ( ( black->GetPDGCharge() + white->GetPDGCharge()
- MesonDef->GetPDGCharge() ) > perCent ) {
G4cerr << " G4HadronBuilder - Warning: Incorrect Charge : "
@@ -324,6 +321,7 @@ G4ParticleDefinition * G4HadronBuilder::Meson(G4ParticleDefinition * black,
return MesonDef;
}
//-------------------------------------------------------------------------
G4ParticleDefinition * G4HadronBuilder::Barion(G4ParticleDefinition * black,
G4ParticleDefinition * white,Spin theSpin)
@@ -628,4 +626,3 @@ G4ParticleDefinition * G4HadronBuilder::Barion(G4ParticleDefinition * black,
return BarionDef;
}
@@ -53,11 +53,13 @@ G4LundStringFragmentation::G4LundStringFragmentation()
// For ProduceOneHadron it is required
// that no one pi-meson can be produced.
SigmaQT = 0.435 * GeV;
Tmt = 190.0 * MeV;
Tmt = 190.0 * MeV;
SetStringTensionParameter(1.*GeV/fermi);
SetDiquarkBreakProbability(0.5);
SetDiquarkBreakProbability(0.3);
SetStrangenessSuppression((1.0 - 0.12)/2.0);
SetDiquarkSuppression(0.15);
SetDiquarkSuppression(0.07);
// Check if charmed and bottom hadrons are enabled: if this is the case, then
// set the non-zero probabilities for c-cbar and b-bbar creation from the vacuum,
@@ -65,7 +67,7 @@ G4LundStringFragmentation::G4LundStringFragmentation()
// hadrons can't/can be created during the string fragmentation of ordinary
// (i.e. not heavy) projectile hadron nuclear reactions.
if ( G4HadronicParameters::Instance()->EnableBCParticles() ) {
SetProbCCbar(0.005); // According to O.I. Piskunova Yad. Fiz. 56 (1993) 1094
SetProbCCbar(0.0002); // According to O.I. Piskunova Yad. Fiz. 56 (1993) 1094; tuned by Uzhi Oct. 2022
SetProbBBbar(5.0e-5); // According to O.I. Piskunova Yad. Fiz. 56 (1993) 1094
} else {
SetProbCCbar(0.0);
@@ -376,7 +378,8 @@ G4KineticTrack * G4LundStringFragmentation::Splitup(G4FragmentingString *string,
if (string->GetRightParton()->GetParticleSubType() != "quark") NumberOfpossibleBaryons++;
G4double ActualProb = ProbDqADq ;
ActualProb *= (1.0-sqr(NumberOfpossibleBaryons*1400.0/StringMass));
ActualProb *= (1.0-G4Pow::GetInstance()->powA(NumberOfpossibleBaryons*1400.0/StringMass, 8.0));
if(ActualProb <0.0) ActualProb = 0.;
SetDiquarkSuppression(ActualProb);
@@ -385,7 +388,8 @@ G4KineticTrack * G4LundStringFragmentation::Splitup(G4FragmentingString *string,
else if ( NumberOfpossibleBaryons == 4 ){Mth = 2380.0;} // 2 Mlambda/Msigma + Mk + Mpi
else {}
ActualProb = ProbSaS * (1.0 - G4Pow::GetInstance()->powA( Mth/StringMass , 4.0 ));
ActualProb = ProbSaS;
ActualProb *= (1.0 - G4Pow::GetInstance()->powA( Mth/StringMass, 2.5 ));
if ( ActualProb < 0.0 ) ActualProb = 0.0;
SetStrangenessSuppression((1.0-ActualProb)/2.0);
@@ -459,7 +463,7 @@ G4ParticleDefinition * G4LundStringFragmentation::DiQuarkSplitup(G4ParticleDefin
G4ParticleDefinition *&created)
{
G4double StrSup=GetStrangeSuppress();
G4double ProbQQbar = (1.0 - 2.0*StrSup);
G4double ProbQQbar = (1.0 - 2.0*StrSup)*1.25;
//... can Diquark break or not?
if (G4UniformRand() < DiquarkBreakProb ){
@@ -476,7 +480,9 @@ G4ParticleDefinition * G4LundStringFragmentation::DiQuarkSplitup(G4ParticleDefin
G4int IsParticle=(decayQuarkEncoding>0) ? -1 : +1; // if we have a quark, we need antiquark
SetStrangenessSuppression((1.0-ProbQQbar)/2.0);
pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted
SetStrangenessSuppression((1.0-StrSup)/2.0);
//... Build new Diquark
G4int QuarkEncoding=QuarkPair.second->GetPDGEncoding();
@@ -496,7 +502,7 @@ G4ParticleDefinition * G4LundStringFragmentation::DiQuarkSplitup(G4ParticleDefin
G4int IsParticle=(decay->GetPDGEncoding()>0) ? +1 : -1; // if we have a diquark, we need quark
StrangeSuppress=(1.0 - ProbQQbar * 0.9)/2.0;
StrangeSuppress=(1.0 - ProbQQbar)/2.0;
pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted
created = QuarkPair.second;
@@ -550,6 +556,7 @@ G4LorentzVector * G4LundStringFragmentation::SplitEandP(G4ParticleDefinition * p
G4double HadronMt, Pt, Pt2, phi;
G4double TmtCur = Tmt;
if ( (string->GetDecayParton()->GetParticleSubType()== "quark") &&
(pHadron->GetBaryonNumber() != 0) ) {
TmtCur = Tmt*0.37; // q->B
@@ -674,6 +681,7 @@ G4double G4LundStringFragmentation::GetLightConeZ(G4double zmin, G4double zmax,
G4double an = 2.5;
an +=(sqr(Px)+sqr(Py))/sqr(GeV)-0.5;
z=zmin + (zmax-zmin)*G4Pow::GetInstance()->powA(G4UniformRand(),1./an);
if( PDGEncodingOfDecayParton > 3000 ) z=zmin+zmax-z;
}
return z;
@@ -723,43 +731,41 @@ G4bool G4LundStringFragmentation::SplitLast(G4FragmentingString * string,
if (string->IsAFourQuarkString() )
{
G4int IDleft = std::abs( string->GetLeftParton()->GetPDGEncoding() );
G4int IDright = std::abs( string->GetRightParton()->GetPDGEncoding() );
if ( IDleft > 3100 || IDright > 3100 )
{
if (! Diquark_AntiDiquark_belowThreshold_lastSplitting(string, LeftHadron, RightHadron) )
G4int IDleft =std::abs(string->GetLeftParton()->GetPDGEncoding());
G4int IDright=std::abs(string->GetRightParton()->GetPDGEncoding());
if ( (IDleft > 3000) || (IDright > 3000) ) {
if ( ! Diquark_AntiDiquark_belowThreshold_lastSplitting(string, LeftHadron, RightHadron) )
{
return false;
}
} else {
// The string is qq-qqbar type. Diquarks are on the string ends
if (StringMass-MinimalStringMass < 0.)
{
if (! Diquark_AntiDiquark_belowThreshold_lastSplitting(string, LeftHadron, RightHadron) )
{
return false;
return false;
}
} else
{
// The string is qq-qqbar type. Diquarks are on the string ends
if (StringMass-MinimalStringMass < 0.)
{
if (! Diquark_AntiDiquark_belowThreshold_lastSplitting(string, LeftHadron, RightHadron) )
{
return false;
}
} else
{
Diquark_AntiDiquark_aboveThreshold_lastSplitting(string, LeftHadron, RightHadron);
} else
{
Diquark_AntiDiquark_aboveThreshold_lastSplitting(string, LeftHadron, RightHadron);
if (NumberOf_FS == 0) return false;
if (NumberOf_FS == 0) return false;
sampledState = SampleState();
if (string->GetLeftParton()->GetPDGEncoding() < 0)
{
LeftHadron =FS_LeftHadron[sampledState];
RightHadron=FS_RightHadron[sampledState];
} else
{
LeftHadron =FS_RightHadron[sampledState];
RightHadron=FS_LeftHadron[sampledState];
}
}
sampledState = SampleState();
if (string->GetLeftParton()->GetPDGEncoding() < 0)
{
LeftHadron =FS_LeftHadron[sampledState];
RightHadron=FS_RightHadron[sampledState];
} else
{
LeftHadron =FS_RightHadron[sampledState];
RightHadron=FS_LeftHadron[sampledState];
}
}
} else
{
} // ID > 3300
} else {
if (string->DecayIsQuark() && string->StableIsQuark() )
{ //... there are quarks on cluster ends
#ifdef debug_LUNDfragmentation
@@ -878,12 +884,13 @@ Diquark_AntiDiquark_belowThreshold_lastSplitting(G4FragmentingString * & string,
}
isOK = (LeftHadron != nullptr) && (RightHadron != nullptr);
if(isOK) { isOK = (StringMass > LeftHadron->GetPDGMass() + RightHadron->GetPDGMass()); }
++cClusterInterrupt;
//... repeat procedure, if mass of cluster is too low to produce hadrons
//... ClusterMassCut = 0.15*GeV model parameter
}
while (isOK == false || cClusterInterrupt < ClusterLoopInterrupt);
while (isOK == false && cClusterInterrupt < ClusterLoopInterrupt);
/* Loop checking, 07.08.2015, A.Ribon */
return isOK;
}
@@ -1145,7 +1152,7 @@ G4bool G4LundStringFragmentation::Quark_AntiQuark_lastSplitting(G4FragmentingStr
NumberOf_FS=0;
for (G4int ProdQ=1; ProdQ < 4; ProdQ++) // Loop over quark-antiquark cases: u-ubar, d-dbar, s-sbar
{ // (as last splitting, do not consider c-cbar and b-bbar cases)
//G4cout << "NumberOf_FS ProdQ " << NumberOf_FS << " " << ProdQ << G4endl;
//G4cout<<"NumberOf_FS ProdQ "<<NumberOf_FS<<" "<<ProdQ<<G4endl;
LeftHadronCharge = QuarkCharge - Qcharge[ProdQ-1];
G4int SignQ = LeftHadronCharge/3; if (SignQ == 0) SignQ = 1;
@@ -1175,7 +1182,7 @@ G4bool G4LundStringFragmentation::Quark_AntiQuark_lastSplitting(G4FragmentingStr
//<<ProdQ-1<<" "<<StateQ<<" "<<SignQ*Meson[AbsIDquark-1][ProdQ-1][StateQ]<<G4endl;
LeftHadron=G4ParticleTable::GetParticleTable()->FindParticle(SignQ*
Meson[AbsIDquark-1][ProdQ-1][StateQ]);
//G4cout<<"LeftHadron "<<LeftHadron<<G4endl;
//G4cout<<"LeftHadron "<<LeftHadron<<G4endl;
if (LeftHadron == NULL) { StateQ++; continue; }
//G4cout<<"LeftHadron "<<LeftHadron->GetParticleName()<<G4endl;
G4double LeftHadronMass=LeftHadron->GetPDGMass();
@@ -1211,7 +1218,6 @@ G4bool G4LundStringFragmentation::Quark_AntiQuark_lastSplitting(G4FragmentingStr
MesonWeight[AbsIDquark-1][ProdQ-1][StateQ]*
MesonWeight[AbsIDanti_quark-1][ProdQ-1][StateAQ]*
Prob_QQbar[ProdQ-1];
if (string->GetLeftParton()->GetPDGEncoding()>0)
{
FS_LeftHadron[NumberOf_FS] = RightHadron;
@@ -1261,7 +1267,6 @@ G4int G4LundStringFragmentation::SampleState(void)
}
G4double SumWeights=0.;
for (G4int i=0; i<NumberOf_FS; i++) {SumWeights+=FS_Weight[i];}
G4double ksi=G4UniformRand();
@@ -48,11 +48,11 @@
G4QGSMFragmentation::G4QGSMFragmentation()
{
SigmaQT = 0.45 * GeV; // Uzhi June 2020
SigmaQT = 0.45 * GeV;
MassCut = 0.35*GeV;
SetStrangenessSuppression((1.0 - 0.12)/2.); // Uzhi June 2020 0.16 -> 0.12
SetStrangenessSuppression((1.0 - 0.16)/2.);
// Check if charmed and bottom hadrons are enabled: if this is the case, then
// set the non-zero probabilities for c-cbar and b-bbar creation from the vacuum,
@@ -60,15 +60,15 @@ G4QGSMFragmentation::G4QGSMFragmentation()
// hadrons can't/can be created during the string fragmentation of ordinary
// (i.e. not heavy) projectile hadron nuclear reactions.
if ( G4HadronicParameters::Instance()->EnableBCParticles() ) {
SetProbCCbar(0.005); // According to O.I. Piskunova Yad. Fiz. 56 (1993) 1094
SetProbCCbar(0.0002); // According to O.I. Piskunova Yad. Fiz. 56 (1993) 1094; tuned by Uzhi Oct. 2022
SetProbBBbar(5.0e-5); // According to O.I. Piskunova Yad. Fiz. 56 (1993) 1094
} else {
SetProbCCbar(0.0);
SetProbBBbar(0.0);
}
SetDiquarkSuppression(0.195); // Uzhi June 2020 0.32 -> 0.195
SetDiquarkBreakProbability(0.0); // Uzhi June 2020 0.7 -> 0.0
SetDiquarkSuppression(0.32);
SetDiquarkBreakProbability(0.7);
SetMinMasses();
@@ -220,11 +220,11 @@ G4KineticTrackVector* G4QGSMFragmentation::FragmentString(const G4ExcitedString&
// Split current string into 2 final Hadrons
#ifdef debug_QGSMfragmentation
if( inner_sucess ) { // Uzhi June 2020
if( inner_sucess ) {
G4cout<<"Split remaining string into 2 final hadrons."<<G4endl;
} else {
G4cout<<" New attempt to fragment string"<<G4endl;
} // Uzhi June 2020
}
#endif
// To the close production of hadrons at last string decay
if ( inner_sucess &&
@@ -277,8 +277,7 @@ G4KineticTrackVector* G4QGSMFragmentation::FragmentString(const G4ExcitedString&
G4bool G4QGSMFragmentation::IsItFragmentable(const G4FragmentingString * string)
{
//Uzhi June 2020 return sqr( PossibleHadronMass(string) + MassCut ) < string->Mass2();
return sqr( MinimalStringMass + MassCut ) < string->Mass2(); // Uzhi June 2020
return sqr( MinimalStringMass + MassCut ) < string->Mass2();
}
//----------------------------------------------------------------------------------------------------------
@@ -428,8 +427,8 @@ G4ParticleDefinition *G4QGSMFragmentation::DiQuarkSplitup( G4ParticleDefinition*
G4ParticleDefinition * decayQuark=FindParticle(decayQuarkEncoding);
G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decayQuark);
DecayQuark = decay->GetPDGEncoding(); //Uzhi June 2020 decayQuarkEncoding;
NewQuark = NewDecayEncoding; //Uzhi June 2020 QuarkPair.first->GetPDGEncoding();
DecayQuark = decay->GetPDGEncoding();
NewQuark = NewDecayEncoding;
return had;
@@ -489,8 +488,8 @@ G4LorentzVector * G4QGSMFragmentation::SplitEandP(G4ParticleDefinition * pHadron
G4ThreeVector HadronPt , RemSysPt;
G4double HadronMassT2, ResidualMassT2;
//Uzhi June 2020 Mt distribution is implemented
G4double HadronMt, Pt, Pt2, phi; // Uzhi June 2020
// Mt distribution is implemented
G4double HadronMt, Pt, Pt2, phi;
//... sample Pt of the hadron
G4int attempt=0;
@@ -498,12 +497,11 @@ G4LorentzVector * G4QGSMFragmentation::SplitEandP(G4ParticleDefinition * pHadron
{
attempt++; if (attempt > StringLoopInterrupt) return 0;
HadronMt = HadronMass - 200.0*G4Log(G4UniformRand()); // Uzhi June 2020, 200.0 must be tuned
Pt2 = sqr(HadronMt)-sqr(HadronMass); Pt=std::sqrt(Pt2); // Uzhi June 2020
HadronMt = HadronMass - 200.0*G4Log(G4UniformRand()); // 200.0 must be tuned
Pt2 = sqr(HadronMt)-sqr(HadronMass); Pt=std::sqrt(Pt2);
phi = 2.*pi*G4UniformRand();
G4ThreeVector SampleQuarkPtw= G4ThreeVector(Pt*std::cos(phi), Pt*std::sin(phi), 0);
HadronPt =SampleQuarkPtw + string->DecayPt(); // Uzhi June 2020
//Uzhi June 2020 HadronPt =SampleQuarkPt() + string->DecayPt(); // Save this for possible return
HadronPt =SampleQuarkPtw + string->DecayPt();
HadronPt.setZ(0);
RemSysPt = StringPt - HadronPt;
@@ -558,7 +556,7 @@ G4LorentzVector * G4QGSMFragmentation::SplitEandP(G4ParticleDefinition * pHadron
G4double G4QGSMFragmentation::GetLightConeZ(G4double zmin, G4double zmax, G4int /* PartonEncoding */ ,
G4ParticleDefinition* /* pHadron */, G4double ptx , G4double pty)
{
G4double lambda = 2.0*(sqr(ptx)+sqr(pty))/sqr(GeV); // Uzhi June 2020
G4double lambda = 2.0*(sqr(ptx)+sqr(pty))/sqr(GeV);
#ifdef debug_QGSMfragmentation
G4cout<<"GetLightConeZ zmin zmax Parton pHadron "<<zmin<<" "<<zmax<<" "/*<< PartonEncoding */
@@ -595,10 +593,11 @@ G4double G4QGSMFragmentation::GetLightConeZ(G4double zmin, G4double zmax, G4int
if ( d1 < 0. ) {
q1 = absDecayQuarkCode/1000; q2 = (absDecayQuarkCode % 1000)/100; DiQold = IndexDiQ[q1-1][q2-1];
d1 = FFqq2qq[DiQold][absNewQuarkCode-1][0]; d2 = FFqq2qq[DiQold][absNewQuarkCode-1][1];
qA = absNewQuarkCode/1000; qB = (absNewQuarkCode % 1000)/100; DiQnew = IndexDiQ[qA-1][qB-1];
d1 = FFqq2qq[DiQold][DiQnew][0]; d2 = FFqq2qq[DiQold][DiQnew][1];
}
d2 +=lambda; // Uzhi June 2020
d2 +=lambda;
d1+=1.0; d2+=1.0;
invD1=1./d1; invD2=1./d2;
@@ -648,7 +647,7 @@ G4bool G4QGSMFragmentation::SplitLast(G4FragmentingString * string,
G4double LeftHadronMass(0.); G4double RightHadronMass(0.);
do
{
if (cClusterInterrupt++ >= ClusterLoopInterrupt) return false; // Uzhi June 2020
if (cClusterInterrupt++ >= ClusterLoopInterrupt) return false;
LeftHadronMass = -MaxMass; RightHadronMass = -MaxMass;
G4ParticleDefinition * quark = nullptr;
@@ -664,12 +663,12 @@ G4bool G4QGSMFragmentation::SplitLast(G4FragmentingString * string,
pDefPair QuarkPair = CreatePartonPair(IsParticle);
quark = QuarkPair.second;
LeftHadron= hadronizer->BuildLowSpin(QuarkPair.first, string->GetLeftParton());
if ( LeftHadron == NULL ) continue; // Uzhi June 2020
RightHadron = hadronizer->BuildLowSpin(string->GetRightParton(), quark); // Uzhi June 2020
if ( RightHadron == NULL ) continue; // Uzhi June 2020
} else if( (!string->DecayIsQuark() && string->StableIsQuark() ) || // Uzhi June 2020
( string->DecayIsQuark() && !string->StableIsQuark() ) ) { // Uzhi June 2020
LeftHadron= hadronizer->Build(QuarkPair.first, string->GetLeftParton());
if ( LeftHadron == NULL ) continue;
RightHadron = hadronizer->Build(string->GetRightParton(), quark);
if ( RightHadron == NULL ) continue;
} else if( (!string->DecayIsQuark() && string->StableIsQuark() ) ||
( string->DecayIsQuark() && !string->StableIsQuark() ) ) {
//... there is a Diquark on one of cluster ends
G4int IsParticle;
if ( string->StableIsQuark() ) {
@@ -685,13 +684,11 @@ G4bool G4QGSMFragmentation::SplitLast(G4FragmentingString * string,
pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted
//SetStrangenessSuppression((1.0-ProbSaS)/2.0);
quark = QuarkPair.second;
LeftHadron=hadronizer->BuildLowSpin(QuarkPair.first, string->GetLeftParton());
if ( LeftHadron == NULL ) continue; // Uzhi June 2020
RightHadron = hadronizer->BuildLowSpin(string->GetRightParton(), quark); // Uzhi June 2020
if ( RightHadron == NULL ) continue; // Uzhi June 2020
} else { // Diquark and anti-diquark are on the string ends // Uzhi June 2020
//+++++++++++++++++++++++++++++++ Inserted from FTF // Uzhi June 2020
// Uzhi G4double StringMass = string->Mass();
LeftHadron=hadronizer->Build(QuarkPair.first, string->GetLeftParton());
if ( LeftHadron == NULL ) continue;
RightHadron = hadronizer->Build(string->GetRightParton(), quark);
if ( RightHadron == NULL ) continue;
} else { // Diquark and anti-diquark are on the string ends
if (cClusterInterrupt++ >= ClusterLoopInterrupt) return false;
G4int LeftQuark1= string->GetLeftParton()->GetPDGEncoding()/1000;
G4int LeftQuark2=(string->GetLeftParton()->GetPDGEncoding()/100)%10;
@@ -705,7 +702,6 @@ G4bool G4QGSMFragmentation::SplitLast(G4FragmentingString * string,
RightHadron =hadronizer->Build(FindParticle( LeftQuark2), FindParticle(RightQuark1));
}
if ( (LeftHadron == NULL) || (RightHadron == NULL) ) continue;
// End of inserting from FTF Uzhi June 2020
}
LeftHadronMass = LeftHadron->GetPDGMass();
RightHadronMass = RightHadron->GetPDGMass();
@@ -742,7 +738,7 @@ G4bool G4QGSMFragmentation::SplitLast(G4FragmentingString * string,
void G4QGSMFragmentation::Sample4Momentum(G4LorentzVector* Mom , G4double Mass ,
G4LorentzVector* AntiMom, G4double AntiMass, G4double InitialMass)
{
#ifdef debug_QGSMfragmentation // Uzhi June 2020
#ifdef debug_QGSMfragmentation
G4cout<<"Sample4Momentum Last-----------------------------------------"<<G4endl;
G4cout<<" StrMass "<<InitialMass<<" Mass1 "<<Mass<<" Mass2 "<<AntiMass<<G4endl;
G4cout<<" SumMass "<<Mass+AntiMass<<G4endl;
@@ -80,18 +80,20 @@ G4VLongitudinalStringDecay::G4VLongitudinalStringDecay(const G4String& name)
DiquarkBreakProb = 0.1; // Probability of (qq)->h+(qq)'
//... pspin_meson is probability to create pseudo-scalar meson
pspin_meson = 0.4;
pspin_mesonSSbar = 0.3;
pspin_meson.resize(3);
pspin_meson[0] = 0.5; // u or d + anti-u or anti-d
pspin_meson[1] = 0.4; // one of the quark is strange, or charm, or bottom
pspin_meson[2] = 0.3; // both of the quark are strange, or charm, or bottom
//... pspin_barion is probability to create 1/2 barion
pspin_barion = 0.5;
//... vectorMesonMix[] is quark mixing parameters for vector mesons (Variable spin = 3)
vectorMesonMix.resize(6);
vectorMesonMix[0] = 0.0;
vectorMesonMix[1] = 0.375;
vectorMesonMix[1] = 0.5;
vectorMesonMix[2] = 0.0;
vectorMesonMix[3] = 0.375;
vectorMesonMix[3] = 0.5;
vectorMesonMix[4] = 1.0;
vectorMesonMix[5] = 1.0;
@@ -112,7 +114,7 @@ G4VLongitudinalStringDecay::G4VLongitudinalStringDecay(const G4String& name)
// Parameters may be changed until the first fragmentation starts
PastInitPhase=false;
hadronizer = new G4HadronBuilder( pspin_meson, pspin_barion, scalarMesonMix, vectorMesonMix,
ProbEta_c, ProbEta_b, pspin_mesonSSbar );
ProbEta_c, ProbEta_b );
MaxMass=-350.0*GeV; // If there will be a particle with mass larger than Higgs the value must be changed.
@@ -497,21 +499,6 @@ void G4VLongitudinalStringDecay::SetDiquarkBreakProbability(G4double aValue)
//----------------------------------------------------------------------------------------------------------
void G4VLongitudinalStringDecay::SetVectorMesonProbability(G4double aValue)
{
if ( PastInitPhase ) {
throw G4HadronicException(__FILE__, __LINE__,
"G4VLongitudinalStringDecay::SetVectorMesonProbability after FragmentString() not allowed");
} else {
pspin_meson = aValue;
delete hadronizer;
hadronizer = new G4HadronBuilder( pspin_meson, pspin_barion, scalarMesonMix, vectorMesonMix,
ProbEta_c, ProbEta_b , pspin_mesonSSbar );
}
}
//----------------------------------------------------------------------------------------------------------
void G4VLongitudinalStringDecay::SetSpinThreeHalfBarionProbability(G4double aValue)
{
if ( PastInitPhase ) {
@@ -520,8 +507,8 @@ void G4VLongitudinalStringDecay::SetSpinThreeHalfBarionProbability(G4double aVal
} else {
pspin_barion = aValue;
delete hadronizer;
hadronizer = new G4HadronBuilder( pspin_meson, pspin_barion, scalarMesonMix, vectorMesonMix,
ProbEta_c, ProbEta_b, pspin_mesonSSbar );
hadronizer = new G4HadronBuilder( pspin_meson, pspin_barion, scalarMesonMix, vectorMesonMix,
ProbEta_c, ProbEta_b );
}
}
@@ -543,8 +530,8 @@ void G4VLongitudinalStringDecay::SetScalarMesonMixings(std::vector<G4double> aVe
scalarMesonMix[4] = aVector[4];
scalarMesonMix[5] = aVector[5];
delete hadronizer;
hadronizer = new G4HadronBuilder( pspin_meson, pspin_barion, scalarMesonMix, vectorMesonMix,
ProbEta_c, ProbEta_b, pspin_mesonSSbar );
hadronizer = new G4HadronBuilder( pspin_meson, pspin_barion, scalarMesonMix, vectorMesonMix,
ProbEta_c, ProbEta_b );
}
}
@@ -566,8 +553,8 @@ void G4VLongitudinalStringDecay::SetVectorMesonMixings(std::vector<G4double> aVe
vectorMesonMix[4] = aVector[4];
vectorMesonMix[5] = aVector[5];
delete hadronizer;
hadronizer = new G4HadronBuilder( pspin_meson, pspin_barion, scalarMesonMix, vectorMesonMix,
ProbEta_c, ProbEta_b, pspin_mesonSSbar );
hadronizer = new G4HadronBuilder( pspin_meson, pspin_barion, scalarMesonMix, vectorMesonMix,
ProbEta_c, ProbEta_b );
}
}
@@ -690,13 +677,19 @@ void G4VLongitudinalStringDecay::SetMinMasses()
}
}
//--------------------------
G4int StrangeQ = 0;
G4int StrangeAQ = 0;
for (G4int i=0; i<5; i++)
{ for (G4int j=0; j<5; j++)
{
{
if( i >= 2 ) StrangeQ=1;
for (G4int j=0; j<5; j++)
{
StrangeAQ = 0;
if( j >= 2 ) StrangeAQ=1;
Meson[i][j][0] = 100 * (std::max(i,j)+1) + 10 * (std::min(i,j)+1) + 1; // Scalar meson
MesonWeight[i][j][0] = ( pspin_meson);
MesonWeight[i][j][0] = ( pspin_meson[StrangeQ + StrangeAQ]);
Meson[i][j][1] = 100 * (std::max(i,j)+1) + 10 * (std::min(i,j)+1) + 3; // Vector meson
MesonWeight[i][j][1] = (1.-pspin_meson);
MesonWeight[i][j][1] = (1.-pspin_meson[StrangeQ + StrangeAQ]);
}
}
@@ -704,65 +697,39 @@ void G4VLongitudinalStringDecay::SetMinMasses()
//dd1 -> scalarMesonMix[0] * 111 + (1-scalarMesonMix[0]-scalarMesonMix[1]) * 221 + scalarMesonMix[1] * 331 (000)
//dd1 -> Pi0 Eta Eta'
Meson[0][0][0] = 111; MesonWeight[0][0][0] = ( pspin_meson) * ( scalarMesonMix[0] ); // Pi0
Meson[0][0][2] = 221; MesonWeight[0][0][3] = ( pspin_meson) * (1-scalarMesonMix[0]-scalarMesonMix[1]); // Eta
Meson[0][0][3] = 331; MesonWeight[0][0][4] = ( pspin_meson) * ( scalarMesonMix[1]); // Eta'
/*
//dd3 -> vectorMesonMix[0] * 113 + (1-vectorMesonMix[0]-vectorMesonMix[1]) * 223 + vectorMesonMix[1] * 333 (001)
//dd3 -> rho_0 omega phi
Meson[0][0][1] = 113; MesonWeight[0][0][1] = (1.-pspin_meson) * ( vectorMesonMix[0] ); // Rho
Meson[0][0][4] = 223; MesonWeight[0][0][4] = (1.-pspin_meson) * (1-vectorMesonMix[0]-vectorMesonMix[1]); // omega
Meson[0][0][5] = 333; MesonWeight[0][0][5] = (1.-pspin_meson) * ( vectorMesonMix[1]); // phi
*/
Meson[0][0][0] = 111; MesonWeight[0][0][0] = ( pspin_meson[0]) * ( scalarMesonMix[0] ); // Pi0
Meson[0][0][2] = 221; MesonWeight[0][0][3] = ( pspin_meson[0]) * (1-scalarMesonMix[0]-scalarMesonMix[1]); // Eta
Meson[0][0][3] = 331; MesonWeight[0][0][4] = ( pspin_meson[0]) * ( scalarMesonMix[1]); // Eta'
//dd3 -> (1-vectorMesonMix[1] * 113 + vectorMesonMix[1] * 223 (001)
//dd3 -> rho_0 omega
Meson[0][0][1] = 113; MesonWeight[0][0][1] = (1.-pspin_meson) * (1-vectorMesonMix[1]); // Rho
Meson[0][0][4] = 223; MesonWeight[0][0][4] = (1.-pspin_meson) * ( vectorMesonMix[1]); // omega
Meson[0][0][1] = 113; MesonWeight[0][0][1] = (1.-pspin_meson[0]) * (1-vectorMesonMix[1]); // Rho
Meson[0][0][4] = 223; MesonWeight[0][0][4] = (1.-pspin_meson[0]) * ( vectorMesonMix[1]); // omega
//uu1 -> scalarMesonMix[0] * 111 + (1-scalarMesonMix[0]-scalarMesonMix[1]) * 221 + scalarMesonMix[1] * 331 (110)
//uu1 -> Pi0 Eta Eta'
Meson[1][1][0] = 111; MesonWeight[1][1][0] = ( pspin_meson) * ( scalarMesonMix[0] ); // Pi0
Meson[1][1][2] = 221; MesonWeight[1][1][2] = ( pspin_meson) * (1-scalarMesonMix[0]-scalarMesonMix[1]); // Eta
Meson[1][1][3] = 331; MesonWeight[1][1][3] = ( pspin_meson) * ( scalarMesonMix[1]); // Eta'
/*
//uu3 -> vectorMesonMix[0] * 113 + (1-vectorMesonMix[0]-vectorMesonMix[1]) * 223 + vectorMesonMix[1] * 333 (111)
//uu3 -> rho_0 omega phi
Meson[1][1][1] = 113; MesonWeight[1][1][1] = (1.-pspin_meson) * ( vectorMesonMix[0] ); // Rho
Meson[1][1][4] = 223; MesonWeight[1][1][4] = (1.-pspin_meson) * (1-vectorMesonMix[0]-vectorMesonMix[1]); // omega
Meson[1][1][5] = 333; MesonWeight[1][1][5] = (1.-pspin_meson) * ( vectorMesonMix[1]); // phi
*/
Meson[1][1][0] = 111; MesonWeight[1][1][0] = ( pspin_meson[0]) * ( scalarMesonMix[0] ); // Pi0
Meson[1][1][2] = 221; MesonWeight[1][1][2] = ( pspin_meson[0]) * (1-scalarMesonMix[0]-scalarMesonMix[1]); // Eta
Meson[1][1][3] = 331; MesonWeight[1][1][3] = ( pspin_meson[0]) * ( scalarMesonMix[1]); // Eta'
//uu3 -> (1-vectorMesonMix[1]) * 113 + vectorMesonMix[1] * 223 (111)
//uu3 -> rho_0 omega
Meson[1][1][1] = 113; MesonWeight[1][1][1] = (1.-pspin_meson) * (1-vectorMesonMix[1]); // Rho
Meson[1][1][4] = 223; MesonWeight[1][1][4] = (1.-pspin_meson) * ( vectorMesonMix[1]); // omega
Meson[1][1][1] = 113; MesonWeight[1][1][1] = (1.-pspin_meson[0]) * (1-vectorMesonMix[1]); // Rho
Meson[1][1][4] = 223; MesonWeight[1][1][4] = (1.-pspin_meson[0]) * ( vectorMesonMix[1]); // omega
//ss1 -> (1-scalarMesonMix[5]) * 221 + scalarMesonMix[5] * 331 (220)
//ss1 -> Eta Eta'
Meson[2][2][0] = 221; MesonWeight[2][2][0] = ( pspin_meson) * (1-scalarMesonMix[5] ); // Eta
Meson[2][2][2] = 331; MesonWeight[2][2][2] = ( pspin_meson) * ( scalarMesonMix[5]); // Eta'
/*
//ss3 -> (1-vectorMesonMix[5]) * 223 + vectorMesonMix[5] * 333 (221)
//ss3 -> omega phi
Meson[2][2][1] = 223; MesonWeight[2][2][1] = (1.-pspin_meson) * (1-vectorMesonMix[5] ); // omega
Meson[2][2][3] = 333; MesonWeight[2][2][3] = (1.-pspin_meson) * ( vectorMesonMix[5]); // phi
*/
Meson[2][2][0] = 221; MesonWeight[2][2][0] = ( pspin_meson[2]) * (1-scalarMesonMix[5] ); // Eta
Meson[2][2][2] = 331; MesonWeight[2][2][2] = ( pspin_meson[2]) * ( scalarMesonMix[5]); // Eta'
//ss3 -> vectorMesonMix[5] * 333 (221)
//ss3 -> phi
Meson[2][2][1] = 333; MesonWeight[2][2][3] = (1.-pspin_mesonSSbar) * ( vectorMesonMix[5]); // phi
Meson[2][2][1] = 333; MesonWeight[2][2][1] = (1.-pspin_meson[2]) * ( vectorMesonMix[5]); // phi
//cc1 -> ProbEta_c /(1-pspin_meson) 441 (330) Probability of Eta_c
//cc3 -> (1-ProbEta_c)/( pspin_meson) 443 (331) Probability of J/Psi
@@ -770,12 +737,12 @@ void G4VLongitudinalStringDecay::SetMinMasses()
//bb1 -> ProbEta_b /pspin_meson 551 (440) Probability of Eta_b
//bb3 -> (1-ProbEta_b)/pspin_meson 553 (441) Probability of Upsilon
if ( pspin_meson != 0. ) {
Meson[3][3][0] *= ( ProbEta_c)/( pspin_meson); // Eta_c
Meson[3][3][1] *= (1.0-ProbEta_c)/(1.-pspin_meson); // J/Psi
if ( pspin_meson[2] != 0. ) {
Meson[3][3][0] *= ( ProbEta_c)/( pspin_meson[2]); // Eta_c
Meson[3][3][1] *= (1.0-ProbEta_c)/(1.-pspin_meson[2]); // J/Psi
Meson[4][4][0] *= ( ProbEta_b)/( pspin_meson); // Eta_b
Meson[4][4][1] *= (1.0-ProbEta_b)/(1.-pspin_meson); // Upsilon
Meson[4][4][0] *= ( ProbEta_b)/( pspin_meson[2]); // Eta_b
Meson[4][4][1] *= (1.0-ProbEta_b)/(1.-pspin_meson[2]); // Upsilon
}
//--------------------------
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2022-11-11 Alberto Ribon (hadr-partonstring-mgt-V11-00-03)
- G4VPartonStringModel : added debugging information on the number of lambdas
for residual projectile hypernuclei.
## 2022-06-07 Alberto Ribon (hadr-partonstring-mgt-V11-00-02)
- G4VSplitableHadron : changed the method Splitting() from "protected" to
"public" (this is needed to change the status of SplitableHadron in
@@ -372,7 +372,8 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
) {
unphysicalResidual = true;
//G4cout << "***UNPHYSICAL PROJECTILE RESIDUAL*** Z=" << numberProtonProjectileResidual
// << " ; N=" << numberNeutronProjectileResidual;
// << " ; N=" << numberNeutronProjectileResidual
// << " ; L=" << numberLambdaProjectileResidual;
}
if ( unphysicalResidual ) {
//G4cout << " -> REJECTING COLLISION because of unphysical residual !" << G4endl;
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2022-10-07 Gabriele Cosmo (hadr-qgsm-V11-00-03)
- Fixed compilation warning on Intel/icx compiler for variables set
but not used in G4QGSMSplitableHadron and G4QGSParticipants.
## 2022-05-06 Vladimir Ivanchenko (hadr-qgsm-V11-00-02)
- G4QGSParticipants - do not print warning in the case of precision loss;
@@ -113,9 +113,9 @@ inline G4Parton* G4QGSMSplitableHadron::GetNextAntiParton()
return result;
}
inline void G4QGSMSplitableHadron::SetFirstParton(G4int PDGcode)
{PDGcode++;}
inline void G4QGSMSplitableHadron::SetSecondParton(G4int PDGcode)
{PDGcode++;}
inline void G4QGSMSplitableHadron::SetFirstParton(G4int)
{}
inline void G4QGSMSplitableHadron::SetSecondParton(G4int)
{}
#endif
@@ -398,11 +398,11 @@ void G4QGSParticipants::GetList( const G4ReactionProduct& thePrimary ) {
#ifdef debugQGSParticipants
G4cout<<"InteractionMode "<<InteractionMode<<G4endl;
G4cout<<"Impact parameter (fm ) "<<std::sqrt(sqr(impactX)+sqr(impactY))/fermi<<" "<<G4endl;
G4int nucleonCount = -1;
#endif
// loop over nucleons to find collisions
theNucleus->StartLoop();
G4int nucleonCount = -1;
G4QGSParticipants_NPart = 0;
G4double Power=MaxPower;
@@ -410,7 +410,6 @@ void G4QGSParticipants::GetList( const G4ReactionProduct& thePrimary ) {
while( (tNucleon = theNucleus->GetNextNucleon()) )
{
if(Power <= 0.) break;
nucleonCount++;
G4LorentzVector nucleonMomentum=tNucleon->Get4Momentum();
@@ -425,6 +424,7 @@ void G4QGSParticipants::GetList( const G4ReactionProduct& thePrimary ) {
Regge->GetProbabilities(std::sqrt(Distance2), InteractionMode,
Pint, Pprd, Ptrd, Pdd, Pnd, Pnvr);
#ifdef debugQGSParticipants
nucleonCount++;
G4cout<<"Nucleon & its impact parameter: "<<nucleonCount<<" "<<std::sqrt(Distance2)/fermi<<" (fm)"<<G4endl;
G4cout<<"Probability of interaction: "<<Pint<<G4endl;
G4cout<<"Probability of PrD, TrD, DD: "<<Pprd<<" "<<Ptrd<<" "<<Pdd<<G4endl;
@@ -636,10 +636,14 @@ void G4QGSParticipants::ReggeonCascade()
G4V3DNucleus* theTargetNucleus = theNucleus;
theTargetNucleus->StartLoop();
G4int TrgNuc=0;
#ifdef debugQGSParticipants
G4int TrgNuc=0;
#endif
G4Nucleon* Neighbour(0);
while ( ( Neighbour = theTargetNucleus->GetNextNucleon() ) ) {
TrgNuc++;
#ifdef debugQGSParticipants
TrgNuc++;
#endif
if ( ! Neighbour->AreYouHit() ) {
G4double impact2 = sqr( XofWoundedNucleon - Neighbour->GetPosition().x() ) +
sqr( YofWoundedNucleon - Neighbour->GetPosition().y() );
@@ -1552,18 +1556,18 @@ G4bool G4QGSParticipants::DeterminePartonMomenta()
#ifdef debugQGSParticipants
G4cout<<"Projectile 4 momentum "<<Psum<<G4endl
<<"Target nucleon momenta at start"<<G4endl;
G4int NuclNo=0;
#endif
std::vector<G4VSplitableHadron*>::iterator i;
G4int NuclNo=0;
for (i = theTargets.begin(); i != theTargets.end(); i++ )
{
Psum += (*i)->Get4Momentum();
#ifdef debugQGSParticipants
G4cout<<"Nusleus nucleon # and its 4Mom. "<<NuclNo<<" "<<(*i)->Get4Momentum()<<G4endl;
NuclNo++;
#endif
NuclNo++;
}
G4LorentzRotation toCms( -1*Psum.boostVector() );
@@ -1579,9 +1583,9 @@ G4bool G4QGSParticipants::DeterminePartonMomenta()
#ifdef debugQGSParticipants
G4cout<<G4endl<<"In CMS---------------"<<G4endl;
G4cout<<"Projectile 4 Mom "<<Projectile4Momentum<<G4endl;
NuclNo=0;
#endif
NuclNo=0;
G4LorentzVector Target4Momentum(0.,0.,0.,0.);
for(i = theTargets.begin(); i != theTargets.end(); i++ )
{
@@ -1589,9 +1593,9 @@ G4bool G4QGSParticipants::DeterminePartonMomenta()
(*i)->Set4Momentum( tmp );
#ifdef debugQGSParticipants
G4cout<<"Target nucleon # and 4Mom "<<" "<<NuclNo<<" "<<(*i)->Get4Momentum()<<G4endl;
NuclNo++;
#endif
Target4Momentum += tmp;
NuclNo++;
}
G4double S = Psum.mag2();
@@ -1600,11 +1604,11 @@ G4bool G4QGSParticipants::DeterminePartonMomenta()
#ifdef debugQGSParticipants
G4cout<<"Sum of target nucleons 4 momentum "<<Target4Momentum<<G4endl<<G4endl;
G4cout<<"Target nucleons mom: px, py, z_1, m_i"<<G4endl;
NuclNo=0;
#endif
//G4double PplusProjectile = Projectile4Momentum.plus();
G4double PminusTarget = Target4Momentum.minus();
NuclNo=0;
for(i = theTargets.begin(); i != theTargets.end(); i++ )
{
@@ -1634,8 +1638,8 @@ G4bool G4QGSParticipants::DeterminePartonMomenta()
(*i)->Set4Momentum(tmp);
#ifdef debugQGSParticipants
G4cout<<"Target nucleons # and mom: "<<NuclNo<<" "<<(*i)->Get4Momentum()<<G4endl;
NuclNo++;
#endif
NuclNo++;
}
//+++++++++++++++++++++++++++++++++++++++++++
@@ -1765,13 +1769,13 @@ G4bool G4QGSParticipants::DeterminePartonMomenta()
aParton->Set4Momentum(tmp);
#ifdef debugQGSParticipants
G4cout<<" "<<tmp<<" "<<SumZ+(1.-SumZ)<<" (z-fraction)"<<G4endl;
NuclNo=0;
#endif
// End of work with the projectile
// Work with target nucleons
NuclNo=0;
for(i = theTargets.begin(); i != theTargets.end(); i++ )
{
nSeaPair = (*i)->GetSoftCollisionCount()-1;
@@ -1958,19 +1962,19 @@ G4bool G4QGSParticipants::DeterminePartonMomenta()
#ifdef debugQGSParticipants
G4cout<<" "<<Tmp<<" "<<Tmp.mag()<<" (mass)"<<G4endl;
NuclNo=0;
#endif
// End of work with the projectile
// Work with target nucleons
NuclNo=0;
for(i = theTargets.begin(); i != theTargets.end(); i++ )
{
nSeaPair = (*i)->GetSoftCollisionCount()-1;
#ifdef debugQGSParticipants
G4cout<<"nSeaPair of target and N# "<<nSeaPair<<" "<<NuclNo<<G4endl;
NuclNo++;
#endif
NuclNo++;
for (G4int aSeaPair = 0; aSeaPair < nSeaPair; aSeaPair++)
{
aParton = (*i)->GetNextParton(); // for quarks
@@ -2027,8 +2031,8 @@ G4bool G4QGSParticipants::DeterminePartonMomenta()
aParton->Set4Momentum(Tmp);
#ifdef debugQGSParticipants
G4cout<<" "<<Tmp<<" "<<Tmp.mag()<<" (mass)"<<G4endl;
NuclNo++;
#endif
NuclNo++;
} // End of for(i = theTargets.begin(); i != theTargets.end(); i++ )
return true;
@@ -2137,10 +2141,10 @@ void G4QGSParticipants::CreateStrings()
//-----------------------------------------
#ifdef debugQGSParticipants
G4int IntNo=0;
G4cout<<"Strings created in soft interactions"<<G4endl;
#endif
std::vector<G4InteractionContent*>::iterator i;
G4int IntNo=0;
i = theInteractions.begin();
while ( i != theInteractions.end() ) /* Loop checking, 07.08.2015, A.Ribon */
{
@@ -2150,8 +2154,8 @@ void G4QGSParticipants::CreateStrings()
#ifdef debugQGSParticipants
G4cout<<"An interaction # and soft coll. # "<<IntNo<<" "
<<anIniteraction->GetNumberOfSoftCollisions()<<G4endl;
IntNo++;
#endif
IntNo++;
if (anIniteraction->GetNumberOfSoftCollisions())
{
G4VSplitableHadron* pProjectile = anIniteraction->GetProjectile();