-------------------------------------------------------------------

       ==========================================================
       Geant4 - an Object-Oriented Toolkit for Physics Simulation
       ==========================================================

      History file for hadronic/models/parton_string/hadronization directory
      -------------------------------------------------------------

This file should be used to summarize modifications introduced in the 
code and to keep track of all tags.

     ---------------------------------------------------------------
     * Please list in reverse chronological order (last date on top)
     ---------------------------------------------------------------

20-Nov-2018 A. Ribon         (had-hadronization-V10-04-07)
-  Corrected only the History file (no other changes).

20-Nov-2018 A. Ribon         (had-hadronization-V10-04-06)
-  Minor clean-up and indentation: no changes in the random sequence.

26-Oct-2018 V. Uzhinsky      (had-hadronization-V10-04-05)
-  G4LundStringFragmentation : tuning of strange - anti-strange probability
   production as a function of energy to describe NA61/SHINE 31 GeV/c p-C 
   data on K+ / K- production. Decreased also the Lambda0 production for 
   NA61/SHINE 158 GeV/c and 31 GeV/c p-C : for the former good agreement,
   while for the latter the simulation underestimates the data.
-  G4QGSMFragmentation : new algorithm for last string decay a-la Lund
   is implemented. Improved the algorithm to stop the fragmentation.
   Tuning of parameters with NA49 and NA61/SHINE data was performed.

04-Oct-2018 A. Ribon         (had-hadronization-V10-04-04)
-  Coverity fix and general clean-up: no changes in the physics, nor
   to the random sequence.

18-Jan-2018 A. Ribon         (had-hadronization-V10-04-03)
-  G4VLongitudinalStringDecay : removed useless caching in the method
   FragmentationMass which was causing rare irreproducibilities in
   gamma-nuclear reactions (i.e. involving QGS).

19-Dec-2017 V. Uzhinsky      (had-hadronization-V10-04-02)
-  Fine tuning of LUND and QGS fragmentations.

14-Dec-2017 V. Uzhinsky      (had-hadronization-V10-04-01)
-  Improved versions of LUND and QGS fragmentations.

07-Dec-2017 A. Ribon         (had-hadronization-V10-04-00)
-  Brought back the development version of hadronization 
   (as it was in had-hadronization-V10-03-07).

27-Oct-2017 A. Ribon         (had-hadronization-V10-03-09)
-  G4ExcitedStringDecay : introduced smearing of resonance masses
   (as requested by the PANDA Collaboration).
-  G4LundStringFragmentation : a dependence of <Pt> on S is introduced
   only for AntiP P annihilations.

26-Oct-2017 A. Ribon         (had-hadronization-V10-03-08)
-  Brought back the stable, production hadronization (as in 10.3 and 10.2).

24-Oct-2017 V. Uzhinsky      (had-hadronization-V10-03-07)
-  A dependence of <Pt> on S is introduced for AntiP P annihilations.
   It can reflect on other interactions.

19-Jul-2017 V. Uzhinsky      (had-hadronization-V10-03-06)
-  G4ExcitedStringDecay.cc
   Smearing of resonance masses is introduced.

-  G4LundStringFragmentation.cc
   Some bugs are fixed left after implementation of the rotating strings.

09-Mar-2017 A. Ribon         (had-hadronization-V10-03-05)
-  G4LundStringFragmentation : fixed memory leaks.

10-Feb-2017 V. Uzhinsky      (had-hadronization-V10-03-04)
-  First implementation of rotating strings with introduction of
   Mt distribution of hadrons.
   Changes are in G4LundSyringFragmentation.cc and .hh
                  G4FragmentingString.hh
                  G4LongitudinalStringDecay.hh
   Parameters are tuned using NA49 exp. data on pp-interactions.
   Good results are obtained for Pi+-, K+-. For P and Pbar <Pt> - xF
   correlations are not quite well.

