GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
GOAT::raytracing::Raytrace_Inel Class Reference

Class for calculating inelastic scattering (Raman) More...

#include <raytrace_inel.h>

Inheritance diagram for GOAT::raytracing::Raytrace_Inel:
GOAT::raytracing::Raytrace GOAT::raytracing::Raytrace

Public Member Functions

void exportExcitation (std::string fname, int savetype=INEL_EXPORT_EXCITATION_FIELD_ABS)
 Export excitation field to (ASCII-) file This function exports excitation field inside the objects. For each object, a separate file is created with name "<no of the object>_<fname>.dat". Each file contains the information about the field inside an array which contains the object. In the first line, the dimensions in x,y and z direction is given. The kind of information, stored in the file is determined by the parameter savetype. In can have the following values: INEL_EXPORT_EXCITATION_FIELD_ABS : the absolute value of the electric field is stored (default value) INEL_EXPORT_EXCITATION_FIELD_VECTOR : the full maths::Vector is stored in the file. Each line stores the following values: real(Ex) imag(Ex) real(Ey) imag(Ey) real(Ez) imag(Ez)
void exportExcitation (std::string fname, int savetype=INEL_EXPORT_EXCITATION_FIELD_ABS)
 Export excitation field to (ASCII-) file This function exports excitation field inside the objects. For each object, a separate file is created with name "<no of the object>_<fname>.dat". Each file contains the information about the field inside an array which contains the object. In the first line, the dimensions in x,y and z direction is given. The kind of information, stored in the file is determined by the parameter savetype. In can have the following values: INEL_EXPORT_EXCITATION_FIELD_ABS : the absolute value of the electric field is stored (default value) INEL_EXPORT_EXCITATION_FIELD_VECTOR : the full maths::Vector is stored in the file. Each line stores the following values: real(Ex) imag(Ex) real(Ey) imag(Ey) real(Ez) imag(Ez)
SuperArray< GOAT::maths::Vector< std::complex< double > > > * GetFieldArray ()
 Raytrace_Inel ()
 Raytrace_Inel ()
 Raytrace_Inel (const Scene &S)
 Constructor for the inelastic scattering raytracer.
 Raytrace_Inel (const Scene &S, int n)
 Constructor for the inelastic scattering raytracer.
void resetCalculation ()
 forces the calculation of the excited field when calling trace(RRTParms D)
void resetCalculation ()
 forces the calculation of the excited field when calling trace(RRTParms D)
void sceneChanged (const Scene &S)
 Change Scene to S Changes the Scene to S and changes the calculation phase so that the calculation starts from the beginning when the trace() function is called, i.e. the excitation field is also recalculated.
void sceneChanged (const Scene &S)
 Change Scene to S Changes the Scene to S and changes the calculation phase so that the calculation starts from the beginning when the trace() function is called, i.e. the excitation field is also recalculated.
void setExcitationFieldOnly ()
 Sets calculation phase so, that for the next call of trace(RRTParms D), only the excitation field is calculated.
void setExcitationFieldOnly ()
 Sets calculation phase so, that for the next call of trace(RRTParms D), only the excitation field is calculated.
void setScene (const Scene &S)
void trace (RRTParms D)
 Calculates inelastic scattering.
void trace (RRTParms D)
 Calculates inelastic scattering.
void traceEnterObject ()
 Function internally called when ray enters an object.
void traceEnterObject ()
 Function internally called when ray enters an object.
void traceLeaveObject ()
 Function internally called when ray leaves an object.
void traceLeaveObject ()
 Function internally called when ray leaves an object.
void unsetExcitationFieldOnly ()
 sets calculation phase in the way, that also the inelastic calculation will be done
void unsetExcitationFieldOnly ()
 sets calculation phase in the way, that also the inelastic calculation will be done
Public Member Functions inherited from GOAT::raytracing::Raytrace
void init ()
 this function is called if no object was hidden
void init ()
 this function is called if no object was hidden
 Raytrace ()
 Raytrace ()
 Raytrace (const Scene &S)
 Raytrace (const Scene &S)
