#include "peg_pic.h"


/*****************************************************/
/**** Secondary particle emission coefficients *******/
/*****************************************************/
/* Ep - impinjing particle energy, sigmd= V/Vx, ******/
/* En - the constant characterising wall material ****/
/*****************************************************/


/* The primary and the secondary particles are electrons */

void gamma_ee(float *mag, float Ep, float sigmd, float En) {
	float Enorm;

	Enorm= Ep/En;
	*mag = sigmd*Enorm*exp(2.*(1-sqrt(Enorm)));
}
/* END of gamma_ee */


/************************************************************/
/* The primary particle is ion, the secondary is - electron */

void gamma_ie(float *mag, float Ep, float sigmd, float En) {
	float vpr;

	vpr= sqrt(fabs(Ep))-En;
	
	if (vpr < 0.) {
		*mag = 0.;
	} else {
		*mag = sigmd*vpr;
	}
}

/* END of gamma_ie */

/*****************************************************/
