1. Added precalculation of integral values in thermal regime. 2. Minor Changes in Injection of \beta-electrons and ions.
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
//
|
|
// electron_drift.h
|
|
// mc_electron
|
|
//
|
|
// Created by Christian Reiling on 16.05.19.
|
|
// Copyright © 2019 Christian Reiling. All rights reserved.
|
|
//
|
|
|
|
#ifndef electron_drift_h
|
|
#define electron_drift_h
|
|
|
|
#include "drift_base.h"
|
|
|
|
|
|
class E_Mover_Drift : public Drift_Base {
|
|
public:
|
|
E_Mover_Drift(Particle_Logger_Base *Logger, Population_Base *Population) : Drift_Base(electron, Logger, Population) {};
|
|
protected:
|
|
void doWallInteraction(Particle *movePart, vec3 *oldLoc_m, double *znew_m);
|
|
void do_E_calculus(Particle *movePart, const vec3 &oldLoc_m, const double ¯o_sigma_m);
|
|
};
|
|
|
|
inline void E_Mover_Drift::doWallInteraction(Particle *movePart, vec3 *oldLoc_m, double *znew_m) {
|
|
|
|
if (*znew_m >= z_WGTS_end_m) { // Moveing into Spectrometer and reversing Speed.
|
|
vec3 reverseLoc_m = *oldLoc_m;
|
|
|
|
// Log Movement before Reflection
|
|
reverseLoc_m[2] = z_WGTS_end_m ;
|
|
movePart->set_x_m(reverseLoc_m);
|
|
Logger->log(*movePart, *oldLoc_m);
|
|
Population->increase_density(*movePart, *oldLoc_m);
|
|
|
|
// Final Movement
|
|
*oldLoc_m = reverseLoc_m;
|
|
*znew_m = z_WGTS_end_m - (*znew_m - z_WGTS_end_m);
|
|
movePart->set_v_ms( -1*(movePart->get_v_ms()) );
|
|
}
|
|
if (*znew_m <= z_RW_m) {
|
|
*znew_m = z_RW_m;
|
|
}
|
|
}
|
|
|
|
inline void E_Mover_Drift::do_E_calculus(Particle *movePart, const vec3 &oldLoc_m, const double ¯o_sigma_m) {
|
|
return;
|
|
}
|
|
|
|
#endif /* electron_drift_h */
|