Skip to content

Commit

Permalink
Merge pull request #20 from vlvovch/devel
Browse files Browse the repository at this point in the history
- Fixed bug in CCE with Vc<V event generator
- Fixed bug with fluctuations in selectively canonical ensemble
  • Loading branch information
vlvovch authored Apr 19, 2019
2 parents 1e91614 + d3cdb0b commit ee984ac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
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 1)
set (ThermalFIST_VERSION_DEVEL 4)
set (ThermalFIST_VERSION_DEVEL 5)

# configure a header file to pass some of the CMake settings
# to the source code
Expand Down
12 changes: 6 additions & 6 deletions src/library/HRGBase/ThermalModelCanonical.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ Obtained: %lf\n\
}

for (size_t iN = 0; iN < m_PartialZ.size(); ++iN) {
if (m_BMAX != 0 && m_BMAX != 1)
if (m_BMAX != 0 && m_BMAX != 1 && !m_Banalyt) // TODO: cross-check
m_PartialZ[iN] /= 2. * xMath::Pi();
if (m_QMAX != 0) {
m_PartialZ[iN] /= 2. * xMath::Pi();
Expand Down Expand Up @@ -617,7 +617,7 @@ Obtained: %lf\n\
}
else {
for (int n = 1; n <= tpart.ClusterExpansionOrder(); ++n) {
int ind = m_QNMap[QuantumNumbers(n*tpart.BaryonCharge(), n*tpart.ElectricCharge(), n*tpart.Strangeness(), n*tpart.Charm())];
int ind = m_QNMap[QuantumNumbers(m_BCE*n*tpart.BaryonCharge(), m_QCE*n*tpart.ElectricCharge(), m_SCE*n*tpart.Strangeness(), m_CCE*n*tpart.Charm())];

double densityClusterN = tpart.DensityCluster(n, m_Parameters, IdealGasFunctions::ParticleDensity, m_UseWidth, m_Chem[i]);

Expand Down Expand Up @@ -647,10 +647,10 @@ Obtained: %lf\n\
for (int n1 = 1; n1 <= n1max; ++n1) {
for (int n2 = 1; n2 <= n2max; ++n2) {
int ind = m_QNMap[QuantumNumbers(
n1*tpart1.BaryonCharge() + n2 * tpart2.BaryonCharge(),
n1*tpart1.ElectricCharge() + n2 * tpart2.ElectricCharge(),
n1*tpart1.Strangeness() + n2 * tpart2.Strangeness(),
n1*tpart1.Charm() + n2 * tpart2.Charm())];
m_BCE*(n1*tpart1.BaryonCharge() + n2 * tpart2.BaryonCharge()),
m_QCE*(n1*tpart1.ElectricCharge() + n2 * tpart2.ElectricCharge()),
m_SCE*(n1*tpart1.Strangeness() + n2 * tpart2.Strangeness()),
m_CCE*(n1*tpart1.Charm() + n2 * tpart2.Charm()))];

double densityClusterN1 = tpart1.DensityCluster(n1, m_Parameters, IdealGasFunctions::ParticleDensity, m_UseWidth, m_Chem[i]);
double densityClusterN2 = tpart2.DensityCluster(n2, m_Parameters, IdealGasFunctions::ParticleDensity, m_UseWidth, m_Chem[j]);
Expand Down
6 changes: 1 addition & 5 deletions src/library/HRGEventGenerator/EventGeneratorBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,6 @@ namespace thermalfist {
m_AntiChargeMesons.push_back(std::make_pair(densities[i], i));
m_MeanACM += densities[i];
}
else if (m_THM->TPS()->Particles()[i].BaryonCharge() == 0 && m_THM->TPS()->Particles()[i].Strangeness() == 0 && m_THM->TPS()->Particles()[i].ElectricCharge() == 1) {
m_ChargeMesons.push_back(std::make_pair(densities[i], i));
m_MeanCM += densities[i];
}
else if (m_THM->TPS()->Particles()[i].BaryonCharge() == 0 && m_THM->TPS()->Particles()[i].Strangeness() == 0 && m_THM->TPS()->Particles()[i].ElectricCharge() == 0 && m_THM->TPS()->Particles()[i].Charm() == 1) {
m_CharmMesons.push_back(std::make_pair(densities[i], i));
m_MeanCHRMM += densities[i];
Expand Down Expand Up @@ -698,7 +694,7 @@ namespace thermalfist {
std::vector<int> totalsaux2(m_THM->TPS()->Particles().size(), 0);
int netC = 0;
for (size_t i = 0; i < totalsaux.size(); ++i) {
if (m_THM->TPS()->Particles()[i].Strangeness() > 0) {
if (m_THM->TPS()->Particles()[i].Charm() > 0) {
for (int j = 0; j < totalsaux[i]; ++j) {
if (RandomGenerators::randgenMT.rand() < fraction) {
totalsaux2[i]++;
Expand Down

0 comments on commit ee984ac

Please sign in to comment.