void setNumReflex (int numReflex)
 sets number of reflexions
void setNumReflex (int numReflex)
 sets number of reflexions
void setScene (const Scene &S)
 sets Scene
void setScene (const Scene &S)
 sets Scene
void trace ()
 this is the starting point for the raytracing procedure
void trace ()
 this is the starting point for the raytracing procedure
virtual void traceStopObject ()
virtual void traceStopObject ()
virtual void traceOneRay (RayBase *ray, int &Reflexions, int &recur)
 traces one ray
virtual void reset ()
void copyRay (RayBase *&dest, RayBase *src)
virtual void traceOneRay (RayBase *ray, int &Reflexions, int &recur)
 traces one ray
virtual void reset ()
void copyRay (RayBase *&dest, RayBase *src)

Public Attributes

double inel1
double inel2
 result of the inelastic scattering for the two given polarisations
SuperArray< maths::Vector< std::complex< double > > > * SGE =nullptr
 Here, the exciting field is stored.
Public Attributes inherited from GOAT::raytracing::Raytrace
GOAT::maths::Vector< INDEX_TYPEcurrentIndex = GOAT::maths::Vector<INDEX_TYPE>(-1, -1, -1)
int currentLS
 Number of the current light source, which is currently in the calculation process.
int currentObj
 Number of the last object hit (no object hit: -1)
maths::Vector< std::complex< double > > EStart
maths::Vector< std::complex< double > > EStart2
maths::Vector< std::complex< double > > EStop
 Start and end value of the electric field.
maths::Vector< std::complex< double > > EStop2
 Start and end value of the electric field (second ray in IRay)
int lost
 Rays unintentionally get lost, e.g. due to total internal reflection.
maths::Vector< double > PStart
maths::Vector< double > PStop
 Start and end point of the last step.
maths::Vector< double > kin
 direction of the incident ray
maths::Vector< double > kref
 direction of the reflected ray
maths::Vector< double > ktrans
 direction of the transmitted ray
double PowRef
 Powers stored when ray type is PRay.
double PowIn
 Power of the incident ray.
double PowTrans
 Power of the transmitted ray.
Scene S
 Description of the scene.
bool useRRTParms
 Flag which tells the raytracing procedure if the RRT parameters of scene or the normal parameters are used within the calculation.
int type =RAYTRACER_TYPE_NONE
 Flag which shows which type of raytracer is selected.
RayBaseray
 current ray
RayBasetray
 transmitted ray
bool Abbruch
 flag to stop calculation
int numReflex = RAYTRACE_MAX_REFLEXIONS
 current number of reflections

Private Member Functions

std::complex< double > gewichte (maths::Vector< std::complex< double > > E, maths::Vector< std::complex< double > > p)
std::complex< double > gewichte (maths::Vector< std::complex< double > > E, maths::Vector< std::complex< double > > p)
void initExcitation ()
void initExcitation ()
void initRRT ()
void initRRT ()
void saveExcitation ()
void saveExcitation ()
void saveRRT ()
void saveRRT ()
void traceExcitation ()
void traceExcitation ()
void traceRRT ()
void traceRRT ()

Private Attributes

bool * active
int calcphase
int iR
LightSrc ** LSExcit
int n
int nLSExcit
RRTParms parms
SuperArray< maths::Vector< std::complex< double > > > * SGRRT1 = nullptr
SuperArray< maths::Vector< std::complex< double > > > * SGRRT2 = nullptr

Detailed Description

Class for calculating inelastic scattering (Raman)

This class calculates the inelastic (Raman-) scattering of the active particles within the scene. The calculation is separated into two steps. At first, the exciting electric field is calculated and stored. In a second step the inelastic scattered field is calculated by following the rays backwards from the detector towards the scattering objects. There it is weighted by the exciting field. Also the dipole characteristic of the scattering process is considered. The scattering behaviour is described by the polarizability tensor alpha. The theoretical background is described in more detail in the articles below. Detailed information about the inelastic scattering calculation parameters are provided by the structure RRTParms.

  1. N. Velesco and G. Schweiger, �Geometrical optics calculation of inelastic scattering on large particles,� Appl. Opt. 38, 1046�1052 (1999)
  2. T. Weigel, J. Schulte, and G. Schweiger, �Inelastic scattering on particles with inclusions,� J. Opt. Soc. Am. A22, 1048�1052 (2005)

