#include "PHASIC++/Channels/VHAAG_res.H" #include "ATOOLS/Org/Run_Parameter.H" #include "ATOOLS/Org/Message.H" #include "ATOOLS/Org/Scoped_Settings.H" #include "ATOOLS/Math/Random.H" #include "ATOOLS/Math/Permutation.H" #include "ATOOLS/Math/Poincare.H" #include "ATOOLS/Org/My_MPI.H" #include "PHASIC++/Channels/Channel_Elements.H" #include "PHASIC++/Channels/Channel_Generator.H" #include "PHASIC++/Process/Process_Base.H" #include "PHASIC++/Channels/Multi_Channel.H" #include using namespace PHASIC; using namespace ATOOLS; const double a1_s =1.5; const double s_s =.3; const double a1_sp =1.; const double s_sp1 =1.; const double s_sp2 =.5; const double a1_i =1.; const double a2_i =1.; const double s_i =1.; const double a1_iF =1.; const double a2_iF =.0; const double s_xx =.5; VHAAG_res::VHAAG_res(int _nin,int _nout,int pn,VHAAG_res* ovl) { nin=_nin; nout=_nout;n_ap=nin+nout-1; if (n_ap<5) { msg_Error()<<"Minimum number of final state particles for VHAAG_res integrator is 4!"<(); n_d1 = s["RES_D1"].SetDefault(2).Get(); n_d2 = s["RES_D2"].SetDefault(3).Get(); msg_Out()<<" Initialized VHAAG with "<RKF(); n_d1 = ovl->RD1(); n_d2 = ovl->RD2(); } Permutation pp(n_ap-2); int bp=pn%2; pn/=2; int* tp=pp.Get(pn); int i; for (i=0;i=n_d1) tp[i]+=2; std::vector perm(n_ap); perm[0] = 0; if (bp==0) { for (i=1;tp[i-1]!=1;i++) perm[i] = tp[i-1]; n_b=i;perm[i]=n_d1; for (;i perm, VHAAG_res* ovl) { p_perm = new int[n_ap]; p_perm[0] = 0; p_s = new double[n_ap]; for (int i=0;iGetSharedVegasList(); else p_sharedvegaslist = NULL; if (p_sharedvegaslist==NULL) { p_sharedvegaslist = new std::map; } m_type=Min(n_p1-1,n_ap-(n_p1+1))+1; if (n_p1-1>=n_ap-(n_p1+1) && n_b>n_p1) m_type=-m_type; if (n_p1-1Get()<0.5) eps=-eps; Vec3D pv = a*e1+b*e2+eps*ee; p1 = Vec4D(sqrt(ps+s1),pv); p2 = Vec4D(sqrt(ps+s2),-1.*pv); } void VHAAG_res::ConstructMomenta(double a1,double phi, double s1,double s2,double s, ATOOLS::Vec4D q1,ATOOLS::Vec4D& p1,ATOOLS::Vec4D& p2) { double ps = 0.25*(sqr(s-s1-s2)-4.*s1*s2)/s; if (q1.PPerp()!=0.||!IsZero(q1.Abs2()/Max(1.,sqr(q1[0])),1.0e-6)) { msg_Error()<<" Error in"<2;i--) { SingleSplit(r1,rQ,q[n-i],rQ,ms,ran); ran+=3; r1 = q[n-i]; ms-= s[n-i+1]; } SingleSplitF(r1,rQ,q[n-2],q[n-1],ms,ran); } double VHAAG_res::BranchWeight(ATOOLS::Vec4D q1,ATOOLS::Vec4D &Q, ATOOLS::Vec4D* q,double* s,int n,double *ran) { double wt=1.; ran+= 3*(n-2); double ms(s[n-1]); wt*=SingleSplitFWeight(q[n-3],Q,q[n-2],q[n-1],ms,ran); for (int i=3;i<=n;i++) { ran-= 3; ms+= s[n-i+1]; wt*=SingleSplitWeight(q[n-i-1],Q,q[n-i],Q,ms,ran); } return wt; } void VHAAG_res::GenerateWeight(ATOOLS::Vec4D *p,Cut_Data *cuts) { CalculateS0(cuts); double wt=1.; if (n_ap==4) { Vec4D Q(p[0]+p[1]); wt=SingleSplitF0Weight(p[0],Q,p[2],p[3],p_s[3],rans); weight = p_vegas->GenerateWeight(rans)/wt/pow(2.*M_PI,2); return; } for (int i=0;iGenerateWeight(rans); weight = vw/wt/pow(2.*M_PI,nout*3.-4.); } void VHAAG_res::GeneratePoint(ATOOLS::Vec4D *p,Cut_Data *cuts,double *ran) { CalculateS0(cuts); double *vran = p_vegas->GeneratePoint(ran); for(int i=0;iNIn(), m_nout=p_proc->NOut(); VHAAG_res *firsthaag=NULL,*hlp=NULL; Permutation pp(m_nin+m_nout-3); for (int j=0;jAdd(hlp=new VHAAG_res(m_nin,m_nout,2*j,firsthaag)); if (!firsthaag) firsthaag=hlp; p_mc->Add(hlp=new VHAAG_res(m_nin,m_nout,2*j+1,firsthaag)); if (!firsthaag) firsthaag=hlp; } return 0; } };// end of class VHAAG_res_Channel_Generator }// end of namespace PHASIC DECLARE_GETTER(VHAAG_res_Channel_Generator,"VHAAG_res", Channel_Generator,Channel_Generator_Key); Channel_Generator *ATOOLS::Getter :: operator()(const Channel_Generator_Key &args) const { return new VHAAG_res_Channel_Generator(args); } void ATOOLS::Getter:: PrintInfo(std::ostream &str,const size_t width) const { str<<"Vegas-improved HAAG integrator for resonance + jets"; }