Version: SMASH-3.1
stringprocess.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2017-2020,2022
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #ifndef SRC_INCLUDE_SMASH_STRINGPROCESS_H_
11 #define SRC_INCLUDE_SMASH_STRINGPROCESS_H_
12 
13 #include <map>
14 #include <memory>
15 #include <string>
16 #include <utility>
17 #include <vector>
18 
19 #include "Pythia8/Pythia.h"
20 
21 #include "constants.h"
22 #include "logging.h"
23 #include "particledata.h"
24 
25 namespace smash {
26 static constexpr int LPythia = LogArea::Pythia::id;
27 
46  private:
47  // The following 4 variables are in the center of mass frame
49  double PPosA_;
51  double PPosB_;
53  double PNegA_;
55  double PNegB_;
57  double massA_;
59  double massB_;
61  double sqrtsAB_;
63  std::array<PdgCode, 2> PDGcodes_;
65  std::array<FourVector, 2> plab_;
67  std::array<FourVector, 2> pcom_;
76  std::array<ThreeVector, 3> evecBasisAB_;
80  std::array<int, 2> NpartString_;
103  double sigma_qperp_;
142  double soft_t_form_;
162 
165 
171 
176  ParticleList final_state_;
177 
183  typedef std::map<std::pair<int, int>, std::unique_ptr<Pythia8::Pythia>>
185 
188 
190  std::unique_ptr<Pythia8::Pythia> pythia_hadron_;
191 
193  Pythia8::SigmaTotal pythia_sigmatot_;
194 
199  Pythia8::StringFlav pythia_stringflav_;
200 
205  Pythia8::Event event_intermediate_;
206 
207  public:
208  // clang-format off
209 
255  StringProcess(double string_tension, double time_formation,
256  double gluon_beta, double gluon_pmin,
257  double quark_alpha, double quark_beta,
258  double strange_supp, double diquark_supp,
259  double sigma_perp, double stringz_a_leading,
260  double stringz_b_leading, double stringz_a,
261  double stringz_b, double string_sigma_T,
262  double factor_t_form,
263  bool mass_dependent_formation_times,
264  double prob_proton_to_d_uu,
265  bool separate_fragment_baryon, double popcorn_rate,
266  bool use_monash_tune);
267 
288  void common_setup_pythia(Pythia8::Pythia *pythia_in, double strange_supp,
289  double diquark_supp, double popcorn_rate,
290  double stringz_a, double stringz_b,
291  double string_sigma_T);
292 
300  const int seed_new =
302 
303  pythia_hadron_->rndm.init(seed_new);
304  logg[LPythia].debug("pythia_hadron_ : rndm is initialized with seed ",
305  seed_new);
306  }
307 
308  // clang-format on
309 
319  std::array<double, 3> cross_sections_diffractive(int pdg_a, int pdg_b,
320  double sqrt_s) {
321  // This threshold magic is following Pythia. Todo(ryu): take care of this.
322  double sqrts_threshold = 2. * (1. + 1.0e-6);
323  /* In the case of mesons, the corresponding vector meson masses
324  * are used to evaluate the energy threshold. */
325  const int pdg_a_mod =
326  (std::abs(pdg_a) > 1000) ? pdg_a : 10 * (std::abs(pdg_a) / 10) + 3;
327  const int pdg_b_mod =
328  (std::abs(pdg_b) > 1000) ? pdg_b : 10 * (std::abs(pdg_b) / 10) + 3;
329  sqrts_threshold += pythia_hadron_->particleData.m0(pdg_a_mod) +
330  pythia_hadron_->particleData.m0(pdg_b_mod);
331  /* Constant cross-section for sub-processes below threshold equal to
332  * cross-section at the threshold. */
333  if (sqrt_s < sqrts_threshold) {
334  sqrt_s = sqrts_threshold;
335  }
336  pythia_sigmatot_.calc(pdg_a, pdg_b, sqrt_s);
337  return {pythia_sigmatot_.sigmaAX(), pythia_sigmatot_.sigmaXB(),
338  pythia_sigmatot_.sigmaXX()};
339  }
340 
355  void set_pmin_gluon_lightcone(double p_light_cone_min) {
356  pmin_gluon_lightcone_ = p_light_cone_min;
357  }
365  void set_pow_fgluon(double betapow) { pow_fgluon_beta_ = betapow; }
374  void set_pow_fquark(double alphapow, double betapow) {
375  pow_fquark_alpha_ = alphapow;
376  pow_fquark_beta_ = betapow;
377  }
382  void set_sigma_qperp_(double sigma_qperp) { sigma_qperp_ = sigma_qperp; }
387  void set_tension_string(double kappa_string) {
388  kappa_tension_string_ = kappa_string;
389  }
390 
391  // clang-format off
392 
400  void init(const ParticleList &incoming, double tcoll);
409  static void make_orthonormal_basis(ThreeVector &evec_polar,
410  std::array<ThreeVector, 3> &evec_basis);
426  const std::array<std::array<int, 2>, 2> &quarks,
427  const std::array<FourVector, 2> &pstr_com,
428  std::array<double, 2> &m_str,
429  std::array<ThreeVector, 2> &evec_str);
442  const std::array<std::array<int, 2>, 2> &quarks,
443  const std::array<FourVector, 2> &pstr_com,
444  const std::array<double, 2> &m_str,
445  const std::array<ThreeVector, 2> &evec_str,
446  bool flip_string_ends, bool separate_fragment_baryon);
447 
456  bool next_SDiff(bool is_AB_to_AX);
467  bool next_DDiff();
481  bool next_NDiffSoft();
487  bool next_NDiffHard();
498  bool next_BBbarAnn();
499 
515  static void find_excess_constituent(PdgCode &pdg_actual, PdgCode &pdg_mapped,
516  std::array<int, 5> &excess_quark,
517  std::array<int, 5> &excess_antiq);
539  void replace_constituent(Pythia8::Particle &particle,
540  std::array<int, 5> &excess_constituent);
541 
555  void find_total_number_constituent(Pythia8::Event &event_intermediate,
556  std::array<int, 5> &nquark_total,
557  std::array<int, 5> &nantiq_total);
558 
584  bool splitting_gluon_qqbar(Pythia8::Event &event_intermediate,
585  std::array<int, 5> &nquark_total, std::array<int, 5> &nantiq_total,
586  bool sign_constituent,
587  std::array<std::array<int, 5>, 2> &excess_constituent);
588 
616  void rearrange_excess(std::array<int, 5> &nquark_total,
617  std::array<std::array<int, 5>, 2> &excess_quark,
618  std::array<std::array<int, 5>, 2> &excess_antiq);
619 
657  bool restore_constituent(Pythia8::Event &event_intermediate,
658  std::array<std::array<int, 5>, 2> &excess_quark,
659  std::array<std::array<int, 5>, 2> &excess_antiq);
660 
685  void compose_string_parton(bool find_forward_string,
686  Pythia8::Event &event_intermediate,
687  Pythia8::Event &event_hadronize);
719  void compose_string_junction(bool &find_forward_string,
720  Pythia8::Event &event_intermediate,
721  Pythia8::Event &event_hadronize);
722 
744  void find_junction_leg(bool sign_color, std::vector<int> &col,
745  Pythia8::Event &event_intermediate,
746  Pythia8::Event &event_hadronize);
747 
764  int get_index_forward(bool find_forward, int np_end,
765  Pythia8::Event &event) {
766  int iforward = 1;
767  for (int ip = 2; ip < event.size() - np_end; ip++) {
768  const double y_quark_current = event[ip].y();
769  const double y_quark_forward = event[iforward].y();
770  if ((find_forward && y_quark_current > y_quark_forward) ||
771  (!find_forward && y_quark_current < y_quark_forward)) {
772  iforward = ip;
773  }
774  }
775  return iforward;
776  }
777 
783  ParticleList get_final_state() { return final_state_; }
784 
789  void clear_final_state() { final_state_.clear(); }
790 
803  int append_final_state(ParticleList &intermediate_particles,
804  const FourVector &uString,
805  const ThreeVector &evecLong);
806 
815  static bool append_intermediate_list(int pdgid, FourVector momentum,
816  ParticleList &intermediate_particles) {
817  const std::string s = std::to_string(pdgid);
818  PdgCode pythia_code(s);
819  ParticleTypePtr new_type = ParticleType::try_find(pythia_code);
820  if (new_type) {
821  ParticleData new_particle(ParticleType::find(pythia_code));
822  new_particle.set_4momentum(momentum);
823  intermediate_particles.push_back(new_particle);
824  return true;
825  } else {
826  // if the particle does not exist in SMASH the pythia event is rerun
827  return false;
828  }
829  }
830 
835  static void convert_KaonLS(int &pythia_id) {
836  if (pythia_id == 310 || pythia_id == 130) {
837  pythia_id = (random::uniform_int(0, 1) == 0) ? 311 : -311;
838  }
839  }
840 
848  static void quarks_from_diquark(int diquark, int &q1, int &q2, int &deg_spin);
849 
856  static int diquark_from_quarks(int q1, int q2);
857 
866  static void make_string_ends(const PdgCode &pdgcode_in, int &idq1, int &idq2,
867  double xi);
868 
875  static Pythia8::Vec4 set_Vec4(double energy, const ThreeVector &mom) {
876  return Pythia8::Vec4(mom.x1(), mom.x2(), mom.x3(), energy);
877  }
878 
890  static FourVector reorient(Pythia8::Particle &particle,
891  std::array<ThreeVector, 3> &evec_basis) {
892  ThreeVector three_momentum = evec_basis[0] * particle.pz() +
893  evec_basis[1] * particle.px() +
894  evec_basis[2] * particle.py();
895  return FourVector(particle.e(), three_momentum);
896  }
897 
916  int fragment_string(int idq1, int idq2, double mString,
917  ThreeVector &evecLong, bool flip_string_ends,
918  bool separate_fragment_baryon,
919  ParticleList &intermediate_particles);
920 
957  int fragment_off_hadron(bool from_forward,
958  bool separate_fragment_baryon,
959  std::array<ThreeVector, 3> &evec_basis,
960  double &ppos_string, double &pneg_string,
961  double &QTrx_string_pos, double &QTrx_string_neg,
962  double &QTry_string_pos, double &QTry_string_neg,
963  Pythia8::FlavContainer &flav_string_pos,
964  Pythia8::FlavContainer &flav_string_neg,
965  std::vector<int> &pdgid_frag,
966  std::vector<FourVector> &momentum_frag);
967 
978  int get_hadrontype_from_quark(int idq1, int idq2);
979 
988  int get_resonance_from_quark(int idq1, int idq2, double mass);
989 
1008  bool separate_fragment_hadron,
1009  double ppos_string, double pneg_string,
1010  double mTrn_had_forward, double mTrn_had_backward,
1011  double &ppos_had_forward, double &ppos_had_backward,
1012  double &pneg_had_forward, double &pneg_had_backward);
1013 
1023  static double sample_zLund(double a, double b, double mTrn);
1024 
1044  Pythia8::Event &event_fragments, std::array<ThreeVector, 3> &evec_basis,
1045  double ppos_string, double pneg_string,
1046  double QTrx_string, double QTry_string,
1047  double QTrx_add_pos, double QTry_add_pos,
1048  double QTrx_add_neg, double QTry_add_neg);
1049 
1061  Pythia8::Event &event, std::array<ThreeVector, 3> &evec_basis,
1062  double factor_yrapid, double diff_yrapid) {
1063  Pythia8::Vec4 pvec_string_now = Pythia8::Vec4(0., 0., 0., 0.);
1064  // loop over all particles in the record
1065  for (int ipyth = 1; ipyth < event.size(); ipyth++) {
1066  if (!event[ipyth].isFinal()) {
1067  continue;
1068  }
1069 
1070  FourVector p_frag = FourVector(
1071  event[ipyth].e(), event[ipyth].px(),
1072  event[ipyth].py(), event[ipyth].pz());
1073  const double E_frag = p_frag.x0();
1074  const double pl_frag = p_frag.threevec() * evec_basis[0];
1075  const double ppos_frag = (E_frag + pl_frag) * M_SQRT1_2;
1076  const double pneg_frag = (E_frag - pl_frag) * M_SQRT1_2;
1077  const double mTrn_frag = std::sqrt(2. * ppos_frag * pneg_frag);
1078  // evaluate the old momentum rapidity
1079  const double y_frag = 0.5 * std::log(ppos_frag / pneg_frag);
1080 
1081  // obtain the new momentum rapidity
1082  const double y_new_frag = factor_yrapid * y_frag + diff_yrapid;
1083  // compute the new four momentum
1084  const double E_new_frag = mTrn_frag * std::cosh(y_new_frag);
1085  const double pl_new_frag = mTrn_frag * std::sinh(y_new_frag);
1086  ThreeVector mom_new_frag =
1087  p_frag.threevec() + (pl_new_frag - pl_frag) * evec_basis[0];
1088  Pythia8::Vec4 pvec_new_frag = set_Vec4(E_new_frag, mom_new_frag);
1089  event[ipyth].p(pvec_new_frag);
1090  pvec_string_now += pvec_new_frag;
1091  }
1092  event[0].p(pvec_string_now);
1093  event[0].m(pvec_string_now.mCalc());
1094  }
1095 
1111  static void assign_all_scaling_factors(int baryon_string,
1112  ParticleList& outgoing_particles,
1113  const ThreeVector &evecLong,
1114  double suppression_factor);
1115 
1130  static std::pair<int, int> find_leading(int nq1, int nq2, ParticleList& list);
1131 
1144  static void assign_scaling_factor(int nquark, ParticleData& data,
1145  double suppression_factor);
1146 
1164  static int pdg_map_for_pythia(PdgCode &pdg);
1165 
1166 
1171  double getPPosA() { return PPosA_;}
1172 
1177  double getPNegA() { return PNegA_;}
1178 
1183  double getPPosB() { return PPosB_;}
1184 
1189  double getPnegB() { return PNegB_;}
1190 
1195  double get_massA() { return massA_;}
1196 
1201  double get_massB() { return massB_;}
1202 
1207  double get_sqrts() { return sqrtsAB_;}
1208 
1213  std::array<PdgCode, 2> get_PDGs() { return PDGcodes_;}
1214 
1219  std::array<FourVector, 2> get_plab() { return plab_;}
1220 
1225  std::array<FourVector, 2> get_pcom() { return pcom_;}
1226 
1232 
1238 
1243  double get_tcoll() { return time_collision_;}
1244 
1245  // clang-format on
1246 };
1247 
1248 } // namespace smash
1249 
1250 #endif // SRC_INCLUDE_SMASH_STRINGPROCESS_H_
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
Definition: fourvector.h:33
ThreeVector threevec() const
Definition: fourvector.h:329
double x0() const
Definition: fourvector.h:313
ParticleData contains the dynamic information of a certain particle.
Definition: particledata.h:58
void set_4momentum(const FourVector &momentum_vector)
Set the particle's 4-momentum directly.
Definition: particledata.h:164
A pointer-like interface to global references to ParticleType objects.
Definition: particletype.h:676
static const ParticleTypePtr try_find(PdgCode pdgcode)
Returns the ParticleTypePtr for the given pdgcode.
Definition: particletype.cc:89
static const ParticleType & find(PdgCode pdgcode)
Returns the ParticleType object for the given pdgcode.
Definition: particletype.cc:99
PdgCode stores a Particle Data Group Particle Numbering Scheme particle type number.
Definition: pdgcode.h:111
String excitation processes used in SMASH.
Definition: stringprocess.h:45
Pythia8::StringFlav pythia_stringflav_
An object for the flavor selection in string fragmentation in the case of separate fragmentation func...
bool remake_kinematics_fragments(Pythia8::Event &event_fragments, std::array< ThreeVector, 3 > &evec_basis, double ppos_string, double pneg_string, double QTrx_string, double QTry_string, double QTrx_add_pos, double QTry_add_pos, double QTrx_add_neg, double QTry_add_neg)
bool next_SDiff(bool is_AB_to_AX)
Single-diffractive process is based on single pomeron exchange described in Ingelman:1984ns .
pythia_map hard_map_
Map object to contain the different pythia objects.
static FourVector reorient(Pythia8::Particle &particle, std::array< ThreeVector, 3 > &evec_basis)
compute the four-momentum properly oriented in the lab frame.
void set_pmin_gluon_lightcone(double p_light_cone_min)
set the minimum lightcone momentum scale carried by gluon.
Pythia8::SigmaTotal pythia_sigmatot_
An object to compute cross-sections.
double pow_fgluon_beta_
parameter for the gluon distribution function
Definition: stringprocess.h:87
std::map< std::pair< int, int >, std::unique_ptr< Pythia8::Pythia > > pythia_map
Map containing PYTHIA objects for hard string routines.
std::array< int, 2 > NpartString_
number of particles fragmented from strings
Definition: stringprocess.h:80
Pythia8::Event event_intermediate_
event record for intermediate partonic state in the hard string routine
std::array< PdgCode, 2 > PDGcodes_
PdgCodes of incoming particles.
Definition: stringprocess.h:63
double time_formation_const_
constant proper time in the case of constant formation time [fm]
double PNegB_
backward lightcone momentum p^{-} of incoming particle B in CM-frame [GeV]
Definition: stringprocess.h:55
void set_tension_string(double kappa_string)
set the string tension, which is used in append_final_state.
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.
double pow_fquark_beta_
parameter for the quark distribution function
Definition: stringprocess.h:97
bool next_NDiffSoft()
Soft Non-diffractive process is modelled in accordance with dual-topological approach Capella:1978ig ...
bool next_DDiff()
Double-diffractive process ( A + B -> X + X ) is similar to the single-diffractive process,...
static int pdg_map_for_pythia(PdgCode &pdg)
Take pdg code and map onto particle specie which can be handled by PYTHIA.
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...
void set_pow_fquark(double alphapow, double betapow)
lightcone momentum fraction of quark is sampled according to probability distribution in non-diffrac...
FourVector ucomAB_
velocity four vector of the center of mass in the lab frame
Definition: stringprocess.h:69
ThreeVector vcomAB_
velocity three vector of the center of mass in the lab frame
Definition: stringprocess.h:71
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.
void compute_incoming_lightcone_momenta()
compute the lightcone momenta of incoming particles where the longitudinal direction is set to be sam...
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 exploiting PYTHIA 8....
double popcorn_rate_
popcorn rate
double pmin_gluon_lightcone_
the minimum lightcone momentum scale carried by a gluon [GeV]
Definition: stringprocess.h:82
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...
static std::pair< int, int > find_leading(int nq1, int nq2, ParticleList &list)
Find the leading string fragments.
double PPosA_
forward lightcone momentum p^{+} of incoming particle A in CM-frame [GeV]
Definition: stringprocess.h:49
double sqrtsAB_
sqrt of Mandelstam variable s of collision [GeV]
Definition: stringprocess.h:61
ParticleList final_state_
final state array which must be accessed after the collision
double PNegA_
backward lightcone momentum p^{-} of incoming particle A in CM-frame [GeV]
Definition: stringprocess.h:53
static double sample_zLund(double a, double b, double mTrn)
Sample lightcone momentum fraction according to the LUND fragmentation function.
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:1...
bool use_monash_tune_
Whether to use the monash tune Skands:2014pea for all string processes.
double soft_t_form_
factor to be multiplied to formation times in soft strings
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.
void clear_final_state()
a function that clears the final state particle list which is used for testing mainly
std::unique_ptr< Pythia8::Pythia > pythia_hadron_
PYTHIA object used in fragmentation.
double massA_
mass of incoming particle A [GeV]
Definition: stringprocess.h:57
void common_setup_pythia(Pythia8::Pythia *pythia_in, double strange_supp, double diquark_supp, double popcorn_rate, double stringz_a, double stringz_b, double string_sigma_T)
Common setup of PYTHIA objects for soft and hard string routines.
double PPosB_
forward lightcone momentum p^{+} of incoming particle B in CM-frame [GeV]
Definition: stringprocess.h:51
std::array< ThreeVector, 3 > evecBasisAB_
Orthonormal basis vectors in the center of mass frame, where the 0th one is parallel to momentum of i...
Definition: stringprocess.h:76
int fragment_off_hadron(bool from_forward, bool separate_fragment_baryon, std::array< ThreeVector, 3 > &evec_basis, double &ppos_string, double &pneg_string, double &QTrx_string_pos, double &QTrx_string_neg, double &QTry_string_pos, double &QTry_string_neg, Pythia8::FlavContainer &flav_string_pos, Pythia8::FlavContainer &flav_string_neg, std::vector< int > &pdgid_frag, std::vector< FourVector > &momentum_frag)
Fragment one hadron from a given string configuration if the string mass is above threshold (given by...
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 i...
double string_sigma_T_
transverse momentum spread in string fragmentation
ParticleList get_final_state()
a function to get the final state particle list which is called after the collision
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:1993w...
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
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.
static void convert_KaonLS(int &pythia_id)
convert Kaon-L or Kaon-S into K0 or Anti-K0
ThreeVector get_vcom()
double additional_xsec_supp_
additional cross-section suppression factor to take coherence effect into account.
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.
double strange_supp_
strange quark suppression factor
std::array< PdgCode, 2 > get_PDGs()
static int diquark_from_quarks(int q1, int q2)
Construct diquark from two quarks.
bool make_lightcone_final_two(bool separate_fragment_hadron, double ppos_string, double pneg_string, double mTrn_had_forward, double mTrn_had_backward, double &ppos_had_forward, double &ppos_had_backward, double &pneg_had_forward, double &pneg_had_backward)
Determines lightcone momenta of two final hadrons fragmented from a string in the same way as StringF...
std::array< FourVector, 2 > get_plab()
void replace_constituent(Pythia8::Particle &particle, std::array< int, 5 > &excess_constituent)
Convert a partonic PYTHIA particle into the desired species and update the excess of constituents.
double kappa_tension_string_
string tension [GeV/fm]
double pow_fquark_alpha_
parameter for the quark distribution function
Definition: stringprocess.h:92
void shift_rapidity_event(Pythia8::Event &event, std::array< ThreeVector, 3 > &evec_basis, double factor_yrapid, double diff_yrapid)
Shift the momentum rapidity of all particles in a given event record.
double stringz_b_leading_
parameter (StringZ:bLund) for the fragmentation function of leading baryon in soft non-diffractive st...
static bool append_intermediate_list(int pdgid, FourVector momentum, ParticleList &intermediate_particles)
append new particle from PYTHIA to a specific particle list
void set_pow_fgluon(double betapow)
lightcone momentum fraction of gluon is sampled according to probability distribution P(x) = 1/x * (1...
bool mass_dependent_formation_times_
Whether the formation time should depend on the mass of the fragment according to Andersson:1983ia e...
double stringz_b_produce_
parameter (StringZ:bLund) for the fragmentation function of other (produced) hadrons in soft non-diff...
std::array< FourVector, 2 > get_pcom()
bool next_BBbarAnn()
Baryon-antibaryon annihilation process Based on what UrQMD Bass:1998ca , Bleicher:1999xi does,...
int NpartFinal_
total number of final state particles
Definition: stringprocess.h:78
static Pythia8::Vec4 set_Vec4(double energy, const ThreeVector &mom)
Easy setter of Pythia Vec4 from SMASH.
void set_sigma_qperp_(double sigma_qperp)
set the average amount of transverse momentum transfer sigma_qperp_.
double stringz_a_leading_
parameter (StringZ:aLund) for the fragmentation function of leading baryon in soft non-diffractive st...
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.
void init(const ParticleList &incoming, double tcoll)
initialization feed intial particles, time of collision and gamma factor of the center of mass.
double sigma_qperp_
Transverse momentum spread of the excited strings.
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 constituents that need to be converted...
int get_resonance_from_quark(int idq1, int idq2, double mass)
bool next_NDiffHard()
Hard Non-diffractive process is based on PYTHIA 8 with partonic showers and interactions.
bool separate_fragment_baryon_
Whether to use a separate fragmentation function for leading baryons.
std::array< FourVector, 2 > plab_
momenta of incoming particles in the lab frame [GeV]
Definition: stringprocess.h:65
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 stringz_a_leading, double stringz_b_leading, double stringz_a, double stringz_b, double string_sigma_T, double factor_t_form, bool mass_dependent_formation_times, double prob_proton_to_d_uu, bool separate_fragment_baryon, double popcorn_rate, bool use_monash_tune)
Constructor, initializes pythia.
std::array< FourVector, 2 > pcom_
momenta of incoming particles in the center of mass frame [GeV]
Definition: stringprocess.h:67
double time_collision_
time of collision in the computational frame [fm]
int get_hadrontype_from_quark(int idq1, int idq2)
Determines hadron type from valence quark constituents.
double diquark_supp_
diquark suppression factor
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 consti...
double massB_
mass of incoming particle B [GeV]
Definition: stringprocess.h:59
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 ev...
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 ...
double stringz_a_produce_
parameter (StringZ:aLund) for the fragmentation function of other (produced) hadrons in soft non-diff...
void init_pythia_hadron_rndm()
Set PYTHIA random seeds to be desired values.
static void assign_scaling_factor(int nquark, ParticleData &data, double suppression_factor)
Assign a cross section scaling factor to the given particle.
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,...
static void quarks_from_diquark(int diquark, int &q1, int &q2, int &deg_spin)
find two quarks from a diquark.
The ThreeVector class represents a physical three-vector with the components .
Definition: threevector.h:31
double x3() const
Definition: threevector.h:185
double x2() const
Definition: threevector.h:181
double x1() const
Definition: threevector.h:177
Collection of useful constants that are known at compile time.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
Definition: logging.cc:39
T uniform_int(T min, T max)
Definition: random.h:100
Definition: action.h:24
constexpr int maximum_rndm_seed_in_pythia
The maximum value of the random seed used in PYTHIA.
Definition: constants.h:103
static constexpr int LPythia
Definition: stringprocess.h:26