Thermal-FIST 1.5
Package for hadron resonance gas model applications
Loading...
Searching...
No Matches
thermalfist::EventGeneratorBase Class Reference

Base class for generating events with the Thermal Event Generator. More...

#include <EventGeneratorBase.h>

Inheritance diagram for thermalfist::EventGeneratorBase:
thermalfist::BoostInvariantHypersurfaceEventGenerator thermalfist::CracowFreezeoutEventGenerator thermalfist::CylindricalBlastWaveEventGenerator thermalfist::HypersurfaceEventGenerator thermalfist::SphericalBlastWaveEventGenerator thermalfist::HypersurfaceEventGeneratorEVHRG

Classes

struct  DecayerFlags
 Flags for performing decays. More...
 

Public Member Functions

 EventGeneratorBase ()
 Constructor.
 
virtual ~EventGeneratorBase ()
 Destructor.
 
virtual void SetMomentumGenerators ()
 Sets the momentum generators for all particles. Overloaded.
 
void ClearMomentumGenerators ()
 Clears the momentum generators for all particles.
 
virtual std::pair< std::vector< int >, double > SampleYields () const
 Samples the primordial yields for each particle species.
 
virtual SimpleParticle SampleParticle (int id) const
 Samples the position and momentum of a particle species i.
 
virtual SimpleParticle SampleParticleByPdg (long long pdgid) const
 Samples the position and momentum of a particle species with given pdg code.
 
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.
 
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.
 
virtual SimpleEvent GetEvent (bool PerformDecays=true) const
 Generates a single event.
 
virtual std::vector< double > GCEMeanYields () const
 The grand-canonical mean yields.
 
void SetVolume (double V)
 Set system volume.
 
void RescaleCEMeans (double Vmod)
 Rescale the precalculated GCE means.
 
ThermalModelBaseThermalModel ()
 Pointer to an underlying GCE Thermal Model.
 
double ComputeWeight (const std::vector< int > &totals) const
 
double ComputeWeightNew (const std::vector< int > &totals) const
 
void SetEVUseSPR (bool EVfastmode)
 
bool EVUseSPR () const
 
const EventGeneratorConfigurationGetConfiguration () const
 
virtual void CheckSetParameters ()
 Sets the hypersurface parameters.
 

Static Public Member Functions

static SimpleEvent PerformDecays (const SimpleEvent &evtin, const ThermalParticleSystem *TPS, const DecayerFlags &decayerFlags=DecayerFlags())
 Performs decays of all unstable particles until only stable ones left.
 

Static Public Attributes

static int fCEAccepted
 
static int fCETotal
 

Protected Member Functions

void SetConfiguration (ThermalParticleSystem *TPS, const EventGeneratorConfiguration &config)
 Sets the event generator configuration.
 
void PrepareMultinomials ()
 
std::vector< int > GenerateTotals () const
 
std::vector< int > GenerateTotalsGCE () const
 
std::vector< int > GenerateTotalsCE () const
 
std::vector< int > GenerateTotalsSCE () const
 
std::vector< int > GenerateTotalsSCESubVolume (double VolumeSC) const
 
std::vector< int > GenerateTotalsCCE () const
 
std::vector< int > GenerateTotalsCCESubVolume (double VolumeSC) const
 
virtual void SetParameters ()
 Sets up the event generator ready for production.
 
std::vector< std::vector< double > > ComputeEVRadii () const
 
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
 

Protected Attributes

EventGeneratorConfiguration m_Config
 
ThermalModelBasem_THM
 
std::vector< double > m_DensitiesIdeal
 Ideal gas densities used for sampling an interacting HRG.
 
std::vector< RandomGenerators::ParticleMomentumGenerator * > m_MomentumGens
 Vector of momentum generators for each particle species.
 
std::vector< RandomGenerators::ThermalBreitWignerGenerator * > m_BWGens
 
bool m_ParametersSet
 

Detailed Description

Base class for generating events with the Thermal Event Generator.

Definition at line 123 of file EventGeneratorBase.h.

Constructor & Destructor Documentation

◆ EventGeneratorBase()

thermalfist::EventGeneratorBase::EventGeneratorBase ( )

Constructor.

