Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
detector_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
detector_benchmarks
Merge requests
!77
Resolve "B0Tracker acceptance tests"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Resolve "B0Tracker acceptance tests"
50-b0tracker-acceptance-tests
into
master
Overview
0
Commits
1
Pipelines
0
Changes
3
Open
Alex Jentsch
requested to merge
50-b0tracker-acceptance-tests
into
master
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
3
Expand
Closes
#50
Edited
3 years ago
by
Alex Jentsch
0
0
Merge request reports
Compare
master
version 12
af5f7c13
3 years ago
version 11
cbee19db
3 years ago
version 10
582f72b6
3 years ago
version 9
510cb6cb
3 years ago
version 8
548e97b5
3 years ago
version 7
0bcbf163
3 years ago
version 6
2b677af9
3 years ago
version 5
cab2b05c
3 years ago
version 4
21eeb20d
3 years ago
version 3
d3a75da2
3 years ago
version 2
8984a51f
3 years ago
version 1
cf469f0c
3 years ago
master (base)
and
latest version
latest version
af5f7c13
1 commit,
1 year ago
version 12
af5f7c13
1 commit,
3 years ago
version 11
cbee19db
18 commits,
3 years ago
version 10
582f72b6
17 commits,
3 years ago
version 9
510cb6cb
16 commits,
3 years ago
version 8
548e97b5
7 commits,
3 years ago
version 7
0bcbf163
7 commits,
3 years ago
version 6
2b677af9
6 commits,
3 years ago
version 5
cab2b05c
5 commits,
3 years ago
version 4
21eeb20d
4 commits,
3 years ago
version 3
d3a75da2
3 commits,
3 years ago
version 2
8984a51f
2 commits,
3 years ago
version 1
cf469f0c
1 commit,
3 years ago
3 files
+
62
−
21
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
benchmarks/b0_tracker/scripts/b0_tracker_hits.cxx
+
50
−
8
Options
@@ -36,25 +36,67 @@ void b0_tracker_hits(const char* fname = "./sim_output/sim_forward_protons.root"
ROOT
::
RDataFrame
d0
(
*
t
);
auto
hits_eta
=
[
&
](
const
std
::
vector
<
dd4pod
::
TrackerHitData
>&
hits
)
{
auto
hits_
th
eta
=
[
&
](
const
std
::
vector
<
dd4pod
::
TrackerHitData
>&
hits
)
{
std
::
vector
<
double
>
result
;
for
(
const
auto
&
h
:
hits
)
{
ROOT
::
Math
::
XYZVector
vec
(
h
.
position
.
x
,
h
.
position
.
y
,
h
.
position
.
z
);
result
.
push_back
(
vec
.
eta
());
std
::
cout
<<
vec
.
eta
()
<<
"
\n
"
;
result
.
push_back
(
1000
*
vec
.
th
eta
());
std
::
cout
<<
1000
*
vec
.
th
eta
()
<<
"
\n
"
;
}
return
result
;
};
auto
d1
=
d0
.
Define
(
"hits_eta"
,
hits_eta
,
{
"B0TrackerHits"
});
auto
local_position
=
[
&
](
const
std
::
vector
<
dd4pod
::
TrackerHitData
>&
hits
)
{
std
::
vector
<
std
::
array
<
double
,
2
>>
result
;
for
(
const
auto
&
h
:
hits
)
{
auto
pos0
=
(
h
.
position
);
result
.
push_back
({
pos0
.
x
,
pos0
.
y
});
}
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
h1
=
d1
.
Histo1D
({
"h1"
,
"hits_eta"
,
100
,
0
,
20
},
"hits_eta"
);
auto
y_pos
=
[
&
](
const
std
::
vector
<
std
::
array
<
double
,
2
>>&
xypos
)
{
std
::
vector
<
double
>
result
;
for
(
const
auto
&
h
:
xypos
)
{
result
.
push_back
(
h
.
at
(
1
));
}
return
result
;
};
auto
d1
=
d0
.
Define
(
"nhits"
,
hits_theta
,
{
"B0TrackerHits"
})
.
Define
(
"xy_hit_pos"
,
local_position
,
{
"B0TrackerHits"
})
.
Define
(
"x_pos"
,
x_pos
,
{
"xy_hit_pos"
})
.
Define
(
"y_pos"
,
y_pos
,
{
"xy_hit_pos"
});
auto
h_local_pos
=
d1
.
Histo2D
({
"h_local_pos"
,
";x [mm]; y [mm] "
,
100
,
-
100.0
,
-
200.0
,
100
,
-
100.0
,
100.0
},
"x_pos"
,
"y_pos"
);
auto
d2
=
d0
.
Define
(
"hits_theta"
,
hits_theta
,
{
"B0TrackerHits"
});
auto
h1
=
d2
.
Histo1D
({
"h1"
,
"hits_theta"
,
100
,
0
,
20
},
"hits_theta"
);
TCanvas
*
c
=
new
TCanvas
();
h1
->
DrawCopy
();
c
->
SaveAs
(
"results/b0_tracker_hits_eta.png"
);
c
->
SaveAs
(
"results/b0_tracker_hits_eta.pdf"
);
c
->
SaveAs
(
"results/b0_tracker_hits_theta.png"
);
c
->
SaveAs
(
"results/b0_tracker_hits_theta.pdf"
);
h_local_pos
->
DrawCopy
(
"colz"
);
c
->
SaveAs
(
"results/b0_tracker_hits_occupancy_disk_1.png"
);
c
->
SaveAs
(
"results/b0_tracker_hits_occupancy_disk_1.pdf"
);
auto
n1
=
h1
->
GetMean
();
std
::
cout
<<
"P
seudorapidity
of hits: "
<<
n1
<<
std
::
endl
;
std
::
cout
<<
"P
olar angle
of hits: "
<<
n1
<<
std
::
endl
;
//if (n1 < 5) {
// std::quick_exit(1);
Loading