28 #include <rl_Multilayer.h> 33 #include <mathconst/mathconst.h> 35 #include <rl_DielectricData.h> 36 #include <rl_DielectricLayer.h> 37 #include <rl_ReflectionCoefPOD.h> 48 if ( own_data_ && layer_ ) {
delete [] layer_; }
53 rl_Multilayer(
int num_layers,
56 : num_layers_(num_layers),
128 cerr <<
"Problem setting up layer " << (rc-1) << endl;
140 double polarization_factor
157 {
return layer_[layer_no]; }
166 char const pst[] )
const 183 char const pst[] )
const 186 { fprintf(of,
"%s", pre); }
191 { fprintf(of,
"%s", pst); }
int num_layers_
number of multilayers
int setup_for(double energy, double sinphi)
Set up layer state for given energy and graze angle.
std::ostream & dump_on(std::ostream &os, int layer_no, char const pre[]="", char const pst[]="") const
Dump information about layer layer_no to stream os.
void cdump_on(std::FILE *of, int layer_no, char const pre[]="", char const pst[]="") const
Dump information about layer layer_no to output FILE*.
rl_Traits::Bool own_data_
do we own the rl_DielectricLayer array?
void init(int num_layers, rl_DielectricLayer *layers, rl_Traits::Bool adopt_data=rl_Traits::True)
Initialize multilayer from num_layers individual layers.
void init()
initialize perpendicular (s) and parallel (p) reflection coefficients to zero.
void reflect_nlayer(rl_DielectricLayer layer[], int num)
Compute reflectivity for a stack of num layers.
A Plain Ol' Data class representing complex reflection coefficients.
void cdump_on(std::FILE *of, char const pre[]="", char const pst[]="") const
Dumps layer information to a C-style FILE* stream.
double reflectivity(double polarization_factor=0.0) const
evaluate the reflectivity.
rl_ReflectionCoefPOD const & reflection_coef() const
Returns this layer's complex reflection coefficient.
rl_DielectricLayer vacuum_
the top (vacuum) layer
std::ostream & dump_on(std::ostream &os, char const pre[]="", char const pst[]="") const
Dumps layer information to a stream.
int multilayer_reflect_coef(rl_ReflectionCoefPOD &rfl, double energy, double sg)
Evaluate the multilayer reflection coefficients.
rl_DielectricLayer * layer_
array of dielectric layers
int multilayer_reflectivity(double &rfl, double energy, double sg, double polarization_factor=0.0)
Evaluate the multilayer reflectivity (assuming unpolarized rays)
rl_DielectricLayer const & layer(int layer_no) const
void reflect_amp(rl_DielectricLayer const &layer, double sinphi)
Compute reflection amplitude for the interface between this layer and the layer immediately above it.
virtual ~rl_Multilayer()
Destructor.
A class encapsulating the multilayer reflection of a ray.
Bool
Typedef for the Boolean type.