Definition at line 56 of file EventGeneratorBase.cpp.

◆ ~EventGeneratorBase()

thermalfist::EventGeneratorBase::~EventGeneratorBase ( )
virtual

Destructor.

Definition at line 67 of file EventGeneratorBase.cpp.

Member Function Documentation

◆ CheckEVOverlap()

bool thermalfist::EventGeneratorBase::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
protected

Definition at line 884 of file EventGeneratorBase.cpp.

◆ CheckSetParameters()

virtual void thermalfist::EventGeneratorBase::CheckSetParameters ( )
inlinevirtual

Sets the hypersurface parameters.

Definition at line 268 of file EventGeneratorBase.h.

◆ ClearMomentumGenerators()

void thermalfist::EventGeneratorBase::ClearMomentumGenerators ( )

Clears the momentum generators for all particles.

Definition at line 72 of file EventGeneratorBase.cpp.

◆ ComputeEVRadii()

std::vector< std::vector< double > > thermalfist::EventGeneratorBase::ComputeEVRadii ( ) const
protected

Definition at line 866 of file EventGeneratorBase.cpp.

◆ ComputeWeight()

double thermalfist::EventGeneratorBase::ComputeWeight ( const std::vector< int > & totals) const

Definition at line 1623 of file EventGeneratorBase.cpp.

◆ ComputeWeightNew()

double thermalfist::EventGeneratorBase::ComputeWeightNew ( const std::vector< int > & totals) const

Definition at line 1773 of file EventGeneratorBase.cpp.

◆ EVUseSPR()

bool thermalfist::EventGeneratorBase::EVUseSPR ( ) const
inline

Definition at line 263 of file EventGeneratorBase.h.

◆ GCEMeanYields()

std::vector< double > thermalfist::EventGeneratorBase::GCEMeanYields ( ) const
virtual

The grand-canonical mean yields.

Returns
std::vector<double> The computed grand-canonical mean yields.

Reimplemented in thermalfist::HypersurfaceEventGenerator.

Definition at line 1579 of file EventGeneratorBase.cpp.

◆ GenerateTotals()

std::vector< int > thermalfist::EventGeneratorBase::GenerateTotals ( ) const
protected

Samples the multiplicities of all the particle species from the given statistical ensemble

Returns
A vector of the sampled multiplicities

Definition at line 428 of file EventGeneratorBase.cpp.

◆ GenerateTotalsCCE()

std::vector< int > thermalfist::EventGeneratorBase::GenerateTotalsCCE ( ) const
protected

Samples the multiplicities of all the particle species from the charm-canonical ensemble

Takes into account the case when the strangeness correlation volume is different from the total volume

Returns
A vector of the sampled multiplicities

Definition at line 674 of file EventGeneratorBase.cpp.

◆ GenerateTotalsCCESubVolume()

std::vector< int > thermalfist::EventGeneratorBase::GenerateTotalsCCESubVolume ( double VolumeSC) const
protected

Samples the multiplicities of all the particle species from the charm-canonical ensemble with the specified (sub)system volume

Parameters
VolumeSCThe (canonical) system volume
Returns
A vector of the sampled multiplicities

Definition at line 801 of file EventGeneratorBase.cpp.

◆ GenerateTotalsCE()

std::vector< int > thermalfist::EventGeneratorBase::GenerateTotalsCE ( ) const
protected

Samples the multiplicities of all the particle species from the canonical ensemble

Uses rejection sampling, and the multi-step procedure from F. Becattini, L. Ferroni, Eur. Phys. J. C38, 225 (2004) [hep-ph/0407117]

Returns
A vector of the sampled multiplicities

Definition at line 924 of file EventGeneratorBase.cpp.

◆ GenerateTotalsGCE()

std::vector< int > thermalfist::EventGeneratorBase::GenerateTotalsGCE ( ) const
protected

Samples the multiplicities of all the particle species from the grand canonical ensemble

Returns
A vector of the sampled multiplicities

Definition at line 463 of file EventGeneratorBase.cpp.

◆ GenerateTotalsSCE()

std::vector< int > thermalfist::EventGeneratorBase::GenerateTotalsSCE ( ) const
protected