13-Jan-2017 V. Uzhinsky      (had-hadronization-V10-03-03)
-  Re-organized and cleaned G4LUNDStringFragmentatio.
   The variant is tuned using NA49 exp. data on pp->p/pi/K +X. 

14-Dec-2016 A. Ribon         (had-hadronization-V10-03-02)
-  After the release G4 10.3, with "stable" version, this tag brings back
   the "development" version, similar (although not identical because
   of some code clean-up and the (internal) tag had-hadronization-V10-03-00,
   see below) to G4 10.2.ref10.
   (Please note that the changes in G4LundStringFragmentation.cc of the
   (internal) tag had-hadronization-V10-03-01 have been excluded in the
   present tag, in order to test one change at the time.)

30-Nov-2016 V. Uzhinsky      (had-hadronization-V10-03-01)
   G4LundStringFragmentation.cc - Mt distribution for produced hadrons
   was introduced.

 9-Nov-2016 A. Ribon         (had-hadronization-V10-03-00)
   G4ExcitedStringDecay : increased the number of max attempts to
   fragment strings from 10 to 100.

 8-Sep-2016 V. Uzhinsky      (had-hadronization-V10-02-14)
   Clearing of LUNDstringFragmentation. Bugs are fixed.

 7-Sep-2016 A. Ribon         (had-hadronization-V10-02-13)
   Created tag on branch of 10.2.ref07 to fix a bug on the method
   G4ExcitedStringDecay::FragmentStrings .
   Note that this bug has been already fixed in the trunk.

20-July-2016 A. Ribon        (had-hadronization-V10-02-12)
   G4LundStringFragmentation: V.U. erased the warring messages from
   the previous tag.

19-July-2016 V. Uzhinsky     (had-hadronization-V10-02-11)
   G4LundStringFragmentation: Method SetMinimalStringMass was essential improved.
   Energy-momentum conservation was restored for processes with Delta-isobar
   production.

30-June-2016 V. Uzhinsky     (had-hadronization-V10-02-10)
   One more misprint was found in G3LundStringFragmentaion.cc
   MinStringMass method.

29-June-2016 V. Uzhinsky     (had-hadronization-V10-02-09)
   Alberto found a misstype in the previous G3LundStringFragmentaion.cc
   The tag will be redone.

29-June-2016 V. Uzhinsky     (had-hadronization-V10-02-08)
   The method of G4VLongitudinalStringDecay::Splitup was transferd to FTF
   and QGS model because now the treat differently Delta isobars.

27-June-2016 V. Uzhinsky     (had-hadronization-V10-02-07)
   G4LundStringFragmentation.cc algorithm was improved.
   Fragmentation is made a'la LUND fragmentation.

13-June-2016 V. Uzhinsky     (had-hadronization-V10-02-06)
   G4LundStringFragmentation::Sample4Momentum() was improved.
   Average transvers momentum is set to 475 MeV for mesons and baryons,
   and <Pt> for barion 3/2 production - 800 MeV/c. 

   G4LundStringFragmentation::GetLightConeZ - alund=0.233 GeV^2 for strange
   meson produced by a quark, and alund=0.175 GeV^2 for q->baryon.

   di-quark fragmentation function into baryon (1/2) z^1.5, and z^(-0.25)
   for baryon (3/2). 
   Note: the tag was made accidentally in the wrong directory (src/).

 6-June-2016 V. Uzhinsky     (had-hadronization-V10-02-05)
   Re-tag of previouse tag. Compilation warning is erased.

 4-June-2016 V. Uzhinsky     (had-hadronization-V10-02-04)
   A solution of the baryon puzzle of NA49 data has been found! <Pt>
   of baryons 1/2 at a string fragmentation is setting up at 435 MeV/c,
   and <Pt> for barion 3/2 production - 900 MeV/c.

 1-June-2016 V. Uzhinsky     (had-hadronization-V10-02-03)
   Fine tuning of G4LundStringFragmentation.cc. <Pt> of mesons created at 
   quark fragmentation is decreased. <Pt> of baryons created at quark and
   diquark is increased. Fragmentation functions of qq-> B(1/2) and B(3/2)
   are implemented correctly.

