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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
reconstruction_benchmarks
Commits
bcb173f1
Commit
bcb173f1
authored
Feb 3, 2022
by
Jihee Kim
Browse files
Options
Downloads
Patches
Plain Diff
testing
parent
17e61040
No related branches found
No related tags found
1 merge request
!237
Resolve "Add ZDC benchmark"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmarks/far_forward/analysis/analysis_zdc_neutrons.cxx
+7
-27
7 additions, 27 deletions
benchmarks/far_forward/analysis/analysis_zdc_neutrons.cxx
with
7 additions
and
27 deletions
benchmarks/far_forward/analysis/analysis_zdc_neutrons.cxx
+
7
−
27
View file @
bcb173f1
...
...
@@ -23,6 +23,7 @@
R__LOAD_LIBRARY
(
libeicd
.
so
)
R__LOAD_LIBRARY
(
libDD4pod
.
so
)
#include
"fmt/core.h"
#include
"DD4hep/Detector.h"
#include
"DDG4/Geant4Data.h"
#include
"DDRec/CellIDPositionConverter.h"
...
...
@@ -75,43 +76,22 @@ void analysis_zdc_neutrons(const char* input_fname = "sim_zdc_uniform_neutron.ro
// Theta [mrad]
auto
Thetathr
=
[](
std
::
vector
<
dd4pod
::
Geant4ParticleData
>
const
&
input
)
{
auto
p
=
input
[
2
];
TVector3
mom
(
p
.
ps
.
x
,
p
.
ps
.
y
,
p
.
ps
.
z
);
// removing crossing angle
auto
crossing_angle
=
-
0.025
;
// unit [rad]
auto
sin_term
=
std
::
sin
(
-
crossing_angle
);
auto
cos_term
=
std
::
cos
(
-
crossing_angle
);
auto
pz
=
cos_term
*
mom
.
Z
()
-
sin_term
*
mom
.
X
();
auto
px
=
sin_term
*
mom
.
Z
()
+
cos_term
*
mom
.
X
();
TVector3
org_mom
(
px
,
mom
.
Y
(),
pz
);
return
org_mom
.
Theta
()
*
1000.0
;
auto
theta
=
p
.
ps
.
theta
();
return
theta
*
1000.0
;
};
// Phi [rad]
auto
Phithr
=
[](
std
::
vector
<
dd4pod
::
Geant4ParticleData
>
const
&
input
)
{
auto
p
=
input
[
2
];
TVector3
mom
(
p
.
ps
.
x
,
p
.
ps
.
y
,
p
.
ps
.
z
);
// removing crossing angle
auto
crossing_angle
=
-
0.025
;
// unit [rad]
auto
s
=
std
::
sin
(
-
crossing_angle
);
auto
c
=
std
::
cos
(
-
crossing_angle
);
auto
pz
=
c
*
mom
.
Z
()
-
s
*
mom
.
X
();
auto
px
=
s
*
mom
.
Z
()
+
c
*
mom
.
X
();
TVector3
transmom
(
px
,
mom
.
Y
(),
pz
);
return
transmom
.
Phi
();
auto
phi
=
p
.
ps
.
phi
();
return
phi
;
};
// Eta
auto
Etathr
=
[](
std
::
vector
<
dd4pod
::
Geant4ParticleData
>
const
&
input
)
{
auto
p
=
input
[
2
];
TVector3
mom
(
p
.
ps
.
x
,
p
.
ps
.
y
,
p
.
ps
.
z
);
// removing crossing angle
auto
crossing_angle
=
-
0.025
;
// unit [rad]
auto
sin_term
=
std
::
sin
(
-
crossing_angle
);
auto
cos_term
=
std
::
cos
(
-
crossing_angle
);
auto
pz
=
cos_term
*
mom
.
Z
()
-
sin_term
*
mom
.
X
();
auto
px
=
sin_term
*
mom
.
Z
()
+
cos_term
*
mom
.
X
();
TVector3
org_mom
(
px
,
mom
.
Y
(),
pz
);
return
org_mom
.
Eta
();
auto
eta
=
p
.
ps
.
eta
();
return
eta
;
};
// 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