Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Project Juggler
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Wiki
Code
Merge requests
21
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Project Juggler
Merge requests
!536
fix: forward support edm4eic v5
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix: forward support edm4eic v5
edm4eic-5
into
main
Overview
0
Commits
2
Pipelines
0
Changes
4
Merged
Wouter Deconinck
requested to merge
edm4eic-5
into
main
1 year ago
Overview
0
Commits
2
Pipelines
0
Changes
4
Expand
This applies the changes in
https://github.com/eic/EICrecon/pull/1241
to juggler too...
👍
0
👎
0
Merge request reports
Compare
main
version 1
bd60fd0a
1 year ago
main (base)
and
latest version
latest version
d23dfab7
2 commits,
1 year ago
version 1
bd60fd0a
1 commit,
1 year ago
4 files
+
78
−
41
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
JugTrack/src/components/ParticlesFromTrackFit.cpp
+
52
−
27
Options
@@ -22,6 +22,7 @@
#include
"Acts/EventData/MultiTrajectoryHelpers.hpp"
// Event Model related classes
#include
"edm4eic/EDM4eicVersion.h"
#include
"edm4eic/ReconstructedParticleCollection.h"
#include
"edm4eic/TrackerHitCollection.h"
#include
"edm4eic/TrackParametersCollection.h"
@@ -37,6 +38,23 @@
namespace
Jug
::
Reco
{
#if EDM4EIC_VERSION_MAJOR >= 5
// This array relates the Acts and EDM4eic covariance matrices, including
// the unit conversion to get from Acts units into EDM4eic units.
//
// Note: std::map is not constexpr, so we use a constexpr std::array
// std::array initialization need double braces since arrays are aggregates
// ref: https://en.cppreference.com/w/cpp/language/aggregate_initialization
static
constexpr
std
::
array
<
std
::
pair
<
Acts
::
BoundIndices
,
double
>
,
6
>
edm4eic_indexed_units
{{
{
Acts
::
eBoundLoc0
,
Acts
::
UnitConstants
::
mm
},
{
Acts
::
eBoundLoc1
,
Acts
::
UnitConstants
::
mm
},
{
Acts
::
eBoundTheta
,
1.
},
{
Acts
::
eBoundPhi
,
1.
},
{
Acts
::
eBoundQOverP
,
1.
/
Acts
::
UnitConstants
::
GeV
},
{
Acts
::
eBoundTime
,
Acts
::
UnitConstants
::
ns
}
}};
#endif
/** Extract the particles form fit trajectories.
*
* \ingroup tracking
@@ -116,35 +134,42 @@ namespace Jug::Reco {
debug
()
<<
" chi2 = "
<<
trajState
.
chi2Sum
<<
endmsg
;
}
const
decltype
(
edm4eic
::
TrackParametersData
::
loc
)
loc
{
auto
pars
=
track_pars
->
create
();
pars
.
setType
(
0
);
// type: track head --> 0
pars
.
setLoc
({
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundLoc0
]),
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundLoc1
])
};
const
decltype
(
edm4eic
::
TrackParametersData
::
momentumError
)
momentumError
{
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTheta
,
Acts
::
eBoundTheta
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundPhi
,
Acts
::
eBoundPhi
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundQOverP
,
Acts
::
eBoundQOverP
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTheta
,
Acts
::
eBoundPhi
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTheta
,
Acts
::
eBoundQOverP
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundPhi
,
Acts
::
eBoundQOverP
))};
const
decltype
(
edm4eic
::
TrackParametersData
::
locError
)
locError
{
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc0
,
Acts
::
eBoundLoc0
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc1
,
Acts
::
eBoundLoc1
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc0
,
Acts
::
eBoundLoc1
))};
const
float
timeError
{
sqrt
(
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTime
,
Acts
::
eBoundTime
)))};
edm4eic
::
TrackParameters
pars
{
0
,
// type: track head --> 0
loc
,
locError
,
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundTheta
]),
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundPhi
]),
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundQOverP
]),
momentumError
,
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundTime
]),
timeError
,
static_cast
<
float
>
(
boundParam
.
charge
())};
track_pars
->
push_back
(
pars
);
});
pars
.
setTheta
(
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundTheta
]));
pars
.
setPhi
(
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundPhi
]));
pars
.
setQOverP
(
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundQOverP
]));
pars
.
setTime
(
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundTime
]));
#if EDM4EIC_VERSION_MAJOR >= 5
edm4eic
::
Cov6f
cov
;
for
(
size_t
i
=
0
;
const
auto
&
[
a
,
x
]
:
edm4eic_indexed_units
)
{
for
(
size_t
j
=
0
;
const
auto
&
[
b
,
y
]
:
edm4eic_indexed_units
)
{
// FIXME why not pars.getCovariance()(i,j) = covariance(a,b) / x / y;
cov
(
i
,
j
)
=
covariance
(
a
,
b
)
/
x
/
y
;
}
}
pars
.
setCovariance
(
cov
);
#else
pars
.
setCharge
(
static_cast
<
float
>
(
boundParam
.
charge
()));
pars
.
setLocError
({
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc0
,
Acts
::
eBoundLoc0
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc1
,
Acts
::
eBoundLoc1
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc0
,
Acts
::
eBoundLoc1
))
});
pars
.
setMomentumError
({
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTheta
,
Acts
::
eBoundTheta
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundPhi
,
Acts
::
eBoundPhi
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundQOverP
,
Acts
::
eBoundQOverP
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTheta
,
Acts
::
eBoundPhi
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTheta
,
Acts
::
eBoundQOverP
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundPhi
,
Acts
::
eBoundQOverP
))
});
pars
.
setTimeError
(
sqrt
(
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTime
,
Acts
::
eBoundTime
))));
#endif
}
auto
tsize
=
trackTips
.
size
();
Loading