5 #include "Pythia8/Pythia.h"
12 calcScales_ = settingsPtr->flag(
"POWHEGres:calcScales");
16 int nDau =
event[iRes].daughterList().size();
18 if (!calcScales_
or nDau == 0) {
29 else if (
abs(
event[iRes].
id()) == 6) {
31 int idw = -1, idb = -1, idg = -1;
33 for (
int i = 0;
i < nDau;
i++) {
34 int iDau =
event[iRes].daughterList()[
i];
45 pw.bstback(
event[iRes].
p());
48 pb.bstback(
event[iRes].
p());
51 pg.bstback(
event[iRes].
p());
54 scale =
sqrt(2 * pg * pb * pg.e() / pb.e());
57 else if (
abs(
event[iRes].
id()) == 24) {
59 int idq = -1, ida = -1, idg = -1;
61 for (
int i = 0;
i < nDau;
i++) {
62 int iDau =
event[iRes].daughterList()[
i];
63 if (
event[iDau].
id() == 21)
65 else if (
event[iDau].
id() > 0)
67 else if (
event[iDau].
id() < 0)
73 pq.bstback(
event[iRes].
p());
76 pa.bstback(
event[iRes].
p());
79 pg.bstback(
event[iRes].
p());
82 Vec4 pw = pq + pa + pg;
84 double csi = 2 * pg.e() /
sqrt(
q2);
85 double yq = 1 - pg * pq / (pg.e() * pq.e());
86 double ya = 1 - pg * pa / (pg.e() * pa.e());