File indexing completed on 2025-04-19 09:09:45
0001 #ifndef MODEL_Interaction_Models_Vertex_H
0002 #define MODEL_Interaction_Models_Vertex_H
0003
0004 #include "ATOOLS/Math/MyComplex.H"
0005 #include "ATOOLS/Phys/Flavour.H"
0006 #include "MODEL/Main/Color_Function.H"
0007 #include "MODEL/Main/Model_Base.H"
0008 #include "AMEGIC++/Amplitude/Lorentz_Function.H"
0009 #include "AMEGIC++/Amplitude/Single_Vertex.H"
0010 #include <map>
0011 #include <vector>
0012
0013
0014 namespace AMEGIC {
0015
0016 typedef std::map<std::string,Complex> tscmap;
0017
0018 typedef std::vector<Single_Vertex *> Vertex_List;
0019 typedef std::map<ATOOLS::Flavour, Vertex_List> Vertex_Table;
0020
0021 class Vertex {
0022 int m_nvertex, m_n4vertex;
0023 std::vector<Single_Vertex> m_v;
0024 std::vector<Single_Vertex> m_v4;
0025 tscmap m_cplmap;
0026
0027 void CheckEqual(ATOOLS::Flavour**,short int&);
0028 void GenerateVertex();
0029 int CheckExistence(Single_Vertex&);
0030 int FermionRule(Single_Vertex& probe);
0031 int SetVertex(Single_Vertex&,Single_Vertex&,int,int,int,int a=99,int mode=0);
0032
0033 void ColorExchange(MODEL::Color_Function*,int,int,int,int);
0034 void LorentzExchange(MODEL::Lorentz_Function*,int,int,int,int);
0035
0036 public:
0037 int on;
0038 Vertex(MODEL::Model_Base *);
0039 ~Vertex();
0040
0041 void Print();
0042
0043
0044 inline Single_Vertex* operator[] (int n) {return &m_v[n];}
0045 inline const Single_Vertex* operator[] (int n) const {return &m_v[n];}
0046
0047 inline Single_Vertex* operator() (int n) {return &m_v4[n];}
0048 inline const Single_Vertex* operator() (int n) const {return &m_v4[n];}
0049
0050 inline int MaxNumber() const {return m_nvertex;}
0051
0052 inline int MaxNumber4() const {return m_n4vertex;}
0053
0054 inline tscmap* GetCouplings() { return &m_cplmap; }
0055
0056 void TexOutput();
0057
0058 int FindVertex(Single_Vertex*);
0059
0060 inline std::vector<Single_Vertex> &Vertices(int set)
0061 { return set?m_v4:m_v; }
0062 };
0063
0064 std::ostream& operator<<(std::ostream&, const Vertex&);
0065
0066 struct Amegic_Model {
0067 public:
0068
0069 MODEL::Model_Base *p_model;
0070 Vertex *p_vertex;
0071
0072 Amegic_Model(MODEL::Model_Base *model):
0073 p_model(model), p_vertex(new Vertex(model)) {}
0074
0075 ~Amegic_Model() { delete p_vertex; }
0076
0077 };
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146 }
0147 #endif