added possibility to test delta injection
This commit is contained in:
@@ -61,12 +61,19 @@ inline int Injector::inject (std::vector<Particle> *particle_queue, const int &l
|
|||||||
particle_queue->push_back(PartFac.create_e(loc_m, v_ms, last_ID+1, last_ID+1));
|
particle_queue->push_back(PartFac.create_e(loc_m, v_ms, last_ID+1, last_ID+1));
|
||||||
break;
|
break;
|
||||||
case 3: // Delta Injection for Recombination Testing
|
case 3: // Delta Injection for Recombination Testing
|
||||||
loc_m = vec3(0,0,z_WGTS_end_m);
|
loc_m = vec3(0.,0.,z_WGTS_end_m);
|
||||||
E_eV = energy_eV;
|
E_eV = energy_eV;
|
||||||
//direction = vec3(0,0,-1);
|
//direction = vec3(0,0,-1);
|
||||||
v_ms = vec3(0,0,-1) * calc_v_ms_from_E_eV(E_eV, me_eV);
|
v_ms = vec3(0.,0.,-1.) * calc_v_ms_from_E_eV(E_eV, me_eV);
|
||||||
particle_queue->push_back(PartFac.create_e(loc_m, v_ms, last_ID+1, last_ID+1));
|
particle_queue->push_back(PartFac.create_e(loc_m, v_ms, last_ID+1, last_ID+1));
|
||||||
break;
|
break;
|
||||||
|
case 4:
|
||||||
|
loc_m = vec3(0.,0.,z_WGTS_end_m);
|
||||||
|
E_eV = energy_eV;
|
||||||
|
//direction = vec3(0,0,-1);
|
||||||
|
v_ms = vec3(0.,0.,-1.) * calc_v_ms_from_E_eV(E_eV, me_eV);
|
||||||
|
//particle_queue->push_back(PartFac.create_e(loc_m, v_ms, last_ID+1, last_ID+1));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw MyException("Katrin::injectElectron: Invalid Injection Method.");
|
throw MyException("Katrin::injectElectron: Invalid Injection Method.");
|
||||||
break;
|
break;
|
||||||
@@ -80,7 +87,8 @@ inline int Injector::inject (std::vector<Particle> *particle_queue, const int &l
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ions == 2) { // 2: Delta Injection for Testing Recombination
|
if (ions == 2) { // 2: Delta Injection for Testing Recombination
|
||||||
vec3 direction = vec3(0,0,-1);
|
vec3 direction = vec3(0.,0.,-1.);
|
||||||
|
vec3 loc_m = vec3(0.,0.,z_WGTS_end_m);
|
||||||
vec3 vTI_ms = direction * calc_v_ms_from_E_eV(E_eV, 2*mT_eV);
|
vec3 vTI_ms = direction * calc_v_ms_from_E_eV(E_eV, 2*mT_eV);
|
||||||
particle_queue->push_back(PartFac.create_T2I(loc_m, vTI_ms, last_ID+2, last_ID+2));
|
particle_queue->push_back(PartFac.create_T2I(loc_m, vTI_ms, last_ID+2, last_ID+2));
|
||||||
return 2;
|
return 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user