Skip to content
Snippets Groups Projects
Commit 40b1a2e1 authored by Christopher Dilks's avatar Christopher Dilks
Browse files

Merge remote-tracking branch 'origin/master' into irt-data-model

parents 842f6905 c39114fe
No related branches found
No related tags found
1 merge request!70add IRT data model
Pipeline #35513 failed
...@@ -14,7 +14,7 @@ if(APPLE) ...@@ -14,7 +14,7 @@ if(APPLE)
endif(APPLE) endif(APPLE)
find_package(podio 0.14.1 REQUIRED) find_package(podio 0.15 REQUIRED)
include_directories(${podio_INCLUDE_DIR}) include_directories(${podio_INCLUDE_DIR})
find_package(EDM4HEP 0.4.1 REQUIRED) find_package(EDM4HEP 0.4.1 REQUIRED)
...@@ -25,7 +25,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) ...@@ -25,7 +25,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
find_package(ROOT REQUIRED COMPONENTS Core RIO Tree) find_package(ROOT REQUIRED COMPONENTS Core RIO Tree)
include(${ROOT_USE_FILE}) include(${ROOT_USE_FILE})
PODIO_GENERATE_DATAMODEL(eicd eic_data.yaml headers sources PODIO_GENERATE_DATAMODEL(eicd eic_data.yaml headers sources
UPSTREAM_EDM edm4hep:${EDM4HEP_DATA_DIR}/edm4hep.yaml UPSTREAM_EDM edm4hep:${EDM4HEP_DATA_DIR}/edm4hep.yaml
OUTPUT_FOLDER ${CMAKE_CURRENT_BINARY_DIR} OUTPUT_FOLDER ${CMAKE_CURRENT_BINARY_DIR}
) )
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#else #else
#include <cmath> #include <cmath>
#include <edm4hep/Vector2f.h>
#include <edm4hep/Vector3f.h> #include <edm4hep/Vector3f.h>
#include <eicd/Vector2f.h> #include <eicd/Vector2f.h>
#include <eicd/Vector3f.h> #include <eicd/Vector3f.h>
...@@ -34,11 +35,24 @@ template <> ...@@ -34,11 +35,24 @@ template <>
inline auto vector_y<eicd::Vector2f>(const eicd::Vector2f& v) { inline auto vector_y<eicd::Vector2f>(const eicd::Vector2f& v) {
return v.b; 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 // no z-component for 2D vectors
template <> template <>
inline auto vector_z<eicd::Vector2f>(const eicd::Vector2f& v) { inline auto vector_z<eicd::Vector2f>(const eicd::Vector2f& v) {
return 0; 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) // inline edm4hep::Vector2f VectorFromPolar(const double r, const double theta)
// { // {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment