Thermal-FIST 1.5
Package for hadron resonance gas model applications
Loading...
Searching...
No Matches
CylindricalBlastWaveEventGenerator.cpp
Go to the documentation of this file.
1/*
2 * Thermal-FIST package
3 *
4 * Copyright (c) 2015-2019 Volodymyr Vovchenko
5 *
6 * GNU General Public License (GPLv3 or later)
7 */
9
10#include <iostream>
11#include <algorithm>
12
13#include "HRGBase/xMath.h"
18
19using namespace std;
20
21namespace thermalfist {
22
23 CylindricalBlastWaveEventGenerator::CylindricalBlastWaveEventGenerator(ThermalParticleSystem * TPS, const EventGeneratorConfiguration & config, double T, double betas, double etamax, double npow, double Rperp) :
25 m_T(T), m_BetaS(betas), m_EtaMax(etamax), m_n(npow), m_Rperp(Rperp)
26 {
27 SetConfiguration(TPS, config);
28
29 //SetMomentumGenerators();
30 }
31
32 CylindricalBlastWaveEventGenerator::CylindricalBlastWaveEventGenerator(ThermalModelBase *THM, double T, double betas, double etamax, double npow, bool /*onlyStable*/, EventGeneratorConfiguration::ModelType EV, ThermalModelBase *THMEVVDW) :
34 m_T(T), m_BetaS(betas), m_EtaMax(etamax), m_n(npow), m_Rperp(6.5) {
37 if (THM->Ensemble() == ThermalModelBase::CE)
39 if (THM->Ensemble() == ThermalModelBase::SCE)
41 if (THM->Ensemble() == ThermalModelBase::CCE)
43
45
46 config.fEnsemble = ensemble;
47 config.fModelType = modeltype;
48 config.CFOParameters = THM->Parameters();
49 config.B = THM->Parameters().B;
50 config.Q = THM->Parameters().Q;
51 config.S = THM->Parameters().S;
52 config.C = THM->Parameters().C;
53
54 config.bij.resize(THMEVVDW->ComponentsNumber());
55 for (size_t i = 0; i < config.bij.size(); ++i) {
56 config.bij[i].resize(THMEVVDW->ComponentsNumber());
57 for (size_t j = 0; j < config.bij.size(); ++j) {
58 config.bij[i][j] = THMEVVDW->VirialCoefficient(i, j);
59 }
60 }
61
62 config.aij.resize(THMEVVDW->ComponentsNumber());
63 for (size_t i = 0; i < config.bij.size(); ++i) {
64 config.aij[i].resize(THMEVVDW->ComponentsNumber());
65 for (size_t j = 0; j < config.bij.size(); ++j) {
66 config.aij[i][j] = THMEVVDW->AttractionCoefficient(i, j);
67 }
68 }
69
70 SetConfiguration(THMEVVDW->TPS(), config);
71
72 //SetMomentumGenerators();
73 }
74
75 void CylindricalBlastWaveEventGenerator::SetParameters(double T, double betas, double etamax, double npow) {
76 m_T = T;
77 m_BetaS = betas;
78 m_EtaMax = etamax;
79 m_n = npow;
80 m_ParametersSet = false;
81
82 //SetMomentumGenerators();
83 }
84
86 {
87 m_BetaS = (2. + m_n) / 2. * betaT;
88 m_ParametersSet = false;
89
90 //SetMomentumGenerators();
91 }
92
94 {
96 m_BWGens.resize(0);
97
98 // Find \tau_H from Veff / (\delta \eta) = \pi \tau R^2 * I where I is an integral over transverse velocity profile computed numerically
99 double tau = m_THM->Volume() / (2. * GetEtaMax()) / (2. * xMath::Pi()) / GetRperp() / GetRperp() / GetVeffIntegral();
100
101 if (m_THM != NULL) {
102 for (size_t i = 0; i < m_THM->TPS()->Particles().size(); ++i) {
103 const ThermalParticle& part = m_THM->TPS()->Particles()[i];
105
106 double T = m_THM->Parameters().T;
107 double Mu = m_THM->FullIdealChemicalPotential(i);
108 if (m_THM->TPS()->ResonanceWidthIntegrationType() == ThermalParticle::eBW || m_THM->TPS()->ResonanceWidthIntegrationType() == ThermalParticle::eBWconstBR)
109 m_BWGens.push_back(new RandomGenerators::ThermalEnergyBreitWignerGenerator(&m_THM->TPS()->Particle(i), T, Mu));
110 else
111 m_BWGens.push_back(new RandomGenerators::ThermalBreitWignerGenerator(&m_THM->TPS()->Particle(i), T, Mu));
112 }
113 }
114 }
115
117 {
118 m_THM->SetTemperature(m_Config.CFOParameters.T);
119 m_THM->SetBaryonChemicalPotential(m_Config.CFOParameters.muB);
120 m_THM->SetElectricChemicalPotential(m_Config.CFOParameters.muQ);
121 m_THM->SetStrangenessChemicalPotential(m_Config.CFOParameters.muS);
122
123 if (m_Config.CFOParameters.gammaq != 1.0)
124 m_THM->SetGammaq(m_Config.CFOParameters.gammaq);
125
126 if (m_Config.CFOParameters.gammaS != 1.0)
127 m_THM->SetGammaS(m_Config.CFOParameters.gammaS);
128
129 if (m_Config.CFOParameters.gammaC != 1.0)
130 m_THM->SetGammaC(m_Config.CFOParameters.gammaC);
131
132 double Veff = m_Config.CFOParameters.V;
133
134 m_THM->CalculatePrimordialDensities();
135 double totB = m_THM->BaryonDensity() * Veff;
136 double totQ = m_THM->ElectricChargeDensity() * Veff;
137 double totS = m_THM->StrangenessDensity() * Veff;
138 double totC = m_THM->CharmDensity() * Veff;
139
140 if (m_Config.fEnsemble == EventGeneratorConfiguration::CE) {
141 cout << endl;
142 cout << "Integrated values of conserved charges:" << endl;
143 cout << "B = " << totB << endl;
144 cout << "Q = " << totQ << endl;
145 cout << "S = " << totS << endl;
146 cout << "C = " << totC << endl;
147
148 double Vcorr = 1.;
149 if (m_Config.CanonicalB) {
150
151 if (abs(totB) > 1.e-6) {
152 Vcorr = round(totB) / totB;
153 Veff *= Vcorr;
154 cout << "Volume rescaling factor Vcorr = " << Vcorr << endl;
155 cout << "B: " << totB << " -> " << round(totB) << endl;
156 }
157
158 m_Config.B = round(totB);
159 }
160
161 if (m_Config.CanonicalQ) {
162 cout << "Q: " << totQ * Vcorr << " -> " << round(totQ * Vcorr) << endl;
163 m_Config.Q = round(totQ * Vcorr);
164 }
165
166 if (m_Config.CanonicalS && m_Config.S != 0) {
167 cout << "S: " << totS * Vcorr << " -> " << round(totS * Vcorr) << endl;
168 m_Config.S = round(totS * Vcorr);
169 }
170
171 if (m_Config.CanonicalC && m_Config.C != 0) {
172 cout << "C: " << totC * Vcorr << " -> " << round(totC * Vcorr) << endl;
173 m_Config.C = round(totC * Vcorr);
174 }
175 }
176
177 m_THM->SetVolume(Veff);
178 m_THM->SetCanonicalVolume(Veff);
181 }
182
183 double CylindricalBlastWaveEventGenerator::GetVeffIntegral() const
184 {
185 double ret = 0.0;
186
187 std::vector<double> xleg, wleg;
189
190 for (int iint = 0; iint < xleg.size(); ++iint) {
191 double zeta = xleg[iint];
192 double w = wleg[iint];
193 double betar = pow(zeta, GetNPow()) * GetBetaSurface();
194 ret += w * zeta / sqrt(1. - betar * betar);
195 }
196
197 return ret;
198 }
199
200} // namespace thermalfist
void SetMeanBetaT(double betaT)
Set the mean transverse flow velocity.
CylindricalBlastWaveEventGenerator(ThermalParticleSystem *TPS=NULL, const EventGeneratorConfiguration &config=EventGeneratorConfiguration(), double T=0.120, double betas=0.5, double etamax=0.5, double npow=1., double Rperp=6.5)
Construct a new CylindricalBlastWaveEventGenerator object.
Implements the cylindrically symmetric blast-wave model parametrization.
std::vector< RandomGenerators::ThermalBreitWignerGenerator * > m_BWGens
std::vector< RandomGenerators::ParticleMomentumGenerator * > m_MomentumGens
Vector of momentum generators for each particle species.
void ClearMomentumGenerators()
Clears the momentum generators for all particles.
EventGeneratorConfiguration m_Config
void SetConfiguration(ThermalParticleSystem *TPS, const EventGeneratorConfiguration &config)
Sets the event generator configuration.
virtual void SetParameters()
Sets up the event generator ready for production.
Class for generating momentum of a particle in accordance with a longitudinally boost invariant and a...
Class for generating mass of resonance in accordance with the constant width Breit-Wigner distributio...
Class for generating mass of resonance in accordance with the energy-dependent Breit-Wigner distribut...
Abstract base class for an HRG model implementation.
virtual double AttractionCoefficient(int, int) const
QvdW mean field attraction coefficient .
int ComponentsNumber() const
Number of different particle species in the list.
virtual double VirialCoefficient(int, int) const
Excluded volume coefficient .
const ThermalModelParameters & Parameters() const
@ SCE
Strangeness-canonical ensemble.
@ CCE
Charm-canonical ensemble.
Class containing all information about a particle specie.
int Statistics() const
Particle's statistics.
double Mass() const
Particle's mass [GeV].
@ eBWconstBR
Energy-dependent Breit-Wigner scheme (eBW) with constant branching ratios when evaluating feeddown.
@ eBW
Energy-dependent Breit-Wigner scheme (eBW)
Class containing the particle list.
void GetCoefsIntegrateLegendre32(double a, double b, std::vector< double > *x, std::vector< double > *w)
constexpr double Pi()
Pi constant.
Definition xMath.h:23
The main namespace where all classes and functions of the Thermal-FIST library reside.
Definition CosmicEoS.h:9
Structure containing the thermal event generator configuration.
Ensemble fEnsemble
The statistical ensemble used.
Ensemble
Enumerates the statistical ensembles.
ModelType
Enumerates the different interaction models.
Contains some extra mathematical functions used in the code.