Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eicd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
eicd
Commits
be02b47f
Commit
be02b47f
authored
Jul 30, 2021
by
Sylvester Joosten
Browse files
Options
Downloads
Patches
Plain Diff
configures, but need changes to make compile
parent
2c715c5c
No related branches found
No related tags found
1 merge request
!33
Draft: Streamline data model
Pipeline
#14382
failed
Jul 30, 2021
Stage: config
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+1
-0
1 addition, 0 deletions
CMakeLists.txt
eic_data.yaml
+40
-37
40 additions, 37 deletions
eic_data.yaml
with
41 additions
and
37 deletions
CMakeLists.txt
+
1
−
0
View file @
be02b47f
...
...
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.8)
project
(
EICD
VERSION 0.5.1
LANGUAGES CXX
)
set
(
CMAKE_CXX_STANDARD 20
)
#--- Declare options -----------------------------------------------------------
option
(
BUILD_DATA_MODEL
"Run podio class generator yaml file"
ON
)
...
...
This diff is collapsed.
Click to expand it.
eic_data.yaml
+
40
−
37
View file @
be02b47f
...
...
@@ -46,14 +46,14 @@ components:
-
int32_t first
-
int32_t second
ExtraCode
:
includes
:
"
#include
<
span>
\n
#include
<pair
>"
includes
:
"
#include
<
tuple
>"
declaration
:
"
IndexPair()
:
first{-1},
second{-1}
{}
\n
IndexPair(int32_t
a)
:
first{a},
second{-1}
{}
\n
IndexPair
operator=(int32_t
a)
{first
=
a;
second
=
-1;
return
*this;}
IndexPair(int32_t
a,
int32_t
b)
:
first{a},
second{b}
{}
\n
IndexPair(std::span<int32_t>
v)
:
first{v[0]},
second{v[1]}
{}
\n
IndexPair&
operator=(std::span<int32_t>
v)
{first=v[0];
second=v[1];
return
*this;}
\n
//
IndexPair(std::span<int32_t>
v)
:
first{v[0]},
second{v[1]}
{}
\n
//
IndexPair&
operator=(std::span<int32_t>
v)
{first=v[0];
second=v[1];
return
*this;}
\n
IndexPair(const
std::pair<int32_t,
int32_t>&
p)
:
first{p.first},
second{p.second}
{}
\n
IndexPair&
operator=(const
std::pair<int32_t,
int32_t>&
p)
{first
=
p.first;
second
=
p.second;
return
*this;}
\n
int32_t
operator[](unsigned
i)
const
{
return
*(&first
+
i);
}
\n
...
...
@@ -71,12 +71,12 @@ components:
-
float first
-
float second
ExtraCode
:
includes
:
"
#include
<
span>
\n
#include
<pair
>"
includes
:
"
#include
<
tuple
>"
declaration
:
"
FloatPair()
:
first{0},
second{0}
{}
\n
FloatPair(float
a,
float
b)
:
first{a},
second{b}
{}
\n
FloatPair(std::span<float>
v)
:
first{v[0]},
second{v[1]}
{}
\n
FloatPair&
operator=(std::span<float>
v)
{first=v[0];
second=v[1];
return
*this;}
\n
//
FloatPair(std::span<float>
v)
:
first{v[0]},
second{v[1]}
{}
\n
//
FloatPair&
operator=(std::span<float>
v)
{first=v[0];
second=v[1];
return
*this;}
\n
FloatPair(const
std::pair<float,
float>&
p)
:
first{p.first},
second{p.second}
{}
\n
FloatPair&
operator=(const
std::pair<float,
float>&
p)
{first
=
p.first;
second
=
p.second;
return
*this;}
\n
FloatPair(const
std::pair<float,float>&
fp)
\n
...
...
@@ -89,16 +89,16 @@ components:
-
float x // [mm] or [GeV]
-
float y //
ExtraCode
:
includes
:
"
#include
<span>
\n
#include
<cmath>
\n
"
includes
:
"
#include
<cmath>
\n
"
declaration
:
"
VectorXY()
:
x{0},
y{0}
{}
\n
VectorXY(float
xx,
float
yy)
:
x{xx},
y{yy}
{}
\n
VectorXY(std::span<float
>
v)
:
x{v[0]},
y{v[1]}
{}
\n
VectorXY&
operator=(std::span<float
>
v)
{x
=
v[0];
y
=
v[1];
return
*this;}
\n
//
VectorXY(std::span<float
>
v)
:
x{v[0]},
y{v[1]}
{}
\n
//
VectorXY&
operator=(std::span<float
>
v)
{x
=
v[0];
y
=
v[1];
return
*this;}
\n
float
operator[](unsigned
i)
const
{
return
*(&x
+
i);
}
\n
float
mag()
const
{return
std::hypot(x,
y);}
\n
float
px()
const
{return
x
()
;}
\n
float
py()
const
{return
y
()
;}
\n
float
px()
const
{return
x;}
\n
float
py()
const
{return
y;}
\n
float
px(float
xx)
{x
=
xx;
return
x;}
\n
float
py(float
yy)
{y
=
yy;
return
y;}
\n
operator
std::pair<float,
float>()
const
{return
{first,
second};}
...
...
@@ -108,7 +108,7 @@ components:
-
float theta // [rad]
-
float phi //
ExtraCode
:
includes
:
"
#include
<cmath>
\n
#include
<
pair
>"
includes
:
"
#include
<cmath>
\n
#include
<
tuple
>"
declaration
:
"
Direction()
:
theta{0},
phi{0}
{}
\n
Direction(float
th,
float
ph)
:
theta{th},
phi{ph}
{}
\n
...
...
@@ -122,20 +122,20 @@ components:
-
float y //
-
float z //
ExtraCode
:
includes
:
"
#include
<span>
\n
#include
<cmath>
\n
#include<tuple>"
includes
:
"
#include
<cmath>
\n
#include<tuple>"
declaration
:
"
VectorXYZ()
:
x{0},
y{0},
z{0}
{}
\n
VectorXYZ(float
xx,
float
yy,
float
zz)
:
x{xx},
y{yy},
z{zz}
{}
\n
VectorXYZ(std::span<float>
v)
:
x{v[0]},
y{v[1]},
z{v[2]}
{}
\n
VectorXYZ&
operator=(std::span<float>
v)
{x
=
v[0];
y
=
v[1];
z
=
v[2];
return
*this;}
\n
//
VectorXYZ(std::span<float>
v)
:
x{v[0]},
y{v[1]},
z{v[2]}
{}
\n
//
VectorXYZ&
operator=(std::span<float>
v)
{x
=
v[0];
y
=
v[1];
z
=
v[2];
return
*this;}
\n
float
operator[](unsigned
i)
const
{
return
*(&x
+
i);
}
\n
float
mag()
const
{return
std::hypot(x,
y,
z);}
\n
float
r()
const
{return
mag();}
\n
float
theta()
const
{return
acos(z/mag());}
\n
float
phi()
const
{return
atan2(y,x);}
\n
float
px()
const
{return
x
()
;}
\n
float
py()
const
{return
y
()
;}
\n
float
pz()
const
{return
z
()
;}
\n
float
px()
const
{return
x;}
\n
float
py()
const
{return
y;}
\n
float
pz()
const
{return
z;}
\n
operator
std::tuple<float,
float,
float>()
{return
{x,
y,
z};}
"
eic::VectorPolar
:
...
...
@@ -144,7 +144,7 @@ components:
-
float theta // [rad]
-
float phi //
ExtraCode
:
includes
:
"
#include
<span>
\n
#include
<cmath>
\n
#include<tuple>"
includes
:
"
#include
<cmath>
\n
#include<tuple>"
declaration
:
"
VectorPolar()
:
x{0},
theta{0},
phi{0}
{}
\n
VectorPolar(float
rr,
float
th,
float
ph)
:
r{rr},
theta{th},
phi{ph}
{}
\n
...
...
@@ -165,12 +165,12 @@ components:
-
double z //
-
double t // [ns] or [GeV]
ExtraCode
:
includes
:
"
#include
<span>
\n
#include
<cmath>
\n
#include
<tuple>"
includes
:
"
#include
<cmath>
\n
#include
<tuple>"
declaration
:
"
VectorXYZT()
:
x{0},
y{0},
z{0},
t{0]
{}
\n
VectorXYZT(double
xx,
double
yy,
double
zz,
double
tt)
:
x{xx},
y{yy},
z{zz},
t{tt}
{}
\n
VectorXYZT(std::span<double>
v)
:
x{v[0]},
y{v[1]},
z{v[2]},
t{v[3]}
{}
\n
VextorXYZT&
operator=(std::span<double>
v)
{
x
=
v[0];
y
=
v[1];
z
=
v[2];
t
=
v[3];
return
*this;}
\n
//
VectorXYZT(std::span<double>
v)
:
x{v[0]},
y{v[1]},
z{v[2]},
t{v[3]}
{}
\n
//
VextorXYZT&
operator=(std::span<double>
v)
{
x
=
v[0];
y
=
v[1];
z
=
v[2];
t
=
v[3];
return
*this;}
\n
double
operator[](unsigned
i)
const
{
return
*(&x
+
i);
}
\n
double
mag()
const
{return
std::hypot(x,
y,
z);}
\n
double
r()
const
{return
mag();}
\n
...
...
@@ -194,12 +194,12 @@ components:
-
double z //
-
double m //
ExtraCode
:
includes
:
"
#include
<span>
\n
#include
<cmath>
\n
#include
<tuple>"
includes
:
"
#include
<cmath>
\n
#include
<tuple>"
declaration
:
"
VectorPxPyPzM()
:
x{0},
y{0},
z{0},
m{0]
{}
\n
VectorPxPyPzM(double
xx,
double
yy,
double
zz,
double
mm)
:
x{xx},
y{yy},
z{zz},
m{mm}
{}
\n
VectorPxPyPzM(std::span<double>
v)
:
x{v[0]},
y{v[1]},
z{v[2]},
m{v[3]}
{}
\n
VectorPxPyPzM&
operator=(std::span<double>
v)
{
x
=
v[0];
y
=
v[1];
z
=
v[2];
m
=
v[3];
return
*this;}
\n
//
VectorPxPyPzM(std::span<double>
v)
:
x{v[0]},
y{v[1]},
z{v[2]},
m{v[3]}
{}
\n
//
VectorPxPyPzM&
operator=(std::span<double>
v)
{
x
=
v[0];
y
=
v[1];
z
=
v[2];
m
=
v[3];
return
*this;}
\n
double
operator[](unsigned
i)
const
{
return
*(&x
+
i);
}
\n
double
mag()
const
{return
std::hypot(x,
y,
z);}
\n
double
r()
const
{return
mag();}
\n
...
...
@@ -225,8 +225,8 @@ components:
declaration
:
"
CovDiagXYZ()
:
xx{0},
yy{0},
zz{0}
{}
\n
CovDiagXYZ(float
x,
float
y,
float
z)
:
xx{x},
yy{y},
zz{z}
{}
\n
CovDiagXYZ(std::span<float>
v)
:
xx{v[0]},
yy{v[1]},
zz{v[2]}
{}
\n
CovDiagXYZ&
operator=(std::span<float>
v)
{
xx
=
v[0];
yy
=
v[1];
zz
=
v[2];
return
*this;}
\n
//
CovDiagXYZ(std::span<float>
v)
:
xx{v[0]},
yy{v[1]},
zz{v[2]}
{}
\n
//
CovDiagXYZ&
operator=(std::span<float>
v)
{
xx
=
v[0];
yy
=
v[1];
zz
=
v[2];
return
*this;}
\n
float
operator[](unsigned
i,
unsigned
j)
const
{return
(i
==
j)
?
*(&xx
+
i)
:
0.;}
\n
"
...
...
@@ -242,8 +242,8 @@ components:
declaration
:
"
CovXYZ()
:
xx{0},
yy{0},
zz{0},
xy{0},
xz{0},
yz{0}
{}
\n
CovXYZ(float
vx,
float
vy,
float
vz,
vxy,
vxz,
vyz)
:
xx{vx},
yy{vy},
zz{vz},
xy{vxy},
xz{vxz},
yz{vyz}
{}
\n
CovXYZ(std::span<float>
v)
:
xx{v[0]},
yy{v[1]},
zz{v[2]},
xy{v[3]},
xz{v[4]},
yx{v[5]}
{}
\n
CovDiagXYZ&
operator=(std::span<float>
v)
{
xx
=
v[0];
yy
=
v[1];
zz
=
v[2];
xy
=
v[3];
xz
=
v[4];
yz
=
v[5];
return
*this;}
\n
//
CovXYZ(std::span<float>
v)
:
xx{v[0]},
yy{v[1]},
zz{v[2]},
xy{v[3]},
xz{v[4]},
yx{v[5]}
{}
\n
//
CovDiagXYZ&
operator=(std::span<float>
v)
{
xx
=
v[0];
yy
=
v[1];
zz
=
v[2];
xy
=
v[3];
xz
=
v[4];
yz
=
v[5];
return
*this;}
\n
float
operator[](unsigned
i,
unsigned
j)
const
{
\n
//
diagonal
\n
if
(i
==
j)
{
\n
...
...
@@ -389,14 +389,17 @@ datatypes:
-
eic::VectorXYZ dimension // The dimension information of the cell [mm].
ExtraCode
:
declaration
:
"
explicit
CalorimeterHit(const
ConstCalorimeterHit&
cv)
:
cellID{cv.cellID()},
ID{cv.ID()},
layerID{cv.layerID()},
sectorID{cv.sectorID()},
clusterID{cv.clusterID()}
,
type{cv.type()},
energy{cv.energy()},
time{cv.time()},
position{cv.position()},
local{cv.local()}
,
dimension{cv.dimension()}
{}
\n
CalorimeterHit&
operator=(const
ConstCalorimeterHit&
cv)
{
cellID
=
cv.cellID();
ID
=
cv.ID();
layerID
=
cv.layerID();
sectorID
=
cv.sectorID();
clusterID
=
cv.clusterID();
type
=
cv.type();
energy
=
cv.energy();
time
=
cv.time();
position
=
cv.position();
local
=
cv.local();
dimension
=
cv.dimension();}
\n
explicit
CalorimeterHit(const
ConstCalorimeterHit&
cv)
\n
:
CalorimeterHit(cv.cellID(),
cv.ID(),
cv.layerID(),
cv.sectorID(),
cv.clusterID(),
\n
cv.type(),
cv.energy(),
cv.time(),
cv.position(),
cv.local(),
\n
cv.dimension())
{}
\n
CalorimeterHit&
operator=(const
ConstCalorimeterHit&
cv)
{
\n
auto
tmp
=
CalorimeterHit(cv.cellID(),
cv.ID(),
cv.layerID(),
cv.sectorID(),
cv.clusterID(),
\n
cv.type(),
cv.energy(),
cv.time(),
cv.position(),
cv.local(),
\n
cv.dimension());
\n
*this
=
std::move(tmp);
\n
return
*this;
\n
}
"
eic::RawTrackerHit
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment