Page MenuHomeHEPForge

No OneTemporary

diff --git a/src/Wjets.cc b/src/Wjets.cc
index dac4bc2..dadae22 100644
--- a/src/Wjets.cc
+++ b/src/Wjets.cc
@@ -1,520 +1,520 @@
/**
* \authors The HEJ collaboration (see AUTHORS for details)
- * \date 2020
+ * \date 2020-2022
* \copyright GPLv2 or later
*/
#include "HEJ/Wjets.hh"
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <iostream>
#include "HEJ/Constants.hh"
#include "HEJ/EWConstants.hh"
#include "HEJ/LorentzVector.hh"
#include "HEJ/exceptions.hh"
// generated headers
#include "HEJ/currents/jV_j.hh"
#include "HEJ/currents/jV_juno.hh"
#include "HEJ/currents/jVuno_j.hh"
#include "HEJ/currents/jW_jqqbar.hh"
#include "HEJ/currents/jW_qqbar_j.hh"
#include "HEJ/currents/jWqqbar_j.hh"
#include "HEJ/currents/j_Wqqbar_j.hh"
namespace HEJ {
namespace currents {
namespace {
using COM = std::complex<double>;
// --- Helper Functions ---
// FKL W Helper Functions
double WProp(const HLV & plbar, const HLV & pl,
ParticleProperties const & wprop
){
COM propW = COM(0.,-1.)/( (pl+plbar).m2() - wprop.mass*wprop.mass
+ COM(0.,1.)*wprop.mass*wprop.width);
double PropFactor=(propW*conj(propW)).real();
return PropFactor;
}
/**
* @brief Contraction of W + unordered jet current with FKL current
*
* See eq:wunocurrent in the developer manual for the definition
* of the W + unordered jet current
*/
template<Helicity h1, Helicity h2, Helicity pol>
double jM2Wuno(
HLV const & pg, HLV const & p1, HLV const & plbar, HLV const & pl,
HLV const & pa, HLV const & p2, HLV const & pb,
ParticleProperties const & wprop
){
using helicity::minus;
const COM u1 = U1<h1, minus, h2, pol>(p1, p2, pa, pb, pg, pl, plbar);
const COM u2 = U2<h1, minus, h2, pol>(p1, p2, pa, pb, pg, pl, plbar);
const COM l = L<h1, minus, h2, pol>(p1, p2, pa, pb, pg, pl, plbar);
const COM x = u1 - l;
const COM y = u2 + l;
// eq:VunoSumAveS in developer manual
// TODO: use same form as for other uno currents,
// extracting at least a factor of K_q = C_F
const double amp = C_A*C_F*C_F/2.*(norm(x)+norm(y)) - C_F/2.*(x*conj(y)).real();
return WProp(plbar, pl, wprop) * amp;
}
/**
* @brief Contraction of W + extremal qqbar current with FKL current
*
* See eq:crossed in the developer manual for the definition
* of the W + extremal qqbar current.
*
*/
template<Helicity h1, Helicity h2, Helicity hg>
double jM2_W_extremal_qqbar(
HLV const & pg, HLV const & pq, HLV const & plbar, HLV const & pl,
HLV const & pqbar, HLV const & p3, HLV const & pb,
ParticleProperties const & wprop
){
const COM u1Xcontr = U1X<h1, h2, hg>(pg, pq, plbar, pl, pqbar, p3, pb);
const COM u2Xcontr = U2X<h1, h2, hg>(pg, pq, plbar, pl, pqbar, p3, pb);
const COM lXcontr = LX<h1, h2, hg>(pg, pq, plbar, pl, pqbar, p3, pb);
const COM x = u1Xcontr - lXcontr;
const COM y = u2Xcontr + lXcontr;
const double amp = C_A*C_F*C_F/2.*(norm(x)+norm(y)) - C_F/2.*(x*conj(y)).real();
return WProp(plbar, pl, wprop) * amp;
}
} // Anonymous Namespace
//! W+Jets FKL Contributions
double ME_W_qQ(
HLV const & p1out,
HLV const & plbar, HLV const & pl,
HLV const & p1in,
HLV const & p2out, HLV const & p2in,
ParticleProperties const & wprop
){
using helicity::minus;
using helicity::plus;
const COM ampm = jV_j<minus, minus, minus>(p1in,p1out,p2in,p2out,pl,plbar);
const COM ampp = jV_j<minus, minus, plus>(p1in,p1out,p2in,p2out,pl,plbar);
const double Msqr = std::norm(ampm) + std::norm(ampp);
return WProp(plbar, pl, wprop) * Msqr;
}
namespace {
// helicity amplitude squares for contraction of W current with unordered
// current
template<Helicity h2, Helicity hg>
double ampsq_jW_juno(
HLV const & pa, HLV const & p1,
HLV const & pb, HLV const & p2,
HLV const & pg,
HLV const & pl, HLV const & plbar
){
using helicity::minus;
const COM u1 = U1_jV<minus, minus, h2, hg>(pa,p1,pb,p2,pg,pl,plbar);
const COM u2 = U2_jV<minus, minus, h2, hg>(pa,p1,pb,p2,pg,pl,plbar);
const COM l = L_jV<minus, minus, h2, hg>(pa,p1,pb,p2,pg,pl,plbar);
const COM x = u1 - l;
const COM y = u2 + l;
return C_F*norm(x + y) - C_A*(x*conj(y)).real();
}
} // Anonymous Namespace
double ME_W_unob_qQ(
HLV const & p1out, HLV const & p1in, HLV const & p2out, HLV const & p2in,
HLV const & pg, HLV const & plbar, HLV const & pl, ParticleProperties
const & wprop
){
using helicity::minus;
using helicity::plus;
// helicity assignments assume quarks
// in the end, this is irrelevant since we sum over all helicities
const double ampsq =
+ ampsq_jW_juno<minus, minus>(p2in,p2out,p1in,p1out,pg,pl,plbar)
+ ampsq_jW_juno<minus, plus> (p2in,p2out,p1in,p1out,pg,pl,plbar)
+ ampsq_jW_juno<plus, minus> (p2in,p2out,p1in,p1out,pg,pl,plbar)
+ ampsq_jW_juno<plus, plus> (p2in,p2out,p1in,p1out,pg,pl,plbar)
;
return WProp(plbar, pl, wprop)*ampsq;
}
namespace {
// helicity sum helper for jWuno_j(...)
template<Helicity h1>
double jWuno_j_helsum(
HLV const & pg, HLV const & p1, HLV const & plbar, HLV const & pl,
HLV const & pa, HLV const & p2, HLV const & pb,
ParticleProperties const & wprop
){
using helicity::minus;
using helicity::plus;
const double ME2h1pp = jM2Wuno<h1, plus, plus>(
pg, p1, plbar, pl, pa, p2, pb, wprop
);
const double ME2h1pm = jM2Wuno<h1, plus, minus>(
pg, p1, plbar, pl, pa, p2, pb, wprop
);
const double ME2h1mp = jM2Wuno<h1, minus, plus>(
pg, p1, plbar, pl, pa, p2, pb, wprop
);
const double ME2h1mm = jM2Wuno<h1, minus, minus>(
pg, p1, plbar, pl, pa, p2, pb, wprop
);
return ME2h1pp + ME2h1pm + ME2h1mp + ME2h1mm;
}
} // Anonymous Namespace
double ME_Wuno_qQ(
HLV const & p1out, HLV const & p1in, HLV const & p2out, HLV const & p2in,
HLV const & pg, HLV const & plbar, HLV const & pl,
ParticleProperties const & wprop
){
return jWuno_j_helsum<helicity::minus>(
pg, p1out, plbar, pl, p1in, p2out, p2in, wprop
)/(4.*C_A*C_A);
}
// helicity sum helper for jWqqbar_j(...)
template<Helicity h1>
double jWqqbar_j_helsum(
HLV const & pg, HLV const & pq, HLV const & plbar, HLV const & pl,
HLV const & pqbar, HLV const & p3, HLV const & pb,
ParticleProperties const & wprop
){
using helicity::minus;
using helicity::plus;
const double amp_h1pp = jM2_W_extremal_qqbar<h1, plus, plus>(
pg, pq, plbar, pl, pqbar, p3, pb, wprop
);
const double amp_h1pm = jM2_W_extremal_qqbar<h1, plus, minus>(
pg, pq, plbar, pl, pqbar, p3, pb, wprop
);
const double amp_h1mp = jM2_W_extremal_qqbar<h1, minus, plus>(
pg, pq, plbar, pl, pqbar, p3, pb, wprop
);
const double amp_h1mm = jM2_W_extremal_qqbar<h1, minus, minus>(
pg, pq, plbar, pl, pqbar, p3, pb, wprop
);
return amp_h1pp + amp_h1pm + amp_h1mp + amp_h1mm;
}
double ME_WExqqbar_qqbarQ(
HLV const & pgin, HLV const & pqbarout, HLV const & plbar, HLV const & pl,
HLV const & pqout, HLV const & p2out, HLV const & p2in,
ParticleProperties const & wprop
){
//Helicity sum and average over initial states.
double ME2 = jWqqbar_j_helsum<helicity::plus>(
pgin, pqbarout, plbar, pl, pqout, p2out, p2in, wprop
)/(4.*C_A*C_A);
//Correct colour averaging after crossing:
ME2*=(3.0/8.0);
return ME2;
}
namespace {
template<Helicity h1, Helicity hg>
double jW_jqqbar(
HLV const & pb,
HLV const & p2,
HLV const & p3,
HLV const & pa,
HLV const & p1,
HLV const & pl,
HLV const & plbar
){
using std::norm;
static constexpr double cm1m1 = 8./3.;
static constexpr double cm2m2 = 8./3.;
static constexpr double cm3m3 = 6.;
static constexpr double cm1m2 =-1./3.;
static constexpr COM cm1m3 = COM{0.,-3.};
static constexpr COM cm2m3 = COM{0.,3.};
const COM m1 = jW_qggm1<h1,hg>(pb,p2,p3,pa,p1,pl,plbar);
const COM m2 = jW_qggm2<h1,hg>(pb,p2,p3,pa,p1,pl,plbar);
const COM m3 = jW_qggm3<h1,hg>(pb,p2,p3,pa,p1,pl,plbar);
return
+ cm1m1*norm(m1)
+ cm2m2*norm(m2)
+ cm3m3*norm(m3)
+ 2.*real(cm1m2*m1*conj(m2))
+ 2.*real(cm1m3*m1*conj(m3))
+ 2.*real(cm2m3*m2*conj(m3)) ;
}
} // Anonymous Namespace
// contraction of W current with extremal qqbar on the other side
double ME_W_Exqqbar_QQq(
HLV const & pa, HLV const & pb,
HLV const & p1, HLV const & p2,
HLV const & p3, HLV const & plbar, HLV const & pl, bool aqlinepa,
ParticleProperties const & wprop
){
using helicity::minus;
using helicity::plus;
const double wPropfact = WProp(plbar, pl, wprop);
const double prefactor = 2.*wPropfact/24./4.;
if(aqlinepa) {
return prefactor*(
jW_jqqbar<plus, minus>(pb,p2,p3,pa,p1,pl,plbar)
+ jW_jqqbar<plus, plus>(pb,p2,p3,pa,p1,pl,plbar)
);
}
return prefactor*(
jW_jqqbar<minus, minus>(pb,p2,p3,pa,p1,pl,plbar)
+ jW_jqqbar<minus, plus>(pb,p2,p3,pa,p1,pl,plbar)
);
}
namespace {
// helper function for matrix element for W + Jets with central qqbar
template<Helicity h1a, Helicity h4b>
double amp_WCenqqbar_qq(
HLV const & pa, HLV const & p1,
HLV const & pb, HLV const & p4,
HLV const & pq, HLV const & pqbar,
HLV const & pl, HLV const & plbar,
HLV const & q11, HLV const & q12
){
using std::norm;
const COM sym = M_sym_W<h1a, h4b>(
pa, p1, pb, p4, pq, pqbar, pl, plbar, q11, q12
);
const COM cross = M_cross_W<h1a, h4b>(
pa, p1, pb, p4, pq, pqbar, pl, plbar, q11, q12
);
const COM uncross = M_uncross_W<h1a, h4b>(
pa, p1, pb, p4, pq, pqbar, pl, plbar, q11, q12
);
// Colour factors
static constexpr double cmsms = 3.;
static constexpr double cmumu = 4./3.;
static constexpr double cmcmc = 4./3.;
static constexpr COM cmsmu = COM{0., 3./2.};
static constexpr COM cmsmc = COM{0.,-3./2.};
static constexpr double cmumc = -1./6.;
return
+cmsms*norm(sym)
+cmumu*norm(uncross)
+cmcmc*norm(cross)
+2.*real(cmsmu*sym*conj(uncross))
+2.*real(cmsmc*sym*conj(cross))
+2.*real(cmumc*uncross*conj(cross))
;
}
} // Anonymous Namespace
// matrix element for W + Jets with W emission off central qqbar
double ME_WCenqqbar_qq(
HLV const & pa, HLV const & pb, HLV const & pl, HLV const & plbar,
std::vector<HLV> const & partons, bool /* aqlinepa */, bool /* aqlinepb */,
bool qqbar_marker, int nabove, ParticleProperties const & wprop
){
using helicity::plus;
using helicity::minus;
CLHEP::HepLorentzVector q1 = pa;
for(int i = 0; i <= nabove; ++i){
q1 -= partons[i];
}
const auto qq = split_into_lightlike(q1);
// since q1.m2() < 0 the following assertion is always true
// see documentation for split_into_lightlike
assert(qq.second.e() < 0);
HLV pq;
HLV pqbar;
if (qqbar_marker){
pqbar = partons[nabove+1];
pq = partons[nabove+2];}
else{
pq = partons[nabove+1];
pqbar = partons[nabove+2];
}
const HLV p1 = partons.front();
const HLV p4 = partons.back();
// 4 Different Helicity Choices (Differs from Pure Jet Case, where there is
// also the choice in qqbar helicity.
// the first helicity label is for aqlinepa == true,
// the second one for aqlinepb == true
// In principle the corresponding helicity should be flipped
// if either of them is false, but we sum up all helicities,
// so this has no effect in the end.
const double amp_mm = amp_WCenqqbar_qq<minus, minus>(
pa, p1, pb, p4, pq, pqbar, pl, plbar, qq.first, -qq.second
);
const double amp_mp = amp_WCenqqbar_qq<minus, plus>(
pa, p1, pb, p4, pq, pqbar, pl, plbar, qq.first, -qq.second
);
const double amp_pm = amp_WCenqqbar_qq<plus, minus>(
pa, p1, pb, p4, pq, pqbar, pl, plbar, qq.first, -qq.second
);
const double amp_pp = amp_WCenqqbar_qq<plus, plus>(
pa, p1, pb, p4, pq, pqbar, pl, plbar, qq.first, -qq.second
);
// Divide by t channels, extremal + adjacent central vertex
const double ta = (pa-p1).m2();
const double t1 = q1.m2();
const double t3 = (q1-pl-plbar-pq-pqbar).m2();
const double tb = (p4-pb).m2();
const double amp = WProp(plbar, pl, wprop)*(
amp_mm+amp_mp+amp_pm+amp_pp
)/(9.*4.*ta*t1*t3*tb);
return amp;
}
// helper function for matrix element for W + Jets with central qqbar
// W emitted off extremal parton
// @TODO: code duplication with amp_WCenqqbar_qq
template<Helicity h1a, Helicity hqqbar>
double amp_W_Cenqqbar_qq(
HLV const & pa, HLV const & p1,
HLV const & pb, HLV const & pn,
HLV const & pq, HLV const & pqbar,
HLV const & pl, HLV const & plbar,
HLV const & q11, HLV const & q12
){
using std::norm;
const COM crossed = M_cross<h1a, hqqbar>(
pa, p1, pb, pn, pq, pqbar, pl, plbar, q11, q12
);
const COM uncrossed = M_qbar<h1a, hqqbar>(
pa, p1, pb, pn, pq, pqbar, pl, plbar, q11, q12
);
const COM sym = M_sym<h1a, hqqbar>(
pa, p1, pb, pn, pq, pqbar, pl, plbar, q11, q12
);
//Colour factors:
static constexpr double cmsms = 3.;
static constexpr double cmumu = 4./3.;
static constexpr double cmcmc = 4./3.;
static constexpr COM cmsmu = COM{0.,3./2.};
static constexpr COM cmsmc = COM{0.,-3./2.};
static constexpr double cmumc = -1./6.;
return
+cmsms*norm(sym)
+cmumu*norm(uncrossed)
+cmcmc*norm(crossed)
+2.*real(cmsmu*sym*conj(uncrossed))
+2.*real(cmsmc*sym*conj(crossed))
+2.*real(cmumc*uncrossed*conj(crossed))
;
}
// matrix element for W + Jets with W emission *not* off central qqbar
double ME_W_Cenqqbar_qq(
HLV pa, HLV pb, HLV pl,HLV plbar,
std::vector<HLV> partons, bool aqlinepa, bool aqlinepb,
bool qqbar_marker, int nabove, int nbelow, bool forwards,
ParticleProperties const & wprop
){
using helicity::minus;
using helicity::plus;
if (!forwards){ //If Emission from Leg a instead, flip process.
std::swap(pa, pb);
std::reverse(partons.begin(),partons.end());
std::swap(aqlinepa, aqlinepb);
qqbar_marker = !qqbar_marker;
std::swap(nabove,nbelow);
}
HLV q1=pa;
for(int i=0;i<nabove+1;++i){
q1-=partons.at(i);
}
const auto qq = split_into_lightlike(q1);
HLV pq;
HLV pqbar;
if (qqbar_marker){
pqbar = partons[nabove+1];
pq = partons[nabove+2];}
else{
pq = partons[nabove+1];
pqbar = partons[nabove+2];}
// we assume that the W is emitted off a quark line
// if this is not the case, we have to apply CP conjugation,
// which is equivalent to swapping lepton and antilepton momenta
if(aqlinepb) std::swap(pl, plbar);
const HLV p1 = partons.front();
const HLV pn = partons.back();
// helicity labels are for aqlinepa == aqlineb == false,
// In principle the helicities should be flipped
// if either of them is true, but we sum up all helicities,
// so this has no effect in the end.
const double amp_mm = amp_W_Cenqqbar_qq<minus, minus>(
pa, p1, pb, pn, pq, pqbar, pl, plbar, qq.first, -qq.second
);
const double amp_mp = amp_W_Cenqqbar_qq<minus, plus>(
pa, p1, pb, pn, pq, pqbar, pl, plbar, qq.first, -qq.second
);
const double amp_pm = amp_W_Cenqqbar_qq<plus, minus>(
pa, p1, pb, pn, pq, pqbar, pl, plbar, qq.first, -qq.second
);
const double amp_pp = amp_W_Cenqqbar_qq<plus, plus>(
pa, p1, pb, pn, pq, pqbar, pl, plbar, qq.first, -qq.second
);
// Divide by t channels, extremal + adjacent central vertex
const double ta = (pa-p1).m2();
const double t1 = q1.m2();
const double t3 = (q1 - pq - pqbar).m2();
const double tb = (pn+pl+plbar-pb).m2();
const double amp= WProp(plbar, pl, wprop)*(
amp_mm+amp_mp+amp_pm+amp_pp
)/(9.*4.*ta*t1*t3*tb);
return amp;
}
} // namespace currents
} // namespace HEJ
diff --git a/src/Zjets.cc b/src/Zjets.cc
index d3010dc..7ee4278 100644
--- a/src/Zjets.cc
+++ b/src/Zjets.cc
@@ -1,456 +1,456 @@
/**
* \authors The HEJ collaboration (see AUTHORS for details)
- * \date 2020
+ * \date 2020-2022
* \copyright GPLv2 or later
*/
#include <vector>
#include "HEJ/Constants.hh"
#include "HEJ/EWConstants.hh"
#include "HEJ/PDG_codes.hh"
#include "HEJ/utility.hh"
#include "HEJ/Zjets.hh"
// generated headers
#include "HEJ/currents/jV_j.hh"
#include "HEJ/currents/jV_juno.hh"
#include "HEJ/currents/jVuno_j.hh"
namespace HEJ {
namespace currents {
namespace {
using COM = std::complex<double>;
// Z propagator
COM ZProp(const double q, ParticleProperties const & zprop){
return 1. / (q - zprop.mass*zprop.mass + COM(0.,1.)*zprop.width*zprop.mass);
}
// Photon propagator
COM GProp(const double q) {
return 1. / q;
}
// Weak charge
template<Helicity h>
double Zq(ParticleID PID, double stw2, double ctw);
// Weak charge - Positive Spin
template<>
double Zq<helicity::plus>(
const ParticleID PID,
const double stw2,
const double ctw
) {
using namespace pid;
// quarks
if (PID == d || PID == s || PID == b) return (+ 1.0 * stw2 / 3.0) / ctw;
if (PID == u || PID == c) return (- 2.0 * stw2 / 3.0) / ctw;
// antiquarks
if (PID == d_bar || PID == s_bar || PID == b_bar) return (+ 0.5 - 1.0 * stw2 / 3.0) / ctw;
if (PID == u_bar || PID == c_bar) return (- 0.5 + 2.0 * stw2 / 3.0) / ctw;
// electron
if (PID == electron) return stw2 / ctw;
throw std::logic_error("ERROR! No weak charge found");
}
// Weak charge - Negative Spin
template<>
double Zq<helicity::minus>(
const ParticleID PID,
const double stw2,
const double ctw
) {
using namespace pid;
// quarks
if (PID == d || PID == s || PID == b) return (- 0.5 + 1.0 * stw2 / 3.0) / ctw;
if (PID == u || PID == c) return (+ 0.5 - 2.0 * stw2 / 3.0) / ctw;
// antiquarks
if (PID == d_bar || PID == s_bar || PID == b_bar) return (- 1.0 * stw2 / 3.0) / ctw;
if (PID == u_bar || PID == c_bar) return (+ 2.0 * stw2 / 3.0) / ctw;
// electron
if (PID == electron) return (-1.0 / 2.0 + stw2) / ctw;
throw std::logic_error("ERROR! No weak charge found");
}
// Electric charge
double Gq (const ParticleID PID) {
using namespace pid;
if (PID == d || PID == s || PID == b) return -1./3.;
if (PID == u || PID == c) return +2./3.;
if (PID == d_bar || PID == s_bar || PID == b_bar) return +1./3.;
if (PID == u_bar || PID == c_bar) return -2./3.;
throw std::logic_error("ERROR! No electric charge found");
}
//! Prefactor for Z+Jets Contributions
/**
* @brief Z+Jets Contributions Prefactor
* @param aptype Incoming Particle 1 type (Z emission)
* @param propZ Z Propagator
* @param propG Photon Propagator
* @param stw2 Value of sin(theta_w)^2
* @param ctw Value of cos(theta_w)
* @returns Prefactors for Z+Jets for all helicity combinations
* (includes couplings and propagators)
*/
MultiArray<COM, 2, 2> Z_amp_pref(
const ParticleID aptype,
COM const & propZ, COM const & propG,
const double stw2, const double ctw
){
using helicity::plus;
using helicity::minus;
const double zq_a_p = Zq<plus>(aptype, stw2, ctw);
const double zq_a_m = Zq<minus>(aptype, stw2, ctw);
const double ze_p = Zq<plus>(pid::electron, stw2, ctw);
const double ze_m = Zq<minus>(pid::electron, stw2, ctw);
const double gq_a = Gq(aptype);
MultiArray<COM, 2, 2> res;
res[ plus][ plus] = -2.*(zq_a_p * ze_p * propZ - gq_a * propG * stw2);
res[ plus][minus] = -2.*(zq_a_p * ze_m * propZ - gq_a * propG * stw2);
res[minus][minus] = -2.*(zq_a_m * ze_m * propZ - gq_a * propG * stw2);
res[minus][ plus] = -2.*(zq_a_m * ze_p * propZ - gq_a * propG * stw2);
return res;
}
//! Z+Jets FKL Contribution
/**
* @brief Z+Jets FKL Contribution
* @param pa Incoming Particle 1 (Z emission)
* @param pb Incoming Particle 2
* @param p1 Outgoing Particle 1 (Z emission)
* @param p2 Outgoing Particle 2
* @param pep Outgoing positron
* @param pem Outgoing electron
* @returns j_Z^\mu j_\mu for all helicities h1, hl, h2
*/
MultiArray<COM, 2, 2, 2> jZ_j(
const HLV & pa, const HLV & pb,
const HLV & p1, const HLV & p2,
const HLV & pep, const HLV & pem
){
using helicity::plus;
using helicity::minus;
MultiArray<COM, 2, 2, 2> res;
// NOLINTNEXTLINE
#define ASSIGN_HEL(RES, J, H1, HL, H2) \
RES[H1][HL][H2] = J<H1, HL, H2>(pa, p1, pb, p2, pem, pep)
ASSIGN_HEL(res, jV_j, plus, minus, minus);
ASSIGN_HEL(res, jV_j, plus, minus, plus);
ASSIGN_HEL(res, jV_j, plus, plus, minus);
ASSIGN_HEL(res, jV_j, plus, plus, plus);
#undef ASSIGN_HEL
for(auto hl: {minus, plus}) {
for(auto h2: {minus, plus}) {
res[minus][hl][h2] = std::conj(res[plus][flip(hl)][flip(h2)]);
}
}
return res;
}
// X and Y as used in contractions with unordered currents
struct XY {
COM X;
COM Y;
};
/**
* @brief Z+Jets Unordered Contribution, unordered on Z side
* @tparam h1 Helicity of line 1 (Z emission line)
* @tparam hl Lepton Helicity
* @tparam h2 Helicity of line 2
* @tparam hg Helicity of unordered gluon
* @param pa Incoming Particle 1 (Z and Uno emission)
* @param pb Incoming Particle 2
* @param pg Unordered Gluon
* @param p1 Outgoing Particle 1 (Z and Uno emission)
* @param p2 Outgoing Particle 2
* @param pep Outgoing positron
* @param pem Outgoing electron
* @returns X: (U1-L), Y: (U2+l)
*
* Calculates j_Z_{uno}^\mu j_\mu. Ie, unordered with Z emission same side.
*/
template<Helicity h1, Helicity hl, Helicity h2, Helicity hg>
XY amp_jZuno_j(
const HLV & pa, const HLV & pb, const HLV & pg,
const HLV & p1, const HLV & p2,
const HLV & pep, const HLV & pem
){
const COM u1 = U1<h1, hl, h2, hg>(p1, p2, pa, pb, pg, pem, pep);
const COM u2 = U2<h1, hl, h2, hg>(p1, p2, pa, pb, pg, pem, pep);
const COM l = L <h1, hl, h2, hg>(p1, p2, pa, pb, pg, pem, pep);
return {u1 - l, u2 + l};
}
MultiArray<XY, 2, 2, 2, 2> jZuno_j(
const HLV & pa, const HLV & pb, const HLV & pg,
const HLV & p1, const HLV & p2,
const HLV & pep, const HLV & pem
){
using helicity::plus;
using helicity::minus;
MultiArray<XY, 2, 2, 2, 2> xy;
// NOLINTNEXTLINE
#define ASSIGN_HEL(XY, J, H1, H2, H3, H4) \
XY[H1][H2][H3][H4] = J<H1, H2, H3, H4>(pa, pb, pg, p1, p2, pep, pem) // NOLINT
ASSIGN_HEL(xy, amp_jZuno_j, minus, minus, minus, minus);
ASSIGN_HEL(xy, amp_jZuno_j, minus, minus, minus, plus);
ASSIGN_HEL(xy, amp_jZuno_j, minus, minus, plus, minus);
ASSIGN_HEL(xy, amp_jZuno_j, minus, minus, plus, plus);
ASSIGN_HEL(xy, amp_jZuno_j, minus, plus, minus, minus);
ASSIGN_HEL(xy, amp_jZuno_j, minus, plus, minus, plus);
ASSIGN_HEL(xy, amp_jZuno_j, minus, plus, plus, minus);
ASSIGN_HEL(xy, amp_jZuno_j, minus, plus, plus, plus);
ASSIGN_HEL(xy, amp_jZuno_j, plus, minus, minus, minus);
ASSIGN_HEL(xy, amp_jZuno_j, plus, minus, minus, plus);
ASSIGN_HEL(xy, amp_jZuno_j, plus, minus, plus, minus);
ASSIGN_HEL(xy, amp_jZuno_j, plus, minus, plus, plus);
ASSIGN_HEL(xy, amp_jZuno_j, plus, plus, minus, minus);
ASSIGN_HEL(xy, amp_jZuno_j, plus, plus, minus, plus);
ASSIGN_HEL(xy, amp_jZuno_j, plus, plus, plus, minus);
ASSIGN_HEL(xy, amp_jZuno_j, plus, plus, plus, plus);
#undef ASSIGN_HEL
return xy;
}
/**
* @brief Z+Jets Unordered Contribution, unordered opposite to Z side
* @tparam h1 Helicity of line 1 (Z emission)
* @tparam hl Lepton Helicity
* @tparam h2 Helicity of line 2 (unordered emission)
* @tparam hg Helicity of unordered gluon
* @param pa Incoming Particle 1 (Z emission)
* @param pb Incoming Particle 2 (unordered emission)
* @param p1 Outgoing Particle 1 (Z emission)
* @param p2 Outgoing Particle 2 (unordered emission)
* @param pg Unordered Gluon
* @param pep Outgoing positron
* @param pem Outgoing electron
* @returns X: (U1-L), Y: (U2+l)
*
* Calculates j_Z^\mu j_{uno}_\mu. Ie, unordered with Z emission opposite side.
*/
template<Helicity h1, Helicity hl, Helicity h2, Helicity hg>
XY amp_jZ_juno(
const HLV & pa, const HLV & pb,
const HLV & p1, const HLV & p2, const HLV & pg,
const HLV & pep, const HLV & pem
){
const COM u1 = U1_jV<h1, hl, h2, hg>(pa, p1, pb, p2, pg, pem, pep);
const COM u2 = U2_jV<h1, hl, h2, hg>(pa, p1, pb, p2, pg, pem, pep);
const COM l = L_jV <h1, hl, h2, hg>(pa, p1, pb, p2, pg, pem, pep);
return {u1 - l, u2 + l};
}
MultiArray<XY, 2, 2, 2, 2> jZ_juno(
const HLV & pa, const HLV & pb,
const HLV & p1, const HLV & p2, const HLV & pg,
const HLV & pep, const HLV & pem
){
using helicity::plus;
using helicity::minus;
MultiArray<XY, 2, 2, 2, 2> xy;
// NOLINTNEXTLINE
#define ASSIGN_HEL(XY, J, H1, H2, H3, H4) \
XY[H1][H2][H3][H4] = J<H1, H2, H3, H4>(pa, pb, p1, p2, pg, pep, pem)
ASSIGN_HEL(xy, amp_jZ_juno, minus, minus, minus, minus);
ASSIGN_HEL(xy, amp_jZ_juno, minus, minus, minus, plus);
ASSIGN_HEL(xy, amp_jZ_juno, minus, minus, plus, minus);
ASSIGN_HEL(xy, amp_jZ_juno, minus, minus, plus, plus);
ASSIGN_HEL(xy, amp_jZ_juno, minus, plus, minus, minus);
ASSIGN_HEL(xy, amp_jZ_juno, minus, plus, minus, plus);
ASSIGN_HEL(xy, amp_jZ_juno, minus, plus, plus, minus);
ASSIGN_HEL(xy, amp_jZ_juno, minus, plus, plus, plus);
ASSIGN_HEL(xy, amp_jZ_juno, plus, minus, minus, minus);
ASSIGN_HEL(xy, amp_jZ_juno, plus, minus, minus, plus);
ASSIGN_HEL(xy, amp_jZ_juno, plus, minus, plus, minus);
ASSIGN_HEL(xy, amp_jZ_juno, plus, minus, plus, plus);
ASSIGN_HEL(xy, amp_jZ_juno, plus, plus, minus, minus);
ASSIGN_HEL(xy, amp_jZ_juno, plus, plus, minus, plus);
ASSIGN_HEL(xy, amp_jZ_juno, plus, plus, plus, minus);
ASSIGN_HEL(xy, amp_jZ_juno, plus, plus, plus, plus);
#undef ASSIGN_HEL
return xy;
}
} // Anonymous Namespace
std::vector <double> ME_Z_qQ(const HLV & pa, const HLV & pb, const HLV & p1, const HLV & p2,
const HLV & pep, const HLV & pem,
const ParticleID aptype, const ParticleID bptype,
ParticleProperties const & zprop,
const double stw2, const double ctw
){
using helicity::minus;
using helicity::plus;
const HLV pZ = pep + pem;
const COM propZ = ZProp(pZ.m2(), zprop);
const COM propG = GProp(pZ.m2());
MultiArray<COM, 2, 2> pref_top = Z_amp_pref(aptype, propZ, propG, stw2, ctw);
MultiArray<COM, 2, 2> pref_bot = Z_amp_pref(bptype, propZ, propG, stw2, ctw);
MultiArray<COM, 2, 2, 2> coeff_top = jZ_j(pa, pb, p1, p2, pep, pem);
MultiArray<COM, 2, 2, 2> coeff_bot = jZ_j(pb, pa, p2, p1, pep, pem);
double sum_top=0.;
double sum_bot=0.;
double sum_mix=0.;
for(auto h1: {minus, plus}){
for(auto hl: {minus, plus}){
for(auto h2: {minus, plus}){
const COM res_top = pref_top[h1][hl] * coeff_top[h1][hl][h2];
const COM res_bot = pref_bot[h2][hl] * coeff_bot[h2][hl][h1];
sum_top += norm(res_top);
sum_bot += norm(res_bot);
sum_mix += 2.0 * real(res_top * conj(res_bot));
}
}
}
return {sum_top, sum_bot, sum_mix};
}
double ME_Z_qg(const HLV & pa, const HLV & pb, const HLV & p1, const HLV & p2,
const HLV & pep, const HLV & pem,
const ParticleID aptype, const ParticleID /*bptype*/,
ParticleProperties const & zprop,
const double stw2, const double ctw
){
using helicity::minus;
using helicity::plus;
const HLV pZ = pep + pem;
const COM propZ = ZProp(pZ.m2(), zprop);
const COM propG = GProp(pZ.m2());
MultiArray<COM, 2, 2> pref = Z_amp_pref(aptype, propZ, propG, stw2, ctw);
MultiArray<COM, 2, 2, 2> coeff = jZ_j(pa, pb, p1, p2, pep, pem);
double sum = 0.;
for(auto h1: {minus, plus}){
for(auto hl: {minus, plus}){
for(auto h2: {minus, plus}){
sum += norm(pref[h1][hl] * coeff[h1][hl][h2]);
}
}
}
return sum;
}
std::vector <double> ME_Zuno_qQ(const HLV & pa, const HLV & pb,
const HLV & pg, const HLV & p1, const HLV & p2,
const HLV & pep, const HLV & pem,
const ParticleID aptype, const ParticleID bptype,
ParticleProperties const & zprop,
const double stw2, const double ctw
){
using helicity::minus;
using helicity::plus;
const HLV pZ = pep + pem;
const COM propZ = ZProp(pZ.m2(), zprop);
const COM propG = GProp(pZ.m2());
MultiArray<COM, 2, 2> prefact_top = Z_amp_pref(aptype, propZ, propG, stw2, ctw);
MultiArray<COM, 2, 2> prefact_bot = Z_amp_pref(bptype, propZ, propG, stw2, ctw);
const MultiArray<XY, 2, 2, 2, 2> coeff_top = jZuno_j(pa, pb, pg, p1, p2, pep, pem);
const MultiArray<XY, 2, 2, 2, 2> coeff_bot = jZ_juno(pb, pa, p2, p1, pg, pep, pem);
double sum_top=0.;
double sum_bot=0.;
double sum_mix=0.;
for(auto h1: {minus, plus}){
for(auto hl: {minus, plus}){
for(auto h2: {minus, plus}){
for(auto hg: {minus, plus}){
const COM pref_top = prefact_top[h1][hl];
const COM x_top = coeff_top[h1][hl][h2][hg].X;
const COM y_top = coeff_top[h1][hl][h2][hg].Y;
const COM pref_bot = prefact_bot[h2][hl];
const COM x_bot = coeff_bot[h2][hl][h1][hg].X;
const COM y_bot = coeff_bot[h2][hl][h1][hg].Y;
sum_top += norm(pref_top) * (C_A*C_F*C_F/2.*(norm(x_top)+norm(y_top))
- C_F/2.*(x_top*conj(y_top)).real());
sum_bot += norm(pref_bot) * (C_A*C_F*C_F/2.*(norm(x_bot)+norm(y_bot))
- C_F/2.*(x_bot*conj(y_bot)).real());
const COM xx = C_A*C_F*C_F/2. * pref_top * x_top * conj(pref_bot * x_bot);
const COM yy = C_A*C_F*C_F/2. * pref_top * y_top * conj(pref_bot * y_bot);
const COM xy = -C_F/2. * (pref_top * x_top * conj(pref_bot * y_bot)
+ pref_top * y_top * conj(pref_bot * x_bot));
sum_mix += 2.0 * real(xx + yy + xy);
}
}
}
}
//Helicity sum and average over initial states
const double pref = 1./(4.*C_A*C_A);
return {sum_top*pref, sum_bot*pref, sum_mix*pref};
}
double ME_Zuno_qg(const HLV & pa, const HLV & pb,
const HLV & pg, const HLV & p1, const HLV & p2,
const HLV & pep, const HLV & pem,
const ParticleID aptype, const ParticleID /*bptype*/,
ParticleProperties const & zprop,
const double stw2, const double ctw
){
using helicity::minus;
using helicity::plus;
const HLV pZ = pep + pem;
const COM propZ = ZProp(pZ.m2(), zprop);
const COM propG = GProp(pZ.m2());
MultiArray<COM, 2, 2> pref = Z_amp_pref(aptype, propZ, propG, stw2, ctw);
const auto coeff = jZuno_j(pa, pb, pg, p1, p2, pep, pem);
double sum = 0.;
for(auto h1: {minus, plus}){
for(auto hl: {minus, plus}){
for(auto h2: {minus, plus}){
for(auto hg: {minus, plus}){
const COM X = coeff[h1][hl][h2][hg].X;
const COM Y = coeff[h1][hl][h2][hg].Y;
sum += norm(pref[h1][hl]) * (C_A*C_F*C_F/2.*(norm(X)+norm(Y))
- C_F/2.*(X*conj(Y)).real());
}
}
}
}
//Helicity sum and average over initial states
return sum / (4.*C_A*C_A);
}
} // namespace currents
} // namespace HEJ

File Metadata

Mime Type
text/x-diff
Expires
Sat, Dec 21, 12:42 PM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4017357
Default Alt Text
(34 KB)

Event Timeline