Page MenuHomeHEPForge

No OneTemporary

diff --git a/current_generator/W_central_qqbar.frm b/current_generator/W_central_qqbar.frm
new file mode 100644
index 0000000..011271e
--- /dev/null
+++ b/current_generator/W_central_qqbar.frm
@@ -0,0 +1,101 @@
+*/**
+* \brief Calculation of W + jets with central qqbar emission, W emitted from extremal leg
+*
+* \authors The HEJ collaboration (see AUTHORS for details)
+* \date 2020
+* \copyright GPLv2 or later
+*/
+#include- include/helspin.frm
+#include- include/write.frm
+
+i mu1,...,mu20;
+i mu,nu,rho,sigma;
+cf T1a, T4b, Xunc, Xcro, X1a, X4b, V3g, JV;
+v p1,pa,p4,pb,pq,pqbar,pl,plbar,q1,q3,q11,q12;
+s h;
+s tunc1,tunc2,tcro1,tcro2,s2AB,s3AB,s23AB;
+s t1,t3,s12,s13,s1A,s1B,sa2,sa3,saA,saB,s42,s43,s4A,s4B,sb2,sb3,sbA,sbB;
+cf m2;
+
+#do h1={+,-}
+ #do h2={+,-}
+ l [M_uncross_W `h1'`h2'] = T1a(`h1'1, mu)*T4b(`h2'1, nu)*Xunc(mu, nu);
+ l [M_cross_W `h1'`h2'] = T1a(`h1'1, mu)*T4b(`h2'1, nu)*Xcro(mu, nu);
+ l [M_sym_W `h1'`h2'] = T1a(`h1'1, mu)*T4b(`h2'1, nu)*(
+ X1a(mu, nu, sigma) - X4b(mu, nu, sigma) + V3g(mu, nu, sigma)
+ )/s23AB * JV(sigma);
+ #enddo
+#enddo
+
+id T1a(h?, mu?) = Current(h, p1, mu, pa);
+id T4b(h?, mu?) = Current(h, p4, mu, pb);
+id Xunc(mu, nu) = -Current(-1, pl, sigma, plbar)*(
+ - Current(-1, pq, sigma, pq + pl + plbar, mu, q3 + pqbar, nu, pqbar)/s2AB/tunc2
+ + Current(-1, pq, mu, q1 - pq, sigma, q3 + pqbar, nu, pqbar)/tunc1/tunc2
+ + Current(-1, pq, mu, q1 - pq, nu, pqbar + pl + plbar, sigma, pqbar)/tunc1/s3AB
+);
+id Xcro(mu, nu) = -Current(-1, pl, sigma, plbar)*(
+ - Current(-1, pq, nu, q3 + pq, mu, pqbar + pl + plbar, sigma, pqbar)/tcro1/s3AB
+ + Current(-1, pq, nu, q3 + pq, sigma, q1 - pqbar, mu, pqbar)/tcro1/tcro2
+ + Current(-1, pq, sigma, pq + pl + plbar, nu, q1 - pqbar, mu, pqbar)/s2AB/tcro2
+);
+id X1a(mu, nu, sigma) = t1*d_(mu, nu)*(
+ + p1(sigma)/(s12 + s13 + s1A + s1B)
+ + pa(sigma)/(sa2 + sa3 + saA + saB)
+);
+id X4b(mu, nu, sigma) = t3*d_(mu, nu)*(
+ + p4(sigma)/(s42 + s43 + s4A + s4B)
+ + pb(sigma)/(sb2 + sb3 + sbA + sbB)
+);
+id V3g(mu, nu, sigma) = (
+ + (q1(nu) + pq(nu) + pqbar(nu) + pl(nu) + plbar(nu))*d_(mu, sigma)
+ + (q3(mu) - pq(mu) - pqbar(mu) - pl(mu) - plbar(mu))*d_(nu, sigma)
+ - (q1(sigma) + q3(sigma))*d_(mu, nu)
+);
+id JV(sigma?) = -i_*(
+ + Current(-1, pq, rho, pq + pl + plbar, sigma, pqbar)/s2AB
+ - Current(-1, pq, sigma, pqbar + pl + plbar, rho, pqbar)/s3AB
+)*Current(-1, pl, rho, plbar);
+
+multiply replace_(
+ s2AB, m2(pl+plbar+pq),
+ s3AB, m2(pl+plbar+pqbar),
+ s23AB, m2(pl+plbar+pq+pqbar),
+ tunc1, m2(q1-pq),
+ tunc2, m2(q3+pqbar),
+ tcro1, m2(q3+pq),
+ tcro2, m2(q1-pqbar),
+ t1, m2(q1),
+ t3, m2(q3),
+ s12, m2(p1+pq),
+ s13, m2(p1+pqbar),
+ s1A, m2(p1+pl),
+ s1B, m2(p1+plbar),
+ sa2, m2(pa+pq),
+ sa3, m2(pa+pqbar),
+ saA, m2(pa+pl),
+ saB, m2(pa+plbar),
+ s42, m2(p4+pq),
+ s43, m2(p4+pqbar),
+ s4A, m2(p4+pl),
+ s4B, m2(p4+plbar),
+ sb2, m2(pb+pq),
+ sb3, m2(pb+pqbar),
+ sbA, m2(pb+pl),
+ sbB, m2(pb+plbar)
+);
+multiply replace_(q3, q1-pl-plbar-pq-pqbar);
+* replace q1 by sum of lightlike momenta
+* @TODO: choose q11 as collinear to some other vector
+multiply replace_(q1, q11-q12);
+.sort
+#call ContractCurrents()
+.sort
+format O4;
+format c;
+#call WriteHeader(`OUTPUT')
+#call WriteOptimised(`OUTPUT',M_uncross_W,2,pa,p1,pb,p4,pq,pqbar,pl,plbar,q11,q12)
+#call WriteOptimised(`OUTPUT',M_cross_W,2,pa,p1,pb,p4,pq,pqbar,pl,plbar,q11,q12)
+#call WriteOptimised(`OUTPUT',M_sym_W,2,pa,p1,pb,p4,pq,pqbar,pl,plbar,q11,q12)
+#call WriteFooter(`OUTPUT')
+.end
diff --git a/current_generator/include/write.frm b/current_generator/include/write.frm
index 0c7f119..a9023d3 100644
--- a/current_generator/include/write.frm
+++ b/current_generator/include/write.frm
@@ -1,131 +1,133 @@
* Write start of C++ header to `OUTPUT'
#procedure WriteHeader(OUTPUT)
#write <`OUTPUT'> "#pragma once"
#write <`OUTPUT'> ""
#write <`OUTPUT'> "#include <complex>"
#write <`OUTPUT'> "#include \"HEJ/helicity.hh\""
#write <`OUTPUT'> "#include \"HEJ/LorentzVector.hh\""
#write <`OUTPUT'> "#include \"HEJ/Tensor.hh\""
#write <`OUTPUT'> ""
#write <`OUTPUT'> "namespace HEJ {"
#endprocedure
* Write optimised expression to C++ header `OUTPUT'
#procedure WriteOptimised(OUTPUT,EXPRESSION,NUMHELICITIES,?MOMENTA)
#write <`OUTPUT'> " template<%"
#define FIRST "1"
#do i=1,`NUMHELICITIES'
#ifdef `FIRST'
#undefine FIRST
#write <`OUTPUT'> "Helicity%"
#else
#write <`OUTPUT'> ", Helicity%"
#endif
#enddo
#write <`OUTPUT'> ">"
#write <`OUTPUT'> " std::complex<double> `EXPRESSION'("
#call WriteMomenta(`?MOMENTA')
#write <`OUTPUT'> "\n );\n"
#call WriteOptimisedHelper(`OUTPUT',`EXPRESSION',`NUMHELICITIES',`?MOMENTA')
#endprocedure
*INTERNAL PROCEDURE
#procedure WriteOptimisedHelper(OUTPUT,EXPRESSION,NUMHELICITIES,?REST)
#if `NUMHELICITIES' > 0
#do H={+,-}
#call WriteOptimisedHelper(`OUTPUT',`EXPRESSION',{`NUMHELICITIES'-1},`?REST',`H')
#enddo
#else
#define HELSTRING ""
#define TEMPLATEARGS ""
#define MOMENTA ""
#do ARG={`?REST'}
#if ("`ARG'" == "+") || ("`ARG'" == "-")
* arguments that define helicities
#redefine HELSTRING "`HELSTRING'`ARG'"
#if "`TEMPLATEARGS'" != ""
#redefine TEMPLATEARGS "`TEMPLATEARGS',"
#endif
#if "`ARG'" == "+"
#redefine TEMPLATEARGS "`TEMPLATEARGS'Helicity::plus"
#else
#redefine TEMPLATEARGS "`TEMPLATEARGS'Helicity::minus"
#endif
#else
* arguments that define momenta
#if "`MOMENTA'" != ""
#redefine MOMENTA "`MOMENTA',"
#endif
#redefine MOMENTA "`MOMENTA'`ARG'"
#endif
#enddo
#optimize [`EXPRESSION'`HELSTRING']
#write "operations in [`EXPRESSION'`HELSTRING']: `optimvalue_'"
#write <`OUTPUT'> " template<>"
#write <`OUTPUT'> " inline std::complex<double> `EXPRESSION'<%"
* we use a loop here because otherwise FORM will insert line breaks
* if the string is too large
#define FIRST "1"
#do TEMPLATEARG={`TEMPLATEARGS'}
#ifdef `FIRST'
#undefine FIRST
#else
#write <`OUTPUT'> ", %"
#endif
#write <`OUTPUT'> "`TEMPLATEARG'%"
#enddo
#write <`OUTPUT'> ">("
#call WriteMomenta(`MOMENTA')
#write <`OUTPUT'> "\n ) {"
+ #write <`OUTPUT'> " static constexpr std::complex<double> i_{0., 1.};"
+ #write <`OUTPUT'> " (void) i_; //potentially unused"
#if `optimmaxvar_' > 0
#write <`OUTPUT'> " std::complex<double> %"
#define FIRST "1"
#do i=1,`optimmaxvar_'
#ifdef `FIRST'
#undefine FIRST
#write <`OUTPUT'> "Z`i'_%"
#else
#write <`OUTPUT'> ", Z`i'_%"
#endif
#enddo
#write <`OUTPUT'> ";"
#endif
#write <`OUTPUT'> " %O"
#write <`OUTPUT'> " return %E;" [`EXPRESSION'`HELSTRING']
#write <`OUTPUT'> " }\n" [`EXPRESSION'`HELSTRING']
#clearoptimize
#endif
#endprocedure
*INTERNAL PROCEDURE
* Write momenta as C++ function arguments to `OUTPUT'
#procedure WriteMomenta(?MOMENTA)
#define FIRST "1"
#do P={`?MOMENTA'}
#ifdef `FIRST'
#undefine FIRST
#write <`OUTPUT'> " CLHEP::HepLorentzVector const & `P'%"
#else
#write <`OUTPUT'> ",\n CLHEP::HepLorentzVector const & `P'%"
#endif
#enddo
#endprocedure
* Write end of C++ header to `OUTPUT'
#procedure WriteFooter(OUTPUT)
#write <`OUTPUT'> "}"
#endprocedure

File Metadata

Mime Type
text/x-diff
Expires
Sun, Feb 23, 3:01 PM (5 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4486799
Default Alt Text
(7 KB)

Event Timeline