16 using namespace GiNaC;
22 DECLARE_FUNCTION_3P(Propagator)
23 DECLARE_FUNCTION_3P(InField)
24 DECLARE_FUNCTION_3P(OutField)
28 class Field2_SERIAL {
public:
static unsigned serial; };
29 template<
typename T1,
typename T2>
30 inline GiNaC::function Field(
const T1 & p1,
const T2 & p2) {
31 return GiNaC::function(Field2_SERIAL::serial, ex(p1), ex(p2));
34 class Field3_SERIAL {
public:
static unsigned serial; };
35 template<
typename T1,
typename T2,
typename T3>
36 inline GiNaC::function Field(
const T1 & p1,
const T2 & p2,
const T3 & p3) {
37 return GiNaC::function(Field3_SERIAL::serial, ex(p1), ex(p2), ex(p3));
40 class Vertex2_SERIAL {
public:
static unsigned serial; };
41 template<
typename T1,
typename T2>
42 inline GiNaC::function Vertex(
const T1 & p1,
const T2 & p2) {
43 return GiNaC::function(Vertex2_SERIAL::serial, ex(p1), ex(p2));
46 class Vertex3_SERIAL {
public:
static unsigned serial; };
47 template<
typename T1,
typename T2,
typename T3>
48 inline GiNaC::function Vertex(
const T1 & p1,
const T2 & p2,
const T3 & p3) {
49 return GiNaC::function(Vertex3_SERIAL::serial, ex(p1), ex(p2), ex(p3));
52 class Vertex4_SERIAL {
public:
static unsigned serial; };
53 template<
typename T1,
typename T2,
typename T3,
typename T4>
54 inline GiNaC::function Vertex(
const T1 & p1,
const T2 & p2,
const T3 & p3,
const T4 & p4) {
55 return GiNaC::function(Vertex4_SERIAL::serial, ex(p1), ex(p2), ex(p3), ex(p4));
58 class Vertex5_SERIAL {
public:
static unsigned serial; };
59 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
60 inline GiNaC::function Vertex(
const T1 & p1,
const T2 & p2,
const T3 & p3,
const T4 & p4,
const T5 & p5) {
61 return GiNaC::function(Vertex5_SERIAL::serial, ex(p1), ex(p2), ex(p3), ex(p4), ex(p5));
64 class Vertex6_SERIAL {
public:
static unsigned serial; };
65 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
66 inline GiNaC::function Vertex(
const T1 & p1,
const T2 & p2,
const T3 & p3,
const T4 & p4,
const T5 & p5,
const T6 & p6) {
67 return GiNaC::function(Vertex6_SERIAL::serial, ex(p1), ex(p2), ex(p3), ex(p4), ex(p5), ex(p6));
81 string LoopPrefix =
"q";
85 lst Amplitudes(symtab st);
92 static _init Process_init;
97 void DrawPDF(
const lst & amps,
string fn);
98 vector<lst>
ShrinkCut(ex amp, lst prop,
int n=1);
100 extern map<ex,string,ex_is_less>
LineTeX;
101 extern map<ex,string,ex_is_less>
VerTeX;
102 extern map<ex,string,ex_is_less>
InOutTeX;
122 ex
AZWPropagator(
const ex & e,
const ex & m=0,
const ex & xi=1);
123 ex
AZWGhostPropagator(
const ex & e,
const ex & m=0,
const ex & xi=1,
const ex & eta_G=1);
131 ex
QuarkAVertex(
const ex & e,
const ex & eq,
const ex & eta_e=-1);
132 ex
LeptonAVertex(
const ex & e,
const ex & eq,
const ex & eta_e=-1);
135 ex
IndexCC(ex e,
bool all=
true);
138 ex
QuarkSumL(
int qi, ex p, ex m,
bool color=
true);
145 ex
QuarkSumR(
int qi, ex p, ex m,
bool color=
true);
165 static ex FeynRulesSM(
const ex & amp,
const ex & xi=1);
166 static lst FeynRulesSM(
const lst & amps,
const ex & xi=1);
167 static ex FeynRulesQCD(
const ex & amp,
const ex & xi=1);
168 static lst FeynRulesQCD(
const lst & amps,
const ex & xi=1);
main interface to qgraf program
namespace for generating Feynman diagrams or amplitudes.
ex AntiQuarkSumL(int qi, ex p, ex m, bool color)
polarization sum for anti-quark
bool HasLoop(ex amp, lst prop)
check a amplitude has a loop w.r.t. propapagtor
ex AntiGhostSumL(int qi)
polarization sum for anti-ghost, note that we will add extra - here
ex IndexL2R(ex e, bool all)
Change Index from left to right, only affect li/di/ci/ti, external index start with dim/lim/cim/tim w...
ex GluonPropagator(const ex &e, const ex &xi)
Propagator for gluon.
ex LeptonAVertex(const ex &e, const ex &eq, const ex &eta_e)
l-lbar-A vertex
ex Gluon3Vertex(const ex &e, const ex &eta_s)
g-g-g vertex
ex GhostSumL(int qi)
polarization sum for ghost
ex AntiGhostSumR(int qi)
polarization sum for anti-ghost, note that we will add extra - here
void DrawPDF(const lst &s, string fn)
generate Feynman diagrams for the amplitudes, in PDF format
ex QuarkGluonVertex(const ex &e, const ex &eta_s)
q-qbar-g vertex
ex ScalarPropagator(const ex &e, const ex &m, const ex &xi)
Propagator for scalar.
ex J1SumL(int qi, ex p)
polarization sum for total angular momentum
map< ex, string, ex_is_less > LineTeX
ex LeptonPropagator(const ex &e, const ex &m)
Propagator for lepton.
vector< lst > ShrinkCut(ex amp, lst prop, int n)
cut the amplitude, and return the connected parts, may have many different cuts
ex AntiQuarkSumR(int qi, ex p, ex m, bool color)
polarization sum for anti-quark
ex AZWGhostPropagator(const ex &e, const ex &m, const ex &xi, const ex &eta_G)
Propagator for A/Z/W ghost.
map< ex, string, ex_is_less > VerTeX
ex Gluon4Vertex(const ex &e, const ex &eta_s)
g-g-g-g vertex
ex AntiQuarkSum(int qi, ex p, ex m, bool color=true)
ex GluonSum(int qi, bool color=true)
ex IndexCC(ex e, bool all)
ex GhostGluonVertex(const ex &e, const ex &eta_s, const ex &eta_G)
ghbar-gh-g vertex
ex QuarkPropagator(const ex &e, const ex &m)
Propagator for quark.
ex QuarkSumR(int qi, ex p, ex m, bool color)
polarization sum for quark
ex QuarkSumL(int qi, ex p, ex m, bool color)
polarization sum for quark
ex GhostSumR(int qi)
polarization sum for ghost
map< ex, string, ex_is_less > InOutTeX
ex AZWPropagator(const ex &e, const ex &m, const ex &xi)
Propagator for A/Z/W boson.
ex QuarkAVertex(const ex &e, const ex &eq, const ex &eta_e)
qbar-q-A vertex
ex GluonGhostPropagator(const ex &e, const ex &xi, const ex &eta_G)
Propagator for gluon ghost.
lst TopoLines(const ex &)
generate the topological lines for the amplitude
ex QuarkSum(int qi, ex p, ex m, bool color=true)
ex GluonSumR(int qi, bool color)
polarization sum for gluon
ex GluonSumL(int qi, bool color)
polarization sum for gluon