Samples the multiplicities of all the particle species from the strangeness-canonical ensemble

Takes into account the case when the strangeness correlation volume is different from the total volume

Returns
A vector of the sampled multiplicities

Definition at line 483 of file EventGeneratorBase.cpp.

◆ GenerateTotalsSCESubVolume()

std::vector< int > thermalfist::EventGeneratorBase::GenerateTotalsSCESubVolume ( double VolumeSC) const
protected

Samples the multiplicities of all the particle species from the strangeness-canonical ensemble with the specified (sub)system volume

Parameters
VolumeSCThe system volume
Returns
A vector of the sampled multiplicities

Definition at line 607 of file EventGeneratorBase.cpp.

◆ GetConfiguration()

const EventGeneratorConfiguration & thermalfist::EventGeneratorBase::GetConfiguration ( ) const
inline

Definition at line 265 of file EventGeneratorBase.h.

◆ GetEvent()

SimpleEvent thermalfist::EventGeneratorBase::GetEvent ( bool PerformDecays = true) const
virtual

Generates a single event.

Parameters
PerformDecaysIf set to true, the decays of all particles marked unstable are performed until only stable particles remain. Otherwise only primordial particles are generated and appear in the output
Returns
SimpleEvent The generated event

Reimplemented in thermalfist::HypersurfaceEventGenerator, and thermalfist::HypersurfaceEventGeneratorEVHRG.

Definition at line 1298 of file EventGeneratorBase.cpp.

◆ PerformDecays()

SimpleEvent thermalfist::EventGeneratorBase::PerformDecays ( const SimpleEvent & evtin,
const ThermalParticleSystem * TPS,
const DecayerFlags & decayerFlags = DecayerFlags() )
static

Performs decays of all unstable particles until only stable ones left.

Parameters
evtinAn event structure contains the list of all the primordial particles.
TPSPointer to the particle list instance that contains all the decay properties.
DecayerFlagsExtra flags and options
Returns
A SimpleEvent instance containing all particles after resonance decays.

Definition at line 1426 of file EventGeneratorBase.cpp.

◆ PrepareMultinomials()

void thermalfist::EventGeneratorBase::PrepareMultinomials ( )
protected

Prepares the parameters of multinomial distribution used for sampling the yields in the canonical ensemble

Definition at line 330 of file EventGeneratorBase.cpp.

◆ RescaleCEMeans()

void thermalfist::EventGeneratorBase::RescaleCEMeans ( double Vmod)

Rescale the precalculated GCE means.

Called when the system volume is changed

Definition at line 1598 of file EventGeneratorBase.cpp.

◆ SampleMomenta()

SimpleEvent thermalfist::EventGeneratorBase::SampleMomenta ( const std::vector< int > & yields) const
virtual

Samples the momenta of the particles and returns the sampled list of particles as an event.

The sampled SimpleEvent is assigned the weight of unity. This weight should be overriden if importance sampling is used.

Parameters
yieldsVector of yields for each particle species for the given event. Make sure the indices match the particle list pointed to by m_THM.
Returns
SimpleEvent The generated event containing the primordial particles.

Definition at line 1198 of file EventGeneratorBase.cpp.

◆ SampleMomentaWithShuffle()

SimpleEvent thermalfist::EventGeneratorBase::SampleMomentaWithShuffle ( const std::vector< int > & yields) const
virtual

Samples the momenta of the particles and returns the sampled list of particles as an event.

The sampled SimpleEvent is assigned the weight of unity. This weight should be overriden if importance sampling is used.

Same as SampleMomenta() but randomly shuffles the order particles + implements baryon hard-core radius

Parameters
yieldsVector of yields for each particle species for the given event. Make sure the indices match the particle list pointed to by m_THM.
Returns
SimpleEvent The generated event containing the primordial particles.

Definition at line 1235 of file EventGeneratorBase.cpp.

◆ SampleParticle()

SimpleParticle thermalfist::EventGeneratorBase::SampleParticle ( int id) const
virtual

Samples the position and momentum of a particle species i.

Parameters
idId (0-indexed) of the particle species to be sampled
Returns
SimpleParticle The sampled particle.

Definition at line 1168 of file EventGeneratorBase.cpp.

