25 using namespace Jetscape;
50 void DoEnergyLoss(
double deltaT,
double time,
double Q2, vector<Parton> &pIn,
51 vector<Parton> &pOut);
52 void WriteTask(weak_ptr<JetScapeWriter> w);
62 const double pi = 3.1415926;
63 const double epsilon = 1
e-6;
64 const double CA = 3.0;
65 const double CF = 4.0 / 3.0;
66 const double sctr = 0.1973;
69 const int lightOut = 1;
70 const int heavyOut = 0;
80 double hydro_Tc = 0.165;
88 double KTsig = 0.05 * hydro_Tc;
89 double preKT = 0.3 / 0.3;
92 double KPfactor, KTfactor, Kfactor,
runKT;
105 double ipTmax = 800.0;
106 double eta_cut = 0.5;
134 double fixAlphas = 0.3;
150 static double Rg1[60][20];
151 static double Rg2[60][20];
152 static double Rg3[60][20];
156 static double Rq3[60][20];
157 static double Rq4[60][20];
158 static double Rq5[60][20];
159 static double Rq6[60][20];
160 static double Rq7[60][20];
161 static double Rq8[60][20];
162 static double qhatLQ[60][20];
163 static double qhatG[60][20];
165 static double RHQ[60][20];
166 static double RHQ11[60][20];
167 static double RHQ12[60][20];
168 static double qhatHQ[60][20];
173 static const int HQener_gn = 500;
174 static const int t_gn_1 = 100;
175 static const int t_gn_2 = 125;
176 static const int t_gn = t_gn_1 + t_gn_2;
177 static const int temp_gn = 100;
179 static double dNg_over_dt_c[t_gn + 2][temp_gn + 1][HQener_gn + 1];
180 static double dNg_over_dt_q[t_gn + 2][temp_gn + 1][HQener_gn + 1];
181 static double dNg_over_dt_g[t_gn + 2][temp_gn + 1][HQener_gn + 1];
182 static double max_dNgfnc_c[t_gn + 2][temp_gn + 1][HQener_gn + 1];
183 static double max_dNgfnc_q[t_gn + 2][temp_gn + 1][HQener_gn + 1];
184 static double max_dNgfnc_g[t_gn + 2][temp_gn + 1][HQener_gn + 1];
186 const double HQener_max = 1000.0;
187 const double t_max_1 = 20.0;
188 const double t_max_2 = 270.0;
189 const double t_max = t_max_2;
190 const double temp_max = 0.65;
191 const double temp_min = 0.15;
192 double delta_tg_1 = t_max_1 / t_gn_1;
193 double delta_tg_2 = (t_max_2 - t_max_1) / t_gn_2;
194 double delta_temp = (temp_max - temp_min) / temp_gn;
195 double delta_HQener = HQener_max / HQener_gn;
198 static const int maxMC = 2000000;
199 static double initMCX[maxMC], initMCY[maxMC];
212 double dng0[101][101] = {{0.0}};
214 double Vtemp[4] = {0.0};
218 static const int dimParList = 50;
220 double tirad[dimParList] = {0.0};
221 double tiscatter[dimParList] = {0.0};
222 double tiform[dimParList] = {0.0};
223 double Tint_lrf[dimParList] = {0.0};
229 double radng[dimParList] = {0.0};
230 double xwm[3] = {0.0};
233 double vf[4] = {0.0};
234 double vfcar[4] = {0.0};
236 double vp[4] = {0.0};
237 double vc0[4] = {0.0};
240 double vc[4] = {0.0};
241 double pc0[4] = {0.0};
242 double pc2[4] = {0.0};
243 double pc3[4] = {0.0};
244 double pc4[4] = {0.0};
245 double p0[4] = {0.0};
246 double p2[4] = {0.0};
247 double p3[4] = {0.0};
248 double p4[4] = {0.0};
250 double pc00[4] = {0.0};
251 double pc30[4] = {0.0};
253 double pc01[4] = {0.0};
254 double pb[4] = {0.0};
256 double Pj0[4] = {0.0};
258 double V[4][dimParList] = {{0.0}};
259 double P[7][dimParList] = {{0.0}};
260 double V0[4][dimParList] = {{0.0}};
261 double P0[7][dimParList] = {{0.0}};
263 double Prad[4][dimParList] = {{0.0}};
265 double WT[dimParList] = {0};
266 double WT0[dimParList] = {0};
268 int NR[dimParList] = {0};
269 int KATT1[dimParList] = {0};
270 int KATT10[dimParList] = {0};
272 double PGm[4] = {0.0};
273 double tjp[dimParList] = {0.0};
274 double Vfrozen[4][dimParList] = {{0.0}};
275 double Vfrozen0[4][dimParList] = {{0.0}};
277 double Tfrozen[dimParList] = {0.0};
278 double Tfrozen0[dimParList] = {0.0};
279 double vcfrozen[4][dimParList] = {{0.0}};
280 double vcfrozen0[4][dimParList] = {{0.0}};
282 double VV[4][dimParList] = {{0.0}};
283 double VV0[4][dimParList] = {{0.0}};
284 double PP[4][dimParList] = {{0.0}};
285 double PP0[4][dimParList] = {{0.0}};
286 int CAT[dimParList] = {0};
287 int CAT0[dimParList] = {0};
297 int ng_radiation = 0;
303 static const int N_p1 = 500;
304 static const int N_T = 60;
305 static const int N_e2 = 75;
306 static double distFncB[N_T][N_p1][N_e2], distFncF[N_T][N_p1][N_e2],
307 distMaxB[N_T][N_p1][N_e2], distMaxF[N_T][N_p1][N_e2];
308 static double distFncBM[N_T][N_p1], distFncFM[N_T][N_p1];
310 double max_p1 = 1000.0;
311 double bin_p1 = (max_p1 - min_p1) / N_p1;
314 double bin_T = (max_T - min_T) / N_T;
316 double max_e2 = 15.0;
317 double bin_e2 = (max_e2 - min_e2) / N_e2;
330 void LBT0(
int &
n,
double &ti);
332 void trans(
double v[4],
double p[4]);
333 void transback(
double v[4],
double p[4]);
335 float ran0(
long *idum);
337 double alphas0(
int &Kalphas,
double temp0);
338 double DebyeMass2(
int &Kqhat0,
double alphas,
double temp0);
340 void lam(
int KATT0,
double &RTE,
double E,
double T,
double &
T1,
double &
T2,
341 double &E1,
double &E2,
int &iT1,
int &iT2,
int &iE1,
int &iE2);
343 void flavor(
int &CT,
int &KATT0,
int &KATT2,
int &KATT3,
double RTE,
double E,
344 double T,
double &
T1,
double &
T2,
double &E1,
double &E2,
345 int &iT1,
int &iT2,
int &iE1,
int &iE2);
346 void linear(
int KATT,
double E,
double T,
double &
T1,
double &
T2,
double &E1,
347 double &E2,
int &iT1,
int &iT2,
int &iE1,
int &iE2,
double &RTEg,
348 double &RTEg1,
double &RTEg2,
double &RTEg3,
double &RTEq,
349 double &RTEq3,
double &RTEq4,
double &RTEq5,
double &RTEq6,
350 double &RTEq7,
double &RTEq8,
double &RTEHQ,
double &RTEHQ11,
351 double &RTEHQ12,
double &qhatTP);
352 void twflavor(
int &CT,
int &KATT0,
int &KATT2,
double E,
double T);
353 void twlinear(
int KATT,
double E,
double T,
double &RTEg1,
double &RTEg2,
354 double &RTEq6,
double &RTEq7,
double &RTEq8);
355 void colljet22(
int CT,
double temp,
double qhat0ud,
double v0[4],
356 double p0[4],
double p2[4],
double p3[4],
double p4[4],
358 void twcoll(
int CT,
double qhat0ud,
double v0[4],
double p0[4],
double p2[4]);
360 void titau(
double ti,
double vf[4],
double vp[4],
double p0[4],
double &Vx,
361 double &Vy,
double &Veta,
double &Xtau);
363 void rotate(
double px,
double py,
double pz,
double p[4],
int icc);
365 int KPoisson(
double alambda);
367 void radiationHQ(
int parID,
double qhat0ud,
double v0[4],
double P2[4],
368 double P3[4],
double P4[4],
double Pj0[4],
int &ic,
369 double Tdiff,
double HQenergy,
double max_Ng,
370 double temp_med,
double xLow,
double xInt);
371 void collHQ22(
int CT,
double temp,
double qhat,
double v0[4],
double p0[4],
372 double p2[4],
double p3[4],
double p4[4],
double &qt);
373 double Mqc2qc(
double s,
double t,
double M);
374 double Mgc2gc(
double s,
double t,
double M);
376 void collHQ23(
int parID,
double temp_med,
double qhat0ud,
double v0[4],
377 double p0[4],
double p2[4],
double p3[4],
double p4[4],
378 double qt,
int &ic,
double Tdiff,
double HQenergy,
379 double max_Ng,
double xLow,
double xInt);
380 double dNg_over_dxdydt(
int parID,
double x0g,
double y0g,
double HQenergy,
381 double HQmass,
double temp_med,
double Tdiff);
382 double tau_f(
double x0g,
double y0g,
double HQenergy,
double HQmass);
383 double splittingP(
int parID,
double z0g);
384 double lambdas(
double kTFnc);
385 double nflavor(
double kTFnc);
386 double alphasHQ(
double kTFnc,
double tempFnc);
387 double nHQgluon(
int parID,
double dtLRF,
double &time_gluon,
double &temp_med,
388 double &HQenergy,
double &max_Ng);
390 void read_xyMC(
int &numXY);
391 void jetInitialize(
int numXY);
392 void setJetX(
int numXY);
395 void setParameter(
string fileName);
396 int checkParameter(
int nArg);