Merge branch 'reiling-development'
# Conflicts: # src/test_enviroment/main.cpp
This commit is contained in:
@@ -39,19 +39,19 @@ Edge2D_FuncContainer calc_SDCS_Edge() {
|
||||
double xmin =EionT2_eV+1e-4;
|
||||
double ymin = (xmin-EionT2_eV)/2;
|
||||
BED_edge_SDCS.add_ankerpoint(xmin, ymin,BED_eT2_Ionization::calc_SDCS(xmin,ymin));
|
||||
return(BED_edge_SDCS);
|
||||
return BED_edge_SDCS;
|
||||
}
|
||||
|
||||
Average2D_FuncContainer calc_SDCS_Average() {
|
||||
Edge2D_FuncContainer BED_edge_SDCS = calc_SDCS_Edge();
|
||||
Average2D_FuncContainer BED_average_SDCS = Average2D_FuncContainer(BED_edge_SDCS);
|
||||
return(BED_average_SDCS);
|
||||
return BED_average_SDCS;
|
||||
}
|
||||
|
||||
Stacked2D_FuncContainer calc_SDCS_Stacked() {
|
||||
Average2D_FuncContainer BED_average_SDCS = calc_SDCS_Average();
|
||||
Stacked2D_FuncContainer BED_stacked_SDCS = Stacked2D_FuncContainer(BED_average_SDCS);
|
||||
return(BED_stacked_SDCS);
|
||||
return BED_stacked_SDCS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,13 +37,13 @@ Edge1D_FuncContainer BED_TCS_calculator::calc_TCS_Edge() {
|
||||
BED_edge_TCS.add_ankerpoint(EionT2_eV, BED_eT2_Ionization::calc_TCS(EionT2_eV));
|
||||
double offset = 1e-4;
|
||||
BED_edge_TCS.add_ankerpoint(EionT2_eV+offset, BED_eT2_Ionization::calc_TCS(EionT2_eV+offset));
|
||||
return (BED_edge_TCS);
|
||||
return BED_edge_TCS;
|
||||
}
|
||||
|
||||
Average1D_FuncContainer BED_TCS_calculator::calc_TCS_Average() {
|
||||
Edge1D_FuncContainer BED_edge_TCS = calc_TCS_Edge();
|
||||
Average1D_FuncContainer BED_average_TCS = Average1D_FuncContainer(BED_edge_TCS);
|
||||
return (BED_average_TCS);
|
||||
return BED_average_TCS;
|
||||
}
|
||||
|
||||
void BED_TCS_calculator::export_TCS_Edge (std::string export_path) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# 1. Compiler
|
||||
|
||||
# Compiler (non-MPI)
|
||||
CXX = g++ -std=c++11
|
||||
CXX = g++
|
||||
CC = gcc
|
||||
FC = gfortran
|
||||
|
||||
@@ -63,7 +63,7 @@ LIBNUMREC = -lnumrec_mt -lF77
|
||||
|
||||
# Die eigentlichen OFLAGS werden bei Linux-amd64 aus den noch spezifischeren
|
||||
# Makeincludes gesetzt, und hier dann nur reingedrückt.
|
||||
X_OFLAGS = -Ofast $(X_OPT) -fpermissive
|
||||
X_OFLAGS = -Ofast -march=native $(X_OPT) -fpermissive
|
||||
|
||||
## Teilchen-Fliesskommagenauigkeit
|
||||
# Entweder long double...
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
X_OPT = -march=native
|
||||
X_OPT =
|
||||
include $(HOMEBASE)/src/makeinclude/Linux-amd64
|
||||
|
||||
@@ -6,4 +6,4 @@ include $(HOMEBASE)/src/makeinclude/ostype.mak
|
||||
@test -d $(X_OSTYPE) || mkdir $(X_OSTYPE)
|
||||
@cd $(X_OSTYPE); $(MAKE) -f../makefile2 $@
|
||||
|
||||
all:
|
||||
all:
|
||||
|
||||
@@ -32,13 +32,13 @@ double BED_eT2_Ionization::calc_TCS(const double &T_eV) {
|
||||
}
|
||||
|
||||
if (T_eV<=B_eV) {
|
||||
return (0);
|
||||
return 0;
|
||||
} else {
|
||||
double t = calc_t(T_eV);
|
||||
double fac = S_m2/(t+u+1);
|
||||
double sum1 = calc_Dt(t)*log(t);
|
||||
double sum2 = (2-Ni/N)*( (t-1)/t - log(t)/(t+1) );
|
||||
return(fac*(sum1 + sum2) );
|
||||
return fac*(sum1 + sum2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ double BED_eT2_Ionization::calc_SDCS (const double &T_eV, const double &W_eV) {
|
||||
}
|
||||
|
||||
if ( (T_eV<=B_eV) ||(W_eV >= (T_eV-B_eV) ) ) {
|
||||
return (0);
|
||||
return 0;
|
||||
} else {
|
||||
double t = calc_t(T_eV);
|
||||
double w = calc_w(W_eV);
|
||||
@@ -62,16 +62,16 @@ double BED_eT2_Ionization::calc_SDCS (const double &T_eV, const double &W_eV) {
|
||||
double sum1 = (Ni/N - 2)/(t+1) * (1/(w+1) + 1/(t-w));
|
||||
double sum2 = (2-Ni/N) * (pow(w+1,-2) + pow(t-w,-2));
|
||||
double sum3 = log(t)/(N*(w+1)) * calc_dfdw(w);
|
||||
return(fac*(sum1 + sum2 + sum3));
|
||||
return fac*(sum1 + sum2 + sum3);
|
||||
}
|
||||
}
|
||||
|
||||
double BED_eT2_Ionization::calc_t(const double &T_eV) {
|
||||
return(T_eV/B_eV);
|
||||
return T_eV/B_eV;
|
||||
}
|
||||
|
||||
double BED_eT2_Ionization::calc_w(const double &W_eV) {
|
||||
return(W_eV/B_eV);
|
||||
return W_eV/B_eV;
|
||||
}
|
||||
|
||||
double BED_eT2_Ionization::calc_dfdw(const double &w) {
|
||||
@@ -80,7 +80,7 @@ double BED_eT2_Ionization::calc_dfdw(const double &w) {
|
||||
for (int i=0;i<4;i++) {
|
||||
res += c[i]*pow(y,i+3);
|
||||
}
|
||||
return(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
double BED_eT2_Ionization::calc_Dt(const double &t) {
|
||||
@@ -90,6 +90,6 @@ double BED_eT2_Ionization::calc_Dt(const double &t) {
|
||||
res += c[i]/(i+3)*(1-pow(yh,i+3));
|
||||
}
|
||||
res = res/N;
|
||||
return(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// T2IT2_cluster.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 12.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef T2IT2_cluster_h
|
||||
#define T2IT2_cluster_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "janev_T2IT2_cluster.h"
|
||||
|
||||
|
||||
class T2IT2_Cluster : public Sub_Interaction_Base {
|
||||
public:
|
||||
T2IT2_Cluster(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni) {}
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {return Janev_T2IT2_Cluster::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
inline InteractionOut T2IT2_Cluster::do_Interaction (Particle *interPart) {
|
||||
InteractionOut InterOut;
|
||||
vec3 loc_m = interPart->get_x_m();
|
||||
vec3 v2_ms = Population->roll_v_ms(loc_m);
|
||||
vec3 vLab_ms = interPart->get_v_ms() - v2_ms;
|
||||
//vec3 v1_ms = roll_uniform_direction(rngUni) * calc_vec3_abs(vLab_ms) + v2_ms;
|
||||
//Particle TNew = Particle_Builder::create_T(loc_m, v1_ms, -1, interPart->get_Id());
|
||||
Particle T3New = Particle_Builder::create_T3I(loc_m, v2_ms, -1, interPart->get_Id());
|
||||
|
||||
//InterOut.add_new_particle(TNew);
|
||||
InterOut.add_new_particle(T3New);
|
||||
InterOut.set_delete_current(true);
|
||||
return InterOut;
|
||||
}
|
||||
|
||||
|
||||
#endif /* T2IT2_cluster_h */
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// T2IT2_cx.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 12.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef T2IT2_cx_h
|
||||
#define T2IT2_cx_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "kinematics_base.h"
|
||||
#include "janev_T2IT2_cx.h"
|
||||
|
||||
|
||||
class T2IT2_CX : public Sub_Interaction_Base {
|
||||
Elastic_Kinematic_Base kinematics;
|
||||
public:
|
||||
T2IT2_CX(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni), kinematics(2*mT_eV, 2*mT_eV) {}
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {return Janev_T2IT2_CX::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline InteractionOut T2IT2_CX::do_Interaction (Particle *interPart) {
|
||||
vec3 v1_ms = interPart->get_v_ms();
|
||||
vec3 v2_ms = Population->roll_v_ms(interPart->get_x_m());
|
||||
double theta_lab = rngUni->random() * pi;
|
||||
double phi_lab = rngUni->random() * 2 * pi;
|
||||
interPart->set_v_ms(kinematics.get_v1_new(v1_ms, v2_ms, theta_lab, phi_lab));
|
||||
return InteractionOut();
|
||||
}
|
||||
|
||||
|
||||
#endif /* T2IT2_cx_h */
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// T2Ie_disexc.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 30.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef T2Ie_disexc_h
|
||||
#define T2Ie_disexc_h
|
||||
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "janev_eT2I_disexc.h"
|
||||
|
||||
class T2Ie_DissExc : public Sub_Interaction_Base {
|
||||
public:
|
||||
T2Ie_DissExc(Population_Base *ePopulation, UniRNG *rngUni) : Sub_Interaction_Base(ePopulation, rngUni) {}
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {return Janev_eT2I_DissExc::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline InteractionOut T2Ie_DissExc::do_Interaction (Particle *interPart) {
|
||||
InteractionOut res;
|
||||
res.set_delete_current(true);
|
||||
|
||||
vec3 loc_m = interPart->get_x_m();
|
||||
vec3 vTI_ms = interPart->get_v_ms();
|
||||
Particle TI = Particle_Builder::create_TI(loc_m, vTI_ms, -1, interPart->get_Id());
|
||||
res.add_new_particle(TI);
|
||||
|
||||
//maybe add T Atom
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif /* T2Ie_disexc_h */
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// T2Ie_recombination.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 30.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef T2Ie_recombination_h
|
||||
#define T2Ie_recombination_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "janev_eT2I_recombination.h"
|
||||
|
||||
class T2Ie_Recombination : public Sub_Interaction_Base {
|
||||
public:
|
||||
T2Ie_Recombination(Population_Base *ePopulation, UniRNG *rngUni) : Sub_Interaction_Base(ePopulation, rngUni) {}
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {return Janev_eT2I_Recombination::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
inline InteractionOut T2Ie_Recombination::do_Interaction (Particle *interPart) {
|
||||
InteractionOut res;
|
||||
res.set_delete_current(true);
|
||||
double E_eV = calc_E_eV_from_v_ms(Population->roll_v_ms(interPart->get_x_m()), me_eV); // should be computed properly using chances.
|
||||
//Population->decrease_denisty(interPart->get_x_m(), E_eV);
|
||||
|
||||
// Maybe add the 2 T atoms.
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#endif /* T2Ie_recombination_h */
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// T3IT2_elastic.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 13.09.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef T3IT2_elastic_h
|
||||
#define T3IT2_elastic_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "tabata_T3IT2_elastic.h"
|
||||
|
||||
|
||||
class T3IT2_Elastic : public Sub_Interaction_Base {
|
||||
Tabata_T3IT2_Elastic tcs_gen;
|
||||
Elastic_Kinematic_Base kinematics;
|
||||
|
||||
public:
|
||||
T3IT2_Elastic(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni), kinematics(3*mT_eV, 2*mT_eV) {};
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {return tcs_gen.get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
inline InteractionOut T3IT2_Elastic::do_Interaction (Particle *interPart) {
|
||||
vec3 v1_ms = interPart->get_v_ms();
|
||||
vec3 v2_ms = Population->roll_v_ms(interPart->get_x_m());
|
||||
double theta_lab = rngUni->random() * pi;
|
||||
double phi_lab = rngUni->random() * 2 * pi;
|
||||
interPart->set_v_ms(kinematics.get_v1_new(v1_ms, v2_ms, theta_lab, phi_lab));
|
||||
return InteractionOut();
|
||||
}
|
||||
|
||||
#endif /* T3IT2_elastic_h */
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// T3IT2_radasc.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 08.10.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef T3IT2_radasc_h
|
||||
#define T3IT2_radasc_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
// CS from Gerlich:
|
||||
|
||||
class T3IT2_RadAsc : public Sub_Interaction_Base {
|
||||
|
||||
public:
|
||||
T3IT2_RadAsc(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni) {};
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
double v_ms = calc_v_ms_from_E_eV(E_eV, 3*mT_eV);
|
||||
return 5e-23/v_ms;
|
||||
}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
inline InteractionOut T3IT2_RadAsc::do_Interaction (Particle *interPart) {
|
||||
InteractionOut InterOut;
|
||||
vec3 loc_m = interPart->get_x_m();
|
||||
vec3 v2_ms = Population->roll_v_ms(loc_m);
|
||||
Particle T5INew = Particle_Builder::create_T5I(loc_m, v2_ms, -1, interPart->get_Id());
|
||||
|
||||
InterOut.add_new_particle(T5INew);
|
||||
InterOut.set_delete_current(true);
|
||||
return InterOut;
|
||||
}
|
||||
|
||||
#endif /* T3IT2_radasc_h */
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// T3IT2_terasc.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 08.10.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef T3IT2_terasc_h
|
||||
#define T3IT2_terasc_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
// CS from Gerlich:
|
||||
|
||||
class T3IT2_TerAsc : public Sub_Interaction_Base {
|
||||
|
||||
public:
|
||||
T3IT2_TerAsc(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni) {};
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
double v_ms = calc_v_ms_from_E_eV(E_eV, 3*mT_eV);
|
||||
return 7e-41*Population->get_density_m3(loc_m)/v_ms;
|
||||
}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
inline InteractionOut T3IT2_TerAsc::do_Interaction (Particle *interPart) {
|
||||
InteractionOut InterOut;
|
||||
vec3 loc_m = interPart->get_x_m();
|
||||
vec3 v2_ms = Population->roll_v_ms(loc_m);
|
||||
Particle T5INew = Particle_Builder::create_T5I(loc_m, v2_ms, -1, interPart->get_Id());
|
||||
|
||||
InterOut.add_new_particle(T5INew);
|
||||
InterOut.set_delete_current(true);
|
||||
return InterOut;
|
||||
}
|
||||
|
||||
#endif /* T3IT2_terasc_h */
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// T3Ie_disexc.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 30.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef T3Ie_disexc_h
|
||||
#define T3Ie_disexc_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "janev_eT3I_disexc.h"
|
||||
|
||||
class T3Ie_DissExc : public Sub_Interaction_Base {
|
||||
public:
|
||||
T3Ie_DissExc(Population_Base *ePopulation, UniRNG *rngUni) : Sub_Interaction_Base(ePopulation, rngUni) {}
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {return Janev_eT3I_DissExc::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline InteractionOut T3Ie_DissExc::do_Interaction (Particle *interPart) {
|
||||
InteractionOut res;
|
||||
res.set_delete_current(true);
|
||||
|
||||
vec3 loc_m = interPart->get_x_m();
|
||||
vec3 vTI_ms = interPart->get_v_ms();
|
||||
Particle TI = Particle_Builder::create_TI(loc_m, vTI_ms, -1, interPart->get_Id());
|
||||
res.add_new_particle(TI);
|
||||
|
||||
//maybe add T Atom
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#endif /* T3Ie_disexc_h */
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// T3Ie_recombination.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 29.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef T3Ie_recombination_h
|
||||
#define T3Ie_recombination_h
|
||||
|
||||
#include "janev_eT3I_recombination.h"
|
||||
|
||||
class T3Ie_Recombination : public Sub_Interaction_Base {
|
||||
public:
|
||||
T3Ie_Recombination(Population_Base *ePopulation, UniRNG *rngUni) : Sub_Interaction_Base(ePopulation, rngUni) {}
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
return Janev_eT3I_Recombination::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
inline InteractionOut T3Ie_Recombination::do_Interaction (Particle *interPart) {
|
||||
InteractionOut res;
|
||||
res.set_delete_current(true);
|
||||
double E_eV = calc_E_eV_from_v_ms(Population->roll_v_ms(interPart->get_x_m()), me_eV); // should be computed properly using chances.
|
||||
//Population->decrease_denisty(interPart->get_x_m(), E_eV);
|
||||
|
||||
// Maybe add the 3 T atoms.
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#endif /* T3Ie_recombination_h */
|
||||
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// T5IT2_elastic.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 16.09.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef T5IT2_elastic_h
|
||||
#define T5IT2_elastic_h
|
||||
|
||||
|
||||
class T5IT2_Elastic : public Sub_Interaction_Base {
|
||||
Tabata_T3IT2_Elastic tcs_gen; // Obviously wrong, but should be good enough.
|
||||
Elastic_Kinematic_Base kinematics;
|
||||
|
||||
public:
|
||||
T5IT2_Elastic(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni), kinematics(5*mT_eV, 2*mT_eV) {};
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {return tcs_gen.get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
inline InteractionOut T5IT2_Elastic::do_Interaction (Particle *interPart) {
|
||||
vec3 v1_ms = interPart->get_v_ms();
|
||||
vec3 v2_ms = Population->roll_v_ms(interPart->get_x_m());
|
||||
double theta_lab = rngUni->random() * pi;
|
||||
double phi_lab = rngUni->random() * 2 * pi;
|
||||
interPart->set_v_ms(kinematics.get_v1_new(v1_ms, v2_ms, theta_lab, phi_lab));
|
||||
return InteractionOut();
|
||||
}
|
||||
|
||||
#endif /* T5IT2_elastic_h */
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// T5Ie_recombination.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 16.09.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef T5Ie_recombination_h
|
||||
#define T5Ie_recombination_h
|
||||
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
|
||||
#include "petterson_eT5I_recombination.h"
|
||||
|
||||
class T5Ie_Recombination : public Sub_Interaction_Base {
|
||||
public:
|
||||
T5Ie_Recombination(Population_Base *ePopulation, UniRNG *rngUni) : Sub_Interaction_Base(ePopulation, rngUni) {}
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
return Pettersson_eT5I_Recombination::get_TCS(E_eV);
|
||||
}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline InteractionOut T5Ie_Recombination::do_Interaction (Particle *interPart) {
|
||||
InteractionOut res;
|
||||
res.set_delete_current(true);
|
||||
double E_eV = calc_E_eV_from_v_ms(Population->roll_v_ms(interPart->get_x_m()), me_eV); // should be computed properly using chances.
|
||||
//Population->decrease_denisty(interPart->get_x_m(), E_eV);
|
||||
|
||||
// Maybe add the 5 T atoms.
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#endif /* T5Ie_recombination_h */
|
||||
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// TIT2_elastic.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 13.09.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TIT2_elastic_h
|
||||
#define TIT2_elastic_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "kinematics_base.h"
|
||||
#include "tabata_TIT2_elastic.h"
|
||||
|
||||
|
||||
class TIT2_Elastic : public Sub_Interaction_Base {
|
||||
Tabata_TIT2_Elastic tcs_gen;
|
||||
Elastic_Kinematic_Base kinematics;
|
||||
|
||||
public:
|
||||
TIT2_Elastic(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni), kinematics(mT_eV, 2*mT_eV) {};
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {return tcs_gen.get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
inline InteractionOut TIT2_Elastic::do_Interaction (Particle *interPart) {
|
||||
vec3 v1_ms = interPart->get_v_ms();
|
||||
vec3 v2_ms = Population->roll_v_ms(interPart->get_x_m());
|
||||
double theta_lab = rngUni->random() * pi;
|
||||
double phi_lab = rngUni->random() * 2 * pi;
|
||||
interPart->set_v_ms(kinematics.get_v1_new(v1_ms, v2_ms, theta_lab, phi_lab));
|
||||
return InteractionOut();
|
||||
}
|
||||
|
||||
#endif /* TIT2_elastic_h */
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// TIT2_radasc.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 08.10.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TIT2_radasc_h
|
||||
#define TIT2_radasc_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
// CS from Plasil:2012
|
||||
|
||||
class TIT2_RadAsc : public Sub_Interaction_Base {
|
||||
|
||||
public:
|
||||
TIT2_RadAsc(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni) {};
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
double v_ms = calc_v_ms_from_E_eV(E_eV, mT_eV);
|
||||
return 5e-23/v_ms;
|
||||
}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
inline InteractionOut TIT2_RadAsc::do_Interaction (Particle *interPart) {
|
||||
InteractionOut InterOut;
|
||||
vec3 loc_m = interPart->get_x_m();
|
||||
vec3 v2_ms = Population->roll_v_ms(loc_m);
|
||||
Particle T3INew = Particle_Builder::create_T3I(loc_m, v2_ms, -1, interPart->get_Id());
|
||||
|
||||
InterOut.add_new_particle(T3INew);
|
||||
InterOut.set_delete_current(true);
|
||||
return InterOut;
|
||||
}
|
||||
|
||||
|
||||
#endif /* TIT2_radasc_h */
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// TIT2_terasc.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 08.10.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TIT2_terasc_h
|
||||
#define TIT2_terasc_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
// CS from Plasil:2012
|
||||
|
||||
class TIT2_TerAsc : public Sub_Interaction_Base {
|
||||
|
||||
public:
|
||||
TIT2_TerAsc(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni) {};
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
double v_ms = calc_v_ms_from_E_eV(E_eV, mT_eV);
|
||||
return 2.6e-41*Population->get_density_m3(loc_m)/v_ms;
|
||||
}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
inline InteractionOut TIT2_TerAsc::do_Interaction (Particle *interPart) {
|
||||
InteractionOut InterOut;
|
||||
vec3 loc_m = interPart->get_x_m();
|
||||
vec3 v2_ms = Population->roll_v_ms(loc_m);
|
||||
Particle T3INew = Particle_Builder::create_T3I(loc_m, v2_ms, -1, interPart->get_Id());
|
||||
|
||||
InterOut.add_new_particle(T3INew);
|
||||
InterOut.set_delete_current(true);
|
||||
return InterOut;
|
||||
}
|
||||
|
||||
#endif /* TIT2_terasc_h */
|
||||
@@ -1,53 +0,0 @@
|
||||
//
|
||||
// TT2_elastic.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 20.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TT2_elastic_h
|
||||
#define TT2_elastic_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "hardsphere_elastic.h"
|
||||
|
||||
class TT2_Elastic : public Sub_Interaction_Base {
|
||||
Hardsphere_elasticScattering HardSphere = Hardsphere_elasticScattering(1e-20); //3.4614e-15);
|
||||
public:
|
||||
TT2_Elastic(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni) {};
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
|
||||
private:
|
||||
vec3 calc_vNew_ms(vec3 vOld_ms, vec3 vT2_ms, double thetaLab, double phiLab);
|
||||
};
|
||||
|
||||
|
||||
inline double TT2_Elastic::get_macroSigma_m2(const Particle &interPart) {
|
||||
vec3 loc_m = interPart.get_Location_m();
|
||||
double n_m3 = (Population->get_density_m3(loc_m));
|
||||
return (HardSphere.get_TCS() * n_m3);
|
||||
}
|
||||
|
||||
inline InteractionOut TT2_Elastic::do_Interaction (Particle *interPart) {
|
||||
vec3 v_ms = interPart->get_Speed_ms();
|
||||
vec3 loc_m = interPart->get_Location_m();
|
||||
vec3 vT2_ms = (Population->roll_speed_ms(loc_m));
|
||||
vec3 vLab_ms = v_ms - vT2_ms;
|
||||
double thetaLab = HardSphere.roll_theta(rngUni);
|
||||
double phiLab = rngUni->random() * 2 * pi;
|
||||
interPart->set_Speed_ms( calc_vNew_ms(v_ms, vT2_ms, thetaLab, phiLab) );
|
||||
return (InteractionOut());
|
||||
}
|
||||
|
||||
inline vec3 TT2_Elastic::calc_vNew_ms(vec3 vOld_ms, vec3 vT2_ms, double thetaLab, double phiLab) {
|
||||
vec3 speedLab_ms = vOld_ms - vT2_ms;
|
||||
vec3 n0 = calc_newDirection(speedLab_ms, thetaLab, phiLab);
|
||||
vec3 vNew_ms = (mT2_eV*vec3Abs(speedLab_ms)*n0 + me_eV*speedLab_ms)/(me_eV+mT2_eV) + vT2_ms;
|
||||
return (vNew_ms);
|
||||
}
|
||||
|
||||
|
||||
#endif /* TT2_elastic_h */
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "katrin_geo.hpp"
|
||||
#include "katrin_geo.h"
|
||||
|
||||
#include "error_types.h"
|
||||
|
||||
@@ -18,7 +18,7 @@ using namespace std;
|
||||
|
||||
|
||||
// Redundant Code with h5, but ASCI Logger is kept in code as relict.
|
||||
const int ASCI_Logger::numberZBins = getParameter("numberZBins");
|
||||
const int ASCI_Logger::numberZBins = load_parameter("LOG_BARS");
|
||||
|
||||
ASCI_Logger::ASCI_Logger() {
|
||||
if (numberZBins == 0) {
|
||||
@@ -42,12 +42,12 @@ ASCI_Logger::ASCI_Logger() {
|
||||
void ASCI_Logger::set_zLogValues() {
|
||||
zLogValues.clear();
|
||||
if (logging) {
|
||||
double start_m = Katrin_Geo::get_z_RW_m();
|
||||
double length_m = Katrin_Geo::get_z_WGTSend_m() - start_m;
|
||||
double start_m = z_RW_m;
|
||||
double length_m = z_WGTS_end_m - start_m;
|
||||
double stepLength_m = length_m/(numberZBins-1);
|
||||
double z_m;
|
||||
for (int i = 0;i<numberZBins;i++) {
|
||||
z_m = Katrin_Geo::get_z_RW_m() + stepLength_m*i;
|
||||
z_m = z_RW_m + stepLength_m*i;
|
||||
zLogValues.push_back(z_m);
|
||||
}
|
||||
}
|
||||
@@ -82,7 +82,7 @@ void ASCI_Logger::log_Particle(Particle *logPart, blitz::TinyVector<double,3> ol
|
||||
outStream[0]<<*logPart<<endl;
|
||||
} else {
|
||||
double zold = oldLoc_m[2];
|
||||
double znew = logPart->get_Location_m()[2];
|
||||
double znew = logPart->get_x_m()[2];
|
||||
double zmin = min(zold,znew);
|
||||
double zmax = max(zold,znew);
|
||||
|
||||
@@ -95,13 +95,13 @@ void ASCI_Logger::log_Particle(Particle *logPart, blitz::TinyVector<double,3> ol
|
||||
}
|
||||
|
||||
void ASCI_Logger::set_outdirName() {
|
||||
string parname = getparName();
|
||||
string parname = get_parameter_filenamepath();
|
||||
stringstream dirname;
|
||||
int i = 1;
|
||||
do {
|
||||
dirname.str(std::string());
|
||||
dirname << parname << "_" << getTimeString() << "_" << i++;
|
||||
} while ( isDir(dirname.str()) );
|
||||
dirname << parname << "_" << get_time_string() << "_" << i++;
|
||||
} while ( is_dir(dirname.str()) );
|
||||
outdirName = dirname.str();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -54,21 +54,21 @@ template <class T_Map>
|
||||
template <typename T>
|
||||
void Average_Container<T_Map>::rec_calcMap(const T &subMap, std::deque<double> Points) {
|
||||
double curVal, nextVal, avgVal;
|
||||
typename T::const_iterator curItr, nextItr;
|
||||
for (nextItr = ++(subMap.cbegin()); nextItr!= subMap.cend(); nextItr++) {
|
||||
curItr = nextItr;
|
||||
--curItr;
|
||||
curVal = curItr->first;
|
||||
nextVal = nextItr->first;
|
||||
typename T::const_iterator curitr, nextitr;
|
||||
for (nextitr = ++(subMap.cbegin()); nextitr!= subMap.cend(); nextitr++) {
|
||||
curitr = nextitr;
|
||||
--curitr;
|
||||
curVal = curitr->first;
|
||||
nextVal = nextitr->first;
|
||||
avgVal = curVal + (nextVal-curVal)/2;
|
||||
Points.push_back(avgVal);
|
||||
rec_calcMap(curItr->second, Points);
|
||||
rec_calcMap(curitr->second, Points);
|
||||
Points.pop_back();
|
||||
}
|
||||
// insert last point as overflow value
|
||||
curItr = (--subMap.cend());
|
||||
Points.push_back(curItr->first);
|
||||
rec_calcMap(curItr->second, Points);
|
||||
curitr = (--subMap.cend());
|
||||
Points.push_back(curitr->first);
|
||||
rec_calcMap(curitr->second, Points);
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ double Average_Container<T_Map>::get_value(std::deque <double> Point) {
|
||||
ss<<"EdgeBase_Container::interpolate: deque point dimension missmatch.\n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
return (Base_Container<T_Map>::get_value(Point, Lower_bound_Over));
|
||||
return Base_Container<T_Map>::get_value(Point, Lower_bound_Over);
|
||||
}
|
||||
|
||||
#endif /* average_container_h */
|
||||
|
||||
@@ -55,7 +55,7 @@ private:
|
||||
public:
|
||||
void importFromCSV(std::string load_path);
|
||||
private:
|
||||
void addPointFromLine(const std::string &lineFromFile);
|
||||
void addPointFromLine(const std::string &csv_line);
|
||||
|
||||
public:
|
||||
void addPoint(std::deque<double> pointIn);
|
||||
@@ -76,12 +76,12 @@ protected:
|
||||
private:
|
||||
template <typename T_target> void rec_getSubMap(T_target *subMap, T_target **targetMapPtr, std::deque<double> Points, searchStyle searchMode) ;
|
||||
template <typename T_target, typename T> void rec_getSubMap(T *subMap, T_target **targetMapPtr, std::deque<double> Points, searchStyle searchMode) ;
|
||||
template <class T> typename T::iterator searchItrByStyle(T *subMap, double x, searchStyle searchMode) ;
|
||||
template <class T> typename T::iterator searchitrByStyle(T *subMap, double x, searchStyle searchMode) ;
|
||||
|
||||
protected:
|
||||
void checkEmpty() ;
|
||||
public:
|
||||
T_Map getMap() const {return (Map);}
|
||||
T_Map getMap() const {return Map;}
|
||||
|
||||
};
|
||||
|
||||
@@ -92,7 +92,7 @@ double Base_Container<T_Map>::calc_Dim() {
|
||||
T dummyMap;
|
||||
int count = 0;
|
||||
inc_Count(&dummyMap, &count);
|
||||
return (count);
|
||||
return count;
|
||||
}
|
||||
|
||||
template <class T_Map>
|
||||
@@ -120,30 +120,30 @@ void Base_Container<T_Map>::importFromCSV(std::string load_path) {
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
|
||||
std::string lineFromFile;
|
||||
while (getline(importStream, lineFromFile)) {
|
||||
removeLeadingWhites(lineFromFile);
|
||||
replaceDelimiter(lineFromFile);
|
||||
if ( checkIgnoreLine(lineFromFile) ) {
|
||||
std::string csv_line;
|
||||
while (getline(importStream, csv_line)) {
|
||||
remove_leading_whites(csv_line);
|
||||
replace_delimiter(csv_line);
|
||||
if ( check_ignore_line(csv_line) ) {
|
||||
continue;
|
||||
}
|
||||
addPointFromLine(lineFromFile);
|
||||
addPointFromLine(csv_line);
|
||||
}
|
||||
importStream.close();
|
||||
}
|
||||
|
||||
|
||||
template <class T_Map>
|
||||
void Base_Container<T_Map>::addPointFromLine(const std::string &lineFromFile) {
|
||||
void Base_Container<T_Map>::addPointFromLine(const std::string &csv_line) {
|
||||
std::stringstream ss;
|
||||
ss.str(lineFromFile);
|
||||
ss.str(csv_line);
|
||||
std::deque<double> dequeTemp;
|
||||
double tempVal;
|
||||
for (int i = 0;i<=Dim;i++) {
|
||||
if (ss>>tempVal) {
|
||||
dequeTemp.push_back(tempVal);
|
||||
} else {
|
||||
std::cout<<"Base_Container::addPointFromFile: Warning could not read line in inputFile. \nloadFilePath\t"<<lineFromFile<<"\n";
|
||||
std::cout<<"Base_Container::addPointFromFile: Warning could not read line in inputFile. \nloadFilePath\t"<<csv_line<<"\n";
|
||||
}
|
||||
}
|
||||
addPoint(dequeTemp);
|
||||
@@ -155,8 +155,8 @@ void Base_Container<T_Map>::addPoint(std::deque<double> pointIn) {
|
||||
if (pointIn.size() != Dim+1) {
|
||||
std::stringstream ss;
|
||||
ss<<"Base_Container::addPoint: deque pointIn dimension missmatch.\n";
|
||||
for (std::deque<double>::iterator Itr = pointIn.begin(); Itr!=pointIn.end(); Itr++) {
|
||||
std::cout<<*Itr<<"\n";
|
||||
for (std::deque<double>::iterator itr = pointIn.begin(); itr!=pointIn.end(); itr++) {
|
||||
std::cout<<*itr<<"\n";
|
||||
}
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
@@ -215,15 +215,15 @@ template <class T_Map>
|
||||
std::string Base_Container<T_Map>::getExportFileHeader() {
|
||||
std::stringstream ss;
|
||||
ss<<"# Automatically generated Data of Function2D_Container class by exportToFile().\n";
|
||||
ss<<"# Generated on "<<getTimeString()<<".\n";
|
||||
ss<<"# Generated on "<<get_time_string()<<".\n";
|
||||
ss<<"#key1 (usually Energy)\tkey2 (angluar distribution or secondary energy)\tparameter (usually SDCS)\n";
|
||||
return(ss.str());
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
template <class T_Map>
|
||||
void Base_Container<T_Map>::rec_exportToCSV(const dim1Map &subMap, std::ofstream &exportStream, std::string preset) {
|
||||
for (dim1Map::const_iterator Itr = subMap.cbegin();Itr!=subMap.cend();Itr++) {
|
||||
exportStream<<preset<<Itr->first<<"\t"<<Itr->second<<"\n";
|
||||
for (dim1Map::const_iterator itr = subMap.cbegin();itr!=subMap.cend();itr++) {
|
||||
exportStream<<preset<<itr->first<<"\t"<<itr->second<<"\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,11 +231,11 @@ template <class T_Map>
|
||||
template <typename T>
|
||||
void Base_Container<T_Map>::rec_exportToCSV(const T &subMap, std::ofstream &exportStream, std::string preset) {
|
||||
std::stringstream ss;
|
||||
for (typename T::const_iterator Itr = subMap.cbegin();Itr!=subMap.cend();Itr++) {
|
||||
for (typename T::const_iterator itr = subMap.cbegin();itr!=subMap.cend();itr++) {
|
||||
ss.clear();
|
||||
ss.str("");
|
||||
ss<<preset<<Itr->first<<"\t";
|
||||
rec_exportToCSV(Itr->second, exportStream, ss.str());
|
||||
ss<<preset<<itr->first<<"\t";
|
||||
rec_exportToCSV(itr->second, exportStream, ss.str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,8 +245,8 @@ double Base_Container<T_Map>::get_value(std::deque<double> Points, searchStyle s
|
||||
double x = Points.back();
|
||||
Points.pop_back();
|
||||
dim1Map *subMap = getSubMap<dim1Map>(Points, searchMode);
|
||||
dim1Map::const_iterator Itr = searchItrByStyle(subMap, x, searchMode);
|
||||
return(Itr->second);
|
||||
dim1Map::const_iterator itr = searchitrByStyle(subMap, x, searchMode);
|
||||
return itr->second;
|
||||
}
|
||||
|
||||
template <class T_Map>
|
||||
@@ -261,7 +261,7 @@ T_target* Base_Container<T_Map>::getSubMap(std::deque<double> Points, searchStyl
|
||||
}
|
||||
T_target *targetMap;
|
||||
rec_getSubMap(&Map, &targetMap, Points, searchMode);
|
||||
return (targetMap);
|
||||
return targetMap;
|
||||
}
|
||||
|
||||
template <class T_Map>
|
||||
@@ -269,7 +269,7 @@ template <typename T_target>
|
||||
void Base_Container<T_Map>::rec_getSubMap(T_target *subMap, T_target **targetMapPtr, std::deque<double> Points, searchStyle searchMode) {
|
||||
if (Points.size() != 0) {
|
||||
std::stringstream ss;
|
||||
ss<<"Base_Container::get_subItr: Dimension Missmatch of Points\n";
|
||||
ss<<"Base_Container::get_subitr: Dimension Missmatch of Points\n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
*targetMapPtr = subMap;
|
||||
@@ -280,30 +280,30 @@ template <typename T_target, typename T>
|
||||
void Base_Container<T_Map>::rec_getSubMap(T *subMap, T_target **targetMapPtr, std::deque<double> Points, searchStyle searchMode) {
|
||||
double x = Points.front();
|
||||
Points.pop_front();
|
||||
typename T::iterator Itr = searchItrByStyle(subMap, x, searchMode);
|
||||
rec_getSubMap(&(Itr->second), targetMapPtr, Points, searchMode);
|
||||
typename T::iterator itr = searchitrByStyle(subMap, x, searchMode);
|
||||
rec_getSubMap(&(itr->second), targetMapPtr, Points, searchMode);
|
||||
}
|
||||
|
||||
template <class T_Map>
|
||||
template <class T>
|
||||
typename T::iterator Base_Container<T_Map>::searchItrByStyle(T *subMap, double x, searchStyle searchMode) {
|
||||
typename T::iterator Itr;
|
||||
typename T::iterator Base_Container<T_Map>::searchitrByStyle(T *subMap, double x, searchStyle searchMode) {
|
||||
typename T::iterator itr;
|
||||
if (searchMode == Find) {
|
||||
Itr = subMap->find(x);
|
||||
itr = subMap->find(x);
|
||||
} else if (searchMode == Lower_bound) {
|
||||
Itr = subMap->lower_bound(x);
|
||||
itr = subMap->lower_bound(x);
|
||||
} else if (searchMode == Lower_bound_Over) {
|
||||
Itr = subMap->lower_bound(x);
|
||||
if (Itr == subMap->end()) {
|
||||
--Itr;
|
||||
itr = subMap->lower_bound(x);
|
||||
if (itr == subMap->end()) {
|
||||
--itr;
|
||||
}
|
||||
}
|
||||
if (Itr == subMap->end()) {
|
||||
if (itr == subMap->end()) {
|
||||
std::stringstream ss;
|
||||
ss<<"Base_Container::calcItr: Point is out of bound.\n";
|
||||
ss<<"Base_Container::calcitr: Point is out of bound.\n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
return (Itr);
|
||||
return itr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
typedef const double constant;
|
||||
|
||||
|
||||
constant zero = 1e-15;
|
||||
constant scale_start = 1e-5;
|
||||
constant scale_end = 2e4;
|
||||
constant infinity = 1e15;
|
||||
|
||||
// Natural Constants
|
||||
@@ -26,7 +27,6 @@ constant ERyd_eV = 13.605693009;
|
||||
// Particle Properties
|
||||
constant me_eV = 0.511e6;
|
||||
constant mT_eV = 2.8094320212e9;
|
||||
constant mT2_eV = mT_eV*2;
|
||||
|
||||
constant re_m = 2.817940322719e-15;
|
||||
|
||||
@@ -38,6 +38,19 @@ constant decayConstT2_s = 1.78405e-09;
|
||||
constant BetaDecayConst = 1.2072343416696292e-47;
|
||||
constant TritiumDecayEndpoint_eV = 18.574e3;
|
||||
|
||||
// WGTS
|
||||
constant z_RW_m = -3;
|
||||
constant z_WGTS_start_m = 0;
|
||||
constant z_WGTS_end_m = 10;
|
||||
constant z_DPS_end_m = 13;
|
||||
constant r_WGTS_m = 0.045;
|
||||
constant l_WGTS_m = z_WGTS_end_m - z_WGTS_start_m;
|
||||
constant z_WGTS_mid_m = (z_WGTS_end_m+z_WGTS_start_m)/2;
|
||||
|
||||
// from Kuckert:2018aa
|
||||
constant reduction_WGTS_front = 0.034;
|
||||
constant reduction_WGTS_rear = 0.033;
|
||||
constant reduction_tot_front = 5e-4;
|
||||
constant reduction_tot_rear = 5e-4;
|
||||
|
||||
#endif /* constants_h */
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,50 @@
|
||||
# Electrical Excitation B1sig+u by Yoon:2008aa
|
||||
# E sig_tot
|
||||
1.180E+01 0.000E+00
|
||||
1.200E+01 3.510E-23
|
||||
1.220E+01 6.400E-23
|
||||
1.240E+01 1.030E-22
|
||||
1.260E+01 1.510E-22
|
||||
1.280E+01 2.060E-22
|
||||
1.300E+01 2.660E-22
|
||||
1.330E+01 3.630E-22
|
||||
1.360E+01 4.640E-22
|
||||
1.400E+01 5.980E-22
|
||||
1.450E+01 7.600E-22
|
||||
1.500E+01 9.130E-22
|
||||
1.550E+01 1.060E-21
|
||||
1.600E+01 1.190E-21
|
||||
1.650E+01 1.310E-21
|
||||
1.700E+01 1.430E-21
|
||||
1.750E+01 1.540E-21
|
||||
1.800E+01 1.640E-21
|
||||
1.850E+01 1.740E-21
|
||||
1.900E+01 1.830E-21
|
||||
2.000E+01 1.990E-21
|
||||
2.250E+01 2.320E-21
|
||||
2.500E+01 2.550E-21
|
||||
2.750E+01 2.730E-21
|
||||
3.000E+01 2.850E-21
|
||||
3.500E+01 3.010E-21
|
||||
4.000E+01 3.080E-21
|
||||
4.500E+01 3.100E-21
|
||||
5.000E+01 3.080E-21
|
||||
6.000E+01 3.010E-21
|
||||
7.000E+01 2.910E-21
|
||||
8.000E+01 2.810E-21
|
||||
9.000E+01 2.710E-21
|
||||
1.000E+02 2.620E-21
|
||||
1.500E+02 2.250E-21
|
||||
2.000E+02 1.980E-21
|
||||
2.500E+02 1.770E-21
|
||||
3.000E+02 1.600E-21
|
||||
3.500E+02 1.460E-21
|
||||
4.000E+02 1.340E-21
|
||||
4.500E+02 1.240E-21
|
||||
5.000E+02 1.150E-21
|
||||
6.000E+02 1.010E-21
|
||||
7.000E+02 9.070E-22
|
||||
8.000E+02 8.230E-22
|
||||
9.000E+02 7.540E-22
|
||||
1.000E+03 6.970E-22
|
||||
1.100E+03 0.000E+00
|
||||
@@ -0,0 +1,50 @@
|
||||
# Electrical Excitation C1piu by Yoon:2008aa
|
||||
# E sig_tot
|
||||
1.100E+01 0.000E+00
|
||||
1.200E+01 0.000E+00
|
||||
1.229E+01 0.000E+00
|
||||
1.240E+01 6.800E-24
|
||||
1.260E+01 2.070E-23
|
||||
1.280E+01 4.810E-23
|
||||
1.300E+01 8.730E-23
|
||||
1.330E+01 1.590E-22
|
||||
1.360E+01 2.420E-22
|
||||
1.400E+01 3.610E-22
|
||||
1.450E+01 5.120E-22
|
||||
1.500E+01 6.570E-22
|
||||
1.550E+01 7.930E-22
|
||||
1.600E+01 9.200E-22
|
||||
1.650E+01 1.040E-21
|
||||
1.700E+01 1.150E-21
|
||||
1.750E+01 1.260E-21
|
||||
1.800E+01 1.350E-21
|
||||
1.850E+01 1.450E-21
|
||||
1.900E+01 1.530E-21
|
||||
2.000E+01 1.690E-21
|
||||
2.250E+01 2.010E-21
|
||||
2.500E+01 2.240E-21
|
||||
2.750E+01 2.420E-21
|
||||
3.000E+01 2.540E-21
|
||||
3.500E+01 2.700E-21
|
||||
4.000E+01 2.780E-21
|
||||
4.500E+01 2.810E-21
|
||||
5.000E+01 2.810E-21
|
||||
6.000E+01 2.760E-21
|
||||
7.000E+01 2.670E-21
|
||||
8.000E+01 2.580E-21
|
||||
9.000E+01 2.500E-21
|
||||
1.000E+02 2.410E-21
|
||||
1.500E+02 2.080E-21
|
||||
2.000E+02 1.840E-21
|
||||
2.500E+02 1.650E-21
|
||||
3.000E+02 1.490E-21
|
||||
3.500E+02 1.360E-21
|
||||
4.000E+02 1.250E-21
|
||||
4.500E+02 1.160E-21
|
||||
5.000E+02 1.080E-21
|
||||
6.000E+02 9.490E-22
|
||||
7.000E+02 8.500E-22
|
||||
8.000E+02 7.710E-22
|
||||
9.000E+02 7.070E-22
|
||||
1.000E+03 6.540E-22
|
||||
1.100E+03 0.000E+00
|
||||
@@ -0,0 +1,37 @@
|
||||
# Electrical Excitation EF1sig+g by Yoon:2008aa
|
||||
# E sig_tot
|
||||
1.400E+01 0.000E+00
|
||||
1.500E+01 2.800E-22
|
||||
1.600E+01 3.300E-22
|
||||
1.700E+01 3.700E-22
|
||||
1.750E+01 3.800E-22
|
||||
1.900E+01 3.900E-22
|
||||
2.000E+01 4.000E-22
|
||||
2.100E+01 4.000E-22
|
||||
2.350E+01 4.000E-22
|
||||
2.600E+01 4.000E-22
|
||||
3.000E+01 4.000E-22
|
||||
4.000E+01 4.100E-22
|
||||
5.000E+01 4.100E-22
|
||||
6.000E+01 3.900E-22
|
||||
7.000E+01 3.600E-22
|
||||
8.000E+01 3.400E-22
|
||||
1.000E+02 2.900E-22
|
||||
1.200E+02 2.600E-22
|
||||
1.400E+02 2.400E-22
|
||||
1.600E+02 2.200E-22
|
||||
1.800E+02 2.100E-22
|
||||
2.000E+02 2.000E-22
|
||||
2.200E+02 1.900E-22
|
||||
2.400E+02 1.800E-22
|
||||
2.600E+02 1.700E-22
|
||||
2.800E+02 1.600E-22
|
||||
3.000E+02 1.500E-22
|
||||
4.000E+02 1.200E-22
|
||||
5.000E+02 9.600E-23
|
||||
6.000E+02 8.000E-23
|
||||
7.000E+02 6.900E-23
|
||||
8.000E+02 6.100E-23
|
||||
9.000E+02 5.400E-23
|
||||
1.000E+03 4.900E-23
|
||||
1.100E+03 0.000E+00
|
||||
@@ -0,0 +1,7 @@
|
||||
# Electrical Excitation a3sig+g by Yoon:2008aa
|
||||
# E sig_tot
|
||||
1.700E+01 0.000E+00
|
||||
1.750E+01 6.990E-22
|
||||
2.000E+01 1.011E-21
|
||||
3.000E+01 1.860E-22
|
||||
3.100E+01 0.000E+00
|
||||
@@ -0,0 +1,13 @@
|
||||
# Electrical Excitation b3Sig+u by Yoon:2008aa
|
||||
# E sig_tot
|
||||
9.000E+00 0.000E+00
|
||||
9.200E+00 1.210E-21
|
||||
1.020E+01 2.080E-21
|
||||
1.220E+01 4.940E-21
|
||||
1.520E+01 8.300E-21
|
||||
1.720E+01 5.730E-21
|
||||
2.020E+01 3.920E-21
|
||||
3.000E+01 1.350E-21
|
||||
4.000E+01 7.710E-22
|
||||
1.000E+02 7.300E-23
|
||||
1.100E+02 0.000E+00
|
||||
@@ -0,0 +1,7 @@
|
||||
# Electrical Excitation c3piu by Yoon:2008aa
|
||||
# E sig_tot
|
||||
1.100E+01 0.000E+00
|
||||
1.750E+01 1.090E-21
|
||||
2.000E+01 2.489E-21
|
||||
3.000E+01 7.960E-22
|
||||
3.100E+01 0.000E+00
|
||||
@@ -0,0 +1,7 @@
|
||||
# Electrical Excitation e3sig+u by Yoon:2008aa
|
||||
# E sig_tot
|
||||
1.700E+01 0.000E+00
|
||||
1.750E+01 1.080E-22
|
||||
2.000E+01 2.520E-22
|
||||
3.000E+01 1.320E-22
|
||||
3.100E+01 0.000E+00
|
||||
@@ -0,0 +1,43 @@
|
||||
# Rotational Excitation J = 0->2 by Yoon:2008aa
|
||||
# E sig_tot
|
||||
4.410E-02 0.000E+00
|
||||
4.700E-02 1.850E-22
|
||||
5.000E-02 2.700E-22
|
||||
5.500E-02 3.500E-22
|
||||
6.000E-02 4.200E-22
|
||||
6.500E-02 4.800E-22
|
||||
7.000E-02 5.300E-22
|
||||
8.000E-02 6.200E-22
|
||||
9.000E-02 6.800E-22
|
||||
1.000E-01 7.400E-22
|
||||
1.100E-01 7.900E-22
|
||||
1.300E-01 8.800E-22
|
||||
1.500E-01 9.700E-22
|
||||
2.000E-01 1.150E-21
|
||||
2.500E-01 1.320E-21
|
||||
3.000E-01 1.520E-21
|
||||
3.500E-01 1.750E-21
|
||||
4.000E-01 2.000E-21
|
||||
4.500E-01 2.280E-21
|
||||
5.000E-01 2.600E-21
|
||||
6.000E-01 3.230E-21
|
||||
7.000E-01 3.940E-21
|
||||
8.000E-01 4.690E-21
|
||||
9.000E-01 5.550E-21
|
||||
1.000E+00 6.380E-21
|
||||
1.200E+00 7.960E-21
|
||||
1.500E+00 1.036E-20
|
||||
2.000E+00 1.370E-20
|
||||
2.500E+00 1.585E-20
|
||||
3.000E+00 1.704E-20
|
||||
3.500E+00 1.755E-20
|
||||
4.000E+00 1.758E-20
|
||||
4.500E+00 1.732E-20
|
||||
5.000E+00 1.689E-20
|
||||
6.000E+00 1.579E-20
|
||||
7.000E+00 1.462E-20
|
||||
8.000E+00 1.350E-20
|
||||
9.000E+00 1.248E-20
|
||||
1.000E+01 1.156E-20
|
||||
1.500E+01 7.300E-21
|
||||
1.600E+01 0.000E+00
|
||||
@@ -0,0 +1,901 @@
|
||||
# bin v_z v_r
|
||||
0 -1.15987e+02 1.08067e-01
|
||||
1 -1.15639e+02 3.55568e-01
|
||||
2 -1.11238e+02 5.33661e-01
|
||||
3 -1.08176e+02 7.10649e-01
|
||||
4 -1.00880e+02 7.95604e-01
|
||||
5 -9.37865e+01 8.47885e-01
|
||||
6 -8.26565e+01 7.48154e-01
|
||||
7 -6.97409e+01 5.36829e-01
|
||||
8 -4.57225e+01 7.03579e-02
|
||||
9 -8.51532e+01 4.60317e-02
|
||||
10 -8.25859e+01 1.22672e-01
|
||||
11 -8.08526e+01 1.97098e-01
|
||||
12 -7.70603e+01 2.57527e-01
|
||||
13 -7.15105e+01 2.91238e-01
|
||||
14 -6.43798e+01 2.96228e-01
|
||||
15 -5.55349e+01 2.64007e-01
|
||||
16 -4.45193e+01 1.89039e-01
|
||||
17 -2.71603e+01 2.38274e-02
|
||||
18 -7.12749e+01 2.43477e-02
|
||||
19 -7.10769e+01 7.58880e-02
|
||||
20 -6.84221e+01 1.15083e-01
|
||||
21 -6.44756e+01 1.44884e-01
|
||||
22 -5.99590e+01 1.66229e-01
|
||||
23 -5.36109e+01 1.67487e-01
|
||||
24 -4.57434e+01 1.48285e-01
|
||||
25 -3.57203e+01 1.05070e-01
|
||||
26 -2.04739e+01 1.33036e-02
|
||||
27 -6.27570e+01 1.67046e-02
|
||||
28 -6.17418e+01 4.83048e-02
|
||||
29 -5.99166e+01 7.20976e-02
|
||||
30 -5.66218e+01 9.48803e-02
|
||||
31 -5.20829e+01 1.07733e-01
|
||||
32 -4.62242e+01 1.08140e-01
|
||||
33 -3.89467e+01 9.44653e-02
|
||||
34 -2.97582e+01 6.50341e-02
|
||||
35 -1.61952e+01 7.21513e-03
|
||||
36 -5.65928e+01 1.19464e-02
|
||||
37 -5.56435e+01 3.45010e-02
|
||||
38 -5.39431e+01 5.14944e-02
|
||||
39 -5.08493e+01 6.75403e-02
|
||||
40 -4.66330e+01 7.69125e-02
|
||||
41 -4.11910e+01 7.68965e-02
|
||||
42 -3.44912e+01 6.65120e-02
|
||||
43 -2.60897e+01 4.51126e-02
|
||||
44 -1.35561e+01 3.94247e-03
|
||||
45 -5.18912e+01 8.95226e-03
|
||||
46 -5.09970e+01 2.59768e-02
|
||||
47 -4.93825e+01 3.87799e-02
|
||||
48 -4.64841e+01 5.08211e-02
|
||||
49 -4.25016e+01 5.79772e-02
|
||||
50 -3.74109e+01 5.76302e-02
|
||||
51 -3.11254e+01 4.99412e-02
|
||||
52 -2.32684e+01 3.47740e-02
|
||||
53 -1.16190e+01 3.79275e-03
|
||||
54 -4.81526e+01 6.97058e-03
|
||||
55 -4.73021e+01 2.02871e-02
|
||||
56 -4.57660e+01 3.02392e-02
|
||||
57 -4.30279e+01 3.96397e-02
|
||||
58 -3.92445e+01 4.52066e-02
|
||||
59 -3.44418e+01 4.48151e-02
|
||||
60 -2.85143e+01 3.87837e-02
|
||||
61 -2.10894e+01 2.68181e-02
|
||||
62 -1.02004e+01 2.83994e-03
|
||||
63 -4.50924e+01 5.59957e-03
|
||||
64 -4.42793e+01 1.62792e-02
|
||||
65 -4.28224e+01 2.42362e-02
|
||||
66 -4.02004e+01 3.17514e-02
|
||||
67 -3.66065e+01 3.62411e-02
|
||||
68 -3.20273e+01 3.59213e-02
|
||||
69 -2.64149e+01 3.10388e-02
|
||||
70 -1.94903e+01 2.10776e-02
|
||||
71 -9.11788e+00 1.78532e-03
|
||||
72 -4.25182e+01 4.57258e-03
|
||||
73 -4.17424e+01 1.32896e-02
|
||||
74 -4.03426e+01 1.98390e-02
|
||||
75 -3.78329e+01 2.59848e-02
|
||||
76 -3.43939e+01 2.97387e-02
|
||||
77 -3.00184e+01 2.98199e-02
|
||||
78 -2.46606e+01 2.54377e-02
|
||||
79 -1.80522e+01 1.79375e-02
|
||||
80 -8.22619e+00 1.73314e-03
|
||||
81 -4.03329e+01 3.81852e-03
|
||||
82 -3.95858e+01 1.10999e-02
|
||||
83 -3.82389e+01 1.65483e-02
|
||||
84 -3.58338e+01 2.17008e-02
|
||||
85 -3.25247e+01 2.48241e-02
|
||||
86 -2.83314e+01 2.45242e-02
|
||||
87 -2.31999e+01 2.12617e-02
|
||||
88 -1.69117e+01 1.42903e-02
|
||||
89 -7.50975e+00 1.31380e-03
|
||||
90 -3.84409e+01 3.22526e-03
|
||||
91 -3.77192e+01 9.40266e-03
|
||||
92 -3.64269e+01 1.40106e-02
|
||||
93 -3.41018e+01 1.83740e-02
|
||||
94 -3.09202e+01 2.10164e-02
|
||||
95 -2.68765e+01 2.06994e-02
|
||||
96 -2.19447e+01 1.80418e-02
|
||||
97 -1.58916e+01 1.20636e-02
|
||||
98 -6.91470e+00 1.14446e-03
|
||||
99 -3.67838e+01 2.77093e-03
|
||||
100 -3.60878e+01 8.05833e-03
|
||||
101 -3.48394e+01 1.20153e-02
|
||||
102 -3.25878e+01 1.57320e-02
|
||||
103 -2.95190e+01 1.81258e-02
|
||||
104 -2.56106e+01 1.82087e-02
|
||||
105 -2.08634e+01 1.54375e-02
|
||||
106 -1.50519e+01 1.09530e-02
|
||||
107 -6.39854e+00 9.91809e-04
|
||||
108 -3.53168e+01 2.38790e-03
|
||||
109 -3.46440e+01 6.97000e-03
|
||||
110 -3.34302e+01 1.04073e-02
|
||||
111 -3.12551e+01 1.36356e-02
|
||||
112 -2.82787e+01 1.56634e-02
|
||||
113 -2.45011e+01 1.55580e-02
|
||||
114 -1.99029e+01 1.33252e-02
|
||||
115 -1.43129e+01 9.55875e-03
|
||||
116 -5.97713e+00 6.19015e-04
|
||||
117 -3.39974e+01 2.11011e-03
|
||||
118 -3.33420e+01 6.10765e-03
|
||||
119 -3.21686e+01 9.10283e-03
|
||||
120 -3.00577e+01 1.19434e-02
|
||||
121 -2.71715e+01 1.36748e-02
|
||||
122 -2.35076e+01 1.35288e-02
|
||||
123 -1.90573e+01 1.16831e-02
|
||||
124 -1.35797e+01 7.56400e-03
|
||||
125 -5.59833e+00 8.00313e-04
|
||||
126 -3.28182e+01 1.83293e-03
|
||||
127 -3.21824e+01 5.37995e-03
|
||||
128 -3.10416e+01 8.02238e-03
|
||||
129 -2.89864e+01 1.05092e-02
|
||||
130 -2.61847e+01 1.21319e-02
|
||||
131 -2.26221e+01 1.22461e-02
|
||||
132 -1.83027e+01 1.03243e-02
|
||||
133 -1.30040e+01 6.95498e-03
|
||||
134 -5.25504e+00 4.71036e-04
|
||||
135 -3.17497e+01 1.62650e-03
|
||||
136 -3.11319e+01 4.77044e-03
|
||||
137 -3.00174e+01 7.12570e-03
|
||||
138 -2.80208e+01 9.31311e-03
|
||||
139 -2.52899e+01 1.07447e-02
|
||||
140 -2.18267e+01 1.06530e-02
|
||||
141 -1.76140e+01 9.15748e-03
|
||||
142 -1.24787e+01 6.51066e-03
|
||||
143 -4.97243e+00 3.63821e-04
|
||||
144 -3.07742e+01 1.46984e-03
|
||||
145 -3.01708e+01 4.27434e-03
|
||||
146 -2.90847e+01 6.37672e-03
|
||||
147 -2.71411e+01 8.39204e-03
|
||||
148 -2.44768e+01 9.63449e-03
|
||||
149 -2.11037e+01 9.40953e-03
|
||||
150 -1.70027e+01 8.04482e-03
|
||||
151 -1.20609e+01 5.27980e-03
|
||||
152 -4.70570e+00 3.65081e-04
|
||||
153 -2.98806e+01 1.31848e-03
|
||||
154 -2.92904e+01 3.84446e-03
|
||||
155 -2.82337e+01 5.73208e-03
|
||||
156 -2.63334e+01 7.50369e-03
|
||||
157 -2.37364e+01 8.68328e-03
|
||||
158 -2.04422e+01 8.68877e-03
|
||||
159 -1.64451e+01 7.47699e-03
|
||||
160 -1.16035e+01 5.11849e-03
|
||||
161 -4.46904e+00 5.31456e-04
|
||||
162 -2.90552e+01 1.17098e-03
|
||||
163 -2.84809e+01 3.46731e-03
|
||||
164 -2.74447e+01 5.17786e-03
|
||||
165 -2.55887e+01 6.75749e-03
|
||||
166 -2.30509e+01 7.83607e-03
|
||||
167 -1.98341e+01 7.83092e-03
|
||||
168 -1.59326e+01 6.71325e-03
|
||||
169 -1.11450e+01 4.39556e-03
|
||||
170 -4.24906e+00 3.66568e-04
|
||||
171 -2.82944e+01 1.09145e-03
|
||||
172 -2.77315e+01 3.15662e-03
|
||||
173 -2.67187e+01 4.70814e-03
|
||||
174 -2.49054e+01 6.19873e-03
|
||||
175 -2.24214e+01 7.14192e-03
|
||||
176 -1.92766e+01 7.12701e-03
|
||||
177 -1.54515e+01 6.11133e-03
|
||||
178 -1.09066e+01 3.80287e-03
|
||||
179 -4.10527e+00 2.93149e-04
|
||||
180 -2.75888e+01 9.88532e-04
|
||||
181 -2.70365e+01 2.87692e-03
|
||||
182 -2.60479e+01 4.29267e-03
|
||||
183 -2.42700e+01 5.62582e-03
|
||||
184 -2.18407e+01 6.49743e-03
|
||||
185 -1.87599e+01 6.48989e-03
|
||||
186 -1.50235e+01 5.73578e-03
|
||||
187 -1.04990e+01 4.46299e-03
|
||||
188 -3.91422e+00 3.27214e-04
|
||||
189 -2.69327e+01 8.90303e-04
|
||||
190 -2.63926e+01 2.63457e-03
|
||||
191 -2.54231e+01 3.92807e-03
|
||||
192 -2.36791e+01 5.12250e-03
|
||||
193 -2.13004e+01 5.99242e-03
|
||||
194 -1.82808e+01 6.02923e-03
|
||||
195 -1.46248e+01 5.07046e-03
|
||||
196 -1.01997e+01 3.82966e-03
|
||||
197 -3.75025e+00 3.69227e-04
|
||||
198 -2.63197e+01 8.41389e-04
|
||||
199 -2.57911e+01 2.41746e-03
|
||||
200 -2.48376e+01 3.61800e-03
|
||||
201 -2.31296e+01 4.76309e-03
|
||||
202 -2.07949e+01 5.45383e-03
|
||||
203 -1.78354e+01 5.30756e-03
|
||||
204 -1.42524e+01 4.60056e-03
|
||||
205 -9.92378e+00 2.77166e-03
|
||||
206 -3.59315e+00 3.32424e-04
|
||||
207 -2.57445e+01 7.63621e-04
|
||||
208 -2.52246e+01 2.23521e-03
|
||||
209 -2.42896e+01 3.33394e-03
|
||||
210 -2.26150e+01 4.38777e-03
|
||||
211 -2.03224e+01 5.07565e-03
|
||||
212 -1.74196e+01 5.09068e-03
|
||||
213 -1.38988e+01 4.48866e-03
|
||||
214 -9.63183e+00 3.13646e-03
|
||||
215 -3.47684e+00 9.06580e-05
|
||||
216 -2.52043e+01 7.01688e-04
|
||||
217 -2.46927e+01 2.06636e-03
|
||||
218 -2.37770e+01 3.07924e-03
|
||||
219 -2.21303e+01 4.00471e-03
|
||||
220 -1.98809e+01 4.69065e-03
|
||||
221 -1.70287e+01 4.67758e-03
|
||||
222 -1.35785e+01 4.03764e-03
|
||||
223 -9.38566e+00 3.22984e-03
|
||||
224 -3.33885e+00 8.29420e-05
|
||||
225 -2.46944e+01 6.58360e-04
|
||||
226 -2.41937e+01 1.90960e-03
|
||||
227 -2.32906e+01 2.86227e-03
|
||||
228 -2.16732e+01 3.76481e-03
|
||||
229 -1.94624e+01 4.33347e-03
|
||||
230 -1.66604e+01 4.34915e-03
|
||||
231 -1.32712e+01 3.69975e-03
|
||||
232 -9.16447e+00 2.53832e-03
|
||||
233 -3.22400e+00 9.30475e-05
|
||||
234 -2.42142e+01 6.10862e-04
|
||||
235 -2.37209e+01 1.78438e-03
|
||||
236 -2.28338e+01 2.66200e-03
|
||||
237 -2.12448e+01 3.50610e-03
|
||||
238 -1.90700e+01 4.04785e-03
|
||||
239 -1.63157e+01 4.10716e-03
|
||||
240 -1.29787e+01 3.45485e-03
|
||||
241 -8.94610e+00 2.06056e-03
|
||||
242 -3.11921e+00 1.68756e-04
|
||||
243 -2.37605e+01 5.63194e-04
|
||||
244 -2.32742e+01 1.66290e-03
|
||||
245 -2.24037e+01 2.47543e-03
|
||||
246 -2.08385e+01 3.21388e-03
|
||||
247 -1.87007e+01 3.77400e-03
|
||||
248 -1.59904e+01 3.70227e-03
|
||||
249 -1.27105e+01 3.22257e-03
|
||||
250 -8.70965e+00 2.39641e-03
|
||||
251 -3.02412e+00 2.34561e-04
|
||||
252 -2.33311e+01 5.33651e-04
|
||||
253 -2.28535e+01 1.54885e-03
|
||||
254 -2.19958e+01 2.31971e-03
|
||||
255 -2.04541e+01 3.03475e-03
|
||||
256 -1.83509e+01 3.54658e-03
|
||||
257 -1.56821e+01 3.52683e-03
|
||||
258 -1.24539e+01 2.96809e-03
|
||||
259 -8.54988e+00 1.61622e-03
|
||||
260 -2.93162e+00 9.26082e-05
|
||||
261 -2.29239e+01 5.06882e-04
|
||||
262 -2.24544e+01 1.45538e-03
|
||||
263 -2.16074e+01 2.17404e-03
|
||||
264 -2.00907e+01 2.85577e-03
|
||||
265 -1.80181e+01 3.29234e-03
|
||||
266 -1.53912e+01 3.28744e-03
|
||||
267 -1.22128e+01 2.84841e-03
|
||||
268 -8.42462e+00 1.95425e-03
|
||||
269 -2.86327e+00 -4.28329e-05
|
||||
270 -2.25329e+01 4.63098e-04
|
||||
271 -2.20685e+01 1.36944e-03
|
||||
272 -2.12373e+01 2.03867e-03
|
||||
273 -1.97426e+01 2.65300e-03
|
||||
274 -1.77013e+01 3.08321e-03
|
||||
275 -1.51131e+01 3.11631e-03
|
||||
276 -1.19785e+01 2.81463e-03
|
||||
277 -8.18800e+00 2.09253e-03
|
||||
278 -2.76063e+00 2.89746e-04
|
||||
279 -2.21641e+01 4.32094e-04
|
||||
280 -2.17073e+01 1.27719e-03
|
||||
281 -2.08870e+01 1.91474e-03
|
||||
282 -1.94129e+01 2.50787e-03
|
||||
283 -1.74017e+01 2.92808e-03
|
||||
284 -1.48497e+01 3.02656e-03
|
||||
285 -1.17658e+01 2.38575e-03
|
||||
286 -8.03762e+00 1.61490e-03
|
||||
287 -2.69299e+00 1.36662e-04
|
||||
288 -2.18124e+01 4.17559e-04
|
||||
289 -2.13628e+01 1.20777e-03
|
||||
290 -2.05519e+01 1.80523e-03
|
||||
291 -1.90996e+01 2.37956e-03
|
||||
292 -1.71152e+01 2.74283e-03
|
||||
293 -1.46000e+01 2.65535e-03
|
||||
294 -1.15552e+01 2.47308e-03
|
||||
295 -7.89325e+00 1.79595e-03
|
||||
296 -2.61817e+00 -1.26285e-05
|
||||
297 -2.14755e+01 3.85499e-04
|
||||
298 -2.10311e+01 1.14040e-03
|
||||
299 -2.02320e+01 1.70287e-03
|
||||
300 -1.88004e+01 2.22950e-03
|
||||
301 -1.68421e+01 2.59310e-03
|
||||
302 -1.43619e+01 2.55794e-03
|
||||
303 -1.13633e+01 2.35191e-03
|
||||
304 -7.76244e+00 1.80255e-03
|
||||
305 -2.54756e+00 1.64159e-04
|
||||
306 -2.11533e+01 3.64302e-04
|
||||
307 -2.07139e+01 1.07726e-03
|
||||
308 -1.99274e+01 1.61070e-03
|
||||
309 -1.85132e+01 2.12759e-03
|
||||
310 -1.65822e+01 2.46494e-03
|
||||
311 -1.41335e+01 2.46566e-03
|
||||
312 -1.11725e+01 2.02565e-03
|
||||
313 -7.61782e+00 1.41339e-03
|
||||
314 -2.48649e+00 2.09485e-04
|
||||
315 -2.08443e+01 3.53078e-04
|
||||
316 -2.04122e+01 1.01903e-03
|
||||
317 -1.96332e+01 1.52520e-03
|
||||
318 -1.82379e+01 2.00115e-03
|
||||
319 -1.63313e+01 2.32882e-03
|
||||
320 -1.39147e+01 2.31160e-03
|
||||
321 -1.09873e+01 1.98983e-03
|
||||
322 -7.48829e+00 1.20419e-03
|
||||
323 -2.43448e+00 -3.39703e-05
|
||||
324 -2.05486e+01 3.39516e-04
|
||||
325 -2.01212e+01 9.71505e-04
|
||||
326 -1.93526e+01 1.44595e-03
|
||||
327 -1.79755e+01 1.87630e-03
|
||||
328 -1.60922e+01 2.20964e-03
|
||||
329 -1.37065e+01 2.19673e-03
|
||||
330 -1.08183e+01 2.10294e-03
|
||||
331 -7.33925e+00 1.48101e-03
|
||||
332 -2.37749e+00 2.18870e-04
|
||||
333 -2.02646e+01 3.09172e-04
|
||||
334 -1.98416e+01 9.13413e-04
|
||||
335 -1.90844e+01 1.36956e-03
|
||||
336 -1.77229e+01 1.79575e-03
|
||||
337 -1.58638e+01 2.08726e-03
|
||||
338 -1.35067e+01 2.12488e-03
|
||||
339 -1.06588e+01 1.76440e-03
|
||||
340 -7.23967e+00 1.17760e-03
|
||||
341 -2.31339e+00 5.73161e-05
|
||||
342 -1.99928e+01 2.97025e-04
|
||||
343 -1.95756e+01 8.71709e-04
|
||||
344 -1.88264e+01 1.30384e-03
|
||||
345 -1.74805e+01 1.70560e-03
|
||||
346 -1.56442e+01 2.01341e-03
|
||||
347 -1.33144e+01 1.90582e-03
|
||||
348 -1.04934e+01 1.65669e-03
|
||||
349 -7.08783e+00 1.13590e-03
|
||||
350 -2.25468e+00 1.68440e-06
|
||||
351 -1.97310e+01 2.91934e-04
|
||||
352 -1.93195e+01 8.33537e-04
|
||||
353 -1.85774e+01 1.24270e-03
|
||||
354 -1.72483e+01 1.61986e-03
|
||||
355 -1.54324e+01 1.88013e-03
|
||||
356 -1.31307e+01 1.88185e-03
|
||||
357 -1.03495e+01 1.72568e-03
|
||||
358 -7.04713e+00 1.25612e-03
|
||||
359 -2.21824e+00 1.25214e-04
|
||||
360 -1.94785e+01 2.60780e-04
|
||||
361 -1.90709e+01 7.87275e-04
|
||||
362 -1.83380e+01 1.18170e-03
|
||||
363 -1.70246e+01 1.55787e-03
|
||||
364 -1.52289e+01 1.80522e-03
|
||||
365 -1.29544e+01 1.86275e-03
|
||||
366 -1.02043e+01 1.51851e-03
|
||||
367 -6.89796e+00 8.28829e-04
|
||||
368 -2.16761e+00 9.12050e-06
|
||||
369 -1.92352e+01 2.56900e-04
|
||||
370 -1.88313e+01 7.53770e-04
|
||||
371 -1.81082e+01 1.12691e-03
|
||||
372 -1.68084e+01 1.48263e-03
|
||||
373 -1.50337e+01 1.73132e-03
|
||||
374 -1.27832e+01 1.70344e-03
|
||||
375 -1.00646e+01 1.50765e-03
|
||||
376 -6.86287e+00 9.53501e-04
|
||||
377 -2.11732e+00 -5.25494e-05
|
||||
378 -1.90002e+01 2.54039e-04
|
||||
379 -1.86023e+01 7.22802e-04
|
||||
380 -1.78846e+01 1.07886e-03
|
||||
381 -1.65995e+01 1.39866e-03
|
||||
382 -1.48438e+01 1.64569e-03
|
||||
383 -1.26184e+01 1.65668e-03
|
||||
384 -9.92799e+00 1.46316e-03
|
||||
385 -6.72503e+00 1.27292e-03
|
||||
386 -2.07460e+00 1.39439e-04
|
||||
387 -1.87736e+01 2.26017e-04
|
||||
388 -1.83791e+01 6.85367e-04
|
||||
389 -1.76700e+01 1.02863e-03
|
||||
390 -1.63991e+01 1.35196e-03
|
||||
391 -1.46617e+01 1.54633e-03
|
||||
392 -1.24608e+01 1.52571e-03
|
||||
393 -9.80055e+00 1.40329e-03
|
||||
394 -6.64734e+00 8.99613e-04
|
||||
395 -2.04137e+00 5.39785e-05
|
||||
396 -1.85546e+01 2.26916e-04
|
||||
397 -1.81635e+01 6.58504e-04
|
||||
398 -1.74635e+01 9.84393e-04
|
||||
399 -1.62049e+01 1.29109e-03
|
||||
400 -1.44865e+01 1.52537e-03
|
||||
401 -1.23077e+01 1.44216e-03
|
||||
402 -9.67670e+00 1.26420e-03
|
||||
403 -6.54943e+00 7.70379e-04
|
||||
404 -1.99516e+00 3.59561e-05
|
||||
405 -1.83436e+01 2.25680e-04
|
||||
406 -1.79573e+01 6.31568e-04
|
||||
407 -1.72636e+01 9.44099e-04
|
||||
408 -1.60174e+01 1.22778e-03
|
||||
409 -1.43170e+01 1.44442e-03
|
||||
410 -1.21598e+01 1.46590e-03
|
||||
411 -9.55304e+00 1.33430e-03
|
||||
412 -6.44501e+00 9.78530e-04
|
||||
413 -1.96016e+00 1.08616e-04
|
||||
414 -1.81397e+01 2.15077e-04
|
||||
415 -1.77580e+01 6.09162e-04
|
||||
416 -1.70695e+01 9.07708e-04
|
||||
417 -1.58367e+01 1.16662e-03
|
||||
418 -1.41525e+01 1.36447e-03
|
||||
419 -1.20179e+01 1.39197e-03
|
||||
420 -9.43703e+00 1.31664e-03
|
||||
421 -6.32111e+00 9.82131e-04
|
||||
422 -1.91224e+00 6.92862e-05
|
||||
423 -1.79400e+01 1.61578e-04
|
||||
424 -1.75606e+01 5.36149e-04
|
||||
425 -1.68813e+01 8.18716e-04
|
||||
426 -1.56603e+01 1.07397e-03
|
||||
427 -1.39933e+01 1.20696e-03
|
||||
428 -1.18775e+01 1.31198e-03
|
||||
429 -9.32525e+00 1.14079e-03
|
||||
430 -6.29435e+00 8.03908e-04
|
||||
431 -1.89077e+00 2.06670e-04
|
||||
432 -1.77730e+01 3.91284e-03
|
||||
433 -1.73942e+01 1.09401e-02
|
||||
434 -1.67143e+01 1.55810e-02
|
||||
435 -1.54952e+01 1.93606e-02
|
||||
436 -1.38344e+01 1.95253e-02
|
||||
437 -1.17321e+01 1.70954e-02
|
||||
438 -9.19183e+00 1.18088e-02
|
||||
439 -6.22218e+00 5.75390e-03
|
||||
440 -1.83768e+00 5.28683e-04
|
||||
441 -1.29874e+01 -4.11070e-01
|
||||
442 -1.24333e+01 -1.34279e+00
|
||||
443 -1.19159e+01 -2.14085e+00
|
||||
444 -1.13238e+01 -2.96081e+00
|
||||
445 -1.03715e+01 -3.68659e+00
|
||||
446 -8.98614e+00 -4.34624e+00
|
||||
447 -7.71391e+00 -4.78860e+00
|
||||
448 -5.64897e+00 -5.55591e+00
|
||||
449 -2.19954e+00 -1.64280e+00
|
||||
450 1.27902e+01 -4.05406e-01
|
||||
451 1.24854e+01 -1.31306e+00
|
||||
452 1.18864e+01 -2.18954e+00
|
||||
453 1.15531e+01 -2.89385e+00
|
||||
454 1.04508e+01 -3.67407e+00
|
||||
455 9.14878e+00 -4.29526e+00
|
||||
456 7.63978e+00 -4.90785e+00
|
||||
457 5.71709e+00 -5.46813e+00
|
||||
458 2.20262e+00 -1.56429e+00
|
||||
459 1.77729e+01 3.61697e-03
|
||||
460 1.73937e+01 1.06751e-02
|
||||
461 1.67133e+01 1.53524e-02
|
||||
462 1.54939e+01 1.91835e-02
|
||||
463 1.38330e+01 1.93770e-02
|
||||
464 1.17304e+01 1.69639e-02
|
||||
465 9.18530e+00 1.18776e-02
|
||||
466 6.17959e+00 5.04321e-03
|
||||
467 1.85578e+00 1.32328e-04
|
||||
468 1.79400e+01 2.43050e-04
|
||||
469 1.75602e+01 6.06712e-04
|
||||
470 1.68805e+01 8.85157e-04
|
||||
471 1.56593e+01 1.18694e-03
|
||||
472 1.39922e+01 1.35118e-03
|
||||
473 1.18766e+01 1.44961e-03
|
||||
474 9.32571e+00 1.06881e-03
|
||||
475 6.32504e+00 7.32592e-04
|
||||
476 1.88793e+00 5.23891e-04
|
||||
477 1.81394e+01 2.06740e-04
|
||||
478 1.77573e+01 6.02847e-04
|
||||
479 1.70686e+01 9.02263e-04
|
||||
480 1.58357e+01 1.20022e-03
|
||||
481 1.41514e+01 1.37826e-03
|
||||
482 1.20166e+01 1.34108e-03
|
||||
483 9.43400e+00 1.04379e-03
|
||||
484 6.33654e+00 9.10949e-04
|
||||
485 1.91642e+00 -1.03172e-04
|
||||
486 1.83435e+01 2.10418e-04
|
||||
487 1.79569e+01 6.26852e-04
|
||||
488 1.72626e+01 9.42864e-04
|
||||
489 1.60163e+01 1.24697e-03
|
||||
490 1.43158e+01 1.45632e-03
|
||||
491 1.21590e+01 1.48267e-03
|
||||
492 9.55412e+00 1.17525e-03
|
||||
493 6.44678e+00 5.15554e-04
|
||||
494 1.95419e+00 3.64129e-05
|
||||
495 1.85543e+01 2.21598e-04
|
||||
496 1.81628e+01 6.57408e-04
|
||||
497 1.74624e+01 9.83685e-04
|
||||
498 1.62037e+01 1.26227e-03
|
||||
499 1.44853e+01 1.50831e-03
|
||||
500 1.23063e+01 1.56600e-03
|
||||
501 9.67074e+00 1.26667e-03
|
||||
502 6.51836e+00 9.88695e-04
|
||||
503 2.00884e+00 5.87418e-05
|
||||
504 1.87746e+01 2.37492e-04
|
||||
505 1.83805e+01 6.87015e-04
|
||||
506 1.76703e+01 1.02853e-03
|
||||
507 1.63987e+01 1.34633e-03
|
||||
508 1.46615e+01 1.57698e-03
|
||||
509 1.24599e+01 1.58576e-03
|
||||
510 9.79870e+00 1.35054e-03
|
||||
511 6.63775e+00 1.35459e-03
|
||||
512 2.03043e+00 1.35941e-04
|
||||
513 1.90004e+01 2.45395e-04
|
||||
514 1.86013e+01 7.19143e-04
|
||||
515 1.78851e+01 1.07602e-03
|
||||
516 1.65988e+01 1.41094e-03
|
||||
517 1.48439e+01 1.65554e-03
|
||||
518 1.26175e+01 1.60384e-03
|
||||
519 9.93046e+00 1.27171e-03
|
||||
520 6.73260e+00 6.20097e-04
|
||||
521 2.07866e+00 -3.24095e-05
|
||||
522 1.92345e+01 2.57540e-04
|
||||
523 1.88303e+01 7.52096e-04
|
||||
524 1.81069e+01 1.12787e-03
|
||||
525 1.68070e+01 1.48673e-03
|
||||
526 1.50322e+01 1.73807e-03
|
||||
527 1.27817e+01 1.75664e-03
|
||||
528 1.00600e+01 1.31835e-03
|
||||
529 6.80826e+00 9.42734e-04
|
||||
530 2.12701e+00 7.21861e-05
|
||||
531 1.94779e+01 2.64811e-04
|
||||
532 1.90699e+01 7.89915e-04
|
||||
533 1.83367e+01 1.18053e-03
|
||||
534 1.70231e+01 1.51709e-03
|
||||
535 1.52273e+01 1.81714e-03
|
||||
536 1.29527e+01 1.84578e-03
|
||||
537 1.02023e+01 1.56611e-03
|
||||
538 6.92381e+00 1.19809e-03
|
||||
539 2.16153e+00 3.94413e-05
|
||||
540 1.97305e+01 2.80486e-04
|
||||
541 1.93187e+01 8.27000e-04
|
||||
542 1.85760e+01 1.24064e-03
|
||||
543 1.72467e+01 1.61405e-03
|
||||
544 1.54307e+01 1.90098e-03
|
||||
545 1.31293e+01 2.00486e-03
|
||||
546 1.03516e+01 1.71855e-03
|
||||
547 7.03831e+00 1.20851e-03
|
||||
548 2.20632e+00 5.64787e-05
|
||||
549 1.99929e+01 2.91907e-04
|
||||
550 1.95746e+01 8.71593e-04
|
||||
551 1.88259e+01 1.30456e-03
|
||||
552 1.74804e+01 1.71496e-03
|
||||
553 1.56433e+01 1.98851e-03
|
||||
554 1.33141e+01 1.95026e-03
|
||||
555 1.04995e+01 1.72248e-03
|
||||
556 7.13421e+00 1.30187e-03
|
||||
557 2.25771e+00 4.64399e-06
|
||||
558 2.02656e+01 3.07655e-04
|
||||
559 1.98431e+01 9.15297e-04
|
||||
560 1.90835e+01 1.37247e-03
|
||||
561 1.77229e+01 1.80257e-03
|
||||
562 1.58626e+01 2.09193e-03
|
||||
563 1.35065e+01 2.05367e-03
|
||||
564 1.06539e+01 1.81307e-03
|
||||
565 7.25636e+00 1.27954e-03
|
||||
566 2.31035e+00 1.30554e-04
|
||||
567 2.05495e+01 3.20899e-04
|
||||
568 2.01225e+01 9.64466e-04
|
||||
569 1.93527e+01 1.44314e-03
|
||||
570 1.79746e+01 1.87028e-03
|
||||
571 1.60918e+01 2.16690e-03
|
||||
572 1.37055e+01 2.10763e-03
|
||||
573 1.08217e+01 2.01599e-03
|
||||
574 7.36210e+00 1.36784e-03
|
||||
575 2.35916e+00 1.00142e-04
|
||||
576 2.08444e+01 3.42978e-04
|
||||
577 2.04113e+01 1.02040e-03
|
||||
578 1.96334e+01 1.52551e-03
|
||||
579 1.82366e+01 2.00303e-03
|
||||
580 1.63311e+01 2.30543e-03
|
||||
581 1.39133e+01 2.44265e-03
|
||||
582 1.09949e+01 2.17700e-03
|
||||
583 7.49487e+00 1.40101e-03
|
||||
584 2.43063e+00 2.77981e-05
|
||||
585 2.11519e+01 3.71200e-04
|
||||
586 2.07122e+01 1.07905e-03
|
||||
587 1.99253e+01 1.61239e-03
|
||||
588 1.85110e+01 2.13120e-03
|
||||
589 1.65800e+01 2.44405e-03
|
||||
590 1.41313e+01 2.37661e-03
|
||||
591 1.11742e+01 2.14650e-03
|
||||
592 7.62919e+00 1.10698e-03
|
||||
593 2.48091e+00 1.37389e-04
|
||||
594 2.14761e+01 3.84889e-04
|
||||
595 2.10321e+01 1.14135e-03
|
||||
596 2.02319e+01 1.70658e-03
|
||||
597 1.87992e+01 2.24591e-03
|
||||
598 1.68416e+01 2.56370e-03
|
||||
599 1.43608e+01 2.50125e-03
|
||||
600 1.13595e+01 2.22417e-03
|
||||
601 7.73660e+00 1.57202e-03
|
||||
602 2.54257e+00 3.10261e-05
|
||||
603 2.18121e+01 4.11663e-04
|
||||
604 2.13613e+01 1.21233e-03
|
||||
605 2.05519e+01 1.80561e-03
|
||||
606 1.90981e+01 2.35275e-03
|
||||
607 1.71149e+01 2.74508e-03
|
||||
608 1.45984e+01 2.68484e-03
|
||||
609 1.15570e+01 2.44747e-03
|
||||
610 7.90372e+00 1.75904e-03
|
||||
611 2.61560e+00 2.48070e-04
|
||||
612 2.21638e+01 4.37337e-04
|
||||
613 2.17057e+01 1.28259e-03
|
||||
614 2.08858e+01 1.91546e-03
|
||||
615 1.94123e+01 2.50337e-03
|
||||
616 1.74002e+01 2.91366e-03
|
||||
617 1.48488e+01 3.00954e-03
|
||||
618 1.17640e+01 2.67142e-03
|
||||
619 8.07965e+00 1.57355e-03
|
||||
620 2.69196e+00 5.07402e-05
|
||||
621 2.25358e+01 4.69393e-04
|
||||
622 2.20728e+01 1.36522e-03
|
||||
623 2.12381e+01 2.04104e-03
|
||||
624 1.97436e+01 2.70418e-03
|
||||
625 1.77015e+01 3.09237e-03
|
||||
626 1.51130e+01 3.06268e-03
|
||||
627 1.19857e+01 2.70620e-03
|
||||
628 8.24843e+00 1.57543e-03
|
||||
629 2.75702e+00 1.47601e-04
|
||||
630 2.29230e+01 4.95717e-04
|
||||
631 2.24521e+01 1.45473e-03
|
||||
632 2.16071e+01 2.17049e-03
|
||||
633 2.00888e+01 2.85765e-03
|
||||
634 1.80175e+01 3.29331e-03
|
||||
635 1.53890e+01 3.29807e-03
|
||||
636 1.22098e+01 2.81700e-03
|
||||
637 8.35754e+00 2.31393e-03
|
||||
638 2.84155e+00 1.43052e-04
|
||||
639 2.33305e+01 5.40488e-04
|
||||
640 2.28515e+01 1.56015e-03
|
||||
641 2.19941e+01 2.32022e-03
|
||||
642 2.04533e+01 3.01696e-03
|
||||
643 1.83490e+01 3.52151e-03
|
||||
644 1.56804e+01 3.42021e-03
|
||||
645 1.24556e+01 3.13601e-03
|
||||
646 8.59964e+00 2.42081e-03
|
||||
647 2.93469e+00 2.84477e-04
|
||||
648 2.37605e+01 5.77455e-04
|
||||
649 2.32748e+01 1.66061e-03
|
||||
650 2.24015e+01 2.48092e-03
|
||||
651 2.08379e+01 3.25164e-03
|
||||
652 1.86983e+01 3.79705e-03
|
||||
653 1.59884e+01 3.74873e-03
|
||||
654 1.27062e+01 3.20508e-03
|
||||
655 8.75267e+00 2.13104e-03
|
||||
656 3.02017e+00 2.75057e-05
|
||||
657 2.42143e+01 6.19080e-04
|
||||
658 2.37216e+01 1.77630e-03
|
||||
659 2.28331e+01 2.66282e-03
|
||||
660 2.12426e+01 3.50519e-03
|
||||
661 1.90688e+01 4.03203e-03
|
||||
662 1.63136e+01 4.02593e-03
|
||||
663 1.29820e+01 3.35037e-03
|
||||
664 8.96999e+00 2.05361e-03
|
||||
665 3.11706e+00 1.25971e-04
|
||||
666 2.46955e+01 6.60192e-04
|
||||
667 2.41923e+01 1.92012e-03
|
||||
668 2.32918e+01 2.86334e-03
|
||||
669 2.16735e+01 3.75400e-03
|
||||
670 1.94631e+01 4.34425e-03
|
||||
671 1.66601e+01 4.31477e-03
|
||||
672 1.32742e+01 3.83012e-03
|
||||
673 9.21914e+00 2.66501e-03
|
||||
674 3.22637e+00 1.90530e-04
|
||||
675 2.52038e+01 7.22075e-04
|
||||
676 2.46928e+01 2.06919e-03
|
||||
677 2.37741e+01 3.08472e-03
|
||||
678 2.21293e+01 4.04659e-03
|
||||
679 1.98780e+01 4.69489e-03
|
||||
680 1.70273e+01 4.61413e-03
|
||||
681 1.35759e+01 4.02379e-03
|
||||
682 9.40189e+00 3.03308e-03
|
||||
683 3.34166e+00 2.80079e-04
|
||||
684 2.57440e+01 7.56440e-04
|
||||
685 2.52248e+01 2.22537e-03
|
||||
686 2.42885e+01 3.32963e-03
|
||||
687 2.26121e+01 4.37248e-03
|
||||
688 2.03209e+01 5.04804e-03
|
||||
689 1.74163e+01 4.96395e-03
|
||||
690 1.39013e+01 4.32262e-03
|
||||
691 9.62806e+00 2.67435e-03
|
||||
692 3.45757e+00 -3.81489e-05
|
||||
693 2.63179e+01 8.25750e-04
|
||||
694 2.57878e+01 2.41779e-03
|
||||
695 2.48365e+01 3.61866e-03
|
||||
696 2.31261e+01 4.78201e-03
|
||||
697 2.07934e+01 5.50213e-03
|
||||
698 1.78319e+01 5.50491e-03
|
||||
699 1.42520e+01 4.51895e-03
|
||||
700 9.97480e+00 2.82401e-03
|
||||
701 3.60325e+00 1.63749e-04
|
||||
702 2.69305e+01 8.99221e-04
|
||||
703 2.63888e+01 2.63489e-03
|
||||
704 2.54196e+01 3.92608e-03
|
||||
705 2.36773e+01 5.13720e-03
|
||||
706 2.12970e+01 5.96948e-03
|
||||
707 1.82787e+01 5.88989e-03
|
||||
708 1.46260e+01 5.14566e-03
|
||||
709 1.02125e+01 4.10511e-03
|
||||
710 3.75158e+00 2.65926e-04
|
||||
711 2.75918e+01 9.90439e-04
|
||||
712 2.70413e+01 2.87644e-03
|
||||
713 2.60483e+01 4.29389e-03
|
||||
714 2.42706e+01 5.62871e-03
|
||||
715 2.18404e+01 6.52057e-03
|
||||
716 1.87596e+01 6.41072e-03
|
||||
717 1.50296e+01 5.47294e-03
|
||||
718 1.05170e+01 4.48253e-03
|
||||
719 3.90128e+00 3.57685e-04
|
||||
720 2.82965e+01 1.08000e-03
|
||||
721 2.77330e+01 3.15368e-03
|
||||
722 2.67219e+01 4.70821e-03
|
||||
723 2.49034e+01 6.15844e-03
|
||||
724 2.24236e+01 7.15372e-03
|
||||
725 1.92741e+01 7.06544e-03
|
||||
726 1.54597e+01 6.00671e-03
|
||||
727 1.08338e+01 4.18472e-03
|
||||
728 4.07436e+00 2.12728e-04
|
||||
729 2.90558e+01 1.18392e-03
|
||||
730 2.84787e+01 3.47357e-03
|
||||
731 2.74455e+01 5.18240e-03
|
||||
732 2.55885e+01 6.80219e-03
|
||||
733 2.30512e+01 7.85583e-03
|
||||
734 1.98329e+01 7.80124e-03
|
||||
735 1.59352e+01 6.49514e-03
|
||||
736 1.12255e+01 4.19423e-03
|
||||
737 4.26645e+00 3.22766e-04
|
||||
738 2.98780e+01 1.30451e-03
|
||||
739 2.92885e+01 3.84059e-03
|
||||
740 2.82280e+01 5.72304e-03
|
||||
741 2.63308e+01 7.47757e-03
|
||||
742 2.37308e+01 8.69950e-03
|
||||
743 2.04396e+01 8.82411e-03
|
||||
744 1.64474e+01 7.50693e-03
|
||||
745 1.16465e+01 5.42977e-03
|
||||
746 4.48225e+00 4.31279e-04
|
||||
747 3.07711e+01 1.46530e-03
|
||||
748 3.01680e+01 4.26609e-03
|
||||
749 2.90815e+01 6.37003e-03
|
||||
750 2.71352e+01 8.34415e-03
|
||||
751 2.44735e+01 9.63311e-03
|
||||
752 2.10982e+01 9.81544e-03
|
||||
753 1.70094e+01 8.26504e-03
|
||||
754 1.20317e+01 5.42423e-03
|
||||
755 4.69644e+00 3.99749e-04
|
||||
756 3.17498e+01 1.62356e-03
|
||||
757 3.11289e+01 4.78338e-03
|
||||
758 3.00177e+01 7.12835e-03
|
||||
759 2.80201e+01 9.36206e-03
|
||||
760 2.52897e+01 1.07675e-02
|
||||
761 2.18255e+01 1.05361e-02
|
||||
762 1.76260e+01 9.18238e-03
|
||||
763 1.25880e+01 6.10588e-03
|
||||
764 4.97257e+00 4.21942e-04
|
||||
765 3.28195e+01 1.82587e-03
|
||||
766 3.21831e+01 5.38161e-03
|
||||
767 3.10376e+01 8.02593e-03
|
||||
768 2.89896e+01 1.05423e-02
|
||||
769 2.61806e+01 1.20936e-02
|
||||
770 2.26247e+01 1.19996e-02
|
||||
771 1.82958e+01 1.03039e-02
|
||||
772 1.30299e+01 7.24054e-03
|
||||
773 5.25822e+00 6.59539e-04
|
||||
774 3.39997e+01 2.05748e-03
|
||||
775 3.33463e+01 6.09387e-03
|
||||
776 3.21679e+01 9.09466e-03
|
||||
777 3.00574e+01 1.18952e-02
|
||||
778 2.71702e+01 1.36912e-02
|
||||
779 2.35073e+01 1.34932e-02
|
||||
780 1.90569e+01 1.19033e-02
|
||||
781 1.36300e+01 8.40003e-03
|
||||
782 5.58241e+00 6.92073e-04
|
||||
783 3.53164e+01 2.38779e-03
|
||||
784 3.46403e+01 6.98980e-03
|
||||
785 3.34299e+01 1.04130e-02
|
||||
786 3.12537e+01 1.36487e-02
|
||||
787 2.82778e+01 1.56664e-02
|
||||
788 2.44991e+01 1.56910e-02
|
||||
789 1.99042e+01 1.35989e-02
|
||||
790 1.42360e+01 8.60508e-03
|
||||
791 5.96336e+00 8.07842e-04
|
||||
792 3.67842e+01 2.77290e-03
|
||||
793 3.60876e+01 8.05782e-03
|
||||
794 3.48330e+01 1.20137e-02
|
||||
795 3.25914e+01 1.57666e-02
|
||||
796 2.95126e+01 1.80477e-02
|
||||
797 2.56130e+01 1.79462e-02
|
||||
798 2.08540e+01 1.55986e-02
|
||||
799 1.50203e+01 9.94161e-03
|
||||
800 6.40427e+00 8.07249e-04
|
||||
801 3.84420e+01 3.21113e-03
|
||||
802 3.77225e+01 9.39553e-03
|
||||
803 3.64250e+01 1.40197e-02
|
||||
804 3.41003e+01 1.83822e-02
|
||||
805 3.09178e+01 2.09989e-02
|
||||
806 2.68751e+01 2.08461e-02
|
||||
807 2.19360e+01 1.81400e-02
|
||||
808 1.58695e+01 1.22202e-02
|
||||
809 6.91803e+00 1.13935e-03
|
||||
810 4.03320e+01 3.79893e-03
|
||||
811 3.95844e+01 1.11061e-02
|
||||
812 3.82438e+01 1.65615e-02
|
||||
813 3.58246e+01 2.16444e-02
|
||||
814 3.25283e+01 2.48109e-02
|
||||
815 2.83228e+01 2.45061e-02
|
||||
816 2.31976e+01 2.15617e-02
|
||||
817 1.69132e+01 1.48341e-02
|
||||
818 7.53863e+00 1.69380e-03
|
||||
819 4.25152e+01 4.57876e-03
|
||||
820 4.17358e+01 1.33168e-02
|
||||
821 4.03399e+01 1.98467e-02
|
||||
822 3.78293e+01 2.59823e-02
|
||||
823 3.43909e+01 2.97008e-02
|
||||
824 3.00145e+01 2.94533e-02
|
||||
825 2.46596e+01 2.56372e-02
|
||||
826 1.80772e+01 1.73385e-02
|
||||
827 8.22840e+00 1.56652e-03
|
||||
828 4.50917e+01 5.59368e-03
|
||||
829 4.42812e+01 1.62399e-02
|
||||
830 4.28182e+01 2.42424e-02
|
||||
831 4.01963e+01 3.17655e-02
|
||||
832 3.66017e+01 3.62527e-02
|
||||
833 3.20225e+01 3.60569e-02
|
||||
834 2.64106e+01 3.11318e-02
|
||||
835 1.93883e+01 2.08851e-02
|
||||
836 9.10092e+00 2.07757e-03
|
||||
837 4.81483e+01 6.93710e-03
|
||||
838 4.72969e+01 2.02562e-02
|
||||
839 4.57719e+01 3.02447e-02
|
||||
840 4.30112e+01 3.95428e-02
|
||||
841 3.92490e+01 4.52318e-02
|
||||
842 3.44242e+01 4.49636e-02
|
||||
843 2.85103e+01 3.88465e-02
|
||||
844 2.11519e+01 2.77404e-02
|
||||
845 1.02546e+01 1.66632e-03
|
||||
846 5.18835e+01 9.02094e-03
|
||||
847 5.09850e+01 2.60053e-02
|
||||
848 4.93750e+01 3.88299e-02
|
||||
849 4.64758e+01 5.10641e-02
|
||||
850 4.24939e+01 5.78737e-02
|
||||
851 3.73897e+01 5.79001e-02
|
||||
852 3.11336e+01 4.99145e-02
|
||||
853 2.33595e+01 3.58096e-02
|
||||
854 1.16332e+01 3.97516e-03
|
||||
855 5.64624e+01 1.20716e-02
|
||||
856 5.60612e+01 3.53622e-02
|
||||
857 5.39232e+01 5.38749e-02
|
||||
858 5.07489e+01 6.85978e-02
|
||||
859 4.67054e+01 7.74980e-02
|
||||
860 4.13070e+01 7.76103e-02
|
||||
861 3.46854e+01 6.79762e-02
|
||||
862 2.64155e+01 4.75009e-02
|
||||
863 1.36519e+01 6.21890e-03
|
||||
864 6.29725e+01 1.32878e-02
|
||||
865 6.18329e+01 4.51960e-02
|
||||
866 5.99180e+01 7.38181e-02
|
||||
867 5.66221e+01 9.52297e-02
|
||||
868 5.20294e+01 1.07625e-01
|
||||
869 4.61784e+01 1.08316e-01
|
||||
870 3.90031e+01 9.49677e-02
|
||||
871 3.00740e+01 6.56401e-02
|
||||
872 1.62885e+01 9.15138e-03
|
||||
873 7.14645e+01 1.73833e-02
|
||||
874 7.04872e+01 6.57196e-02
|
||||
875 6.82578e+01 1.09453e-01
|
||||
876 6.47043e+01 1.43842e-01
|
||||
877 5.97624e+01 1.63988e-01
|
||||
878 5.33817e+01 1.64780e-01
|
||||
879 4.54210e+01 1.46362e-01
|
||||
880 3.54021e+01 1.03522e-01
|
||||
881 2.02973e+01 1.20534e-02
|
||||
882 8.44972e+01 2.95636e-02
|
||||
883 8.34844e+01 1.15571e-01
|
||||
884 8.09776e+01 1.92048e-01
|
||||
885 7.71206e+01 2.53561e-01
|
||||
886 7.15974e+01 2.90931e-01
|
||||
887 6.45339e+01 2.95824e-01
|
||||
888 5.55316e+01 2.62929e-01
|
||||
889 4.41723e+01 1.87396e-01
|
||||
890 2.71246e+01 2.19960e-02
|
||||
891 1.15951e+02 1.11453e-01
|
||||
892 1.15021e+02 3.46751e-01
|
||||
893 1.11268e+02 5.33268e-01
|
||||
894 1.07848e+02 7.04827e-01
|
||||
895 1.00462e+02 7.85416e-01
|
||||
896 9.38074e+01 8.48361e-01
|
||||
897 8.29356e+01 7.54558e-01
|
||||
898 6.89766e+01 5.26199e-01
|
||||
899 4.57730e+01 7.08304e-02
|
||||
@@ -0,0 +1,32 @@
|
||||
# Vibration Excitation v = 0->1 by Yoon:2008aa
|
||||
# E sig_tot
|
||||
5.160E-01 0.000E+00
|
||||
5.500E-01 1.000E-22
|
||||
6.000E-01 1.700E-22
|
||||
6.600E-01 2.700E-22
|
||||
7.400E-01 3.800E-22
|
||||
8.000E-01 4.700E-22
|
||||
8.500E-01 5.900E-22
|
||||
1.000E+00 9.400E-22
|
||||
1.250E+00 1.720E-21
|
||||
1.480E+00 2.400E-21
|
||||
2.000E+00 3.670E-21
|
||||
2.460E+00 4.420E-21
|
||||
3.000E+00 4.860E-21
|
||||
3.800E+00 4.610E-21
|
||||
4.600E+00 3.800E-21
|
||||
5.000E+00 3.430E-21
|
||||
5.300E+00 3.240E-21
|
||||
5.600E+00 3.020E-21
|
||||
6.100E+00 2.700E-21
|
||||
7.000E+00 2.100E-21
|
||||
1.500E+01 5.650E-22
|
||||
2.000E+01 3.320E-22
|
||||
2.500E+01 2.420E-22
|
||||
3.000E+01 1.700E-22
|
||||
4.000E+01 1.120E-22
|
||||
5.000E+01 9.680E-23
|
||||
6.000E+01 8.170E-23
|
||||
8.000E+01 6.090E-23
|
||||
1.000E+02 4.510E-23
|
||||
1.100E+02 0.000E+00
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// dcs_base.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 08.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef dcs_base_h
|
||||
#define dcs_base_h
|
||||
|
||||
|
||||
#include "random_operations.h"
|
||||
#include "dcs_theta_container.hpp"
|
||||
|
||||
#include "error_types.h"
|
||||
#include "constants.h"
|
||||
|
||||
class DCS_Base {
|
||||
protected:
|
||||
UniRNG *rngUni;
|
||||
|
||||
public:
|
||||
DCS_Base(UniRNG *rngUni) {
|
||||
this->rngUni = rngUni;
|
||||
}
|
||||
virtual double get_theta(const double &T_eV) = 0;
|
||||
};
|
||||
|
||||
class FourPi_DCS : public DCS_Base {
|
||||
public:
|
||||
FourPi_DCS(UniRNG *rngUni) : DCS_Base(rngUni) {}
|
||||
|
||||
double get_theta(const double &T_eV) {
|
||||
return rngUni->random()*2*pi;
|
||||
}
|
||||
};
|
||||
|
||||
class ZeroPi_DCS : public DCS_Base {
|
||||
public:
|
||||
ZeroPi_DCS(UniRNG *rngUni) : DCS_Base(rngUni) {}
|
||||
|
||||
double get_theta(const double &T_eV) {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
class Elastic_DCS : public DCS_Base {
|
||||
DCS_Theta_Container dcs_data;
|
||||
public:
|
||||
Elastic_DCS(UniRNG *rngUni) : DCS_Base(rngUni), dcs_data(scale_start, scale_end, 1e3, 200, get_data_path() + "eT2_ela_DCS.dat") {}
|
||||
|
||||
double get_theta(const double &T_eV) {
|
||||
return dcs_data.roll_value(T_eV, rngUni);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif /* dcs_base_h */
|
||||
@@ -17,7 +17,7 @@ DCS_Ionization_Container::DCS_Ionization_Container(double T_min_eV, double T_max
|
||||
double Tmax_eV;
|
||||
for (int i = 0; i < number_T_bins; i++) {
|
||||
Tmax_eV = (T_scale.get_bin_mid(i) - EionT2_eV)/2;
|
||||
W_scale[i] = Log_Scale(zero, Tmax_eV, number_W_bins);
|
||||
W_scale[i] = Log_Scale(scale_start, Tmax_eV, number_W_bins);
|
||||
}
|
||||
init_data();
|
||||
calc_data(load_path);
|
||||
@@ -52,7 +52,7 @@ DCS_Ionization_Container& DCS_Ionization_Container::operator=(const DCS_Ionizati
|
||||
std::swap(T_scale, tmp.T_scale);
|
||||
std::swap(W_scale, tmp.W_scale);
|
||||
std::swap(data, tmp.data);
|
||||
return (*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
void DCS_Ionization_Container::init_data() {
|
||||
@@ -80,6 +80,12 @@ void DCS_Ionization_Container::calc_data(std::string load_path) {
|
||||
sum += calc_bin_surface(i, j, &E2D);
|
||||
temp[j] = sum;
|
||||
}
|
||||
if (sum == 0) {
|
||||
std::stringstream ss;
|
||||
ss<<"DCS_Ionization_Container::calc_data: sum=0, lower_bound bad.\n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
|
||||
for (int j = 0; j < num_W_bins; j++) {
|
||||
temp[j] /= sum;
|
||||
}
|
||||
@@ -92,7 +98,7 @@ double DCS_Ionization_Container::calc_bin_surface(int T_bin, int W_bin, Edge_Con
|
||||
double W_eV = W_scale[T_bin].get_bin_mid(W_bin);
|
||||
double width = T_scale.get_upper_bin_bound(T_bin) - T_scale.get_lower_bin_bound(T_bin);
|
||||
double height = E2D->interpolate(ddeque{T_eV, W_eV});
|
||||
return (width*height);
|
||||
return width*height;
|
||||
}
|
||||
|
||||
double DCS_Ionization_Container::roll_value(const double &T_eV, UniRNG *rngUni) {
|
||||
@@ -100,11 +106,11 @@ double DCS_Ionization_Container::roll_value(const double &T_eV, UniRNG *rngUni)
|
||||
double target = rngUni->random();
|
||||
for (int j=0; j<W_scale[T_bin].get_number_bins(); j++) {
|
||||
if (target < data[T_bin][j]) {
|
||||
return (roll_in_bin(T_bin, j, rngUni));
|
||||
return roll_in_bin(T_bin, j, rngUni);
|
||||
}
|
||||
}
|
||||
std::stringstream ss;
|
||||
ss<<"DCS_Ionization_Container::roll_value: Overflow./n";
|
||||
ss<<"DCS_Ionization_Container::roll_value: Overflow.\n";
|
||||
throw MyException (ss.str());
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ DCS_Theta_Container& DCS_Theta_Container::operator=(const DCS_Theta_Container& o
|
||||
std::swap(E_scale, tmp.E_scale);
|
||||
std::swap(theta_scale, tmp.theta_scale);
|
||||
std::swap(data, tmp.data);
|
||||
return (*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ double DCS_Theta_Container::calc_bin_surface(int E_bin, int theta_bin, Edge_Cont
|
||||
double theta = theta_scale.get_bin_mid(theta_bin);
|
||||
double width = E_scale.get_upper_bin_bound(E_bin) - E_scale.get_lower_bin_bound(E_bin);
|
||||
double height = E2D->interpolate(ddeque{E_eV, theta});
|
||||
return (width*height);
|
||||
return width*height;
|
||||
}
|
||||
|
||||
double DCS_Theta_Container::roll_value(const double &E_eV, UniRNG *rngUni) {
|
||||
@@ -93,7 +93,7 @@ double DCS_Theta_Container::roll_value(const double &E_eV, UniRNG *rngUni) {
|
||||
double target = rngUni->random();
|
||||
for (int j=0; j<theta_scale.get_number_bins(); j++) {
|
||||
if (target < data[E_bin][j]) {
|
||||
return (roll_in_bin(j, rngUni));
|
||||
return roll_in_bin(j, rngUni);
|
||||
}
|
||||
}
|
||||
std::stringstream ss;
|
||||
|
||||
@@ -17,38 +17,48 @@ class Drift_Base : public Mover_Base {
|
||||
public:
|
||||
Drift_Base(species this_species, Particle_Logger_Base *Logger, Population_Base *Population) : Mover_Base(this_species, Logger, Population) {};
|
||||
|
||||
void move(Particle *movePart, const double &distance_m);
|
||||
void move(Particle *movePart, const double ¯oSigma_m);
|
||||
|
||||
protected:
|
||||
double get_zNew_m(Particle *movePart, const double &distance_m);
|
||||
double get_zNew_m(Particle *movePart, const double ¯oSigma_m);
|
||||
virtual void doWallInteraction(Particle *movePart, vec3 *oldLoc_m, double *znew_m) = 0;
|
||||
virtual void do_E_calculus(Particle *movePart, const vec3 &oldLoc_m, const double ¯oSigma_m) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
inline void Drift_Base::move(Particle *movePart, const double &distance_m) {
|
||||
vec3 oldLoc_m = movePart->get_Location_m();
|
||||
inline void Drift_Base::move(Particle *movePart, const double ¯oSigma_m) {
|
||||
vec3 oldLoc_m = movePart->get_x_m();
|
||||
vec3 newLoc_m = oldLoc_m;
|
||||
|
||||
double znew_m = get_zNew_m(movePart, distance_m);
|
||||
double znew_m = get_zNew_m(movePart, macroSigma_m);
|
||||
doWallInteraction(movePart, &oldLoc_m, &znew_m);
|
||||
newLoc_m[2] = znew_m;
|
||||
|
||||
movePart->set_Location_m(newLoc_m);
|
||||
Logger->log(*movePart,oldLoc_m);
|
||||
movePart->set_x_m(newLoc_m);
|
||||
do_E_calculus(movePart, oldLoc_m, macroSigma_m);
|
||||
Logger->log(*movePart, oldLoc_m);
|
||||
Population->increase_density(*movePart, oldLoc_m);
|
||||
}
|
||||
|
||||
inline double Drift_Base::get_zNew_m(Particle *movePart, const double &distance_m) {
|
||||
double zold_m = movePart->get_Location_m()[2];
|
||||
inline double Drift_Base::get_zNew_m(Particle *movePart, const double ¯oSigma_m) {
|
||||
double zold_m = movePart->get_x_m()[2];
|
||||
|
||||
vec3 v_ms = movePart->get_Speed_ms();
|
||||
double vTotAbs_ms = vec3Abs(v_ms);
|
||||
double vForwardAbs_ms = vec3Abs(vec3(0,0,v_ms[2]));
|
||||
double zDir = v_ms[2] < 0 ? -1 : 1;
|
||||
|
||||
double znew_m = zold_m + zDir*vForwardAbs_ms/vTotAbs_ms * distance_m;
|
||||
return (znew_m);
|
||||
vec3 v_ms = movePart->get_v_ms();
|
||||
double vTotAbs_ms = calc_vec3_abs(v_ms);
|
||||
double vForwardAbs_ms = calc_vec3_abs(vec3(0,0,v_ms[2]));
|
||||
double zDir = v_ms[2] <= 0 ? -1 : 1;
|
||||
double znew_m;
|
||||
if (macroSigma_m == 0) {
|
||||
if (zDir == -1) {
|
||||
znew_m = z_RW_m - 2*l_WGTS_m;
|
||||
} else {
|
||||
znew_m = z_WGTS_end_m + 2*l_WGTS_m;
|
||||
}
|
||||
} else {
|
||||
double distance_m = 1/macroSigma_m;
|
||||
znew_m = zold_m + zDir*vForwardAbs_ms/vTotAbs_ms * distance_m;
|
||||
}
|
||||
return znew_m;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// eT2I_disexc.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 30.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef eT2I_disexc_h
|
||||
#define eT2I_disexc_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "janev_eT2I_disexc.h"
|
||||
|
||||
class eT2I_DissExc : public Excitation_Base {
|
||||
public:
|
||||
eT2I_DissExc(Population_Base *T2IPopulation, UniRNG *rngUni, DCS_Base *dcs_gen) : Excitation_Base(T2IPopulation, rngUni, Janev_eT2I_DissExc::get_deltaE_eV(), dcs_gen) {}
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {return Janev_eT2I_DissExc::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline InteractionOut eT2I_DissExc::do_Interaction (Particle *interPart) {
|
||||
InteractionOut res = Excitation_Base::do_Interaction(interPart);
|
||||
|
||||
vec3 loc_m = interPart->get_x_m();
|
||||
//Population->decrease_denisty(interPart->get_x_m(), 0); // dummy since thermal population
|
||||
|
||||
vec3 vTI_ms = Population->roll_v_ms(loc_m);
|
||||
Particle TI = Particle_Builder::create_TI(loc_m, vTI_ms, -1, interPart->get_Id());
|
||||
res.add_new_particle(TI);
|
||||
|
||||
//maybe add T Atom
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif /* eT2I_disexc_h */
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// eT2I_recombination.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 18.06.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef eT2I_recombination_h
|
||||
#define eT2I_recombination_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "janev_eT2I_recombination.h"
|
||||
|
||||
class eT2I_Recombination : public Sub_Interaction_Base {
|
||||
public:
|
||||
eT2I_Recombination(Population_Base *T2IPopulation, UniRNG *rngUni) : Sub_Interaction_Base(T2IPopulation, rngUni) {}
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {return Janev_eT2I_Recombination::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline InteractionOut eT2I_Recombination::do_Interaction (Particle *interPart) {
|
||||
InteractionOut res;
|
||||
res.set_delete_current(true);
|
||||
//Population->decrease_denisty(interPart->get_x_m(), 0);
|
||||
|
||||
// Maybe add the 2 T atoms.
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#endif /* eT2I_recombination_h */
|
||||
@@ -14,82 +14,35 @@
|
||||
#include "tcs_container.hpp"
|
||||
#include "dcs_theta_container.hpp"
|
||||
#include "kinematics_base.h"
|
||||
#include "dcs_base.h"
|
||||
|
||||
|
||||
class eT2_Elastic : public Sub_Interaction_Base {
|
||||
TCS_Container tcs_data;
|
||||
DCS_Theta_Container dcs_data;
|
||||
DCS_Base *dcs_gen;
|
||||
Elastic_Kinematic_Base kinematics;
|
||||
|
||||
public:
|
||||
eT2_Elastic(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni),
|
||||
tcs_data(zero, 2e4, 1e3, getDataPath() + "eT2_ela_TCS.dat"),
|
||||
dcs_data(zero, 2e4, 1e3, 200, getDataPath() + "eT2_ela_DCS.dat"),
|
||||
kinematics(me_eV, mT2_eV) {}
|
||||
eT2_Elastic(Population_Base *T2Population, UniRNG *rngUni, DCS_Base *dcs_gen) : Sub_Interaction_Base(T2Population, rngUni),
|
||||
tcs_data(scale_start, scale_end, 1e3, get_data_path() + "eT2_ela_TCS.dat"),
|
||||
kinematics(me_eV, 2*mT_eV) {
|
||||
this->dcs_gen = dcs_gen;
|
||||
}
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {return tcs_data.get_value(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline double eT2_Elastic::get_macroSigma_m2(const Particle &interPart) {
|
||||
double Ekin_eV = interPart.get_EKin_eV();
|
||||
double microSigma_m2 = tcs_data.get_value(Ekin_eV);
|
||||
//std::cout<<"DEBUG:\t"<<microSigma_m2<<"\n";
|
||||
vec3 loc_m = interPart.get_Location_m();
|
||||
double nT2_m3 = Population->get_density_m3(loc_m);
|
||||
return (microSigma_m2*nT2_m3);
|
||||
}
|
||||
|
||||
inline InteractionOut eT2_Elastic::do_Interaction (Particle *interPart) {
|
||||
// Here theta and phi are COM-Angles.... prob not correct. For m1 << m2 COM - Angle ~ Lab Angle
|
||||
vec3 v_ms = interPart->get_Speed_ms();
|
||||
vec3 vT2_ms = Population->roll_speed_ms(interPart->get_Location_m());
|
||||
vec3 vLab_ms = v_ms - vT2_ms;
|
||||
double T_eV = calc_Ekin_eV_from_speed(vLab_ms, me_eV);
|
||||
double theta_lab = dcs_data.roll_value(T_eV,rngUni);
|
||||
vec3 v1_ms = interPart->get_v_ms();
|
||||
vec3 v2_ms = Population->roll_v_ms(interPart->get_x_m());
|
||||
vec3 vLab_ms = v1_ms - v2_ms; // P2 fixed
|
||||
double T_eV = calc_E_eV_from_v_ms(vLab_ms, me_eV);
|
||||
double theta_lab = dcs_gen->get_theta(T_eV);
|
||||
double phi_lab = rngUni->random() * 2 * pi;
|
||||
kinematics.doKinematics(interPart, vT2_ms, theta_lab, phi_lab);
|
||||
return (InteractionOut());
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Elastic Scattering:
|
||||
Using Rutherford Model with screening parameter following
|
||||
Cross-sections for water vapour for the Monte Carlo electron track structure code from 10eV to the MeV region
|
||||
S Uehara et al 1993 Phys. Med. Biol. 38 1841
|
||||
*/
|
||||
class eT2_Elastic_Analytic : public Sub_Interaction_Base {
|
||||
Elastic_Kinematic_Base kinematics;
|
||||
public:
|
||||
eT2_Elastic_Analytic(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni) {
|
||||
kinematics = Elastic_Kinematic_Base(me_eV, mT2_eV);
|
||||
};
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline double eT2_Elastic_Analytic::get_macroSigma_m2(const Particle &interPart) {
|
||||
double Ekin_eV = interPart.get_EKin_eV();
|
||||
double microSigma_m2 = Uehara_eT2_ElasticScattering::calc_TCS(Ekin_eV);
|
||||
vec3 loc_m = interPart.get_Location_m();
|
||||
double nT2_m3 = Population->get_density_m3(loc_m);
|
||||
return (microSigma_m2*nT2_m3);
|
||||
}
|
||||
|
||||
inline InteractionOut eT2_Elastic_Analytic::do_Interaction (Particle *interPart) {
|
||||
// Here theta and phi are COM-Angles.... prob not correct. For m1 << m2 COM - Angle ~ Lab Angle
|
||||
vec3 v_ms = interPart->get_Speed_ms();
|
||||
vec3 vT2_ms = Population->roll_speed_ms(interPart->get_Location_m());
|
||||
vec3 vLab_ms = v_ms - vT2_ms;
|
||||
double T_eV = calc_Ekin_eV_from_speed(vLab_ms, me_eV);
|
||||
double theta_lab = Uehara_eT2_ElasticScattering::roll_theta(T_eV, rngUni);
|
||||
double phi_lab = rngUni->random() * 2 * pi;
|
||||
kinematics.doKinematics(interPart, vT2_ms, theta_lab, phi_lab);
|
||||
return (InteractionOut());
|
||||
interPart->set_v_ms(kinematics.get_v1_new(v1_ms, v2_ms, theta_lab, phi_lab));
|
||||
return InteractionOut();
|
||||
}
|
||||
|
||||
#endif /* eT2_elastic_h */
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// eT2_elexc_analytic.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 01.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef eT2_elexc_analytic_h
|
||||
#define eT2_elexc_analytic_h
|
||||
|
||||
#include "janev_eT2_elexc.h"
|
||||
|
||||
class eT2_ElExc_Nu_Analytic : public Excitation_Base {
|
||||
Janev_eT2_ElExc_Nu janev_Nu;
|
||||
public:
|
||||
eT2_ElExc_Nu_Analytic(Population_Base *T2Population, UniRNG *rngUni, Janev_eT2_ElExc_Nu janev_Nu_in, DCS_Base *dcs_gen) : Excitation_Base(T2Population, rngUni, janev_Nu_in.get_deltaE_eV(), dcs_gen), janev_Nu(janev_Nu_in) {};
|
||||
|
||||
private:
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
return janev_Nu.get_TCS_m2(E_eV);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class eT2_ElExc_Ng_Analytic : public Excitation_Base {
|
||||
Janev_eT2_ElExc_Ng janev_Ng;
|
||||
public:
|
||||
eT2_ElExc_Ng_Analytic(Population_Base *T2Population, UniRNG *rngUni, Janev_eT2_ElExc_Ng janev_Ng_in, DCS_Base *dcs_gen) : Excitation_Base(T2Population, rngUni, janev_Ng_in.get_deltaE_eV(), dcs_gen), janev_Ng(janev_Ng_in) {};
|
||||
|
||||
private:
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
return janev_Ng.get_TCS_m2(E_eV);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class eT2_ElExc_n_Analytic : public Excitation_Base {
|
||||
Janev_eT2_ElExc_n janev_n;
|
||||
public:
|
||||
eT2_ElExc_n_Analytic(Population_Base *T2Population, UniRNG *rngUni, Janev_eT2_ElExc_n janev_n_in, DCS_Base *dcs_gen) : Excitation_Base(T2Population, rngUni, janev_n_in.get_deltaE_eV(), dcs_gen), janev_n(janev_n_in) {};
|
||||
|
||||
private:
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
return janev_n.get_TCS_m2(E_eV);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif /* eT2_elexc_analytic_h */
|
||||
@@ -14,89 +14,78 @@
|
||||
#include "dcs_ionization_container.hpp"
|
||||
|
||||
#include "BED_eT2_ionization.hpp"
|
||||
#include "janev_eT2_ionization.h"
|
||||
/*
|
||||
Ionization:
|
||||
Using BED-Model Kim and Rudd 1994
|
||||
*/
|
||||
class eT2_T2I_Ionization_Base : public Sub_Interaction_Base {
|
||||
class eT2_Ionization_Base : public Sub_Interaction_Base {
|
||||
double deltaE_eV;
|
||||
public:
|
||||
eT2_T2I_Ionization_Base(Population_Base *T2Population, UniRNG *rngUni) : Sub_Interaction_Base(T2Population, rngUni){};
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
protected:
|
||||
virtual double calc_microSigma(const double &T_eV) = 0;
|
||||
eT2_Ionization_Base(Population_Base *T2Population, UniRNG *rngUni, double deltaE_eV) : Sub_Interaction_Base(T2Population, rngUni){
|
||||
this->deltaE_eV = deltaE_eV;
|
||||
};
|
||||
|
||||
private:
|
||||
virtual double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) = 0;
|
||||
public:
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
protected:
|
||||
vec3 roll_vLab_ms(const Particle &interPart);
|
||||
|
||||
virtual double roll_ionW_eV(const double &T_eV) = 0;
|
||||
double roll_theta1(double T_eV, double W_eV);
|
||||
double roll_theta2(double T_eV, double W_eV);
|
||||
|
||||
virtual double roll_ionW_eV(const double &T_eV) = 0;
|
||||
virtual void add_Tritiums(InteractionOut *InterOut, const Particle &interPart) = 0;
|
||||
};
|
||||
|
||||
inline double eT2_T2I_Ionization_Base::get_macroSigma_m2(const Particle &interPart) {
|
||||
double T_eV = interPart.get_EKin_eV();
|
||||
vec3 loc_m = interPart.get_Location_m();
|
||||
inline InteractionOut eT2_Ionization_Base::do_Interaction (Particle *interPart) {
|
||||
vec3 v1_ms = interPart->get_v_ms();
|
||||
vec3 vOff_ms = get_vOff_ms(*interPart, deltaE_eV);
|
||||
vec3 vLab_ms = v1_ms - vOff_ms;
|
||||
double T_eV = calc_E_eV_from_v_ms(vLab_ms, me_eV);
|
||||
|
||||
double microSigma_m2 = calc_microSigma(T_eV);
|
||||
double nT2_m3 = Population->get_density_m3(loc_m);
|
||||
return (microSigma_m2*nT2_m3);
|
||||
}
|
||||
|
||||
inline InteractionOut eT2_T2I_Ionization_Base::do_Interaction (Particle *interPart) {
|
||||
vec3 vLab_ms = roll_vLab_ms(*interPart);
|
||||
vec3 vOff_ms = vLab_ms - interPart->get_Speed_ms();
|
||||
|
||||
double T_eV = calc_Ekin_eV_from_speed(vLab_ms, me_eV);
|
||||
if (T_eV < EionT2_eV) {
|
||||
throw MyException("Electron::do_Ionization: Ekin_eV < EIonT2_eV.");
|
||||
}
|
||||
double W_eV = roll_ionW_eV(T_eV);
|
||||
double E1_eV = T_eV-EionT2_eV - W_eV;
|
||||
E1_eV = (E1_eV < 0) ? 0 : E1_eV;
|
||||
|
||||
double phi1 = rngUni->random()*2*pi;
|
||||
double phi2 = phi1-pi;
|
||||
double theta1 = roll_theta1(T_eV, W_eV);
|
||||
double theta2 = roll_theta2(T_eV, W_eV);
|
||||
|
||||
double v1_lab_new_ms = calc_Speed_from_Ekin_eV(E1_eV, me_eV);
|
||||
double v2_lab_new_ms = calc_Speed_from_Ekin_eV(W_eV, me_eV);
|
||||
double v1_lab_new_ms = calc_v_ms_from_E_eV(E1_eV, me_eV);
|
||||
double v2_lab_new_ms = calc_v_ms_from_E_eV(W_eV, me_eV);
|
||||
|
||||
vec3 new_dir_1 = calc_newDirection(vLab_ms, theta1, phi1);
|
||||
vec3 new_dir_2 = calc_newDirection(vLab_ms, theta2, phi2);
|
||||
vec3 new_dir_1 = calc_n_new(vLab_ms, theta1, phi1);
|
||||
vec3 new_dir_2 = calc_n_new(vLab_ms, theta2, phi2);
|
||||
vec3 v1_new_ms = v1_lab_new_ms*new_dir_1 + vOff_ms;
|
||||
vec3 v2_new_ms = v2_lab_new_ms*new_dir_2 + vOff_ms;
|
||||
|
||||
interPart->set_Speed_ms(v1_new_ms);
|
||||
interPart->set_v_ms(v1_new_ms);
|
||||
|
||||
InteractionOut InterOut;
|
||||
vec3 loc_m = interPart->get_Location_m();
|
||||
Particle eNew = Particle_Builder::createElectron(loc_m, v2_new_ms, -1, interPart->get_Id());
|
||||
vec3 loc_m = interPart->get_x_m();
|
||||
Particle eNew = Particle_Builder::create_e(loc_m, v2_new_ms, -1, interPart->get_Id());
|
||||
|
||||
InterOut.add_new_particle(eNew);
|
||||
|
||||
vec3 vT_ms = Population->get_average_speed_ms(loc_m);
|
||||
Particle TNew = Particle_Builder::createTritium2I(loc_m, vT_ms, -1, interPart->get_Id());
|
||||
InterOut.add_new_particle(TNew);
|
||||
|
||||
return(InterOut);
|
||||
add_Tritiums(&InterOut, *interPart);
|
||||
return InterOut;
|
||||
}
|
||||
|
||||
inline vec3 eT2_T2I_Ionization_Base::roll_vLab_ms(const Particle &interPart) {
|
||||
vec3 v_ms = interPart.get_Speed_ms();
|
||||
vec3 vT2_ms = Population->roll_speed_ms(interPart.get_Location_m());
|
||||
inline vec3 eT2_Ionization_Base::roll_vLab_ms(const Particle &interPart) {
|
||||
vec3 v_ms = interPart.get_v_ms();
|
||||
vec3 vT2_ms = Population->roll_v_ms(interPart.get_x_m());
|
||||
vec3 vLab_ms = v_ms - vT2_ms;
|
||||
double T_eV = calc_Ekin_eV_from_speed(vLab_ms, me_eV);
|
||||
double T_eV = calc_E_eV_from_v_ms(vLab_ms, me_eV);
|
||||
if (T_eV < EionT2_eV) { // Set Tritium Speed to 0 if unlucky roll
|
||||
return(v_ms);
|
||||
return v_ms;
|
||||
} else {
|
||||
return(vLab_ms);
|
||||
return vLab_ms;
|
||||
}
|
||||
}
|
||||
|
||||
inline double eT2_T2I_Ionization_Base::roll_theta1(double T_eV, double W_eV) {
|
||||
inline double eT2_Ionization_Base::roll_theta1(double T_eV, double W_eV) {
|
||||
double theta1;
|
||||
if (W_eV > 100) {
|
||||
double numerator = W_eV/T_eV;
|
||||
@@ -105,10 +94,10 @@ inline double eT2_T2I_Ionization_Base::roll_theta1(double T_eV, double W_eV) {
|
||||
} else {
|
||||
theta1 = rngUni->random()*pi/4;
|
||||
}
|
||||
return (theta1);
|
||||
return theta1;
|
||||
}
|
||||
|
||||
inline double eT2_T2I_Ionization_Base::roll_theta2(double T_eV, double W_eV) {
|
||||
inline double eT2_Ionization_Base::roll_theta2(double T_eV, double W_eV) {
|
||||
double theta2;
|
||||
if (W_eV > 200) {
|
||||
double numerator = 1- W_eV/T_eV;
|
||||
@@ -124,19 +113,34 @@ inline double eT2_T2I_Ionization_Base::roll_theta2(double T_eV, double W_eV) {
|
||||
} else {
|
||||
theta2 = rngUni->random() * pi;
|
||||
}
|
||||
return(theta2);
|
||||
return theta2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class eT2_T2I_Ionization_Analytic : public eT2_T2I_Ionization_Base {
|
||||
class eT2_Ionization_BED_Base : public eT2_Ionization_Base {
|
||||
public:
|
||||
eT2_T2I_Ionization_Analytic(Population_Base *T2Population, UniRNG *rngUni) : eT2_T2I_Ionization_Base(T2Population, rngUni) {};
|
||||
eT2_Ionization_BED_Base(Population_Base *T2Population, UniRNG *rngUni) : eT2_Ionization_Base(T2Population, rngUni, EionT2_eV){};
|
||||
|
||||
protected:
|
||||
double calc_microSigma(const double &T_eV) {
|
||||
return(BED_eT2_Ionization::calc_TCS(T_eV));
|
||||
//virtual double get_microSigma_m2(const double &T_eV) = 0;
|
||||
|
||||
protected:
|
||||
void add_Tritiums(InteractionOut *InterOut, const Particle &interPart) {
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
vec3 vT_ms = Population->roll_v_ms(loc_m);
|
||||
Particle T2I_new = Particle_Builder::create_T2I(loc_m, vT_ms, -1, interPart.get_Id());
|
||||
InterOut->add_new_particle(T2I_new);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class eT2_Ionization_BED_Analytic : public eT2_Ionization_BED_Base {
|
||||
public:
|
||||
eT2_Ionization_BED_Analytic(Population_Base *T2Population, UniRNG *rngUni) : eT2_Ionization_BED_Base(T2Population, rngUni) {};
|
||||
|
||||
protected:
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
return BED_eT2_Ionization::calc_TCS(E_eV);
|
||||
}
|
||||
double roll_ionW_eV(const double &T_eV) {
|
||||
double pmax, Wmin_eV, Wmax_eV, Wcan_eV,eta1,eta2;
|
||||
@@ -149,25 +153,25 @@ protected:
|
||||
Wcan_eV = Wmin_eV + eta1*(Wmax_eV - Wmin_eV);
|
||||
} while(eta2*pmax > BED_eT2_Ionization::calc_SDCS(T_eV, Wcan_eV));
|
||||
double W_eV = (Wcan_eV< (T_eV-EionT2_eV)/2 ) ? Wcan_eV : (T_eV-EionT2_eV) - Wcan_eV;
|
||||
return(W_eV);
|
||||
return W_eV;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class eT2_T2I_Ionization_Container : public eT2_T2I_Ionization_Base {
|
||||
class eT2_Ionization_BED_Container : public eT2_Ionization_BED_Base {
|
||||
TCS_Container tcs_data;
|
||||
DCS_Ionization_Container dcs_data;
|
||||
|
||||
public:
|
||||
eT2_T2I_Ionization_Container(Population_Base *T2Population, UniRNG *rngUni) :
|
||||
eT2_T2I_Ionization_Base(T2Population, rngUni),
|
||||
tcs_data(zero, 2e4, 100, (getDataPath() + "eT2_ion_TCS.dat")),
|
||||
dcs_data(zero, 2e4, 100, 50, (getDataPath() + "eT2_ion_DCS.dat"))
|
||||
eT2_Ionization_BED_Container(Population_Base *T2Population, UniRNG *rngUni) :
|
||||
eT2_Ionization_BED_Base(T2Population, rngUni),
|
||||
tcs_data(scale_start, scale_end, 100, (get_data_path() + "eT2_ion_TCS.dat")),
|
||||
dcs_data(EionT2_eV, scale_end, 100, 50, (get_data_path() + "eT2_ion_DCS.dat"))
|
||||
{};
|
||||
|
||||
protected:
|
||||
double calc_microSigma(const double &T_eV) {
|
||||
return tcs_data.get_value(T_eV);
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
return tcs_data.get_value(E_eV);
|
||||
}
|
||||
double roll_ionW_eV(const double &T_eV) {
|
||||
return dcs_data.roll_value(T_eV, rngUni);
|
||||
@@ -175,4 +179,85 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
// Not very fancy from here. Either one function for all 3 or base class with dcs_data, genereally only load the data once.
|
||||
class eT2_Ionization_Janev_ndiss : public eT2_Ionization_Base {
|
||||
DCS_Ionization_Container dcs_data;
|
||||
|
||||
public:
|
||||
eT2_Ionization_Janev_ndiss(Population_Base *T2Population, UniRNG *rngUni) : eT2_Ionization_Base(T2Population, rngUni, Janev_eT2_Ionization_ndiss::get_deltaE_eV()), dcs_data(Janev_eT2_Ionization_ndiss::get_deltaE_eV(), scale_end, 100, 50, (get_data_path() + "eT2_ion_DCS.dat")) {};
|
||||
|
||||
protected:
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
return Janev_eT2_Ionization_ndiss::get_TCS_m2(E_eV);
|
||||
}
|
||||
|
||||
double roll_ionW_eV(const double &T_eV) {
|
||||
return dcs_data.roll_value(T_eV, rngUni);
|
||||
}
|
||||
|
||||
void add_Tritiums(InteractionOut *InterOut, const Particle &interPart) {
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
vec3 vT2_ms = Population->roll_v_ms(loc_m);
|
||||
Particle T2I_new = Particle_Builder::create_T2I(loc_m, vT2_ms, -1, interPart.get_Id());
|
||||
InterOut->add_new_particle(T2I_new);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class eT2_Ionization_Janev_diss_g : public eT2_Ionization_Base {
|
||||
DCS_Ionization_Container dcs_data;
|
||||
|
||||
public:
|
||||
eT2_Ionization_Janev_diss_g(Population_Base *T2Population, UniRNG *rngUni) : eT2_Ionization_Base(T2Population, rngUni, Janev_eT2_Ionization_diss_g::get_deltaE_eV()), dcs_data(Janev_eT2_Ionization_diss_g::get_deltaE_eV(), scale_end, 100, 50, (get_data_path() + "eT2_ion_DCS.dat")) {};
|
||||
|
||||
protected:
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
return Janev_eT2_Ionization_diss_g::get_TCS_m2(E_eV);
|
||||
}
|
||||
|
||||
double roll_ionW_eV(const double &T_eV) {
|
||||
return dcs_data.roll_value(T_eV, rngUni);
|
||||
}
|
||||
|
||||
void add_Tritiums(InteractionOut *InterOut, const Particle &interPart) {
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
|
||||
/*vec3 vT_ms = Population->roll_v_ms(loc_m);
|
||||
Particle newPart = Particle_Builder::create_T(loc_m, vT_ms, -1, interPart.get_Id());
|
||||
InterOut->add_new_particle(newPart);*/
|
||||
|
||||
vec3 vTI_ms = Population->roll_v_ms(loc_m);
|
||||
Particle newPart = Particle_Builder::create_TI(loc_m, vTI_ms, -1, interPart.get_Id());
|
||||
InterOut->add_new_particle(newPart);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class eT2_Ionization_Janev_diss_u : public eT2_Ionization_Base {
|
||||
DCS_Ionization_Container dcs_data;
|
||||
|
||||
public:
|
||||
eT2_Ionization_Janev_diss_u(Population_Base *T2Population, UniRNG *rngUni) : eT2_Ionization_Base(T2Population, rngUni, Janev_eT2_Ionization_diss_u::get_deltaE_eV()), dcs_data(Janev_eT2_Ionization_diss_u::get_deltaE_eV(), scale_end, 100, 50, (get_data_path() + "eT2_ion_DCS.dat")) {};
|
||||
|
||||
protected:
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
return Janev_eT2_Ionization_diss_u::get_TCS_m2(E_eV);
|
||||
}
|
||||
|
||||
double roll_ionW_eV(const double &T_eV) {
|
||||
return dcs_data.roll_value(T_eV, rngUni);
|
||||
}
|
||||
|
||||
void add_Tritiums(InteractionOut *InterOut, const Particle &interPart) {
|
||||
vec3 loc_m = interPart.get_x_m();
|
||||
|
||||
/*vec3 vT_ms = Population->roll_v_ms(loc_m);
|
||||
Particle newPart = Particle_Builder::create_T(loc_m, vT_ms, -1, interPart.get_Id());
|
||||
InterOut->add_new_particle(newPart);*/
|
||||
|
||||
vec3 vTI_ms = Population->roll_v_ms(loc_m);
|
||||
Particle newPart = Particle_Builder::create_TI(loc_m, vTI_ms, -1, interPart.get_Id());
|
||||
InterOut->add_new_particle(newPart);
|
||||
}
|
||||
};
|
||||
#endif /* eT2_ionization_h */
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// eT2_vibexc0102.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 18.06.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef eT2_vibexc0102_h
|
||||
#define eT2_vibexc0102_h
|
||||
|
||||
#include "exc_base.h"
|
||||
#include "janev_eT2_vibexc0102.h"
|
||||
|
||||
class eT2_VibExc01 : public Excitation_Base {
|
||||
Janev_eT2_VibExc calculator;
|
||||
public:
|
||||
eT2_VibExc01(Population_Base *T2Population, UniRNG *rngUni, DCS_Base *dcs_gen) : calculator(1),
|
||||
Excitation_Base(T2Population, rngUni, 0.516, dcs_gen) {};
|
||||
|
||||
private:
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
return calculator.get_TCS(E_eV);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class eT2_VibExc02 : public Excitation_Base {
|
||||
Janev_eT2_VibExc calculator;
|
||||
public:
|
||||
eT2_VibExc02(Population_Base *T2Population, UniRNG *rngUni, DCS_Base *dcs_gen) : calculator(2),
|
||||
Excitation_Base(T2Population, rngUni, 1.003, dcs_gen) {};
|
||||
|
||||
private:
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
return calculator.get_TCS(E_eV);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif /* eT2_vibexc0102_h */
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// eT3I_disexc.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 30.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef eT3I_disexc_h
|
||||
#define eT3I_disexc_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "janev_eT3I_disexc.h"
|
||||
|
||||
class eT3I_DissExc : public Excitation_Base {
|
||||
public:
|
||||
eT3I_DissExc(Population_Base *T3IPopulation, UniRNG *rngUni, DCS_Base *dcs_gen) : Excitation_Base(T3IPopulation, rngUni, Janev_eT3I_DissExc::get_deltaE_eV(), dcs_gen) {}
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {return Janev_eT3I_DissExc::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline InteractionOut eT3I_DissExc::do_Interaction (Particle *interPart) {
|
||||
InteractionOut res = Excitation_Base::do_Interaction(interPart);
|
||||
vec3 loc_m = interPart->get_x_m();
|
||||
//Population->decrease_denisty(interPart->get_x_m(), 0); // dummy since thermal population
|
||||
|
||||
vec3 vTI_ms = Population->roll_v_ms(loc_m);
|
||||
Particle TI = Particle_Builder::create_TI(loc_m, vTI_ms, -1, interPart->get_Id());
|
||||
res.add_new_particle(TI);
|
||||
|
||||
//maybe add T Atom
|
||||
return res;
|
||||
}
|
||||
#endif /* eT3I_disexc_h */
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// eT3I_recombination.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 12.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef eT3I_recombination_h
|
||||
#define eT3I_recombination_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "janev_eT3I_recombination.h"
|
||||
|
||||
class eT3I_Recombination : public Sub_Interaction_Base {
|
||||
public:
|
||||
eT3I_Recombination(Population_Base *T3IPopulation, UniRNG *rngUni) : Sub_Interaction_Base(T3IPopulation, rngUni) {}
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {return Janev_eT3I_Recombination::get_TCS(E_eV);}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline InteractionOut eT3I_Recombination::do_Interaction (Particle *interPart) {
|
||||
InteractionOut res;
|
||||
res.set_delete_current(true);
|
||||
//Population->decrease_denisty(interPart->get_x_m(), 0);
|
||||
|
||||
// Maybe add the 3 T atoms.
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#endif /* eT3I_recombination_h */
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// eT5I_recombination.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 16.09.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef eT5I_recombination_h
|
||||
#define eT5I_recombination_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "petterson_eT5I_recombination.h"
|
||||
|
||||
class eT5I_Recombination : public Sub_Interaction_Base {
|
||||
public:
|
||||
eT5I_Recombination(Population_Base *T5IPopulation, UniRNG *rngUni) : Sub_Interaction_Base(T5IPopulation, rngUni) {}
|
||||
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
return Pettersson_eT5I_Recombination::get_TCS(E_eV);
|
||||
}
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline InteractionOut eT5I_Recombination::do_Interaction (Particle *interPart) {
|
||||
InteractionOut res;
|
||||
res.set_delete_current(true);
|
||||
//Population->decrease_denisty(interPart->get_x_m(), 0);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#endif /* eT5I_recombination_h */
|
||||
@@ -1,42 +0,0 @@
|
||||
//
|
||||
// e_T2I_recombination.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 24.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef e_T2I_recombination_h
|
||||
#define e_T2I_recombination_h
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
#include "tcs_container.hpp"
|
||||
#include "janev_eT2I_recombination.h"
|
||||
|
||||
class eT2I_Recombination : public Sub_Interaction_Base {
|
||||
|
||||
|
||||
public:
|
||||
eT2I_Recombination(Population_Base *T2IPopulation, UniRNG *rngUni) : Sub_Interaction_Base(T2IPopulation, rngUni) {}
|
||||
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
};
|
||||
|
||||
|
||||
inline double eT2I_Recombination::get_macroSigma_m2(const Particle &interPart) {
|
||||
double Ekin_eV = interPart.get_EKin_eV();
|
||||
double microSigma_m2 = Janev_eT2_Recombination::get_TCS(Ekin_eV);
|
||||
vec3 loc_m = interPart.get_Location_m();
|
||||
double nT2I_m3 = Population->get_density_m3(loc_m);
|
||||
return (microSigma_m2*nT2I_m3);
|
||||
}
|
||||
|
||||
inline InteractionOut eT2I_Recombination::do_Interaction (Particle *interPart) {
|
||||
InteractionOut res;
|
||||
res.set_delete_current(true);
|
||||
res.set_decrease_location(tritium2I, interPart->get_Location_m());
|
||||
// Maybe add the 2 T atoms.
|
||||
return(res);
|
||||
}
|
||||
#endif /* e_T2I_recombination_h */
|
||||
@@ -38,7 +38,7 @@ double Edge_Container<T_Map>::interpolate(std::deque<double> point) {
|
||||
ss<<"EdgeBase_Container::interpolate: deque point dimension missmatch.\n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
return (rec_interpolate(Base_Container<T_Map>::Map, point) );
|
||||
return rec_interpolate(Base_Container<T_Map>::Map, point);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ double Edge_Container<T_Map>::rec_interpolate(const double &subMap, std::deque<d
|
||||
ss<<"sub_interpolate: deque subPoint dimension missmatch.\n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
return (subMap);
|
||||
return subMap;
|
||||
}
|
||||
|
||||
template <class T_Map>
|
||||
@@ -58,23 +58,23 @@ double Edge_Container<T_Map>::rec_interpolate(const T &subMap, std::deque<double
|
||||
double x = *subPoint.begin();
|
||||
subPoint.pop_front();
|
||||
|
||||
typename T::const_iterator upItr = subMap.lower_bound(x);
|
||||
typename T::const_iterator upitr = subMap.lower_bound(x);
|
||||
|
||||
if (upItr == subMap.cbegin()) {
|
||||
return (rec_interpolate(upItr->second, subPoint));
|
||||
if (upitr == subMap.cbegin()) {
|
||||
return rec_interpolate(upitr->second, subPoint);
|
||||
} else {
|
||||
typename T::const_iterator lowItr = upItr;
|
||||
--lowItr;
|
||||
if (upItr == subMap.cend()) {
|
||||
return (rec_interpolate(lowItr->second, subPoint));
|
||||
typename T::const_iterator lowitr = upitr;
|
||||
--lowitr;
|
||||
if (upitr == subMap.cend()) {
|
||||
return rec_interpolate(lowitr->second, subPoint);
|
||||
} else {
|
||||
double low_x = lowItr->first;
|
||||
double low_f = rec_interpolate(lowItr->second, subPoint);
|
||||
double up_x = upItr->first;
|
||||
double up_f = rec_interpolate(upItr->second, subPoint);
|
||||
double low_x = lowitr->first;
|
||||
double low_f = rec_interpolate(lowitr->second, subPoint);
|
||||
double up_x = upitr->first;
|
||||
double up_f = rec_interpolate(upitr->second, subPoint);
|
||||
|
||||
double res = low_f + (x-low_x)/(up_x-low_x) * (up_f-low_f);
|
||||
return (res);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// electron_E_drift.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 05.10.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef electron_E_drift_h
|
||||
#define electron_E_drift_h
|
||||
|
||||
#include "electron_drift.h"
|
||||
#include "katrin_fields.hpp"
|
||||
|
||||
|
||||
class E_Mover_E_Drift : public E_Mover_Drift {
|
||||
public:
|
||||
E_Mover_E_Drift(Particle_Logger_Base *Logger, Population_Base *Population) : E_Mover_Drift(Logger, Population) {};
|
||||
protected:
|
||||
void do_E_calculus(Particle *movePart, const vec3 &oldLoc_m, const double ¯oSigma_m);
|
||||
};
|
||||
|
||||
inline void E_Mover_E_Drift::do_E_calculus(Particle *movePart, const vec3 &oldLoc_m, const double ¯oSigma_m) {
|
||||
if (macroSigma_m <= 0) {
|
||||
return;
|
||||
}
|
||||
double t_s = 1/macroSigma_m/calc_vec3_abs(movePart->get_v_ms());
|
||||
vec3 newLoc_m = movePart->get_x_m();
|
||||
vec3 E_Vm = 0.5 * (Katrin_Fields::getElField_Vm(oldLoc_m) + Katrin_Fields::getElField_Vm(newLoc_m));
|
||||
double B_T = calc_vec3_abs( 0.5 * (Katrin_Fields::getMagField_T(oldLoc_m) + Katrin_Fields::getMagField_T(newLoc_m)) );
|
||||
|
||||
double E_rad_Vm = calc_r_m(E_Vm);
|
||||
double v_rad_ms = E_rad_Vm/B_T;
|
||||
vec3 loc_offset_m = E_Vm;
|
||||
loc_offset_m[2] = 0;
|
||||
loc_offset_m = loc_offset_m/calc_vec3_abs(loc_offset_m) * v_rad_ms * t_s;
|
||||
movePart->set_x_m(newLoc_m + loc_offset_m);
|
||||
|
||||
vec3 v_boost_ms = vec3(0,0, movePart->get_Z()*e_C/movePart->get_m_eV()*E_Vm[2] * t_s/c_ms/c_ms);
|
||||
movePart->set_v_ms(movePart->get_v_ms() + v_boost_ms);
|
||||
}
|
||||
|
||||
#endif /* electron_E_drift_h */
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
this->dt_s = dt_s;
|
||||
};
|
||||
|
||||
void move(Particle *movePart, const double &distance_m);
|
||||
void move(Particle *movePart, const double ¯oSigma_m);
|
||||
|
||||
private:
|
||||
double doBoris_singleStep_m(Particle *movePart, const vec3 &E_Vm , const vec3 &B_T);
|
||||
@@ -28,15 +28,23 @@ private:
|
||||
void doBoris_LogzDirChange(Particle *movePart, double *oldzDir, vec3 *oldLoc_m);
|
||||
};
|
||||
|
||||
void E_Mover_Boris::move(Particle *movePart, const double &distance_m) {
|
||||
void E_Mover_Boris::move(Particle *movePart, const double ¯oSigma_m) {
|
||||
// Prepare detection for change of z direction for logging
|
||||
double oldzDir = movePart->get_Speed_ms()[2] < 0 ? -1 : 1;
|
||||
vec3 oldLoc_m = movePart->get_Location_m();
|
||||
double oldzDir = movePart->get_v_ms()[2] < 0 ? -1 : 1;
|
||||
vec3 oldLoc_m = movePart->get_x_m();
|
||||
|
||||
if (macroSigma_m == 0) { // If infinite movement distance let electron leave at only exit... Prob extremly faulty, but also impossible.
|
||||
movePart->set_x_m(z_RW_m);
|
||||
Logger->log(*movePart,oldLoc_m);
|
||||
return;
|
||||
}
|
||||
|
||||
double distance_m = 1/macroSigma_m;
|
||||
|
||||
double traveledDistance_m = 0;
|
||||
vec3 loc_m, E_Vm ,B_T;
|
||||
while (traveledDistance_m < distance_m) {
|
||||
loc_m = movePart->get_Location_m();
|
||||
loc_m = movePart->get_x_m();
|
||||
E_Vm = Katrin_Fields::getElField_Vm(loc_m);
|
||||
B_T = Katrin_Fields::getMagField_T(loc_m);
|
||||
|
||||
@@ -55,21 +63,21 @@ void E_Mover_Boris::move(Particle *movePart, const double &distance_m) {
|
||||
|
||||
double E_Mover_Boris::doBoris_singleStep_m(Particle *movePart, const vec3 &E_Vm , const vec3 &B_T) {
|
||||
double distance_m;
|
||||
vec3 x_m = movePart->get_Location_m();
|
||||
vec3 v_ms = movePart->get_Speed_ms();
|
||||
vec3 x_m = movePart->get_x_m();
|
||||
vec3 v_ms = movePart->get_v_ms();
|
||||
x_m += dt_s/2 * v_ms;
|
||||
distance_m = dt_s/2 * vec3Abs(v_ms);
|
||||
distance_m = dt_s/2 * calc_vec3_abs(v_ms);
|
||||
doBoris_speedChange(movePart, E_Vm , B_T);
|
||||
x_m += dt_s/2 * v_ms;
|
||||
distance_m += dt_s/2 * vec3Abs(v_ms);
|
||||
movePart->set_Location_m(x_m);
|
||||
return(distance_m);
|
||||
distance_m += dt_s/2 * calc_vec3_abs(v_ms);
|
||||
movePart->set_x_m(x_m);
|
||||
return distance_m;
|
||||
}
|
||||
|
||||
void E_Mover_Boris::doBoris_speedChange(Particle *movePart, const vec3 &E_Vm, const vec3 &B_T) {
|
||||
double q_C = movePart->get_Charge_nat() * e_C;
|
||||
double m_kg = movePart->get_Mass_eV() * e_C/c_ms/c_ms;
|
||||
vec3 v_ms = movePart->get_Speed_ms();
|
||||
double q_C = movePart->get_Z() * e_C;
|
||||
double m_kg = movePart->get_m_eV() * e_C/c_ms/c_ms;
|
||||
vec3 v_ms = movePart->get_v_ms();
|
||||
|
||||
vec3 t = q_C*dt_s/(2*m_kg) * B_T;
|
||||
vec3 s = (2*t)/(1+dot(t,t));
|
||||
@@ -77,39 +85,39 @@ void E_Mover_Boris::doBoris_speedChange(Particle *movePart, const vec3 &E_Vm, co
|
||||
vec3 vPrime_ms = vMinus_ms + cross(vMinus_ms,t);
|
||||
vec3 vPlus_ms = vMinus_ms + cross(vPrime_ms,s);
|
||||
v_ms = vPlus_ms + q_C/m_kg*E_Vm*0.5*dt_s;
|
||||
movePart->set_Speed_ms(v_ms);
|
||||
movePart->set_v_ms(v_ms);
|
||||
}
|
||||
|
||||
bool E_Mover_Boris::doBoris_WallInteraction(Particle *movePart) {
|
||||
vec3 loc_m = movePart->get_Location_m();
|
||||
double r_m = movePart->get_Radius_m();
|
||||
if (loc_m[2]<=Katrin_Geo::get_z_RW_m()) { // Rear Wall Termination
|
||||
vec3 newLoc_m = movePart->get_Location_m();
|
||||
vec3 loc_m = movePart->get_x_m();
|
||||
double r_m = movePart->get_r_m();
|
||||
if (loc_m[2]<=z_RW_m) { // Rear Wall Termination
|
||||
vec3 newLoc_m = movePart->get_x_m();
|
||||
newLoc_m[2] = 0;
|
||||
movePart->set_Location_m(newLoc_m);
|
||||
return (true);
|
||||
movePart->set_x_m(newLoc_m);
|
||||
return true;
|
||||
}
|
||||
if (r_m>=Katrin_Geo::get_radius_m()) { // WGTS Wall Termination
|
||||
vec3 newLoc_m = movePart->get_Location_m();
|
||||
if (r_m>=r_WGTS_m) { // WGTS Wall Termination
|
||||
vec3 newLoc_m = movePart->get_x_m();
|
||||
double z_m = newLoc_m[2];
|
||||
newLoc_m[2] = 0;
|
||||
newLoc_m = (Katrin_Geo::get_radius_m() * 1.01)/vec3Abs(newLoc_m) * newLoc_m; //1.01 to move Particle slightly out of WGTS
|
||||
newLoc_m = (r_WGTS_m * 1.01)/calc_vec3_abs(newLoc_m) * newLoc_m; //1.01 to move Particle slightly out of WGTS
|
||||
newLoc_m[2] = z_m;
|
||||
return (true);
|
||||
return true;
|
||||
}
|
||||
if (loc_m[2]>=Katrin_Geo::get_z_WGTSend_m()) { // Spectrometer Reflection
|
||||
movePart->set_Speed_ms( -1*(movePart->get_Speed_ms()) );
|
||||
if (loc_m[2]>=z_WGTS_end_m) { // Spectrometer Reflection
|
||||
movePart->set_v_ms( -1*(movePart->get_v_ms()) );
|
||||
}
|
||||
return (false);
|
||||
return false;
|
||||
}
|
||||
|
||||
void E_Mover_Boris::doBoris_LogzDirChange(Particle *movePart, double *oldzDir, vec3 *oldLoc_m) {
|
||||
double zDir = movePart->get_Speed_ms()[2] < 0 ? -1 : 1;
|
||||
double zDir = movePart->get_v_ms()[2] < 0 ? -1 : 1;
|
||||
if (*oldzDir != zDir) {
|
||||
Logger->log(*movePart, *oldLoc_m);
|
||||
Population->increase_density(*movePart, *oldLoc_m);
|
||||
*oldzDir = zDir;
|
||||
*oldLoc_m = movePart->get_Location_m();
|
||||
*oldLoc_m = movePart->get_x_m();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -17,25 +17,32 @@ 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 ¯oSigma_m);
|
||||
};
|
||||
|
||||
void E_Mover_Drift::doWallInteraction(Particle *movePart, vec3 *oldLoc_m, double *znew_m) {
|
||||
if (*znew_m >= Katrin_Geo::get_z_WGTSend_m()) { // Moveing into Spectrometer and reversing Speed.
|
||||
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] = Katrin_Geo::get_z_WGTSend_m();
|
||||
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 = Katrin_Geo::get_z_WGTSend_m() - (*znew_m - Katrin_Geo::get_z_WGTSend_m());
|
||||
movePart->set_Speed_ms( -1*(movePart->get_Speed_ms()) );
|
||||
*znew_m = z_WGTS_end_m - (*znew_m - z_WGTS_end_m);
|
||||
movePart->set_v_ms( -1*(movePart->get_v_ms()) );
|
||||
}
|
||||
if (*znew_m <= Katrin_Geo::get_z_RW_m()) {
|
||||
*znew_m = Katrin_Geo::get_z_RW_m();
|
||||
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 ¯oSigma_m) {
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* electron_drift_h */
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
//
|
||||
// electron_population.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 17.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef electron_population_h
|
||||
#define electron_population_h
|
||||
|
||||
|
||||
#include "energeticPop_container.hpp"
|
||||
#include "katrin_geo.hpp"
|
||||
|
||||
#include "population_base.h"
|
||||
#include "constants.h"
|
||||
|
||||
|
||||
class E_Population : public Population_Base, public RNG_Base {
|
||||
EnergeticPop_Container e_Container;
|
||||
Timer *Tim;
|
||||
|
||||
public:
|
||||
E_Population(Timer *Tim, UniRNG *rngUni, NormalRNG *rngNormal) : Population_Base(electron), RNG_Base(rngUni, rngNormal), e_Container(vec3(10,10,10), 2e4, 20) {
|
||||
this->Tim = Tim;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
double get_density_m3 (const vec3 &loc_m);
|
||||
void increase_density (const Particle &upPart, const vec3 &oldLoc_m);
|
||||
void decrease_denisty (const vec3 &oldLoc_m) {};
|
||||
|
||||
vec3 get_average_speed_ms (const vec3 &loc_m);
|
||||
vec3 roll_speed_ms (const vec3 &loc_m);
|
||||
};
|
||||
|
||||
|
||||
inline double E_Population::get_density_m3(const vec3 &loc_m) {
|
||||
Katrin_Geo::check_inKatrin(loc_m);
|
||||
double physTime_s = Tim->get_physTime_s();
|
||||
double dens = e_Container.getDensity_m3(loc_m, physTime_s);
|
||||
return(dens);
|
||||
}
|
||||
|
||||
inline void E_Population::increase_density(const Particle &upPart, const vec3 &oldLoc_m) {
|
||||
e_Container.upDensity(upPart, oldLoc_m);
|
||||
}
|
||||
|
||||
|
||||
inline vec3 E_Population::get_average_speed_ms(const vec3 &loc_m) {
|
||||
return (vec3(0,0,0));
|
||||
}
|
||||
|
||||
inline vec3 E_Population::roll_speed_ms(const vec3 &loc_m) {
|
||||
Katrin_Geo::check_inKatrin(loc_m);
|
||||
double E_eV = e_Container.roll_Energy_eV(loc_m, rngUni);
|
||||
double vAbs_ms = calc_Speed_from_Ekin_eV(E_eV, me_eV);
|
||||
vec3 v_ms = roll_uniform_direction(rngUni) * vAbs_ms;
|
||||
return(v_ms);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* electron_population_h */
|
||||
@@ -12,42 +12,36 @@
|
||||
#include "terminator_base.h"
|
||||
|
||||
|
||||
class E_Terminator : public Terminator_Base, private Energy_Terminator_Base, private MaxInteractions_Terminator_Base {
|
||||
|
||||
class Negative_Terminator : public Terminator_Base {
|
||||
double dipole_cutoffE_eV;
|
||||
public:
|
||||
E_Terminator(const int &maxInteractions, const double &cutoffEnergy_eV) : Terminator_Base(electron), Energy_Terminator_Base(cutoffEnergy_eV), MaxInteractions_Terminator_Base(maxInteractions) {};
|
||||
Negative_Terminator(species this_species, long int max_interactions, double cut_off_energy_eV, double dipole_cutoffE_eV) : Terminator_Base(this_species, max_interactions, cut_off_energy_eV) {
|
||||
this->dipole_cutoffE_eV = dipole_cutoffE_eV;
|
||||
};
|
||||
|
||||
bool checkTermination (const Particle &movePart);
|
||||
private:
|
||||
bool check_Wall(const Particle &movePart);
|
||||
bool check_walls(const Particle &movePart);
|
||||
};
|
||||
|
||||
|
||||
inline bool E_Terminator::checkTermination (const Particle &movePart) {
|
||||
if (check_Wall(movePart)) {
|
||||
return (true);
|
||||
inline bool Negative_Terminator::check_walls(const Particle &movePart) {
|
||||
vec3 loc_m = movePart.get_x_m();
|
||||
double E_eV = movePart.get_E_eV();
|
||||
double z_m = calc_z_m(loc_m);
|
||||
double r_m = calc_r_m(loc_m);
|
||||
if (z_m <= z_RW_m) {
|
||||
stats.n_rw += 1;
|
||||
return true;
|
||||
}
|
||||
if (check_Energy(movePart)) {
|
||||
return (true);
|
||||
if (z_m >= z_WGTS_end_m && E_eV <= dipole_cutoffE_eV) {
|
||||
stats.n_dipole += 1;
|
||||
return true;
|
||||
}
|
||||
if (check_MaxInteractions(movePart)) {
|
||||
return (true);
|
||||
if (r_m >= r_WGTS_m) {
|
||||
stats.n_radial += 1;
|
||||
return true;
|
||||
}
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
||||
inline bool E_Terminator::check_Wall(const Particle &movePart) {
|
||||
vec3 loc_m = movePart.get_Location_m();
|
||||
double z_m = loc_m[2];
|
||||
double r_m = sqrt( pow(loc_m[0],2) + pow(loc_m[1],2) );
|
||||
if (z_m <= Katrin_Geo::get_z_RW_m()) {
|
||||
return (true);
|
||||
}
|
||||
if (r_m >= Katrin_Geo::get_radius_m()) {
|
||||
return (true);
|
||||
}
|
||||
return (false);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ void EnergeticPop_Container::set_Map() {
|
||||
double Ex_max = ceil(log10(E_max_eV));
|
||||
double step = (Ex_max-Ex_min)/Epoints;
|
||||
double x, E_eV;
|
||||
for (vector<vec3>::iterator Itr = bins.begin(); Itr!=bins.end(); Itr++) {
|
||||
for (vector<vec3>::iterator itr = bins.begin(); itr!=bins.end(); itr++) {
|
||||
for (int i = 1; i<=Epoints; i++) {
|
||||
x = Ex_min + step*i;
|
||||
E_eV = pow(10,x);
|
||||
addPoint(deque<double>{(*Itr)[0], (*Itr)[1], (*Itr)[2], E_eV, 0});
|
||||
addPoint(deque<double>{(*itr)[0], (*itr)[1], (*itr)[2], E_eV, 0});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,24 +30,24 @@ double EnergeticPop_Container::getDensity_m3(const vec3 &locXYZ_m, double physTi
|
||||
check_In_Container(locXYZ_m, xyz);
|
||||
vec3 zrphiCords = transformTo_zrphiCords(locXYZ_m, xyz);
|
||||
double V_m3 = get_V_m3(zrphiCords[1]);
|
||||
double cumTime_s = get_cumulativeTime_s(zrphiCords);
|
||||
return (cumTime_s/physTime_s/V_m3);
|
||||
double cumTime_s = get_cumulated_time_s(zrphiCords);
|
||||
return cumTime_s/physTime_s/V_m3;
|
||||
}
|
||||
|
||||
double EnergeticPop_Container::get_cumulativeTime_s(vec3 zrphiCords) {
|
||||
double EnergeticPop_Container::get_cumulated_time_s(vec3 zrphiCords) {
|
||||
dim1Map EMap = *getSubMap<dim1Map>(ddeque{zrphiCords[0], zrphiCords[1], zrphiCords[2]}, Lower_bound);
|
||||
double cumTime_s = 0;
|
||||
for (dim1Map::iterator Itr = EMap.begin(); Itr != EMap.end(); Itr++) {
|
||||
cumTime_s +=Itr->second;
|
||||
for (dim1Map::iterator itr = EMap.begin(); itr != EMap.end(); itr++) {
|
||||
cumTime_s +=itr->second;
|
||||
}
|
||||
return(cumTime_s);
|
||||
return cumTime_s;
|
||||
}
|
||||
|
||||
|
||||
void EnergeticPop_Container::upDensity (const Particle &upParticle, const vec3 &oldLocXYZ_m) {
|
||||
check_In_Container(oldLocXYZ_m, xyz);
|
||||
vec3 zrphiOld_m = transformTo_zrphiCords(oldLocXYZ_m, xyz);
|
||||
vec3 zrphiNew_m = upParticle.get_Location_m();
|
||||
vec3 zrphiNew_m = upParticle.get_x_m();
|
||||
check_In_Container(zrphiNew_m, zrphi);
|
||||
// Check r and phi not changing, only valid for drift approximation....
|
||||
|
||||
@@ -59,14 +59,14 @@ void EnergeticPop_Container::upDensity (const Particle &upParticle, const vec3 &
|
||||
double r_m = zrphiOld_m[1];
|
||||
double phi = zrphiOld_m[2];
|
||||
double l_m = get_l_m();
|
||||
double vAbs_ms = upParticle.get_SpeedAbs_ms();
|
||||
double E_eV = upParticle.get_EKin_eV();
|
||||
double vAbs_ms = upParticle.get_vAbs_ms();
|
||||
double E_eV = upParticle.get_E_eV();
|
||||
|
||||
dim4Map::iterator zItr_min = Map.lower_bound(z_min_m);
|
||||
dim4Map::iterator zItr_max = Map.lower_bound(z_max_m);
|
||||
dim4Map::iterator zitr_min = Map.lower_bound(z_min_m);
|
||||
dim4Map::iterator zitr_max = Map.lower_bound(z_max_m);
|
||||
|
||||
for (dim4Map::iterator Itr = zItr_min;Itr != zItr_max;Itr++) {
|
||||
Itr->second.lower_bound(r_m)->second.lower_bound(phi)->second.lower_bound(E_eV)->second += l_m/vAbs_ms;
|
||||
for (dim4Map::iterator itr = zitr_min;itr != zitr_max;itr++) {
|
||||
itr->second.lower_bound(r_m)->second.lower_bound(phi)->second.lower_bound(E_eV)->second += l_m/vAbs_ms;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,19 +77,19 @@ double EnergeticPop_Container::roll_Energy_eV(const vec3 &locXYZ_m, UniRNG *rngU
|
||||
vec3 zrphiCords = transformTo_zrphiCords(locXYZ_m, xyz);
|
||||
dim1Map EMap = *getSubMap<dim1Map>(ddeque{locXYZ_m[0], locXYZ_m[1], locXYZ_m[2]}, Lower_bound);
|
||||
|
||||
double targetTime_s = rngUni->random() * get_cumulativeTime_s(zrphiCords);
|
||||
double targetTime_s = rngUni->random() * get_cumulated_time_s(zrphiCords);
|
||||
double summedTime_s = 0;
|
||||
dim1Map::iterator Itr = EMap.begin();
|
||||
dim1Map::iterator itr = EMap.begin();
|
||||
do {
|
||||
summedTime_s += Itr->second;
|
||||
Itr++;
|
||||
summedTime_s += itr->second;
|
||||
itr++;
|
||||
} while(summedTime_s < targetTime_s);
|
||||
Itr--;
|
||||
itr--;
|
||||
|
||||
if (Itr == EMap.begin() ) {
|
||||
return (Itr->first);
|
||||
if (itr == EMap.begin() ) {
|
||||
return itr->first;
|
||||
} else {
|
||||
double E_eV = ( (Itr->first) + ((--Itr)->first) )/2;
|
||||
return (E_eV);
|
||||
double E_eV = ( (itr->first) + ((--itr)->first) )/2;
|
||||
return E_eV;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ private:
|
||||
public:
|
||||
double getDensity_m3(const vec3 &locXYZ_m, double physTime_s) ;
|
||||
private:
|
||||
double get_cumulativeTime_s(vec3 zrphiCords);
|
||||
double get_cumulated_time_s(vec3 zrphiCords);
|
||||
|
||||
public:
|
||||
void upDensity (const Particle &upParticle, const vec3 &oldLocXYZ_m) ;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// exc_base.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 18.06.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef exc_base_h
|
||||
#define exc_base_h
|
||||
|
||||
#include "tcs_container.hpp"
|
||||
#include "dcs_base.h"
|
||||
|
||||
class Excitation_Base : public Sub_Interaction_Base {
|
||||
DCS_Base *dcs_gen;
|
||||
protected:
|
||||
double deltaE_eV;
|
||||
|
||||
public:
|
||||
Excitation_Base(Population_Base *Population, UniRNG *rngUni, double deltaE_eV, DCS_Base *dcs_gen) : Sub_Interaction_Base(Population, rngUni) {
|
||||
this->deltaE_eV = deltaE_eV;
|
||||
this->dcs_gen = dcs_gen;
|
||||
}
|
||||
|
||||
InteractionOut do_Interaction (Particle *interPart);
|
||||
private:
|
||||
//virtual double get_microSigma_m2(const double &Ekin_EV) = 0;
|
||||
};
|
||||
|
||||
inline InteractionOut Excitation_Base::do_Interaction (Particle *interPart) {
|
||||
vec3 vOff_ms = get_vOff_ms(*interPart, deltaE_eV);
|
||||
vec3 vLab_ms = interPart->get_v_ms() - vOff_ms;
|
||||
double EkinLab_eV = calc_E_eV_from_v_ms(vLab_ms, me_eV);
|
||||
double EkinLabNew_eV = EkinLab_eV - deltaE_eV;
|
||||
double theta_lab = dcs_gen->get_theta(EkinLab_eV);
|
||||
double phi_lab = rngUni->random() * 2 * pi;
|
||||
vec3 n0 = calc_n_new(vLab_ms, theta_lab, phi_lab);
|
||||
vec3 vnew_ms = n0 * calc_v_ms_from_E_eV(EkinLabNew_eV, me_eV) + vOff_ms;
|
||||
interPart->set_v_ms(vnew_ms);
|
||||
|
||||
return InteractionOut();
|
||||
}
|
||||
|
||||
|
||||
class Exp_Excitation_Base : public Excitation_Base {
|
||||
TCS_Container tcs_data;
|
||||
public:
|
||||
Exp_Excitation_Base(Population_Base *T2Population, UniRNG *rngUni, double deltaE_eV, DCS_Base *dcs_gen, std::string load_file_name) : Excitation_Base(T2Population, rngUni, deltaE_eV, dcs_gen),
|
||||
tcs_data(scale_start, scale_end, 1e3, get_data_path() + load_file_name) {};
|
||||
|
||||
private:
|
||||
double get_microSigma_m2(const double &E_eV, const vec3 &loc_m) {
|
||||
if (E_eV < deltaE_eV) {
|
||||
return 0;
|
||||
} else {
|
||||
return tcs_data.get_value(E_eV);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif /* exc_base_h */
|
||||
+15
-13
@@ -15,25 +15,27 @@
|
||||
using namespace std;
|
||||
|
||||
|
||||
H5_File::H5_File() {
|
||||
create();
|
||||
h5part = H5_Particles(&h5_file);
|
||||
h5pop = H5_Populations(&h5_file);
|
||||
H5_File::H5_File(std::string output_path) {
|
||||
create(output_path);
|
||||
}
|
||||
|
||||
void H5_File::create() {
|
||||
const string constH5Name = getFileName();
|
||||
h5_file = H5Fcreate(constH5Name.c_str(), H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT);
|
||||
void H5_File::create(std::string output_path) {
|
||||
//const string constH5Name = get_file_name();
|
||||
h5f = H5Fcreate(output_path.c_str(), H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT);
|
||||
h5g_particles = H5Gcreate(h5f, h5g_particles_path.c_str(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||
h5g_populations = H5Gcreate(h5f, h5g_populations_path.c_str(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||
}
|
||||
|
||||
std::string H5_File::getFileName() {
|
||||
string parname = getparName();
|
||||
/*
|
||||
std::string H5_File::get_file_name() {
|
||||
string parname = get_parameter_filenamepath();
|
||||
stringstream H5name;
|
||||
|
||||
int i = 1;
|
||||
do {
|
||||
H5name.str(std::string());
|
||||
H5name << parname << "_" << getTimeString() << "_" << i++<<".h5";
|
||||
} while ( isFile(H5name.str()) );
|
||||
return (H5name.str());
|
||||
H5name << parname << "_" << get_time_string() << "_" << i++<<".h5";
|
||||
} while ( is_file(H5name.str()) );
|
||||
return H5name.str();
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
+16
-10
@@ -9,21 +9,27 @@
|
||||
#ifndef h5_file_hpp
|
||||
#define h5_file_hpp
|
||||
|
||||
#include "h5_particles.h"
|
||||
#include "h5_populations.h"
|
||||
#include "hdf5.h"
|
||||
#include "hdf5_hl.h"
|
||||
#include <string>
|
||||
|
||||
class H5_File {
|
||||
hid_t h5_file;
|
||||
H5_Particles h5part;
|
||||
H5_Populations h5pop;
|
||||
hid_t h5f;
|
||||
hid_t h5g_particles;
|
||||
hid_t h5g_populations;
|
||||
|
||||
std::string h5g_particles_path = "/Particles";
|
||||
std::string h5g_populations_path = "/Populations";
|
||||
|
||||
public:
|
||||
H5_File();
|
||||
H5_Particles *get_h5part() {return(&h5part);}
|
||||
H5_Populations *get_h5pop() {return(&h5pop);}
|
||||
H5_File() {};
|
||||
H5_File(std::string output_path);
|
||||
hid_t *get_h5f() {return &h5f;}
|
||||
std::string get_h5g_particles_path() {return h5g_particles_path;}
|
||||
std::string get_h5g_populations_path() {return h5g_populations_path;}
|
||||
private:
|
||||
void create();
|
||||
std::string getFileName();
|
||||
void create(std::string output_path);
|
||||
//std::string get_file_name();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
//
|
||||
// h5_particles.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 18.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef h5_particles_h
|
||||
#define h5_particles_h
|
||||
|
||||
#include "read_system.h"
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
#include "hdf5.h"
|
||||
#include "hdf5_hl.h"
|
||||
|
||||
#include "katrin_geo.hpp"
|
||||
|
||||
class H5_Particles {
|
||||
int numberZBins;
|
||||
bool logging;
|
||||
double *zValues;
|
||||
|
||||
|
||||
hid_t *h5_file;
|
||||
hid_t *h5g_particles;
|
||||
hid_t *h5g_z;
|
||||
|
||||
public:
|
||||
H5_Particles() {};
|
||||
H5_Particles(hid_t *h5_file);
|
||||
|
||||
int get_numberZBins() {return(numberZBins);}
|
||||
bool get_logging() {return(logging);}
|
||||
double *get_zValues() {return(zValues);}
|
||||
hid_t *get_h5g_z() {return(h5g_z);}
|
||||
|
||||
|
||||
private:
|
||||
void set_logging();
|
||||
void set_zValues();
|
||||
void print_logInfo();
|
||||
|
||||
void create_h5gs();
|
||||
};
|
||||
|
||||
inline H5_Particles::H5_Particles(hid_t *h5_file) {
|
||||
this->h5_file = h5_file;
|
||||
numberZBins = getParameter("numberZBins");
|
||||
set_logging();
|
||||
set_zValues();
|
||||
print_logInfo();
|
||||
|
||||
create_h5gs();
|
||||
}
|
||||
|
||||
|
||||
inline void H5_Particles::set_logging() {
|
||||
if (numberZBins == 0) {
|
||||
logging = false;
|
||||
} else if (numberZBins == -1 || numberZBins > 0){
|
||||
logging = true;
|
||||
} else {
|
||||
std::stringstream ss;
|
||||
ss<<"H5_Logger::Parameter numberZBins invalid value.\nnumberZBins:\t"<<numberZBins<<"\n";
|
||||
throw MyException (ss.str());
|
||||
}
|
||||
}
|
||||
|
||||
inline void H5_Particles::set_zValues() {
|
||||
if (logging) {
|
||||
zValues = new double[numberZBins];
|
||||
double start_m = Katrin_Geo::get_z_RW_m();
|
||||
double length_m = Katrin_Geo::get_z_WGTSend_m() - start_m;
|
||||
double stepLength_m = length_m/(numberZBins-1);
|
||||
double z_m;
|
||||
for (int i = 0;i<numberZBins;i++) {
|
||||
z_m = start_m + stepLength_m*i;
|
||||
zValues[i] = z_m;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline void H5_Particles::print_logInfo() {
|
||||
std::stringstream ss;
|
||||
ss<<"Logger\t ";
|
||||
if (!logging) {
|
||||
ss<<"Logging disabled.\n";
|
||||
} else if (numberZBins == -1) {
|
||||
ss<<"Logging after every Interaction to one file.\n";
|
||||
} else if (numberZBins == 1) {
|
||||
ss<<"Only Logging Rearwall Output.\n";
|
||||
} else {
|
||||
ss<<"Logging at "<<numberZBins<<" z values.\n";
|
||||
}
|
||||
std::cout<<ss.str();
|
||||
}
|
||||
|
||||
inline void H5_Particles::create_h5gs() {
|
||||
h5g_particles = new hid_t;
|
||||
*h5g_particles = H5Gcreate(*h5_file, "/Particles", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||
|
||||
if (numberZBins == -1) {
|
||||
h5g_z = new hid_t[1];
|
||||
h5g_z[0] = H5Gcreate(*h5_file, "/Particles/z=all", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||
} else {
|
||||
h5g_z = new hid_t [numberZBins];
|
||||
for (int i = 0; i < numberZBins; i++)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "/Particles/" << zValues[i];
|
||||
h5g_z[i] = H5Gcreate2(*h5_file, ss.str().c_str(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif /* h5_particles_h */
|
||||
@@ -1,40 +0,0 @@
|
||||
//
|
||||
// h5_populations.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 28.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef h5_populations_h
|
||||
#define h5_populations_h
|
||||
|
||||
#include "read_system.h"
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
#include "hdf5.h"
|
||||
#include "hdf5_hl.h"
|
||||
|
||||
#include "katrin_geo.hpp"
|
||||
|
||||
class H5_Populations {
|
||||
hid_t *h5_file;
|
||||
hid_t *h5g_populations;
|
||||
|
||||
public:
|
||||
H5_Populations() {};
|
||||
H5_Populations(hid_t *h5_file);
|
||||
|
||||
hid_t *get_h5g_pop() {return(h5g_populations);}
|
||||
|
||||
};
|
||||
|
||||
inline H5_Populations::H5_Populations(hid_t *h5_file) {
|
||||
this->h5_file = h5_file;
|
||||
h5g_populations = new hid_t;
|
||||
*h5g_populations = H5Gcreate(*h5_file, "/Populations", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||
}
|
||||
|
||||
|
||||
#endif /* h5_populations_h */
|
||||
@@ -32,7 +32,7 @@ const hid_t H5TB_Particle_Interface::fieldTypes[8] = {
|
||||
H5T_NATIVE_DOUBLE,
|
||||
H5T_NATIVE_DOUBLE,
|
||||
H5T_NATIVE_DOUBLE};
|
||||
const hsize_t H5TB_Particle_Interface::chunkSize = 4096;
|
||||
const hsize_t H5TB_Particle_Interface::chunkSize = 145;
|
||||
const size_t H5TB_Particle_Interface::sizes[8] = {
|
||||
sizeof( samplelogParticle.Id),
|
||||
sizeof( samplelogParticle.parentId),
|
||||
@@ -47,7 +47,7 @@ const size_t H5TB_Particle_Interface::sizes[8] = {
|
||||
void H5TB_Particle_Interface::create() {
|
||||
herr_t state = H5TBmake_table(table_name.c_str(), *loc_id, table_name.c_str(), 8, 0,
|
||||
size, fieldNames, offset, fieldTypes,
|
||||
chunkSize, NULL, 0, NULL);
|
||||
chunkSize, nullptr, 0, nullptr);
|
||||
if (state < 0) {
|
||||
stringstream ss;
|
||||
ss<<"H5TB_Particle_Interface::create: Error creating.\n";
|
||||
@@ -56,20 +56,26 @@ void H5TB_Particle_Interface::create() {
|
||||
}
|
||||
|
||||
void H5TB_Particle_Interface::write(const Particle &logPart) {
|
||||
logParticle logParticle_buffer = transform(logPart);
|
||||
// Maybe add real buffer here....
|
||||
H5TBappend_records(*loc_id, table_name.c_str() , 1, size, offset, sizes, &logParticle_buffer );
|
||||
buffer[buffer_count] = transform(logPart);
|
||||
buffer_count = buffer_count + 1;
|
||||
if (buffer_count == buffer_size) {
|
||||
H5TBappend_records(*loc_id, table_name.c_str() , buffer_size, size, offset, sizes, &buffer);
|
||||
buffer_count = 0;
|
||||
}
|
||||
}
|
||||
H5TB_Particle_Interface::~H5TB_Particle_Interface() {
|
||||
H5TBappend_records(*loc_id, table_name.c_str() , buffer_count, size, offset, sizes, &buffer);
|
||||
}
|
||||
|
||||
loggerParticle H5TB_Particle_Interface::transform(const Particle &logPart) {
|
||||
logParticle res;
|
||||
res.Id = logPart.get_Id();
|
||||
res.parentId = logPart.get_ParentId();
|
||||
res.x_m = logPart.get_Location_m()[0];
|
||||
res.y_m = logPart.get_Location_m()[1];
|
||||
res.z_m = logPart.get_Location_m()[2];
|
||||
res.vx_ms = logPart.get_Speed_ms()[0];
|
||||
res.vy_ms = logPart.get_Speed_ms()[1];
|
||||
res.vz_ms = logPart.get_Speed_ms()[2];
|
||||
return (res);
|
||||
res.parentId = logPart.get_PId();
|
||||
res.x_m = logPart.get_x_m()[0];
|
||||
res.y_m = logPart.get_x_m()[1];
|
||||
res.z_m = logPart.get_x_m()[2];
|
||||
res.vx_ms = logPart.get_v_ms()[0];
|
||||
res.vy_ms = logPart.get_v_ms()[1];
|
||||
res.vz_ms = logPart.get_v_ms()[2];
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -34,11 +34,16 @@ class H5TB_Particle_Interface {
|
||||
static const hsize_t chunkSize;
|
||||
static const size_t sizes[8];
|
||||
|
||||
int buffer_size = 145;
|
||||
loggerParticle buffer[145];
|
||||
int buffer_count = 0;
|
||||
|
||||
std::string table_name;
|
||||
hid_t *loc_id;
|
||||
|
||||
public:
|
||||
H5TB_Particle_Interface() {};
|
||||
~H5TB_Particle_Interface();
|
||||
H5TB_Particle_Interface(const std::string &table_name, hid_t *loc_id) {
|
||||
this->table_name = table_name;
|
||||
this->loc_id = loc_id;
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
using namespace std;
|
||||
|
||||
|
||||
log_population_bin sample_log_cell = {0,0,0,0,0,0,0};
|
||||
const size_t H5TB_Population_Interface::size = sizeof(log_population_bin);
|
||||
pop_bin sample_log_cell = {0,0,0,0,0,0,0};
|
||||
const size_t H5TB_Population_Interface::size = sizeof(pop_bin);
|
||||
const char *H5TB_Population_Interface::fieldNames[7] = {
|
||||
"n_decay",
|
||||
"phys_time_s",
|
||||
"z_bin",
|
||||
"r_bin",
|
||||
"phi_bin",
|
||||
@@ -24,29 +24,29 @@ const char *H5TB_Population_Interface::fieldNames[7] = {
|
||||
"cum_time",
|
||||
"offset"};
|
||||
const size_t H5TB_Population_Interface::offset[7] = {
|
||||
HOFFSET(log_population_bin, number_decay),
|
||||
HOFFSET(log_population_bin, z_bin),
|
||||
HOFFSET(log_population_bin, r_bin),
|
||||
HOFFSET(log_population_bin, phi_bin),
|
||||
HOFFSET(log_population_bin, E_bin),
|
||||
HOFFSET(log_population_bin, cumulative_time),
|
||||
HOFFSET(log_population_bin, offset)};
|
||||
HOFFSET(pop_bin, phys_time_s),
|
||||
HOFFSET(pop_bin, z_bin),
|
||||
HOFFSET(pop_bin, r_bin),
|
||||
HOFFSET(pop_bin, phi_bin),
|
||||
HOFFSET(pop_bin, E_bin),
|
||||
HOFFSET(pop_bin, cumulated_time_s),
|
||||
HOFFSET(pop_bin, offset)};
|
||||
const hid_t H5TB_Population_Interface::fieldTypes[7] = {
|
||||
H5T_NATIVE_INT,
|
||||
H5T_NATIVE_DOUBLE,
|
||||
H5T_NATIVE_INT,
|
||||
H5T_NATIVE_INT,
|
||||
H5T_NATIVE_INT,
|
||||
H5T_NATIVE_INT,
|
||||
H5T_NATIVE_DOUBLE,
|
||||
H5T_NATIVE_INT};
|
||||
const hsize_t H5TB_Population_Interface::chunkSize = 4096;
|
||||
const hsize_t H5TB_Population_Interface::chunkSize = 225;
|
||||
const size_t H5TB_Population_Interface::sizes[7] = {
|
||||
sizeof( sample_log_cell.number_decay),
|
||||
sizeof( sample_log_cell.phys_time_s),
|
||||
sizeof( sample_log_cell.z_bin),
|
||||
sizeof( sample_log_cell.r_bin),
|
||||
sizeof( sample_log_cell.phi_bin),
|
||||
sizeof( sample_log_cell.E_bin),
|
||||
sizeof( sample_log_cell.cumulative_time),
|
||||
sizeof( sample_log_cell.cumulated_time_s),
|
||||
sizeof( sample_log_cell.offset)};
|
||||
|
||||
|
||||
@@ -61,8 +61,15 @@ void H5TB_Population_Interface::create() {
|
||||
}
|
||||
}
|
||||
|
||||
void H5TB_Population_Interface::write(const log_population_bin &log_bin) {
|
||||
H5TBappend_records(*loc_id, table_name.c_str() , 1, size, offset, sizes, &log_bin);
|
||||
void H5TB_Population_Interface::write(const pop_bin &log_bin) {
|
||||
buffer[buffer_count] = log_bin;
|
||||
buffer_count = buffer_count + 1;
|
||||
if (buffer_count == buffer_size) {
|
||||
H5TBappend_records(*loc_id, table_name.c_str() , buffer_size, size, offset, sizes, &buffer);
|
||||
buffer_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
H5TB_Population_Interface::~H5TB_Population_Interface() {
|
||||
H5TBappend_records(*loc_id, table_name.c_str() , buffer_count, size, offset, sizes, &buffer);
|
||||
}
|
||||
|
||||
@@ -11,19 +11,20 @@
|
||||
|
||||
#include "error_types.h"
|
||||
|
||||
//#include "population_base.h"
|
||||
|
||||
#include "hdf5.h"
|
||||
#include "hdf5_hl.h"
|
||||
|
||||
|
||||
typedef struct log_population_bin {
|
||||
int number_decay;
|
||||
struct pop_bin {
|
||||
double phys_time_s;
|
||||
int z_bin;
|
||||
int r_bin;
|
||||
int phi_bin;
|
||||
int E_bin;
|
||||
double cumulative_time;
|
||||
double cumulated_time_s;
|
||||
int offset;
|
||||
} log_population_bin;
|
||||
};
|
||||
|
||||
|
||||
class H5TB_Population_Interface {
|
||||
@@ -34,11 +35,16 @@ class H5TB_Population_Interface {
|
||||
static const hsize_t chunkSize;
|
||||
static const size_t sizes[7];
|
||||
|
||||
int buffer_size = 225;
|
||||
pop_bin buffer[225];
|
||||
int buffer_count = 0;
|
||||
|
||||
std::string table_name;
|
||||
hid_t *loc_id;
|
||||
|
||||
public:
|
||||
H5TB_Population_Interface() {};
|
||||
~H5TB_Population_Interface();
|
||||
H5TB_Population_Interface(const std::string &table_name, hid_t *loc_id) {
|
||||
this->table_name = table_name;
|
||||
this->loc_id = loc_id;
|
||||
@@ -48,7 +54,7 @@ private:
|
||||
void create();
|
||||
|
||||
public:
|
||||
void write(const log_population_bin &log_bin);
|
||||
void write(const pop_bin &log_bin);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
using namespace std;
|
||||
|
||||
|
||||
log_meta_bin sample_bin = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
const size_t H5TB_Population_Meta_Interface::size = sizeof(log_meta_bin);
|
||||
pop_bin_meta_info sample_bin = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
const size_t H5TB_Population_Meta_Interface::size = sizeof(pop_bin_meta_info);
|
||||
const char *H5TB_Population_Meta_Interface::fieldNames[12] = {
|
||||
"z_bin",
|
||||
"r_bin",
|
||||
@@ -29,18 +29,18 @@ const char *H5TB_Population_Meta_Interface::fieldNames[12] = {
|
||||
"E_min_eV",
|
||||
"E_max_eV"};
|
||||
const size_t H5TB_Population_Meta_Interface::offset[12] = {
|
||||
HOFFSET(log_meta_bin, z_bin),
|
||||
HOFFSET(log_meta_bin, r_bin),
|
||||
HOFFSET(log_meta_bin, phi_bin),
|
||||
HOFFSET(log_meta_bin, E_bin),
|
||||
HOFFSET(log_meta_bin, z_min_m),
|
||||
HOFFSET(log_meta_bin, z_max_m),
|
||||
HOFFSET(log_meta_bin, r_min_m),
|
||||
HOFFSET(log_meta_bin, r_max_m),
|
||||
HOFFSET(log_meta_bin, phi_min),
|
||||
HOFFSET(log_meta_bin, phi_max),
|
||||
HOFFSET(log_meta_bin, E_min_eV),
|
||||
HOFFSET(log_meta_bin, E_max_eV)};
|
||||
HOFFSET(pop_bin_meta_info, z_bin),
|
||||
HOFFSET(pop_bin_meta_info, r_bin),
|
||||
HOFFSET(pop_bin_meta_info, phi_bin),
|
||||
HOFFSET(pop_bin_meta_info, E_bin),
|
||||
HOFFSET(pop_bin_meta_info, z_min_m),
|
||||
HOFFSET(pop_bin_meta_info, z_max_m),
|
||||
HOFFSET(pop_bin_meta_info, r_min_m),
|
||||
HOFFSET(pop_bin_meta_info, r_max_m),
|
||||
HOFFSET(pop_bin_meta_info, phi_min),
|
||||
HOFFSET(pop_bin_meta_info, phi_max),
|
||||
HOFFSET(pop_bin_meta_info, E_min_eV),
|
||||
HOFFSET(pop_bin_meta_info, E_max_eV)};
|
||||
|
||||
|
||||
const hid_t H5TB_Population_Meta_Interface::fieldTypes[12] = {
|
||||
@@ -56,7 +56,7 @@ const hid_t H5TB_Population_Meta_Interface::fieldTypes[12] = {
|
||||
H5T_NATIVE_DOUBLE,
|
||||
H5T_NATIVE_DOUBLE,
|
||||
H5T_NATIVE_DOUBLE};
|
||||
const hsize_t H5TB_Population_Meta_Interface::chunkSize = 4096;
|
||||
const hsize_t H5TB_Population_Meta_Interface::chunkSize = 100;
|
||||
const size_t H5TB_Population_Meta_Interface::sizes[12] = {
|
||||
sizeof( sample_bin.z_bin),
|
||||
sizeof( sample_bin.r_bin),
|
||||
@@ -83,6 +83,15 @@ void H5TB_Population_Meta_Interface::create() {
|
||||
}
|
||||
}
|
||||
|
||||
void H5TB_Population_Meta_Interface::write(const log_meta_bin &log_meta) {
|
||||
H5TBappend_records(*loc_id, table_name.c_str() , 1, size, offset, sizes, &log_meta);
|
||||
void H5TB_Population_Meta_Interface::write(const pop_bin_meta_info &log_meta_bin) {
|
||||
buffer[buffer_count] = log_meta_bin;
|
||||
buffer_count = buffer_count + 1;
|
||||
if (buffer_count == buffer_size) {
|
||||
H5TBappend_records(*loc_id, table_name.c_str() , buffer_size, size, offset, sizes, &buffer);
|
||||
buffer_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
H5TB_Population_Meta_Interface::~H5TB_Population_Meta_Interface() {
|
||||
H5TBappend_records(*loc_id, table_name.c_str() , buffer_count, size, offset, sizes, &buffer);
|
||||
}
|
||||
|
||||
@@ -11,11 +11,13 @@
|
||||
|
||||
#include "error_types.h"
|
||||
|
||||
#include "population_base.h"
|
||||
|
||||
#include "hdf5.h"
|
||||
#include "hdf5_hl.h"
|
||||
|
||||
|
||||
typedef struct log_meta_bin {
|
||||
struct pop_bin_meta_info {
|
||||
int z_bin;
|
||||
int r_bin;
|
||||
int phi_bin;
|
||||
@@ -28,7 +30,8 @@ typedef struct log_meta_bin {
|
||||
double phi_max;
|
||||
double E_min_eV;
|
||||
double E_max_eV;
|
||||
} log_meta_bin;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class H5TB_Population_Meta_Interface {
|
||||
@@ -39,11 +42,16 @@ class H5TB_Population_Meta_Interface {
|
||||
static const hsize_t chunkSize;
|
||||
static const size_t sizes[12];
|
||||
|
||||
int buffer_size = 100;
|
||||
pop_bin_meta_info buffer[100];
|
||||
int buffer_count = 0;
|
||||
|
||||
std::string table_name;
|
||||
hid_t *loc_id;
|
||||
|
||||
public:
|
||||
H5TB_Population_Meta_Interface() {};
|
||||
~H5TB_Population_Meta_Interface();
|
||||
H5TB_Population_Meta_Interface(const std::string &table_name, hid_t *loc_id) {
|
||||
this->table_name = table_name;
|
||||
this->loc_id = loc_id;
|
||||
@@ -53,8 +61,8 @@ private:
|
||||
void create();
|
||||
|
||||
public:
|
||||
void write(const log_meta_bin &log_meta);
|
||||
|
||||
void write(const pop_bin_meta_info &log_meta_bin);
|
||||
};
|
||||
|
||||
|
||||
#endif /* h5tb_population_meta_interface_hpp */
|
||||
|
||||
@@ -19,10 +19,10 @@ class Hardsphere_elasticScattering {
|
||||
public:
|
||||
Hardsphere_elasticScattering(double r_m) {this->r_m = r_m;}
|
||||
|
||||
double get_TCS() {return(4*pi*r_m*r_m);}
|
||||
double get_SDCS() {return(r_m*r_m);}
|
||||
double get_TCS() {return 4*pi*r_m*r_m;}
|
||||
double get_SDCS() {return r_m*r_m;}
|
||||
|
||||
double roll_theta(UniRNG *rngUni) {return (pi*rngUni->random());}
|
||||
double roll_theta(UniRNG *rngUni) {return pi*rngUni->random();}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -9,67 +9,72 @@
|
||||
#include "read_system.h"
|
||||
|
||||
#include "injector.hpp"
|
||||
#include "katrin_geo.hpp"
|
||||
#include "katrin_geo.h"
|
||||
|
||||
const int Injector::injectionMethod = getParameter("injectionMethod");
|
||||
const double Injector::injectionEnergy_eV = getParameter("injectionEnergy_eV");
|
||||
const int Injector::injectionMethod = load_parameter("INJECTION");
|
||||
const double Injector::injectionEnergy_eV = load_parameter("INJ_E");
|
||||
|
||||
Particle Injector::injectElectron (const int &newId) {
|
||||
double r_m = Katrin_Geo::get_radius_m()*sqrt(rngUni->random());
|
||||
|
||||
double r_m = r_WGTS_m*sqrt(rngUni->random());
|
||||
double phi = rngUni->random()*2*pi;
|
||||
|
||||
double z_WGTSstart_m = Katrin_Geo::get_z_WGTSstart_m();
|
||||
double wgtsLength_m = Katrin_Geo::get_wgtsLength_m();
|
||||
double z_WGTSstart_m = z_WGTS_start_m;
|
||||
double wgtsLength_m = l_WGTS_m;
|
||||
|
||||
double z_WGTS_start_to_half_pos_m = sqrt(rngUni->random())*wgtsLength_m/2;
|
||||
double z_m = (rngUni->random()<0.5) ? z_WGTS_start_to_half_pos_m : wgtsLength_m - z_WGTS_start_to_half_pos_m;
|
||||
z_m += z_WGTSstart_m;
|
||||
|
||||
vec3 loc_m = vec3 (r_m*cos(phi),r_m*sin(phi),z_m);
|
||||
double Ekin_eV;
|
||||
double E_eV;
|
||||
switch(injectionMethod) {
|
||||
case 0: // Fermi
|
||||
Ekin_eV = roll_FermiEnergy_eV();
|
||||
E_eV = roll_FermiEnergy_eV();
|
||||
break;
|
||||
case 1: //Delta
|
||||
Ekin_eV = injectionEnergy_eV;
|
||||
E_eV = injectionEnergy_eV;
|
||||
break;
|
||||
case 2: //Maxwell Boltzman
|
||||
Ekin_eV = roll_MBEnergy(injectionEnergy_eV/kb_eVK,me_eV, rngNormal);
|
||||
E_eV = roll_MBEnergy(injectionEnergy_eV/kb_eVK,me_eV, rngNormal);
|
||||
break;
|
||||
default:
|
||||
throw MyException("Katrin::injectElectron: Invalid Injection Method.");
|
||||
break;
|
||||
}
|
||||
vec3 speed_ms = roll_uniform_direction(rngUni) * calc_Speed_from_Ekin_eV(Ekin_eV,me_eV);
|
||||
return ( PartFac.createElectron(loc_m, speed_ms,newId,newId) );
|
||||
vec3 v_ms = roll_uniform_direction(rngUni) * calc_v_ms_from_E_eV(E_eV,me_eV);
|
||||
return PartFac.create_e(loc_m, v_ms, newId, newId);
|
||||
|
||||
//double v_ms = calc_v_ms_from_E_eV(pow(rngUni->random(),1./3.), me_eV);
|
||||
//double v_ms = -100;
|
||||
//return PartFac.create_e(vec3(0,0,z_WGTS_end_m), vec3(0,0,-v_ms),newId, newId);
|
||||
}
|
||||
|
||||
double Injector::roll_FermiEnergy_eV() {
|
||||
double pmax,E_min_eV, E_max_eV, Ecan_eV,eta1,eta2;
|
||||
pmax = 1.5e-28; // From Plotting EnergyDistributionBetaDecay
|
||||
E_min_eV = zero;
|
||||
E_min_eV = scale_start;
|
||||
E_max_eV = TritiumDecayEndpoint_eV;
|
||||
do {
|
||||
eta1 = rngUni->random();
|
||||
eta2 = rngUni->random();
|
||||
Ecan_eV = E_min_eV + eta1*(E_max_eV - E_min_eV);
|
||||
} while(eta2*pmax > get_FermiDecaySpectrumDensity(Ecan_eV));
|
||||
return(Ecan_eV);
|
||||
return Ecan_eV;
|
||||
}
|
||||
|
||||
double Injector::get_FermiDecaySpectrumDensity(const double &Ekin_eV) {
|
||||
if (Ekin_eV>TritiumDecayEndpoint_eV) {
|
||||
return (0.);
|
||||
double Injector::get_FermiDecaySpectrumDensity(const double &E_eV) {
|
||||
if (E_eV>TritiumDecayEndpoint_eV) {
|
||||
return 0;
|
||||
} else{
|
||||
double p_eV = sqrt(Ekin_eV*Ekin_eV + 2 * Ekin_eV * me_eV);
|
||||
return( BetaDecayConst * get_FermiFunction(2, Ekin_eV) * p_eV*(Ekin_eV+me_eV)*pow(TritiumDecayEndpoint_eV-Ekin_eV,2) );
|
||||
double p_eV = sqrt(E_eV*E_eV + 2 * E_eV * me_eV);
|
||||
return BetaDecayConst*get_FermiFunction(2, E_eV)*p_eV*(E_eV+me_eV)*pow(TritiumDecayEndpoint_eV-E_eV,2);
|
||||
}
|
||||
}
|
||||
|
||||
double Injector::get_FermiFunction(const double &Z, const double &Ekin_eV) {
|
||||
double gamma = 1+ Ekin_eV/me_eV;
|
||||
double Injector::get_FermiFunction(const double &Z, const double &E_eV) {
|
||||
double gamma = 1+ E_eV/me_eV;
|
||||
double beta = sqrt(1 - pow(gamma,-2));
|
||||
double eta =Z/beta/137.;
|
||||
return( 2*pi*eta/(1-exp(-2*pi*eta)) );
|
||||
return 2*pi*eta/(1-exp(-2*pi*eta));
|
||||
}
|
||||
|
||||
@@ -21,14 +21,14 @@ class Injector : RNG_Base {
|
||||
Particle_Builder PartFac;
|
||||
|
||||
public:
|
||||
Injector() : RNG_Base(NULL, NULL) {};
|
||||
Injector() : RNG_Base(nullptr, nullptr) {};
|
||||
Injector(UniRNG *rngUni, NormalRNG *rngNormal) : RNG_Base(rngUni, rngNormal){};
|
||||
|
||||
Particle injectElectron (const int &newId);
|
||||
private:
|
||||
double roll_FermiEnergy_eV();
|
||||
double get_FermiDecaySpectrumDensity(const double &Ekin_eV);
|
||||
double get_FermiFunction(const double &Z, const double &Ekin_eV);
|
||||
double get_FermiDecaySpectrumDensity(const double &E_eV);
|
||||
double get_FermiFunction(const double &Z, const double &E_eV);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#define interaction_base_hpp
|
||||
|
||||
|
||||
|
||||
#include "sub_interaction_base.h"
|
||||
|
||||
#include "process_base.h"
|
||||
@@ -30,35 +29,33 @@ public:
|
||||
void add(Sub_Interaction_Base *addSubInteraction);
|
||||
|
||||
InteractionOut do_Interaction(Particle *interPart);
|
||||
double get_macroSigma_m2(const Particle &interPart);
|
||||
|
||||
double get_macroSigma_m(const Particle &interPart);
|
||||
};
|
||||
|
||||
|
||||
inline InteractionOut Interaction_Base::do_Interaction(Particle *interPart) {
|
||||
double macroSigma_m2 = get_macroSigma_m2(*interPart);
|
||||
|
||||
double currentStackedSigma = zero;
|
||||
double targetStackedSigma = rngUni->random() * macroSigma_m2;
|
||||
double macroSigma_m = get_macroSigma_m(*interPart);
|
||||
double currentStackedSigma = 0;
|
||||
double targetStackedSigma = rngUni->random() * macroSigma_m;
|
||||
|
||||
|
||||
for (int i = 0; i < numSubInteractions; i++) {
|
||||
currentStackedSigma += SubInteractions[i]->get_macroSigma_m2(*interPart);
|
||||
if (currentStackedSigma > targetStackedSigma) {
|
||||
return (SubInteractions[i]->do_Interaction(interPart));
|
||||
currentStackedSigma += SubInteractions[i]->get_macroSigma_m(*interPart);
|
||||
if (currentStackedSigma >= targetStackedSigma) {
|
||||
return SubInteractions[i]->do_Interaction(interPart);
|
||||
}
|
||||
}
|
||||
std::cout<<interPart<<"\n";
|
||||
std::stringstream ss;
|
||||
ss<<"Interaction_Base::do_Interactio: No Interaction selected.\n";
|
||||
ss<<"Interaction_Base::do_Interaction: No Interactions added.\n";
|
||||
throw MyException (ss.str());
|
||||
}
|
||||
|
||||
inline double Interaction_Base::get_macroSigma_m2(const Particle &interPart) {
|
||||
double macroSigma_m2 = zero;
|
||||
|
||||
inline double Interaction_Base::get_macroSigma_m(const Particle &interPart) {
|
||||
double macroSigma_m = 0;
|
||||
for (int i = 0; i < numSubInteractions; i++) {
|
||||
macroSigma_m2 += SubInteractions[i]->get_macroSigma_m2(interPart);
|
||||
macroSigma_m += SubInteractions[i]->get_macroSigma_m(interPart);
|
||||
}
|
||||
return(macroSigma_m2);
|
||||
return macroSigma_m;
|
||||
}
|
||||
|
||||
inline void Interaction_Base::add(Sub_Interaction_Base *addSubInteraction) {
|
||||
|
||||
@@ -8,49 +8,201 @@
|
||||
|
||||
#include "interaction_builder.hpp"
|
||||
|
||||
|
||||
// e impact
|
||||
#include "eT2_elastic.h"
|
||||
#include "eT2_ionization.h"
|
||||
#include "e_T2I_recombination.h"
|
||||
#include "eT2_vibexc0102.h"
|
||||
#include "eT2_elexc_analytic.h"
|
||||
|
||||
#include "TT2_elastic.h"
|
||||
#include "eT2I_recombination.h"
|
||||
#include "eT2I_disexc.h"
|
||||
#include "eT3I_recombination.h"
|
||||
#include "eT3I_disexc.h"
|
||||
|
||||
#include "eT5I_recombination.h"
|
||||
|
||||
// TI impact
|
||||
#include "TIT2_elastic.h"
|
||||
#include "TIT2_radasc.h"
|
||||
#include "TIT2_terasc.h"
|
||||
|
||||
// T2I impact
|
||||
#include "T2Ie_disexc.h"
|
||||
#include "T2Ie_recombination.h"
|
||||
|
||||
#include "T2IT2_cluster.h"
|
||||
#include "T2IT2_cx.h"
|
||||
|
||||
// T3I impact
|
||||
#include "T3IT2_elastic.h"
|
||||
#include "T3IT2_radasc.h"
|
||||
#include "T3IT2_terasc.h"
|
||||
#include "T3Ie_recombination.h"
|
||||
#include "T3Ie_disexc.h"
|
||||
|
||||
// T5I impact
|
||||
#include "T5IT2_elastic.h"
|
||||
#include "T5Ie_recombination.h"
|
||||
|
||||
const int Interaction_Builder::eT2elastic = getParameter("eT2elastic");
|
||||
const int Interaction_Builder::eT2ionization = getParameter("eT2ionization");
|
||||
|
||||
|
||||
Interaction_Manager Interaction_Builder::build(Population_Manager *Populations, UniRNG *rngUni) {
|
||||
Interaction_Manager Interactions;
|
||||
Interactions.add(build_electron(Populations, rngUni));
|
||||
//Interactions.add(build_tritium(Populations, rngUni));
|
||||
Interactions.add(build_tritiumI(Populations, rngUni));
|
||||
Interactions.add(build_tritium2I(Populations, rngUni));
|
||||
return(Interactions);
|
||||
Interactions.add(build_tritium3I(Populations, rngUni));
|
||||
Interactions.add(build_tritium5I(Populations, rngUni));
|
||||
return Interactions;
|
||||
}
|
||||
|
||||
Interaction_Base* Interaction_Builder::build_electron(Population_Manager *Populations, UniRNG *rngUni) {
|
||||
Interaction_Base *eInteraction = new Interaction_Base(electron, rngUni);
|
||||
Population_Base *T2Population = Populations->find(tritium2);
|
||||
Population_Base *T2IPopulation = Populations->find(tritium2I);
|
||||
Population_Base *T3IPopulation = Populations->find(tritium3I);
|
||||
Population_Base *T5IPopulation = Populations->find(tritium5I);
|
||||
DCS_Base *exc_dcs = new ZeroPi_DCS(rngUni);
|
||||
|
||||
if (eT2elastic == 1) {
|
||||
eInteraction->add(new eT2_Elastic(T2Population, rngUni));
|
||||
if (load_parameter("eT2_ELA") == 1) {
|
||||
DCS_Base *ela_dcs;
|
||||
if (load_parameter("INT_ELA_DIR") == 0) {
|
||||
ela_dcs = new Elastic_DCS(rngUni);
|
||||
} else if (load_parameter("INT_ELA_DIR") == 1) {
|
||||
ela_dcs = new FourPi_DCS(rngUni);
|
||||
} else if (load_parameter("INT_ELA_DIR") == 2) {
|
||||
ela_dcs = new ZeroPi_DCS(rngUni);
|
||||
} else {
|
||||
throw MyException ("eT2_ELA_DIR invalid.");
|
||||
}
|
||||
eInteraction->add(new eT2_Elastic(T2Population, rngUni, ela_dcs));
|
||||
} else if (load_parameter("eT2_ELA") != 0) {
|
||||
throw MyException ("eT2_ELA invalid.");
|
||||
}
|
||||
if (eT2ionization == 1) {
|
||||
eInteraction->add(new eT2_T2I_Ionization_Container(T2Population, rngUni));
|
||||
|
||||
if (load_parameter("eT2_ION") == 1) {
|
||||
eInteraction->add(new eT2_Ionization_Janev_ndiss(T2Population, rngUni));
|
||||
eInteraction->add(new eT2_Ionization_Janev_diss_g(T2Population, rngUni));
|
||||
eInteraction->add(new eT2_Ionization_Janev_diss_u(T2Population, rngUni));
|
||||
} else if (load_parameter("eT2_ION") == 2){
|
||||
eInteraction->add(new eT2_Ionization_BED_Container(T2Population, rngUni));
|
||||
} else if(load_parameter("eT2_ION") != 0) {
|
||||
throw MyException ("eT2_ION invalid.");
|
||||
}
|
||||
eInteraction->add(new eT2I_Recombination(T2IPopulation, rngUni));
|
||||
return(eInteraction);
|
||||
|
||||
|
||||
if (load_parameter("eT2_ROT") == 2) {
|
||||
eInteraction->add(new Exp_Excitation_Base(T2Population, rngUni, 4.41e-4, exc_dcs, "rot_exc_j02.dat"));
|
||||
} else if (load_parameter("eT2_ROT") != 0) {
|
||||
throw MyException ("eT2_ROT invalid.");
|
||||
}
|
||||
|
||||
if (load_parameter("eT2_VIB") == 1) {
|
||||
eInteraction->add(new eT2_VibExc01(T2Population, rngUni, exc_dcs));
|
||||
eInteraction->add(new eT2_VibExc02(T2Population, rngUni, exc_dcs));
|
||||
} else if (load_parameter("eT2_VIB") == 2) {
|
||||
eInteraction->add(new Exp_Excitation_Base(T2Population, rngUni, 0.516, exc_dcs, "vib_exc_v01.dat"));
|
||||
} else if (load_parameter("eT2_VIB") != 0) {
|
||||
throw MyException ("eT2_VIB invalid.");
|
||||
}
|
||||
|
||||
if (load_parameter("eT2_EL") == 1) {
|
||||
build_e_el_janev(eInteraction, rngUni, T2Population, exc_dcs);
|
||||
} else if (load_parameter("eT2_EL") == 2) {
|
||||
build_e_el_exp(eInteraction, rngUni, T2Population, exc_dcs);
|
||||
} else if (load_parameter("eT2_EL") != 0) {
|
||||
throw MyException ("eT2_EL invalid.");
|
||||
}
|
||||
|
||||
if (load_parameter("e_REC") == 1) {
|
||||
eInteraction->add(new eT2I_Recombination(T2IPopulation, rngUni));
|
||||
eInteraction->add(new eT3I_Recombination(T3IPopulation, rngUni));
|
||||
eInteraction->add(new eT5I_Recombination(T5IPopulation, rngUni));
|
||||
} else if (load_parameter("e_REC") != 0) {
|
||||
throw MyException ("e_REC invalid.");
|
||||
}
|
||||
|
||||
//eInteraction->add(new eT2I_DissExc(T2IPopulation, rngUni, exc_dcs));
|
||||
//eInteraction->add(new eT3I_DissExc(T3IPopulation, rngUni, exc_dcs));
|
||||
|
||||
|
||||
return eInteraction;
|
||||
}
|
||||
|
||||
void Interaction_Builder::build_e_el_janev(Interaction_Base* eInteraction, UniRNG *rngUni, Population_Base *T2Population, DCS_Base *exc_dcs) {
|
||||
eInteraction->add(new eT2_ElExc_Nu_Analytic(T2Population, rngUni, Janev_eT2_ElExc_Nu(B1Sigmau), exc_dcs));
|
||||
eInteraction->add(new eT2_ElExc_Nu_Analytic(T2Population, rngUni, Janev_eT2_ElExc_Nu(Bp1Sigu), exc_dcs));
|
||||
eInteraction->add(new eT2_ElExc_Nu_Analytic(T2Population, rngUni, Janev_eT2_ElExc_Nu(Bpp1Sigu), exc_dcs));
|
||||
eInteraction->add(new eT2_ElExc_Nu_Analytic(T2Population, rngUni, Janev_eT2_ElExc_Nu(C1Piu), exc_dcs));
|
||||
eInteraction->add(new eT2_ElExc_Nu_Analytic(T2Population, rngUni, Janev_eT2_ElExc_Nu(D1Piu), exc_dcs));
|
||||
eInteraction->add(new eT2_ElExc_Nu_Analytic(T2Population, rngUni, Janev_eT2_ElExc_Nu(Dp1Piu), exc_dcs));
|
||||
|
||||
eInteraction->add(new eT2_ElExc_Ng_Analytic(T2Population, rngUni, Janev_eT2_ElExc_Ng(EF1Sigpg), exc_dcs));
|
||||
eInteraction->add(new eT2_ElExc_Ng_Analytic(T2Population, rngUni, Janev_eT2_ElExc_Ng(HHb1Sigpg), exc_dcs));
|
||||
eInteraction->add(new eT2_ElExc_Ng_Analytic(T2Population, rngUni, Janev_eT2_ElExc_Ng(GK1Sigpg), exc_dcs));
|
||||
eInteraction->add(new eT2_ElExc_Ng_Analytic(T2Population, rngUni, Janev_eT2_ElExc_Ng(I1Pig), exc_dcs));
|
||||
|
||||
eInteraction->add(new eT2_ElExc_n_Analytic(T2Population, rngUni, Janev_eT2_ElExc_n(a3Sigpg), exc_dcs));
|
||||
eInteraction->add(new eT2_ElExc_n_Analytic(T2Population, rngUni, Janev_eT2_ElExc_n(b3Sigpu), exc_dcs));
|
||||
eInteraction->add(new eT2_ElExc_n_Analytic(T2Population, rngUni, Janev_eT2_ElExc_n(c3Piu), exc_dcs));
|
||||
eInteraction->add(new eT2_ElExc_n_Analytic(T2Population, rngUni, Janev_eT2_ElExc_n(e3Sigpu), exc_dcs));
|
||||
eInteraction->add(new eT2_ElExc_n_Analytic(T2Population, rngUni, Janev_eT2_ElExc_n(d3Piu), exc_dcs));
|
||||
}
|
||||
|
||||
void Interaction_Builder::build_e_el_exp(Interaction_Base* eInteraction, UniRNG *rngUni, Population_Base *T2Population, DCS_Base *exc_dcs) {
|
||||
eInteraction->add(new Exp_Excitation_Base(T2Population, rngUni, 8.48, exc_dcs, "el_exc_b3sigpu.dat"));
|
||||
eInteraction->add(new Exp_Excitation_Base(T2Population, rngUni, 11.18, exc_dcs, "el_exc_B1sigpu.dat"));
|
||||
eInteraction->add(new Exp_Excitation_Base(T2Population, rngUni, 11.76, exc_dcs, "el_exc_c3piu.dat"));
|
||||
eInteraction->add(new Exp_Excitation_Base(T2Population, rngUni, 11.79, exc_dcs, "el_exc_a3sigpg.dat"));
|
||||
eInteraction->add(new Exp_Excitation_Base(T2Population, rngUni, 12.29, exc_dcs, "el_exc_C1piu.dat"));
|
||||
eInteraction->add(new Exp_Excitation_Base(T2Population, rngUni, 12.3, exc_dcs, "el_exc_EF1sigpg.dat"));
|
||||
eInteraction->add(new Exp_Excitation_Base(T2Population, rngUni, 13.23, exc_dcs, "el_exc_e3sigpu.dat"));
|
||||
}
|
||||
|
||||
|
||||
Interaction_Base* Interaction_Builder::build_tritium(Population_Manager *Populations, UniRNG *rngUni) {
|
||||
Interaction_Base *T_Interaction = new Interaction_Base(tritium, rngUni);
|
||||
return T_Interaction;
|
||||
}
|
||||
|
||||
Interaction_Base* Interaction_Builder::build_tritiumI(Population_Manager *Populations, UniRNG *rngUni) {
|
||||
Interaction_Base *TI_Interaction = new Interaction_Base(tritiumI, rngUni);
|
||||
Population_Base *T2Population = Populations->find(tritium2);
|
||||
|
||||
//TI_Interaction->add(new TT2_Elastic(T2Population, rngUni));
|
||||
|
||||
return(TI_Interaction);
|
||||
TI_Interaction->add(new TIT2_Elastic(T2Population, rngUni));
|
||||
TI_Interaction->add (new TIT2_RadAsc(T2Population, rngUni));
|
||||
TI_Interaction->add (new TIT2_TerAsc(T2Population, rngUni));
|
||||
return TI_Interaction;
|
||||
}
|
||||
|
||||
Interaction_Base* Interaction_Builder::build_tritium2I(Population_Manager *Populations, UniRNG *rngUni) {
|
||||
Interaction_Base *TI2_Interaction = new Interaction_Base(tritium2I, rngUni);
|
||||
return(TI2_Interaction);
|
||||
Interaction_Base *T2I_Interaction = new Interaction_Base(tritium2I, rngUni);
|
||||
Population_Base *T2Population = Populations->find(tritium2);
|
||||
Population_Base *ePopulation = Populations->find(electron);
|
||||
T2I_Interaction->add(new T2Ie_Recombination(ePopulation, rngUni));
|
||||
//T2I_Interaction->add(new T2Ie_DissExc(ePopulation, rngUni));
|
||||
T2I_Interaction->add(new T2IT2_Cluster(T2Population, rngUni));
|
||||
T2I_Interaction->add(new T2IT2_CX(T2Population, rngUni));
|
||||
return T2I_Interaction ;
|
||||
}
|
||||
|
||||
Interaction_Base* Interaction_Builder::build_tritium3I(Population_Manager *Populations, UniRNG *rngUni) {
|
||||
Interaction_Base *T3I_Interaction = new Interaction_Base(tritium3I, rngUni);
|
||||
Population_Base *T2Population = Populations->find(tritium2);
|
||||
Population_Base *ePopulation = Populations->find(electron);
|
||||
T3I_Interaction->add(new T3IT2_Elastic(T2Population, rngUni));
|
||||
T3I_Interaction->add(new T3IT2_RadAsc(T2Population, rngUni));
|
||||
T3I_Interaction->add(new T3IT2_TerAsc(T2Population, rngUni));
|
||||
T3I_Interaction->add(new T3Ie_Recombination(ePopulation, rngUni));
|
||||
//T3I_Interaction->add(new T3Ie_DissExc(ePopulation, rngUni));
|
||||
return T3I_Interaction ;
|
||||
}
|
||||
|
||||
Interaction_Base* Interaction_Builder::build_tritium5I(Population_Manager *Populations, UniRNG *rngUni) {
|
||||
Interaction_Base *T5I_Interaction = new Interaction_Base(tritium5I, rngUni);
|
||||
Population_Base *T2Population = Populations->find(tritium2);
|
||||
Population_Base *ePopulation = Populations->find(electron);
|
||||
T5I_Interaction->add(new T5IT2_Elastic(T2Population, rngUni));
|
||||
T5I_Interaction->add(new T5Ie_Recombination(ePopulation, rngUni));
|
||||
return T5I_Interaction;
|
||||
}
|
||||
|
||||
@@ -12,22 +12,26 @@
|
||||
#include "interaction_base.h"
|
||||
#include "manager_base.h"
|
||||
|
||||
#include "exc_base.h"
|
||||
#include "population_builder.hpp"
|
||||
|
||||
typedef Manager_Base<Interaction_Base> Interaction_Manager;
|
||||
|
||||
class Interaction_Builder {
|
||||
static const int eT2ionization;
|
||||
static const int eT2elastic;
|
||||
|
||||
class Interaction_Builder {
|
||||
public:
|
||||
Interaction_Builder() {};
|
||||
|
||||
static Interaction_Manager build(Population_Manager *Populations, UniRNG *rngUni);
|
||||
private:
|
||||
static Interaction_Base* build_electron(Population_Manager *Populations, UniRNG *rngUni);
|
||||
static void build_e_el_janev(Interaction_Base* eInteraction, UniRNG *rngUni, Population_Base *T2Population, DCS_Base *exc_dcs);
|
||||
static void build_e_el_exp(Interaction_Base* eInteraction, UniRNG *rngUni, Population_Base *T2Population, DCS_Base *exc_dcs);
|
||||
|
||||
static Interaction_Base* build_tritium(Population_Manager *Populations, UniRNG *rngUni);
|
||||
static Interaction_Base* build_tritiumI(Population_Manager *Populations, UniRNG *rngUni);
|
||||
static Interaction_Base* build_tritium2I(Population_Manager *Populations, UniRNG *rngUni);
|
||||
static Interaction_Base* build_tritium3I(Population_Manager *Populations, UniRNG *rngUni);
|
||||
static Interaction_Base* build_tritium5I(Population_Manager *Populations, UniRNG *rngUni);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// janev_T2IT2_cid.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 12.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef janev_T2IT2_cid_h
|
||||
#define janev_T2IT2_cid_h
|
||||
|
||||
#include <cmath>
|
||||
// Janev:2003aa "From Collision processes in low-temperature hydrogen plasmas" 7.1.3.A p.73 formular (209)
|
||||
|
||||
|
||||
class Janev_T2IT2_CID {
|
||||
public:
|
||||
Janev_T2IT2_CID() {}
|
||||
static double get_TCS(const double &E_eV) {
|
||||
double sig_small = 4.05e-20*pow(E_eV, -0.653)*exp(3.15*pow(E_eV-2,-1.65));
|
||||
|
||||
double numerator = 0.139e-20 * pow(E_eV,0.318)*exp(-680*pow(E_eV,-2.10));
|
||||
double denominator = 1 + 2.75e-12*pow(E_eV, 2.65) + 9.04e-23*pow(E_eV, 4.65);
|
||||
double sig_big = numerator/denominator;
|
||||
return sig_small + sig_big;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* janev_T2IT2_cid_h */
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// janev_T2T2+_cluster.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 12.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef janev_T2T2__cluster_h
|
||||
#define janev_T2T2__cluster_h
|
||||
|
||||
#include <cmath>
|
||||
// Janev:2003aa "From Collision processes in low-temperature hydrogen plasmas" 7.1.3.A p.73 formular (213)
|
||||
|
||||
class Janev_T2IT2_Cluster {
|
||||
public:
|
||||
Janev_T2IT2_Cluster() {}
|
||||
static double get_TCS(const double &E_eV) {
|
||||
double numerator = 17.76e-20;
|
||||
double denominator = pow(E_eV, 0.477) * (1 + 0.0291*pow(E_eV, 3.61) + 1.53e-5*pow(E_eV, 6.55));
|
||||
return numerator/denominator;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* janev_T2T2__cluster_h */
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// janev_T2IT2_cx.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 12.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef janev_T2IT2_cx_h
|
||||
#define janev_T2IT2_cx_h
|
||||
|
||||
#include <cmath>
|
||||
// Janev:2003aa "From Collision processes in low-temperature hydrogen plasmas" 7.1.3.A p.73 formular (207)
|
||||
|
||||
|
||||
class Janev_T2IT2_CX {
|
||||
public:
|
||||
Janev_T2IT2_CX() {}
|
||||
static double get_TCS(const double &E_eV) {
|
||||
double sig_small_1 = 6.59e-20*pow(E_eV, -0.5)/(1+2.29*pow(E_eV,1.78));
|
||||
|
||||
double numerator1 = 12.85e-20*exp(-1.84*pow(E_eV,-1.55));
|
||||
double denominator1 = pow(E_eV, 0.0673) * (1+ 2.6e-3*pow(E_eV,0.97) + 1.63e-10*pow(E_eV,2.76));
|
||||
double sig_small_2 = numerator1/denominator1;
|
||||
|
||||
double numerator2 = 11.38e-20*exp(-61.8*pow(E_eV, 0.54));
|
||||
double denominator2 = 1+ 8.21e-10*pow(E_eV, 2.08) + 3.8e-26*pow(E_eV, 5.15);
|
||||
double sig_big = numerator2/denominator2;
|
||||
return sig_small_1 + sig_small_2 + sig_big;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif /* janev_T2IT2_cx_h */
|
||||
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// janev_eT2I_disexc.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 30.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef janev_eT2I_disexc_h
|
||||
#define janev_eT2I_disexc_h
|
||||
|
||||
|
||||
#include <cmath>
|
||||
// Janev:2003aa "From Collision processes in low-temperature hydrogen plasmas" 7.1.3.A p.70 formular (180)
|
||||
|
||||
class Janev_eT2I_DissExc {
|
||||
|
||||
public:
|
||||
Janev_eT2I_DissExc() {}
|
||||
static double get_TCS(const double &E_eV) {
|
||||
if (E_eV < get_deltaE_eV()) {
|
||||
return 0;
|
||||
} else {
|
||||
return 13.2e-20*log(exp(1) + 2.55*1e-4*E_eV)*pow(E_eV,-0.31)/(1+0.017*pow(E_eV,0.76));
|
||||
}
|
||||
}
|
||||
static double get_deltaE_eV() {
|
||||
return 15.2;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* janev_eT2I_disexc_h */
|
||||
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// janev_eT2I_ionization.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 10.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef janev_eT2I_ionization_h
|
||||
#define janev_eT2I_ionization_h
|
||||
|
||||
#include <cmath>
|
||||
// Janev:2003aa "From Collision processes in low-temperature hydrogen plasmas" 7.1.3.A p.73 formular (195)
|
||||
|
||||
class Janev_eT2_Ionization {
|
||||
|
||||
public:
|
||||
Janev_eT2_Ionization() {}
|
||||
|
||||
static double get_TCS(const double &E_eV) {
|
||||
if (E_eV < get_deltaE_eV()) {
|
||||
return 0;
|
||||
} else {
|
||||
double expconst = exp(-0.105*pow(E_eV/15.2-1,1.55))
|
||||
return 7.39/E_eV*log(0.18*E_eV) * (1-expconst) * 1e-20;
|
||||
}
|
||||
}
|
||||
static double get_deltaE_eV() {return 15.2;}
|
||||
};
|
||||
|
||||
|
||||
#endif /* janev_eT2I_ionization_h */
|
||||
@@ -12,15 +12,15 @@
|
||||
#include <cmath>
|
||||
// Janev:2003aa "From Collision processes in low-temperature hydrogen plasmas" 7.1.3.A p.73 formular (185)
|
||||
|
||||
class Janev_eT2_Recombination {
|
||||
class Janev_eT2I_Recombination {
|
||||
|
||||
public:
|
||||
Janev_eT2_Recombination() {}
|
||||
Janev_eT2I_Recombination() {}
|
||||
|
||||
static double get_TCS(const double &E_eV) {
|
||||
double const1 = pow( pow(E_eV,0.665) * ( 1 + 1.1*pow(E_eV,0.512) + 0.011*pow(E_eV,3.10) ) , - 1);
|
||||
double const1 = pow( pow(E_eV,0.665) * (1 + 1.1*pow(E_eV,0.512) + 0.011*pow(E_eV,3.10)) , -1);
|
||||
double const2 = 0.133 * exp(-0.35*pow(E_eV-6.05,2));
|
||||
return (17.3e-20 * (const1+const2) );
|
||||
return 17.3e-20 * (const1+const2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
//
|
||||
// janev_eT2_elexc.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 01.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef janev_eT2_elexc_h
|
||||
#define janev_eT2_elexc_h
|
||||
|
||||
|
||||
#include "error_types.h"
|
||||
|
||||
// See Janev p34. and onwards formulars: (80) (81) (95)
|
||||
|
||||
enum states_Nu {B1Sigmau, Bp1Sigu, Bpp1Sigu, C1Piu, D1Piu, Dp1Piu};
|
||||
|
||||
class Janev_eT2_ElExc_Nu {
|
||||
states_Nu final_state;
|
||||
double deltaE_eV, alpha, A1, A2, A3, A4;
|
||||
public:
|
||||
Janev_eT2_ElExc_Nu(states_Nu final_state) {
|
||||
this->final_state = final_state;
|
||||
set_constants();
|
||||
}
|
||||
|
||||
double get_TCS_m2 (const double &E_eV) {
|
||||
if (E_eV < deltaE_eV) {
|
||||
return 0;
|
||||
}
|
||||
double x = E_eV/deltaE_eV;
|
||||
double fac1 = 5.984/deltaE_eV/x*pow(1-1/x,alpha);
|
||||
double fac2 = (A1 + A2/x + A3/x/x + A4*log(x));
|
||||
return fac1 * fac2 * 1e-20;
|
||||
}
|
||||
|
||||
double get_deltaE_eV () {return deltaE_eV;}
|
||||
|
||||
private:
|
||||
void set_constants() {
|
||||
switch(final_state) {
|
||||
case B1Sigmau:
|
||||
deltaE_eV = 12.754;
|
||||
alpha = 0.550;
|
||||
A1 = 3.651e-2;
|
||||
A2 = -0.8405;
|
||||
A3 = 1.2365;
|
||||
A4 = 2.5236;
|
||||
break;
|
||||
case Bp1Sigu:
|
||||
deltaE_eV = 14.85;
|
||||
alpha = 0.550;
|
||||
A1 = 6.827e-3;
|
||||
A2 = -0.1572;
|
||||
A3 = 0.23122;
|
||||
A4 = 0.47191;
|
||||
break;
|
||||
case Bpp1Sigu:
|
||||
deltaE_eV = 15.47;
|
||||
alpha = 0.550;
|
||||
A1 = 2.446e-3;
|
||||
A2 = -5.631e-2;
|
||||
A3 = 6.2846e-2;
|
||||
A4 = 0.16908;
|
||||
break;
|
||||
case C1Piu:
|
||||
deltaE_eV = 13.29;
|
||||
alpha = 0.552;
|
||||
A1 = 3.653e-2;
|
||||
A2 = -0.8398;
|
||||
A3 = 1.2368;
|
||||
A4 = 2.8740;
|
||||
break;
|
||||
case D1Piu:
|
||||
deltaE_eV = 14.996;
|
||||
alpha = 0.552;
|
||||
A1 = 8.913e-3;
|
||||
A2 = -0.2049;
|
||||
A3 = 0.30178;
|
||||
A4 = 0.70126;
|
||||
break;
|
||||
case Dp1Piu:
|
||||
deltaE_eV = 15.555;
|
||||
alpha = 0.552;
|
||||
A1 = 3.872e-3;
|
||||
A2 = -8.902e-2;
|
||||
A3 = 0.13110;
|
||||
A4 = 0.30464;
|
||||
break;
|
||||
default :
|
||||
std::stringstream ss;
|
||||
ss<<"Janev_eT2_ElExc_Nu:set_constants: finale_state unknown. \n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
enum states_Ng {EF1Sigpg, HHb1Sigpg, GK1Sigpg, I1Pig};
|
||||
|
||||
class Janev_eT2_ElExc_Ng {
|
||||
states_Ng final_state;
|
||||
double deltaE_eV, alpha, A1;
|
||||
public:
|
||||
Janev_eT2_ElExc_Ng(states_Ng final_state) {
|
||||
this->final_state = final_state;
|
||||
set_constants();
|
||||
}
|
||||
|
||||
double get_TCS_m2 (const double &E_eV) {
|
||||
if (E_eV < deltaE_eV) {
|
||||
return 0;
|
||||
}
|
||||
double x = E_eV/deltaE_eV;
|
||||
return 5.984*A1/deltaE_eV/x*pow(1-1/x,alpha) * 1e-20;
|
||||
}
|
||||
|
||||
double get_deltaE_eV () {return deltaE_eV;}
|
||||
private:
|
||||
void set_constants() {
|
||||
switch(final_state) {
|
||||
case EF1Sigpg:
|
||||
deltaE_eV = 13.13;
|
||||
alpha = 2.71;
|
||||
A1 = 0.8322;
|
||||
break;
|
||||
case HHb1Sigpg:
|
||||
deltaE_eV = 14.98;
|
||||
alpha = 2.71;
|
||||
A1 = 2.913e-2;
|
||||
break;
|
||||
case GK1Sigpg:
|
||||
deltaE_eV = 14.816;
|
||||
alpha = 2.75;
|
||||
A1 = 1.43e-2;
|
||||
break;
|
||||
case I1Pig:
|
||||
deltaE_eV = 14.824;
|
||||
alpha = 2.80;
|
||||
A1 = 5.409e-2;
|
||||
break;
|
||||
default :
|
||||
std::stringstream ss;
|
||||
ss<<"Janev_eT2_ElExc_Ng:set_constants: finale_state unknown. \n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
enum states_n {a3Sigpg, b3Sigpu, c3Piu, e3Sigpu, d3Piu};
|
||||
|
||||
class Janev_eT2_ElExc_n {
|
||||
states_n final_state;
|
||||
double deltaE_eV, beta, gamma, A;
|
||||
public:
|
||||
Janev_eT2_ElExc_n(states_n final_state) {
|
||||
this->final_state = final_state;
|
||||
set_constants();
|
||||
}
|
||||
|
||||
double get_TCS_m2 (const double &E_eV) {
|
||||
if (E_eV < deltaE_eV) {
|
||||
return 0;
|
||||
}
|
||||
double x = E_eV/deltaE_eV;
|
||||
return A*pow(x,-3)*pow(1-pow(x,-beta),gamma) * 1e-20;
|
||||
}
|
||||
|
||||
double get_deltaE_eV () {return deltaE_eV;}
|
||||
private:
|
||||
void set_constants() {
|
||||
switch(final_state) {
|
||||
case a3Sigpg:
|
||||
deltaE_eV = 11.72;
|
||||
beta = 4.5;
|
||||
gamma = 1.55;
|
||||
A = 0.544;
|
||||
break;
|
||||
case b3Sigpu:
|
||||
deltaE_eV = 7.93;
|
||||
beta = 2.33;
|
||||
gamma = 3.78;
|
||||
A = 11.16;
|
||||
break;
|
||||
case c3Piu:
|
||||
deltaE_eV = 11.72;
|
||||
beta = 5.5;
|
||||
gamma = 1.65;
|
||||
A = 1.43;
|
||||
break;
|
||||
case e3Sigpu :
|
||||
deltaE_eV = 13.0;
|
||||
beta = 4.5;
|
||||
gamma = 1.60;
|
||||
A = 0.190;
|
||||
break;
|
||||
case d3Piu:
|
||||
deltaE_eV = 13.6;
|
||||
beta = 5.5;
|
||||
gamma = 1.75;
|
||||
A = 0.375;
|
||||
break;
|
||||
default : //Optional
|
||||
std::stringstream ss;
|
||||
ss<<"Janev_eT2_ElExc_n:set_constants: finale_state unknown. \n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
}
|
||||
};
|
||||
#endif /* janev_eT2_elexc_h */
|
||||
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// janev_eT2_ionization.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 02.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef janev_eT2_ionization_h
|
||||
#define janev_eT2_ionization_h
|
||||
|
||||
|
||||
class Janev_eT2_Ionization_ndiss {
|
||||
constexpr static const double deltaE_eV = 15.42;
|
||||
|
||||
public:
|
||||
Janev_eT2_Ionization_ndiss() {}
|
||||
|
||||
static double get_TCS_m2(const double &E_eV) {
|
||||
if (E_eV<deltaE_eV) {
|
||||
return 0;
|
||||
} else {
|
||||
double x = E_eV/deltaE_eV;
|
||||
double C0 = 2.05*deltaE_eV;
|
||||
return 1.828/x*pow(1-pow(x,-0.92),2.19)*log(C0*x)*1e-20;
|
||||
}
|
||||
}
|
||||
|
||||
static double get_deltaE_eV() {return deltaE_eV;}
|
||||
};
|
||||
|
||||
|
||||
class Janev_eT2_Ionization_diss_g {
|
||||
constexpr static const double deltaE_eV = 18.15;
|
||||
public:
|
||||
Janev_eT2_Ionization_diss_g() {}
|
||||
|
||||
static double get_TCS_m2(const double &E_eV) {
|
||||
if (E_eV<deltaE_eV) {
|
||||
return 0;
|
||||
} else {
|
||||
double x = E_eV/deltaE_eV;
|
||||
return 0.02905*pow(x,-1.25)*pow(1-pow(x,-2.78),1.886)*1e-20;
|
||||
}
|
||||
}
|
||||
|
||||
static double get_deltaE_eV() {return deltaE_eV;}
|
||||
};
|
||||
|
||||
|
||||
class Janev_eT2_Ionization_diss_u {
|
||||
constexpr static const double deltaE_eV = 30.6;
|
||||
public:
|
||||
Janev_eT2_Ionization_diss_u() {}
|
||||
|
||||
static double get_TCS_m2(const double &E_eV) {
|
||||
if (E_eV<deltaE_eV) {
|
||||
return 0;
|
||||
} else {
|
||||
double x = E_eV/deltaE_eV;
|
||||
return 0.5927*pow(x,-1.2)*pow(1-pow(x,-1.22),3.375)*1e-20;
|
||||
}
|
||||
}
|
||||
|
||||
static double get_deltaE_eV() {return deltaE_eV;}
|
||||
};
|
||||
|
||||
|
||||
#endif /* janev_eT2_ionization_h */
|
||||
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// janev_eT2_vibexc0102.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 18.06.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef janev_eT2_vibexc0102_h
|
||||
#define janev_eT2_vibexc0102_h
|
||||
|
||||
#include "error_types.h"
|
||||
|
||||
// See Janev p28 (74)
|
||||
|
||||
class Janev_eT2_VibExc {
|
||||
double deltaE_eV, xi;
|
||||
public:
|
||||
Janev_eT2_VibExc(int finale_state) {
|
||||
if (finale_state == 1) {
|
||||
deltaE_eV = 0.516;
|
||||
xi = 1;
|
||||
} else if (finale_state == 2) {
|
||||
deltaE_eV = 1.003;
|
||||
xi = 0.628;
|
||||
} else {
|
||||
std::stringstream ss;
|
||||
ss<<"Janev_eT2_VibExc: finale_state = "<<finale_state<<" not defined. \n";
|
||||
throw MyException (ss.str());
|
||||
}
|
||||
}
|
||||
|
||||
double get_TCS(const double &E_eV) {
|
||||
if (E_eV<deltaE_eV) {
|
||||
return 0;
|
||||
}
|
||||
double x = E_eV/deltaE_eV;
|
||||
double fac1 = 5.78*xi*pow(deltaE_eV,-4)*pow(x,-2);
|
||||
double fac2 = pow(1-1/x, 6.11*pow(deltaE_eV,-0.5));
|
||||
return fac1*fac2*1e-20;
|
||||
}
|
||||
|
||||
double get_deltaE_eV() {
|
||||
return deltaE_eV;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* janev_eT2_vibexc0102_h */
|
||||
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// janev_eT3I_disexc.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 30.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef janev_eT3I_disexc_h
|
||||
#define janev_eT3I_disexc_h
|
||||
|
||||
#include <cmath>
|
||||
// Janev:2003aa "From Collision processes in low-temperature hydrogen plasmas" 7.1.3.A p.96 formular (228)
|
||||
|
||||
class Janev_eT3I_DissExc {
|
||||
|
||||
public:
|
||||
Janev_eT3I_DissExc() {}
|
||||
static double get_TCS(const double &E_eV) {
|
||||
if (E_eV < get_deltaE_eV()) {
|
||||
return 0;
|
||||
} else {
|
||||
double expc = exp(- 50.32*pow(E_eV, -1.177)/(1+1.019e-14*pow(E_eV, 7.462)));
|
||||
return 82.56e-20*pow(E_eV, -0.521)*(1-pow(15.0/E_eV, 5.15)) * expc;
|
||||
}
|
||||
}
|
||||
static double get_deltaE_eV() {
|
||||
return 14.75;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif /* janev_eT3I_disexc_h */
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// janev_eT3I_recombination.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 12.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef janev_eT3I_recombination_h
|
||||
#define janev_eT3I_recombination_h
|
||||
|
||||
#include <cmath>
|
||||
// Janev:2003aa "From Collision processes in low-temperature hydrogen plasmas" 7.1.3.A p.73 formular (230)
|
||||
|
||||
class Janev_eT3I_Recombination {
|
||||
public:
|
||||
Janev_eT3I_Recombination() {}
|
||||
|
||||
static double get_TCS(const double &E_eV) {
|
||||
double sigLDR = 3e-20*pow(E_eV, -0.725)/(1+4.45*pow(E_eV,1.2));
|
||||
double sig_small = 0.0646e-20 * pow(E_eV, 1.478);
|
||||
double sig_big = 634.22e-20 * pow(E_eV, -2.605);
|
||||
double sigHDR = 1/(1/sig_small + 1/sig_big);
|
||||
return sigLDR + sigHDR;
|
||||
}
|
||||
};
|
||||
#endif /* janev_eT3I_recombination_h */
|
||||
@@ -11,4 +11,5 @@
|
||||
#include "read_system.h"
|
||||
|
||||
|
||||
const double Katrin_Fields::wgtsMagField_T = getParameter("wgtsMagField_T");
|
||||
const double Katrin_Fields::wgtsMagField_T = load_parameter("BFIELD");
|
||||
Vec3_Container Katrin_Fields::e_field(1000, 50, 20, get_data_path() + "e_field.dat");
|
||||
|
||||
@@ -9,22 +9,36 @@
|
||||
#ifndef katrin_fields_hpp
|
||||
#define katrin_fields_hpp
|
||||
|
||||
#include "katrin_geo.hpp"
|
||||
#include "error_types.h"
|
||||
#include "katrin_geo.h"
|
||||
#include "read_system.h"
|
||||
#include "vec3_container.hpp"
|
||||
|
||||
|
||||
class Katrin_Fields {
|
||||
static const double wgtsMagField_T;
|
||||
static Vec3_Container e_field;
|
||||
|
||||
public:
|
||||
Katrin_Fields() {};
|
||||
|
||||
static vec3 getMagField_T(vec3 loc_m) {
|
||||
Katrin_Geo::check_inKatrin(loc_m);
|
||||
return (vec3(0,0,wgtsMagField_T));
|
||||
if (!in_Katrin(loc_m)) {
|
||||
std::stringstream ss;
|
||||
ss<<"Katrin_Fields::getMagField_T: loc_m outside of Katrin.\n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
return vec3(0,0,wgtsMagField_T);
|
||||
}
|
||||
|
||||
static vec3 getElField_Vm(vec3 loc_m) {
|
||||
Katrin_Geo::check_inKatrin(loc_m);
|
||||
return (vec3(0,0,0));
|
||||
if (!in_Katrin(loc_m)) {
|
||||
std::stringstream ss;
|
||||
ss<<"Katrin_Fields::getElField_Vm: loc_m outside of Katrin.\n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
return e_field.get_data (loc_m);
|
||||
//return vec3(0,0,0);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
//
|
||||
// katrin_geo.cpp
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 03.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "katrin_geo.hpp"
|
||||
|
||||
#include "error_types.h"
|
||||
#include "read_system.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
const double Katrin_Geo::rearwallZ_m = getParameter("rearwallZ_m");
|
||||
const double Katrin_Geo::wgtsStartZ_m = getParameter("wgtsStartZ_m");
|
||||
const double Katrin_Geo::wgtsEndZ_m = getParameter("wgtsEndZ_m");
|
||||
const double Katrin_Geo::wgtsRadius_m = getParameter("wgtsRadius_m");
|
||||
|
||||
void Katrin_Geo::check_inWGTS(vec3 loc_m) {
|
||||
if (!inWGTS(loc_m)) {
|
||||
stringstream ss;
|
||||
ss<<"Katrin_Geo::check_inWGTS: Location not within WGTS\n";
|
||||
throw MyException (ss.str());
|
||||
}
|
||||
}
|
||||
|
||||
void Katrin_Geo::check_inKatrin(vec3 loc_m) {
|
||||
if (!inKatrin(loc_m)) {
|
||||
stringstream ss;
|
||||
ss<<"Katrin_Geo::check_inKatrin: Location not within Katrin\n";
|
||||
throw MyException (ss.str());
|
||||
}
|
||||
}
|
||||
|
||||
bool Katrin_Geo::inWGTS(vec3 loc_m) {
|
||||
double z_m = loc_m[2];
|
||||
double r_m = sqrt(loc_m[0]*loc_m[0] + loc_m[1]*loc_m[1]);
|
||||
if (z_m < wgtsStartZ_m) {
|
||||
return (false);
|
||||
} else if (z_m > wgtsEndZ_m) {
|
||||
return (false);
|
||||
} else if (r_m > wgtsRadius_m) {
|
||||
return (false);
|
||||
} else {
|
||||
return (true);
|
||||
}
|
||||
}
|
||||
|
||||
bool Katrin_Geo::inKatrin(vec3 loc_m) {
|
||||
double z_m = loc_m[2];
|
||||
double r_m = sqrt(loc_m[0]*loc_m[0] + loc_m[1]*loc_m[1]);
|
||||
if (z_m < rearwallZ_m) {
|
||||
return (false);
|
||||
} else if (z_m > wgtsEndZ_m) {
|
||||
return (false);
|
||||
} else if (r_m > wgtsRadius_m) {
|
||||
return (false);
|
||||
} else {
|
||||
return (true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// katrin_geo.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 11.07.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef katrin_geo_h
|
||||
#define katrin_geo_h
|
||||
|
||||
#include "constants.h"
|
||||
#include "kinematics.h"
|
||||
|
||||
|
||||
inline bool in_WGTS(vec3 loc_m) {
|
||||
double z_m = loc_m[2];
|
||||
double r_m = sqrt(loc_m[0]*loc_m[0] + loc_m[1]*loc_m[1]);
|
||||
if (z_m < z_WGTS_start_m) {
|
||||
return false;
|
||||
} else if (z_m > z_WGTS_end_m) {
|
||||
return false;
|
||||
} else if (r_m > r_WGTS_m) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
inline bool in_Katrin(vec3 loc_m) {
|
||||
double z_m = loc_m[2];
|
||||
double r_m = sqrt(loc_m[0]*loc_m[0] + loc_m[1]*loc_m[1]);
|
||||
if (z_m < z_RW_m) {
|
||||
return false;
|
||||
} else if (z_m > z_DPS_end_m) {
|
||||
return false;
|
||||
} else if (r_m > r_WGTS_m) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif /* katrin_geo_h */
|
||||
@@ -1,39 +0,0 @@
|
||||
//
|
||||
// katrin_geo.hpp
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 03.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef katrin_geo_hpp
|
||||
#define katrin_geo_hpp
|
||||
|
||||
#include "kinematics.h"
|
||||
|
||||
|
||||
class Katrin_Geo {
|
||||
static const double rearwallZ_m;
|
||||
static const double wgtsStartZ_m;
|
||||
static const double wgtsEndZ_m;
|
||||
static const double wgtsRadius_m;
|
||||
|
||||
public:
|
||||
Katrin_Geo() {};
|
||||
|
||||
static double get_z_RW_m() {return(rearwallZ_m);};
|
||||
static double get_z_WGTSstart_m() {return(wgtsStartZ_m);};
|
||||
static double get_z_WGTSend_m() {return(wgtsEndZ_m);};
|
||||
static double get_radius_m() {return(wgtsRadius_m);};
|
||||
|
||||
static void check_inWGTS(vec3 loc_m);
|
||||
static void check_inKatrin(vec3 loc_m);
|
||||
|
||||
static bool inWGTS(vec3 loc_m);
|
||||
static bool inKatrin(vec3 loc_m);
|
||||
|
||||
static double get_wgtsLength_m() {return (get_z_WGTSend_m() - get_z_WGTSstart_m());};
|
||||
};
|
||||
|
||||
|
||||
#endif /* katrin_geo_hpp */
|
||||
@@ -19,80 +19,107 @@
|
||||
typedef blitz::TinyVector<double,3> vec3;
|
||||
|
||||
|
||||
inline double vec3Abs(const vec3 &vec) {
|
||||
return( sqrt( pow(vec[0],2) + pow(vec[1],2) + pow(vec[2],2)) );
|
||||
inline double calc_vec3_abs(const vec3 &vec) {
|
||||
return sqrt( pow(vec[0],2) + pow(vec[1],2) + pow(vec[2],2));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
inline double calc_gamma_from_beta(const double &beta) {
|
||||
if (beta>=1) {
|
||||
std::stringstream ss;
|
||||
ss<<"calc_gamma_from_beta(): Input beta ="<<beta<<" equal or exeeds 1.";
|
||||
throw MyException(ss.str());
|
||||
} else if (beta<0) {
|
||||
} else if (beta<=0) {
|
||||
std::stringstream ss;
|
||||
ss<<"calc_gamma_from_beta(): Input beta ="<<beta<<" negative.";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
|
||||
return( pow(1 - pow(beta,2),-0.5) ) ;
|
||||
return pow(1 - pow(beta,2),-0.5);
|
||||
}
|
||||
*/
|
||||
|
||||
inline double calc_Ekin_eV_from_speed(const double &speed_ms, const double &mass_eV) {
|
||||
double beta = speed_ms/c_ms;
|
||||
inline double calc_E_eV_from_v_ms(const double &v_ms, const double &m_eV) {
|
||||
/*
|
||||
double beta = v_ms/c_ms;
|
||||
if (beta>=1) {
|
||||
std::stringstream ss;
|
||||
ss<<"calc_Ekin_eV_from_speed(): Input speed v="<<speed_ms<<" m/s equal or exeeds speed of light.";
|
||||
ss<<"calc_E_eV_from_v_ms(): Input speed v="<<v_ms<<" m/s equal or exeeds speed of light.";
|
||||
throw MyException(ss.str());
|
||||
} else if (beta<0) {
|
||||
std::stringstream ss;
|
||||
ss<<"calc_Ekin_eV_from_speed(): Input speed v="<<speed_ms<<" m/s is expected to be absolute value therfore >0.";
|
||||
ss<<"calc_E_eV_from_v_ms(): Input speed v="<<v_ms<<" m/s is expected to be absolute value therfore >0.";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
double gamma = calc_gamma_from_beta(beta);
|
||||
return ( (gamma-1) * mass_eV );
|
||||
if (gamma == 1) {
|
||||
return 0.5*beta*beta*m_eV;
|
||||
} else {
|
||||
return (gamma-1) * m_eV;
|
||||
}
|
||||
*/
|
||||
return 0.5*v_ms/c_ms*v_ms/c_ms*m_eV;
|
||||
}
|
||||
|
||||
inline double calc_Ekin_eV_from_speed(const vec3 &speed_ms, const double &mass_eV) {
|
||||
return (calc_Ekin_eV_from_speed(vec3Abs(speed_ms), mass_eV));
|
||||
inline double calc_E_eV_from_v_ms(const vec3 &v_ms, const double &m_eV) {
|
||||
return calc_E_eV_from_v_ms(calc_vec3_abs(v_ms), m_eV);
|
||||
}
|
||||
|
||||
/*
|
||||
inline double calc_beta_from_gamma(const double &gamma) {
|
||||
|
||||
if (gamma<1) {
|
||||
std::stringstream ss;
|
||||
ss<<"calc_beta_from_gamma(): Input gamma ="<<gamma<<" smaller 1.";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
return( sqrt(1 - pow(gamma,-2)) );
|
||||
return sqrt(1 - pow(gamma,-2));
|
||||
|
||||
}
|
||||
|
||||
inline double calc_gamma_from_Ekin_eV(const double &Ekin_eV, const double &mass_eV) {
|
||||
if (Ekin_eV<0) {
|
||||
inline double calc_gamma_from_E_eV(const double &E_eV, const double &m_eV) {
|
||||
|
||||
if (E_eV<0) {
|
||||
std::stringstream ss;
|
||||
ss<<"calc_gamma_from_Ekin_eV(): Input Ekin_eV ="<<Ekin_eV<<" negative.";
|
||||
ss<<"calc_gamma_from_E_eV(): Input E_eV ="<<E_eV<<" negative.";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
return (1. + Ekin_eV/mass_eV);
|
||||
return 1 + E_eV/m_eV;
|
||||
|
||||
}
|
||||
|
||||
inline double calc_beta_from_Ekin_eV(const double &Ekin_eV, const double &mass_eV) {
|
||||
return ( calc_beta_from_gamma(calc_gamma_from_Ekin_eV(Ekin_eV, mass_eV)) );
|
||||
inline double calc_beta_from_E_eV(const double &E_eV, const double &m_eV) {
|
||||
|
||||
return calc_beta_from_gamma(calc_gamma_from_E_eV(E_eV, m_eV));
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
inline double calc_Speed_from_Ekin_eV(const double &Ekin_eV, const double &mass_eV) {
|
||||
if (Ekin_eV<0) {
|
||||
inline double calc_v_ms_from_E_eV(const double &E_eV, const double &m_eV) {
|
||||
/*
|
||||
if (E_eV<0) {
|
||||
std::stringstream ss;
|
||||
ss<<"calc_Speed_from_Ekin_eV(): Input Ekin_eV ="<<Ekin_eV<<" negative.";
|
||||
ss<<"calc_v_ms_from_E_eV(): Input E_eV ="<<E_eV<<" negative.";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
|
||||
double gamma = calc_gamma_from_Ekin_eV(Ekin_eV, mass_eV);
|
||||
double gamma = calc_gamma_from_E_eV(E_eV, m_eV);
|
||||
double beta = calc_beta_from_gamma(gamma);
|
||||
return(beta * c_ms);
|
||||
if (beta == 0) {
|
||||
return sqrt(2*E_eV/m_eV) * c_ms;
|
||||
} else {
|
||||
return beta*c_ms;
|
||||
}
|
||||
*/
|
||||
return sqrt(2*E_eV/m_eV) * c_ms;
|
||||
}
|
||||
|
||||
inline vec3 calc_newDirection(const vec3 &direction_old, const double &theta_change, const double &phi_change) {
|
||||
inline vec3 calc_n_new(const vec3 &direction_old, const double &theta_change, const double &phi_change) {
|
||||
// Alireza Haghighat: Appendix 3 (p.249)
|
||||
vec3 nOld = direction_old/vec3Abs(direction_old);
|
||||
vec3 nOld = direction_old/calc_vec3_abs(direction_old);
|
||||
double u = nOld[0];
|
||||
double v = nOld[1];
|
||||
double w = nOld[2];
|
||||
@@ -107,22 +134,22 @@ inline vec3 calc_newDirection(const vec3 &direction_old, const double &theta_cha
|
||||
vNew = sin(theta_change)*sin(phi_change);
|
||||
wNew = cos(theta_change);
|
||||
}
|
||||
return(vec3(uNew, vNew, wNew));
|
||||
return vec3(uNew, vNew, wNew);
|
||||
}
|
||||
|
||||
inline double get_z_m(const vec3 &loc_m) {
|
||||
return (loc_m[2]);
|
||||
inline double calc_z_m(const vec3 &loc_m) {
|
||||
return loc_m[2];
|
||||
}
|
||||
|
||||
inline double get_r_m(const vec3 &loc_m) {
|
||||
return (sqrt(loc_m[0]*loc_m[0] + loc_m[1]*loc_m[1]));
|
||||
inline double calc_r_m(const vec3 &loc_m) {
|
||||
return sqrt(loc_m[0]*loc_m[0] + loc_m[1]*loc_m[1]);
|
||||
}
|
||||
|
||||
inline double get_phi(const vec3 &loc_m) {
|
||||
inline double calc_phi(const vec3 &loc_m) {
|
||||
if (loc_m[1] >= 0) {
|
||||
return ( acos(loc_m[0]/get_r_m(loc_m)) );
|
||||
return acos(loc_m[0]/calc_r_m(loc_m));
|
||||
} else {
|
||||
return ( 2*pi - acos(loc_m[0]/get_r_m(loc_m)) );
|
||||
return 2*pi - acos(loc_m[0]/calc_r_m(loc_m));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,101 +12,31 @@
|
||||
#include "particle.hpp"
|
||||
#include "error_types.h"
|
||||
#include "kinematics.h"
|
||||
#include "error_types.h"
|
||||
|
||||
// See http://www.lnl.infn.it/~pisolo/alberto/Kinematics.pdf
|
||||
|
||||
// Calculate direction after scattering of first particle non relativisticaly. And angles ~ in CM frame
|
||||
class Elastic_Kinematic_Base {
|
||||
double m1_eV, m2_eV;
|
||||
double sign;
|
||||
double const1, const2;
|
||||
double m1, m2;
|
||||
|
||||
public:
|
||||
Elastic_Kinematic_Base() {};
|
||||
Elastic_Kinematic_Base(const double &m1_eV, const double &m2_eV);
|
||||
Elastic_Kinematic_Base(const double &m1, const double &m2);
|
||||
|
||||
void doKinematics (Particle* P1, const vec3 &v2_lab_ms, const double &theta_lab, const double &phi_lab);
|
||||
vec3 get_v1_new (const vec3 &v1, const vec3 &v2, const double &theta, const double &phi);
|
||||
};
|
||||
|
||||
inline Elastic_Kinematic_Base::Elastic_Kinematic_Base(const double &m1_eV, const double &m2_eV) {
|
||||
this->m1_eV = m1_eV;
|
||||
this->m2_eV = m2_eV;
|
||||
sign = (m1_eV < m2_eV) ? 1 : -1;
|
||||
const1 = m1_eV*m1_eV/pow(m1_eV + m2_eV,2);
|
||||
const2 = pow(m2_eV/m1_eV,2);
|
||||
inline Elastic_Kinematic_Base::Elastic_Kinematic_Base(const double &m1, const double &m2) {
|
||||
this->m1 = m1;
|
||||
this->m2 = m2;
|
||||
}
|
||||
|
||||
inline void Elastic_Kinematic_Base::doKinematics (Particle* P1, const vec3 &v2_lab_ms, const double &theta_lab, const double &phi_lab) {
|
||||
vec3 v1_ms = P1->get_Speed_ms() - v2_lab_ms;
|
||||
inline vec3 Elastic_Kinematic_Base::get_v1_new (const vec3 &v1, const vec3 &v2, const double &theta, const double &phi) {
|
||||
vec3 v_cm = (v1*m1 + v2*m2)/(m1+m2);
|
||||
vec3 v1_cm = v1 - v_cm;
|
||||
|
||||
double E0_eV = calc_Ekin_eV_from_speed(v1_ms, m1_eV);
|
||||
double inner_sqrt = pow( const2 - pow(sin(theta_lab),2) , 0.5 );
|
||||
double E1_eV = E0_eV * const1 * pow(cos(theta_lab) + sign*inner_sqrt , 2);
|
||||
|
||||
double v1Abs_new_ms = calc_Speed_from_Ekin_eV(E1_eV, m1_eV);
|
||||
vec3 n0 = calc_newDirection(v1_ms, theta_lab, phi_lab);
|
||||
vec3 v1_new_ms = n0 * v1Abs_new_ms + v2_lab_ms;
|
||||
P1->set_Speed_ms(v1_new_ms);
|
||||
}
|
||||
|
||||
|
||||
class Inelastic_Kinematic_Base {
|
||||
double Q_eV;
|
||||
double m1_eV, m2_eV;
|
||||
|
||||
double a, b, c, d;
|
||||
|
||||
public:
|
||||
Inelastic_Kinematic_Base();
|
||||
Inelastic_Kinematic_Base(const double &Q_eV, const double &m1_eV, const double &m2_eV);
|
||||
|
||||
void doKinematics (Particle* P1, const vec3 &v2_lab_ms, const double &theta_lab, const double &phi_lab);
|
||||
|
||||
private:
|
||||
double ET_eV(const double &E1_eV) {return (E1_eV + Q_eV);}
|
||||
double A (const double &E1_eV) {return (a*E1_eV/(E1_eV-Q_eV));}
|
||||
double B (const double &E1_eV) {return (b*E1_eV/(E1_eV-Q_eV));}
|
||||
double temp_cd(const double &E1_eV) {return (1 + m1_eV*Q_eV/m2_eV/(E1_eV-Q_eV));}
|
||||
double C (const double &E1_eV) {return (c*temp_cd(E1_eV));}
|
||||
double D (const double &E1_eV) {return (d*temp_cd(E1_eV));}
|
||||
};
|
||||
|
||||
inline Inelastic_Kinematic_Base::Inelastic_Kinematic_Base(const double &Q_eV, const double &m1_eV, const double &m2_eV) {
|
||||
this->Q_eV = Q_eV;
|
||||
if (Q_eV<=0) {
|
||||
std::stringstream ss;
|
||||
ss<<"Inelastic_Kinematics_Base: Q_eV<=0.\n";
|
||||
throw MyException (ss.str());
|
||||
}
|
||||
|
||||
this->m1_eV = m1_eV;
|
||||
this->m2_eV = m2_eV;
|
||||
if (m1_eV > m2_eV) {
|
||||
std::stringstream ss;
|
||||
ss<<"Inelastic_Kinematics_Base: m1_eV > m2_eV.\n";
|
||||
throw MyException (ss.str());
|
||||
}
|
||||
double c1 = pow(m1_eV+m2_eV,2);
|
||||
a = m1_eV*m2_eV/c1;
|
||||
b = m1_eV*m1_eV/c1;
|
||||
c = a;
|
||||
d = m2_eV*m2_eV/c1;
|
||||
};
|
||||
|
||||
|
||||
inline void Inelastic_Kinematic_Base::doKinematics (Particle* P1, const vec3 &v2_lab_ms, const double &theta_lab, const double &phi_lab) {
|
||||
vec3 v1_ms = P1->get_Speed_ms() - v2_lab_ms;
|
||||
|
||||
double E1_eV = calc_Ekin_eV_from_speed(v1_ms, m1_eV);
|
||||
double ET_eV = this->ET_eV(E1_eV);
|
||||
double B = this->B(E1_eV);
|
||||
double D = this->D(E1_eV);
|
||||
double sign = B>D ? -1 : 1;
|
||||
double inner_sqrt = pow( (D/B - pow(sin(theta_lab),2) ) , 0.5 );
|
||||
double E1_new_eV = ET_eV * B * pow( cos(theta_lab) +sign * inner_sqrt, 2);
|
||||
double v1Abs_new_ms = calc_Speed_from_Ekin_eV(E1_new_eV, m1_eV);
|
||||
vec3 n0 = calc_newDirection(v1_ms, theta_lab, phi_lab);
|
||||
vec3 v1_new_ms = n0 * v1Abs_new_ms + v2_lab_ms;
|
||||
P1->set_Speed_ms(v1_new_ms);
|
||||
vec3 n1 = calc_n_new(v1_cm, theta, phi);
|
||||
vec3 v1_new = n1 * calc_vec3_abs(v1_cm) + v_cm;
|
||||
return v1_new;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// energetic_base.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 11.06.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef energetic_base_h
|
||||
#define energetic_base_h
|
||||
|
||||
|
||||
#include "katrin_geo.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "population_container.hpp"
|
||||
|
||||
#include "population_base.h"
|
||||
|
||||
class Kinetic_Population : public Population_Base, private RNG_Base {
|
||||
Population_Container container;
|
||||
Timer *timer;
|
||||
|
||||
double m_eV;
|
||||
|
||||
public:
|
||||
Kinetic_Population(species this_species, Timer *timer, UniRNG *rngUni, NormalRNG *rngNormal, int num_z_bins, int num_r_bins, int num_phi_bins, int num_E_bins);
|
||||
|
||||
void increase_density (const Particle &upPart, const vec3 &oldLoc_m);
|
||||
|
||||
double get_density_m3(const vec3 &loc_m);
|
||||
Content get_density_m3(const int &E_bin, const Bins &loc_bins);
|
||||
Sum_bounds get_sumation_bounds(const vec3 &loc_m);
|
||||
|
||||
virtual vec3 roll_v_ms (const vec3 &loc_m);
|
||||
|
||||
virtual Population_Container *access_container();
|
||||
};
|
||||
|
||||
|
||||
inline Kinetic_Population::Kinetic_Population(species this_species, Timer *timer, UniRNG *rngUni, NormalRNG *rngNormal, int num_z_bins, int num_r_bins, int num_phi_bins, int num_E_bins) : Population_Base(this_species), RNG_Base(rngUni, rngNormal), container(num_z_bins, num_r_bins, num_phi_bins, num_E_bins) {
|
||||
this->timer = timer;
|
||||
m_eV = get_species_mass(this_species);
|
||||
};
|
||||
|
||||
inline void Kinetic_Population::increase_density (const Particle &upPart, const vec3 &oldLoc_m) {
|
||||
container.increase_cum_time_s(oldLoc_m, upPart.get_x_m(), calc_vec3_abs(upPart.get_v_ms()), upPart.get_E_eV());
|
||||
}
|
||||
|
||||
inline double Kinetic_Population::get_density_m3(const vec3 &loc_m) {
|
||||
std::stringstream ss;
|
||||
ss<<"Kinetic_Population::get_density_m3: method for non kinetic populations.\n";
|
||||
throw MyException(ss.str());
|
||||
return container.get_density_m3(loc_m, 0, timer->get_time_s());
|
||||
}
|
||||
|
||||
inline Content Kinetic_Population::get_density_m3(const int &E_bin, const Bins &loc_bins) {
|
||||
return container.get_density_m3(E_bin, loc_bins, timer->get_time_s());
|
||||
}
|
||||
|
||||
inline Sum_bounds Kinetic_Population::get_sumation_bounds(const vec3 &loc_m) {
|
||||
return container.get_sumation_bounds(loc_m);
|
||||
}
|
||||
|
||||
inline vec3 Kinetic_Population::roll_v_ms (const vec3 &loc_m) {
|
||||
Sum_bounds bounds = container.get_sumation_bounds(loc_m);
|
||||
double target = 0;
|
||||
for (int E_bin = 0; E_bin<bounds.num_E_bins; E_bin++) {
|
||||
target += get_density_m3(E_bin, bounds.loc_bins).n_m3;
|
||||
}
|
||||
target *= rngUni->random();
|
||||
double current = 0;
|
||||
for (int E_bin = 0; E_bin<bounds.num_E_bins; E_bin++) {
|
||||
current += get_density_m3(E_bin, bounds.loc_bins).n_m3;
|
||||
if (current >= target) {
|
||||
return container.roll_E_eV_in_bin(E_bin, rngUni);
|
||||
}
|
||||
}
|
||||
std::stringstream ss;
|
||||
ss<<"Kinetic_Population::roll_v_ms: Overflow.\n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
|
||||
inline Population_Container *Kinetic_Population::access_container() {
|
||||
return &container;
|
||||
}
|
||||
|
||||
#endif /* energetic_base_h */
|
||||
+18
-16
@@ -22,13 +22,13 @@ class Lin_Scale : public Scale {
|
||||
double delta_x;
|
||||
int number_bins;
|
||||
public:
|
||||
Lin_Scale() {};
|
||||
Lin_Scale() {number_bins=0;};
|
||||
Lin_Scale(const double &min_x, const double &max_x, const int &number_bins);
|
||||
~Lin_Scale() {};
|
||||
Scale *clone() {return new Lin_Scale(*this);}
|
||||
|
||||
double get_lower_scale_end();
|
||||
double get_upper_scale_end();
|
||||
double get_delta();
|
||||
int get_number_bins();
|
||||
|
||||
int calc_index(const double &x);
|
||||
@@ -53,51 +53,53 @@ inline Lin_Scale::Lin_Scale(const double &min_x, const double &max_x, const int
|
||||
}
|
||||
|
||||
inline double Lin_Scale::get_lower_scale_end() {
|
||||
return(min_x);
|
||||
return min_x;
|
||||
}
|
||||
inline double Lin_Scale::get_upper_scale_end() {
|
||||
return(max_x);
|
||||
return max_x;
|
||||
}
|
||||
inline double Lin_Scale::get_delta() {
|
||||
return delta_x;
|
||||
}
|
||||
|
||||
inline int Lin_Scale::get_number_bins() {
|
||||
return(number_bins);
|
||||
return number_bins;
|
||||
}
|
||||
|
||||
inline int Lin_Scale::calc_index(const double &x) {
|
||||
if (x <= min_x) {
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
if (x >= max_x) {
|
||||
return (number_bins-1);
|
||||
return number_bins-1;
|
||||
}
|
||||
return (std::ceil((x-min_x)/delta_x) - 1);
|
||||
return std::ceil((x-min_x)/delta_x) - 1;
|
||||
}
|
||||
|
||||
inline double Lin_Scale::get_lower_bin_bound(const int &index) {
|
||||
return (min_x + double(index) * delta_x);
|
||||
return min_x + double(index) * delta_x;
|
||||
}
|
||||
|
||||
inline double Lin_Scale::get_bin_mid(const int &index) {
|
||||
return (min_x + double(index+0.5) * delta_x);
|
||||
return min_x + double(index+0.5) * delta_x;
|
||||
}
|
||||
|
||||
inline double Lin_Scale::get_upper_bin_bound(const int &index) {
|
||||
return (min_x + double(index + 1) * delta_x);
|
||||
return min_x + double(index + 1) * delta_x;
|
||||
}
|
||||
|
||||
inline bool Lin_Scale::is_valid_index (const int &index) {
|
||||
if (index < 0 || index > (number_bins-1) ) {
|
||||
return (false);
|
||||
return false;
|
||||
} else {
|
||||
return (true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
inline bool operator==(const Lin_Scale &scale1, const Lin_Scale &scale2) {
|
||||
return (scale1.min_x== scale2.min_x &&
|
||||
return scale1.min_x== scale2.min_x &&
|
||||
scale1.max_x== scale2.max_x &&
|
||||
scale1.delta_x== scale2.delta_x &&
|
||||
scale1.number_bins== scale2.number_bins);
|
||||
scale1.number_bins== scale2.number_bins;
|
||||
}
|
||||
|
||||
#endif /* lin_scale_h */
|
||||
|
||||
@@ -19,7 +19,6 @@ public:
|
||||
lin_scale = Lin_Scale(std::log10(min_x), std::log10(max_x), number_bins);
|
||||
};
|
||||
~Log_Scale() {};
|
||||
Scale *clone() {return new Log_Scale(*this);}
|
||||
|
||||
double get_lower_scale_end();
|
||||
double get_upper_scale_end();
|
||||
@@ -37,43 +36,43 @@ public:
|
||||
|
||||
inline double Log_Scale::get_lower_scale_end() {
|
||||
double min_x = pow(10,lin_scale.get_lower_scale_end());
|
||||
return(min_x);
|
||||
return min_x;
|
||||
}
|
||||
inline double Log_Scale::get_upper_scale_end() {
|
||||
double max_x = pow(10,lin_scale.get_upper_scale_end());
|
||||
return(max_x);
|
||||
return max_x;
|
||||
}
|
||||
|
||||
inline int Log_Scale::get_number_bins() {
|
||||
return(lin_scale.get_number_bins());
|
||||
return lin_scale.get_number_bins();
|
||||
}
|
||||
|
||||
inline int Log_Scale::calc_index(const double &x) {
|
||||
double p = std::log10(x);
|
||||
return (lin_scale.calc_index(p));
|
||||
return lin_scale.calc_index(p);
|
||||
}
|
||||
|
||||
inline double Log_Scale::get_lower_bin_bound(const int &index) {
|
||||
double p = lin_scale.get_lower_bin_bound(index);
|
||||
return (pow(10,p));
|
||||
return pow(10,p);
|
||||
}
|
||||
|
||||
inline double Log_Scale::get_bin_mid(const int &index) {
|
||||
double p = lin_scale.get_bin_mid(index);
|
||||
return (pow(10,p));
|
||||
return pow(10,p);
|
||||
}
|
||||
|
||||
inline double Log_Scale::get_upper_bin_bound(const int &index) {
|
||||
double p = lin_scale.get_upper_bin_bound(index);
|
||||
return (pow(10,p));
|
||||
return pow(10,p);
|
||||
}
|
||||
|
||||
inline bool Log_Scale::is_valid_index (const int &index) {
|
||||
return (lin_scale.is_valid_index(index));
|
||||
return lin_scale.is_valid_index(index);
|
||||
}
|
||||
|
||||
inline bool operator==(const Log_Scale &scale1, const Log_Scale &scale2) {
|
||||
return (scale1.lin_scale == scale2.lin_scale);
|
||||
return scale1.lin_scale == scale2.lin_scale;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,34 +12,57 @@
|
||||
#include "sf_particle_logger.h"
|
||||
#include "off_particle_logger.h"
|
||||
|
||||
#include "population_logger_base.h"
|
||||
|
||||
const int Particle_Logger_Builder::numberZBins = load_parameter("LOG_BARS");
|
||||
|
||||
Particle_Logger_Manager Particle_Logger_Builder::build(H5_File *h5f) {
|
||||
Particle_Logger_Manager ParticleLogger;
|
||||
H5_Particles *h5part = h5f->get_h5part();
|
||||
|
||||
ParticleLogger.add(build_eLogger(h5part));
|
||||
ParticleLogger.add(new Off_Particle_Logger(tritiumI));
|
||||
ParticleLogger.add(new Off_Particle_Logger(tritium2I));
|
||||
return (ParticleLogger);
|
||||
}
|
||||
|
||||
Particle_Logger_Base *Particle_Logger_Builder::build_eLogger(H5_Particles *h5part) {
|
||||
Particle_Logger_Base *res;
|
||||
if (h5part->get_logging() == false) {
|
||||
res = new Off_Particle_Logger(electron);
|
||||
} else if(h5part->get_numberZBins() == -1){
|
||||
res = new SF_Particle_Logger(electron, h5part->get_h5g_z());
|
||||
} else {
|
||||
res = new MuliZ_Particle_Logger(electron, h5part->get_numberZBins(), h5part->get_zValues(), h5part->get_h5g_z());
|
||||
}
|
||||
return (res);
|
||||
}
|
||||
|
||||
Population_Logger_Manager Population_Logger_Builder::build(H5_File *h5f, Population_Manager *populations) {
|
||||
Population_Logger_Manager Population_Logger;
|
||||
H5_Populations *h5pop = h5f->get_h5pop();
|
||||
Thermal_Base *T2I_population = static_cast<Thermal_Base*>(populations->find(tritium2I));
|
||||
ParticleLogger.add(new Off_Particle_Logger(tritium));
|
||||
|
||||
Population_Logger.add(new Thermal_Population_Logger(T2I_population, h5pop->get_h5g_pop()));
|
||||
return (Population_Logger);
|
||||
if (numberZBins == 0) {
|
||||
ParticleLogger.add(new Off_Particle_Logger(electron));
|
||||
ParticleLogger.add(new Off_Particle_Logger(tritiumI));
|
||||
ParticleLogger.add(new Off_Particle_Logger(tritium2I));
|
||||
ParticleLogger.add(new Off_Particle_Logger(tritium3I));
|
||||
ParticleLogger.add(new Off_Particle_Logger(tritium5I));
|
||||
} else if(numberZBins == -1){
|
||||
ParticleLogger.add(new SF_Particle_Logger(electron, h5f));
|
||||
ParticleLogger.add(new SF_Particle_Logger(tritiumI, h5f));
|
||||
ParticleLogger.add(new SF_Particle_Logger(tritium2I, h5f));
|
||||
ParticleLogger.add(new SF_Particle_Logger(tritium3I, h5f));
|
||||
ParticleLogger.add(new SF_Particle_Logger(tritium5I, h5f));
|
||||
} else {
|
||||
build_MultiZ(&ParticleLogger, h5f);
|
||||
}
|
||||
return ParticleLogger;
|
||||
}
|
||||
void Particle_Logger_Builder::build_MultiZ(Particle_Logger_Manager *ParticleLogger, H5_File *h5f) {
|
||||
double *zValues = new double[numberZBins];
|
||||
double start_m = z_RW_m;
|
||||
double length_m = z_WGTS_end_m - start_m;
|
||||
double stepLength_m = length_m/(numberZBins-1);
|
||||
|
||||
double z_m;
|
||||
for (int i = 0;i<numberZBins;i++) {
|
||||
z_m = start_m + stepLength_m*i;
|
||||
zValues[i] = z_m;
|
||||
}
|
||||
ParticleLogger->add(new MultiZ_Particle_Logger(electron, h5f, numberZBins, zValues));
|
||||
ParticleLogger->add(new MultiZ_Particle_Logger(tritiumI, h5f, numberZBins, zValues));
|
||||
ParticleLogger->add(new MultiZ_Particle_Logger(tritium2I, h5f, numberZBins, zValues));
|
||||
ParticleLogger->add(new MultiZ_Particle_Logger(tritium3I, h5f, numberZBins, zValues));
|
||||
ParticleLogger->add(new MultiZ_Particle_Logger(tritium5I, h5f, numberZBins, zValues));
|
||||
|
||||
delete[] zValues;
|
||||
}
|
||||
|
||||
Population_Logger_Manager Population_Logger_Builder::build(H5_File *h5f, Population_Manager *populations, Timer *timer) {
|
||||
Population_Logger_Manager Population_Loggers;
|
||||
Population_Loggers.add (new Population_Logger(populations->find(electron), timer, h5f));
|
||||
Population_Loggers.add (new Population_Logger(populations->find(tritiumI), timer, h5f));
|
||||
Population_Loggers.add (new Population_Logger(populations->find(tritium2I), timer, h5f));
|
||||
Population_Loggers.add (new Population_Logger(populations->find(tritium3I), timer, h5f));
|
||||
Population_Loggers.add (new Population_Logger(populations->find(tritium5I), timer, h5f));
|
||||
return Population_Loggers;
|
||||
}
|
||||
|
||||
@@ -15,29 +15,26 @@
|
||||
#include "particle_logger_base.h"
|
||||
|
||||
#include "population_builder.hpp"
|
||||
#include "thermal_population_logger.h"
|
||||
#include "population_logger_base.h"
|
||||
|
||||
typedef Manager_Base<Particle_Logger_Base> Particle_Logger_Manager;
|
||||
|
||||
class Particle_Logger_Builder {
|
||||
|
||||
class Particle_Logger_Builder {
|
||||
static const int numberZBins;
|
||||
|
||||
public:
|
||||
Particle_Logger_Builder() {};
|
||||
|
||||
static Particle_Logger_Manager build(H5_File *h5f);
|
||||
private:
|
||||
static Particle_Logger_Base *build_eLogger(H5_Particles *h5part);
|
||||
static void build_MultiZ(Particle_Logger_Manager *ParticleLogger, H5_File *h5f);
|
||||
};
|
||||
|
||||
|
||||
class Population_Logger_Builder {
|
||||
|
||||
public:
|
||||
Population_Logger_Builder() {};
|
||||
|
||||
static Population_Logger_Manager build(H5_File *h5f, Population_Manager *populations);
|
||||
//private:
|
||||
//static Population_Logger_Manager *build_Logger(H5_Particles *h5part);
|
||||
static Population_Logger_Manager build(H5_File *h5f, Population_Manager *populations, Timer *timer);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -7,13 +7,34 @@
|
||||
//
|
||||
|
||||
#include "simulation.hpp"
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
int main(int argc, const char * argv[]) {
|
||||
|
||||
clock_t start = clock();
|
||||
int main(int argc, char *argv[]) {
|
||||
MPI_Init(&argc, &argv);
|
||||
|
||||
int size, rank;
|
||||
MPI_Comm_size(MPI_COMM_WORLD,&size);
|
||||
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
|
||||
if (rank==0) {
|
||||
cout<<"Number CPUs: "<<size<<"\n"<<endl;
|
||||
}
|
||||
|
||||
/*
|
||||
std::cout << "Process " << getpid() << " is " << rank
|
||||
<< " of " << size << " processes" << std::endl;
|
||||
if (rank == 0) sleep(600);
|
||||
*/
|
||||
|
||||
Simulation Sim;
|
||||
|
||||
int start_time = MPI_Wtime();
|
||||
Sim.doit();
|
||||
cout<<"Duration: "<< ( clock() - start ) / (double) CLOCKS_PER_SEC <<'\n';
|
||||
if (rank == 0) {
|
||||
cout<<"Total Time: "<<MPI_Wtime()-start_time<<" s\n";
|
||||
}
|
||||
MPI_Finalize();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user