Skip to content

Commit

Permalink
Merge pull request #31 from vlvovch/devel
Browse files Browse the repository at this point in the history
Version 1.3.1
  • Loading branch information
vlvovch authored May 26, 2021
2 parents b19e19c + 78fbddc commit dfcd0d1
Show file tree
Hide file tree
Showing 35 changed files with 1,129 additions and 140 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
language: cpp
compiler: g++
sudo: required
dist: trusty
dist: bionic

before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
- sudo apt-get update

install:
- sudo apt-get install g++-6 cmake qt5-default
Expand Down
194 changes: 194 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)


## [Version 1.3.1]

Date: 2021-05-26

Minor enhancements and bugfixes

## Enhancements
- GUI: Output moments in addition to susceptiblities in the correlations dialog, output nudyn and D measure in equation of state tab
- GUI: Show lattice data for ratios of quantities for the equation of state tab in the GUI, where available
- GUI: Display mean pT in the event generator tab
- Event generator: Sampling of the space-time coordinates in addition to the momenta (*not yet supported for the Siemens-Rasmussen model*)
- Event generator: Write the output in the format tailor for UrQMD afterburner from https://github.com/jbernhard/urqmd-afterburner
- Event generator: Output particle energy (p0) by default when writing to file


## Bugfixes
- Fix the flag setting in ThermalModelPCE for the Saha equation mode and the freeze-out of long-lived resonances
- GUI: Fix the output of strongly intensive quantities for net-particle correlations
- Event generator: Correct resonance mass-energy rescaling when masses of decay products exceed the mass of a resonance
- Add contributions of the K0S decays to the inclusive (weak decay included) yields of pions. Note that decay contributions from K0L are not included

## [Version 1.3]

Date: 2020-11-07

Version 1.3 contains a number of new features, improvements, and bugfixes

## Partial chemical equilibrium (PCE)

