From 61ab9719065cba722f8742601a57dfe48fcc9fbb Mon Sep 17 00:00:00 2001 From: Volodymyr Vovchenko Date: Thu, 18 Apr 2019 17:28:44 +0200 Subject: [PATCH 1/2] Fixed bug in CCE with VcTPS()->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]; @@ -698,7 +694,7 @@ namespace thermalfist { std::vector 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]++; From d3cdb0bc00c6ffa724dca4ea4c295ba0fe613b89 Mon Sep 17 00:00:00 2001 From: Volodymyr Vovchenko Date: Fri, 19 Apr 2019 23:56:43 +0200 Subject: [PATCH 2/2] Fixed bug with fluctuations in selectively canonical ensemble --- src/library/HRGBase/ThermalModelCanonical.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/library/HRGBase/ThermalModelCanonical.cpp b/src/library/HRGBase/ThermalModelCanonical.cpp index 7255f9f..b4f0f34 100644 --- a/src/library/HRGBase/ThermalModelCanonical.cpp +++ b/src/library/HRGBase/ThermalModelCanonical.cpp @@ -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(); @@ -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]); @@ -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]);