28-May-2016 V. Uzhinsky      (had-hadronization-V10-02-02)
   <Pt^2> is increased in 2 times in G4LundStringFragmentation.cc.
   It is very important for a description of NA49 exp. data on
   pp-interactions at 158 GeV/c, especially for xF and Pt distributions.

23-May-2016 V. Uzhinsky      (had-hadronization-V10-02-01)
   Di-quark fragmentation into baryons is improved in LUND
   string fragmentation. Description of NA49 and NA61/SHINE
   exp. data on p+p->p+X is improved.

12-May-2016 V. Uzhinsky      (had-hadronization-V10-02-00)
 - G4LundStringFragmentation.cc, the method SetMinimalStringMass was improved
   which is important for Pbar P annihilation.

13-Aug-2015 A. Ribon      (had-hadronization-V10-01-09)
 - G4QGSMFragmentation, G4FragmentingString : Coverity fix.

 7-Aug-2015 A. Ribon      (had-hadronization-V10-01-08)
 - G4LundStringFragmentation, G4QGSMFragmentation, G4ExcitedStringDecay
   and G4VKinkyStringDecay : checking of 'while' loops.

 5-Aug-2015 A. Ribon      (had-hadronization-V10-01-07)
 - G4VLongitudinalStringDecay, G4LundStringFragmentation, G4QGSMFragmentation:
   replaced std::exp, std::log and std::pow with the faster 
   G4Exp, G4Log and G4Pow, respectively.
   This changes the random number sequence.

 5-June-2015 V. Uzhinsky  (had-hadronization-V10-01-06)
 - A mistake was erased in G4QGSMFragmentation::SplitEandP.
   FragmentationMass(NewString,&G4HadronBuilder::BuildLowSpin) ->
   FragmentationMass(NewString,&G4HadronBuilder::Build)!

 4-June-2015 V. Uzhinsky  (had-hadronization-V10-01-05)
 - G4QGSMFragmentation::SplitEandP a bug is fixed which led to energy-momentum
   non-conservation quite rare. 
   FragmentationMass(NewString,&G4HadronBuilder::BuildHighSpin);
   was changed into 
   FragmentationMass(NewString,&G4HadronBuilder::BuildLowSpin);
   See Uzhi 03.06.2014

 2-June-2015 V. Uzhinsky  (had-hadronization-V10-01-04)
 - G4ExcitedStringDecay.cc - a very serious bug was found. It led
   to energy-momentum non-conservation at QGSM application.
   I am afraid that it can have influence on FTF model hadronization.

29-May-2015 V. Uzhinsky   (had-hadronization-V10-01-03)
 - G4LundStringFragmentation - a bug led to FPE is erased. It was in
           G4LundStringFragmentation::FragmentString -- 
         if(!IsFragmentable(&aString)) // produce 1 hadron 
   was applied to qq- anti_qq string with mass 1951 MeV, and there was an attempt
   to produce 2 baryons without of a checking baryon masses. I am afraid
                 that it was presented before.
   Now it is: if(!aString.FourQuarkString() && !IsFragmentable(&aString)).

25-May-2015 V. Uzhinsky   (had-hadronization-V10-01-02)
 - G4LundStringFragmentation - Parameters are tuned for a description of NA49 data.

26-Mar-2015 A. Ribon      (had-hadronization-V10-01-01)
 - G4LundStringFragmentation - changes introduced by V. Uzhinsky to improve
   the reaction cross sections of: Pbar + P -> Pi+Pi-, K+K-

21-Jan-2015 A. Ribon      (had-hadronization-V10-01-00)
 - G4LundStringFragmentation - re-introduced M.Novak's fix, replacing
   "if(StringMass >= ...)" with "if(StringMass > ...)" in three places.

28-Nov-2014 V. Uzhinsky   (had-hadronization-V10-00-13)
 - G4LundStringFragmentation - charged baryon number conservation is fixed
   for K-nucleus interactions 

6-Nov-2014 V. Uzhinsky    (had-hadronization-V10-00-12)
 - Warning message is erased.

5-Nov-2014 V. Uzhinsky    (had-hadronization-V10-00-11)
 - Redoing tag had-hadronization-V10-00-10 because it was done in src directory
   instead of top directory - hadronization.

3-Nov-2014 V. Uzhinsky    (had-hadronization-V10-00-10)
- G4ExcitedStringDecay.cc Restoration of the initial string system is addded 
  for a correct repeatition of calculations in the case when hadronization is fault.

- G4LundStringFragmentation.cc Fragmentation functions for qq -> B are set as 
  f(z)~ Const for all baryons.

20-Oct-2014 A.Ribon        (had-hadronization-V10-00-09) 
- G4VLongitudinalStringDecay.cc : mixing between the vector mesons
  rho0 and omega have been changed from 50% (rho0) - 50% (omega) to
  100% (rho0) - 0% (omega), in order to reduce the pi0 production. 
  Expected little effects in thin-target, and significant effects
  in hadronic showers in calorimeters.

15-Oct-2014 V.Uzhinsky     (had-hadronization-V10-00-08)
- Essential improvement of QGS hadronization.
  Fragmentation functions of quarks and di-quarks are closed to Kaidalov's
  and Shabelskii's ones. G4QGSMFragmentation::GetLightConeZ was almost
  re-written. Ionk algorithm is inserted for sampling light-cone momentum
  fraction, z. Parameters of the fragmentation were tuned. They will be
  improved after a revision of the QGSM string creation algorithm.
- The algorith of G4QGSMFragmentation::SplitEandP was improved. It is 
  faster now.

29-Sep-2014, V.Uzhinsky    (had-hadronization-V10-00-07)
- Essential improvement of hadronization.
- Parameters and string fragmentation functions of 
  G4LundStringFragmentation.cc were tuned, assuming that the weight of
  uu-diquarks in protons is 1/6.
- Threatment of string decay direction was improved in G4FragmentingString.cc
  and G4LundStringFragmentation.cc
- EnergyAndMomentumCorrector was improved in G4ExcitedStringDecay.cc
- The method DiQuarkSplitUp in G4VLongitudinalStringDecay.cc is turned to
  virtual, and the corresponding methods were introduced in
  G4LundStringFragmentation.cc and G4QGSMFragmentation.cc
- Debugging possibilities are improved.

04-Jul-2014, A.Ribon       (had-hadronization-V10-00-06)
- G4LundStringFragmentation.cc : brought back the Sample4Momentum method
  as it was before to avoid crashes.

02-Jul-2014, A.Ribon       (had-hadronization-V10-00-05)
- G4ExcitedStringDecay.cc and G4LundStringFragmentation.cc : minor clean-up
  of the previous, internal two tags, and propose for testing.

30-May-2014, V.Uzhinsky    (had-hadronization-V10-00-04)
- Bug is fixed in G4LundStringFragmentation.cc for anti-diquark-diquark strings.
- Anisotropic decay is only left in G4LundStringFragmentation::Sample4Momentum for
  a sampling of momenta of 2 last produced hadrons for all strings. Before this,
  quark-diquark strings were decayed isotropically. It is improve a little bit 
  proton spectra.

25-May-2014, V. Uzhinsky   (had-hadronization-V10-00-03)
- Parameters of G4LundStringFragmentation.cc were re-tuned.
  Fragmentation function F(qq->B+anti-quark) was set to Z^2.

22-May-2014, A.Ribon       (had-hadronization-V10-00-02)
- Applied Coverity's suggestion to check that the vector index NumberOf_FS
  in G4LundStringFragmentation.cc does not exceed the allowed range.

