GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
lightsrc_mc.h
Go to the documentation of this file.
1
5#pragma once
6#include "lightsrc.h"
7namespace GOAT
8{
9 namespace raytracing
10 {
16 {
17 public:
33 double D = 1.0, maths::Vector<std::complex<double> > Pol = maths::Vector<std::complex<double> >(0.0, 1.0, 0.0),
34 int raytype = LIGHTSRC_RAYTYPE_PRAY, double r0 = 1.0);
35 int next(Ray_pow& S);
36 int next (IRay& S);
37 int next(tubedRay& ray);
38 void reset();
39 void setD(double D);
40 // int next (tubedRay &S);
42 double stddev;
43 };
44
51 {
52 public:
63 LightSrcPlane_mc (maths::Vector<double> Pos, int N, double wvl, double D = 100.0,
64 maths::Vector<std::complex<double> > Pol = maths::Vector<std::complex<double> >(0.0, 1.0, 0.0),
65 int raytype = LIGHTSRC_RAYTYPE_IRAY, double r0 = 100.0);
66 int next(IRay& S);
67 int next(tubedRay& S);
68 int next(Ray_pow& S);
70 void reset();
71 };
72
73
77 {
78 public:
88 int next(RayBase* ray);
89 int next(IRay& S);
90 int next(Ray_pow& S);
91 int next(tubedRay& S);
92 void binWriteItem(std::ofstream& os) { /* to be implemented !!! */ }
93 void binReadItem(std::ifstream& os) { /* to be implemented !!! */ }
96 double size;
97 };
98
104
106 {
107 public:
109 LightSrcRing_mc( maths::Vector<double> Pos, int N, double wvl,double rmin, double rmax,
110 maths::Vector<std::complex<double> > Pol = maths::Vector<std::complex<double> >(0.0, 1.0, 0.0),
111 int raytype = LIGHTSRC_RAYTYPE_IRAY, double r0 = 100.0);
112 int next(IRay& S);
113 int next(tubedRay& S);
114 int next(Ray_pow& S);
115 double getRmin () { return rmin; }
116 double getRmax () { return rmax; }
117 void setRmin(double rmin);
118 void setRmax(double rmax);
119 private:
120 double rmin = 0.0;
121 double rmax = 1.0;
123 void reset();
124 };
125
126
133 {
134 public:
148 maths::Vector<std::complex<double> > Pol = maths::Vector<std::complex<double> >(0.0, 1.0, 0.0),
149 int raytype = LIGHTSRC_RAYTYPE_IRAY, double r0 = 100.0);
150 int next(IRay& S);
151 int next(tubedRay& S);
152 int next(Ray_pow& S);
153 void setFWHM (double r);
154 double getRmax() { return rmax;}
155 double getRmin() { return rmin;}
156 void setRmin(double rmin);
157 void setRmax(double rmax);
158 virtual double area();
159 private:
160 double rmin = 0.0;
161 double rmax = 1.0;
163 void reset();
164 double sigma2=1.0/sqrt(M_LN2);
165 };
166
170 {
171 public:
181 int next(RayBase* ray);
182 int next(IRay& S);
183 int next(Ray_pow& S);
184 int next(tubedRay& S);
186 void binWriteItem(std::ofstream& os) { /* to be implemented !!! */ }
187 void binReadItem(std::ifstream& os) { /* to be implemented !!! */ }
188 };
189 }
190}
Template class for threedimensional vectors.
Definition vector.h:57
This class represents a single ray.
Definition iray.h:33
LightSrcGauss_mc(const LightSrcGauss_mc &L)
GOAT::maths::Vector< double > genStartingPos()
LightSrcGauss_mc(maths::Vector< double > Pos, int N, double wvl, double w0, maths::Vector< double > focuspos, double D=1.0, maths::Vector< std::complex< double > > Pol=maths::Vector< std::complex< double > >(0.0, 1.0, 0.0), int raytype=LIGHTSRC_RAYTYPE_PRAY, double r0=1.0)
Main constructor for gaussian beam light source The direction of the beam is given by the starting po...
maths::Vector< double > focuspos
focal position
Definition lightsrc.h:370
double w0
Waist diameter (fictitious !), only used for the correct calculation of the electric field distributi...
Definition lightsrc.h:365
int N
number of rays (per direction)
Definition lightsrc.h:155
maths::Vector< double > k
main direction of the light source
Definition lightsrc.h:154
double r0
radius of the calculation sphere
Definition lightsrc.h:160
maths::Vector< double > Pos
position of the light source (center of the square area of the light source)
Definition lightsrc.h:150
int raytype
Strahltyp : ray oder ISTRAHL (=RAY oder IRAY)
Definition lightsrc.h:168
double D
width of the square light source area
Definition lightsrc.h:165
double wvl
wavelength
Definition lightsrc.h:182
maths::Vector< std::complex< double > > Pol
polarisation (default: (0.0, 1.0, 0.0)
Definition lightsrc.h:158
LightSrcLine_mc(maths::Vector< double > Pos, int N, double wvl, double size, maths::Vector< double > k=maths::ez, maths::Vector< double > direction=maths::ey)
constructor
maths::Vector< double > direction
Definition lightsrc_mc.h:94
void binReadItem(std::ifstream &os)
reads content of LightSrc from a binary file, represented by os (has to be specified by the derived c...
Definition lightsrc_mc.h:93
void binWriteItem(std::ofstream &os)
writes content of LightSrc in a binary file, represented by is (has to be specified by the derived cl...
Definition lightsrc_mc.h:92
GOAT::maths::Vector< double > genStartingPos()
int next(Ray_pow &S)
gives the next ray for the following calculations
LightSrcPlane_mc(const LightSrcPlane_mc &L)
LightSrcPlane_mc(maths::Vector< double > Pos, int N, double wvl, double D=100.0, maths::Vector< std::complex< double > > Pol=maths::Vector< std::complex< double > >(0.0, 1.0, 0.0), int raytype=LIGHTSRC_RAYTYPE_IRAY, double r0=100.0)
int next(tubedRay &S)
gives the next ray for the following calculations
GOAT::maths::Vector< double > genStartingPos()
int next(IRay &S)
gives the next ray for the following calculations
LightSrcPoint_mc(maths::Vector< double > Pos, int N, double wvl)
constructor
void binWriteItem(std::ofstream &os)
writes content of LightSrc in a binary file, represented by is (has to be specified by the derived cl...
void binReadItem(std::ifstream &os)
reads content of LightSrc from a binary file, represented by os (has to be specified by the derived c...
GOAT::maths::Vector< double > genDirection()
int next(tubedRay &S)
gives the next ray for the following calculations
double rmin
inner radius of the ring
LightSrcRing_mc(const LightSrcRing_mc &L)
LightSrcRing_mc(maths::Vector< double > Pos, int N, double wvl, double rmin, double rmax, maths::Vector< std::complex< double > > Pol=maths::Vector< std::complex< double > >(0.0, 1.0, 0.0), int raytype=LIGHTSRC_RAYTYPE_IRAY, double r0=100.0)
GOAT::maths::Vector< double > genStartingPos()
double rmax
outer radius of the ring
void reset()
sets the internal ray counter to zero (intended for internal use only)
int next(IRay &S)
gives the next ray for the following calculations
int next(Ray_pow &S)
gives the next ray for the following calculations
int next(tubedRay &S)
gives the next ray for the following calculations
void setRmax(double rmax)
set the outer radius to rmax
double getRmax()
returns outer radius
void setRmin(double rmin)
set the inner radius to rmin
int next(Ray_pow &S)
gives the next ray for the following calculations
LightSrcRingGauss_mc(const LightSrcRingGauss_mc &L)
virtual double area()
area A of the light source,
int next(IRay &S)
gives the next ray for the following calculations
double rmin
inner radius of the ring
LightSrcRingGauss_mc(maths::Vector< double > Pos, int N, double wvl, double rmin, double rmax, maths::Vector< std::complex< double > > Pol=maths::Vector< std::complex< double > >(0.0, 1.0, 0.0), int raytype=LIGHTSRC_RAYTYPE_IRAY, double r0=100.0)
LightSrcRingGauss_mc.
double getRmin()
returns inner radius
double sigma2
sigma^2, used for internal purposes (default value corresponds to a FWHM of 1um)
double rmax
outer radius of the ring
GOAT::maths::Vector< double > genStartingPos()
generate a position within the ring (needed by the next() method)
void setFWHM(double r)
set width of the gaussian distribution to r
This class provides a ray which carries a special power.
Definition ray_pow.h:12
Abstract base class for all rays used for the raytracing process. This abstract base class for all ra...
Definition raybase.h:16
This class represents a ray with a finite cross section. class tubedRay: This class represents a ray ...
Definition tubedray.h:88
#define LIGHTSRC_RAYTYPE_IRAY
Ray class : IRay.
Definition lightsrc.h:17
#define LIGHTSRC_RAYTYPE_PRAY
Ray class : Pow_Ray.
Definition lightsrc.h:18
Raytracer used for ultrashort pulse calculation with raytracing only.
Definition asphericLens.h:6
This class is used for the iray class. This class is intended for internal use only....
Definition fresnel.h:7