14 #define DETECTOR_PLANE 20000
15 #define DETECTOR_ANGLE 20001
70 std::vector <std::vector<maths::Vector<std::complex<double>>>>
D;
135#define SAVE_PHASE_X 3
136#define SAVE_PHASE_Y 4
137#define SAVE_PHASE_Z 5
Template class for threedimensional vectors.
void save(const char *fn)
stores the content (the whole vector)
maths::Vector< double > n
maths::Vector< double > P
Position of the detector.
void saveimag(const char *fn, int coord)
stores the content (imaginary part of one component of the the electric field, coord determines the c...
void setD(double d1, double d2)
void setN2(int n2)
set the dimension of the array in the second direction
void setN(int n1, int n2)
set the dimensions of the array
int N1()
returns the dimension of the array in the first direction
void savePhase(const char *fn, int coord)
stores the content (phase of one component of the electric field, coord determines the coordinate 0,...
void clean()
Clean all data, i.e. all data is set to zero (Data array is not removed)
friend std::ostream & operator<<(std::ostream &os, Detector &D)
Detector(const Detector &Det)
copy constructor
maths::Vector< double > gete2()
returns the direction of the second axis of the detector
maths::Vector< double > e2
unit vector in the second direction
maths::Vector< double > e1
unit vector in the first direction
void mult(double fac)
Multiply with factor. This functions multiplies all elements of the detector with the factor fac.
Detector & operator=(const Detector &D)
friend class DetectorPlane
virtual bool cross(maths::Vector< double > P, maths::Vector< double > k, int &i1, int &i2, double &l)=0
int N2()
returns the dimension of the array in the second direction
int Type()
returns kind of detector
void init(int n1, int n2)
initialise array (for internal use only)
void setN1(int n1)
set the dimension of the array in the first direction
void savereal(const char *fn, int coord)
stores the content (real part of one component of the the electric field, coord determines the coordi...
void setPosition(maths::Vector< double > Pos)
set the position of the detector
Detector(int n1, int n2)
Constructor which is called by the size of the array (n1 x n2)
void saveabs(const char *fn)
stores the content (absolute value of the electric field) of the detector array in the file determine...
double D2()
return the length in the second direction
std::vector< std::vector< maths::Vector< std::complex< double > > > > D
Here, the data will be stored.
maths::Vector< double > norm()
returns the normal vector of the detectors surface
maths::Vector< double > gete1()
returns the direction of the first axis of the detector
maths::Vector< double > position()
returns the position of the detector
bool load(const char *fn)
double D1()
return the length in the first direction
maths::Vector< std::complex< double > > & operator()(int i1, int i2)
bracket operator which gives the content inside the array determined by the indices i1 and i2
void setNorm(maths::Vector< double > n)
set the normal on the detector
DetectorPlane(maths::Vector< double > P, maths::Vector< double > n, double d, int N)
DetectorPlane(maths::Vector< double > P, maths::Vector< double > e1, maths::Vector< double > e2, int n1, int n2)
bool cross(maths::Vector< double > P, maths::Vector< double > k, int &i1, int &i2, double &l)
implementation of the intersection checking function for the plane detector
Raytracer used for ultrashort pulse calculation with raytracing only.
This class is used for the iray class. This class is intended for internal use only....
This file contains the Vector template class and some useful functions around this class.