12-May-2014, A.Ribon       (had-hadronization-V10-00-01)
- Applied Vladimir Uzhinsky's bug-fix on the positions of the increment
  of the variables "StateQ++" and "StateAQ" in G4LundStringFragmentation.cc.

24-Apr-2014, A.Ribon       (had-hadronization-V10-00-00)
- Applied Novak's bug fix in G4LundStringFragmentation.cc : replacing
  ">=" with ">" in three if statements, which caused crashes in the
  case of anti_sigma+ capture at rest on hydrogen.

14-Nov-2013, A.Ribon       (had-hadronization-V09-06-02)
- Fixed two mistakes in the index manipulation of the BaryonWeight
  4-dimensional vector in G4LundStringFragmentation.cc .

29-July-2013, H.Kurashige  (had-hadronization-V09-06-01)
- Remove inclusion of G4ShortLivedTable.hh (G4VLongitudinalStringDecay.cc) 

02-May-2013, A.Ribon       (had-hadronization-V09-06-00)
- For thread safety, replaced CLHEP::RandFlat with G4RandFlat in
  G4VLongitudinalStringDecay.cc.

27-Sep-2012, G.Cosmo
- Explicitly use inclusion of headers for system of units and physical
  constants, in plan to remove implicit inclusion from globals.hh.

13-Aug-2012, A.Ribon       (had-hadronization-V09-05-06)
- Fixed compilation error in G4ExcitedStringDecay.cc when the constructor
  of the Lorentz vector is made explicit.

25-Jul-2012, G.Folger       (had-hadronization-V09-05-05)
- Fixes for coverity in G4LundStringFragmentation.cc .

17-Jul-2012, G.Folger       (had-hadronization-V09-05-04)
- fixes for coverity in G4FragmentingString and G4VLongitudinalStringDecay

12-Jun-2012, G.Folger       (had-hadronization-V09-05-03)
- fix warnings on shadowed variables, affected G4LundStringFragmentation.cc

25-May-2012, G.Folger       (had-hadronization-V09-05-02)
- make copy ctor, =, == , and != operators private without implementation, 
   fixing coverity warnings

21 May 2012, Vladimir Uzhinsky (had-hadronization-V09-05-01)
-  Probabilities of s-sbar quark pairs and qq-qqbar diquark pairs
   are changed in G4LundStringFragmentation for a description of 
   the NA49 collaboration data.

12-Apr-2012, G.Folger       (had-hadronization-V09-05-00)
- Changes in debugging information in src/G4ExcitedStringDecay.cc

08 Nov 2011, Alberto Ribon              (had-hadronization-V09-04-03)
- Tagged the improvements in the code structure of the class
  G4LundStringFragmentation. Results remain exactly the same
  as before these code improvements.

08 Nov 2011, Alberto Ribon, svn rev 54374
- Factorized the method  G4LundStringFragmentation::FragmentString
  to make the code easier to understand and maintain.
  Also put at the end of the .cc file all newly added methods.

04 Nov 2011, Alberto Ribon, svn rev 54124
- Factorized the method  G4LundStringFragmentation::SplitLast
  to make the code easier to understand and maintain.

02 Nov 2011, Alberto Ribon, svn rev 53955
- Made public the virtual method G4LundStringFragmentation::FragmentString. 
  Clean up also old commented lines in two G4LundStringFragmentation
  methods: StopFragmenting and FragmentString.

1 Nov 2011, Gunter Folger, svn rev 53895
- G4LundStringFragmentation: simplify GetLightConeZ()

29 Sep 2011, Gunter Folger, svn rev 52604 
- G4LundStringFragmentation: Cleanup indentation

19 Jul 2011, Gunter Folger              (had-hadronization-V09-04-02)
- Correct mistake in tagging made for had-hadronization-V09-04-00/01

