|
CORSIKA
@c8_version@
The framework to simulate particle cascades for astroparticle physics
|
#include <Vector.hpp>

Public Types | |
| using | quantity_type = phys::units::quantity< TDimension, double > |
| using | quantity_square_type = decltype(std::declval< quantity_type >() *std::declval< quantity_type >()) |
Public Member Functions | |
| Vector (CoordinateSystemPtr const &pCS, QuantityVector< TDimension > const &pQVector) | |
| Vector (CoordinateSystemPtr const &cs, quantity_type const x=quantity_type::zero(), quantity_type const y=quantity_type::zero(), quantity_type const z=quantity_type::zero()) | |
| QuantityVector< TDimension > const & | getComponents () const |
| QuantityVector< TDimension > & | getComponents () |
| QuantityVector< TDimension > | getComponents (CoordinateSystemPtr const &pCS) const |
| QuantityVector< TDimension > & | getComponents (CoordinateSystemPtr const &pCS) |
| this always returns a QuantityVector as triple More... | |
| void | rebase (CoordinateSystemPtr const &pCS) |
| quantity_type | getNorm () const |
| quantity_square_type | getSquaredNorm () const |
| template<typename TDimension2 > | |
| auto | getParallelProjectionOnto (Vector< TDimension2 > const &pVec, CoordinateSystemPtr const &pCS) const |
| template<typename TDimension2 > | |
| auto | getParallelProjectionOnto (Vector< TDimension2 > const &pVec) const |
| Vector | operator+ (Vector< TDimension > const &pVec) const |
| Vector | operator- (Vector< TDimension > const &pVec) const |
| auto & | operator*= (double const p) |
| template<typename TScalarDim > | |
| auto | operator* (phys::units::quantity< TScalarDim, double > const p) const |
| template<typename TScalarDim > | |
| auto | operator/ (phys::units::quantity< TScalarDim, double > const p) const |
| auto | operator* (double const p) const |
| auto | operator/ (double const p) const |
| auto & | operator+= (Vector< TDimension > const &pVec) |
| auto & | operator-= (Vector< TDimension > const &pVec) |
| auto | operator- () const |
| auto | normalized () const |
| template<typename TDimension2 > | |
| auto | cross (Vector< TDimension2 > const &pV) const |
| template<typename TDimension2 > | |
| auto | dot (Vector< TDimension2 > const &pV) const |
Access coordinate components | |
Note, if you access components in a different CoordinateSystem pCS than the stored data, internally a temporary object will be created and destroyed each call. This can be avoided by using rebase first. | |
| quantity_type | getX (CoordinateSystemPtr const &pCS) const |
| quantity_type | getY (CoordinateSystemPtr const &pCS) const |
| quantity_type | getZ (CoordinateSystemPtr const &pCS) const |
Public Member Functions inherited from corsika::BaseVector< TDimension > | |
| BaseVector (CoordinateSystemPtr const &pCS, QuantityVector< TDimension > const &pQVector) | |
| BaseVector (BaseVector const &)=default | |
| BaseVector (BaseVector &&a)=default | |
| BaseVector & | operator= (BaseVector const &)=default |
| CoordinateSystemPtr | getCoordinateSystem () const |
| void | setCoordinateSystem (CoordinateSystemPtr const &cs) |
Additional Inherited Members | |
Protected Member Functions inherited from corsika::BaseVector< TDimension > | |
| QuantityVector< TDimension > const & | getQuantityVector () const |
| QuantityVector< TDimension > & | getQuantityVector () |
| void | setQuantityVector (QuantityVector< TDimension > const &v) |
A Vector represents a 3-vector in Euclidean space.
It is defined by components given in a specific CoordinateSystem. It has a physical dimension ("unit") as part of its type, so you cannot mix up e.g. electric with magnetic fields (but you could calculate their cross-product to get an energy flux vector).
When transforming coordinate systems, a Vector is subject to the rotational part only and invariant under translations.
Definition at line 29 of file CoordinateSystem.hpp.
| QuantityVector<TDimension> const& corsika::Vector< TDimension >::getComponents | ( | ) | const |
| QuantityVector<TDimension> corsika::Vector< TDimension >::getComponents | ( | CoordinateSystemPtr const & | pCS | ) | const |
returns a QuantityVector with the components given in an arbitrary CoordinateSystem
| QuantityVector<TDimension>& corsika::Vector< TDimension >::getComponents | ( | CoordinateSystemPtr const & | pCS | ) |
this always returns a QuantityVector as triple
| quantity_type corsika::Vector< TDimension >::getNorm | ( | ) | const |
returns the norm/length of the Vector. Before using this method, think about whether squaredNorm() might be cheaper for your computation.
| auto corsika::Vector< TDimension >::getParallelProjectionOnto | ( | Vector< TDimension2 > const & | pVec, |
| CoordinateSystemPtr const & | pCS | ||
| ) | const |
| quantity_square_type corsika::Vector< TDimension >::getSquaredNorm | ( | ) | const |
returns the squared norm of the Vector. Before using this method, think about whether norm() might be cheaper for your computation.
| void corsika::Vector< TDimension >::rebase | ( | CoordinateSystemPtr const & | pCS | ) |
transforms the Vector into another CoordinateSystem by changing its components internally