Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
physics_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
physics_benchmarks
Merge requests
!130
TCS benchmark and FF status plot
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
TCS benchmark and FF status plot
tcs-benchmark
into
master
Overview
0
Commits
6
Pipelines
0
Changes
4
Merged
Wouter Deconinck
requested to merge
tcs-benchmark
into
master
3 years ago
Overview
0
Commits
6
Pipelines
0
Changes
4
Expand
0
0
Merge request reports
Compare
master
version 5
7b701615
3 years ago
version 4
c56233c0
3 years ago
version 3
6cb31cdc
3 years ago
version 2
17ed2c30
3 years ago
version 1
c9671995
3 years ago
master (base)
and
latest version
latest version
e7d38de7
6 commits,
3 years ago
version 5
7b701615
5 commits,
3 years ago
version 4
c56233c0
4 commits,
3 years ago
version 3
6cb31cdc
3 commits,
3 years ago
version 2
17ed2c30
2 commits,
3 years ago
version 1
c9671995
1 commit,
3 years ago
4 files
+
260
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
benchmarks/tcs/analysis/tcs_tests.cxx
0 → 100644
+
60
−
0
Options
#include
<cmath>
#include
<iostream>
#include
<string>
#include
<vector>
#include
"ROOT/RDataFrame.hxx"
#include
"Math/Vector4D.h"
#include
"TCanvas.h"
#include
<nlohmann/json.hpp>
using
json
=
nlohmann
::
json
;
R__LOAD_LIBRARY
(
libfmt
.
so
)
#include
"fmt/core.h"
#include
"fmt/color.h"
R__LOAD_LIBRARY
(
libeicd
.
so
)
R__LOAD_LIBRARY
(
libDD4pod
.
so
)
#include
"eicd/InclusiveKinematicsCollection.h"
#include
"eicd/ReconstructedParticleCollection.h"
void
tcs_tests
(
const
char
*
fname
=
"rec_tcs.root"
){
fmt
::
print
(
fmt
::
emphasis
::
bold
|
fg
(
fmt
::
color
::
forest_green
),
"Running TCS analysis...
\n
"
);
// Run this in multi-threaded mode if desired
ROOT
::
EnableImplicitMT
();
ROOT
::
RDataFrame
df
(
"events"
,
fname
);
auto
df0
=
df
.
Define
(
"n_parts"
,
"ReconstructedParticles.size()"
)
.
Define
(
"isQ2gt1"
,
"InclusiveKinematicsTruth.Q2 > 1.0"
)
.
Define
(
"n_Q2gt1"
,
"isQ2gt1.size()"
);
auto
h_n_parts
=
df0
.
Histo1D
({
"h_n_parts"
,
"; h_n_parts n"
,
10
,
0
,
10
},
"n_parts"
);
auto
h_Q2
=
df0
.
Histo1D
({
"h_Q2"
,
"; Q^{2} [GeV^{2}/c^{2}]"
,
100
,
0
,
30
},
"InclusiveKinematicsTruth.Q2"
);
auto
h_ff_status
=
df0
.
Histo1D
({
"h_ff_status"
,
"; FF status"
,
10
,
-
0.5
,
9.5
},
"ReconstructedFFParticles.status"
);
auto
n_Q2gt1
=
df0
.
Mean
(
"n_Q2gt1"
);
auto
n_parts
=
df0
.
Mean
(
"n_parts"
);
// ---------------------------
// Do evaluation
auto
c
=
new
TCanvas
();
h_Q2
->
DrawCopy
();
c
->
SaveAs
(
"results/tcs/Q2.png"
);
c
->
SaveAs
(
"results/tcs/Q2.pdf"
);
fmt
::
print
(
"{} TCS events Q2>1
\n
"
,
*
n_Q2gt1
);
fmt
::
print
(
"{} tracks per event
\n
"
,
*
n_parts
);
c
=
new
TCanvas
();
h_n_parts
->
DrawCopy
();
c
->
SaveAs
(
"results/tcs/n_parts.png"
);
c
->
SaveAs
(
"results/tcs/n_parts.pdf"
);
c
=
new
TCanvas
();
h_ff_status
->
DrawCopy
();
c
->
SaveAs
(
"results/tcs/ff_status.png"
);
c
->
SaveAs
(
"results/tcs/ff_status.pdf"
);
}
Loading