File indexing completed on 2025-04-19 09:09:45
0001 #ifndef AMEGIC_Amplitude_Pfunc_H
0002 #define AMEGIC_Amplitude_Pfunc_H
0003
0004 #include "ATOOLS/Phys/Flavour.H"
0005 #include <list>
0006
0007 namespace AMEGIC {
0008 class Pfunc {
0009 public:
0010 int* arg;
0011 int argnum;
0012 int momnum;
0013 Complex value;
0014 int on;
0015 int zerowidth;
0016 int haspol;
0017 ATOOLS::Flavour fl;
0018
0019
0020 Pfunc() {argnum = 0;}
0021 Pfunc(int a) {
0022 argnum = a;
0023 arg = new int[argnum];
0024 haspol = 0;
0025 zerowidth = 0;
0026 }
0027 Pfunc(const Pfunc& p) {
0028 argnum = 0;
0029 *this = p;
0030 }
0031 ~Pfunc() {
0032 if (argnum>0) delete[] arg;
0033 }
0034
0035 Pfunc& operator=(const Pfunc& p) {
0036 if (this!=&p) {
0037 if (argnum>0) delete[] arg;
0038 argnum = p.argnum;
0039 if (argnum>0) {
0040 arg = new int[argnum];
0041 for (int i=0;i<argnum;i++) arg[i] = p.arg[i];
0042 }
0043
0044 momnum = p.momnum;
0045 value = p.value;
0046 on = p.on;
0047 haspol = p.haspol;
0048 zerowidth = p.zerowidth;
0049 fl = p.fl;
0050 }
0051 return *this;
0052 }
0053
0054 friend std::ostream& operator<<(std::ostream& os, Pfunc& pf) {
0055 os<<" mn:"<<pf.momnum<<" argn:"<<pf.argnum<<" on:"<<pf.on<<" hp:"<<pf.haspol
0056 <<" fl:"<<pf.fl<<std::endl;
0057 os<<" arg(";
0058 for (int i=0; i<pf.argnum; ++i)
0059 os<<" "<<pf.arg[i];
0060 return os<<" )"<<std::endl;
0061 }
0062
0063 };
0064 typedef std::vector<Pfunc*> Pfunc_List;
0065 typedef Pfunc_List::iterator Pfunc_Iterator;
0066
0067 }
0068
0069 #endif