Garfield++ 5.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
vec.h File Reference
#include <string>
#include "wcpplib/util/FunNameStack.h"
#include "wcpplib/geometry/vfloat.h"
#include "wcpplib/geometry/vec.ic"

Go to the source code of this file.

Classes

class  Heed::absref
 
class  Heed::absref_transmit
 
class  Heed::vec
 
class  Heed::basis
 Basis. More...
 
class  Heed::point
 Point. More...
 
class  Heed::abssyscoor
 
class  Heed::fixsyscoor
 

Namespaces

namespace  Heed
 

Macros

#define pvecerror(string)
 
#define pvecerrorp(string)
 
#define ApplyAnyFunctionToVecElements(func)
 
#define vec_syscoor_index   0
 

Functions

std::ostream & Heed::operator<< (std::ostream &file, const vec &v)
 
std::ostream & Heed::operator<< (std::ostream &file, const basis &b)
 
std::ostream & Heed::operator<< (std::ostream &file, const point &p)
 
std::ostream & Heed::operator<< (std::ostream &file, const abssyscoor &f)
 
std::ostream & Heed::operator<< (std::ostream &file, const fixsyscoor &f)
 

Macro Definition Documentation

◆ ApplyAnyFunctionToVecElements

#define ApplyAnyFunctionToVecElements ( func)
Value:
{ \
auto aref_tran = get_components(); \
int q = aref_tran.qaref; \
for (int n = 0; n < q; n++) (this->*(aref_tran.aref[n])).func; \
q = aref_tran.qaref_pointer; \
for (int n = 0; n < q; n++) aref_tran.aref_pointer[n]->func; \
q = aref_tran.qaref_other; \
for (int n = 0; n < q; n++) { \
absref* ar = aref_tran.get_other(n); \
if (!ar) break; \
ar->func; \
} \
}

Definition at line 157 of file vec.h.

157#define ApplyAnyFunctionToVecElements(func) \
158 { \
159 auto aref_tran = get_components(); \
160 int q = aref_tran.qaref; \
161 for (int n = 0; n < q; n++) (this->*(aref_tran.aref[n])).func; \
162 q = aref_tran.qaref_pointer; \
163 for (int n = 0; n < q; n++) aref_tran.aref_pointer[n]->func; \
164 q = aref_tran.qaref_other; \
165 for (int n = 0; n < q; n++) { \
166 absref* ar = aref_tran.get_other(n); \
167 if (!ar) break; \
168 ar->func; \
169 } \
170 }

Referenced by Heed::absref::down(), Heed::absref::shift(), Heed::absref::turn(), and Heed::absref::up().

◆ pvecerror

#define pvecerror ( string)
Value:
mfunname(string); \
if (vecerror != 0) { \
mcerr << "vecerror is not zero, program is terminated\n" \
<< " function detected error is " << string << '\n'; \
spexit(mcerr); \
}
#define mfunname(string)
#define mcerr
Definition prstream.h:128

Definition at line 28 of file vec.h.

28#define pvecerror(string) \
29 mfunname(string); \
30 if (vecerror != 0) { \
31 mcerr << "vecerror is not zero, program is terminated\n" \
32 << " function detected error is " << string << '\n'; \
33 spexit(mcerr); \
34 }

Referenced by Heed::vec::ang2projvec, Heed::circumf::apeq, Heed::plane::apeq, Heed::straight::apeq, Heed::basis::basis(), Heed::basis::basis(), Heed::basis::basis(), Heed::box::box(), Heed::box::box(), Heed::box::box(), Heed::box::box(), Heed::gparticle::calc_step_to_bord(), Heed::circumf::check_point_in(), Heed::plane::check_point_in(), Heed::polygon::check_point_in(), Heed::polyline::check_point_in(), Heed::straight::check_point_in(), Heed::circumf::circumf(), Heed::vec::cos2vec, Heed::circumf::cross(), Heed::plane::cross(), Heed::plane::cross(), Heed::plane::cross(), Heed::polygon::cross(), Heed::polyline::cross(), Heed::straight::cross(), Heed::cross4pllines(), Heed::mparticle::curvature(), Heed::polyline::dist_two_inter(), Heed::plane::distance(), Heed::polyline::distance(), Heed::polyline::distance(), Heed::straight::distance(), Heed::straight::distance(), Heed::trajestep::Gnextpoint(), Heed::circumf::operator==, Heed::plane::operator==, Heed::straight::operator==, Heed::plane::plane(), Heed::plane::plane(), Heed::polygon::polygon(), Heed::polyline::polyline_init(), Heed::vec::project_to_plane, Heed::polygon::range(), Heed::rectangle::rectangle(), Heed::vec::sin2vec, Heed::straight::straight(), Heed::straight::straight(), Heed::straight::straight(), Heed::straight::straight(), Heed::straight::straight(), Heed::basis::switch_xyz(), Heed::trajestep::trajestep(), Heed::vec::turn_new(), Heed::straight::vecdistance(), and Heed::straight::vecdistance().

◆ pvecerrorp

#define pvecerrorp ( string)
Value:
mfunnamep(string); \
if (vecerror != 0) { \
mcerr << "vecerror is not zero, program is terminated\n" \
<< " function detected error is " << string << '\n'; \
spexit(mcerr); \
}
#define mfunnamep(string)

Definition at line 35 of file vec.h.

35#define pvecerrorp(string) \
36 mfunnamep(string); \
37 if (vecerror != 0) { \
38 mcerr << "vecerror is not zero, program is terminated\n" \
39 << " function detected error is " << string << '\n'; \
40 spexit(mcerr); \
41 }

Referenced by Heed::vec::up_new().

◆ vec_syscoor_index

#define vec_syscoor_index   0

Coordinate system (centre, basis and mother coordinate system). Take care: c.abas must be equal to abas->ex.abas. If asc==NULL and abs(c)==0 than it is primary system of coordinate and therefore c.abas and abas->ex.abas must be zero, baz may be zero or pointer to unit basis.

Definition at line 421 of file vec.h.