◆ SampleParticleByPdg()

SimpleParticle thermalfist::EventGeneratorBase::SampleParticleByPdg ( long long pdgid) const
virtual

Samples the position and momentum of a particle species with given pdg code.

  Calls SampleParticle() if pdg code is valid. Throws an errors and quits otherwise.
Parameters
ppdgidPDG code of the particle species to be sampled
Returns
SimpleParticle The sampled particle.

Definition at line 1189 of file EventGeneratorBase.cpp.

◆ SampleYields()

std::pair< std::vector< int >, double > thermalfist::EventGeneratorBase::SampleYields ( ) const
virtual

Samples the primordial yields for each particle species.

Returns
pair< std::vector<int>, double > The sampled yields. The first element is a vector of the sampled yields. The second element is the weight.

Definition at line 1160 of file EventGeneratorBase.cpp.

◆ SetConfiguration()

void thermalfist::EventGeneratorBase::SetConfiguration ( ThermalParticleSystem * TPS,
const EventGeneratorConfiguration & config )
protected

Sets the event generator configuration.

Must be called before generating any events.

Parameters
TPSPointer to a particle list object
configEvent generator configuration

Definition at line 88 of file EventGeneratorBase.cpp.

◆ SetEVUseSPR()

void thermalfist::EventGeneratorBase::SetEVUseSPR ( bool EVfastmode)
inline

Definition at line 262 of file EventGeneratorBase.h.

◆ SetMomentumGenerators()

virtual void thermalfist::EventGeneratorBase::SetMomentumGenerators ( )
inlinevirtual

◆ SetParameters()

void thermalfist::EventGeneratorBase::SetParameters ( )
protectedvirtual

Sets up the event generator ready for production.

Reimplemented in thermalfist::HypersurfaceEventGenerator, and thermalfist::HypersurfaceEventGeneratorEVHRG.

Definition at line 860 of file EventGeneratorBase.cpp.

◆ SetVolume()

void thermalfist::EventGeneratorBase::SetVolume ( double V)

Set system volume.

Can be used to include volume fluctuations

Definition at line 1588 of file EventGeneratorBase.cpp.

◆ ThermalModel()

ThermalModelBase * thermalfist::EventGeneratorBase::ThermalModel ( )
inline

Pointer to an underlying GCE Thermal Model.

Definition at line 256 of file EventGeneratorBase.h.

Member Data Documentation

◆ fCEAccepted

int thermalfist::EventGeneratorBase::fCEAccepted
static

Helper variable to monitor the Acceptance rate of the rejection sampling used for canonical ensemble and/or eigenvolumes.

Definition at line 237 of file EventGeneratorBase.h.

◆ fCETotal

int thermalfist::EventGeneratorBase::fCETotal
static

Definition at line 237 of file EventGeneratorBase.h.

◆ m_BWGens

std::vector<RandomGenerators::ThermalBreitWignerGenerator*> thermalfist::EventGeneratorBase::m_BWGens
protected

Vector of particle mass generators for each particle species Used if finite resonance widths are considered

Definition at line 348 of file EventGeneratorBase.h.

◆ m_Config

EventGeneratorConfiguration thermalfist::EventGeneratorBase::m_Config
protected

Definition at line 337 of file EventGeneratorBase.h.

◆ m_DensitiesIdeal

std::vector<double> thermalfist::EventGeneratorBase::m_DensitiesIdeal
protected

Ideal gas densities used for sampling an interacting HRG.

Definition at line 341 of file EventGeneratorBase.h.

◆ m_MomentumGens

std::vector<RandomGenerators::ParticleMomentumGenerator*> thermalfist::EventGeneratorBase::m_MomentumGens
protected

Vector of momentum generators for each particle species.

Definition at line 344 of file EventGeneratorBase.h.

◆ m_ParametersSet

bool thermalfist::EventGeneratorBase::m_ParametersSet
protected

Definition at line 350 of file EventGeneratorBase.h.

◆ m_THM

ThermalModelBase* thermalfist::EventGeneratorBase::m_THM
protected

Definition at line 338 of file EventGeneratorBase.h.


The documentation for this class was generated from the following files: