Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reconstruction_benchmarks
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
reconstruction_benchmarks
Commits
d6668f47
Commit
d6668f47
authored
3 years ago
by
Alex Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Still working.
parent
2bb9d0ba
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmarks/far_forward/scripts/hits_far_forward_protons.cxx
+22
-2
22 additions, 2 deletions
benchmarks/far_forward/scripts/hits_far_forward_protons.cxx
with
22 additions
and
2 deletions
benchmarks/far_forward/scripts/hits_far_forward_protons.cxx
+
22
−
2
View file @
d6668f47
...
@@ -19,6 +19,11 @@ R__LOAD_LIBRARY(libDD4pod.so)
...
@@ -19,6 +19,11 @@ R__LOAD_LIBRARY(libDD4pod.so)
using
ROOT
::
RDataFrame
;
using
ROOT
::
RDataFrame
;
using
namespace
ROOT
::
VecOps
;
using
namespace
ROOT
::
VecOps
;
dd4hep
::
Detector
&
detector
=
dd4hep
::
Detector
::
getInstance
();
detector
.
fromCompact
(
"eic_ip6.xml"
);
dd4hep
::
rec
::
CellIDPositionConverter
cellid_converter
(
detector
);
auto
p_track
=
[](
std
::
vector
<
eic
::
TrackParametersData
>
const
&
in
)
{
auto
p_track
=
[](
std
::
vector
<
eic
::
TrackParametersData
>
const
&
in
)
{
std
::
vector
<
double
>
result
;
std
::
vector
<
double
>
result
;
for
(
size_t
i
=
0
;
i
<
in
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
in
.
size
();
++
i
)
{
...
@@ -80,7 +85,7 @@ auto delta_p_over_p = [](const std::vector<double>& tracks, const std::vector<do
...
@@ -80,7 +85,7 @@ auto delta_p_over_p = [](const std::vector<double>& tracks, const std::vector<do
return
res
;
return
res
;
};
};
auto
local_position
=
[
&
](
const
std
::
vector
<
dd4pod
::
TrackerHitData
>&
hits
)
{
auto
local_position
=
[](
const
std
::
vector
<
dd4pod
::
TrackerHitData
>&
hits
)
{
std
::
vector
<
std
::
array
<
double
,
2
>>
result
;
std
::
vector
<
std
::
array
<
double
,
2
>>
result
;
for
(
const
auto
&
h
:
hits
)
{
for
(
const
auto
&
h
:
hits
)
{
// The actual hit position:
// The actual hit position:
...
@@ -97,6 +102,21 @@ auto local_position = [&](const std::vector<dd4pod::TrackerHitData>& hits) {
...
@@ -97,6 +102,21 @@ auto local_position = [&](const std::vector<dd4pod::TrackerHitData>& hits) {
return
result
;
return
result
;
};
};
auto
x_pos
=
[](
const
std
::
vector
<
std
::
array
<
double
,
2
>>&
xypos
)
{
std
::
vector
<
double
>
result
;
for
(
const
auto
&
h
:
xypos
)
{
result
.
push_back
(
h
.
at
(
0
));
}
return
result
;
};
auto
y_pos
=
[](
const
std
::
vector
<
std
::
array
<
double
,
2
>>&
xypos
)
{
std
::
vector
<
double
>
result
;
for
(
auto
h
:
xypos
)
{
result
.
push_back
(
h
.
at
(
1
));
}
return
result
;
};
int
hits_far_forward_protons
(
const
char
*
fname
=
"sim_far_forward_protons.root"
)
int
hits_far_forward_protons
(
const
char
*
fname
=
"sim_far_forward_protons.root"
)
{
{
...
@@ -130,7 +150,7 @@ int hits_far_forward_protons(const char* fname = "sim_far_forward_protons.root")
...
@@ -130,7 +150,7 @@ int hits_far_forward_protons(const char* fname = "sim_far_forward_protons.root")
.
Define
(
"y_pos"
,
y_pos
,
{
"xy_hit_pos"
})
.
Define
(
"y_pos"
,
y_pos
,
{
"xy_hit_pos"
})
;
;
auto
h_local_pos
=
d
1
.
Histo2D
({
"h_local_pos"
,
";x [cm]; y [cm] "
,
100
,
-
5.0
,
5.0
,
100
,
-
5.0
,
5.0
},
"x_pos"
,
"y_pos"
);
auto
h_local_pos
=
d
f0
.
Histo2D
({
"h_local_pos"
,
";x [cm]; y [cm] "
,
100
,
-
5.0
,
5.0
,
100
,
-
5.0
,
5.0
},
"x_pos"
,
"y_pos"
);
...
...
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