File indexing completed on 2025-04-19 09:09:45
0001 #ifndef AMEGIC_Amplitude_CFColor_H
0002 #define AMEGIC_Amplitude_CFColor_H
0003
0004 #include "ATOOLS/Math/Matrix.H"
0005 #include "AMEGIC++/String/String_Tree.H"
0006 #include "AMEGIC++/Amplitude/Single_Amplitude.H"
0007 #include <map>
0008
0009 namespace AMEGIC {
0010
0011
0012 typedef std::map<std::string, Complex> TFprod_Table;
0013 typedef TFprod_Table::iterator TF_Iterator;
0014
0015 typedef std::map<char, char> Char_Map;
0016 typedef std::map<char, int> CharNum_Map;
0017
0018 class CFColor {
0019 static std::string noname;
0020
0021 String_Tree st;
0022 ATOOLS::CMatrix * CFC;
0023
0024 int * id;
0025 int * map;
0026 int mcount, ncount;
0027
0028 void ReplaceT(sknot*);
0029 void ReplaceD(sknot*,sknot*);
0030 void ReplaceG(sknot* m,sknot* m0=0);
0031 void ReplaceF(sknot*,CharNum_Map&,char&);
0032
0033
0034 int SingleReplaceD(sknot *,sknot *,char, char);
0035 void SingleReplaceF(sknot*,int&,CharNum_Map&,char&);
0036 void SingleReplaceFT(sknot*,int&,CharNum_Map&,char&);
0037
0038 int Compare(MODEL::Color_Function*,MODEL::Color_Function*);
0039 int CompareArg(int,int,int,MODEL::Color_Function*,MODEL::Color_Function*);
0040
0041 void ExtractIndices(sknot*,CharNum_Map&);
0042 char DeliverIndex(CharNum_Map&,char&);
0043 std::string BuildTChain(std::vector<std::string>);
0044 std::string MapFChain(std::vector<std::string>);
0045 TFprod_Table t_table;
0046 TFprod_Table f_table;
0047 public:
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063 CFColor(int,Single_Amplitude*,ATOOLS::Flavour *,
0064 char,char,std::string pID=noname,bool=false);
0065 ~CFColor();
0066
0067 void Output(std::string &);
0068
0069
0070
0071 inline const Complex& Mij(const int i,const int j) const
0072 {return (*CFC)[i][j];}
0073 inline const ATOOLS::CMatrix* GetCMatrix() const {return CFC;}
0074 inline int CFMap(int i) const {return map[i]; }
0075 inline int CFSign(int i) const {return (id[i]>=0) ? 1 : -1; }
0076 inline int MatrixSize() const {return ncount;}
0077 };
0078
0079 }
0080 #endif