Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OrcaSong
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Machine Learning
OrcaSong
Commits
cabef5b5
Commit
cabef5b5
authored
4 years ago
by
Daniel Guderian
Browse files
Options
Downloads
Patches
Plain Diff
get_std_reco now returns a dict
parent
062c7351
No related branches found
No related tags found
1 merge request
!11
Resolve "mc_info_extractor for neutrino reco chain"
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
orcasong/mc_info_extr.py
+23
-45
23 additions, 45 deletions
orcasong/mc_info_extr.py
with
23 additions
and
45 deletions
orcasong/mc_info_extr.py
+
23
−
45
View file @
cabef5b5
...
...
@@ -53,8 +53,8 @@ def get_std_reco(blob):
Returns
-------
a few reco parameters : floa
t
A few common parameters, but not all
. Can be expanded.
std_reco_info : dic
t
Dict with the most common std reco params
. Can be expanded.
"""
...
...
@@ -100,10 +100,12 @@ def get_std_reco(blob):
if
4
in
rec_stages_best_track
:
std_energy
=
best_track
[
"
E
"
]
lik_energy
=
best_track
[
"
JENERGY_CHI2
"
]
else
:
std_energy
=
dummy_value
lik_energy
=
dummy_value
#vertex and length from JStart
if
5
in
rec_stages_best_track
:
...
...
@@ -120,8 +122,16 @@ def get_std_reco(blob):
std_pos_z
=
dummy_value
std_length
=
dummy_value
std_reco_info
=
{
'
std_dir_x
'
:
std_dir_x
,
'
std_dir_y
'
:
std_dir_y
,
'
std_dir_z
'
:
std_dir_z
,
'
std_beta0
'
:
std_beta0
,
'
std_lik
'
:
std_lik
,
'
std_n_hits_gandalf
'
:
std_n_hits_gandalf
,
'
std_pos_x
'
:
std_pos_x
,
'
std_pos_y
'
:
std_pos_y
,
'
std_pos_z
'
:
std_pos_z
,
'
std_energy
'
:
std_energy
,
'
std_lik_energy
'
:
lik_energy
,
'
std_length
'
:
std_length
,
}
return
std_
dir_x
,
std_dir_y
,
std_dir_z
,
std_beta0
,
std_lik
,
std_n_hits_gandalf
,
std_pos_x
,
std_pos_y
,
std_pos_z
,
std_energy
,
std_length
return
std_
reco_info
def
get_real_data_info_extr
(
input_file
):
...
...
@@ -180,18 +190,9 @@ def get_real_data_info_extr(input_file):
#get all the std reco info
if
has_std_reco
:
std_dir_x
,
std_dir_y
,
std_dir_z
,
std_beta0
,
std_lik
,
std_n_hits_gandalf
,
std_pos_x
,
std_pos_y
,
std_pos_z
,
std_energy
,
std_length
=
get_std_reco
(
blob
)
std_info
=
{
'
std_dir_x
'
:
std_dir_x
,
'
std_dir_y
'
:
std_dir_y
,
'
std_dir_z
'
:
std_dir_z
,
'
std_beta0
'
:
std_beta0
,
'
std_lik
'
:
std_lik
,
'
std_n_hits_gandalf
'
:
std_n_hits_gandalf
,
std_reco_info
=
get_std_reco
(
blob
)
'
std_pos_x
'
:
std_pos_x
,
'
std_pos_y
'
:
std_pos_y
,
'
std_pos_z
'
:
std_pos_z
,
'
std_energy
'
:
std_energy
,
'
std_length
'
:
std_length
,
}
track
.
update
(
std_info
)
track
.
update
(
std_reco_info
)
return
track
...
...
@@ -247,17 +248,10 @@ def get_random_noise_mc_info_extr(input_file):
#get all the std reco info
if
has_std_reco
:
std_dir_x
,
std_dir_y
,
std_dir_z
,
std_beta0
,
std_lik
,
std_n_hits_gandalf
,
std_pos_x
,
std_pos_y
,
std_pos_z
,
std_energy
,
std_length
=
get_std_reco
(
blob
)
std_info
=
{
'
std_dir_x
'
:
std_dir_x
,
'
std_dir_y
'
:
std_dir_y
,
'
std_dir_z
'
:
std_dir_z
,
'
std_beta0
'
:
std_beta0
,
'
std_lik
'
:
std_lik
,
'
std_n_hits_gandalf
'
:
std_n_hits_gandalf
,
'
std_pos_x
'
:
std_pos_x
,
'
std_pos_y
'
:
std_pos_y
,
'
std_pos_z
'
:
std_pos_z
,
'
std_energy
'
:
std_energy
,
'
std_length
'
:
std_length
,
}
std_reco_info
=
get_std_reco
(
blob
)
track
.
update
(
std_info
)
track
.
update
(
std_
reco_
info
)
return
track
...
...
@@ -349,17 +343,9 @@ def get_neutrino_mc_info_extr(input_file):
#get all the std reco info
if
has_std_reco
:
std_dir_x
,
std_dir_y
,
std_dir_z
,
std_beta0
,
std_lik
,
std_n_hits_gandalf
,
std_pos_x
,
std_pos_y
,
std_pos_z
,
std_energy
,
std_length
=
get_std_reco
(
blob
)
std_info
=
{
'
std_dir_x
'
:
std_dir_x
,
'
std_dir_y
'
:
std_dir_y
,
'
std_dir_z
'
:
std_dir_z
,
'
std_beta0
'
:
std_beta0
,
'
std_lik
'
:
std_lik
,
'
std_n_hits_gandalf
'
:
std_n_hits_gandalf
,
std_reco_info
=
get_std_reco
(
blob
)
'
std_pos_x
'
:
std_pos_x
,
'
std_pos_y
'
:
std_pos_y
,
'
std_pos_z
'
:
std_pos_z
,
'
std_energy
'
:
std_energy
,
'
std_length
'
:
std_length
,
}
track
.
update
(
std_info
)
track
.
update
(
std_reco_info
)
return
track
...
...
@@ -458,18 +444,10 @@ def get_muon_mc_info_extr(input_file):
#get all the std reco info
if
has_std_reco
:
std_dir_x
,
std_dir_y
,
std_dir_z
,
std_beta0
,
std_lik
,
std_n_hits_gandalf
,
std_pos_x
,
std_pos_y
,
std_pos_z
,
std_energy
,
std_length
=
get_std_reco
(
blob
)
std_info
=
{
'
std_dir_x
'
:
std_dir_x
,
'
std_dir_y
'
:
std_dir_y
,
'
std_dir_z
'
:
std_dir_z
,
'
std_beta0
'
:
std_beta0
,
'
std_lik
'
:
std_lik
,
'
std_n_hits_gandalf
'
:
std_n_hits_gandalf
,
'
std_pos_x
'
:
std_pos_x
,
'
std_pos_y
'
:
std_pos_y
,
'
std_pos_z
'
:
std_pos_z
,
'
std_energy
'
:
std_energy
,
'
std_length
'
:
std_length
,
}
std_reco_info
=
get_std_reco
(
blob
)
track
.
update
(
std_info
)
track
.
update
(
std_
reco_
info
)
return
track
...
...
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