26 #define MAGENTA "\033[35m"
28 using namespace Jetscape;
31 const double QS = 1.0;
34 SetId(
"ElossValidate");
41 JSINFO <<
"Initialize ElossValidate ...";
43 std::string s = GetXMLElementText({
"Eloss",
"ElossValidate",
"name"});
44 JSINFO << s <<
" to be initializied ...";
52 f->WriteComment(
"ElossModule Parton List: " + GetId());
56 vector<Parton> &pIn, vector<Parton> &pOut) {
59 <<
" " << Q2 <<
" " << &pIn;
62 std::unique_ptr<FluidCellInfo> check_fluid_info_ptr;
63 GetHydroCellSignal(1, 1.0, 1.0, 0.0, check_fluid_info_ptr);
69 JSINFO <<
" the time in fm is " << time <<
" The time in GeV-1 is " << Time;
70 JSINFO <<
" pid = " << pIn[0].pid() <<
" E = " << pIn[0].e()
71 <<
" px = " << pIn[0].p(1) <<
" py = " << pIn[0].p(2)
72 <<
" pz = " << pIn[0].p(3) <<
" virtuality = " << pIn[0].t()
73 <<
" form_time in fm = " << pIn[0].form_time() /
fmToGeVinv;
74 JSINFO <<
" color = " << pIn[0].color()
75 <<
" anti-color = " << pIn[0].anti_color();
77 for (
int i = 0;
i < pIn.size();
i++) {
78 TakeResponsibilityFor(
80 JSINFO <<
" Parton Q2= " << pIn[
i].t();
81 JSINFO <<
" Parton Id= " << pIn[
i].pid()
82 <<
" and mass= " << pIn[
i].restmass();
86 for (
int j = 1;
j <= 3;
j++) {
87 velocity[
j] = pIn[
i].p(
j) / pIn[
i].e();
90 if (pIn[i].form_time() <
92 pIn[
i].set_jet_v(velocity);
93 pIn[
i].set_t(
QS * 2.);
94 pIn[
i].set_mean_form_time();
95 JSINFO <<
" UPDATED Parton Q2= " << pIn[
i].t();
98 if (pIn[i].
t() >=
QS) {
99 JSINFO <<
" ************ ";
100 JSINFO <<
" DOING ELOSS ";
101 JSINFO <<
" ************ ";
107 double tQd1 =
QS - 0.00001;
108 double tQd2 =
QS - 0.00001;
111 int d1_pid = pIn[
i].pid();
118 double z2 = 1.0 - z1;
120 newx[0] = Time + deltaTime;
121 for (
int j = 1;
j <= 3;
j++) {
123 pIn[
i].x_in().comp(
j) + (Time + deltaTime - pIn[
i].x_in().comp(0));
127 newp[0] = z1 * pIn[
i].e();
128 newp[1] = z1 * pIn[
i].px() * (1.1);
129 newp[2] = z1 * pIn[
i].py() * (0.9);
130 newp[3] = z1 * pIn[
i].pz() * (1.1);
131 pOut.push_back(
Parton(0, d1_pid, 0, newp, newx));
132 pOut.back().set_jet_v(pIn[i].jet_v());
133 pOut.back().set_t(tQd1);
134 pOut.back().set_mean_form_time();
135 pOut.back().set_form_time(10);
138 newp[0] = z2 * pIn[
i].e();
139 newp[1] = z2 * pIn[
i].px() * (0.9);
140 newp[2] = z2 * pIn[
i].py() * (1.1);
141 newp[3] = z2 * pIn[
i].pz() * (0.8);
142 pOut.push_back(
Parton(0, d2_pid, 0, newp, newx));
143 pOut.back().set_jet_v(pIn[i].jet_v());
144 pOut.back().set_t(tQd2);
145 pOut.back().set_mean_form_time();
146 pOut.back().set_form_time(10);