#include <processstring.h>
String excitation processes used in SMASH.
Only one instance of this class should be created.
This class implements string excitation processes based on the UrQMD model Bass:1998ca, Bleicher:1999xi and subsequent fragmentation according to the LUND/PYTHIA fragmentation scheme Andersson:1983ia, Sjostrand:2014zea.
The class implements the following functionality:
Definition at line 46 of file processstring.h.
Public Member Functions | |
StringProcess (double string_tension, double time_formation, double gluon_beta, double gluon_pmin, double quark_alpha, double quark_beta, double strange_supp, double diquark_supp, double sigma_perp, double leading_frag_mean, double leading_frag_width, double stringz_a, double stringz_b, double string_sigma_T, double factor_t_form, bool use_yoyo_model, double prob_proton_to_d_uu) | |
Constructor, initializes pythia. More... | |
void | common_setup_pythia (Pythia8::Pythia *pythia_in, double strange_supp, double diquark_supp, double stringz_a, double stringz_b, double string_sigma_T) |
Common setup of PYTHIA objects for soft and hard string routines. More... | |
void | init_pythia_hadron_rndm () |
Set PYTHIA random seeds to be desired values. More... | |
Pythia8::Pythia * | get_ptr_pythia_parton () |
Function to get the PYTHIA object for hard string routine. More... | |
std::array< double, 3 > | cross_sections_diffractive (int pdg_a, int pdg_b, double sqrt_s) |
Interface to pythia_sigmatot_ to compute cross-sections of A+B-> different final states Schuler:1993wr. More... | |
void | set_pmin_gluon_lightcone (double p_light_cone_min) |
set the minimum lightcone momentum scale carried by gluon. More... | |
void | set_pow_fgluon (double betapow) |
lightcone momentum fraction of gluon is sampled according to probability distribution P(x) = 1/x * (1 - x)^{1 + pow_fgluon_beta_} in double-diffractive processes. More... | |
void | set_pow_fquark (double alphapow, double betapow) |
lightcone momentum fraction of quark is sampled according to probability distribution \( P(x) = x^{pow_fquark_alpha_ - 1} * (1 - x)^{pow_fquark_beta_ - 1} \) in non-diffractive processes. More... | |
void | set_sigma_qperp_ (double sigma_qperp) |
set the average amount of transverse momentum transfer sigma_qperp_. More... | |
void | set_tension_string (double kappa_string) |
set the string tension, which is used in append_final_state. More... | |
void | init (const ParticleList &incoming, double tcoll) |
initialization feed intial particles, time of collision and gamma factor of the center of mass. More... | |
void | compute_incoming_lightcone_momenta () |
compute the lightcone momenta of incoming particles where the longitudinal direction is set to be same as that of the three-momentum of particle A. More... | |
bool | set_mass_and_direction_2strings (const std::array< std::array< int, 2 >, 2 > &quarks, const std::array< FourVector, 2 > &pstr_com, std::array< double, 2 > &m_str, std::array< ThreeVector, 2 > &evec_str) |
Determine string masses and directions in which strings are stretched. More... | |
bool | make_final_state_2strings (const std::array< std::array< int, 2 >, 2 > &quarks, const std::array< FourVector, 2 > &pstr_com, const std::array< double, 2 > &m_str, const std::array< ThreeVector, 2 > &evec_str, bool flip_string_ends, bool separate_fragment_baryon) |
Prepare kinematics of two strings, fragment them and append to final_state. More... | |
bool | next_SDiff (bool is_AB_to_AX) |
Single-diffractive process is based on single pomeron exchange described in Ingelman:1984ns. More... | |
bool | next_DDiff () |
Double-diffractive process ( A + B -> X + X ) is similar to the single-diffractive process, but lightcone momenta of gluons are sampled in the same was as the UrQMD model Bass:1998ca, Bleicher:1999xi. More... | |
bool | next_NDiffSoft () |
Soft Non-diffractive process is modelled in accordance with dual-topological approach Capella:1978ig. More... | |
bool | next_NDiffHard () |
Hard Non-diffractive process is based on PYTHIA 8 with partonic showers and interactions. More... | |
bool | next_BBbarAnn () |
Baryon-antibaryon annihilation process Based on what UrQMD Bass:1998ca, Bleicher:1999xi does, it create two mesonic strings after annihilating one quark-antiquark pair. More... | |
void | replace_constituent (Pythia8::Particle &particle, std::array< int, 5 > &excess_constituent) |
Convert a partonic PYTHIA partice into the desired species and update the excess of constituents. More... | |
void | find_total_number_constituent (Pythia8::Event &event_intermediate, std::array< int, 5 > &nquark_total, std::array< int, 5 > &nantiq_total) |
Compute how many quarks and antiquarks we have in the system, and update the correspoing arrays with size 5. More... | |
bool | splitting_gluon_qqbar (Pythia8::Event &event_intermediate, std::array< int, 5 > &nquark_total, std::array< int, 5 > &nantiq_total, bool sign_constituent, std::array< std::array< int, 5 >, 2 > &excess_constituent) |
Take total number of quarks and check if the system has enough constituents that need to be converted into other flavors. More... | |
void | rearrange_excess (std::array< int, 5 > &nquark_total, std::array< std::array< int, 5 >, 2 > &excess_quark, std::array< std::array< int, 5 >, 2 > &excess_antiq) |
Take total number of quarks and check if the system has enough constitents that need to be converted into other flavors. More... | |
bool | restore_constituent (Pythia8::Event &event_intermediate, std::array< std::array< int, 5 >, 2 > &excess_quark, std::array< std::array< int, 5 >, 2 > &excess_antiq) |
Take the intermediate partonic state from PYTHIA event with mapped hadrons and convert constituents into the desired ones according to the excess of quarks and anti-quarks. More... | |
void | compose_string_parton (bool find_forward_string, Pythia8::Event &event_intermediate, Pythia8::Event &event_hadronize) |
Identify a set of partons, which are connected to form a color-neutral string, from a given PYTHIA event record. More... | |
void | compose_string_junction (bool &find_forward_string, Pythia8::Event &event_intermediate, Pythia8::Event &event_hadronize) |
Identify a set of partons and junction(s), which are connected to form a color-neutral string, from a given PYTHIA event record. More... | |
void | find_junction_leg (bool sign_color, std::vector< int > &col, Pythia8::Event &event_intermediate, Pythia8::Event &event_hadronize) |
Identify partons, which are associated with junction legs, from a given PYTHIA event record. More... | |
int | get_index_forward (bool find_forward, int np_end, Pythia8::Event &event) |
Obtain index of the most forward or backward particle in a given PYTHIA event record. More... | |
ParticleList | get_final_state () |
a function to get the final state particle list which is called after the collision More... | |
int | append_final_state (ParticleList &intermediate_particles, const FourVector &uString, const ThreeVector &evecLong) |
compute the formation time and fill the arrays with final-state particles as described in Andersson:1983ia. More... | |
int | fragment_string (int idq1, int idq2, double mString, ThreeVector &evecLong, bool flip_string_ends, bool separate_fragment_baryon, ParticleList &intermediate_particles) |
perform string fragmentation to determine species and momenta of hadrons by implementing PYTHIA 8.2 Andersson:1983ia, Sjostrand:2014zea. More... | |
Static Public Member Functions | |
static void | make_orthonormal_basis (ThreeVector &evec_polar, std::array< ThreeVector, 3 > &evec_basis) |
compute three orthonormal basis vectors from unit vector in the longitudinal direction More... | |
static void | find_excess_constituent (PdgCode &pdg_actual, PdgCode &pdg_mapped, std::array< int, 5 > &excess_quark, std::array< int, 5 > &excess_antiq) |
Compare the valence quark contents of the actual and mapped hadrons and evaluate how many more constituents the actual hadron has compared to the mapped one. More... | |
static bool | append_intermediate_list (int pdgid, FourVector momentum, ParticleList &intermediate_particles) |
append new particle from PYTHIA to a specific particle list More... | |
static void | convert_KaonLS (int &pythia_id) |
convert Kaon-L or Kaon-S into K0 or Anti-K0 More... | |
static void | quarks_from_diquark (int diquark, int &q1, int &q2, int °_spin) |
find two quarks from a diquark. More... | |
static int | diquark_from_quarks (int q1, int q2) |
Construct diquark from two quarks. More... | |
static void | make_string_ends (const PdgCode &pdgcode_in, int &idq1, int &idq2, double xi) |
make a random selection to determine partonic contents at the string ends. More... | |
static Pythia8::Vec4 | set_Vec4 (double energy, const ThreeVector &mom) |
Easy setter of Pythia Vec4 from SMASH. More... | |
static FourVector | reorient (Pythia8::Particle &particle, std::array< ThreeVector, 3 > &evec_basis) |
compute the four-momentum properly oriented in the lab frame. More... | |
static void | assign_all_scaling_factors (int baryon_string, ParticleList &outgoing_particles, const ThreeVector &evecLong, double suppression_factor) |
Assign a cross section scaling factor to all outgoing particles. More... | |
static std::pair< int, int > | find_leading (int nq1, int nq2, ParticleList &list) |
Find the leading string fragments. More... | |
static void | assign_scaling_factor (int nquark, ParticleData &data, double suppression_factor) |
Assign a cross section scaling factor to the given particle. More... | |
static int | pdg_map_for_pythia (PdgCode &pdg) |
Take pdg code and map onto particle specie which can be handled by PYTHIA. More... | |
Private Attributes | |
double | PPosA_ |
forward lightcone momentum p^{+} of incoming particle A in CM-frame [GeV] More... | |
double | PPosB_ |
forward lightcone momentum p^{+} of incoming particle B in CM-frame [GeV] More... | |
double | PNegA_ |
backward lightcone momentum p^{-} of incoming particle A in CM-frame [GeV] More... | |
double | PNegB_ |
backward lightcone momentum p^{-} of incoming particle B in CM-frame [GeV] More... | |
double | massA_ |
mass of incoming particle A [GeV] More... | |
double | massB_ |
mass of incoming particle B [GeV] More... | |
double | sqrtsAB_ |
sqrt of Mandelstam variable s of collision [GeV] More... | |
std::array< PdgCode, 2 > | PDGcodes_ |
PdgCodes of incoming particles. More... | |
std::array< FourVector, 2 > | plab_ |
momenta of incoming particles in the lab frame [GeV] More... | |
std::array< FourVector, 2 > | pcom_ |
momenta of incoming particles in the center of mass frame [GeV] More... | |
FourVector | ucomAB_ |
velocity four vector of the center of mass in the lab frame More... | |
ThreeVector | vcomAB_ |
velocity three vector of the center of mass in the lab frame More... | |
std::array< ThreeVector, 3 > | evecBasisAB_ |
Orthonormal basis vectors in the center of mass frame, where the 0th one is parallel to momentum of incoming particle A. More... | |
int | NpartFinal_ |
total number of final state particles More... | |
std::array< int, 2 > | NpartString_ |
number of particles fragmented from strings More... | |
double | pmin_gluon_lightcone_ |
the minimum lightcone momentum scale carried by a gluon [GeV] More... | |
double | pow_fgluon_beta_ |
parameter \(\beta\) for the gluon distribution function \( P(x) = x^{-1} (1 - x)^{1 + \beta} \) More... | |
double | pow_fquark_alpha_ |
parameter \(\alpha\) for the quark distribution function \( P(x) = x^{\alpha - 1} (1 - x)^{\beta - 1} \) More... | |
double | pow_fquark_beta_ |
parameter \(\beta\) for the quark distribution function \( P(x) = x^{\alpha - 1} (1 - x)^{\beta - 1} \) More... | |
double | sigma_qperp_ |
Transverse momentum spread of the excited strings. More... | |
double | leading_frag_mean_ |
mean value of the fragmentation function for the leading baryons More... | |
double | leading_frag_width_ |
width of the fragmentation function for the leading baryons More... | |
double | kappa_tension_string_ |
string tension [GeV/fm] More... | |
double | additional_xsec_supp_ |
additional cross-section suppression factor to take coherence effect into account. More... | |
double | time_formation_const_ |
constant proper time in the case of constant formation time [fm] More... | |
double | soft_t_form_ |
factor to be multiplied to formation times in soft strings More... | |
double | time_collision_ |
time of collision in the computational frame [fm] More... | |
bool | use_yoyo_model_ |
Whether to calculate the string formation times from the yoyo-model. More... | |
double | prob_proton_to_d_uu_ |
Probability of splitting a nucleon into the quark flavour it has only once and a diquark it has twice. More... | |
double | sqrt2_ |
square root of 2 ( \(\sqrt{2}\)) More... | |
bool | pythia_parton_initialized_ = false |
Remembers if Pythia is initialized or not. More... | |
ParticleList | final_state_ |
final state array which must be accessed after the collision More... | |
std::unique_ptr< Pythia8::Pythia > | pythia_parton_ |
PYTHIA object used in hard string routine. More... | |
std::unique_ptr< Pythia8::Pythia > | pythia_hadron_ |
PYTHIA object used in fragmentation. More... | |
Pythia8::SigmaTotal | pythia_sigmatot_ |
An object to compute cross-sections. More... | |
Pythia8::Event | event_intermediate_ |
event record for intermediate partonic state in the hard string routine More... | |
smash::StringProcess::StringProcess | ( | double | string_tension, |
double | time_formation, | ||
double | gluon_beta, | ||
double | gluon_pmin, | ||
double | quark_alpha, | ||
double | quark_beta, | ||
double | strange_supp, | ||
double | diquark_supp, | ||
double | sigma_perp, | ||
double | leading_frag_mean, | ||
double | leading_frag_width, | ||
double | stringz_a, | ||
double | stringz_b, | ||
double | string_sigma_T, | ||
double | factor_t_form, | ||
bool | use_yoyo_model, | ||
double | prob_proton_to_d_uu | ||
) |
Constructor, initializes pythia.
Should only be called once.
[in] | string_tension | value of kappa_tension_string_ [GeV/fm] |
[in] | time_formation | value of time_formation_const_ [fm] |
[in] | gluon_beta | value of pow_fgluon_beta_ |
[in] | gluon_pmin | value of pmin_gluon_lightcone_ |
[in] | quark_alpha | value of pow_fquark_alpha_ |
[in] | quark_beta | value of pow_fquark_beta_ |
[in] | strange_supp | strangeness suppression factor (StringFlav:probStoUD) in fragmentation |
[in] | diquark_supp | diquark suppression factor (StringFlav:probQQtoQ) in fragmentation |
[in] | sigma_perp | value of sigma_qperp_ [GeV] |
[in] | leading_frag_mean | Mean of the Gaussian used as fragmentation function for leading baryons. |
[in] | leading_frag_width | Width of the Gaussian used as fragmentation function for leading baryons. |
[in] | stringz_a | parameter (StringZ:aLund) for the fragmentation function |
[in] | stringz_b | parameter (StringZ:bLund) for the fragmentation function [GeV^-2] |
[in] | string_sigma_T | transverse momentum spread (StringPT:sigma) in fragmentation [GeV] |
[in] | factor_t_form | to be multiplied to soft string formation times |
[in] | use_yoyo_model | Whether to calculate formation times from the yoyo-model. |
[in] | prob_proton_to_d_uu | Probability of a nucleon to be split into the quark it contains once and a diquark another flavour. |
Definition at line 19 of file processstring.cc.
void smash::StringProcess::common_setup_pythia | ( | Pythia8::Pythia * | pythia_in, |
double | strange_supp, | ||
double | diquark_supp, | ||
double | stringz_a, | ||
double | stringz_b, | ||
double | string_sigma_T | ||
) |
Common setup of PYTHIA objects for soft and hard string routines.
[out] | pythia_in | pointer to the PYTHIA object |
[in] | strange_supp | strangeness suppression factor (StringFlav:probStoUD) in fragmentation |
[in] | diquark_supp | diquark suppression factor (StringFlav:probQQtoQ) in fragmentation |
[in] | stringz_a | parameter (StringZ:aLund) for the fragmentation function |
[in] | stringz_b | parameter (StringZ:bLund) for the fragmentation function |
[in] | string_sigma_T | transverse momentum spread (StringPT:sigma) in fragmentation [GeV] |
Definition at line 75 of file processstring.cc.
|
inline |
Set PYTHIA random seeds to be desired values.
The value is recalculated such that it is allowed by PYTHIA.
Definition at line 232 of file processstring.h.
|
inline |
Function to get the PYTHIA object for hard string routine.
Definition at line 247 of file processstring.h.
|
inline |
Interface to pythia_sigmatot_ to compute cross-sections of A+B-> different final states Schuler:1993wr.
[in] | pdg_a | pdg code of incoming particle A |
[in] | pdg_b | pdg code of incoming particle B |
[in] | sqrt_s | collision energy in the center of mass frame [GeV] |
Definition at line 258 of file processstring.h.
|
inline |
set the minimum lightcone momentum scale carried by gluon.
Must be cleaned up if necessary. This is relevant for the double-diffractive process. The minimum lightcone momentum fraction is set to be pmin_gluon_lightcone_/sqrtsAB.
p_light_cone_min | a value that we want to use for pmin_gluon_lightcone_. |
Definition at line 294 of file processstring.h.
|
inline |
lightcone momentum fraction of gluon is sampled according to probability distribution P(x) = 1/x * (1 - x)^{1 + pow_fgluon_beta_} in double-diffractive processes.
betapow | is a value that we want to use for pow_fgluon_beta_. |
Definition at line 304 of file processstring.h.
|
inline |
lightcone momentum fraction of quark is sampled according to probability distribution \( P(x) = x^{pow_fquark_alpha_ - 1} * (1 - x)^{pow_fquark_beta_ - 1} \) in non-diffractive processes.
alphapow | is a value that we want to use for pow_fquark_alpha_. |
betapow | is a value that we want to use for pow_fquark_beta_. |
Definition at line 313 of file processstring.h.
|
inline |
set the average amount of transverse momentum transfer sigma_qperp_.
sigma_qperp | is a value that we want to use for sigma_qperp_. |
Definition at line 321 of file processstring.h.
|
inline |
set the string tension, which is used in append_final_state.
kappa_string | is a value that we want to use for string tension. |
Definition at line 326 of file processstring.h.
void smash::StringProcess::init | ( | const ParticleList & | incoming, |
double | tcoll | ||
) |
initialization feed intial particles, time of collision and gamma factor of the center of mass.
[in] | incoming | is the list of initial state particles. |
[in] | tcoll | is time of collision. |
Definition at line 220 of file processstring.cc.
|
static |
compute three orthonormal basis vectors from unit vector in the longitudinal direction
[in] | evec_polar | unit three-vector in the longitudinal direction |
[out] | evec_basis | orthonormal basis vectors of which evec_basis[0] is in the longitudinal direction while evec_basis[1] and evec_basis[2] span the transverse plane. |
Definition at line 1638 of file processstring.cc.
void smash::StringProcess::compute_incoming_lightcone_momenta | ( | ) |
compute the lightcone momenta of incoming particles where the longitudinal direction is set to be same as that of the three-momentum of particle A.
Definition at line 1681 of file processstring.cc.
bool smash::StringProcess::set_mass_and_direction_2strings | ( | const std::array< std::array< int, 2 >, 2 > & | quarks, |
const std::array< FourVector, 2 > & | pstr_com, | ||
std::array< double, 2 > & | m_str, | ||
std::array< ThreeVector, 2 > & | evec_str | ||
) |
Determine string masses and directions in which strings are stretched.
[in] | quarks | pdg ids of string ends |
[in] | pstr_com | 4-momenta of strings in the C.o.m. frame [GeV] |
[out] | m_str | masses of strings [GeV] |
[out] | evec_str | are directions in which strings are stretched. |
Definition at line 333 of file processstring.cc.
bool smash::StringProcess::make_final_state_2strings | ( | const std::array< std::array< int, 2 >, 2 > & | quarks, |
const std::array< FourVector, 2 > & | pstr_com, | ||
const std::array< double, 2 > & | m_str, | ||
const std::array< ThreeVector, 2 > & | evec_str, | ||
bool | flip_string_ends, | ||
bool | separate_fragment_baryon | ||
) |
Prepare kinematics of two strings, fragment them and append to final_state.
[in] | quarks | pdg ids of string ends |
[in] | pstr_com | 4-momenta of strings in the C.o.m. frame [GeV] |
[in] | m_str | masses of strings [GeV] |
[out] | evec_str | are directions in which strings are stretched. |
[in] | flip_string_ends | is whether or not we randomly switch string ends. |
[in] | separate_fragment_baryon | is whether to fragment leading baryons (or anti-baryons) with a separate fragmentation function. |
Definition at line 370 of file processstring.cc.
bool smash::StringProcess::next_SDiff | ( | bool | is_AB_to_AX | ) |
Single-diffractive process is based on single pomeron exchange described in Ingelman:1984ns.
[in] | is_AB_to_AX | specifies which hadron to excite into a string. true : A + B -> A + X, false : A + B -> X + B |
Definition at line 249 of file processstring.cc.
bool smash::StringProcess::next_DDiff | ( | ) |
Double-diffractive process ( A + B -> X + X ) is similar to the single-diffractive process, but lightcone momenta of gluons are sampled in the same was as the UrQMD model Bass:1998ca, Bleicher:1999xi.
String masses are computed after pomeron exchange aquiring transverse momentum transfer.
Definition at line 403 of file processstring.cc.
bool smash::StringProcess::next_NDiffSoft | ( | ) |
Soft Non-diffractive process is modelled in accordance with dual-topological approach Capella:1978ig.
This involves a parton exchange in conjunction with momentum transfer. Probability distribution function of the lightcone momentum fraction carried by quark is based on the UrQMD model Bass:1998ca, Bleicher:1999xi.
std::runtime_error | if incoming particles are neither mesonic nor baryonic |
Definition at line 458 of file processstring.cc.
bool smash::StringProcess::next_NDiffHard | ( | ) |
Hard Non-diffractive process is based on PYTHIA 8 with partonic showers and interactions.
Definition at line 535 of file processstring.cc.
bool smash::StringProcess::next_BBbarAnn | ( | ) |
Baryon-antibaryon annihilation process Based on what UrQMD Bass:1998ca, Bleicher:1999xi does, it create two mesonic strings after annihilating one quark-antiquark pair.
Each string has mass equal to half of sqrts.
std::invalid_argument | if incoming particles are not baryon-antibaryon pair |
Definition at line 1526 of file processstring.cc.
|
static |
Compare the valence quark contents of the actual and mapped hadrons and evaluate how many more constituents the actual hadron has compared to the mapped one.
excess_quark[i - 1] is how many more quarks with flavor i (PDG id i) pdg_actual has compared to pdg_mapped. excess_antiq[i - 1] is how many more antiquarks with flavor i (PDG id -i) pdg_actual has compared to pdg_mapped.
[in] | pdg_actual | PDG code of actual incoming particle. |
[in] | pdg_mapped | PDG code of mapped particles used in PYTHIA event generation. |
[out] | excess_quark | excess of quarks. |
[out] | excess_antiq | excess of anti-quarks. |
Definition at line 775 of file processstring.cc.
void smash::StringProcess::replace_constituent | ( | Pythia8::Particle & | particle, |
std::array< int, 5 > & | excess_constituent | ||
) |
Convert a partonic PYTHIA partice into the desired species and update the excess of constituents.
If the quark flavor i is converted into another flavor j, excess_constituent[i - 1] increases by 1 and excess_constituent[j - 1] decreases by 1. Note that this happens only if excess_constituent[i - 1] < 0 and excess_constituent[j - 1] > 0 (i.e., the incoming hadron has more constituents with flavor j and less constituents with flavor i, compared to the mapped hadron), so they get closer to 0 after the function call.
[out] | particle | PYTHIA particle object to be converted. |
[out] | excess_constituent | excess in the number of quark constituents. If the particle has positive (negative) quark number, excess of quarks (anti-quarks) should be used. |
Definition at line 809 of file processstring.cc.
void smash::StringProcess::find_total_number_constituent | ( | Pythia8::Event & | event_intermediate, |
std::array< int, 5 > & | nquark_total, | ||
std::array< int, 5 > & | nantiq_total | ||
) |
Compute how many quarks and antiquarks we have in the system, and update the correspoing arrays with size 5.
Note that elements of the array (0, 1, 2, 3, 4) correspond to d, u, s, c, b flavors.
[in] | event_intermediate | PYTHIA partonic event record which contains output from PYTHIA (hard) event generation. |
[out] | nquark_total | total number of quarks in the system. This is computed based on event_intermediate. |
[out] | nantiq_total | total number of antiquarks in the system. This is computed based on event_intermediate. |
Definition at line 895 of file processstring.cc.
bool smash::StringProcess::splitting_gluon_qqbar | ( | Pythia8::Event & | event_intermediate, |
std::array< int, 5 > & | nquark_total, | ||
std::array< int, 5 > & | nantiq_total, | ||
bool | sign_constituent, | ||
std::array< std::array< int, 5 >, 2 > & | excess_constituent | ||
) |
Take total number of quarks and check if the system has enough constituents that need to be converted into other flavors.
If that is not the case, a gluon is splitted into a quark-antiquark pair with desired flavor, so that their flavor can be changed afterwards. For example, if there is no antiquark in the system and we have excess_antiq = (1, -1, 0, 0, 0) (i.e., one ubar has to be converted into dbar), a gluon will be splitted into u-ubar pair.
[out] | event_intermediate | PYTHIA partonic event record to be updated when a gluon happens to split into a qqbar pair. |
[out] | nquark_total | total number of quarks in the system. This is computed based on event_intermediate. |
[out] | nantiq_total | total number of antiquarks in the system. This is computed based on event_intermediate. |
[in] | sign_constituent | true (false) if want to check quarks (antiquarks) and their excesses. |
[in] | excess_constituent | excess in the number of quark constituents. If sign_constituent is true (false), excess of quarks (anti-quarks) should be used. |
Definition at line 924 of file processstring.cc.
void smash::StringProcess::rearrange_excess | ( | std::array< int, 5 > & | nquark_total, |
std::array< std::array< int, 5 >, 2 > & | excess_quark, | ||
std::array< std::array< int, 5 >, 2 > & | excess_antiq | ||
) |
Take total number of quarks and check if the system has enough constitents that need to be converted into other flavors.
If that is not the case, excesses of quarks and antiquarks are modified such that the net quark number of each flavor is conserved. For example, if there is no antiquark in the system and we have excess_antiq = (1, -1, 0, 0, 0) (i.e., one ubar has to be converted into dbar), excess_antiq will be changed into (0, 0, 0, 0, 0) and (-1, 1, 0, 0, 0) will be added to excess_quark (i.e., one d quark has to be converted into u quark instead).
Number of quarks is checked if the first argument is the total number of quarks, and the second and third arguments are respectively excesses of quarks and antiquarks. Number of antiquarks is checked if the first argument is the total number of antiquarks, and the second and third arguments are respectively excesses of antiquarks and quarks.
[in] | nquark_total | total number of quarks (antiquarks) in the system. |
[out] | excess_quark | excess of quarks (antiquarks) in incoming particles, compared to the mapped ones. |
[out] | excess_antiq | excess of anti-quarks (quarks) in incoming particles, compared to the mapped ones. |
Definition at line 1058 of file processstring.cc.
bool smash::StringProcess::restore_constituent | ( | Pythia8::Event & | event_intermediate, |
std::array< std::array< int, 5 >, 2 > & | excess_quark, | ||
std::array< std::array< int, 5 >, 2 > & | excess_antiq | ||
) |
Take the intermediate partonic state from PYTHIA event with mapped hadrons and convert constituents into the desired ones according to the excess of quarks and anti-quarks.
Quark (antiquark) flavor is changed and excess of quark (antiquark) is also updated by calling StringProcess::replace_constituent. Beginning with the most forward (or backward) constituent, conversion is done until the total net quark number of each flavor is same with that of incoming hadrons. (i.e., excess_quark minus excess_antiq of incoming hadrons becomes zero.)
However, note that there are some circumstances where this procedure is not directly carried out. For example, a proton-kaon(+) collision mapped onto a proton-pion(+) might be an issue if it involves d + dbar -> g g partonic interaction, given that we anticipate to change dbar to sbar. If such case occurs, we first try to split gluon into quark-antiquark pair with desired flavor. If there are not enough gluons to split, we try to modify the excesses of constituents such that the net quark number is conserved.
[out] | event_intermediate | PYTHIA partonic event record to be updated according to the valence quark contents of incoming hadrons. |
[out] | excess_quark | excess of quarks in incoming particles, compared to the mapped ones. |
[out] | excess_antiq | excess of anti-quarks in incoming particles, compared to the mapped ones. |
Definition at line 1117 of file processstring.cc.
void smash::StringProcess::compose_string_parton | ( | bool | find_forward_string, |
Pythia8::Event & | event_intermediate, | ||
Pythia8::Event & | event_hadronize | ||
) |
Identify a set of partons, which are connected to form a color-neutral string, from a given PYTHIA event record.
All partons found are moved into a new event record for the further hadronization process. Note that col and acol of Pythia8::Particle contain information on the color flow. This function begins with the most forward (or backward) parton.
For example, quark (col = 1, acol = 0), gluon (col = 2, acol = 1) and antiquark (col = 0, acol = 2) correspond to a \( \bar{q} \, g \, q \) mesonic string. quark (col = 1, acol = 0) and diquark (col = 0, acol = 1) correspond to a \( qq \, q\) baryonic string.
[in] | find_forward_string | If it is set to be true (false), it begins with forward (backward) parton. |
[out] | event_intermediate | PYTHIA event record from which a string is identified. All partons found here are removed. |
[out] | event_hadronize | PYTHIA event record to which partons in a string are added. |
Definition at line 1270 of file processstring.cc.
void smash::StringProcess::compose_string_junction | ( | bool & | find_forward_string, |
Pythia8::Event & | event_intermediate, | ||
Pythia8::Event & | event_hadronize | ||
) |
Identify a set of partons and junction(s), which are connected to form a color-neutral string, from a given PYTHIA event record.
All partons found are moved into a new event record for the further hadronization process. Junction topology in PYTHIA combines three quarks (antiquarks) to make a color-neutral baryonic (anti-baryonic) configuration. A junction (anti-junction) carries three color (anti-color) indices which are connected with quarks (antiquarks). This function begins with the first junction.
For example, if there is a kind-1 junction with legs (col = 1, 2 and 3), it will first look for three partons with color indices col = 1, 2 and 3 and trace color indices until each leg is `‘closed’' with quark. If there is no quark in the end, there should be an anti-junction and its legs are connected to partons with corresponding anti-colors.
[out] | find_forward_string | If it is set to be true (false), it is a string in the forward (backward) direction. |
[out] | event_intermediate | PYTHIA event record from which a string is identified. All partons and junction(s) found here are removed. |
[out] | event_hadronize | PYTHIA event record to which partons in a string are added. |
Definition at line 1358 of file processstring.cc.
void smash::StringProcess::find_junction_leg | ( | bool | sign_color, |
std::vector< int > & | col, | ||
Pythia8::Event & | event_intermediate, | ||
Pythia8::Event & | event_hadronize | ||
) |
Identify partons, which are associated with junction legs, from a given PYTHIA event record.
All partons found are moved into a new event record for the further hadronization process.
[in] | sign_color | true (false) if the junction is associated with color (anti-color) indices, corresponding baryonic (anti-baryonic) string |
[out] | col | set of color indices that need to be found. The value is set to be zero once the corresponding partons are found. |
[out] | event_intermediate | PYTHIA event record from which a string is identified. All partons and junction(s) found here are removed. |
[out] | event_hadronize | PYTHIA event record to which partons in a string are added. |
Definition at line 1463 of file processstring.cc.
|
inline |
Obtain index of the most forward or backward particle in a given PYTHIA event record.
[in] | find_forward | if it looks for the most forward or backward particle. |
[in] | np_end | number of the last particle entries to be excluded in lookup. In other words, it finds the most forward (or backward) particle among event[1, ... , event.size() - 1 - np_end]. |
[in] | event | PYTHIA event record which contains particle entries. Note that event[0] is reserved for information on the entire system. |
Definition at line 703 of file processstring.h.
|
inline |
a function to get the final state particle list which is called after the collision
Definition at line 722 of file processstring.h.
int smash::StringProcess::append_final_state | ( | ParticleList & | intermediate_particles, |
const FourVector & | uString, | ||
const ThreeVector & | evecLong | ||
) |
compute the formation time and fill the arrays with final-state particles as described in Andersson:1983ia.
[out] | intermediate_particles | list of fragmented particles to be appended |
[in] | uString | is velocity four vector of the string. |
[in] | evecLong | is unit 3-vector in which string is stretched. |
std::invalid_argument | if fragmented particle is not hadron |
std::invalid_argument | if string is neither mesonic nor baryonic |
Definition at line 136 of file processstring.cc.
|
inlinestatic |
append new particle from PYTHIA to a specific particle list
[in] | pdgid | PDG id of particle |
[in] | momentum | four-momentum of particle |
[out] | intermediate_particles | particle list to which the new particle is added. |
Definition at line 748 of file processstring.h.
|
inlinestatic |
convert Kaon-L or Kaon-S into K0 or Anti-K0
[out] | pythia_id | is PDG id to be converted. |
Definition at line 762 of file processstring.h.
|
static |
find two quarks from a diquark.
Order does not matter.
[in] | diquark | PDG id of diquark |
[out] | q1 | PDG id of quark 1 |
[out] | q2 | PDG id of quark 2 |
[out] | deg_spin | spin degeneracy |
Definition at line 1688 of file processstring.cc.
|
static |
Construct diquark from two quarks.
Order does not matter.
[in] | q1 | PDG code of quark 1 |
[in] | q2 | PDG code of quark 2 |
Definition at line 1704 of file processstring.cc.
|
static |
make a random selection to determine partonic contents at the string ends.
[in] | pdgcode_in | is PdgCode of hadron which transforms into a string. |
[out] | idq1 | is PDG id of quark or anti-diquark. |
[out] | idq2 | is PDG id of anti-quark or diquark. |
[in] | xi | probability to split a nucleon into the quark it has only once and a diquark of another flavour. |
Definition at line 1717 of file processstring.cc.
|
inlinestatic |
Easy setter of Pythia Vec4 from SMASH.
[in] | energy | time component |
[in] | mom | spatial three-vector |
Definition at line 800 of file processstring.h.
|
inlinestatic |
compute the four-momentum properly oriented in the lab frame.
While PYTHIA assumes that the collision axis is in z-direction, this is not necessarly the case in SMASH.
[in] | particle | particle object from PYTHIA event generation where z-axis is set to be the collision axis |
[in] | evec_basis | three basis vectors in the lab frame evec_basis[0] is unit vector in the collision axis and other two span the transverse plane |
Definition at line 815 of file processstring.h.
int smash::StringProcess::fragment_string | ( | int | idq1, |
int | idq2, | ||
double | mString, | ||
ThreeVector & | evecLong, | ||
bool | flip_string_ends, | ||
bool | separate_fragment_baryon, | ||
ParticleList & | intermediate_particles | ||
) |
perform string fragmentation to determine species and momenta of hadrons by implementing PYTHIA 8.2 Andersson:1983ia, Sjostrand:2014zea.
[in] | idq1 | PDG id of quark or anti-diquark (carrying color index). |
[in] | idq2 | PDG id of diquark or anti-quark (carrying anti-color index). |
[in] | mString | the string mass. [GeV] |
[out] | evecLong | unit 3-vector specifying the direction of diquark or anti-diquark. |
[in] | flip_string_ends | is whether or not we randomly switch string ends. |
[in] | separate_fragment_baryon | is whether fragment leading baryon (or anti-baryon) with separate fragmentation function. |
[out] | intermediate_particles | list of fragmented particles |
std::runtime_error | if string mass is lower than threshold set by PYTHIA |
Definition at line 1765 of file processstring.cc.
|
static |
Assign a cross section scaling factor to all outgoing particles.
The factor is only non-zero, when the outgoing particle carries a valence quark from the excited hadron. The assigned cross section scaling factor is equal to the number of the valence quarks from the fragmented hadron contained in the fragment divided by the total number of valence quarks of that fragment multiplied by a coherence factor
[in] | baryon_string | baryon number of the string |
[out] | outgoing_particles | list of string fragments to which scaling factors are assigned |
[in] | evecLong | direction in which the string is stretched |
[in] | suppression_factor | additional coherence factor to be multiplied with scaling factor |
Definition at line 2194 of file processstring.cc.
|
static |
Find the leading string fragments.
Find the first particle, which can carry nq1, and the last particle, which can carry nq2 valence quarks and return their indices in the given list.
[in] | nq1 | number of valence quarks from excited hadron at forward end of the string |
[in] | nq2 | number of valance quarks from excited hadron at backward end of the string |
[in] | list | list of string fragments |
list
Definition at line 2177 of file processstring.cc.
|
static |
Assign a cross section scaling factor to the given particle.
The scaling factor is the number of quarks from the excited hadron, that the fragment carries devided by the total number of quarks in this fragment multiplied by coherence factor.
[in] | nquark | number of valence quarks from the excited hadron contained in the given string fragment data |
[out] | data | particle to assign a scaling factor to |
[in] | suppression_factor | coherence factor to decrease scaling factor |
Definition at line 2162 of file processstring.cc.
|
static |
Take pdg code and map onto particle specie which can be handled by PYTHIA.
Positively charged baryons are mapped onto proton and other baryons are mapped onto neutrons. Same rule applies for anti-baryons. Positively (negatively) charged mesons are mapped onto pi+ (pi-). Negatively and positively charged leptons are mapped respectivly onto electron and positron. Currently, we do not have cross sections for leptons and photons with high energy, so such collisions should not happen.
[in] | pdg | PdgCode that will be mapped |
std::runtime_error | if the incoming particle is neither hadron nor lepton. |
Definition at line 2241 of file processstring.cc.
|
private |
forward lightcone momentum p^{+} of incoming particle A in CM-frame [GeV]
Definition at line 50 of file processstring.h.
|
private |
forward lightcone momentum p^{+} of incoming particle B in CM-frame [GeV]
Definition at line 52 of file processstring.h.
|
private |
backward lightcone momentum p^{-} of incoming particle A in CM-frame [GeV]
Definition at line 54 of file processstring.h.
|
private |
backward lightcone momentum p^{-} of incoming particle B in CM-frame [GeV]
Definition at line 56 of file processstring.h.
|
private |
mass of incoming particle A [GeV]
Definition at line 58 of file processstring.h.
|
private |
mass of incoming particle B [GeV]
Definition at line 60 of file processstring.h.
|
private |
sqrt of Mandelstam variable s of collision [GeV]
Definition at line 62 of file processstring.h.
|
private |
PdgCodes of incoming particles.
Definition at line 64 of file processstring.h.
|
private |
momenta of incoming particles in the lab frame [GeV]
Definition at line 66 of file processstring.h.
|
private |
momenta of incoming particles in the center of mass frame [GeV]
Definition at line 68 of file processstring.h.
|
private |
velocity four vector of the center of mass in the lab frame
Definition at line 70 of file processstring.h.
|
private |
velocity three vector of the center of mass in the lab frame
Definition at line 72 of file processstring.h.
|
private |
Orthonormal basis vectors in the center of mass frame, where the 0th one is parallel to momentum of incoming particle A.
Definition at line 77 of file processstring.h.
|
private |
total number of final state particles
Definition at line 79 of file processstring.h.
|
private |
number of particles fragmented from strings
Definition at line 81 of file processstring.h.
|
private |
the minimum lightcone momentum scale carried by a gluon [GeV]
Definition at line 83 of file processstring.h.
|
private |
parameter \(\beta\) for the gluon distribution function \( P(x) = x^{-1} (1 - x)^{1 + \beta} \)
Definition at line 88 of file processstring.h.
|
private |
parameter \(\alpha\) for the quark distribution function \( P(x) = x^{\alpha - 1} (1 - x)^{\beta - 1} \)
Definition at line 93 of file processstring.h.
|
private |
parameter \(\beta\) for the quark distribution function \( P(x) = x^{\alpha - 1} (1 - x)^{\beta - 1} \)
Definition at line 98 of file processstring.h.
|
private |
Transverse momentum spread of the excited strings.
[GeV] Transverse momenta of strings are sampled according to gaussian distribution with width sigma_qperp_
Definition at line 104 of file processstring.h.
|
private |
mean value of the fragmentation function for the leading baryons
Definition at line 106 of file processstring.h.
|
private |
width of the fragmentation function for the leading baryons
Definition at line 108 of file processstring.h.
|
private |
string tension [GeV/fm]
Definition at line 110 of file processstring.h.
|
private |
additional cross-section suppression factor to take coherence effect into account.
Definition at line 115 of file processstring.h.
|
private |
constant proper time in the case of constant formation time [fm]
Definition at line 117 of file processstring.h.
|
private |
factor to be multiplied to formation times in soft strings
Definition at line 119 of file processstring.h.
|
private |
time of collision in the computational frame [fm]
Definition at line 121 of file processstring.h.
|
private |
Whether to calculate the string formation times from the yoyo-model.
Definition at line 123 of file processstring.h.
|
private |
Probability of splitting a nucleon into the quark flavour it has only once and a diquark it has twice.
Definition at line 128 of file processstring.h.
|
private |
square root of 2 ( \(\sqrt{2}\))
Definition at line 130 of file processstring.h.
|
private |
Remembers if Pythia is initialized or not.
Definition at line 133 of file processstring.h.
|
private |
final state array which must be accessed after the collision
Definition at line 139 of file processstring.h.
|
private |
PYTHIA object used in hard string routine.
Definition at line 142 of file processstring.h.
|
private |
PYTHIA object used in fragmentation.
Definition at line 145 of file processstring.h.
|
private |
An object to compute cross-sections.
Definition at line 148 of file processstring.h.
|
private |
event record for intermediate partonic state in the hard string routine
Definition at line 154 of file processstring.h.