This release implements HRG in partial chemical equilibrium (PCE) [Bebie et al, [Nucl. Phys. B **378**, 95 (1992)](https://inspirehep.net/literature/316591)], as appropriate for modeling the hadronic phase of heavy-ion collisions. PCE is implemented as a new **ThermalModelPCE** class, and has been used in two recent papers, [Phys. Lett. B **800**, 135131 (2020)](https://inspirehep.net/literature/1726464) and [Phys. Rev. C **102**, 024909 (2020)](https://inspirehep.net/literature/1751960)

See [PCE-Saha-LHC.cpp](./src/examples/PCE/PCE-Saha-LHC.cpp) for a usage example and [this link](https://fias.uni-frankfurt.de/~vovchenko/project/thermal-fist/doc/classthermalfist_1_1_thermal_model_p_c_e.html) for documentation.

The PCE-HRG model is available in the thermal fitting routine, with Tkin being an extra fitting parameter

The PCE-HRG is also accessible for use in the graphical user interface program through a button `PCE/Saha/Other...`

## Particle lists

- The default particle list is now based on the 2020 edition of the PDG listing. As before, the list contains only hadrons and resonances with an established status. Changes compared to the old 2014 PDG list are mild.

- Version 1.3 now fully supports charm. The charmed hadrons are available in an extended input list file [list-withcharm.dat](./input/list/PDG2020/list-withcharm.dat)

- The excited nuclei with mass number up to A = 5 have been added with this release, they are available in an extended input list file [list-withexcitednuclei.dat](./input/list/PDG2020/list-withexcitednuclei.dat). The reference for this list of excited nuclei is [Phys. Lett. B **809**, 135746 (2020)](https://inspirehep.net/literature/1790683)

- The hadron list converted from [SMASH](https://smash-transport.github.io/) transport model (version 1.8) is available [here](./input/list/SMASH-1.8)

## Other changes

- Mixed-canonical ensembles in Monte Carlo event generator
- Reworked cylindrical blast-wave event generator with much faster initialization
- Cracow freeze-out generator
- Fermi-Dirac and Bose-Einstein momentum samplers for the event generator with quantum statistics
- Correct decay kinematics involving leptons and photons, the decay leptons/photons, if any, are included in event generator output
- Option for modular loading of particle lists
- Functions for computing net-particle/net-charge correlators (see documentation)
- Leptons and photons will appear in decays of some hadrons with correct kinematics, even if they are not included in the particle list

## Changes to the graphical user interface
- Calculation of matrices of various 2nd-order correlators (accessible on the `Thermal model` tab via `Correlations...` button
- For quantum van der Waals and X-terms excluded volume models: the EV/vdW interactions by default are now only for baryon-baryon and antibaryon-antibaryon pairs, in order to make it consistent with the literature
- Enable PCE mode via `PCE/Saha/Other...`, then possible to fit Tkin in the thermal fits mode
- Option for quantum statistical momentum distribution in the event generator mode (note that multiplicity distributions are still Poisson!)
- Mixed-canonical ensembles in the event generator mode
- Cracow model in the event generator mode

## Bugfixes
- Fix for Bose-Einstein condensation issue in event generator with finite resonance widths
- Fix for Fermi-Dirac integrals in case of massless particles
- Fix for decay properties of some charmed hadrons
- Fix for momentum sampling in event generators in case of zero collective/radial flow

## [Version 1.2]

Date: 2019-07-22

**The version of the code published in [Computer Physics Communications](https://doi.org/10.1016/j.cpc.2019.06.024)**

### Changes
- Improved performace of the event generator. Exact baryon number conservation now taken into account using [Devroye's method](https://doi.org/10.1016/S0167-7152(02)00055-X) of sampling the Bessel distribution
- Possibility to set volume on an event-by-event basis in the event generator
- The beta parameter in cylindrical blast-wave model now corresponds to the surface velocity parameter \beta_s
- Mixed-canonical ensembles are now available through GUI (use the canonical ensemble and conservation laws dialogs)

### Bugfixes
- Mixed-canonical ensembles now work at non-zero densities of conserved charges
- Correct analytic calculation of fluctuations in mixed-canonical ensembles
- Small violation of electric charge conservation in event generator within full canonical ensemble
- Proxy net charge susceptibility now corresponds again to net-charge instead of net-pion number. This fixes the output of the cpc4 example, a bug introduced in the pre-release of version 1.2

## [Version 1.1]

Date: 2019-01-25

- A pdg code is now held in a 64-bit integer (was 32-bit)
- A pdg code with a trailing zero in thermal fit/yields applications can now be interpreted as a sum of yields of particles and antiparticles, which correspond to the pdg code without this trailing zero
- The fit procedure is improved to catch possible issues with a Bose-Einstein condensation
- cpc2 and cpc3 examples slightly reworked and optimized, calculation of fit number of dof in cpc3 corrected
- Cosmetic changes to the code, mainly in response to compiler warnings

## [Version 1.0]

Date: 2019-01-16

Matches the code released with the [arXiv documentation paper](https://arxiv.org/abs/1901.05249v1)

- Charm particles
- Possibility to set seed in the random generator

## [Version 0.9]

Date: 2019-01-09

**Library**

- Possibility to constrain baryochemical potential by entropy-per-baryon ratio
- Support for charm-canonical ensemble in event generator
- Code structure optimization
- Doxygen documentation

**GUI frontend**

- More convenient HRG model and thermal fit configuration in GUI
- Thermal fit plots
- New equation of state tab for calculating temperature dependencies of various observables,
- Possibility to increase/decrease font size

**Other**

- More files with various experimental data
- New examples

## [Version 0.8]

Date: 2018-12-26

#### Library
- New, more human-readable format of decays input file (old one still supported)
- Broyden method related routines refactored. Non-linear equations are now solved when needed using the generic routines, resulting in a cleaner code
- Fix for calculations of the ideal gas functions in the case of zero particle mass
- Decay feeddown contributions can now be separated into strong/electromagnetic/weak decays
- Fixed bug regarding light quark content calculations for hypernuclei (only relevant if both chemical non-eq. of light quarks and light hypernuclei are considered)
- All third-party libraries/code moved into the `thirdparty` folder
- Resonance widths: eBW scheme with constant branching ratios added (very similar results to the standard eBW scheme but much faster)

#### GUI
- New tab for editing the particle list on the fly
- Tool-tips
- Possibility to do calculations in the Thermal Model tab using the parameters extracted from a thermal fit in the other tab
- *About Thermal-FIST* dialog window
- Menu, with an option to increase/decrease font size
- Splash screen, app icon (Windows only)

## [Version 0.7]

Date: 2018-12-10

- eBW scheme now also implemented in event generator
- Quantum statistics by default now computed using quadratures (was cluster expansion)
- Zero-width scheme is now the default one (was energy-independent Breit-Wigner)
- Spectral functions and (energy-dependent) branching ratios visualization in gui
- Some improvements in numerics at low temperatures

## [Version 0.6]

Date: 2018-08-02

**The first public version of Thermal-FIST**

[Version 1.3.1]: https://github.com/vlvovch/Thermal-FIST/releases/tag/v1.3.1

[Version 1.3]: https://github.com/vlvovch/Thermal-FIST/releases/tag/v1.3

[Version 1.2]: https://github.com/vlvovch/Thermal-FIST/releases/tag/v1.2

[Version 1.1]: https://github.com/vlvovch/Thermal-FIST/releases/tag/v1.1

[Version 1.0]: https://github.com/vlvovch/Thermal-FIST/releases/tag/v1.0

[Version 0.9]: https://github.com/vlvovch/Thermal-FIST/releases/tag/v0.9

[Version 0.8]: https://github.com/vlvovch/Thermal-FIST/releases/tag/v0.8

[Version 0.7]: https://github.com/vlvovch/Thermal-FIST/releases/tag/v0.7

[Version 0.6]: https://github.com/vlvovch/Thermal-FIST/releases/tag/v0.6

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project (ThermalFIST)
# The version number.
set (ThermalFIST_VERSION_MAJOR 1)
set (ThermalFIST_VERSION_MINOR 3)
set (ThermalFIST_VERSION_DEVEL 0)
set (ThermalFIST_VERSION_DEVEL 1)

# configure a header file to pass some of the CMake settings
# to the source code
Expand Down
8 changes: 0 additions & 8 deletions include/HRGBase/SplineFunction.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
/*
/*
/*
/*
/*
/*
/*
/*
/*
/* * GNU General Public License (GPLv3 or later)
*/
#ifndef SPLINEFUNCTION_H
Expand Down
1 change: 1 addition & 0 deletions include/HRGBase/ThermalModelBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,7 @@ namespace thermalfist {
/// in accordance with the 0-based index of each specie.
/// PdgToId() maps PDG ID to the 0-based index.
const std::vector<double>& Densities() const { return m_densities; }
std::vector<double>& Densities() { return m_densities; }

/// A vector with total particle number densities,
/// which include the feeddown contribution in accordance
Expand Down
9 changes: 9 additions & 0 deletions include/HRGBase/ThermalParticleSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,15 @@ namespace thermalfist {

void Initialize(const std::string& InputFile = "", const std::string& DecayFile = "", bool GenAntiP = true, double mcut = -1.);

void FinalizeListLoad();

void FinalizeDecaysLoad();

/// Check is the particle list is in the iSS format
bool CheckListIsiSS(const std::string &filename);

/// Load particle list from the iSS sampler format used at https://github.com/chunshen1987/iSS
void LoadListiSS(const std::string& filename, const std::set<std::string>& flags = std::set<std::string>(), double mcut = 1.e9);

private:
std::vector<ThermalParticle> m_Particles;
Expand Down
10 changes: 10 additions & 0 deletions include/HRGEV/ThermalModelEVCrossterms.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ namespace thermalfist {

// Override functions end


const std::vector< std::vector<int> >& EVComponentIndices() const { return m_EVComponentIndices; }
virtual double DeltaMu(int i) const { return MuShift(i); }
const std::vector< std::vector<double> >& VirialMatrix() const { return m_Virial; }

protected:
/**
* \brief Solves the system of transcdental equations
Expand Down Expand Up @@ -197,6 +202,11 @@ namespace thermalfist {
double m_Pressure; /**< The (solved) total pressure */
double m_TotalEntropyDensity; /**< The (solved) entropy pressure */


std::vector<int> m_MapToEVComponent;
std::vector<int> m_MapFromEVComponent;
std::vector< std::vector<int> > m_EVComponentIndices;

private:
class BroydenEquationsCRS : public BroydenEquations
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ namespace thermalfist {
double T = 0.120,
double betas = 0.5,
double etamax = 0.5,
double npow = 1.);
double npow = 1.,
double Rperp = 6.5);

/// \deprecated
/// \brief Old constructor. Included for backward compatibility.
Expand Down Expand Up @@ -66,8 +67,11 @@ namespace thermalfist {
double GetBetaSurface() const { return m_BetaS; }
double GetNPow() const { return m_n; }
double GetEtaMax() const { return m_EtaMax; }
double GetRperp() const { return m_Rperp; }
private:
double m_T, m_BetaS, m_EtaMax, m_n;
double GetVeffIntegral() const;

double m_T, m_BetaS, m_EtaMax, m_n, m_Rperp;
};

/// For backward compatibility
Expand Down
13 changes: 11 additions & 2 deletions include/HRGEventGenerator/EventGeneratorBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ namespace thermalfist {
return os.str();
}

/// Lorentz boost
std::vector<double> LorentzBoost(const std::vector<double>& fourvector, double vx, double vy, double vz);

/// \brief Structure containing the thermal event generator configuration.
struct EventGeneratorConfiguration {
/// Enumerates the statistical ensembles
Expand Down Expand Up @@ -133,7 +136,7 @@ namespace thermalfist {
* The first element is a vector of the sampled yields.
* The second element is the weight.
*/
std::pair< std::vector<int>, double > SampleYields() const;
virtual std::pair< std::vector<int>, double > SampleYields() const;

/**
* \brief Samples the momenta of the particles and returns the sampled list of particles as an event.
Expand Down Expand Up @@ -168,7 +171,12 @@ namespace thermalfist {
*/
static SimpleEvent PerformDecays(const SimpleEvent& evtin, ThermalParticleSystem* TPS);


/**
* \brief The grand-canonical mean yields.
*
* \return std::vector<double> The computed grand-canonical mean yields.
*/
virtual std::vector<double> GCEMeanYields() const;

/// Helper variable to monitor the Acceptance rate of the rejection
/// sampling used for canonical ensemble and/or eigenvolumes.
Expand All @@ -195,6 +203,7 @@ namespace thermalfist {


double ComputeWeight(const std::vector<int>& totals) const;
double ComputeWeightNew(const std::vector<int>& totals) const;

protected:
/**
Expand Down
6 changes: 4 additions & 2 deletions include/HRGEventGenerator/RandomGenerators.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ namespace thermalfist {
/// Samples the 3-momentum of a particle
/// \param mass The mass of a particle. If negative value provided, defaults to the pole/vacuum mass
/// \return std::vector<double> A vector containing the sampled
/// \f$p_x\f$, \f$p_y\f$, \f$p_z\f$ components of the three-momentum
/// \f$p_x\f$, \f$p_y\f$, \f$p_z\f$ components of the three-momentum,
/// and, additionally, the space-time Cartesian coordinates \f$r_0\f$, \f$r_x\f$, \f$r_y\f$, \f$r_z\f$
/// in the collision center-of-mass frame
virtual std::vector<double> GetMomentum(double mass = -1.) const = 0;
};

Expand Down Expand Up @@ -149,7 +151,7 @@ namespace thermalfist {

double ComputeMaximum(double mass) const;

void FixParameters();
//void FixParameters();

double m_Mass, m_T, m_Mu;
int m_Statistics;
Expand Down
13 changes: 11 additions & 2 deletions include/HRGEventGenerator/SimpleEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,27 @@ namespace thermalfist {
/// Output photons and leptons, if any
bool printPhotonsLeptons;

/// Print the number of succesive decays before the particle was produced
/// Print the number of successive decays before the particle was produced
bool printDecayEpoch;

/// Print the space-time coordinates of the particles
bool printCoordinates;

/// Print the event weight for importance sampling
bool printWeight;

EventOutputConfig() :
printEnergy(false), printMotherPdg(false), printPhotonsLeptons(false), printDecayEpoch(false) { }
printEnergy(true), printMotherPdg(false), printPhotonsLeptons(false), printDecayEpoch(false), printCoordinates(false), printWeight(true) { }
};

/// Writes the event to an output file stream
void writeToFile(std::ofstream& fout, const EventOutputConfig& config = EventOutputConfig(), int eventnumber = 1);

/// Writes the event to an output file stream
void writeToFile(std::ofstream& fout, int eventnumber = 1) { writeToFile(fout, EventOutputConfig(), eventnumber); }

/// Writes the event in a format suitable for UrQMD afterburner, as described here https://github.com/jbernhard/urqmd-afterburner
void writeToFileForUrqmd(std::ofstream& fout);
};

} // namespace thermalfist
Expand Down
Loading

0 comments on commit dfcd0d1

Please sign in to comment.