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
Commits
af5f691e
Commit
af5f691e
authored
3 years ago
by
Maria Zurek
Committed by
Jihee Kim
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Convert vectors to scalars in dataframe functions
parent
8096e970
No related branches found
No related tags found
1 merge request
!25
Convert vectors to scalars in dataframe functions
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
benchmarks/barrel_ecal/config.yml
+1
-1
1 addition, 1 deletion
benchmarks/barrel_ecal/config.yml
benchmarks/barrel_ecal/scripts/emcal_barrel_electrons_analysis.cxx
+6
-14
6 additions, 14 deletions
...s/barrel_ecal/scripts/emcal_barrel_electrons_analysis.cxx
with
7 additions
and
15 deletions
benchmarks/barrel_ecal/config.yml
+
1
−
1
View file @
af5f691e
...
...
@@ -31,7 +31,7 @@ collect_results:barrel_ecal:
extends
:
.det_benchmark
stage
:
collect
needs
:
-
[
"
bench:emcal_barrel_pions"
,
"
sim
:emcal_barrel_electrons"
]
-
[
"
bench:emcal_barrel_pions"
,
"
bench
:emcal_barrel_electrons"
]
script
:
-
ls -lrht
This diff is collapsed.
Click to expand it.
benchmarks/barrel_ecal/scripts/emcal_barrel_electrons_analysis.cxx
+
6
−
14
View file @
af5f691e
...
...
@@ -37,9 +37,9 @@ void emcal_barrel_electrons_analysis(const char* input_fname = "sim_output/sim_e
// Thrown Energy [GeV]
auto
Ethr
=
[](
std
::
vector
<
dd4pod
::
Geant4ParticleData
>
const
&
input
)
{
std
::
vector
<
double
>
result
;
result
.
push_back
(
TMath
::
Sqrt
(
input
[
2
].
psx
*
input
[
2
].
psx
+
input
[
2
].
psy
*
input
[
2
].
psy
+
input
[
2
].
psz
*
input
[
2
].
psz
+
input
[
2
].
mass
*
input
[
2
]
.
mass
)
)
;
return
result
;
auto
p
=
input
[
2
]
;
auto
energy
=
TMath
::
Sqrt
(
p
.
psx
*
p
.
psx
+
p
.
psy
*
p
.
psy
+
p
.
psz
*
p
.
psz
+
p
.
mass
*
p
.
mass
);
return
energy
;
};
// Number of hits
...
...
@@ -47,23 +47,15 @@ void emcal_barrel_electrons_analysis(const char* input_fname = "sim_output/sim_e
// Energy deposition [GeV]
auto
Esim
=
[](
const
std
::
vector
<
dd4pod
::
CalorimeterHitData
>&
evt
)
{
std
::
vector
<
double
>
result
;
auto
total_edep
=
0.0
;
for
(
const
auto
&
i
:
evt
)
total_edep
+=
i
.
energyDeposit
;
result
.
push_back
(
total_edep
);
return
result
;
return
total_edep
;
};
// Sampling fraction = Esampling / Ethrown
auto
fsam
=
[](
const
std
::
vector
<
double
>&
sampled
,
const
std
::
vector
<
double
>&
thrown
)
{
std
::
vector
<
double
>
result
;
for
(
const
auto
&
E1
:
thrown
)
{
for
(
const
auto
&
E2
:
sampled
)
result
.
push_back
(
E2
/
E1
);
}
return
result
;
auto
fsam
=
[](
const
double
sampled
,
const
double
thrown
)
{
return
sampled
/
thrown
;
};
// Define variables
...
...
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