ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Ray.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Ray.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2018-2019 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#pragma once
10
11
#include "
Acts/Utilities/Definitions.hpp
"
12
#include "
Acts/Visualization/IVisualization.hpp
"
13
14
namespace
Acts {
15
20
template
<
typename
value_t,
size_t
DIM>
21
class
Ray
{
22
public
:
24
using
value_type
=
value_t
;
26
using
VertexType
=
ActsVector<value_t, DIM>
;
28
using
vertex_array_type
= Eigen::Array<value_t, DIM, 1>;
30
using
transform_type
= Eigen::Transform<value_t, DIM, Eigen::Affine>;
31
35
Ray
(
const
VertexType
&
origin
,
const
VertexType
&
dir
);
36
39
const
VertexType
&
origin
()
const
{
return
m_origin
; }
40
43
const
VertexType
&
dir
()
const
{
return
m_dir
; }
44
47
const
vertex_array_type
&
idir
()
const
{
return
m_idir
; }
48
52
Ray<value_t, DIM>
transformed
(
const
transform_type
& trf)
const
;
53
57
std::ostream&
toStream
(std::ostream& os)
const
;
58
62
template
<
size_t
D = DIM, std::enable_if_t<D == 3,
int
> = 0>
63
void
draw
(
IVisualization
& helper,
value_type
far_distance = 10)
const
;
64
65
private
:
66
VertexType
m_origin
;
67
VertexType
m_dir
;
68
vertex_array_type
m_idir
;
69
};
70
75
template
<
typename
T,
size_t
D>
76
std::ostream& operator<<(std::ostream& os, const Ray<T, D>& ray) {
77
ray.dump(os);
78
return
os;
79
}
80
81
using
Ray3F
=
Ray<float, 3>
;
82
using
Ray3D
=
Ray<double, 3>
;
83
84
}
// namespace Acts
85
86
#include "
Acts/Utilities/Ray.ipp
"
acts
blob
master
Core
include
Acts
Utilities
Ray.hpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:22
using
1.8.2 with
ECCE GitHub integration