IAP GITLAB

Skip to content
Snippets Groups Projects
Commit cfe2a28d authored by ralfulrich's avatar ralfulrich
Browse files

PhysicalGeometry

parent 896d611b
No related branches found
No related tags found
1 merge request!316Curved tracking
Pipeline #3483 passed with warnings
......@@ -26,7 +26,7 @@ namespace corsika {
inline Point const& Plane::getCenter() const { return center_; }
inline Plane::DimLessVec const& Plane::getNormal() const { return normal_; }
inline DirectionVector const& Plane::getNormal() const { return normal_; }
inline std::string Plane::asString() const {
std::ostringstream txt;
......
......@@ -20,6 +20,21 @@
namespace corsika {
/**
* A 3D vector defined in a specific coordinate system with units HEPMomentumType
**/
typedef Vector<hepmomentum_d> MomentumVector;
/**
* A 3D vector defined in a specific coordinate system with no units. But, note, this is
* not automatically normaliyed! It is not a "NormalVector".
**/
typedef Vector<dimensionless_d> DirectionVector;
/**
* A 3D vector defined in a specific coordinate system with units "velocity_t".
*
**/
typedef Vector<SpeedType::dimension_type> VelocityVector;
} // namespace corsika
......@@ -8,11 +8,13 @@
#pragma once
#include <cmath>
#include <corsika/framework/core/PhysicalUnits.hpp>
#include <corsika/framework/core/PhysicalGeometry.hpp>
#include <corsika/framework/geometry/Point.hpp>
#include <corsika/framework/geometry/Vector.hpp>
#include <cmath>
namespace corsika {
/*!
......@@ -31,12 +33,9 @@ namespace corsika {
class Helix {
///! \todo move VelocityVec into PhysicalUnits
using VelocityVec = Vector<SpeedType::dimension_type>;
public:
Helix(Point const& pR0, FrequencyType pOmegaC, VelocityVec const& pvPar,
VelocityVec const& pvPerp)
Helix(Point const& pR0, FrequencyType pOmegaC, VelocityVector const& pvPar,
VelocityVector const& pvPerp)
: r0_(pR0)
, omegaC_(pOmegaC)
, vPar_(pvPar)
......@@ -48,7 +47,7 @@ namespace corsika {
Point getPosition(TimeType const t) const;
VelocityVec getVelocity(TimeType const t) const;
VelocityVector getVelocity(TimeType const t) const;
Point getPositionFromArclength(LengthType const l) const;
......@@ -60,8 +59,8 @@ namespace corsika {
Point r0_; ///! origin of helix, but this is in the center of the
///! "cylinder" on which the helix rotates
FrequencyType omegaC_; ///! speed of angular rotation
VelocityVec vPar_; ///! speed along direction of "cylinder"
VelocityVec vPerp_, uPerp_;
VelocityVector vPar_; ///! speed along direction of "cylinder"
VelocityVector vPerp_, uPerp_;
LengthType radius_;
};
......
......@@ -9,6 +9,7 @@
#pragma once
#include <corsika/framework/core/PhysicalUnits.hpp>
#include <corsika/framework/core/PhysicalGeometry.hpp>
#include <corsika/framework/geometry/Point.hpp>
#include <corsika/framework/geometry/Vector.hpp>
......@@ -18,27 +19,24 @@ namespace corsika {
class Plane {
///! \todo move to PhysicalUnits
using DimLessVec = Vector<dimensionless_d>;
public:
Plane(Point const& vCenter, DimLessVec const& vNormal)
Plane(Point const& vCenter, DirectionVector const& vNormal)
: center_(vCenter)
, normal_(vNormal.normalized()) {}
bool isAbove(Point const& vP) const;
LengthType getDistanceTo(corsika::Point const& vP) const;
LengthType getDistanceTo(Point const& vP) const;
Point const& getCenter() const;
DimLessVec const& getNormal() const;
DirectionVector const& getNormal() const;
std::string asString() const;
public:
Point const center_;
DimLessVec const normal_;
DirectionVector const normal_;
};
} // namespace corsika
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment