Exemplo n.º 1
0
void TwoBodyDecay(Particle &parent, Particle &daughter1, Particle &daughter2, double thetad, double phid){
    double mom = TriangleFunc(parent.m, daughter1.m, daughter2.m);
    daughter1.ThreeMomentum(mom*sin(thetad)*cos(phid),mom*sin(thetad)*sin(phid),mom*cos(thetad));
    daughter2.ThreeMomentum(-mom*sin(thetad)*cos(phid),-mom*sin(thetad)*sin(phid),-mom*cos(thetad));
    daughter1.Lorentz(parent);
    daughter2.Lorentz(parent);
	Link_Particles(parent,daughter1);
	Link_Particles(parent,daughter2);
}
Exemplo n.º 2
0
//isotropic decay for parent -> daughter1 + daughter2
void TwoBodyDecay(Particle &parent, Particle &daughter1, Particle &daughter2){
    double thetad = acos(Random::Flat(-1,1));
    double phid = Random::Flat(0,1)*2*pi;
    double mom = TriangleFunc(parent.m, daughter1.m, daughter2.m);
    daughter1.ThreeMomentum(mom*sin(thetad)*cos(phid),mom*sin(thetad)*sin(phid),mom*cos(thetad));
    daughter2.ThreeMomentum(-mom*sin(thetad)*cos(phid),-mom*sin(thetad)*sin(phid),-mom*cos(thetad));
    daughter1.Lorentz(parent);
    daughter2.Lorentz(parent);
	Link_Particles(parent,daughter1);
	Link_Particles(parent,daughter2);
}
Exemplo n.º 3
0
void Nucleon_Scatter::scatterevent (Particle &DM, Particle &Nucleon, std::function<double(double)> Xsec, Linear_Interpolation& Xmax){
    double EDMMax = scatmax(DM.E);
	double EDMMin = scatmin(DM.E, DM.m, Nucleon.m); 
	double dsigmax = std::max(Xsec(EDMMax),Xmax.Interpolate(DM.E));
	double xe,thetaN,phiN,pN;
    while(true){
        xe = Random::Flat(0,1)*(EDMMax-EDMMin)+EDMMin;
        if(Xsec(xe)/dsigmax > Random::Flat(0,1)){
            thetaN = Ef_to_N_Theta(DM.E,xe,DM.m,Nucleon.m);
            phiN = Random::Flat(0,1)*2*pi;
            pN = sqrt(pow(DM.E+Nucleon.m-xe,2)-pow(Nucleon.m,2));
            Nucleon.ThreeMomentum(pN*sin(thetaN)*cos(phiN),pN*sin(thetaN)*sin(phiN),cos(thetaN)*pN);
            Nucleon.Rotate_y(DM.Theta());
            Nucleon.Rotate_z(DM.Phi());
            break;
        }
    }
}
Exemplo n.º 4
0
/*I should check that this is handled properly. Not quite sure that it is, though
it probably won't change very much if the angle is handled differently.
*/
void DecayDM_Off_Shell(Particle &daughter1, Particle &daughter2, Particle &mediator, Particle &parent, double theta){
    TwoBodyDecay(mediator, daughter1, daughter2, theta);
    mediator.ThreeMomentum(0,0,TriangleFunc(parent.m,mediator.m,0));
    daughter1.Lorentz(mediator);
    daughter2.Lorentz(mediator);
    double mtheta=acos(Random::Flat(-1,1));
    double mphi = Random::Flat(0,1)*2*pi;
    mediator.Rotate_z(mtheta);
    mediator.Rotate_y(mphi);
    daughter1.Rotate_z(mtheta);
    daughter1.Rotate_y(mphi);
    daughter2.Rotate_z(mtheta);
    daughter2.Rotate_y(mphi);
    mediator.Lorentz(parent);
    daughter1.Lorentz(parent);
    daughter2.Lorentz(parent);
	Link_Particles(parent,mediator);
	Link_Particles_Immediate(mediator,daughter1);
	Link_Particles_Immediate(mediator,daughter2);
}