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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
physics_benchmarks
Commits
3d550154
Commit
3d550154
authored
Feb 25, 2021
by
Ziyue Zhang
Browse files
Options
Downloads
Patches
Plain Diff
WIP: Try out Dummy
parent
512f5cd7
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
benchmarks/dvmp/analysis/vm_mass.cxx
+1
-0
1 addition, 0 deletions
benchmarks/dvmp/analysis/vm_mass.cxx
include/util.h
+15
-2
15 additions, 2 deletions
include/util.h
with
16 additions
and
2 deletions
benchmarks/dvmp/analysis/vm_mass.cxx
+
1
−
0
View file @
3d550154
...
@@ -82,6 +82,7 @@ int vm_mass(const std::string& config_name)
...
@@ -82,6 +82,7 @@ int vm_mass(const std::string& config_name)
// util::PrintGeant4(mcparticles2);
// util::PrintGeant4(mcparticles2);
// Define analysis flow
// Define analysis flow
auto
d_im
=
d
.
Define
(
"p_rec"
,
momenta_from_tracking
,
{
"outputTrackParameters"
})
auto
d_im
=
d
.
Define
(
"p_rec"
,
momenta_from_tracking
,
{
"outputTrackParameters"
})
.
Define
(
"p_rec_test"
,
util
::
p_dummy
,
"DummyReconstructedParticls"
)
.
Define
(
"N"
,
"p_rec.size()"
)
.
Define
(
"N"
,
"p_rec.size()"
)
.
Define
(
"p_sim"
,
util
::
momenta_from_simulation
,
{
"mcparticles2"
})
.
Define
(
"p_sim"
,
util
::
momenta_from_simulation
,
{
"mcparticles2"
})
.
Define
(
"decay_pair_rec"
,
find_decay_pair
,
{
"p_rec"
})
.
Define
(
"decay_pair_rec"
,
find_decay_pair
,
{
"p_rec"
})
...
...
This diff is collapsed.
Click to expand it.
include/util.h
+
15
−
2
View file @
3d550154
...
@@ -56,7 +56,7 @@ namespace util {
...
@@ -56,7 +56,7 @@ namespace util {
}
}
// Get a vector of 4-momenta from raw tracking info, using an externally
// Get a vector of 4-momenta from raw tracking info, using an externally
// provided particle mass assumption.
// provided particle mass assumption.
//outputTrackParameters
inline
auto
momenta_from_tracking
(
const
std
::
vector
<
eic
::
TrackParametersData
>&
tracks
,
inline
auto
momenta_from_tracking
(
const
std
::
vector
<
eic
::
TrackParametersData
>&
tracks
,
const
double
mass
)
const
double
mass
)
{
{
...
@@ -75,7 +75,20 @@ namespace util {
...
@@ -75,7 +75,20 @@ namespace util {
});
});
return
momenta
;
return
momenta
;
}
}
//=====================================================================================
inline
auto
p_dummy
(
const
std
::
vector
<
eic
::
ReconstructedParticle
>&
parts
)
{
std
::
vector
<
ROOT
::
Math
::
PxPyPzMVector
>
momenta
{
tracks
.
size
()};
// transform our raw tracker info into proper 4-momenta
std
::
transform
(
parts
.
begin
(),
parts
.
end
(),
momenta
.
begin
(),
[](
const
auto
&
parts
)
{
const
double
px
=
parts
.
p
.
x
;
const
double
py
=
parts
.
p
.
y
;
const
double
pz
=
parts
.
p
.
z
;
return
ROOT
::
Math
::
PxPyPzMVector
{
px
,
py
,
pz
,
parts
.
mass
};
});
return
momenta
;
}
//=====================================================================================
// Get a vector of 4-momenta from the simulation data.
// Get a vector of 4-momenta from the simulation data.
// TODO: Add PID selector (maybe using ranges?)
// TODO: Add PID selector (maybe using ranges?)
inline
auto
momenta_from_simulation
(
const
std
::
vector
<
dd4pod
::
Geant4ParticleData
>&
parts
)
inline
auto
momenta_from_simulation
(
const
std
::
vector
<
dd4pod
::
Geant4ParticleData
>&
parts
)
...
...
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