File indexing completed on 2025-04-19 09:10:06
0001 #ifndef METOOLS_Explicit_Vertex_H
0002 #define METOOLS_Explicit_Vertex_H
0003
0004 #include "METOOLS/Explicit/Vertex_Key.H"
0005 #include "METOOLS/Explicit/Current.H"
0006 #include "METOOLS/Explicit/Color_Calculator.H"
0007 #include "METOOLS/Explicit/Lorentz_Calculator.H"
0008
0009 namespace METOOLS {
0010
0011 typedef std::vector<Complex> Complex_Vector;
0012 typedef std::vector<Complex_Vector> Complex_Matrix;
0013
0014 class Dipole_Info;
0015 class Dipole_Kinematics;
0016
0017 class Vertex {
0018 protected:
0019
0020 MODEL::Single_Vertex *p_v;
0021
0022 Current_Vector m_j;
0023 Current *p_c;
0024
0025 Dipole_Info *p_info;
0026 Dipole_Kinematics *p_kin;
0027
0028 LC_Vector m_lc;
0029 CC_Vector m_cc;
0030
0031 CObject_Vector m_cjj;
0032
0033 Int_Vector *p_h;
0034
0035 bool m_sign, m_zero;
0036 size_t m_fperm, m_stype;
0037
0038 double m_icplfac;
0039
0040 static size_t s_vlmode;
0041
0042 static std::map<std::string,Int_Vector> s_h;
0043
0044 std::string CVLabel() const;
0045
0046 friend class Lorentz;
0047 friend class Color;
0048
0049 public:
0050
0051
0052 Vertex(const Vertex_Key &sv);
0053
0054
0055 ~Vertex();
0056
0057
0058 void Evaluate();
0059
0060 void FindPermutation();
0061 void InitPols();
0062
0063 bool Map(const Vertex &v);
0064
0065 std::string VId() const;
0066 std::string VLabel() const;
0067
0068 void CollectGraphs(Graph_Node *graph) const;
0069
0070 void AddJ(const Current_Vector &j);
0071
0072 const std::vector<int> &Order() const;
0073 int Order(const size_t &id) const;
0074
0075
0076 inline void AddJ(Current *const j)
0077 { if (j) { m_j.push_back(j); j->AttachOut(this); } }
0078 inline Current *J(const size_t &i) const { return m_j[i]; }
0079 inline const Current_Vector &J() const { return m_j; }
0080
0081 inline void SetJC(Current *const c,const bool a=true)
0082 { p_c=c; if (c!=NULL && a) c->AttachIn(this); }
0083 inline Current *JC() const { return p_c; }
0084
0085 inline void ClearJ() { m_j.clear(); }
0086
0087 inline Dipole_Info *Info() const { return p_info; }
0088 inline Dipole_Kinematics *Kin() const { return p_kin; }
0089
0090 inline void AddJ(CObject *const c) const
0091 {
0092 if (m_sign) c->Invert();
0093 if (m_icplfac!=1.0) c->Divide(m_icplfac);
0094 p_c->AddJ(c);
0095 }
0096
0097 inline void SetCplFac(const double &fac) { m_icplfac=1.0/fac; }
0098
0099 inline void SetZero(const bool zero=true) { m_zero=zero; }
0100
0101 inline bool Zero() const { return m_zero; }
0102
0103 inline bool Sign() const { return m_sign; }
0104
0105 inline bool Active() const { return m_lc.size() && m_cc.size(); }
0106
0107 inline size_t FPerm() const { return m_fperm; }
0108
0109 inline static void SetVLMode(const size_t &mode) { s_vlmode=mode; }
0110
0111 inline static size_t VLMode() { return s_vlmode; }
0112
0113 inline const LC_Vector &Lorentz() const { return m_lc; }
0114 inline const CC_Vector &Color() const { return m_cc; }
0115
0116 inline size_t H(const size_t &i) const { return (*p_h)[i]; }
0117
0118 inline MODEL::Single_Vertex *V() const { return p_v; }
0119
0120 inline size_t SType() const { return m_stype; }
0121
0122 };
0123
0124 std::ostream &operator<<(std::ostream &str,const Vertex &v);
0125
0126 }
0127
0128 #endif