Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eicd
Manage
Activity
Members
Labels
Plan
Issues
13
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
eicd
Merge requests
!92
fix: template instantiation for `vector_x<edm4hep::Vector2f>`
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix: template instantiation for `vector_x<edm4hep::Vector2f>`
vector-utils-legacy-Vector2f
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Wouter Deconinck
requested to merge
vector-utils-legacy-Vector2f
into
master
2 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
This allows for magnitude on Vector2f.
👍
0
👎
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
5c6390b6
1 commit,
2 years ago
1 file
+
14
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
utils/include/eicd/vector_utils_legacy.h
+
14
−
0
Options
@@ -8,6 +8,7 @@
#else
#include
<cmath>
#include
<edm4hep/Vector2f.h>
#include
<edm4hep/Vector3f.h>
#include
<eicd/Vector2f.h>
#include
<eicd/Vector3f.h>
@@ -34,11 +35,24 @@ template <>
inline
auto
vector_y
<
eicd
::
Vector2f
>
(
const
eicd
::
Vector2f
&
v
)
{
return
v
.
b
;
}
// Vector2f uses a,b instead of x,y
template
<
>
inline
auto
vector_x
<
edm4hep
::
Vector2f
>
(
const
edm4hep
::
Vector2f
&
v
)
{
return
v
.
a
;
}
template
<
>
inline
auto
vector_y
<
edm4hep
::
Vector2f
>
(
const
edm4hep
::
Vector2f
&
v
)
{
return
v
.
b
;
}
// no z-component for 2D vectors
template
<
>
inline
auto
vector_z
<
eicd
::
Vector2f
>
(
const
eicd
::
Vector2f
&
v
)
{
return
0
;
}
template
<
>
inline
auto
vector_z
<
edm4hep
::
Vector2f
>
(
const
edm4hep
::
Vector2f
&
v
)
{
return
0
;
}
// inline edm4hep::Vector2f VectorFromPolar(const double r, const double theta)
// {
Loading