Definition at line 69 of file raytrace_inel.h.

Constructor & Destructor Documentation

◆ Raytrace_Inel() [1/4]

GOAT::raytracing::Raytrace_Inel::Raytrace_Inel ( )

◆ Raytrace_Inel() [2/4]

GOAT::raytracing::Raytrace_Inel::Raytrace_Inel ( const Scene & S)

Constructor for the inelastic scattering raytracer.

Parameters
Scontains the scene and
isthe number of subdivisions per direction of the virtual array used to store the data (electric field distributiion)

◆ Raytrace_Inel() [3/4]

GOAT::raytracing::Raytrace_Inel::Raytrace_Inel ( )

◆ Raytrace_Inel() [4/4]

GOAT::raytracing::Raytrace_Inel::Raytrace_Inel ( const Scene & S,
int n )

Constructor for the inelastic scattering raytracer.

Parameters
Scontains the scene and
isthe number of subdivisions per direction of the virtual array used to store the data (electric field distributiion)

Member Function Documentation

◆ exportExcitation() [1/2]

void GOAT::raytracing::Raytrace_Inel::exportExcitation ( std::string fname,
int savetype = INEL_EXPORT_EXCITATION_FIELD_ABS )

Export excitation field to (ASCII-) file This function exports excitation field inside the objects. For each object, a separate file is created with name "<no of the object>_<fname>.dat". Each file contains the information about the field inside an array which contains the object. In the first line, the dimensions in x,y and z direction is given. The kind of information, stored in the file is determined by the parameter savetype. In can have the following values: INEL_EXPORT_EXCITATION_FIELD_ABS : the absolute value of the electric field is stored (default value) INEL_EXPORT_EXCITATION_FIELD_VECTOR : the full maths::Vector is stored in the file. Each line stores the following values: real(Ex) imag(Ex) real(Ey) imag(Ey) real(Ez) imag(Ez)

◆ exportExcitation() [2/2]

void GOAT::raytracing::Raytrace_Inel::exportExcitation ( std::string fname,
int savetype = INEL_EXPORT_EXCITATION_FIELD_ABS )

Export excitation field to (ASCII-) file This function exports excitation field inside the objects. For each object, a separate file is created with name "<no of the object>_<fname>.dat". Each file contains the information about the field inside an array which contains the object. In the first line, the dimensions in x,y and z direction is given. The kind of information, stored in the file is determined by the parameter savetype. In can have the following values: INEL_EXPORT_EXCITATION_FIELD_ABS : the absolute value of the electric field is stored (default value) INEL_EXPORT_EXCITATION_FIELD_VECTOR : the full maths::Vector is stored in the file. Each line stores the following values: real(Ex) imag(Ex) real(Ey) imag(Ey) real(Ez) imag(Ez)

◆ GetFieldArray()

SuperArray< GOAT::maths::Vector< std::complex< double > > > * GOAT::raytracing::Raytrace_Inel::GetFieldArray ( )
inline

Definition at line 112 of file raytrace_inel.h.

◆ gewichte() [1/2]

std::complex< double > GOAT::raytracing::Raytrace_Inel::gewichte ( maths::Vector< std::complex< double > > E,
maths::Vector< std::complex< double > > p )
private

◆ gewichte() [2/2]

std::complex< double > GOAT::raytracing::Raytrace_Inel::gewichte ( maths::Vector< std::complex< double > > E,
maths::Vector< std::complex< double > > p )
private

◆ initExcitation() [1/2]

void GOAT::raytracing::Raytrace_Inel::initExcitation ( )
private

◆ initExcitation() [2/2]

void GOAT::raytracing::Raytrace_Inel::initExcitation ( )
private

◆ initRRT() [1/2]

void GOAT::raytracing::Raytrace_Inel::initRRT ( )
private

