Version: SMASH-2.0
stringprocess.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2017-
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 
170  ParticleList final_state_;
171 
177  typedef std::map<std::pair<int, int>, std::unique_ptr<Pythia8::Pythia>>
179 
182 
184  std::unique_ptr<Pythia8::Pythia> pythia_hadron_;
185 
187  Pythia8::SigmaTotal pythia_sigmatot_;
188 
193  Pythia8::StringFlav pythia_stringflav_;
194 
199  Pythia8::Event event_intermediate_;
200 
201  public:
202  // clang-format off
203 
246  StringProcess(double string_tension, double time_formation,
247  double gluon_beta, double gluon_pmin,
248  double quark_alpha, double quark_beta,
249  double strange_supp, double diquark_supp,
250  double sigma_perp, double stringz_a_leading,
251  double stringz_b_leading, double stringz_a,
252  double stringz_b, double string_sigma_T,
253  double factor_t_form,
254  bool mass_dependent_formation_times,
255  double prob_proton_to_d_uu,
256  bool separate_fragment_baryon, double popcorn_rate);
257 
278  void common_setup_pythia(Pythia8::Pythia *pythia_in, double strange_supp,
279  double diquark_supp, double popcorn_rate,
280  double stringz_a, double stringz_b,
281  double string_sigma_T);
282 
290  const int seed_new =
292 
293  pythia_hadron_->rndm.init(seed_new);
294  logg[LPythia].debug("pythia_hadron_ : rndm is initialized with seed ",
295  seed_new);
296  }
297 
298  // clang-format on
299 
309  std::array<double, 3> cross_sections_diffractive(int pdg_a, int pdg_b,
310  double sqrt_s) {
311  // This threshold magic is following Pythia. Todo(ryu): take care of this.
312  double sqrts_threshold = 2. * (1. + 1.0e-6);
313  /* In the case of mesons, the corresponding vector meson masses
314  * are used to evaluate the energy threshold. */
315  const int pdg_a_mod =
316  (std::abs(pdg_a) > 1000) ? pdg_a : 10 * (std::abs(pdg_a) / 10) + 3;
317  const int pdg_b_mod =
318  (std::abs(pdg_b) > 1000) ? pdg_b : 10 * (std::abs(pdg_b) / 10) + 3;
319  sqrts_threshold += pythia_hadron_->particleData.m0(pdg_a_mod) +
320  pythia_hadron_->particleData.m0(pdg_b_mod);
321  /* Constant cross-section for sub-processes below threshold equal to
322  * cross-section at the threshold. */
323  if (sqrt_s < sqrts_threshold) {
324  sqrt_s = sqrts_threshold;
325  }
326  pythia_sigmatot_.calc(pdg_a, pdg_b, sqrt_s);
327  return {pythia_sigmatot_.sigmaAX(), pythia_sigmatot_.sigmaXB(),
328  pythia_sigmatot_.sigmaXX()};
329  }
330 
345  void set_pmin_gluon_lightcone(double p_light_cone_min) {
346  pmin_gluon_lightcone_ = p_light_cone_min;
347  }
355  void set_pow_fgluon(double betapow) { pow_fgluon_beta_ = betapow; }
364  void set_pow_fquark(double alphapow, double betapow) {
365  pow_fquark_alpha_ = alphapow;
366  pow_fquark_beta_ = betapow;
367  }
372  void set_sigma_qperp_(double sigma_qperp) { sigma_qperp_ = sigma_qperp; }
377  void set_tension_string(double kappa_string) {
378  kappa_tension_string_ = kappa_string;
379  }
380 
381  // clang-format off
382 
390  void init(const ParticleList &incoming, double tcoll);
399  static void make_orthonormal_basis(ThreeVector &evec_polar,
400  std::array<ThreeVector, 3> &evec_basis);
416  const std::array<std::array<int, 2>, 2> &quarks,
417  const std::array<FourVector, 2> &pstr_com,
418  std::array<double, 2> &m_str,
419  std::array<ThreeVector, 2> &evec_str);
432  const std::array<std::array<int, 2>, 2> &quarks,
433  const std::array<FourVector, 2> &pstr_com,
434  const std::array<double, 2> &m_str,
435  const std::array<ThreeVector, 2> &evec_str,
436  bool flip_string_ends, bool separate_fragment_baryon);
437 
446  bool next_SDiff(bool is_AB_to_AX);
457  bool next_DDiff();
471  bool next_NDiffSoft();
477  bool next_NDiffHard();
488  bool next_BBbarAnn();
489 
505  static void find_excess_constituent(PdgCode &pdg_actual, PdgCode &pdg_mapped,
506  std::array<int, 5> &excess_quark,
507  std::array<int, 5> &excess_antiq);
529  void replace_constituent(Pythia8::Particle &particle,
530  std::array<int, 5> &excess_constituent);
531 
545  void find_total_number_constituent(Pythia8::Event &event_intermediate,
546  std::array<int, 5> &nquark_total,
547  std::array<int, 5> &nantiq_total);
548 
574  bool splitting_gluon_qqbar(Pythia8::Event &event_intermediate,
575  std::array<int, 5> &nquark_total, std::array<int, 5> &nantiq_total,
576  bool sign_constituent,
577  std::array<std::array<int, 5>, 2> &excess_constituent);
578 
606  void rearrange_excess(std::array<int, 5> &nquark_total,
607  std::array<std::array<int, 5>, 2> &excess_quark,
608  std::array<std::array<int, 5>, 2> &excess_antiq);
609 
647  bool restore_constituent(Pythia8::Event &event_intermediate,
648  std::array<std::array<int, 5>, 2> &excess_quark,
649  std::array<std::array<int, 5>, 2> &excess_antiq);
650 
675  void compose_string_parton(bool find_forward_string,
676  Pythia8::Event &event_intermediate,
677  Pythia8::Event &event_hadronize);
709  void compose_string_junction(bool &find_forward_string,
710  Pythia8::Event &event_intermediate,
711  Pythia8::Event &event_hadronize);
712 
734  void find_junction_leg(bool sign_color, std::vector<int> &col,
735  Pythia8::Event &event_intermediate,
736  Pythia8::Event &event_hadronize);
737 
754  int get_index_forward(bool find_forward, int np_end,
755  Pythia8::Event &event) {
756  int iforward = 1;
757  for (int ip = 2; ip < event.size() - np_end; ip++) {
758  const double y_quark_current = event[ip].y();
759  const double y_quark_forward = event[iforward].y();
760  if ((find_forward && y_quark_current > y_quark_forward) ||
761  (!find_forward && y_quark_current < y_quark_forward)) {
762  iforward = ip;
763  }
764  }
765  return iforward;
766  }
767 
773  ParticleList get_final_state() { return final_state_; }
774 
779  void clear_final_state() { final_state_.clear(); }
780 
793  int append_final_state(ParticleList &intermediate_particles,
794  const FourVector &uString,
795  const ThreeVector &evecLong);
796 
805  static bool append_intermediate_list(int pdgid, FourVector momentum,
806  ParticleList &intermediate_particles) {
807  const std::string s = std::to_string(pdgid);
808  PdgCode pythia_code(s);
809  ParticleTypePtr new_type = ParticleType::try_find(pythia_code);
810  if (new_type) {
811  ParticleData new_particle(ParticleType::find(pythia_code));
812  new_particle.set_4momentum(momentum);
813  intermediate_particles.push_back(new_particle);
814  return true;
815  } else {
816  // if the particle does not exist in SMASH the pythia event is rerun
817  return false;
818  }
819  }
820 
825  static void convert_KaonLS(int &pythia_id) {
826  if (pythia_id == 310 || pythia_id == 130) {
827  pythia_id = (random::uniform_int(0, 1) == 0) ? 311 : -311;
828  }
829  }
830 
838  static void quarks_from_diquark(int diquark, int &q1, int &q2, int &deg_spin);
839 
846  static int diquark_from_quarks(int q1, int q2);
847 
856  static void make_string_ends(const PdgCode &pdgcode_in, int &idq1, int &idq2,
857  double xi);
858 
865  static Pythia8::Vec4 set_Vec4(double energy, const ThreeVector &mom) {
866  return Pythia8::Vec4(mom.x1(), mom.x2(), mom.x3(), energy);
867  }
868 
880  static FourVector reorient(Pythia8::Particle &particle,
881  std::array<ThreeVector, 3> &evec_basis) {
882  ThreeVector three_momentum = evec_basis[0] * particle.pz() +
883  evec_basis[1] * particle.px() +
884  evec_basis[2] * particle.py();
885  return FourVector(particle.e(), three_momentum);
886  }
887 
905  int fragment_string(int idq1, int idq2, double mString,
906  ThreeVector &evecLong, bool flip_string_ends,
907  bool separate_fragment_baryon,
908  ParticleList &intermediate_particles);
909 
946  int fragment_off_hadron(bool from_forward,
947  bool separate_fragment_baryon,
948  std::array<ThreeVector, 3> &evec_basis,
949  double &ppos_string, double &pneg_string,
950  double &QTrx_string_pos, double &QTrx_string_neg,
951  double &QTry_string_pos, double &QTry_string_neg,
952  Pythia8::FlavContainer &flav_string_pos,
953  Pythia8::FlavContainer &flav_string_neg,
954  std::vector<int> &pdgid_frag,
955  std::vector<FourVector> &momentum_frag);
956 
967  int get_hadrontype_from_quark(int idq1, int idq2);
968 
977  int get_resonance_from_quark(int idq1, int idq2, double mass);
978 
997  bool separate_fragment_hadron,
998  double ppos_string, double pneg_string,
999  double mTrn_had_forward, double mTrn_had_backward,
1000  double &ppos_had_forward, double &ppos_had_backward,
1001  double &pneg_had_forward, double &pneg_had_backward);
1002 
1012  static double sample_zLund(double a, double b, double mTrn);
1013 
1033  Pythia8::Event &event_fragments, std::array<ThreeVector, 3> &evec_basis,
1034  double ppos_string, double pneg_string,
1035  double QTrx_string, double QTry_string,
1036  double QTrx_add_pos, double QTry_add_pos,
1037  double QTrx_add_neg, double QTry_add_neg);
1038 
1050  Pythia8::Event &event, std::array<ThreeVector, 3> &evec_basis,
1051  double factor_yrapid, double diff_yrapid) {
1052  Pythia8::Vec4 pvec_string_now = Pythia8::Vec4(0., 0., 0., 0.);
1053  // loop over all particles in the record
1054  for (int ipyth = 1; ipyth < event.size(); ipyth++) {
1055  if (!event[ipyth].isFinal()) {
1056  continue;
1057  }
1058 
1059  FourVector p_frag = FourVector(
1060  event[ipyth].e(), event[ipyth].px(),
1061  event[ipyth].py(), event[ipyth].pz());
1062  const double E_frag = p_frag.x0();
1063  const double pl_frag = p_frag.threevec() * evec_basis[0];
1064  const double ppos_frag = (E_frag + pl_frag) * M_SQRT1_2;
1065  const double pneg_frag = (E_frag - pl_frag) * M_SQRT1_2;
1066  const double mTrn_frag = std::sqrt(2. * ppos_frag * pneg_frag);
1067  // evaluate the old momentum rapidity
1068  const double y_frag = 0.5 * std::log(ppos_frag / pneg_frag);
1069 
1070  // obtain the new momentum rapidity
1071  const double y_new_frag = factor_yrapid * y_frag + diff_yrapid;
1072  // compute the new four momentum
1073  const double E_new_frag = mTrn_frag * std::cosh(y_new_frag);
1074  const double pl_new_frag = mTrn_frag * std::sinh(y_new_frag);
1075  ThreeVector mom_new_frag =
1076  p_frag.threevec() + (pl_new_frag - pl_frag) * evec_basis[0];
1077  Pythia8::Vec4 pvec_new_frag = set_Vec4(E_new_frag, mom_new_frag);
1078  event[ipyth].p(pvec_new_frag);
1079  pvec_string_now += pvec_new_frag;
1080  }
1081  event[0].p(pvec_string_now);
1082  event[0].m(pvec_string_now.mCalc());
1083  }
1084 
1100  static void assign_all_scaling_factors(int baryon_string,
1101  ParticleList& outgoing_particles,
1102  const ThreeVector &evecLong,
1103  double suppression_factor);
1104 
1119  static std::pair<int, int> find_leading(int nq1, int nq2, ParticleList& list);
1120 
1133  static void assign_scaling_factor(int nquark, ParticleData& data,
1134  double suppression_factor);
1135 
1153  static int pdg_map_for_pythia(PdgCode &pdg);
1154 
1155 
1160  double getPPosA() { return PPosA_;}
1161 
1166  double getPNegA() { return PNegA_;}
1167 
1172  double getPPosB() { return PPosB_;}
1173 
1178  double getPnegB() { return PNegB_;}
1179 
1184  double get_massA() { return massA_;}
1185 
1190  double get_massB() { return massB_;}
1191 
1196  double get_sqrts() { return sqrtsAB_;}
1197 
1202  std::array<PdgCode, 2> get_PDGs() { return PDGcodes_;}
1203 
1208  std::array<FourVector, 2> get_plab() { return plab_;}
1209 
1214  std::array<FourVector, 2> get_pcom() { return pcom_;}
1215 
1221 
1227 
1232  double get_tcoll() { return time_collision_;}
1233 
1234  // clang-format on
1235 };
1236 
1237 } // namespace smash
1238 
1239 #endif // SRC_INCLUDE_SMASH_STRINGPROCESS_H_
smash::StringProcess::get_tcoll
double get_tcoll()
Definition: stringprocess.h:1232
smash
Definition: action.h:24
smash::StringProcess::NpartString_
std::array< int, 2 > NpartString_
number of particles fragmented from strings
Definition: stringprocess.h:80
smash::StringProcess::set_pow_fquark
void set_pow_fquark(double alphapow, double betapow)
lightcone momentum fraction of quark is sampled according to probability distribution in non-diffrac...
Definition: stringprocess.h:364
smash::StringProcess::NpartFinal_
int NpartFinal_
total number of final state particles
Definition: stringprocess.h:78
smash::StringProcess::get_ucom
FourVector get_ucom()
Definition: stringprocess.h:1220
particledata.h
smash::StringProcess::get_final_state
ParticleList get_final_state()
a function to get the final state particle list which is called after the collision
Definition: stringprocess.h:773
smash::StringProcess::get_massA
double get_massA()
Definition: stringprocess.h:1184
smash::StringProcess::evecBasisAB_
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
smash::StringProcess::init_pythia_hadron_rndm
void init_pythia_hadron_rndm()
Set PYTHIA random seeds to be desired values.
Definition: stringprocess.h:289
smash::StringProcess::string_sigma_T_
double string_sigma_T_
transverse momentum spread in string fragmentation
Definition: stringprocess.h:131
smash::StringProcess::stringz_b_produce_
double stringz_b_produce_
parameter (StringZ:bLund) for the fragmentation function of other (produced) hadrons in soft non-diff...
Definition: stringprocess.h:123
smash::StringProcess::init
void init(const ParticleList &incoming, double tcoll)
initialization feed intial particles, time of collision and gamma factor of the center of mass.
Definition: stringprocess.cc:207
smash::StringProcess::append_final_state
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...
Definition: stringprocess.cc:151
smash::StringProcess::stringz_b_leading_
double stringz_b_leading_
parameter (StringZ:bLund) for the fragmentation function of leading baryon in soft non-diffractive st...
Definition: stringprocess.h:113
smash::ParticleData
Definition: particledata.h:52
smash::StringProcess::compose_string_parton
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...
Definition: stringprocess.cc:1267
smash::StringProcess::hard_map_
pythia_map hard_map_
Map object to contain the different pythia objects.
Definition: stringprocess.h:181
smash::StringProcess::get_resonance_from_quark
int get_resonance_from_quark(int idq1, int idq2, double mass)
Definition: stringprocess.cc:2654
smash::StringProcess::cross_sections_diffractive
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...
Definition: stringprocess.h:309
smash::ThreeVector::x3
double x3() const
Definition: threevector.h:173
smash::StringProcess::next_NDiffHard
bool next_NDiffHard()
Hard Non-diffractive process is based on PYTHIA 8 with partonic showers and interactions.
Definition: stringprocess.cc:520
smash::StringProcess::massB_
double massB_
mass of incoming particle B [GeV]
Definition: stringprocess.h:59
smash::StringProcess::make_string_ends
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.
Definition: stringprocess.cc:1715
smash::StringProcess::plab_
std::array< FourVector, 2 > plab_
momenta of incoming particles in the lab frame [GeV]
Definition: stringprocess.h:65
smash::StringProcess::set_Vec4
static Pythia8::Vec4 set_Vec4(double energy, const ThreeVector &mom)
Easy setter of Pythia Vec4 from SMASH.
Definition: stringprocess.h:865
smash::StringProcess::pythia_sigmatot_
Pythia8::SigmaTotal pythia_sigmatot_
An object to compute cross-sections.
Definition: stringprocess.h:187
smash::StringProcess::find_leading
static std::pair< int, int > find_leading(int nq1, int nq2, ParticleList &list)
Find the leading string fragments.
Definition: stringprocess.cc:3191
smash::StringProcess::pcom_
std::array< FourVector, 2 > pcom_
momenta of incoming particles in the center of mass frame [GeV]
Definition: stringprocess.h:67
smash::StringProcess::set_sigma_qperp_
void set_sigma_qperp_(double sigma_qperp)
set the average amount of transverse momentum transfer sigma_qperp_.
Definition: stringprocess.h:372
smash::StringProcess::sqrtsAB_
double sqrtsAB_
sqrt of Mandelstam variable s of collision [GeV]
Definition: stringprocess.h:61
smash::StringProcess::prob_proton_to_d_uu_
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...
Definition: stringprocess.h:161
smash::StringProcess::separate_fragment_baryon_
bool separate_fragment_baryon_
Whether to use a separate fragmentation function for leading baryons.
Definition: stringprocess.h:164
smash::StringProcess::find_total_number_constituent
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 ...
Definition: stringprocess.cc:889
smash::StringProcess::get_massB
double get_massB()
Definition: stringprocess.h:1190
smash::StringProcess::clear_final_state
void clear_final_state()
a function that clears the final state particle list which is used for testing mainly
Definition: stringprocess.h:779
smash::StringProcess::rearrange_excess
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...
Definition: stringprocess.cc:1051
smash::StringProcess::replace_constituent
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.
Definition: stringprocess.cc:804
smash::StringProcess::time_formation_const_
double time_formation_const_
constant proper time in the case of constant formation time [fm]
Definition: stringprocess.h:140
smash::StringProcess::pythia_hadron_
std::unique_ptr< Pythia8::Pythia > pythia_hadron_
PYTHIA object used in fragmentation.
Definition: stringprocess.h:184
smash::random::uniform_int
T uniform_int(T min, T max)
Definition: random.h:100
smash::StringProcess::getPNegA
double getPNegA()
Definition: stringprocess.h:1166
smash::StringProcess::get_hadrontype_from_quark
int get_hadrontype_from_quark(int idq1, int idq2)
Determines hadron type from valence quark constituents.
Definition: stringprocess.cc:2566
smash::ParticleData::set_4momentum
void set_4momentum(const FourVector &momentum_vector)
Set the particle's 4-momentum directly.
Definition: particledata.h:158
smash::StringProcess::set_mass_and_direction_2strings
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.
Definition: stringprocess.cc:318
smash::logg
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
Definition: logging.cc:39
smash::StringProcess::PNegA_
double PNegA_
backward lightcone momentum p^{-} of incoming particle A in CM-frame [GeV]
Definition: stringprocess.h:53
smash::StringProcess::pmin_gluon_lightcone_
double pmin_gluon_lightcone_
the minimum lightcone momentum scale carried by a gluon [GeV]
Definition: stringprocess.h:82
smash::StringProcess::soft_t_form_
double soft_t_form_
factor to be multiplied to formation times in soft strings
Definition: stringprocess.h:142
smash::StringProcess::getPPosB
double getPPosB()
Definition: stringprocess.h:1172
smash::StringProcess::PDGcodes_
std::array< PdgCode, 2 > PDGcodes_
PdgCodes of incoming particles.
Definition: stringprocess.h:63
smash::ParticleType::find
static const ParticleType & find(PdgCode pdgcode)
Returns the ParticleType object for the given pdgcode.
Definition: particletype.cc:99
smash::StringProcess::PPosB_
double PPosB_
forward lightcone momentum p^{+} of incoming particle B in CM-frame [GeV]
Definition: stringprocess.h:51
smash::StringProcess::compute_incoming_lightcone_momenta
void compute_incoming_lightcone_momenta()
compute the lightcone momenta of incoming particles where the longitudinal direction is set to be sam...
Definition: stringprocess.cc:1679
smash::StringProcess::shift_rapidity_event
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.
Definition: stringprocess.h:1049
smash::StringProcess
String excitation processes used in SMASH.
Definition: stringprocess.h:45
smash::StringProcess::quarks_from_diquark
static void quarks_from_diquark(int diquark, int &q1, int &q2, int &deg_spin)
find two quarks from a diquark.
Definition: stringprocess.cc:1686
smash::ParticleTypePtr
Definition: particletype.h:665
smash::ThreeVector
Definition: threevector.h:31
smash::StringProcess::fragment_string
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....
Definition: stringprocess.cc:1763
smash::StringProcess::get_plab
std::array< FourVector, 2 > get_plab()
Definition: stringprocess.h:1208
smash::StringProcess::diquark_from_quarks
static int diquark_from_quarks(int q1, int q2)
Construct diquark from two quarks.
Definition: stringprocess.cc:1702
smash::StringProcess::next_SDiff
bool next_SDiff(bool is_AB_to_AX)
Single-diffractive process is based on single pomeron exchange described in Ingelman:1984ns .
Definition: stringprocess.cc:236
smash::StringProcess::assign_scaling_factor
static void assign_scaling_factor(int nquark, ParticleData &data, double suppression_factor)
Assign a cross section scaling factor to the given particle.
Definition: stringprocess.cc:3176
smash::StringProcess::next_DDiff
bool next_DDiff()
Double-diffractive process ( A + B -> X + X ) is similar to the single-diffractive process,...
Definition: stringprocess.cc:388
smash::FourVector::x0
double x0() const
Definition: fourvector.h:303
smash::StringProcess::strange_supp_
double strange_supp_
strange quark suppression factor
Definition: stringprocess.h:125
smash::StringProcess::diquark_supp_
double diquark_supp_
diquark suppression factor
Definition: stringprocess.h:127
smash::StringProcess::make_orthonormal_basis
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
Definition: stringprocess.cc:1630
smash::StringProcess::set_pmin_gluon_lightcone
void set_pmin_gluon_lightcone(double p_light_cone_min)
set the minimum lightcone momentum scale carried by gluon.
Definition: stringprocess.h:345
smash::StringProcess::event_intermediate_
Pythia8::Event event_intermediate_
event record for intermediate partonic state in the hard string routine
Definition: stringprocess.h:199
smash::StringProcess::set_pow_fgluon
void set_pow_fgluon(double betapow)
lightcone momentum fraction of gluon is sampled according to probability distribution P(x) = 1/x * (1...
Definition: stringprocess.h:355
smash::LPythia
static constexpr int LPythia
Definition: stringprocess.h:26
smash::StringProcess::find_junction_leg
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.
Definition: stringprocess.cc:1457
smash::StringProcess::mass_dependent_formation_times_
bool mass_dependent_formation_times_
Whether the formation time should depend on the mass of the fragment according to Andersson:1983ia e...
Definition: stringprocess.h:156
smash::StringProcess::get_index_forward
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.
Definition: stringprocess.h:754
smash::StringProcess::pdg_map_for_pythia
static int pdg_map_for_pythia(PdgCode &pdg)
Take pdg code and map onto particle specie which can be handled by PYTHIA.
Definition: stringprocess.cc:3255
smash::StringProcess::popcorn_rate_
double popcorn_rate_
popcorn rate
Definition: stringprocess.h:129
smash::ThreeVector::x1
double x1() const
Definition: threevector.h:165
smash::StringProcess::get_vcom
ThreeVector get_vcom()
Definition: stringprocess.h:1226
smash::PdgCode
Definition: pdgcode.h:108
smash::StringProcess::PNegB_
double PNegB_
backward lightcone momentum p^{-} of incoming particle B in CM-frame [GeV]
Definition: stringprocess.h:55
smash::StringProcess::convert_KaonLS
static void convert_KaonLS(int &pythia_id)
convert Kaon-L or Kaon-S into K0 or Anti-K0
Definition: stringprocess.h:825
smash::StringProcess::assign_all_scaling_factors
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.
Definition: stringprocess.cc:3208
smash::StringProcess::pow_fquark_beta_
double pow_fquark_beta_
parameter for the quark distribution function
Definition: stringprocess.h:97
smash::StringProcess::pythia_map
std::map< std::pair< int, int >, std::unique_ptr< Pythia8::Pythia > > pythia_map
Map containing PYTHIA objects for hard string routines.
Definition: stringprocess.h:178
smash::StringProcess::stringz_a_produce_
double stringz_a_produce_
parameter (StringZ:aLund) for the fragmentation function of other (produced) hadrons in soft non-diff...
Definition: stringprocess.h:118
smash::StringProcess::find_excess_constituent
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...
Definition: stringprocess.cc:770
smash::ParticleType::try_find
static const ParticleTypePtr try_find(PdgCode pdgcode)
Returns the ParticleTypePtr for the given pdgcode.
Definition: particletype.cc:89
smash::StringProcess::sigma_qperp_
double sigma_qperp_
Transverse momentum spread of the excited strings.
Definition: stringprocess.h:103
smash::StringProcess::common_setup_pythia
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.
Definition: stringprocess.cc:87
smash::StringProcess::get_pcom
std::array< FourVector, 2 > get_pcom()
Definition: stringprocess.h:1214
smash::StringProcess::getPPosA
double getPPosA()
Definition: stringprocess.h:1160
smash::StringProcess::splitting_gluon_qqbar
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...
Definition: stringprocess.cc:918
smash::StringProcess::ucomAB_
FourVector ucomAB_
velocity four vector of the center of mass in the lab frame
Definition: stringprocess.h:69
smash::StringProcess::reorient
static FourVector reorient(Pythia8::Particle &particle, std::array< ThreeVector, 3 > &evec_basis)
compute the four-momentum properly oriented in the lab frame.
Definition: stringprocess.h:880
constants.h
smash::StringProcess::sample_zLund
static double sample_zLund(double a, double b, double mTrn)
Sample lightcone momentum fraction according to the LUND fragmentation function.
Definition: stringprocess.cc:2845
smash::StringProcess::pythia_stringflav_
Pythia8::StringFlav pythia_stringflav_
An object for the flavor selection in string fragmentation in the case of separate fragmentation func...
Definition: stringprocess.h:193
logging.h
smash::StringProcess::additional_xsec_supp_
double additional_xsec_supp_
additional cross-section suppression factor to take coherence effect into account.
Definition: stringprocess.h:138
smash::StringProcess::make_final_state_2strings
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.
Definition: stringprocess.cc:355
smash::StringProcess::remake_kinematics_fragments
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)
Definition: stringprocess.cc:2877
smash::StringProcess::append_intermediate_list
static bool append_intermediate_list(int pdgid, FourVector momentum, ParticleList &intermediate_particles)
append new particle from PYTHIA to a specific particle list
Definition: stringprocess.h:805
smash::StringProcess::compose_string_junction
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,...
Definition: stringprocess.cc:1354
smash::StringProcess::stringz_a_leading_
double stringz_a_leading_
parameter (StringZ:aLund) for the fragmentation function of leading baryon in soft non-diffractive st...
Definition: stringprocess.h:108
smash::FourVector
Definition: fourvector.h:33
smash::StringProcess::time_collision_
double time_collision_
time of collision in the computational frame [fm]
Definition: stringprocess.h:144
smash::StringProcess::vcomAB_
ThreeVector vcomAB_
velocity three vector of the center of mass in the lab frame
Definition: stringprocess.h:71
smash::StringProcess::next_BBbarAnn
bool next_BBbarAnn()
Baryon-antibaryon annihilation process Based on what UrQMD Bass:1998ca , Bleicher:1999xi does,...
Definition: stringprocess.cc:1519
smash::StringProcess::PPosA_
double PPosA_
forward lightcone momentum p^{+} of incoming particle A in CM-frame [GeV]
Definition: stringprocess.h:49
smash::StringProcess::pow_fgluon_beta_
double pow_fgluon_beta_
parameter for the gluon distribution function
Definition: stringprocess.h:87
smash::StringProcess::make_lightcone_final_two
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...
Definition: stringprocess.cc:2780
smash::StringProcess::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 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)
Constructor, initializes pythia.
Definition: stringprocess.cc:21
smash::StringProcess::pow_fquark_alpha_
double pow_fquark_alpha_
parameter for the quark distribution function
Definition: stringprocess.h:92
smash::StringProcess::kappa_tension_string_
double kappa_tension_string_
string tension [GeV/fm]
Definition: stringprocess.h:133
smash::StringProcess::getPnegB
double getPnegB()
Definition: stringprocess.h:1178
smash::StringProcess::restore_constituent
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...
Definition: stringprocess.cc:1108
smash::StringProcess::fragment_off_hadron
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...
Definition: stringprocess.cc:2235
smash::maximum_rndm_seed_in_pythia
constexpr int maximum_rndm_seed_in_pythia
The maximum value of the random seed used in PYTHIA.
Definition: constants.h:103
smash::FourVector::threevec
ThreeVector threevec() const
Definition: fourvector.h:319
smash::StringProcess::final_state_
ParticleList final_state_
final state array which must be accessed after the collision
Definition: stringprocess.h:170
smash::StringProcess::next_NDiffSoft
bool next_NDiffSoft()
Soft Non-diffractive process is modelled in accordance with dual-topological approach Capella:1978ig ...
Definition: stringprocess.cc:443
smash::StringProcess::get_sqrts
double get_sqrts()
Definition: stringprocess.h:1196
smash::StringProcess::get_PDGs
std::array< PdgCode, 2 > get_PDGs()
Definition: stringprocess.h:1202
smash::StringProcess::set_tension_string
void set_tension_string(double kappa_string)
set the string tension, which is used in append_final_state.
Definition: stringprocess.h:377
smash::ThreeVector::x2
double x2() const
Definition: threevector.h:169
smash::StringProcess::massA_
double massA_
mass of incoming particle A [GeV]
Definition: stringprocess.h:57