8#ifndef EVENTGENERATORBASE_H
9#define EVENTGENERATORBASE_H
33 std::ostringstream os;
51 std::vector<double>
LorentzBoost(
const std::vector<double>& fourvector,
double vx,
double vy,
double vz);
92 std::vector< std::vector<double> >
bij;
95 std::vector< std::vector<double> >
aij;
145 virtual std::pair< std::vector<int>,
double >
SampleYields()
const;
348 std::vector<RandomGenerators::ThermalBreitWignerGenerator*>
m_BWGens;
358 const std::vector<int>& ids = std::vector<int>(),
359 const std::vector<std::vector<double>>& radii = std::vector<std::vector<double>>()
369 std::vector< std::pair<double, int> > m_Baryons;
370 std::vector< std::pair<double, int> > m_AntiBaryons;
371 std::vector< std::pair<double, int> > m_StrangeMesons;
372 std::vector< std::pair<double, int> > m_AntiStrangeMesons;
373 std::vector< std::pair<double, int> > m_ChargeMesons;
374 std::vector< std::pair<double, int> > m_AntiChargeMesons;
375 std::vector< std::pair<double, int> > m_CharmMesons;
376 std::vector< std::pair<double, int> > m_AntiCharmMesons;
377 std::vector< std::pair<double, int> > m_CharmAll;
378 std::vector< std::pair<double, int> > m_AntiCharmAll;
380 std::vector<double> m_BaryonsProbs;
381 std::vector<double> m_AntiBaryonsProbs;
382 std::vector<double> m_StrangeMesonsProbs;
383 std::vector<double> m_AntiStrangeMesonsProbs;
384 std::vector<double> m_ChargeMesonsProbs;
385 std::vector<double> m_AntiChargeMesonsProbs;
386 std::vector<double> m_CharmMesonsProbs;
387 std::vector<double> m_AntiCharmMesonsProbs;
388 std::vector<double> m_CharmAllProbs;
389 std::vector<double> m_AntiCharmAllProbs;
392 double m_MeanB, m_MeanAB;
393 double m_MeanSM, m_MeanASM;
394 double m_MeanCM, m_MeanACM;
395 double m_MeanCHRMM, m_MeanACHRMM;
396 double m_MeanCHRM, m_MeanACHRM;
398 std::vector<std::vector<double>> m_Radii;
400 static double m_LastWeight;
401 static double m_LastLogWeight;
402 static double m_LastNormWeight;
std::vector< std::vector< double > > ComputeEVRadii() const
virtual std::vector< double > GCEMeanYields() const
The grand-canonical mean yields.
virtual SimpleParticle SampleParticleByPdg(long long pdgid) const
Samples the position and momentum of a particle species with given pdg code.
std::vector< RandomGenerators::ThermalBreitWignerGenerator * > m_BWGens
std::vector< int > GenerateTotalsSCESubVolume(double VolumeSC) const
EventGeneratorBase()
Constructor.
static SimpleEvent PerformDecays(const SimpleEvent &evtin, const ThermalParticleSystem *TPS, const DecayerFlags &decayerFlags=DecayerFlags())
Performs decays of all unstable particles until only stable ones left.
const EventGeneratorConfiguration & GetConfiguration() const
virtual std::pair< std::vector< int >, double > SampleYields() const
Samples the primordial yields for each particle species.
virtual SimpleEvent GetEvent(bool PerformDecays=true) const
Generates a single event.
std::vector< RandomGenerators::ParticleMomentumGenerator * > m_MomentumGens
Vector of momentum generators for each particle species.
bool CheckEVOverlap(const std::vector< SimpleParticle > &evt, const SimpleParticle &cand, const std::vector< int > &ids=std::vector< int >(), const std::vector< std::vector< double > > &radii=std::vector< std::vector< double > >()) const
void SetEVUseSPR(bool EVfastmode)
virtual SimpleParticle SampleParticle(int id) const
Samples the position and momentum of a particle species i.
void ClearMomentumGenerators()
Clears the momentum generators for all particles.
void PrepareMultinomials()
EventGeneratorConfiguration m_Config
virtual void SetMomentumGenerators()
Sets the momentum generators for all particles. Overloaded.
std::vector< int > GenerateTotalsCCESubVolume(double VolumeSC) const
virtual void CheckSetParameters()
Sets the hypersurface parameters.
double ComputeWeight(const std::vector< int > &totals) const
std::vector< double > m_DensitiesIdeal
Ideal gas densities used for sampling an interacting HRG.
virtual ~EventGeneratorBase()
Destructor.
virtual SimpleEvent SampleMomenta(const std::vector< int > &yields) const
Samples the momenta of the particles and returns the sampled list of particles as an event.
std::vector< int > GenerateTotalsGCE() const
std::vector< int > GenerateTotalsSCE() const
std::vector< int > GenerateTotalsCE() const
void SetConfiguration(ThermalParticleSystem *TPS, const EventGeneratorConfiguration &config)
Sets the event generator configuration.
double ComputeWeightNew(const std::vector< int > &totals) const
ThermalModelBase * ThermalModel()
Pointer to an underlying GCE Thermal Model.
std::vector< int > GenerateTotals() const
std::vector< int > GenerateTotalsCCE() const
virtual SimpleEvent SampleMomentaWithShuffle(const std::vector< int > &yields) const
Samples the momenta of the particles and returns the sampled list of particles as an event.
void SetVolume(double V)
Set system volume.
void RescaleCEMeans(double Vmod)
Rescale the precalculated GCE means.
virtual void SetParameters()
Sets up the event generator ready for production.
Abstract base class for an HRG model implementation.
Class containing the particle list.
The main namespace where all classes and functions of the Thermal-FIST library reside.
std::string to_string_fix(T value)
Converts a value to a string.
std::vector< double > LorentzBoost(const std::vector< double > &fourvector, double vx, double vy, double vz)
Performs a Lorentz boost on a four-vector.
DecayerFlags(bool in_propagateParticles=false)
Structure containing the thermal event generator configuration.
Ensemble fEnsemble
The statistical ensemble used.
int B
The total values of conserved charges in the CE.
bool fUseEVRejectionMultiplicity
Whether to use rejection sampling instead of importance sampling for the EV multiplicity sampling.
std::vector< double > fPCEChems
PCE chemical potentials.
int RealGasExcludedVolumePrescription
The type of generalized excluded volume model prescription.
EventGeneratorConfiguration()
Default configuration.
bool fUseEVUseSPRApproximation
Whether to use the SPR (single-particle rejection) approximation for the EV effects in coordinate spa...
std::vector< std::vector< double > > bij
The matrix of excluded volume coefficients .
ThermalModelParameters CFOParameters
The chemical freeze-out parameters.
bool CanonicalB
Mixed-canonical configuration (full canonical by default)
Ensemble
Enumerates the statistical ensembles.
@ SCE
Strangeness-canonical.
ModelType fModelType
The type of interaction model.
bool fUsePCE
Whether partial chemical equilibrium (PCE) is used.
bool fUseEVRejectionCoordinates
Whether to use rejection sampling in the coordinate space to model EV effects.
std::vector< std::vector< double > > aij
The matrix of van der Waals attraction coefficients .
ModelType
Enumerates the different interaction models.
@ DiagonalEV
Diagonal excluded-volume.
@ MeanFieldEV
Excluded-volume in the thermodynamic mean field approach (currently not used)
@ CrosstermsEV
Crossterms excluded-volume.
@ PointParticle
Ideal gas.
@ QvdW
Quantum van der Waals.
bool fUseGCEConservedCharges
Whether to calculate total conserved charge values from GCE.
Structure holding information about a single event in the event generator.
Structure holding information about a single particle in the event generator.
Structure containing all thermal parameters of the model.
Contains some extra mathematical functions used in the code.