◆ initRRT() [2/2]

void GOAT::raytracing::Raytrace_Inel::initRRT ( )
private

◆ resetCalculation() [1/2]

void GOAT::raytracing::Raytrace_Inel::resetCalculation ( )
inline

forces the calculation of the excited field when calling trace(RRTParms D)

Definition at line 107 of file raytrace_inel.h.

◆ resetCalculation() [2/2]

void GOAT::raytracing::Raytrace_Inel::resetCalculation ( )
inline

forces the calculation of the excited field when calling trace(RRTParms D)

Definition at line 107 of file raytrace_inel.h.

◆ saveExcitation() [1/2]

void GOAT::raytracing::Raytrace_Inel::saveExcitation ( )
private

◆ saveExcitation() [2/2]

void GOAT::raytracing::Raytrace_Inel::saveExcitation ( )
private

◆ saveRRT() [1/2]

void GOAT::raytracing::Raytrace_Inel::saveRRT ( )
private

◆ saveRRT() [2/2]

void GOAT::raytracing::Raytrace_Inel::saveRRT ( )
private

◆ sceneChanged() [1/2]

void GOAT::raytracing::Raytrace_Inel::sceneChanged ( const Scene & S)

Change Scene to S Changes the Scene to S and changes the calculation phase so that the calculation starts from the beginning when the trace() function is called, i.e. the excitation field is also recalculated.

Change Scene to S (resets the calculation phase

◆ sceneChanged() [2/2]

void GOAT::raytracing::Raytrace_Inel::sceneChanged ( const Scene & S)

Change Scene to S Changes the Scene to S and changes the calculation phase so that the calculation starts from the beginning when the trace() function is called, i.e. the excitation field is also recalculated.

Change Scene to S (resets the calculation phase

◆ setExcitationFieldOnly() [1/2]

void GOAT::raytracing::Raytrace_Inel::setExcitationFieldOnly ( )
inline

Sets calculation phase so, that for the next call of trace(RRTParms D), only the excitation field is calculated.

Definition at line 108 of file raytrace_inel.h.

◆ setExcitationFieldOnly() [2/2]

void GOAT::raytracing::Raytrace_Inel::setExcitationFieldOnly ( )
inline

Sets calculation phase so, that for the next call of trace(RRTParms D), only the excitation field is calculated.

Definition at line 108 of file raytrace_inel.h.

◆ setScene()

void GOAT::raytracing::Raytrace_Inel::setScene ( const Scene & S)

◆ trace() [1/2]

void GOAT::raytracing::Raytrace_Inel::trace ( RRTParms D)

Calculates inelastic scattering.

This function is the starting point for the inelastic scattering calculation. By the first call of this function, the excited field is calculated and then the inelastic scattered field (RRT-field) is calculated. Here, the calculation in one direction is done. Since the calculation of the excited field is somewhat time consuming, this field is not recalculated if the function is called a second time. If the scene has changed, just call the function resetCalculation() or change the currrent scene by calling sceneChanged(Scene &S) to start the whole calculation together from the beginning (together with the excitation field). If only the excitation field is to be calculated in this function, then the function setExcitationFieldOnly() must be called beforehand. The exciting field is stored inside the object

See also
SGE (For details refer to SuperArray).
Parameters
DParameters for the inelastic scattering calculation

◆ trace() [2/2]

void GOAT::raytracing::Raytrace_Inel::trace ( RRTParms D)

Calculates inelastic scattering.

This function is the starting point for the inelastic scattering calculation. By the first call of this function, the excited field is calculated and then the inelastic scattered field (RRT-field) is calculated. Here, the calculation in one direction is done. Since the calculation of the excited field is somewhat time consuming, this field is not recalculated if the function is called a second time. If the scene has changed, just call the function resetCalculation() or change the currrent scene by calling sceneChanged(Scene &S) to start the whole calculation together from the beginning (together with the excitation field). If only the excitation field is to be calculated in this function, then the function setExcitationFieldOnly() must be called beforehand. The exciting field is stored inside the object

See also
SGE (For details refer to SuperArray).
Parameters
DParameters for the inelastic scattering calculation

◆ traceEnterObject() [1/2]

void GOAT::raytracing::Raytrace_Inel::traceEnterObject ( )
virtual

Function internally called when ray enters an object.

Implements GOAT::raytracing::Raytrace.

◆ traceEnterObject() [2/2]

void GOAT::raytracing::Raytrace_Inel::traceEnterObject ( )
virtual

Function internally called when ray enters an object.

Implements GOAT::raytracing::Raytrace.

◆ traceExcitation() [1/2]

void GOAT::raytracing::Raytrace_Inel::traceExcitation ( )
private

◆ traceExcitation() [2/2]

void GOAT::raytracing::Raytrace_Inel::traceExcitation ( )
private

◆ traceLeaveObject() [1/2]

void GOAT::raytracing::Raytrace_Inel::traceLeaveObject ( )
virtual

Function internally called when ray leaves an object.

Implements GOAT::raytracing::Raytrace.

◆ traceLeaveObject() [2/2]

void GOAT::raytracing::Raytrace_Inel::traceLeaveObject ( )
virtual

Function internally called when ray leaves an object.

Implements GOAT::raytracing::Raytrace.

◆ traceRRT() [1/2]

void GOAT::raytracing::Raytrace_Inel::traceRRT ( )
private

◆ traceRRT() [2/2]

void GOAT::raytracing::Raytrace_Inel::traceRRT ( )
private

◆ unsetExcitationFieldOnly() [1/2]

void GOAT::raytracing::Raytrace_Inel::unsetExcitationFieldOnly ( )
inline

sets calculation phase in the way, that also the inelastic calculation will be done

Definition at line 109 of file raytrace_inel.h.

◆ unsetExcitationFieldOnly() [2/2]

void GOAT::raytracing::Raytrace_Inel::unsetExcitationFieldOnly ( )
inline

sets calculation phase in the way, that also the inelastic calculation will be done

Definition at line 109 of file raytrace_inel.h.

Member Data Documentation

◆ active

bool * GOAT::raytracing::Raytrace_Inel::active
private

Definition at line 131 of file raytrace_inel.h.

◆ calcphase

int GOAT::raytracing::Raytrace_Inel::calcphase
private

Definition at line 127 of file raytrace_inel.h.

◆ inel1

double GOAT::raytracing::Raytrace_Inel::inel1

Definition at line 106 of file raytrace_inel.h.

◆ inel2

double GOAT::raytracing::Raytrace_Inel::inel2

result of the inelastic scattering for the two given polarisations

Definition at line 106 of file raytrace_inel.h.

◆ iR

int GOAT::raytracing::Raytrace_Inel::iR
private

Definition at line 133 of file raytrace_inel.h.

◆ LSExcit

LightSrc ** GOAT::raytracing::Raytrace_Inel::LSExcit
private

Definition at line 134 of file raytrace_inel.h.

◆ n

int GOAT::raytracing::Raytrace_Inel::n
private

Definition at line 132 of file raytrace_inel.h.

◆ nLSExcit

int GOAT::raytracing::Raytrace_Inel::nLSExcit
private

Definition at line 135 of file raytrace_inel.h.

◆ parms

RRTParms GOAT::raytracing::Raytrace_Inel::parms
private

Definition at line 136 of file raytrace_inel.h.

◆ SGE

SuperArray< maths::Vector< std::complex< double > > > * GOAT::raytracing::Raytrace_Inel::SGE =nullptr

Here, the exciting field is stored.

Definition at line 110 of file raytrace_inel.h.

◆ SGRRT1

SuperArray< maths::Vector< std::complex< double > > > * GOAT::raytracing::Raytrace_Inel::SGRRT1 = nullptr
private

Definition at line 128 of file raytrace_inel.h.

◆ SGRRT2

SuperArray< maths::Vector< std::complex< double > > > * GOAT::raytracing::Raytrace_Inel::SGRRT2 = nullptr
private

Definition at line 129 of file raytrace_inel.h.


The documentation for this class was generated from the following files: