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
!131
tcs_tests.cxx: plot theta in mrad for various FF detectors
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
tcs_tests.cxx: plot theta in mrad for various FF detectors
ff-theta-for-detectors
into
master
Overview
0
Commits
12
Pipelines
0
Changes
1
Merged
Wouter Deconinck
requested to merge
ff-theta-for-detectors
into
master
3 years ago
Overview
0
Commits
12
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
553a1de2
Prev
Next
Show latest version
1 file
+
20
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
553a1de2
From filter to lambda
· 553a1de2
Wouter Deconinck
authored
3 years ago
benchmarks/tcs/analysis/tcs_tests.cxx
+
20
−
9
Options
@@ -28,23 +28,34 @@ void tcs_tests(const char* fname = "rec_tcs.root"){
ROOT
::
EnableImplicitMT
();
ROOT
::
RDataFrame
df
(
"events"
,
fname
);
auto
ff_theta_mrad
=
[]
(
const
std
::
vector
<
eic
::
ReconstructedParticle
>&
v
,
const
size_t
status
)
{
std
::
vector
<
float
>
theta
;
for
(
const
auto
&
p
:
v
)
{
if
(
p
.
status
==
status
)
{
theta
.
push_back
(
1000.
*
p
.
direction
.
theta
);
}
}
};
auto
df0
=
df
.
Define
(
"n_parts"
,
"ReconstructedParticles.size()"
)
.
Define
(
"isQ2gt1"
,
"InclusiveKinematicsTruth.Q2 > 1.0"
)
.
Define
(
"n_Q2gt1"
,
"isQ2gt1.size()"
)
.
Define
(
"theta_mrad"
,
"1000. * ReconstructedFFParticles.direction.theta"
)
.
Define
(
"isFFB0"
,
"ReconstructedFFParticles.status == 1"
)
.
Define
(
"isFFRP"
,
"ReconstructedFFParticles.status == 2"
)
.
Define
(
"isFFOMD"
,
"ReconstructedFFParticles.status == 3"
)
.
Define
(
"isFFZDC"
,
"ReconstructedFFParticles.status == 4"
)
.
Define
(
"ff_theta_mrad_B0"
,
ff_theta_mrad
,
{
"ReconstructedFFParticles"
,
"1"
})
.
Define
(
"ff_theta_mrad_RP"
,
ff_theta_mrad
,
{
"ReconstructedFFParticles"
,
"2"
})
.
Define
(
"ff_theta_mrad_OMD"
,
ff_theta_mrad
,
{
"ReconstructedFFParticles"
,
"3"
})
.
Define
(
"ff_theta_mrad_ZDC"
,
ff_theta_mrad
,
{
"ReconstructedFFParticles"
,
"4"
})
;
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
=
df0
.
Histo1D
({
"h_FF"
,
"; FF status"
,
10
,
-
0.5
,
9.5
},
"ReconstructedFFParticles.status"
);
auto
h_FF_B0
=
df0
.
Filter
(
"isFFB0"
).
Histo1D
({
"h_FF_B0"
,
"; FF B0 Theta [mrad]"
,
10
,
0.0
,
25.0
},
"theta_mrad"
);
auto
h_FF_RP
=
df0
.
Filter
(
"isFFRP"
).
Histo1D
({
"h_FF_RP"
,
"; FF RP Theta [mrad]"
,
10
,
0.0
,
25.0
},
"theta_mrad"
);
auto
h_FF_OMD
=
df0
.
Filter
(
"isFFOMD"
).
Histo1D
({
"h_FF_OMD"
,
"; FF OMD Theta [mrad]"
,
10
,
0.0
,
25.0
},
"theta_mrad"
);
auto
h_FF_ZDC
=
df0
.
Filter
(
"isFFZDC"
).
Histo1D
({
"h_FF_ZDC"
,
"; FF ZDC Theta [mrad]"
,
10
,
0.0
,
25.0
},
"theta_mrad"
);
auto
h_FF_B0
=
df0
.
Histo1D
({
"h_FF_B0"
,
"; FF B0 Theta [mrad]"
,
10
0
,
0.0
,
25.0
},
"
ff_
theta_mrad
_B0
"
);
auto
h_FF_RP
=
df0
.
Histo1D
({
"h_FF_RP"
,
"; FF RP Theta [mrad]"
,
10
0
,
0.0
,
25.0
},
"
ff_
theta_mrad
_RP
"
);
auto
h_FF_OMD
=
df0
.
Histo1D
({
"h_FF_OMD"
,
"; FF OMD Theta [mrad]"
,
10
0
,
0.0
,
25.0
},
"
ff_
theta_mrad
_OMD
"
);
auto
h_FF_ZDC
=
df0
.
Histo1D
({
"h_FF_ZDC"
,
"; FF ZDC Theta [mrad]"
,
10
0
,
0.0
,
25.0
},
"
ff_
theta_mrad
_ZDC
"
);
auto
n_Q2gt1
=
df0
.
Mean
(
"n_Q2gt1"
);
auto
n_parts
=
df0
.
Mean
(
"n_parts"
);
Loading