29 #define DIEL_GAMMA_NEGATIVE 1 31 #include <rl_DielectricLayer.h> 36 #include <mathconst/mathconst.h> 49 if ( name_ ) {
delete [] name_; }
85 }
catch ( std::exception& bad_alloc ) {
87 char msg[] =
"rl_DielectricLayer(layername): " 88 "unable to allocate space for the layer name";
119 name_ =
new char[strlen(other.name_)+1];
120 strcpy( name_, other.name_ );
128 }
catch ( std::exception& bad_alloc ) {
130 char msg[] =
"rl_DielectricLayer copy constructor: " 131 "unable to allocate space for the layer name";
141 std::size_t ndielpts,
142 double layer_thickness,
147 char const* layer_name,
158 std::size_t ndielpts,
159 double layer_thickness,
164 char const* layer_name,
167 diel_info_.
init( diel, ndielpts, interp_mode, bulkdensity );
182 }
catch ( std::exception& bad_alloc ) {
184 char msg[256] =
"rl_DielectricLayer::init(...): " 185 "unable to allocate space for layer name";
190 thickness_ = layer_thickness;
206 char const format[] =
"rl_DielectricPODArray::init(...): " 207 "Invalid roughness type was %d\n";
208 sprintf( msg, format, rtype_ );
222 lambda_ = 12.39854 / energy;
226 phase_factor_ = 2.0 * M_PI * srough_ / lambda_;
233 int rc = diel_info_.
alpha_gamma( energy, alpha_, gamma_ );
253 double const difab = sinphi * sinphi - alpha_;
254 double const sumab = sqrt( difab * difab + gamma_ * gamma_ );
260 double const a = sqrt( (sumab + difab) / 2.0 );
261 double const tmp = (sumab - difab) / 2.0;
262 double const b = (tmp >= 0.0) ? sqrt( tmp ) : sqrt( -tmp );
265 #ifdef DIEL_GAMMA_GENERAL 266 kt_perp_ =
complex( a, ((gamma_ > 0.0) ? 1.0 : -1.0) * b );
268 #ifdef DIEL_GAMMA_NEGATIVE 271 #ifdef DIEL_GAMMA_POSITIVE 276 #if defined(DEBUG_DIELECTRICLAYER) 277 fprintf(stdout,
"\nDEBUG: ___SETUP_FOR___ %s ---------------------\n",
279 fprintf(stdout,
"kt_perp_ (%.15e %.15e)\n",
282 fprintf(stdout,
"alpha_ gamma_ (%.15e %.15e)\n",
284 fprintf(stdout,
"energy, sinphi (%.15e %.15e)\n",
286 fprintf(stdout,
"difab sumab tmp (%.15e %.15e %.15e)\n",
288 fprintf(stdout,
"a, b (%.15e %.15e)\n",
300 zcoat_ = 4.0 * M_PI * thickness_ / lambda_;
303 prop_ = exp(
complex( -b * zcoat_, -a * zcoat_ ) );
304 #if defined(DEBUG_DIELECTRICLAYER) 305 fprintf(stdout,
"zcoat_ %.15e\n",
307 fprintf(stdout,
"prop_ (r,i) (%.15e %.15e)\n",
308 prop_.real(), prop_.imag() );
322 double alpha_jm1 = upper.alpha_;
323 double gamma_jm1 = upper.gamma_;
324 double alpha_j = alpha_;
325 double gamma_j = gamma_;
327 complex upper_delta_eps( -alpha_jm1, -gamma_jm1 );
328 complex delta_eps( -alpha_j, -gamma_j );
330 complex eps_upper( upper_delta_eps + 1.0 );
331 complex eps( delta_eps + 1.0 );
333 complex num_perp = upper.kt_perp_ - kt_perp_;
334 complex denom_perp = upper.kt_perp_ + kt_perp_;
336 rflcoef_.
perp() = num_perp / denom_perp;
338 #if defined(DEBUG_DIELECTRICLAYER) 339 fprintf(stdout,
"\nDEBUG: ___REFLECT_AMP___ ___AAA0___ --------\n");
340 fprintf(stdout,
"upper, this layer (%s %s)\n",
342 fprintf(stdout,
"alpha, gamma (j-1): (%.15e, %.15e)\n",
343 alpha_jm1, gamma_jm1);
344 fprintf(stdout,
"alpha, gamma (j): (%.15e, %.15e)\n",
346 fprintf(stdout,
"rflcoef (perp) (%.15e %.15e)\n",
347 rflcoef_.
perp().real(),
348 rflcoef_.
perp().imag() );
349 fprintf(stdout,
"num_perp (%.15e %.15e)\n",
352 fprintf(stdout,
"denom_perp (%.15e %.15e)\n",
355 fprintf(stdout,
"upper.kt_perp_ (%.15e %.15e)\n",
356 upper.kt_perp_.real(),
357 upper.kt_perp_.imag() );
358 fprintf(stdout,
"kt_perp_ %.15e %.15e)\n",
363 complex num_para = delta_eps * upper.kt_perp_;
364 num_para -= upper_delta_eps * kt_perp_;
365 num_para += num_perp;
367 complex denom_para = delta_eps * upper.kt_perp_;
368 denom_para += upper_delta_eps * kt_perp_;
369 denom_para += denom_perp;
371 rflcoef_.
para() = num_para / denom_para;
373 double eps_epsupper_r = alpha_jm1 * alpha_j - gamma_jm1 * gamma_j;
374 eps_epsupper_r -= alpha_jm1 + alpha_j;
375 eps_epsupper_r += 1.0;
377 double eps_epsupper_i = alpha_jm1 * gamma_j + gamma_jm1 * alpha_j;
378 eps_epsupper_i -= gamma_jm1 + gamma_j;
380 eps_epsupper_ =
complex( eps_epsupper_r, eps_epsupper_i );
382 #if defined(DEBUG_DIELECTRICLAYER) 383 fprintf(stdout,
"eps_epsupper (r,i): (%.15e, %.15e)\n",
384 eps_epsupper_r, eps_epsupper_i);
385 fprintf(stdout,
"num_para (%.15e %.15e)\n",
388 fprintf(stdout,
"denom_perp (%.15e %.15e)\n",
391 fprintf(stdout,
"rflcoef (para) (%.15e %.15e)\n",
392 rflcoef_.
para().real(),
393 rflcoef_.
para().imag() );
398 t_ij_.
perp() = 2.0 * upper.kt_perp_ / denom_perp;
399 t_ji_.
perp() = 2.0 * kt_perp_ / denom_perp;
401 t_ij_.
para() = 2.0 * ( eps * upper.kt_perp_ ) / denom_para;
402 t_ji_.
para() = 2.0 * ( eps_upper * kt_perp_ ) / denom_para;
404 tij_tji_perp_ = t_ij_.
perp() * t_ji_.
perp();
405 tij_tji_para_ = t_ij_.
para() * t_ji_.
para();
407 r_perp_ = rflcoef_.
perp();
408 r_para_ = rflcoef_.
para();
409 r2_perp_ = rflcoef_.
perp() * rflcoef_.
perp();
410 r2_para_ = rflcoef_.
para() * rflcoef_.
para();
411 r2_tij_tji_perp_ = r2_perp_ + tij_tji_perp_;
412 r2_tij_tji_para_ = r2_para_ + tij_tji_para_;
414 #if defined(DEBUG_DIELECTRICLAYER) 415 fprintf(stdout,
"t_ij_ (para) (%.15e %.15e)\n",
417 t_ij_.
para().imag() );
418 fprintf(stdout,
"t_ji_ (para) (%.15e %.15e)\n",
420 t_ji_.
para().imag() );
421 fprintf(stdout,
"t_ij_ (perp) (%.15e %.15e)\n",
423 t_ij_.
perp().imag() );
424 fprintf(stdout,
"t_ji_ (perp) (%.15e %.15e)\n",
426 t_ji_.
perp().imag() );
427 fprintf(stdout,
"tij_tji_perp_ (%.15e %.15e)\n",
428 tij_tji_perp_.real(),
429 tij_tji_perp_.imag() );
430 fprintf(stdout,
"tij_tji_para_ (%.15e %.15e)\n",
431 tij_tji_para_.real(),
432 tij_tji_para_.imag() );
433 fprintf(stdout,
"r_perp_ (%.15e %.15e)\n",
436 fprintf(stdout,
"r_para_ (%.15e %.15e)\n",
439 fprintf(stdout,
"r2_perp_ (%.15e %.15e)\n",
442 fprintf(stdout,
"r2_para_ (%.15e %.15e)\n",
445 fprintf(stdout,
"r2_tij_tji_perp_ (%.15e %.15e)\n",
446 r2_tij_tji_perp_.real(),
447 r2_tij_tji_perp_.imag() );
448 fprintf(stdout,
"r2_tij_tji_para_ (%.15e %.15e)\n",
449 r2_tij_tji_para_.real(),
450 r2_tij_tji_para_.imag() );
459 apply_DebyeWaller_RSAO_factor( upper, sinphi );
464 apply_DebyeWaller_CSAO_factor( upper, sinphi );
469 apply_DebyeWaller_Spiller_factor( sinphi );
474 apply_NevotCroce_factor( upper, sinphi );
479 apply_ModifiedDW_factor( upper, sinphi );
489 cerr <<
"Invalid roughness type in rl_DielectricLayer::reflect_amp" 491 cerr <<
"Roughness type was " << rtype_ << endl;
522 #if defined(DEBUG_DIELECTRICLAYER) 523 fprintf(stdout,
"\nDEBUG: ___REFLECT_NLAYER___ ___AAA0___ -----\n");
524 fprintf(stdout,
"\n==> layer %5d -- ", num-1);
525 fprintf(stdout,
"layer[n-1] (%5d %.s)\n",
526 num-1, layer[num-1].name_);
527 fprintf(stdout,
"rl_DielectricLayer::reflect_nlayer ");
528 fprintf(stdout,
"======================\n");
529 fprintf(stdout,
"eps (para) %5d (%.15e %.15e)\n",
530 num-1, eps_para.real(), eps_para.imag());
531 fprintf(stdout,
"eps (perp) %5d (%.15e %.15e)\n",
532 num-1, eps_perp.real(), eps_perp.imag());
535 for (
int n = num-2; n >= 0; --n )
538 eps_para = (layer[n].rflcoef_.
para()
539 + layer[n].r2_tij_tji_para_ * prop_eps_para)
540 / (one + layer[n].rflcoef_.
para() * prop_eps_para);
543 eps_perp = (layer[n].rflcoef_.
perp()
544 + layer[n].r2_tij_tji_perp_ * prop_eps_perp)
545 / (one + layer[n].rflcoef_.
perp() * prop_eps_perp);
547 #if defined(DEBUG_DIELECTRICLAYER) 548 fprintf(stdout,
"\nDEBUG: ___REFLECT_NLAYER___ ___AAA1___ -----\n");
549 fprintf(stdout,
"\n==> layer %5d -- ", n);
550 fprintf(stdout,
"rl_DielectricLayer::reflect_nlayer ");
551 fprintf(stdout,
"======================\n");
553 fprintf(stdout,
"rflcoef (para) %5d, (%.15e %.15e)\n",
554 n, layer[n].rflcoef_.
para().real(),
555 layer[n].rflcoef_.
para().imag() );
557 fprintf(stdout,
"rflcoef (perp) %5d, (%.15e %.15e)\n",
558 n, layer[n].rflcoef_.
perp().real(),
559 layer[n].rflcoef_.
perp().imag() );
561 fprintf(stdout,
"r2_tt (para) %5d, (%.15e %.15e)\n",
562 n, layer[n].r2_tij_tji_para_.real(),
563 layer[n].r2_tij_tji_para_.imag() );
565 fprintf(stdout,
"r2_tt (perp) %5d, (%.15e %.15e)\n",
566 n, layer[n].r2_tij_tji_perp_.real(),
567 layer[n].r2_tij_tji_perp_.imag() );
569 fprintf(stdout,
"eps (para) %5d, (%.15e %.15e)\n",
570 n, eps_para.real(), eps_para.imag());
571 fprintf(stdout,
"eps (perp) %5d, (%.15e %.15e)\n",
572 n, eps_perp.real(), eps_perp.imag());
575 layer[0].rflcoef_.
para() = eps_para;
576 layer[0].rflcoef_.
perp() = eps_perp;
578 #if defined(DEBUG_DIELECTRICLAYER) 579 fprintf(stdout,
"\n");
598 void rl_DielectricLayer::
603 double phase_factor = -2 * phase_factor_ * phase_factor_;
604 double sinphi_sq = sinphi * sinphi;
606 complex sinterm_0( sinphi_sq - upper.alpha_, -upper.gamma_ );
607 sinterm_0 /=
complex( 1.0 - upper.alpha_, -upper.gamma_ );
610 ckphase *= phase_factor;
611 ckphase = exp(ckphase);
613 rflcoef_.
para() *= ckphase;
614 rflcoef_.
perp() *= ckphase;
625 void rl_DielectricLayer::
630 double phase_factor = -2.0 * phase_factor_ * phase_factor_;
631 double sinphi_sq = sinphi * sinphi;
633 complex sinterm_0( sinphi_sq - upper.alpha_, -upper.gamma_ );
634 sinterm_0 /=
complex( 1.0 - upper.alpha_, -upper.gamma_ );
637 ckphase *= phase_factor;
638 double real_phase_factor = ckphase.real();
639 real_phase_factor = exp( real_phase_factor );
641 rflcoef_.
para() *= real_phase_factor;
642 rflcoef_.
perp() *= real_phase_factor;
654 void rl_DielectricLayer::
655 apply_DebyeWaller_Spiller_factor(
double sinphi
658 double phase_factor = phase_factor_;
660 phase_factor *= sinphi;
661 phase_factor *= phase_factor;
664 complex ckphase( phase_factor * (alpha_ - 1.0),
665 phase_factor * gamma_ );
667 complex cexp_factor = exp(ckphase);
669 rflcoef_.
para() *= cexp_factor;
670 rflcoef_.
perp() *= cexp_factor;
677 void rl_DielectricLayer::
682 double phase_factor = phase_factor_;
683 double sinphi_sq = sinphi * sinphi;
685 #if defined(DEBUG_DIELECTRICLAYER) 686 fprintf(stdout,
"\nDEBUG: ___MDW___ ---------------------------\n");
687 cerr <<
"===================================================================" 689 cerr <<
"Layer j-1:" << endl;
691 cerr <<
"-------------------------------------------------------------------" 693 cerr <<
"Layer j:" << endl;
695 cerr <<
"-------------------------------------------------------------------" 699 phase_factor *= -2.0 * phase_factor;
701 #if defined(DEBUG_DIELECTRICLAYER) 702 cerr <<
"sinphi: " << sinphi << endl;
703 cerr <<
"phi: " << 60.0 * asin(sinphi) / M_DEG2RAD << endl;
704 cerr <<
"-2 (2pi sigma/lambda)^2: " << phase_factor << endl;
707 complex sinterm_0( sinphi_sq - upper.alpha_, -upper.gamma_ );
708 complex nopt0 = sqrt(
complex( 1.0 - upper.alpha_, -upper.gamma_ ));
709 complex cos2_0 = sqrt( sinterm_0 ) / nopt0;
711 #if defined(DEBUG_DIELECTRICLAYER) 712 cerr <<
"cos_{j-1}: " << cos2_0 << endl;
715 complex sinterm_1( sinphi_sq - alpha_, -gamma_ );
717 complex cos2_1 = sqrt( sinterm_1 ) / nopt1;
719 #if defined(DEBUG_DIELECTRICLAYER) 720 complex cosij = cos2_0 * cos2_1;
721 complex cosj = cos2_0 * nopt0 / nopt1;
724 cerr <<
"cos_{j}: " << cos2_1 << endl;
725 cerr <<
"cos_{j-1} n_{j-1} / n_{j} " << cos2_0 * nopt0 / nopt1 << endl;
726 cerr <<
"n_{j-1} sin_{j-1} " << sin2_0 * nopt0 << endl;
727 cerr <<
"n_{j} sin_{j} " << sin2_1 * nopt1 << endl;
728 cerr <<
"cos_{j} cos_{j-1} " << cosij << endl;
732 cexp_factor *= cos2_1;
733 cexp_factor *= phase_factor;
734 cexp_factor = exp( cexp_factor );
736 rflcoef_.
para() *= cexp_factor;
737 rflcoef_.
perp() *= cexp_factor;
739 #if defined(DEBUG_DIELECTRICLAYER) 740 cerr <<
"===================================================================" 758 void rl_DielectricLayer::
763 double phase_factor = phase_factor_;
764 double sinphi_sq = sinphi * sinphi;
766 phase_factor *= phase_factor;
767 phase_factor *= -2.0;
769 complex sinterm_0( sinphi_sq - upper.alpha_, -upper.gamma_ );
770 complex sinterm_1( sinphi_sq - alpha_, -gamma_ );
773 ckphase *= sinterm_1;
774 ckphase = sqrt( ckphase );
775 ckphase *= phase_factor;
776 ckphase = exp(ckphase);
778 rflcoef_.
para() *= ckphase;
779 rflcoef_.
perp() *= ckphase;
787 dump_on( std::ostream& os,
char const pre[],
char const pst[] )
const 792 os <<
"Layer: " << name_ << endl;
793 os.setf( ios::scientific, ios::floatfield );
796 os <<
"minimum energy (keV): " << diel_info_.
energy_min() << endl;
797 os <<
"maximum energy (keV): " << diel_info_.
energy_max() << endl;
800 os <<
"thickness (Angstrom): " << thickness_ << endl;
803 os <<
"reflection coefficient: " << rflcoef_ << endl;
805 os <<
"alpha: " << alpha_ << endl;
806 os <<
"gamma: " << gamma_ << endl;
807 os <<
"refractive index: " 808 << sqrt(
complex( 1.0 - alpha_, -gamma_ )) << endl;
811 os <<
"roughness type: " << rtype_ << endl;
812 os <<
"sigma_rough: " << srough_ << endl;
813 os <<
"wavelength: " << lambda_ << endl;
814 os <<
"zcoat: " << zcoat_ << endl;
815 os <<
"propagator: " << prop_ << endl;
816 os <<
"kt_perp_: " << kt_perp_ << endl;
818 os <<
"is_vacuum: " <<
is_vacuum() << endl;
819 os <<
"is_substrate: " << is_substrate_ << endl;
832 cdump_on( std::FILE* of,
char const pre[],
char const pst[] )
const 835 { fprintf(of,
"%s", pre); }
837 fprintf(of,
"Layer: %s\n", name_);
839 fprintf(of,
"minimum energy (keV): %.15e\n", diel_info_.
energy_min());
840 fprintf(of,
"maximum energy (keV): %.15e\n", diel_info_.
energy_max());
841 fprintf(of,
"bulk density scale: %.15e\n",
844 fprintf(of,
"thickness (Angstrom): %.15e\n", thickness_);
849 fprintf( of,
"alpha: %.15e\n", alpha_);
850 fprintf( of,
"gamma: %.15e\n", gamma_);
853 fprintf(of,
"refractive index: (%.15e, %.15e)\n",
854 srt.real(), srt.imag());
858 fprintf(of,
"roughness type: %d\n", rtype_);
859 fprintf(of,
"sigma_rough: %.15e\n", srough_);
860 fprintf(of,
"wavelength: %.15e\n", lambda_);
861 fprintf(of,
"zcoat: %.15e\n", zcoat_);
862 fprintf(of,
"propagator: (%.15e, %.15e)\n",
863 prop_.real(), prop_.imag());
864 fprintf(of,
"kt_perp_: (%.15e, %.15e)\n",
865 kt_perp_.real(), kt_perp_.imag());
867 fprintf(of,
"is_vacuum: %d\n",
is_vacuum());
868 fprintf(of,
"is_substrate: %d\n", is_substrate_);
871 { fprintf(of,
"%s", pst); }
877 char const pre[],
char const pst[] )
const 880 { fprintf(of,
"%s", pre); }
882 fprintf(of,
"Layer: %s\n", name_);
887 fprintf(of,
"minimum energy (keV): %.14e\n", diel_info_.
energy_min());
888 fprintf(of,
"maximum energy (keV): %.14e\n", diel_info_.
energy_max());
889 fprintf(of,
"bulk density scale: %.14e\n",
892 fprintf(of,
"thickness (Angstrom): %.14e\n", thickness_);
893 fprintf( of,
"alpha: %.14e\n", alpha_);
894 fprintf( of,
"gamma: %.14e\n", gamma_);
897 fprintf(of,
"refractive index: (%.14e, %.14e)\n",
898 srt.real(), srt.imag());
902 fprintf(of,
"roughness type: %d\n", rtype_);
903 fprintf(of,
"sigma_rough: %.14e\n", srough_);
904 fprintf(of,
"wavelength: %.14e\n", lambda_);
905 fprintf(of,
"zcoat: %.14e\n", zcoat_);
906 fprintf(of,
"propagator: (%.14e, %.14e)\n",
907 prop_.real(), prop_.imag());
908 fprintf(of,
"kt_perp_: (%.14e, %.14e)\n",
909 kt_perp_.real(), kt_perp_.imag());
912 fprintf(of,
"Tji_perp: (%.14e, %.14e)\n",
913 t_ji_.
perp().real(), t_ji_.
perp().imag());
914 fprintf(of,
"Tij_perp: (%.14e, %.14e)\n",
915 t_ij_.
perp().real(), t_ij_.
perp().imag());
916 fprintf(of,
"Rij_perp: (%.14e, %.14e)\n",
917 rflcoef_.
perp().real(), rflcoef_.
perp().imag());
918 fprintf(of,
"Rij^2 (perp): (%.14e, %.14e)\n",
919 r2_perp_.real(), r2_perp_.imag());
920 fprintf(of,
"Tij Tji (perp): (%.14e, %.14e)\n",
921 tij_tji_perp_.real(), tij_tji_perp_.imag());
922 double tprpi = (fabs(identperp.imag()) >= 1e-15)
923 ? identperp.imag() : 0.0;
924 fprintf(of,
"Tij_perp-Rij_perp: (%.14e, %.14e)\n",
925 identperp.real(), tprpi);
926 fprintf(of,
"Rij^2+Tij Tji (perp): (%.14e, %.14e)\n",
927 r2_tij_tji_perp_.real(), r2_tij_tji_perp_.imag());
930 fprintf(of,
"Tji_para: (%.14e, %.14e)\n",
931 t_ji_.
para().real(), t_ji_.
para().imag());
932 fprintf(of,
"Tij_para: (%.14e, %.14e)\n",
933 t_ij_.
para().real(), t_ij_.
para().imag());
934 fprintf(of,
"Rij_para: (%.14e, %.14e)\n",
935 rflcoef_.
para().real(), rflcoef_.
para().imag());
936 fprintf(of,
"Rij^2 (para): (%.14e, %.14e)\n",
937 r2_para_.real(), r2_para_.imag());
938 fprintf(of,
"Tij Tji (para): (%.14e, %.14e)\n",
939 tij_tji_para_.real(), tij_tji_para_.imag());
940 fprintf(of,
"Tij_para-Rij_para: (%.14e, %.14e)\n",
941 identpara.real(), identpara.imag());
942 fprintf(of,
"Rij^2+Tij Tji (para): (%.14e, %.14e)\n",
943 r2_tij_tji_para_.real(), r2_tij_tji_para_.imag());
946 fprintf(of,
"is_vacuum: %d\n",
is_vacuum());
947 fprintf(of,
"is_substrate: %d\n", is_substrate_);
950 { fprintf(of,
"%s", pst); }
ERoughType roughness_type() const
Returns the roughness type of the upper surface of this layer.
void init(rl_Traits::rl_DielectricPOD const *diel, std::size_t ndielpts, double layer_thickness, double roughness, rl_Traits::ERoughType roughness_type, rl_Traits::EInterpMode interp_mode, double bulkdensity, char const *layer_name, rl_Traits::Bool is_substrate=rl_Traits::False)
Initializer.
void init(rl_Traits::rl_DielectricPOD const *diel, size_t num_pts, rl_Traits::EInterpMode interp_mode, double bulk_density=1.0)
Initialization function.
std::complex< double > complex
Typedef for the complex type.
int setup_for(double energy, double sinphi)
Set up layer state for given energy and graze angle.
rl_Traits::complex para() const
Modified Debye-Waller factor.
double bulk_density_factor() const
Return the maximum energy covered by this dataset.
The exception thrown by the rl_RayLib and rl_RaySupLib libraries.
void reflect_nlayer(rl_DielectricLayer layer[], int num)
Compute reflectivity for a stack of num layers.
rl_Traits::Bool is_substrate() const
int alpha_gamma(double energy, double &alpha, double &gamma)
Evaluate the dielectric decrements, alpha and gamma, at the given energy.
void cdump_on(std::FILE *of, char const pre[]="", char const pst[]="") const
Dumps layer information to a C-style FILE* stream.
std::ostream & dump_on(std::ostream &os, char const pre[]="", char const pst[]="") const
Dumps layer information to a stream.
rl_Traits::complex complex
complex type
rl_DielectricLayer(char const layer_name[]=0)
Constructor.
rl_Traits::complex perp() const
void cprint_constraints_on(std::FILE *of, char const pre[]="", char const pst[]="") const
Dumps layer information and constraints to a C-style FILE* stream.
double energy_min() const
Return the minimum energy covered by this dataset.
char const * layer_name() const
rl_Traits::Bool is_vacuum() const
EInterpMode
Enumeration specifying the interpolation of the optical constants.
~rl_DielectricLayer()
Destructor.
ERoughType
Enumeration specifying the type of interlayer diffusion treatment.
complex const & propagator() const
The propagator for this layer.
rl_Traits is a `‘traits’' class for the rl_RayLib library.
double energy_max() const
Return the maximum energy covered by this dataset.
void reflect_amp(rl_DielectricLayer const &layer, double sinphi)
Compute reflection amplitude for the interface between this layer and the layer immediately above it.
rl_Traits::complex para() const
rl_Traits::complex perp() const
void cprint_on(std::FILE *of, char const pre[]="", char const pst[]="") const
Print reflectivity information to output FILE* stream.
A class encapsulating the multilayer reflection of a ray.
Bool
Typedef for the Boolean type.
double roughness() const
Returns the roughness parameter of the upper surface of this layer.