File indexing completed on 2025-04-19 09:10:17
0001 #ifndef YFS_Main_Dipole_H
0002 #define YFS_Main_Dipole_H
0003
0004 #include "ATOOLS/Phys/Particle.H"
0005 #include "ATOOLS/Math/Poincare.H"
0006
0007
0008 using namespace ATOOLS;
0009
0010 namespace YFS{
0011
0012 struct dipoletype {
0013 enum code {
0014 initial = 0,
0015 final = 1,
0016 ifi = 2
0017 };
0018 };
0019
0020
0021
0022
0023 class Dipole
0024 {
0025 public:
0026 Dipole(Flavour_Vector const &fl, Vec4D_Vector const &mom,
0027 Vec4D_Vector const &born, dipoletype::code d, const double alpha);
0028 ~Dipole();
0029
0030 std::vector<double> m_masses, m_charges, m_theta, m_Q;
0031 Vec4D_Vector m_dipolePhotons, m_dipolePhotonsEEX;
0032 std::vector<std::string> m_names;
0033 std::vector<double> m_pk1, m_pk2;
0034 double m_QiQj, m_Qi, m_Qj, m_thetai, m_thetaj, m_thetaij, m_sp, m_b1, m_b2, m_gamma, m_gammap, m_alp, m_alpi,m_rescale_alpha;
0035 bool m_setBorn, m_setbeams=1,m_sameflav;
0036 int m_Nphotons, m_resonance, m_betaorder;
0037 double m_ranPhi, m_ranTheta, m_born;
0038 dipoletype::code m_type;
0039 Vec4D_Vector m_momenta, m_bornmomenta, m_oldmomenta, m_newmomenta, m_ghost, m_beams, m_eikmomentum;
0040 Flavour_Vector m_flavs;
0041 Vec4D m_photonSum, m_QFrame;
0042 Poincare *p_boost, *p_rotate, *p_rotatex, *p_rotatey, *p_Pboost, *p_Qboost;
0043 void PrintInfo();
0044 void AddPhotonsToDipole(Vec4D_Vector &Photons);
0045 void AddPhotonToDipole(Vec4D &Photon);
0046 inline void ClearPhotons() { m_dipolePhotons.clear(); };
0047 inline Vec4D Momentum(int i) { return m_momenta[i]; }
0048 inline void SetMomentum(int i, Vec4D mom) { m_momenta[i] = mom; }
0049 inline void SetEikMomentum(int i, Vec4D mom) { m_eikmomentum[i] = mom; }
0050 inline void SetBeams(int i, Vec4D mom) { m_beams[i] = mom; }
0051 void AddToGhosts(Vec4D &p);
0052 double Mass();
0053 double Eikonal(const Vec4D &k,const Vec4D &p1,const Vec4D &p2);
0054 double EikonalMassless(const Vec4D &k,const Vec4D &p1,const Vec4D &p2);
0055 double Eikonal(const Vec4D &k);
0056 double EikonalInterferance(const Vec4D &k);
0057 double EEX(const int betaorder);
0058 double VirtualEEX(const int betaorder);
0059 double Hard(const Vec4D & k, int i=0);
0060 double Hard(const Vec4D & k1, const Vec4D & k2);
0061 double Hard(const Vec4D & k1, const Vec4D & k2, const Vec4D & k3);
0062 double Beta1(const Vec4D & k1);
0063 double Beta2(const Vec4D & k1, const Vec4D & k2);
0064 double Beta3(const Vec4D & k1, const Vec4D & k2,const Vec4D & k3);
0065 double xi(const double &alp, const double &beta, const double &gamma);
0066 double xi(const double &alp, const double &a1, const double &b1, const double &a2, const double &b2);
0067 void Boost();
0068 void BoostLab();
0069 void Boost(Vec4D &p);
0070 void RandomRotate(Vec4D &p);
0071 void BoostToQFM(bool boostback);
0072 void BoostToCMS(Vec4D_Vector &k, bool boostback=false);
0073 void CalculateGamma();
0074 void Clean();
0075 bool IsDecayAllowed();
0076 Vec4D Sum();
0077 inline int size() {return m_momenta.size();}
0078 inline Vec4D GetBornMomenta(int i) { return m_bornmomenta[i];}
0079 inline Vec4D_Vector GetBornMomenta() { return m_bornmomenta;}
0080 inline Vec4D GetMomenta(int i) { return m_momenta[i];}
0081 inline Vec4D_Vector GetMomenta() { return m_momenta;}
0082 inline Vec4D GetNewMomenta(int i) { return m_newmomenta[i];}
0083 inline Vec4D_Vector GetNewMomenta() { return m_newmomenta;}
0084 inline Vec4D GetOldMomenta(int i) { return m_oldmomenta[i];}
0085 inline Vec4D GetEikMomenta(int i) { return m_eikmomentum[i];}
0086 inline Flavour GetFlav(int i) { return m_flavs[i];}
0087 inline Vec4D_Vector GetPhotons() { return m_dipolePhotons;}
0088 inline Vec4D GetPhotonSum() { return m_photonSum;}
0089 inline Vec4D GetGhost(int i) { return m_ghost[i];}
0090 inline dipoletype::code Type() {return m_type;}
0091 inline void AddPhotonsSumToDipole(Vec4D k) {m_photonSum = k;}
0092 inline double Sprime() {return m_sp;}
0093 inline void SetAlpha(double alp) { m_alp=alp; m_alpi=alp/M_PI;}
0094 inline void SetNPhoton(int N) {m_Nphotons = N; }
0095 inline void SetBorn(double B) {m_born = B; }
0096 inline bool IsResonance() {return m_resonance;}
0097 inline void SetResonance(bool res) { m_resonance=res;}
0098 inline bool IsSame() {return m_sameflav;}
0099 inline double ChargeNorm() {return -m_QiQj*m_thetaij;}
0100 inline void SetSudakovs(std::vector<double> y, std::vector<double> z) {m_pk1 =y; m_pk2=z;}
0101
0102 };
0103
0104 std::ostream& operator<<(std::ostream &out, const Dipole &Dip);
0105 std::ostream &operator<<(std::ostream &out,const dipoletype::code &c);
0106 }
0107 #endif