1 // SigmaEW.cc is a part of the PYTHIA event generator.
2 // Copyright (C) 2008 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL version 2, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
6 // Function definitions (not found in the header) for the
7 // electroweak simulation classes (including photon processes).
13 //**************************************************************************
15 // Sigma2qg2qgamma class.
16 // Cross section for q g -> q gamma.
20 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
22 void Sigma2qg2qgamma::sigmaKin() {
24 // Calculate kinematics dependence.
25 sigUS = (1./3.) * (sH2 + uH2) / (-sH * uH);
28 sigma0 = (M_PI/sH2) * alpS * alpEM * sigUS;
34 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
36 double Sigma2qg2qgamma::sigmaHat() {
38 // Incoming flavour gives charge factor.
39 int idNow = (id2 == 21) ? id1 : id2;
40 double eNow = CoupEW::ef( abs(idNow) );
41 return sigma0 * pow2(eNow);
47 // Select identity, colour and anticolour.
49 void Sigma2qg2qgamma::setIdColAcol() {
51 // Construct outgoing flavours.
52 id3 = (id1 == 21) ? 22 : id1;
53 id4 = (id2 == 21) ? 22 : id2;
54 setId( id1, id2, id3, id4);
56 // Colour flow topology. Swap if first is gluon, or when antiquark.
57 setColAcol( 1, 0, 2, 1, 2, 0, 0, 0);
58 if (id1 == 21) swapCol1234();
59 if (id1 < 0 || id2 < 0) swapColAcol();
63 //**************************************************************************
65 // Sigma2qqbar2ggamma class.
66 // Cross section for q qbar -> g gamma.
70 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
72 void Sigma2qqbar2ggamma::sigmaKin() {
74 // Calculate kinematics dependence.
75 double sigTU = (8./9.) * (tH2 + uH2) / (tH * uH);
78 sigma0 = (M_PI/sH2) * alpS * alpEM * sigTU;
84 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
86 double Sigma2qqbar2ggamma::sigmaHat() {
88 // Incoming flavour gives charge factor.
89 double eNow = CoupEW::ef( abs(id1) );
90 return sigma0 * pow2(eNow);
96 // Select identity, colour and anticolour.
98 void Sigma2qqbar2ggamma::setIdColAcol() {
100 // Outgoing flavours trivial.
101 setId( id1, id2, 21, 22);
103 // One colour flow topology. Swap if first is antiquark.
104 setColAcol( 1, 0, 0, 2, 1, 2, 0, 0);
105 if (id1 < 0) swapColAcol();
109 //**************************************************************************
111 // Sigma2gg2ggamma class.
112 // Cross section for g g -> g gamma.
113 // Proceeds through a quark box, by default using 5 massless quarks.
117 // Initialize process, especially parton-flux object.
119 void Sigma2gg2ggamma::initProc() {
121 // Maximum quark flavour in loop.
122 int nQuarkLoop = Settings::mode("PromptPhoton:nQuarkLoop");
124 // Calculate charge factor from the allowed quarks in the box.
125 chargeSum = - 1./3. + 2./3. - 1./3.;
126 if (nQuarkLoop >= 4) chargeSum += 2./3.;
127 if (nQuarkLoop >= 5) chargeSum -= 1./3.;
128 if (nQuarkLoop >= 6) chargeSum += 2./3.;
134 // Evaluate d(sigmaHat)/d(tHat).
136 void Sigma2gg2ggamma::sigmaKin() {
138 // Logarithms of Mandelstam variable ratios.
139 double logST = log( -sH / tH );
140 double logSU = log( -sH / uH );
141 double logTU = log( tH / uH );
143 // Real and imaginary parts of separate amplitudes.
144 double b0stuRe = 1. + (tH - uH) / sH * logTU
145 + 0.5 * (tH2 + uH2) / sH2 * (pow2(logTU) + pow2(M_PI));
147 double b0tsuRe = 1. + (sH - uH) / tH * logSU
148 + 0.5 * (sH2 + uH2) / tH2 * pow2(logSU);
149 double b0tsuIm = -M_PI * ( (sH - uH) / tH + (sH2 + uH2) / tH2 * logSU);
150 double b0utsRe = 1. + (sH - tH) / uH * logST
151 + 0.5 * (sH2 + tH2) / uH2 * pow2(logST);
152 double b0utsIm = -M_PI * ( (sH - tH) / uH + (sH2 + tH2) / uH2 * logST);
153 double b1stuRe = -1.;
155 double b2stuRe = -1.;
158 // Calculate kinematics dependence.
159 double sigBox = pow2(b0stuRe) + pow2(b0stuIm) + pow2(b0tsuRe)
160 + pow2(b0tsuIm) + pow2(b0utsRe) + pow2(b0utsIm) + 4. * pow2(b1stuRe)
161 + 4. * pow2(b1stuIm) + pow2(b2stuRe) + pow2(b2stuIm);
164 sigma = (5. / (192. * M_PI * sH2)) * pow2(chargeSum)
165 * pow3(alpS) * alpEM * sigBox;
171 // Select identity, colour and anticolour.
173 void Sigma2gg2ggamma::setIdColAcol() {
175 // Flavours and colours are trivial.
176 setId( id1, id2, 21, 22);
177 setColAcol( 1, 2, 2, 3, 1, 3, 0, 0);
178 if (Rndm::flat() > 0.5) swapColAcol();
182 //**************************************************************************
184 // Sigma2ffbar2gammagamma class.
185 // Cross section for q qbar -> gamma gamma.
189 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
191 void Sigma2ffbar2gammagamma::sigmaKin() {
193 // Calculate kinematics dependence.
194 sigTU = 2. * (tH2 + uH2) / (tH * uH);
196 // Answer contains factor 1/2 from identical photons.
197 sigma0 = (M_PI/sH2) * pow2(alpEM) * 0.5 * sigTU;
203 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
205 double Sigma2ffbar2gammagamma::sigmaHat() {
207 // Incoming flavour gives charge and colour factors.
208 double eNow = CoupEW::ef( abs(id1) );
209 double colFac = (abs(id1) < 9) ? 1. / 3. : 1.;
210 return sigma0 * pow4(eNow) * colFac;
216 // Select identity, colour and anticolour.
218 void Sigma2ffbar2gammagamma::setIdColAcol() {
220 // Outgoing flavours trivial.
221 setId( id1, id2, 22, 22);
223 // No colours at all or one flow topology. Swap if first is antiquark.
224 if (abs(id1) < 9) setColAcol( 1, 0, 0, 1, 0, 0, 0, 0);
225 else setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
226 if (id1 < 0) swapColAcol();
230 //**************************************************************************
232 // Sigma2gg2gammagamma class.
233 // Cross section for g g -> gamma gamma.
234 // Proceeds through a quark box, by default using 5 massless quarks.
238 // Initialize process.
240 void Sigma2gg2gammagamma::initProc() {
242 // Maximum quark flavour in loop.
243 int nQuarkLoop = Settings::mode("PromptPhoton:nQuarkLoop");
245 // Calculate charge factor from the allowed quarks in the box.
246 charge2Sum = 1./9. + 4./9. + 1./9.;
247 if (nQuarkLoop >= 4) charge2Sum += 4./9.;
248 if (nQuarkLoop >= 5) charge2Sum += 1./9.;
249 if (nQuarkLoop >= 6) charge2Sum += 4./9.;
255 // Evaluate d(sigmaHat)/d(tHat).
257 void Sigma2gg2gammagamma::sigmaKin() {
259 // Logarithms of Mandelstam variable ratios.
260 double logST = log( -sH / tH );
261 double logSU = log( -sH / uH );
262 double logTU = log( tH / uH );
264 // Real and imaginary parts of separate amplitudes.
265 double b0stuRe = 1. + (tH - uH) / sH * logTU
266 + 0.5 * (tH2 + uH2) / sH2 * (pow2(logTU) + pow2(M_PI));
268 double b0tsuRe = 1. + (sH - uH) / tH * logSU
269 + 0.5 * (sH2 + uH2) / tH2 * pow2(logSU);
270 double b0tsuIm = -M_PI * ( (sH - uH) / tH + (sH2 + uH2) / tH2 * logSU);
271 double b0utsRe = 1. + (sH - tH) / uH * logST
272 + 0.5 * (sH2 + tH2) / uH2 * pow2(logST);
273 double b0utsIm = -M_PI * ( (sH - tH) / uH + (sH2 + tH2) / uH2 * logST);
274 double b1stuRe = -1.;
276 double b2stuRe = -1.;
279 // Calculate kinematics dependence.
280 double sigBox = pow2(b0stuRe) + pow2(b0stuIm) + pow2(b0tsuRe)
281 + pow2(b0tsuIm) + pow2(b0utsRe) + pow2(b0utsIm) + 4. * pow2(b1stuRe)
282 + 4. * pow2(b1stuIm) + pow2(b2stuRe) + pow2(b2stuIm);
284 // Answer contains factor 1/2 from identical photons.
285 sigma = (0.5 / (16. * M_PI * sH2)) * pow2(charge2Sum)
286 * pow2(alpS) * pow2(alpEM) * sigBox;
292 // Select identity, colour and anticolour.
294 void Sigma2gg2gammagamma::setIdColAcol() {
296 // Flavours and colours are trivial.
297 setId( id1, id2, 22, 22);
298 setColAcol( 1, 2, 2, 1, 0, 0, 0, 0);
302 //**************************************************************************
304 // Sigma2ff2fftgmZ class.
305 // Cross section for f f' -> f f' via t-channel gamma*/Z0 exchange
306 // (f is quark or lepton).
310 // Initialize process.
312 void Sigma2ff2fftgmZ::initProc() {
314 // Store Z0 mass for propagator. Common coupling factor.
315 gmZmode = Settings::mode("WeakZ0:gmZmode");
316 mZ = ParticleDataTable::m0(23);
318 thetaWRat = 1. / (16. * CoupEW::sin2thetaW() * CoupEW::cos2thetaW());
324 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
326 void Sigma2ff2fftgmZ::sigmaKin() {
328 // Cross section part common for all incoming flavours.
329 double sigma0 = (M_PI / sH2) * pow2(alpEM);
331 // Kinematical functions for gamma-gamma, gamma-Z and Z-Z parts.
332 sigmagmgm = sigma0 * 2. * (sH2 + uH2) / tH2;
333 sigmagmZ = sigma0 * 4. * thetaWRat * sH2 / (tH * (tH - mZS));
334 sigmaZZ = sigma0 * 2. * pow2(thetaWRat) * sH2 / pow2(tH - mZS);
335 if (gmZmode == 1) {sigmagmZ = 0.; sigmaZZ = 0.;}
336 if (gmZmode == 2) {sigmagmgm = 0.; sigmagmZ = 0.;}
342 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
344 double Sigma2ff2fftgmZ::sigmaHat() {
346 // Couplings for current flavour combination.
347 int id1Abs = abs(id1);
348 double e1 = CoupEW::ef(id1Abs);
349 double v1 = CoupEW::vf(id1Abs);
350 double a1 = CoupEW::af(id1Abs);
351 int id2Abs = abs(id2);
352 double e2 = CoupEW::ef(id2Abs);
353 double v2 = CoupEW::vf(id2Abs);
354 double a2 = CoupEW::af(id2Abs);
356 // Distinguish same-sign and opposite-sign fermions.
357 double epsi = (id1 * id2 > 0) ? 1. : -1.;
359 // Flavour-dependent cross section.
360 double sigma = sigmagmgm * pow2(e1 * e2)
361 + sigmagmZ * e1 * e2 * (v1 * v2 * (1. + uH2 / sH2)
362 + a1 * a2 * epsi * (1. - uH2 / sH2))
363 + sigmaZZ * ((v1*v1 + a1*a1) * (v2*v2 + a2*a2) * (1. + uH2 / sH2)
364 + 4. * v1 * a1 * v2 * a2 * epsi * (1. - uH2 / sH2));
366 // Spin-state extra factor 2 per incoming neutrino.
367 if (id1Abs == 12 || id1Abs == 14 || id1Abs == 16) sigma *= 2.;
368 if (id2Abs == 12 || id2Abs == 14 || id2Abs == 16) sigma *= 2.;
377 // Select identity, colour and anticolour.
379 void Sigma2ff2fftgmZ::setIdColAcol() {
381 // Trivial flavours: out = in.
382 setId( id1, id2, id1, id2);
384 // Colour flow topologies. Swap when antiquarks.
385 if (abs(id1) < 9 && abs(id2) < 9 && id1*id2 > 0)
386 setColAcol( 1, 0, 2, 0, 1, 0, 2, 0);
387 else if (abs(id1) < 9 && abs(id2) < 9)
388 setColAcol( 1, 0, 0, 2, 1, 0, 0, 2);
389 else if (abs(id1) < 9) setColAcol( 1, 0, 0, 0, 1, 0, 0, 0);
390 else if (abs(id2) < 9) setColAcol( 0, 0, 1, 0, 0, 0, 1, 0);
391 else setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
392 if ( (abs(id1) < 9 && id1 < 0) || (abs(id1) > 10 && id2 < 0) )
397 //**************************************************************************
399 // Sigma2ff2fftW class.
400 // Cross section for f_1 f_2 -> f_3 f_4 via t-channel W+- exchange
401 // (f is quark or lepton).
405 // Initialize process.
407 void Sigma2ff2fftW::initProc() {
409 // Store W+- mass for propagator. Common coupling factor.
410 mW = ParticleDataTable::m0(24);
412 thetaWRat = 1. / (4. * CoupEW::sin2thetaW());
418 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
420 void Sigma2ff2fftW::sigmaKin() {
422 // Cross section part common for all incoming flavours.
423 sigma0 = (M_PI / sH2) * pow2(alpEM * thetaWRat)
424 * 4. * sH2 / pow2(tH - mWS);
430 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
432 double Sigma2ff2fftW::sigmaHat() {
434 // Some flavour combinations not possible.
435 int id1Abs = abs(id1);
436 int id2Abs = abs(id2);
437 if ( (id1Abs%2 == id2Abs%2 && id1 * id2 > 0)
438 || (id1Abs%2 != id2Abs%2 && id1 * id2 < 0) ) return 0.;
440 // Basic cross section.
441 double sigma = sigma0;
442 if (id1 * id2 < 0) sigma *= uH2 / sH2;
444 // CKM factors for final states.
445 sigma *= VCKM::V2sum(id1Abs) * VCKM::V2sum(id2Abs);
447 // Spin-state extra factor 2 per incoming neutrino.
448 if (id1Abs == 12 || id1Abs == 14 || id1Abs == 16) sigma *= 2.;
449 if (id2Abs == 12 || id2Abs == 14 || id2Abs == 16) sigma *= 2.;
458 // Select identity, colour and anticolour.
460 void Sigma2ff2fftW::setIdColAcol() {
462 // Pick out-flavours by relative CKM weights.
463 id3 = VCKM::V2pick(id1);
464 id4 = VCKM::V2pick(id2);
465 setId( id1, id2, id3, id4);
467 // Colour flow topologies. Swap when antiquarks.
468 if (abs(id1) < 9 && abs(id2) < 9 && id1*id2 > 0)
469 setColAcol( 1, 0, 2, 0, 1, 0, 2, 0);
470 else if (abs(id1) < 9 && abs(id2) < 9)
471 setColAcol( 1, 0, 0, 2, 1, 0, 0, 2);
472 else if (abs(id1) < 9) setColAcol( 1, 0, 0, 0, 1, 0, 0, 0);
473 else if (abs(id2) < 9) setColAcol( 0, 0, 1, 0, 0, 0, 1, 0);
474 else setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
475 if ( (abs(id1) < 9 && id1 < 0) || (abs(id1) > 10 && id2 < 0) )
481 //**************************************************************************
483 // Sigma2qq2QqtW class.
484 // Cross section for q q' -> Q q" via t-channel W+- exchange.
485 // Related to Sigma2ff2ffViaW class, but with massive matrix elements.
489 // Initialize process.
491 void Sigma2qq2QqtW::initProc() {
494 nameSave = "q q -> Q q (t-channel W+-)";
495 if (idNew == 4) nameSave = "q q -> c q (t-channel W+-)";
496 if (idNew == 5) nameSave = "q q -> b q (t-channel W+-)";
497 if (idNew == 6) nameSave = "q q -> t q (t-channel W+-)";
498 if (idNew == 7) nameSave = "q q -> b' q (t-channel W+-)";
499 if (idNew == 8) nameSave = "q q -> t' q (t-channel W+-)";
501 // Store W+- mass for propagator. Common coupling factor.
502 mW = ParticleDataTable::m0(24);
504 thetaWRat = 1. / (4. * CoupEW::sin2thetaW());
506 // Secondary open width fractions, relevant for top (or heavier).
507 openFracPos = ParticleDataTable::resOpenFrac(idNew);
508 openFracNeg = ParticleDataTable::resOpenFrac(-idNew);
514 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
516 void Sigma2qq2QqtW::sigmaKin() {
518 // Cross section part common for all incoming flavours.
519 sigma0 = (M_PI / sH2) * pow2(alpEM * thetaWRat) * 4. / pow2(tH - mWS);
525 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
527 double Sigma2qq2QqtW::sigmaHat() {
529 // Some flavour combinations not possible.
530 int id1Abs = abs(id1);
531 int id2Abs = abs(id2);
532 bool diff12 = (id1Abs%2 != id2Abs%2);
533 if ( (!diff12 && id1 * id2 > 0)
534 || ( diff12 && id1 * id2 < 0) ) return 0.;
536 // Basic cross section.
537 double sigma = sigma0;
538 sigma *= (id1 * id2 > 0) ? sH * (sH - s3) : uH * (uH - s3);
540 // Secondary width if t or tbar produced on either side.
541 double openFrac1 = (id1 > 0) ? openFracPos : openFracNeg;
542 double openFrac2 = (id2 > 0) ? openFracPos : openFracNeg;
544 // CKM factors for final states; further impossible case.
545 bool diff1N = (id1Abs%2 != idNew%2);
546 bool diff2N = (id2Abs%2 != idNew%2);
547 if (diff1N && diff2N)
548 sigma *= ( VCKM::V2id(id1Abs, idNew) * openFrac1 * VCKM::V2sum(id2Abs)
549 + VCKM::V2sum(id1Abs) * VCKM::V2id(id2Abs, idNew) * openFrac2 );
551 sigma *= VCKM::V2id(id1Abs, idNew) * openFrac1 * VCKM::V2sum(id2Abs);
553 sigma *= VCKM::V2sum(id1Abs) * VCKM::V2id(id2Abs, idNew) * openFrac2;
556 // Spin-state extra factor 2 per incoming neutrino.
557 if (id1Abs == 12 || id1Abs == 14 || id1Abs == 16) sigma *= 2.;
558 if (id2Abs == 12 || id2Abs == 14 || id2Abs == 16) sigma *= 2.;
567 // Select identity, colour and anticolour.
569 void Sigma2qq2QqtW::setIdColAcol() {
571 // For topologies like d dbar -> (t/c/u) (t/c/u)bar pick side.
572 int id1Abs = abs(id1);
573 int id2Abs = abs(id2);
575 if ( (id1Abs + idNew)%2 == 1 && (id2Abs + idNew)%2 == 1 ) {
576 double prob1 = VCKM::V2id(id1Abs, idNew) * VCKM::V2sum(id2Abs);
577 prob1 *= (id1 > 0) ? openFracPos : openFracNeg;
578 double prob2 = VCKM::V2id(id2Abs, idNew) * VCKM::V2sum(id1Abs);
579 prob2 *= (id2 > 0) ? openFracPos : openFracNeg;
580 if (prob2 > Rndm::flat() * (prob1 + prob2)) side = 2;
582 else if ((id2Abs + idNew)%2 == 1) side = 2;
584 // Pick out-flavours by relative CKM weights.
586 // q q' -> t q" : correct order from start.
587 id3 = (id1 > 0) ? idNew : -idNew;
588 id4 = VCKM::V2pick(id2);
589 setId( id1, id2, id3, id4);
591 // q q' -> q" t : stored as t q" so swap tHat <-> uHat.
593 id3 = VCKM::V2pick(id1);
594 id4 = (id2 > 0) ? idNew : -idNew;
595 setId( id1, id2, id4, id3);
598 // Colour flow topologies. Swap when antiquarks on side 1.
599 if (side == 1 && id1 * id2 > 0) setColAcol( 1, 0, 2, 0, 1, 0, 2, 0);
600 else if (id1 * id2 > 0) setColAcol( 1, 0, 2, 0, 2, 0, 1, 0);
601 else if (side == 1) setColAcol( 1, 0, 0, 2, 1, 0, 0, 2);
602 else setColAcol( 1, 0, 0, 2, 0, 2, 1, 0);
603 if (id1 < 0) swapColAcol();
609 // Evaluate weight for decay angles of W in top decay.
611 double Sigma2qq2QqtW::weightDecay( Event& process, int iResBeg,
614 // For top decay hand over to standard routine, else done.
615 if (idNew == 6 && process[process[iResBeg].mother1()].idAbs() == 6)
616 return weightTopDecay( process, iResBeg, iResEnd);
621 //**************************************************************************
623 // Sigma1ffbar2gmZ class.
624 // Cross section for f fbar -> gamma*/Z0 (f is quark or lepton).
628 // Initialize process.
630 void Sigma1ffbar2gmZ::initProc() {
632 // Allow to pick only gamma* or Z0 part of full gamma*/Z0 expression.
633 gmZmode = Settings::mode("WeakZ0:gmZmode");
635 // Store Z0 mass and width for propagator.
636 mRes = ParticleDataTable::m0(23);
637 GammaRes = ParticleDataTable::mWidth(23);
639 GamMRat = GammaRes / mRes;
640 thetaWRat = 1. / (16. * CoupEW::sin2thetaW() * CoupEW::cos2thetaW());
642 // Set pointer to particle properties and decay table.
643 particlePtr = ParticleDataTable::particleDataPtr(23);
649 // Evaluate sigmaHat(sHat), part independent of incoming flavour.
651 void Sigma1ffbar2gmZ::sigmaKin() {
653 // Common coupling factors.
654 double colQ = 3. * (1. + alpS / M_PI);
656 // Reset quantities to sum. Declare variables in loop.
661 double mf, mr, psvec, psaxi, betaf, ef2, efvf, vf2af2, colf;
663 // Loop over all Z0 decay channels.
664 for (int i = 0; i < particlePtr->decay.size(); ++i) {
665 idAbs = abs( particlePtr->decay[i].product(0) );
667 // Only contributions from three fermion generations, except top.
668 if ( (idAbs > 0 && idAbs < 6) || ( idAbs > 10 && idAbs < 17)) {
669 mf = ParticleDataTable::m0(idAbs);
671 // Check that above threshold. Phase space.
672 if (mH > 2. * mf + MASSMARGIN) {
674 betaf = sqrtpos(1. - 4. * mr);
675 psvec = betaf * (1. + 2. * mr);
678 // Combine phase space with couplings.
679 ef2 = CoupEW::ef2(idAbs) * psvec;
680 efvf = CoupEW::efvf(idAbs) * psvec;
681 vf2af2 = CoupEW::vf2(idAbs) * psvec + CoupEW::af2(idAbs) * psaxi;
682 colf = (idAbs < 6) ? colQ : 1.;
684 // Store sum of combinations. For outstate only open channels.
685 onMode = particlePtr->decay[i].onMode();
686 if (onMode == 1 || onMode == 2) {
687 gamSum += colf * ef2;
688 intSum += colf * efvf;
689 resSum += colf * vf2af2;
692 // End loop over fermions.
697 // Calculate prefactors for gamma/interference/Z0 cross section terms.
698 gamProp = 4. * M_PI * pow2(alpEM) / (3. * sH);
699 intProp = gamProp * 2. * thetaWRat * sH * (sH - m2Res)
700 / ( pow2(sH - m2Res) + pow2(sH * GamMRat) );
701 resProp = gamProp * pow2(thetaWRat * sH)
702 / ( pow2(sH - m2Res) + pow2(sH * GamMRat) );
704 // Optionally only keep gamma* or Z0 term.
705 if (gmZmode == 1) {intProp = 0.; resProp = 0.;}
706 if (gmZmode == 2) {gamProp = 0.; intProp = 0.;}
712 // Evaluate sigmaHat(sHat), including incoming flavour dependence.
714 double Sigma1ffbar2gmZ::sigmaHat() {
716 // Combine gamma, interference and Z0 parts.
717 int idAbs = abs(id1);
718 double sigma = CoupEW::ef2(idAbs) * gamProp * gamSum
719 + CoupEW::efvf(idAbs) * intProp * intSum
720 + CoupEW::vf2af2(idAbs) * resProp * resSum;
722 // Colour factor. Answer.
723 if (idAbs < 9) sigma /= 3.;
730 // Select identity, colour and anticolour.
732 void Sigma1ffbar2gmZ::setIdColAcol() {
735 setId( id1, id2, 23);
737 // Colour flow topologies. Swap when antiquarks.
738 if (abs(id1) < 9) setColAcol( 1, 0, 0, 1, 0, 0);
739 else setColAcol( 0, 0, 0, 0, 0, 0);
740 if (id1 < 0) swapColAcol();
746 // Evaluate weight for gamma*/Z0 decay angle.
748 double Sigma1ffbar2gmZ::weightDecay( Event& process, int iResBeg,
751 // Z should sit in entry 5.
752 if (iResBeg != 5 || iResEnd != 5) return 1.;
754 // Couplings for in- and out-flavours.
755 int idInAbs = process[3].idAbs();
756 double ei = CoupEW::ef(idInAbs);
757 double vi = CoupEW::vf(idInAbs);
758 double ai = CoupEW::af(idInAbs);
759 int idOutAbs = process[6].idAbs();
760 double ef = CoupEW::ef(idOutAbs);
761 double vf = CoupEW::vf(idOutAbs);
762 double af = CoupEW::af(idOutAbs);
764 // Phase space factors. (One power of beta left out in formulae.)
765 double mf = process[6].m();
766 double mr = mf*mf / sH;
767 double betaf = sqrtpos(1. - 4. * mr);
769 // Coefficients of angular expression.
770 double coefTran = ei*ei * gamProp * ef*ef + ei * vi * intProp * ef * vf
771 + (vi*vi + ai*ai) * resProp * (vf*vf + pow2(betaf) * af*af);
772 double coefLong = 4. * mr * ( ei*ei * gamProp * ef*ef
773 + ei * vi * intProp * ef * vf + (vi*vi + ai*ai) * resProp * vf*vf );
774 double coefAsym = betaf * ( ei * ai * intProp * ef * af
775 + 4. * vi * ai * resProp * vf * af );
777 // Flip asymmetry for in-fermion + out-antifermion.
778 if (process[3].id() * process[6].id() < 0) coefAsym = -coefAsym;
780 // Reconstruct decay angle and weight for it.
781 double cosThe = (process[3].p() - process[4].p())
782 * (process[7].p() - process[6].p()) / (sH * betaf);
783 double wtMax = 2. * (coefTran + abs(coefAsym));
784 double wt = coefTran * (1. + pow2(cosThe))
785 + coefLong * (1. - pow2(cosThe)) + 2. * coefAsym * cosThe;
792 //**************************************************************************
794 // Sigma1ffbar2W class.
795 // Cross section for f fbar' -> W+- (f is quark or lepton).
799 // Initialize process.
801 void Sigma1ffbar2W::initProc() {
803 // Store W+- mass and width for propagator.
804 mRes = ParticleDataTable::m0(24);
805 GammaRes = ParticleDataTable::mWidth(24);
807 GamMRat = GammaRes / mRes;
808 thetaWRat = 1. / (12. * CoupEW::sin2thetaW());
810 // Set pointer to particle properties and decay table.
811 particlePtr = ParticleDataTable::particleDataPtr(24);
817 // Evaluate sigmaHat(sHat), part independent of incoming flavour.
819 void Sigma1ffbar2W::sigmaKin() {
821 // Set up Breit-Wigner. Cross section for W+ and W- separately.
822 double sigBW = 12. * M_PI / ( pow2(sH - m2Res) + pow2(sH * GamMRat) );
823 double preFac = alpEM * thetaWRat * mH;
824 sigma0Pos = preFac * sigBW * particlePtr->resWidthOpen(34, mH);
825 sigma0Neg = preFac * sigBW * particlePtr->resWidthOpen(-34, mH);
831 // Evaluate sigmaHat(sHat), including incoming flavour dependence.
833 double Sigma1ffbar2W::sigmaHat() {
835 // Secondary width for W+ or W-. CKM and colour factors.
836 int idUp = (abs(id1)%2 == 0) ? id1 : id2;
837 double sigma = (idUp > 0) ? sigma0Pos : sigma0Neg;
838 if (abs(id1) < 9) sigma *= VCKM::V2id(abs(id1), abs(id2)) / 3.;
847 // Select identity, colour and anticolour.
849 void Sigma1ffbar2W::setIdColAcol() {
851 // Sign of outgoing W.
852 int sign = 1 - 2 * (abs(id1)%2);
853 if (id1 < 0) sign = -sign;
854 setId( id1, id2, 24 * sign);
856 // Colour flow topologies. Swap when antiquarks.
857 if (abs(id1) < 9) setColAcol( 1, 0, 0, 1, 0, 0);
858 else setColAcol( 0, 0, 0, 0, 0, 0);
859 if (id1 < 0) swapColAcol();
865 // Evaluate weight for W decay angle.
867 double Sigma1ffbar2W::weightDecay( Event& process, int iResBeg,
870 // W should sit in entry 5.
871 if (iResBeg != 5 || iResEnd != 5) return 1.;
873 // Phase space factors.
874 double mr1 = pow2(process[6].m()) / sH;
875 double mr2 = pow2(process[7].m()) / sH;
876 double betaf = sqrtpos( pow2(1. - mr1 - mr2) - 4. * mr1 * mr2);
878 // Sign of asymmetry.
879 double eps = (process[3].id() * process[6].id() > 0) ? 1. : -1.;
881 // Reconstruct decay angle and weight for it.
882 double cosThe = (process[3].p() - process[4].p())
883 * (process[7].p() - process[6].p()) / (sH * betaf);
885 double wt = pow2(1. + betaf * eps * cosThe) - pow2(mr1 - mr2);
892 //**************************************************************************
894 // Sigma2ffbar2ffbarsgm class.
895 // Cross section f fbar -> gamma* -> f' fbar', for multiple interactions.
900 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
902 void Sigma2ffbar2ffbarsgm::sigmaKin() {
904 // Pick new flavour. Allow three leptons and five quarks.
905 double colQ = 1. + (alpS / M_PI);
906 double flavWt = 3. + colQ * 11. / 3.;
907 double flavRndm = Rndm::flat() * flavWt;
909 if (flavRndm < 1.) idNew = 11;
910 else if (flavRndm < 2.) idNew = 13;
913 flavRndm = 3. * (flavWt - 3.) / colQ;
914 if (flavRndm < 4.) idNew = 2;
915 else if (flavRndm < 8.) idNew = 4;
916 else if (flavRndm < 9.) idNew = 1;
917 else if (flavRndm < 10.) idNew = 3;
920 double mNew = ParticleDataTable::m0(idNew);
921 double m2New = mNew*mNew;
923 // Calculate kinematics dependence. Give correct mass factors for
924 // tHat, uHat defined as if massless kinematics, d(sigma)/d(Omega)
925 // = beta (1 + cos^2(theta) + (1 - beta^2) sin^2(theta)).
926 // Special case related to phase space form in multiple interactions.
928 if (sH > 4. * m2New) {
929 double beta = sqrt(1. - 4. * m2New / sH);
930 sigS = beta * (2.* (tH2 + uH2) + 4. * (1. - beta * beta) * tH * uH)
934 // Answer is proportional to number of outgoing flavours.
935 sigma0 = (M_PI/sH2) * pow2(alpEM) * sigS * flavWt;
941 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
943 double Sigma2ffbar2ffbarsgm::sigmaHat() {
945 // Charge and colour factors.
946 double eNow = CoupEW::ef( abs(id1) );
947 double sigma = sigma0 * pow2(eNow);
948 if (abs(id1) < 9) sigma /= 3.;
957 // Select identity, colour and anticolour.
959 void Sigma2ffbar2ffbarsgm::setIdColAcol() {
961 // Set outgoing flavours.
962 id3 = (id1 > 0) ? idNew : -idNew;
963 setId( id1, id2, id3, -id3);
965 // Colour flow topologies. Swap when antiquarks.
966 if (abs(id1) < 9 && idNew < 9) setColAcol( 1, 0, 0, 1, 2, 0, 0, 2);
967 else if (abs(id1) < 9) setColAcol( 1, 0, 0, 1, 0, 0, 0, 0);
968 else if (idNew < 9) setColAcol( 0, 0, 0, 0, 1, 0, 0, 1);
969 else setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
970 if (id1 < 0) swapColAcol();
974 //**************************************************************************
976 // Sigma2ffbar2FFbarsgmZ class.
977 // Cross section f fbar -> gamma*/Z0 -> F Fbar.
981 // Initialize process.
983 void Sigma2ffbar2FFbarsgmZ::initProc() {
986 nameSave = "f fbar -> F Fbar (s-channel gamma*/Z0)";
987 if (idNew == 4) nameSave = "f fbar -> c cbar (s-channel gamma*/Z0)";
988 if (idNew == 5) nameSave = "f fbar -> b bbar (s-channel gamma*/Z0)";
989 if (idNew == 6) nameSave = "f fbar -> t tbar (s-channel gamma*/Z0)";
990 if (idNew == 7) nameSave = "f fbar -> b' b'bar (s-channel gamma*/Z0)";
991 if (idNew == 8) nameSave = "f fbar -> t' t'bar (s-channel gamma*/Z0)";
992 if (idNew == 15) nameSave = "f fbar -> tau+ tau- (s-channel gamma*/Z0)";
993 if (idNew == 17) nameSave = "f fbar -> tau'+ tau'- (s-channel gamma*/Z0)";
995 nameSave = "f fbar -> nu'_tau nu'bar_tau (s-channel gamma*/Z0)";
997 // Allow to pick only gamma* or Z0 part of full gamma*/Z0 expression.
998 gmZmode = Settings::mode("WeakZ0:gmZmode");
1000 // Store Z0 mass and width for propagator.
1001 mRes = ParticleDataTable::m0(23);
1002 GammaRes = ParticleDataTable::mWidth(23);
1004 GamMRat = GammaRes / mRes;
1005 thetaWRat = 1. / (16. * CoupEW::sin2thetaW() * CoupEW::cos2thetaW());
1007 // Store couplings of F.
1008 ef = CoupEW::ef(idNew);
1009 vf = CoupEW::vf(idNew);
1010 af = CoupEW::af(idNew);
1012 // Secondary open width fraction, relevant for top (or heavier).
1013 openFracPair = ParticleDataTable::resOpenFrac(idNew, -idNew);
1019 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
1021 void Sigma2ffbar2FFbarsgmZ::sigmaKin() {
1023 // Check that above threshold.
1025 if (mH < m3 + m4 + MASSMARGIN) {
1030 // Define average F, Fbar mass so same beta. Phase space.
1031 double s34Avg = 0.5 * (s3 + s4) - 0.25 * pow2(s3 - s4) / sH;
1033 betaf = sqrtpos(1. - 4. * mr);
1035 // Final-state colour factor.
1036 double colF = (idNew < 9) ? 3. * (1. + alpS / M_PI) : 1.;
1038 // Reconstruct decay angle so can reuse 2 -> 1 cross section.
1039 cosThe = (tH - uH) / (betaf * sH);
1041 // Calculate prefactors for gamma/interference/Z0 cross section terms.
1042 gamProp = colF * M_PI * pow2(alpEM) / sH2;
1043 intProp = gamProp * 2. * thetaWRat * sH * (sH - m2Res)
1044 / ( pow2(sH - m2Res) + pow2(sH * GamMRat) );
1045 resProp = gamProp * pow2(thetaWRat * sH)
1046 / ( pow2(sH - m2Res) + pow2(sH * GamMRat) );
1048 // Optionally only keep gamma* or Z0 term.
1049 if (gmZmode == 1) {intProp = 0.; resProp = 0.;}
1050 if (gmZmode == 2) {gamProp = 0.; intProp = 0.;}
1056 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
1058 double Sigma2ffbar2FFbarsgmZ::sigmaHat() {
1060 // Fail if below threshold.
1061 if (!isPhysical) return 0.;
1063 // Couplings for in-flavours.
1064 int idAbs = abs(id1);
1065 double ei = CoupEW::ef(idAbs);
1066 double vi = CoupEW::vf(idAbs);
1067 double ai = CoupEW::af(idAbs);
1069 // Coefficients of angular expression.
1070 double coefTran = ei*ei * gamProp * ef*ef + ei * vi * intProp * ef * vf
1071 + (vi*vi + ai*ai) * resProp * (vf*vf + pow2(betaf) * af*af);
1072 double coefLong = 4. * mr * ( ei*ei * gamProp * ef*ef
1073 + ei * vi * intProp * ef * vf + (vi*vi + ai*ai) * resProp * vf*vf );
1074 double coefAsym = betaf * ( ei * ai * intProp * ef * af
1075 + 4. * vi * ai * resProp * vf * af );
1077 // Combine gamma, interference and Z0 parts.
1078 double sigma = coefTran * (1. + pow2(cosThe))
1079 + coefLong * (1. - pow2(cosThe)) + 2. * coefAsym * cosThe;
1081 // Top: corrections for closed decay channels.
1082 sigma *= openFracPair;
1084 // Initial-state colour factor. Answer.
1085 if (idAbs < 9) sigma /= 3.;
1092 // Select identity, colour and anticolour.
1094 void Sigma2ffbar2FFbarsgmZ::setIdColAcol() {
1096 // Set outgoing flavours.
1097 id3 = (id1 > 0) ? idNew : -idNew;
1098 setId( id1, id2, id3, -id3);
1100 // Colour flow topologies. Swap when antiquarks.
1101 if (abs(id1) < 9 && idNew < 9) setColAcol( 1, 0, 0, 1, 2, 0, 0, 2);
1102 else if (abs(id1) < 9) setColAcol( 1, 0, 0, 1, 0, 0, 0, 0);
1103 else if (idNew < 9) setColAcol( 0, 0, 0, 0, 1, 0, 0, 1);
1104 else setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
1105 if (id1 < 0) swapColAcol();
1111 // Evaluate weight for decay angles of W in top decay.
1113 double Sigma2ffbar2FFbarsgmZ::weightDecay( Event& process, int iResBeg,
1116 // For top decay hand over to standard routine, else done.
1117 if (idNew == 6 && process[process[iResBeg].mother1()].idAbs() == 6)
1118 return weightTopDecay( process, iResBeg, iResEnd);
1123 //**************************************************************************
1125 // Sigma2ffbar2FfbarsW class.
1126 // Cross section f fbar' -> W+- -> F fbar".
1130 // Initialize process.
1132 void Sigma2ffbar2FfbarsW::initProc() {
1135 nameSave = "f fbar -> F fbar (s-channel W+-)";
1136 if (idNew == 4) nameSave = "f fbar -> c qbar (s-channel W+-)";
1137 if (idNew == 5) nameSave = "f fbar -> b qbar (s-channel W+-)";
1138 if (idNew == 6) nameSave = "f fbar -> t qbar (s-channel W+-)";
1139 if (idNew == 7) nameSave = "f fbar -> b' qbar (s-channel W+-)";
1140 if (idNew == 8) nameSave = "f fbar -> t' qbar (s-channel W+-)";
1141 if (idNew == 7 && idNew2 == 6)
1142 nameSave = "f fbar -> b' tbar (s-channel W+-)";
1143 if (idNew == 8 && idNew2 == 7)
1144 nameSave = "f fbar -> t' b'bar (s-channel W+-)";
1145 if (idNew == 15 || idNew == 16)
1146 nameSave = "f fbar -> tau nu_taubar (s-channel W+-)";
1147 if (idNew == 17 || idNew == 18)
1148 nameSave = "f fbar -> tau' nu'_taubar (s-channel W+-)";
1150 // Store W+- mass and width for propagator.
1151 mRes = ParticleDataTable::m0(24);
1152 GammaRes = ParticleDataTable::mWidth(24);
1154 GamMRat = GammaRes / mRes;
1155 thetaWRat = 1. / (12. * CoupEW::sin2thetaW());
1157 // For t/t' want to use at least b mass.
1159 if ( (idNew == 6 || idNew == 8) && idNew2 == 0 ) idPartner = 5;
1161 // Sum of CKM weights for quarks.
1162 V2New = (idNew < 9) ? VCKM::V2sum(idNew) : 1.;
1163 if (idNew2 != 0) V2New = VCKM::V2id(idNew, idNew2);
1165 // Secondary open width fractions, relevant for top or heavier.
1166 openFracPos = ParticleDataTable::resOpenFrac( idNew, -idNew2);
1167 openFracNeg = ParticleDataTable::resOpenFrac(-idNew, idNew2);
1173 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
1175 void Sigma2ffbar2FfbarsW::sigmaKin() {
1177 // Check that above threshold.
1179 if (mH < m3 + m4 + MASSMARGIN) {
1184 // Phase space factors.
1185 double mr1 = s3 / sH;
1186 double mr2 = s4 / sH;
1187 double betaf = sqrtpos( pow2(1. - mr1 - mr2) - 4. * mr1 * mr2);
1189 // Reconstruct decay angle so can reuse 2 -> 1 cross section.
1190 double cosThe = (tH - uH) / (betaf * sH);
1192 // Set up Breit-Wigner and in- and out-widths.
1193 double sigBW = 9. * M_PI * pow2(alpEM * thetaWRat)
1194 / ( pow2(sH - m2Res) + pow2(sH * GamMRat) );
1196 // Initial-state colour factor.
1197 double colF = (idNew < 9) ? 3. * (1. + alpS / M_PI) * V2New : 1.;
1199 // Angular dependence.
1200 double wt = pow2(1. + betaf * cosThe) - pow2(mr1 - mr2);
1202 // Temporary answer.
1203 sigma0 = sigBW * colF * wt;
1209 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
1211 double Sigma2ffbar2FfbarsW::sigmaHat() {
1213 // Fail if below threshold.
1214 if (!isPhysical) return 0.;
1216 // CKM and colour factors.
1217 double sigma = sigma0;
1218 if (abs(id1) < 9) sigma *= VCKM::V2id(abs(id1), abs(id2)) / 3.;
1220 // Correction for secondary width in top (or heavier) decay.
1221 int idSame = ((abs(id1) + idNew)%2 == 0) ? id1 : id2;
1222 sigma *= (idSame > 0) ? openFracPos : openFracNeg;
1231 // Select identity, colour and anticolour.
1233 void Sigma2ffbar2FfbarsW::setIdColAcol() {
1235 // Set outgoing flavours.
1237 id4 = (idNew2 != 0) ? idNew2 : VCKM::V2pick(idNew);
1239 int idInUp = (abs(id1)%2 == 0) ? id1 : id2;
1240 if (idInUp > 0) id4 = -id4;
1243 int idInDn = (abs(id1)%2 == 1) ? id1 : id2;
1244 if (idInDn > 0) id4 = -id4;
1247 setId( id1, id2, id3, id4);
1249 // Swap tHat and uHat for fbar' f -> F f".
1250 if (id1 * id3 < 0) swapTU = true;
1252 // Colour flow topologies. Swap when antiquarks.
1253 if (abs(id1) < 9 && idNew < 9) setColAcol( 1, 0, 0, 1, 2, 0, 0, 2);
1254 else if (abs(id1) < 9) setColAcol( 1, 0, 0, 1, 0, 0, 0, 0);
1255 else if (idNew < 9) setColAcol( 0, 0, 0, 0, 1, 0, 0, 1);
1256 else setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
1257 if (id1 < 0) swapCol12();
1258 if (id3 < 0) swapCol34();
1264 // Evaluate weight for decay angles of W in top decay.
1266 double Sigma2ffbar2FfbarsW::weightDecay( Event& process, int iResBeg,
1269 // For top decay hand over to standard routine, else done.
1270 if (idNew == 6 && process[process[iResBeg].mother1()].idAbs() == 6)
1271 return weightTopDecay( process, iResBeg, iResEnd);
1276 //**************************************************************************
1278 // Sigma2ffbargmZWgmZW class.
1279 // Collects common methods for f fbar -> gamma*/Z0/W+- gamma*/Z0/W-+.
1283 // Calculate and store internal products.
1285 void Sigma2ffbargmZWgmZW::setupProd( Event& process, int i1, int i2,
1286 int i3, int i4, int i5, int i6) {
1288 // Store incoming and outgoing momenta,
1289 pRot[1] = process[i1].p();
1290 pRot[2] = process[i2].p();
1291 pRot[3] = process[i3].p();
1292 pRot[4] = process[i4].p();
1293 pRot[5] = process[i5].p();
1294 pRot[6] = process[i6].p();
1296 // Do random rotation to avoid accidental zeroes in HA expressions.
1297 bool smallPT = false;
1300 double thetaNow = acos(2. * Rndm::flat() - 1.);
1301 double phiNow = 2. * M_PI * Rndm::flat();
1302 for (int i = 1; i <= 6; ++i) {
1303 pRot[i].rot( thetaNow, phiNow);
1304 if (pRot[i].pT2() < 1e-4 * pRot[i].pAbs2()) smallPT = true;
1308 // Calculate internal products.
1309 for (int i = 1; i < 6; ++i) {
1310 for (int j = i + 1; j <= 6; ++j) {
1312 sqrt( (pRot[i].e() - pRot[i].pz()) * (pRot[j].e() + pRot[j].pz())
1313 / pRot[i].pT2() ) * complex( pRot[i].px(), pRot[i].py() )
1314 - sqrt( (pRot[i].e() + pRot[i].pz()) * (pRot[j].e() - pRot[j].pz())
1315 / pRot[j].pT2() ) * complex( pRot[j].px(), pRot[j].py() );
1316 hC[i][j] = conj( hA[i][j] );
1318 hA[i][j] *= complex( 0., 1.);
1319 hC[i][j] *= complex( 0., 1.);
1321 hA[j][i] = - hA[i][j];
1322 hC[j][i] = - hC[i][j];
1330 // Evaluate the F function of Gunion and Kunszt.
1332 complex Sigma2ffbargmZWgmZW::fGK(int j1, int j2, int j3, int j4, int j5,
1335 return 4. * hA[j1][j3] * hC[j2][j6]
1336 * ( hA[j1][j5] * hC[j1][j4] + hA[j3][j5] * hC[j3][j4] );
1342 // Evaluate the Xi function of Gunion and Kunszt.
1344 double Sigma2ffbargmZWgmZW::xiGK( double tHnow, double uHnow) {
1346 return - 4. * s3 * s4 + tHnow * (3. * tHnow + 4. * uHnow)
1347 + tHnow * tHnow * ( tHnow * uHnow / (s3 * s4)
1348 - 2. * (1. / s3 + 1./s4) * (tHnow + uHnow)
1349 + 2. * (s3 / s4 + s4 / s3) );
1355 // Evaluate the Xj function of Gunion and Kunszt.
1357 double Sigma2ffbargmZWgmZW::xjGK( double tHnow, double uHnow) {
1359 return 8. * pow2(s3 + s4) - 8. * (s3 + s4) * (tHnow + uHnow)
1360 - 6. * tHnow * uHnow - 2. * tHnow * uHnow * ( tHnow * uHnow
1361 / (s3 * s4) - 2. * (1. / s3 + 1. / s4) * (tHnow + uHnow)
1362 + 2. * (s3 / s4 + s4 / s3) );
1366 //**************************************************************************
1368 // Sigma2ffbar2gmZgmZ class.
1369 // Cross section for f fbar -> gamma*/Z0 gamma*/Z0 (f is quark or lepton).
1373 // Initialize process.
1375 void Sigma2ffbar2gmZgmZ::initProc() {
1377 // Allow to pick only gamma* or Z0 part of full gamma*/Z0 expression.
1378 gmZmode = Settings::mode("WeakZ0:gmZmode");
1380 // Store Z0 mass and width for propagator.
1381 mRes = ParticleDataTable::m0(23);
1382 GammaRes = ParticleDataTable::mWidth(23);
1384 GamMRat = GammaRes / mRes;
1385 thetaWRat = 1. / (16. * CoupEW::sin2thetaW() * CoupEW::cos2thetaW());
1387 // Set pointer to particle properties and decay table.
1388 particlePtr = ParticleDataTable::particleDataPtr(23);
1394 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
1396 void Sigma2ffbar2gmZgmZ::sigmaKin() {
1398 // Cross section part common for all incoming flavours.
1399 sigma0 = (M_PI / sH2) * pow2(alpEM) * 0.5
1400 * ( (tH2 + uH2 + 2. * (s3 + s4) * sH) / (tH * uH)
1401 - s3 * s4 * (1./tH2 + 1./uH2) );
1403 // Common coupling factors at the resonance masses
1404 double alpEM3 = alphaEMPtr->alphaEM(s3);
1405 double alpS3 = alphaSPtr->alphaS(s3);
1406 double colQ3 = 3. * (1. + alpS3 / M_PI);
1407 double alpEM4 = alphaEMPtr->alphaEM(s4);
1408 double alpS4 = alphaSPtr->alphaS(s4);
1409 double colQ4 = 3. * (1. + alpS4 / M_PI);
1411 // Reset quantities to sum. Declare variables in loop.
1419 double mf, mr, psvec, psaxi, betaf, ef2, efvf, vf2af2, colf;
1421 // Loop over all Z0 decay channels.
1422 for (int i = 0; i < particlePtr->decay.size(); ++i) {
1423 int idAbs = abs( particlePtr->decay[i].product(0) );
1425 // Only contributions from three fermion generations, except top.
1426 if ( (idAbs > 0 && idAbs < 6) || ( idAbs > 10 && idAbs < 17)) {
1427 mf = ParticleDataTable::m0(idAbs);
1428 onMode = particlePtr->decay[i].onMode();
1430 // First Z0: check that above threshold. Phase space.
1431 if (m3 > 2. * mf + MASSMARGIN) {
1433 betaf = sqrtpos(1. - 4. * mr);
1434 psvec = betaf * (1. + 2. * mr);
1435 psaxi = pow3(betaf);
1437 // First Z0: combine phase space with couplings.
1438 ef2 = CoupEW::ef2(idAbs) * psvec;
1439 efvf = CoupEW::efvf(idAbs) * psvec;
1440 vf2af2 = CoupEW::vf2(idAbs) * psvec + CoupEW::af2(idAbs) * psaxi;
1441 colf = (idAbs < 6) ? colQ3 : 1.;
1443 // First Z0: store sum of combinations for open outstate channels.
1444 if (onMode == 1 || onMode == 2) {
1445 gamSum3 += colf * ef2;
1446 intSum3 += colf * efvf;
1447 resSum3 += colf * vf2af2;
1451 // Second Z0: check that above threshold. Phase space.
1452 if (m4 > 2. * mf + MASSMARGIN) {
1454 betaf = sqrtpos(1. - 4. * mr);
1455 psvec = betaf * (1. + 2. * mr);
1456 psaxi = pow3(betaf);
1458 // Second Z0: combine phase space with couplings.
1459 ef2 = CoupEW::ef2(idAbs) * psvec;
1460 efvf = CoupEW::efvf(idAbs) * psvec;
1461 vf2af2 = CoupEW::vf2(idAbs) * psvec + CoupEW::af2(idAbs) * psaxi;
1462 colf = (idAbs < 6) ? colQ4 : 1.;
1464 // Second Z0: store sum of combinations for open outstate channels.
1465 if (onMode == 1 || onMode == 2) {
1466 gamSum4 += colf * ef2;
1467 intSum4 += colf * efvf;
1468 resSum4 += colf * vf2af2;
1472 // End loop over fermions.
1476 // First Z0: calculate prefactors for gamma/interference/Z0 terms.
1477 gamProp3 = 4. * alpEM3 / (3. * M_PI * s3);
1478 intProp3 = gamProp3 * 2. * thetaWRat * s3 * (s3 - m2Res)
1479 / ( pow2(s3 - m2Res) + pow2(s3 * GamMRat) );
1480 resProp3 = gamProp3 * pow2(thetaWRat * s3)
1481 / ( pow2(s3 - m2Res) + pow2(s3 * GamMRat) );
1483 // First Z0: optionally only keep gamma* or Z0 term.
1484 if (gmZmode == 1) {intProp3 = 0.; resProp3 = 0.;}
1485 if (gmZmode == 2) {gamProp3 = 0.; intProp3 = 0.;}
1487 // Second Z0: calculate prefactors for gamma/interference/Z0 terms.
1488 gamProp4 = 4. * alpEM4 / (3. * M_PI * s4);
1489 intProp4 = gamProp4 * 2. * thetaWRat * s4 * (s4 - m2Res)
1490 / ( pow2(s4 - m2Res) + pow2(s4 * GamMRat) );
1491 resProp4 = gamProp4 * pow2(thetaWRat * s4)
1492 / ( pow2(s4 - m2Res) + pow2(s4 * GamMRat) );
1494 // Second Z0: optionally only keep gamma* or Z0 term.
1495 if (gmZmode == 1) {intProp4 = 0.; resProp4 = 0.;}
1496 if (gmZmode == 2) {gamProp4 = 0.; intProp4 = 0.;}
1502 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
1504 double Sigma2ffbar2gmZgmZ::sigmaHat() {
1506 // Charge/2, left- and righthanded couplings for in-fermion.
1507 int idAbs = abs(id1);
1508 double ei = 0.5 * CoupEW::ef(idAbs);
1509 double li = CoupEW::lf(idAbs);
1510 double ri = CoupEW::rf(idAbs);
1512 // Combine left/right gamma, interference and Z0 parts for each Z0.
1513 double left3 = ei * ei * gamProp3 * gamSum3
1514 + ei * li * intProp3 * intSum3
1515 + li * li * resProp3 * resSum3;
1516 double right3 = ei * ei * gamProp3 * gamSum3
1517 + ei * ri * intProp3 * intSum3
1518 + ri * ri * resProp3 * resSum3;
1519 double left4 = ei * ei * gamProp4 * gamSum4
1520 + ei * li * intProp4 * intSum4
1521 + li * li * resProp4 * resSum4;
1522 double right4 = ei * ei * gamProp4 * gamSum4
1523 + ei * ri * intProp4 * intSum4
1524 + ri * ri * resProp4 * resSum4;
1526 // Combine left- and right-handed couplings for the two Z0's.
1527 double sigma = sigma0 * (left3 * left4 + right3 * right4);
1529 // Correct for the running-width Z0 propagators weight in PhaseSpace.
1530 sigma /= (runBW3 * runBW4);
1532 // Initial-state colour factor. Answer.
1533 if (idAbs < 9) sigma /= 3.;
1540 // Select identity, colour and anticolour.
1542 void Sigma2ffbar2gmZgmZ::setIdColAcol() {
1544 // Flavours trivial.
1545 setId( id1, id2, 23, 23);
1547 // Colour flow topologies. Swap when antiquarks.
1548 if (abs(id1) < 9) setColAcol( 1, 0, 0, 1, 0, 0, 0, 0);
1549 else setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
1550 if (id1 < 0) swapColAcol();
1556 // Evaluate correlated decay flavours of the two gamma*/Z0.
1557 // Unique complication, caused by gamma*/Z0 mix different left/right.
1559 double Sigma2ffbar2gmZgmZ::weightDecayFlav( Event& process) {
1561 // Order so that fbar(1) f(2) -> f'(3) fbar'(4) f"(5) fbar"(6).
1562 i1 = (process[3].id() < 0) ? 3 : 4;
1564 i3 = (process[7].id() > 0) ? 7 : 8;
1566 i5 = (process[9].id() > 0) ? 9 : 10;
1569 // Charge/2, left- and righthanded couplings for in- and out-fermions.
1570 int idAbs = process[i1].idAbs();
1571 double ei = 0.5 * CoupEW::ef(idAbs);
1572 double li = CoupEW::lf(idAbs);
1573 double ri = CoupEW::rf(idAbs);
1574 idAbs = process[i3].idAbs();
1575 double e3 = 0.5 * CoupEW::ef(idAbs);
1576 double l3 = CoupEW::lf(idAbs);
1577 double r3 = CoupEW::rf(idAbs);
1578 idAbs = process[i5].idAbs();
1579 double e4 = 0.5 * CoupEW::ef(idAbs);
1580 double l4 = CoupEW::lf(idAbs);
1581 double r4 = CoupEW::rf(idAbs);
1583 // Left- and righthanded couplings combined with propagators.
1584 c3LL = ei * ei * gamProp3 * e3 * e3
1585 + ei * li * intProp3 * e3 * l3
1586 + li * li * resProp3 * l3 * l3;
1587 c3LR = ei * ei * gamProp3 * e3 * e3
1588 + ei * li * intProp3 * e3 * r3
1589 + li * li * resProp3 * r3 * r3;
1590 c3RL = ei * ei * gamProp3 * e3 * e3
1591 + ei * ri * intProp3 * e3 * l3
1592 + ri * ri * resProp3 * l3 * l3;
1593 c3RR = ei * ei * gamProp3 * e3 * e3
1594 + ei * ri * intProp3 * e3 * r3
1595 + ri * ri * resProp3 * r3 * r3;
1596 c4LL = ei * ei * gamProp4 * e4 * e4
1597 + ei * li * intProp4 * e4 * l4
1598 + li * li * resProp4 * l4 * l4;
1599 c4LR = ei * ei * gamProp4 * e4 * e4
1600 + ei * li * intProp4 * e4 * r4
1601 + li * li * resProp4 * r4 * r4;
1602 c4RL = ei * ei * gamProp4 * e4 * e4
1603 + ei * ri * intProp4 * e4 * l4
1604 + ri * ri * resProp4 * l4 * l4;
1605 c4RR = ei * ei * gamProp4 * e4 * e4
1606 + ei * ri * intProp4 * e4 * r4
1607 + ri * ri * resProp4 * r4 * r4;
1609 // Flavour weight and maximum.
1610 flavWt = (c3LL + c3LR) * (c4LL + c4LR) + (c3RL + c3RR) * (c4RL + c4RR);
1611 double flavWtMax = (c3LL + c3LR + c3RL + c3RR) * (c4LL + c4LR + c4RL + c4RR);
1614 return flavWt / flavWtMax;
1620 // Evaluate weight for decay angles of the two gamma*/Z0.
1622 double Sigma2ffbar2gmZgmZ::weightDecay( Event& process, int iResBeg,
1625 // Two resonance decays, but with common weight.
1626 if (iResBeg != 5 || iResEnd != 6) return 1.;
1628 // Set up four-products and internal products.
1629 setupProd( process, i1, i2, i3, i4, i5, i6);
1631 // Flip tHat and uHat if first incoming is fermion.
1634 if (process[3].id() > 0) swap( tHres, uHres);
1636 // Kinematics factors (norm(x) = |x|^2).
1637 double fGK135 = norm( fGK( 1, 2, 3, 4, 5, 6) / tHres
1638 + fGK( 1, 2, 5, 6, 3, 4) / uHres );
1639 double fGK145 = norm( fGK( 1, 2, 4, 3, 5, 6) / tHres
1640 + fGK( 1, 2, 5, 6, 4, 3) / uHres );
1641 double fGK136 = norm( fGK( 1, 2, 3, 4, 6, 5) / tHres
1642 + fGK( 1, 2, 6, 5, 3, 4) / uHres );
1643 double fGK146 = norm( fGK( 1, 2, 4, 3, 6, 5) / tHres
1644 + fGK( 1, 2, 6, 5, 4, 3) / uHres );
1645 double fGK253 = norm( fGK( 2, 1, 5, 6, 3, 4) / tHres
1646 + fGK( 2, 1, 3, 4, 5, 6) / uHres );
1647 double fGK263 = norm( fGK( 2, 1, 6, 5, 3, 4) / tHres
1648 + fGK( 2, 1, 3, 4, 6, 5) / uHres );
1649 double fGK254 = norm( fGK( 2, 1, 5, 6, 4, 3) / tHres
1650 + fGK( 2, 1, 4, 3, 5, 6) / uHres );
1651 double fGK264 = norm( fGK( 2, 1, 6, 5, 4, 3) / tHres
1652 + fGK( 2, 1, 4, 3, 6, 5) / uHres );
1654 // Weight and maximum.
1655 double wt = c3LL * c4LL * fGK135 + c3LR * c4LL * fGK145
1656 + c3LL * c4LR * fGK136 + c3LR * c4LR * fGK146
1657 + c3RL * c4RL * fGK253 + c3RR * c4RL * fGK263
1658 + c3RL * c4RR * fGK254 + c3RR * c4RR * fGK264;
1659 double wtMax = 16. * s3 * s4 * flavWt
1660 * ( (tHres*tHres + uHres*uHres + 2. * sH * (s3 + s4)) / (tHres * uHres)
1661 - s3 * s4 * (1. / (tHres*tHres) + 1. / (uHres*uHres)) );
1668 //**************************************************************************
1670 // Sigma2ffbar2ZW class.
1671 // Cross section for f fbar' -> W+ W- (f is quark or lepton).
1675 // Initialize process.
1677 void Sigma2ffbar2ZW::initProc() {
1679 // Store W+- mass and width for propagator.
1680 mW = ParticleDataTable::m0(24);
1681 widW = ParticleDataTable::mWidth(24);
1683 mwWS = pow2(mW * widW);
1685 // Left-handed couplings for up/nu- and down/e-type quarks.
1686 lun = (hasLeptonBeams) ? CoupEW::lf(12) : CoupEW::lf(2);
1687 lde = (hasLeptonBeams) ? CoupEW::lf(11) : CoupEW::lf(1);
1689 // Common weak coupling factor.
1690 sin2thetaW = CoupEW::sin2thetaW();
1691 cos2thetaW = CoupEW::cos2thetaW();
1692 thetaWRat = 1. / (4. * cos2thetaW);
1693 thetaWpt = (9. - 8. * sin2thetaW) / 4.;
1694 thetaWmm = (8. * sin2thetaW - 6.) / 4.;
1696 // Secondary open width fractions.
1697 openFracPos = ParticleDataTable::resOpenFrac(23, 24);
1698 openFracNeg = ParticleDataTable::resOpenFrac(23, -24);
1704 // Evaluate sigmaHat(sHat), part independent of incoming flavour.
1706 void Sigma2ffbar2ZW::sigmaKin() {
1708 // Evaluate cross section.
1709 double resBW = 1. / (pow2(sH - mWS) + mwWS);
1710 sigma0 = (M_PI / sH2) * 0.5 * pow2(alpEM / sin2thetaW);
1711 sigma0 *= sH * resBW * (thetaWpt * pT2 + thetaWmm * (s3 + s4))
1712 + (sH - mWS) * resBW * sH * (pT2 - s3 - s4) * (lun / tH - lde / uH)
1713 + thetaWRat * sH * pT2 * ( lun*lun / tH2 + lde*lde / uH2 )
1714 + 2. * thetaWRat * sH * (s3 + s4) * lun * lde / (tH * uH);
1716 // Protect against slightly negative cross sections,
1717 // probably caused by addition of width to the W propagator.
1718 sigma0 = max(0., sigma0);
1724 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
1726 double Sigma2ffbar2ZW::sigmaHat() {
1728 // CKM and colour factors.
1729 double sigma = sigma0;
1730 if (abs(id1) < 9) sigma *= VCKM::V2id(abs(id1), abs(id2)) / 3.;
1732 // Corrections for secondary widths in Z0 and W+- decays.
1733 int idUp = (abs(id1)%2 == 0) ? id1 : id2;
1734 sigma *= (idUp > 0) ? openFracPos : openFracNeg;
1743 // Select identity, colour and anticolour.
1745 void Sigma2ffbar2ZW::setIdColAcol() {
1747 // Sign of outgoing W.
1748 int sign = 1 - 2 * (abs(id1)%2);
1749 if (id1 < 0) sign = -sign;
1750 setId( id1, id2, 23, 24 * sign);
1752 // tHat is defined between (f, W-) or (fbar, W+),
1753 // so OK for u/ubar on side 1, but must swap tHat <-> uHat if d/dbar.
1754 if (abs(id1)%2 == 1) swapTU = true;
1756 // Colour flow topologies. Swap when antiquarks.
1757 if (abs(id1) < 9) setColAcol( 1, 0, 0, 1, 0, 0, 0, 0);
1758 else setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
1759 if (id1 < 0) swapColAcol();
1765 // Evaluate weight for Z0 and W+- decay angles.
1767 double Sigma2ffbar2ZW::weightDecay( Event& process, int iResBeg, int iResEnd) {
1769 // Two resonance decays, but with common weight.
1770 if (iResBeg != 5 || iResEnd != 6) return 1.;
1772 // Order so that fbar(1) f(2) -> f'(3) fbar'(4) f"(5) fbar"(6)
1773 // with f' fbar' from W+- and f" fbar" from Z0 (note flip Z0 <-> W+-).
1774 int i1 = (process[3].id() < 0) ? 3 : 4;
1776 int i3 = (process[9].id() > 0) ? 9 : 10;
1778 int i5 = (process[7].id() > 0) ? 7 : 8;
1781 // Set up four-products and internal products.
1782 setupProd( process, i1, i2, i3, i4, i5, i6);
1784 // Swap tHat and uHat if incoming fermion is downtype.
1787 if (process[i2].id()%2 == 1) swap( tHres, uHres);
1789 // Couplings of incoming (anti)fermions and outgoing from Z0.
1790 int idAbs = process[i1].idAbs();
1791 double ai = CoupEW::af(idAbs);
1792 double li1 = CoupEW::lf(idAbs);
1793 idAbs = process[i2].idAbs();
1794 double li2 = CoupEW::lf(idAbs);
1795 idAbs = process[i5].idAbs();
1796 double l4 = CoupEW::lf(idAbs);
1797 double r4 = CoupEW::rf(idAbs);
1799 // W propagator/interference factor.
1800 double Wint = cos2thetaW * (sH - mWS) / (pow2(sH - mWS) + mwWS);
1802 // Combinations of couplings and kinematics (norm(x) = |x|^2).
1803 double aWZ = li2 / tHres - 2. * Wint * ai;
1804 double bWZ = li1 / uHres + 2. * Wint * ai;
1805 double fGK135 = norm( aWZ * fGK( 1, 2, 3, 4, 5, 6)
1806 + bWZ * fGK( 1, 2, 5, 6, 3, 4) );
1807 double fGK136 = norm( aWZ * fGK( 1, 2, 3, 4, 6, 5)
1808 + bWZ * fGK( 1, 2, 6, 5, 3, 4) );
1809 double xiT = xiGK( tHres, uHres);
1810 double xiU = xiGK( uHres, tHres);
1811 double xjTU = xjGK( tHres, uHres);
1813 // Weight and maximum weight.
1814 double wt = l4*l4 * fGK135 + r4*r4 * fGK136;
1815 double wtMax = 4. * s3 * s4 * (l4*l4 + r4*r4)
1816 * (aWZ * aWZ * xiT + bWZ * bWZ * xiU + aWZ * bWZ * xjTU);
1823 //**************************************************************************
1825 // Sigma2ffbar2WW class.
1826 // Cross section for f fbar -> W- W+ (f is quark or lepton).
1830 // Initialize process.
1832 void Sigma2ffbar2WW::initProc() {
1834 // Store Z0 mass and width for propagator. Common coupling factor.
1835 mZ = ParticleDataTable::m0(23);
1836 widZ = ParticleDataTable::mWidth(23);
1838 mwZS = pow2(mZ * widZ);
1839 thetaWRat = 1. / (4. * CoupEW::sin2thetaW());
1841 // Secondary open width fraction.
1842 openFracPair = ParticleDataTable::resOpenFrac(24, -24);
1848 // Evaluate sigmaHat(sHat), part independent of incoming flavour.
1850 void Sigma2ffbar2WW::sigmaKin() {
1852 // Cross section part common for all incoming flavours.
1853 sigma0 = (M_PI / sH2) * pow2(alpEM);
1855 // Z0 propagator and gamma*/Z0 interference.
1856 double Zprop = sH2 / (pow2(sH - mZS) + mwZS);
1857 double Zint = Zprop * (1. - mZS / sH);
1859 // Common coupling factors (g = gamma*, Z = Z0, f = t-channel fermion).
1861 cgZ = thetaWRat * Zint;
1862 cZZ = 0.5 * pow2(thetaWRat) * Zprop;
1864 cfZ = pow2(thetaWRat) * Zint;
1865 cff = pow2(thetaWRat);
1867 // Kinematical functions.
1868 double rat34 = sH * (2. * (s3 + s4) + pT2) / (s3 * s4);
1869 double lambdaS = pow2(sH - s3 - s4) - 4. * s3 * s4;
1870 double intA = (sH - s3 - s4) * rat34 / sH;
1871 double intB = 4. * (s3 + s4 - pT2);
1872 gSS = (lambdaS * rat34 + 12. * sH * pT2) / sH2;
1873 gTT = rat34 + 4. * sH * pT2 / tH2;
1874 gST = intA + intB / tH;
1875 gUU = rat34 + 4. * sH * pT2 / uH2;
1876 gSU = intA + intB / uH;
1882 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
1884 double Sigma2ffbar2WW::sigmaHat() {
1886 // Flavour-specific couplings.
1887 int idAbs = abs(id1);
1888 double ei = CoupEW::ef(idAbs);
1889 double vi = CoupEW::vf(idAbs);
1890 double ai = CoupEW::af(idAbs);
1892 // Combine, with different cases for up- and down-type in-flavours.
1893 double sigma = sigma0;
1894 sigma *= (idAbs%2 == 1)
1895 ? (cgg * ei*ei + cgZ * ei * vi + cZZ * (vi*vi + ai*ai)) * gSS
1896 + (cfg * ei + cfZ * (vi + ai)) * gST + cff * gTT
1897 : (cgg * ei*ei + cgZ * ei * vi + cZZ * (vi*vi + ai*ai)) * gSS
1898 - (cfg * ei + cfZ * (vi + ai)) * gSU + cff * gUU;
1900 // Initial-state colour factor. Correction for secondary widths. Answer.
1901 if (idAbs < 9) sigma /= 3.;
1902 sigma *= openFracPair;
1909 // Select identity, colour and anticolour.
1911 void Sigma2ffbar2WW::setIdColAcol() {
1913 // Always order W- W+, i.e. W- first.
1914 setId( id1, id2, -24, 24);
1916 // tHat is defined between (f, W-) or (fbar, W+),
1917 if (id1 < 0) swapTU = true;
1919 // Colour flow topologies. Swap when antiquarks.
1920 if (abs(id1) < 9) setColAcol( 1, 0, 0, 1, 0, 0, 0, 0);
1921 else setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
1922 if (id1 < 0) swapColAcol();
1928 // Evaluate weight for W+ and W- decay angles.
1930 double Sigma2ffbar2WW::weightDecay( Event& process, int iResBeg, int iResEnd) {
1932 // Two resonance decays, but with common weight.
1933 if (iResBeg != 5 || iResEnd != 6) return 1.;
1935 // Order so that fbar(1) f(2) -> f'(3) fbar'(4) f"(5) fbar"(6).
1936 // with f' fbar' from W- and f" fbar" from W+.
1937 int i1 = (process[3].id() < 0) ? 3 : 4;
1939 int i3 = (process[7].id() > 0) ? 7 : 8;
1941 int i5 = (process[9].id() > 0) ? 9 : 10;
1944 // Set up four-products and internal products.
1945 setupProd( process, i1, i2, i3, i4, i5, i6);
1947 // tHat and uHat of fbar f -> W- W+ opposite to previous convention.
1951 // Couplings of incoming (anti)fermion.
1952 int idAbs = process[i1].idAbs();
1953 double ai = CoupEW::af(idAbs);
1954 double li = CoupEW::lf(idAbs);
1955 double ri = CoupEW::rf(idAbs);
1957 // gamma*/Z0 propagator/interference factor.
1958 double Zint = mZS * (sH - mZS) / (pow2(sH - mZS) + mwZS);
1960 // Combinations of couplings and kinematics (norm(x) = |x|^2).
1961 double dWW = (li * Zint + ai) / sH;
1962 double aWW = dWW + 0.5 * (ai + 1.) / tHres;
1963 double bWW = dWW + 0.5 * (ai - 1.) / uHres;
1964 double cWW = ri * Zint / sH;
1965 double fGK135 = norm( aWW * fGK( 1, 2, 3, 4, 5, 6)
1966 - bWW * fGK( 1, 2, 5, 6, 3, 4) );
1967 double fGK253 = norm( cWW * ( fGK( 2, 1, 5, 6, 3, 4)
1968 - fGK( 2, 1, 3, 4, 5, 6) ) );
1969 double xiT = xiGK( tHres, uHres);
1970 double xiU = xiGK( uHres, tHres);
1971 double xjTU = xjGK( tHres, uHres);
1973 // Weight and maximum weight.
1974 double wt = fGK135 + fGK253;
1975 double wtMax = 4. * s3 * s4
1976 * ( aWW * aWW * xiT + bWW * bWW * xiU - aWW * bWW * xjTU
1977 + cWW * cWW * (xiT + xiU - xjTU) );
1983 //**************************************************************************
1985 // Sigma2ffbargmZggm class.
1986 // Collects common methods for f fbar -> gamma*/Z0 g/gamma and permutations.
1990 // Initialize process.
1992 void Sigma2ffbargmZggm::initProc() {
1994 // Allow to pick only gamma* or Z0 part of full gamma*/Z0 expression.
1995 gmZmode = Settings::mode("WeakZ0:gmZmode");
1997 // Store Z0 mass and width for propagator.
1998 mRes = ParticleDataTable::m0(23);
1999 GammaRes = ParticleDataTable::mWidth(23);
2001 GamMRat = GammaRes / mRes;
2002 thetaWRat = 1. / (16. * CoupEW::sin2thetaW() * CoupEW::cos2thetaW());
2004 // Set pointer to particle properties and decay table.
2005 particlePtr = ParticleDataTable::particleDataPtr(23);
2011 // Evaluate sum of flavour couplings times phase space.
2013 void Sigma2ffbargmZggm::flavSum() {
2015 // Coupling factors for Z0 subsystem.
2016 double alpSZ = alphaSPtr->alphaS(s3);
2017 double colQZ = 3. * (1. + alpSZ / M_PI);
2019 // Reset quantities to sum. Declare variables in loop.
2024 double mf, mr, psvec, psaxi, betaf, ef2, efvf, vf2af2, colf;
2026 // Loop over all Z0 decay channels.
2027 for (int i = 0; i < particlePtr->decay.size(); ++i) {
2028 int idAbs = abs( particlePtr->decay[i].product(0) );
2030 // Only contributions from three fermion generations, except top.
2031 if ( (idAbs > 0 && idAbs < 6) || ( idAbs > 10 && idAbs < 17)) {
2032 mf = ParticleDataTable::m0(idAbs);
2034 // Check that above threshold. Phase space.
2035 if (m3 > 2. * mf + MASSMARGIN) {
2037 betaf = sqrtpos(1. - 4. * mr);
2038 psvec = betaf * (1. + 2. * mr);
2039 psaxi = pow3(betaf);
2041 // Combine phase space with couplings.
2042 ef2 = CoupEW::ef2(idAbs) * psvec;
2043 efvf = CoupEW::efvf(idAbs) * psvec;
2044 vf2af2 = CoupEW::vf2(idAbs) * psvec + CoupEW::af2(idAbs) * psaxi;
2045 colf = (idAbs < 6) ? colQZ : 1.;
2047 // Store sum of combinations. For outstate only open channels.
2048 onMode = particlePtr->decay[i].onMode();
2049 if (onMode == 1 || onMode == 2) {
2050 gamSum += colf * ef2;
2051 intSum += colf * efvf;
2052 resSum += colf * vf2af2;
2055 // End loop over fermions.
2060 // Done. Return values in gamSum, intSum and resSum.
2066 // Calculate common parts of gamma/interference/Z0 propagator terms.
2068 void Sigma2ffbargmZggm::propTerm() {
2070 // Calculate prefactors for gamma/interference/Z0 cross section terms.
2071 gamProp = 4. * alpEM / (3. * M_PI * s3);
2072 intProp = gamProp * 2. * thetaWRat * s3 * (s3 - m2Res)
2073 / ( pow2(s3 - m2Res) + pow2(s3 * GamMRat) );
2074 resProp = gamProp * pow2(thetaWRat * s3)
2075 / ( pow2(s3 - m2Res) + pow2(s3 * GamMRat) );
2077 // Optionally only keep gamma* or Z0 term.
2078 if (gmZmode == 1) {intProp = 0.; resProp = 0.;}
2079 if (gmZmode == 2) {gamProp = 0.; intProp = 0.;}
2085 // Evaluate weight for gamma*/Z0 decay angle.
2087 double Sigma2ffbargmZggm::weightDecay( Event& process, int iResBeg, int iResEnd) {
2089 // Z should sit in entry 5 and one more parton in entry 6.
2090 if (iResBeg != 5 || iResEnd != 6) return 1.;
2092 // In an outgoing sense fermions are labelled f(1) fbar(2) f'(3) fbar'(4)
2093 // where f' fbar' come from gamma*/Z0 decay.
2095 int i3 = (process[7].id() > 0) ? 7 : 8;
2098 // Order so that fbar(1) f(2) -> gamma*/Z0 g/gamma.
2099 if (process[3].idAbs() < 20 && process[4].idAbs() < 20) {
2100 i1 = (process[3].id() < 0) ? 3 : 4;
2103 // Order so that f(2)/fbar(1) g/gamma -> f(1)/fbar(2) f'(3) gamma*/Z0.
2104 } else if (process[3].idAbs() < 20) {
2105 i1 = (process[3].id() < 0) ? 3 : 6;
2108 i1 = (process[4].id() < 0) ? 4 : 6;
2112 // Charge/2, left- and righthanded couplings for in- and out-fermion.
2113 int id1Abs = process[i1].idAbs();
2114 double ei = 0.5 * CoupEW::ef(id1Abs);
2115 double li = CoupEW::lf(id1Abs);
2116 double ri = CoupEW::rf(id1Abs);
2117 int id3Abs = process[i3].idAbs();
2118 double ef = 0.5 * CoupEW::ef(id3Abs);
2119 double lf = CoupEW::lf(id3Abs);
2120 double rf = CoupEW::rf(id3Abs);
2122 // Combinations of left/right for in/out, gamma*/interference/Z0.
2123 double clilf = ei*ei * gamProp * ef*ef + ei*li * intProp * ef*lf
2124 + li*li * resProp * lf*lf;
2125 double clirf = ei*ei * gamProp * ef*ef + ei*li * intProp * ef*rf
2126 + li*li * resProp * rf*rf;
2127 double crilf = ei*ei * gamProp * ef*ef + ei*ri * intProp * ef*lf
2128 + ri*ri * resProp * lf*lf;
2129 double crirf = ei*ei * gamProp * ef*ef + ei*ri * intProp * ef*rf
2130 + ri*ri * resProp * rf*rf;
2132 // Evaluate four-vector products.
2133 double p13 = process[i1].p() * process[i3].p();
2134 double p14 = process[i1].p() * process[i4].p();
2135 double p23 = process[i2].p() * process[i3].p();
2136 double p24 = process[i2].p() * process[i4].p();
2138 // Calculate weight and its maximum.
2139 double wt = (clilf + crirf) * (p13*p13 + p24*p24)
2140 + (clirf + crilf) * (p14*p14 + p23*p23) ;
2141 double wtMax = (clilf + clirf + crilf + crirf)
2142 * (pow2(p13 + p14) + pow2(p23 + p24));
2145 return (wt / wtMax);
2149 //**************************************************************************
2151 // Sigma2qqbar2gmZg class.
2152 // Cross section for q qbar -> gamma*/Z0 g.
2156 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
2158 void Sigma2qqbar2gmZg::sigmaKin() {
2160 // Cross section part common for all incoming flavours.
2161 sigma0 = (M_PI / sH2) * (alpEM * alpS)
2162 * (2./9.) * (tH2 + uH2 + 2. * sH * s3) / (tH * uH);
2164 // Calculate flavour sums for final state.
2167 // Calculate prefactors for gamma/interference/Z0 cross section terms.
2174 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
2176 double Sigma2qqbar2gmZg::sigmaHat() {
2178 // Combine gamma, interference and Z0 parts.
2179 int idAbs = abs(id1);
2180 double sigma = sigma0
2181 * ( CoupEW::ef2(idAbs) * gamProp * gamSum
2182 + CoupEW::efvf(idAbs) * intProp * intSum
2183 + CoupEW::vf2af2(idAbs) * resProp * resSum);
2185 // Correct for the running-width Z0 propagater weight in PhaseSpace.
2195 // Select identity, colour and anticolour.
2197 void Sigma2qqbar2gmZg::setIdColAcol() {
2199 // Flavours trivial.
2200 setId( id1, id2, 23, 21);
2202 // Colour flow topologies. Swap when antiquarks.
2203 setColAcol( 1, 0, 0, 2, 0, 0, 1, 2);
2204 if (id1 < 0) swapColAcol();
2208 //**************************************************************************
2210 // Sigma2qg2gmZq class.
2211 // Cross section for q g -> gamma*/Z0 q.
2215 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
2217 void Sigma2qg2gmZq::sigmaKin() {
2219 // Cross section part common for all incoming flavours.
2220 sigma0 = (M_PI / sH2) * (alpEM * alpS)
2221 * (1./12.) * (sH2 + uH2 + 2. * tH * s3) / (-sH * uH);
2223 // Calculate flavour sums for final state.
2226 // Calculate prefactors for gamma/interference/Z0 cross section terms.
2233 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
2235 double Sigma2qg2gmZq::sigmaHat() {
2237 // Combine gamma, interference and Z0 parts.
2238 int idAbs = (id2 == 21) ? abs(id1) : abs(id2);
2239 double sigma = sigma0
2240 * ( CoupEW::ef2(idAbs) * gamProp * gamSum
2241 + CoupEW::efvf(idAbs) * intProp * intSum
2242 + CoupEW::vf2af2(idAbs) * resProp * resSum);
2244 // Correct for the running-width Z0 propagater weight in PhaseSpace.
2254 // Select identity, colour and anticolour.
2256 void Sigma2qg2gmZq::setIdColAcol() {
2258 // Flavour set up for q g -> gamma*/Z0 q.
2259 int idq = (id2 == 21) ? id1 : id2;
2260 setId( id1, id2, 23, idq);
2262 // tH defined between f and f': must swap tHat <-> uHat if q g in.
2263 swapTU = (id2 == 21);
2265 // Colour flow topologies. Swap when antiquarks.
2266 if (id2 == 21) setColAcol( 1, 0, 2, 1, 0, 0, 2, 0);
2267 else setColAcol( 2, 1, 1, 0, 0, 0, 2, 0);
2268 if (idq < 0) swapColAcol();
2272 //**************************************************************************
2274 // Sigma2ffbar2gmZgm class.
2275 // Cross section for f fbar -> gamma*/Z0 gamma.
2279 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
2281 void Sigma2ffbar2gmZgm::sigmaKin() {
2283 // Cross section part common for all incoming flavours.
2284 sigma0 = (M_PI / sH2) * (alpEM*alpEM)
2285 * 0.5 * (tH2 + uH2 + 2. * sH * s3) / (tH * uH);
2287 // Calculate flavour sums for final state.
2290 // Calculate prefactors for gamma/interference/Z0 cross section terms.
2298 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
2300 double Sigma2ffbar2gmZgm::sigmaHat() {
2302 // Combine gamma, interference and Z0 parts.
2303 int idAbs = abs(id1);
2304 double sigma = sigma0 * CoupEW::ef2(idAbs)
2305 * ( CoupEW::ef2(idAbs) * gamProp * gamSum
2306 + CoupEW::efvf(idAbs) * intProp * intSum
2307 + CoupEW::vf2af2(idAbs) * resProp * resSum);
2309 // Correct for the running-width Z0 propagater weight in PhaseSpace.
2312 // Colour factor. Answer.
2313 if (idAbs < 9) sigma /= 3.;
2320 // Select identity, colour and anticolour.
2322 void Sigma2ffbar2gmZgm::setIdColAcol() {
2324 // Flavours trivial.
2325 setId( id1, id2, 23, 22);
2327 // Colour flow topologies. Swap when antiquarks.
2328 if (abs(id1) < 9) setColAcol( 1, 0, 0, 1, 0, 0, 0, 0);
2329 else setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
2330 if (id1 < 0) swapColAcol();
2334 //**************************************************************************
2336 // Sigma2fgm2gmZf class.
2337 // Cross section for f gamma -> gamma*/Z0 f'.
2341 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
2343 void Sigma2fgm2gmZf::sigmaKin() {
2345 // Cross section part common for all incoming flavours.
2346 sigma0 = (M_PI / sH2) * (alpEM*alpEM)
2347 * 0.5 * (sH2 + uH2 + 2. * tH * s3) / (- sH * uH);
2349 // Calculate flavour sums for final state.
2352 // Calculate prefactors for gamma/interference/Z0 cross section terms.
2359 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
2361 double Sigma2fgm2gmZf::sigmaHat() {
2363 // Combine gamma, interference and Z0 parts.
2364 int idAbs = (id2 == 22) ? abs(id1) : abs(id2);
2365 double sigma = sigma0 * CoupEW::ef2(idAbs)
2366 * ( CoupEW::ef2(idAbs) * gamProp * gamSum
2367 + CoupEW::efvf(idAbs) * intProp * intSum
2368 + CoupEW::vf2af2(idAbs) * resProp * resSum);
2370 // Correct for the running-width Z0 propagater weight in PhaseSpace.
2380 // Select identity, colour and anticolour.
2382 void Sigma2fgm2gmZf::setIdColAcol() {
2384 // Flavour set up for q gamma -> gamma*/Z0 q.
2385 int idq = (id2 == 22) ? id1 : id2;
2386 setId( id1, id2, 23, idq);
2388 // tH defined between f and f': must swap tHat <-> uHat if q gamma in.
2389 swapTU = (id2 == 22);
2391 // Colour flow topologies. Swap when antiquarks.
2392 if (abs(id1) < 9) setColAcol( 1, 0, 0, 0, 0, 0, 1, 0);
2393 else if (abs(id2) < 9) setColAcol( 0, 0, 1, 0, 0, 0, 1, 0);
2394 else setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
2395 if (idq < 0) swapColAcol();
2399 //**************************************************************************
2401 // Sigma2ffbarWggm class.
2402 // Collects common methods for f fbar -> W+- g/gamma and permutations.
2406 // Evaluate weight for W+- decay angle.
2408 double Sigma2ffbarWggm::weightDecay( Event& process, int iResBeg, int iResEnd) {
2410 // W should sit in entry 5 and one more parton in entry 6.
2411 if (iResBeg != 5 || iResEnd != 6) return 1.;
2413 // In an outgoing sense fermions are labelled f(1) fbar(2) f'(3) fbar'(4)
2414 // where f' fbar' come from W+- decay.
2416 int i3 = (process[7].id() > 0) ? 7 : 8;
2419 // Order so that fbar(1) f(2) -> W+- g/gamma.
2420 if (process[3].idAbs() < 20 && process[4].idAbs() < 20) {
2421 i1 = (process[3].id() < 0) ? 3 : 4;
2424 // Order so that f(2)/fbar(1) g/gamma -> f(1)/fbar(2) f'(3) W+-.
2425 } else if (process[3].idAbs() < 20) {
2426 i1 = (process[3].id() < 0) ? 3 : 6;
2429 i1 = (process[4].id() < 0) ? 4 : 6;
2433 // Evaluate four-vector products.
2434 double p13 = process[i1].p() * process[i3].p();
2435 double p14 = process[i1].p() * process[i4].p();
2436 double p23 = process[i2].p() * process[i3].p();
2437 double p24 = process[i2].p() * process[i4].p();
2439 // Calculate weight and its maximum.
2440 double wt = pow2(p13) + pow2(p24);
2441 double wtMax = pow2(p13 + p14) + pow2(p23 + p24);
2444 return (wt / wtMax);
2448 //**************************************************************************
2450 // Sigma2qqbar2Wg class.
2451 // Cross section for q qbar' -> W+- g.
2455 // Initialize process.
2457 void Sigma2qqbar2Wg::initProc() {
2459 // Secondary open width fractions, relevant for top (or heavier).
2460 openFracPos = ParticleDataTable::resOpenFrac(24);
2461 openFracNeg = ParticleDataTable::resOpenFrac(-24);
2467 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
2469 void Sigma2qqbar2Wg::sigmaKin() {
2471 // Cross section part common for all incoming flavours.
2472 sigma0 = (M_PI / sH2) * (alpEM * alpS / CoupEW::sin2thetaW())
2473 * (2./9.) * (tH2 + uH2 + 2. * sH * s3) / (tH * uH);
2479 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
2481 double Sigma2qqbar2Wg::sigmaHat() {
2483 // CKM factor. Secondary width for W+ or W-.
2484 double sigma = sigma0 * VCKM::V2id(abs(id1), abs(id2));
2485 int idUp = (abs(id1)%2 == 0) ? id1 : id2;
2486 sigma *= (idUp > 0) ? openFracPos : openFracNeg;
2495 // Select identity, colour and anticolour.
2497 void Sigma2qqbar2Wg::setIdColAcol() {
2499 // Sign of outgoing W.
2500 int sign = 1 - 2 * (abs(id1)%2);
2501 if (id1 < 0) sign = -sign;
2502 setId( id1, id2, 24 * sign, 21);
2504 // Colour flow topologies. Swap when antiquarks.
2505 setColAcol( 1, 0, 0, 2, 0, 0, 1, 2);
2506 if (id1 < 0) swapColAcol();
2510 //**************************************************************************
2512 // Sigma2qg2Wq class.
2513 // Cross section for q g -> W+- q'.
2517 // Initialize process.
2519 void Sigma2qg2Wq::initProc() {
2521 // Secondary open width fractions, relevant for top (or heavier).
2522 openFracPos = ParticleDataTable::resOpenFrac(24);
2523 openFracNeg = ParticleDataTable::resOpenFrac(-24);
2529 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
2531 void Sigma2qg2Wq::sigmaKin() {
2533 // Cross section part common for all incoming flavours.
2534 sigma0 = (M_PI / sH2) * (alpEM * alpS / CoupEW::sin2thetaW())
2535 * (1./12.) * (sH2 + uH2 + 2. * tH * s3) / (-sH * uH);
2541 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
2543 double Sigma2qg2Wq::sigmaHat() {
2545 // CKM factor. Secondary width for W+ or W-.
2546 int idAbs = (id2 == 21) ? abs(id1) : abs(id2);
2547 double sigma = sigma0 * VCKM::V2sum(idAbs);
2548 int idUp = (id2 == 21) ? id1 : id2;
2549 if (idAbs%2 == 1) idUp = -idUp;
2550 sigma *= (idUp > 0) ? openFracPos : openFracNeg;
2559 // Select identity, colour and anticolour.
2561 void Sigma2qg2Wq::setIdColAcol() {
2563 // Sign of outgoing W. Flavour of outgoing quark.
2564 int idq = (id2 == 21) ? id1 : id2;
2565 int sign = 1 - 2 * (abs(idq)%2);
2566 if (idq < 0) sign = -sign;
2567 id4 = VCKM::V2pick(idq);
2569 // Flavour set up for q g -> W q.
2570 setId( id1, id2, 24 * sign, id4);
2572 // tH defined between f and f': must swap tHat <-> uHat if q g in.
2573 swapTU = (id2 == 21);
2575 // Colour flow topologies. Swap when antiquarks.
2576 if (id2 == 21) setColAcol( 1, 0, 2, 1, 0, 0, 2, 0);
2577 else setColAcol( 2, 1, 1, 0, 0, 0, 2, 0);
2578 if (idq < 0) swapColAcol();
2582 //**************************************************************************
2584 // Sigma2ffbar2Wgm class.
2585 // Cross section for f fbar' -> W+- gamma.
2589 // Initialize process.
2591 void Sigma2ffbar2Wgm::initProc() {
2593 // Secondary open width fractions, relevant for top (or heavier).
2594 openFracPos = ParticleDataTable::resOpenFrac(24);
2595 openFracNeg = ParticleDataTable::resOpenFrac(-24);
2601 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
2603 void Sigma2ffbar2Wgm::sigmaKin() {
2605 // Cross section part common for all incoming flavours.
2606 sigma0 = (M_PI / sH2) * (alpEM*alpEM / CoupEW::sin2thetaW())
2607 * 0.5 * (tH2 + uH2 + 2. * sH * s3) / (tH * uH);
2612 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
2614 double Sigma2ffbar2Wgm::sigmaHat() {
2616 // Extrafactor different for e nu and q qbar' instate.
2617 int id1Abs = abs(id1);
2618 int id2Abs = abs(id2);
2619 double chgUp = (id1Abs > 10) ? 0. : 2./3.;
2620 double sigma = sigma0 * pow2( chgUp - tH / (tH + uH) );
2622 // CKM and colour factors. Secondary width for W+ or W-.
2623 if (id1Abs < 9) sigma *= VCKM::V2id(id1Abs, id2Abs) / 3.;
2624 int idUp = (abs(id1)%2 == 0) ? id1 : id2;
2625 sigma *= (idUp > 0) ? openFracPos : openFracNeg;
2634 // Select identity, colour and anticolour.
2636 void Sigma2ffbar2Wgm::setIdColAcol() {
2638 // Sign of outgoing W.
2639 int sign = 1 - 2 * (abs(id1)%2);
2640 if (id1 < 0) sign = -sign;
2641 setId( id1, id2, 24 * sign, 22);
2643 // tH defined between (f,W-) or (fbar',W+).
2644 swapTU = (sign * id1 > 0);
2646 // Colour flow topologies. Swap when antiquarks.
2647 if (abs(id1) < 9) setColAcol( 1, 0, 0, 1, 0, 0, 0, 0);
2648 else setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
2649 if (id1 < 0) swapColAcol();
2653 //**************************************************************************
2655 // Sigma2fgm2Wf class.
2656 // Cross section for f gamma -> W+- f'.
2660 // Initialize process.
2662 void Sigma2fgm2Wf::initProc() {
2664 // Secondary open width fractions, relevant for top (or heavier).
2665 openFracPos = ParticleDataTable::resOpenFrac(24);
2666 openFracNeg = ParticleDataTable::resOpenFrac(-24);
2672 // Evaluate d(sigmaHat)/d(tHat), part independent of incoming flavour.
2674 void Sigma2fgm2Wf::sigmaKin() {
2676 // Cross section part common for all incoming flavours.
2677 sigma0 = (M_PI / sH2) * (alpEM*alpEM / CoupEW::sin2thetaW())
2678 * 0.5 * (sH2 + uH2 + 2. * tH * s3) / (pT2 * s3 - sH * uH);
2684 // Evaluate d(sigmaHat)/d(tHat), including incoming flavour dependence.
2686 double Sigma2fgm2Wf::sigmaHat() {
2688 // Extrafactor dependent on charge of incoming fermion.
2689 int idAbs = (id2 == 22) ? abs(id1) : abs(id2);
2690 double charge = (idAbs > 10) ? 1. : ( (idAbs%2 == 1) ? 1./3. : 2./3. );
2691 double sigma = sigma0 * pow2( charge - sH / (sH + uH) );
2693 // CKM factor. Secondary width for W+ or W-.
2694 sigma *= VCKM::V2sum(idAbs);
2695 int idUp = (id2 == 22) ? id1 : id2;
2696 if (idAbs%2 == 1) idUp = -idUp;
2697 sigma *= (idUp > 0) ? openFracPos : openFracNeg;
2706 // Select identity, colour and anticolour.
2708 void Sigma2fgm2Wf::setIdColAcol() {
2710 // Sign of outgoing W. Flavour of outgoing fermion.
2711 int idq = (id2 == 22) ? id1 : id2;
2712 int sign = 1 - 2 * (abs(idq)%2);
2713 if (idq < 0) sign = -sign;
2714 id4 = VCKM::V2pick(idq);
2716 // Flavour set up for q gamma -> W q.
2717 setId( id1, id2, 24 * sign, id4);
2719 // tH defined between f and f': must swap tHat <-> uHat if q gamma in.
2720 swapTU = (id2 == 22);
2722 // Colour flow topologies. Swap when antiquarks.
2723 if (abs(id1) < 9) setColAcol( 1, 0, 0, 0, 0, 0, 1, 0);
2724 else if (abs(id2) < 9) setColAcol( 0, 0, 1, 0, 0, 0, 1, 0);
2725 else setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
2726 if (idq < 0) swapColAcol();
2730 //**************************************************************************
2732 } // end namespace Pythia8