#include "METOOLS/Explicit/Lorentz_Calculator.H" #include "METOOLS/Currents/C_Spinor.H" #include "METOOLS/Currents/C_Scalar.H" #include "METOOLS/Explicit/Vertex.H" #include "MODEL/Main/Single_Vertex.H" #include "ATOOLS/Org/Message.H" #include "ATOOLS/Org/Exception.H" using namespace ATOOLS; namespace METOOLS { template class FFS_Worker { public: typedef std::complex SComplex; typedef CSpinor CSpinorType; typedef CScalar CScalarType; inline SComplex PPlus(const CVec4 &p) const { return p[0]+p[ATOOLS::Spinor::R3()]; } inline SComplex PMinus(const CVec4 &p) const { return p[0]-p[ATOOLS::Spinor::R3()]; } inline SComplex PT(const CVec4 &p) const { return p[ATOOLS::Spinor::R1()]+ SComplex(0.0,1.0)*p[ATOOLS::Spinor::R2()]; } inline SComplex PTC(const CVec4 &p) const { return p[ATOOLS::Spinor::R1()]- SComplex(0.0,1.0)*p[ATOOLS::Spinor::R2()]; } CScalarType LorentzLeft(const CSpinorType &a,const CSpinorType &b) { #ifdef DEBUG__BG msg_Debugging()<<"<> L "< R "< L "< R "<; template class FFS_Calculator: public Lorentz_Calculator, public FFS_Worker { public: typedef CSpinor CSpinorType; typedef CScalar CScalarType; FFS_Calculator(const Vertex_Key &key): Lorentz_Calculator(key) {} std::string Label() const { return "FFS"; } CObject *Evaluate(const CObject_Vector &jj) { if (p_v->V()->id.back()==2) { CSpinorType *a(jj[1]->Get()); CSpinorType *b(jj[0]->Get()); return CScalarType::New (this->LorentzLeft(*a,*b)+this->LorentzRight(*a,*b)); } const CSpinorType &a(*jj[p_v->V()->id.back()]->Get()); const CScalarType &b(*jj[1-p_v->V()->id.back()]->Get()); return CSpinorType::New (this->LorentzLeft(a,b)+this->LorentzRight(a,b)); } };// end of class FFS_Calculator template class FFS_Calculator; template class FFSL_Calculator: public Lorentz_Calculator, public FFS_Worker { public: typedef CSpinor CSpinorType; typedef CScalar CScalarType; FFSL_Calculator(const Vertex_Key &key): Lorentz_Calculator(key) {} std::string Label() const { return "FFSL"; } CObject *Evaluate(const CObject_Vector &jj) { if (p_v->V()->id.back()==2) { CSpinorType *a(jj[1]->Get()); CSpinorType *b(jj[0]->Get()); return CScalarType::New(this->LorentzLeft(*a,*b)); } const CSpinorType &a(*jj[p_v->V()->id.back()]->Get()); const CScalarType &b(*jj[1-p_v->V()->id.back()]->Get()); return CSpinorType::New(this->LorentzLeft(a,b)); } };// end of class FFSL_Calculator template class FFSL_Calculator; template class FFSR_Calculator: public Lorentz_Calculator, public FFS_Worker { public: typedef CSpinor CSpinorType; typedef CScalar CScalarType; FFSR_Calculator(const Vertex_Key &key): Lorentz_Calculator(key) {} std::string Label() const { return "FFSR"; } CObject *Evaluate(const CObject_Vector &jj) { if (p_v->V()->id.back()==2) { CSpinorType *a(jj[1]->Get()); CSpinorType *b(jj[0]->Get()); return CScalarType::New(this->LorentzRight(*a,*b)); } const CSpinorType &a(*jj[p_v->V()->id.back()]->Get()); const CScalarType &b(*jj[1-p_v->V()->id.back()]->Get()); return CSpinorType::New(this->LorentzRight(a,b)); } };// end of class FFSR_Calculator template class FFSR_Calculator; }// end of namespace METOOLS using namespace METOOLS; DECLARE_GETTER(FFS_Calculator,"DFFS", Lorentz_Calculator,Vertex_Key); Lorentz_Calculator *ATOOLS::Getter >:: operator()(const Vertex_Key &key) const { return new FFS_Calculator(key); } void ATOOLS::Getter >:: PrintInfo(std::ostream &str,const size_t width) const { str<<"FFS vertex"; } DECLARE_GETTER(FFSL_Calculator,"DFFSL", Lorentz_Calculator,Vertex_Key); Lorentz_Calculator *ATOOLS::Getter >:: operator()(const Vertex_Key &key) const { return new FFSL_Calculator(key); } void ATOOLS::Getter >:: PrintInfo(std::ostream &str,const size_t width) const { str<<"FFSL vertex"; } DECLARE_GETTER(FFSR_Calculator,"DFFSR", Lorentz_Calculator,Vertex_Key); Lorentz_Calculator *ATOOLS::Getter >:: operator()(const Vertex_Key &key) const { return new FFSR_Calculator(key); } void ATOOLS::Getter >:: PrintInfo(std::ostream &str,const size_t width) const { str<<"FFSR vertex"; }