19 Jul 2011, Gunter Folger         bad tag (had-hadronization-V09-04-00)
- Address coverity warnings.
   One outstanding warning in G4LundStringFragmentation::Splitlast().

3 Nov 2010, Gunter Folger               (had-hadronization-V09-03-02)
- fix minor coverity warnings in G4HadronBuilder 

22-September-2010  V. Uzhinsky          (had-hadronization-V09-03-01)
--------------------------------------------------------------
- Warning messages are erased in G4LundStringFragmentation.cc

20-September-2010  V. Uzhinsky
------------------------------
- Phase space restrictions are introduced at small mass string 
  fragmentation.

5-August-2010  V. Uzhinsky
--------------------------
- Small re-organization is done in G4ExcitedStringDecay.hh. Inline
  methods were moved to G4ExcitedStringDecay.cc.

- An action is introduced in FragmentStrings. It acts when 
  EnergyAndMomentumCorrector can not be done due to large sum masses
  of produced hadrons. This led to energy-momentum violation. Now
  string fragmentation is repeted 100 times in a bad case.

21-June-2010  V. Uzhinsky               (had-hadronization-V09-03-00)
--------------------------------------------------------------
- Lund string fragmentation is improved. The inselfconsistency
  between LightFragmentationTest and Lund fragmentation is erased.
  Energy conservation in FTF is recovered.

6-December-2010  V. Uzhinsky,           (had-hadronization-V09-02-04)
--------------------------------------------------------------
- Lund string fragm. improved, start fragmentation.

17-July-2009  V. Uzhinsky               (had-hadronization-V09-02-03)
--------------------------------------------------------------
- Some small optimization are done.

9-July-2009 V. Uzhinsky                 (had-hadronization-V09-02-02)
--------------------------------------------------------------
- Bug was fixed in G4VLongitudinalStringDecay.cc at calculation of
  formation/creation time, c_light was inserted.
- String tension parameter was set to the usual value (1 GeV/fm) in
  G4LundStringFragmentation.cc

22-May-2009   Gunter Folger             (had-hadronization-V09-02-01)
--------------------------------------------------------------
- remove temporary workaround - fix is now in QGS
- change pt sampling in G4LundStringFragmentation to avoid near endless
  loop; this should improve overall performance slightly.
  Affected G4VLongitudinalStringDecay, where SampleQuarkPt() is 
  implemented; affected .hh and .cc for new optional argument of max Pt 
  to SampleQuarkPt()

18-May-2009   Gunter Folger             (had-hadronization-V09-02-00)
---------------------------------------------------------------------
- reset formatting changes by MK with tags hadr-prtn-hadr-V09-02-xx
- temporary workaround for wrong PDG codes created on wrong input from QGS 
  when used for e.g. antiproton.
   
2-May 2007    Gunter Folger             (had-hadronization-V08-02-03)
---------------------------------------------------------------------
- G4ExcitedStringDecay.hh: protect againt divide by 0 when KTsum1.e() is 0. 
    
24-April 2007 Gunter Folger             (had-hadronization-V08-02-02)
---------------------------------------------------------------------
- Seperate FTF and QGS fragmentation dir methods where V.Uzhinsky
  modified the algorithm for FTF.

2-March 2007 Gunter Folger              (had-hadronization-V08-02-01)
---------------------------------------------------------------------
- G4ExcitedStringDecay::EnergyAndMomentumCorrector no longer causes Exception 
  when no converging. Add more info when failing. Return correct status.
   
24-Jan 2007 Gunter Folger               (had-hadronization-V08-02-00)
--------------------------------------------------------------
- G4ExcitedStringDecay::EnergyAndMomentumCorrector :
  Correct bug which did stop correction even if not yet converged;
  check on convergence must check that scale-1 is close to 0,
  and not less than 0

26-May 2006 Gunter Folger
--------------------------------------------------------------
- Fix ( finally?) the charge check in G4HadronBuilder.cc
