1#ifndef VIENNASHE_MODELS_LINESHAPE_HPP
2#define VIENNASHE_MODELS_LINESHAPE_HPP
47 template <
typename TrapTypeTag,
typename DirectionTypeTag >
52 lineshape_classic(
double cA,
double cB,
double qA,
double qB,
double Et,
double epsT2s,
double T)
53 : cA_(cA), cB_(cB), qA_(qA), qB_(qB), Et_(Et), epsT2s_(epsT2s), T_(T) { }
61 double cA_, cB_, qA_, qB_, Et_, epsT2s_, T_;
64 double operator()(
double E, lsf_electron_trap_tag, lsf_reverse_tag)
const {
double ETc = Et_ + epsT2s_;
return this->calcLS(cB_, cA_, qA_ - qB_, E-ETc); }
66 double operator()(
double E, lsf_hole_trap_tag, lsf_forward_tag)
const {
double ETc = Et_ - epsT2s_;
return this->calcLS(cA_, cB_, qB_ - qA_, E-ETc); }
67 double operator()(
double E, lsf_hole_trap_tag, lsf_reverse_tag)
const {
double ETc = Et_ - epsT2s_;
return this->calcLS(cB_, cA_, qA_ - qB_, ETc-E); }
69 double calcLS(
double ci,
double cf,
double qs,
double Es)
const
74 double nominator1, nominator2, denominator, q1, q2;
78 q1 = (Es/ci + qs*qs) / (2.*qs);
79 return std::sqrt(ci*beta/pi)/2.0 * std::exp(-beta*(ci*q1*q1)) / std::fabs(ci*qs);
83 nominator2 = std::sqrt(ci*cf*qs*qs + (ci-cf)*Es);
90 q1 = (nominator1 + nominator2)/denominator;
91 q2 = (nominator1 - nominator2)/denominator;
93 if (std::fabs(q1) < std::fabs(q2))
94 return std::sqrt(ci*beta/pi)/2.0 * std::exp(-beta*(ci*q1*q1)) / std::fabs(ci*q1 + cf*(qs-q1));
96 return std::sqrt(ci*beta/pi)/2.0 * std::exp(-beta*(ci*q2*q2)) / std::fabs(ci*q2 + cf*(qs-q2));
Defines a set of checker functors for micro-tests within ViennaSHE.
double operator()(double E) const
void set_temperature(double T)
lineshape_classic(double cA, double cB, double qA, double qB, double Et, double epsT2s, double T)
Contains forward declarations and definition of small classes that must be defined at an early stage.
Provides a number of fundamental math constants.
Contains exceptions for viennashe::models.
bool is_NaN(const ValueType &val)
Checks if a value of type ValueType is NaN using value != value.
The main ViennaSHE namespace. All functionality resides inside this namespace.
Provides a number of fundamental constants. All constants in SI units.
static const double pi
Pi.
static const double kB
Boltzmann constant.