Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DaVinci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
LHCb
DaVinci
Commits
33788256
Commit
33788256
authored
1 year ago
by
amathad
Browse files
Options
Downloads
Patches
Plain Diff
test to array of ints also
parent
d2098d5b
No related branches found
No related tags found
1 merge request
!895
Follow-up from https://gitlab.cern.ch/lhcb/Analysis/-/merge_requests/977
Pipeline
#5515910
passed
1 year ago
Stage: check
Stage: build
Stage: docs
Stage: .post
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2_with_matching.py
+11
-8
11 additions, 8 deletions
...tupling/option_davinci_tupling_from_hlt2_with_matching.py
with
11 additions
and
8 deletions
DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2_with_matching.py
+
11
−
8
View file @
33788256
...
...
@@ -94,7 +94,8 @@ def main(options: Options):
long_electrons
=
make_long_electrons_with_brem
()
relation_table_match_by_veloid
=
VeloIDOverlapRelationTable
(
MatchFrom
=
basic_particles_dz_to_kpi
,
MatchTo
=
long_electrons
)
MatchFrom
=
basic_particles_dz_to_kpi
,
MatchTo
=
long_electrons
).
OutputRelations
# make electrons with some cuts
with
reconstruction
.
bind
(
from_file
=
True
,
spruce
=
True
):
...
...
@@ -103,7 +104,8 @@ def main(options: Options):
Cut
=
F
.
FILTER
(
F
.
require_all
(
F
.
PT
>
500.
*
MeV
,
F
.
PID_E
>
1.
)))
# make a test relation table
relation_table_match_by_veloid_tight_cuts
=
VeloIDOverlapRelationTable
(
MatchFrom
=
basic_particles_dz_to_kpi
,
MatchTo
=
long_electrons_tight_cuts
)
MatchFrom
=
basic_particles_dz_to_kpi
,
MatchTo
=
long_electrons_tight_cuts
).
OutputRelations
my_filter
=
create_lines_filter
(
name
=
"
HDRFilter_D0Kpi
"
,
lines
=
[
f
"
{
line_name
}
"
])
...
...
@@ -111,15 +113,16 @@ def main(options: Options):
variables
[
"
piplus
"
]
+=
FunctorCollection
({
'
Matched_to_Electron_P[nMatchTracks]
'
:
F
.
MAP_INPUT_ARRAY
(
Functor
=
F
.
P
,
Relations
=
relation_table_match_by_veloid
.
OutputRelations
),
Functor
=
F
.
P
,
Relations
=
relation_table_match_by_veloid
),
"
Matched_to_Electron_Weight[nMatchTracks]
"
:
F
.
MAP_WEIGHT
(
Relations
=
relation_table_match_by_veloid
.
OutputRelations
),
F
.
MAP_WEIGHT
(
Relations
=
relation_table_match_by_veloid
),
'
Matched_to_Electron_P_tight_cuts[nMatchTracks_tight_cuts]
'
:
F
.
MAP_INPUT_ARRAY
(
Functor
=
F
.
P
,
Relations
=
relation_table_match_by_veloid_tight_cuts
.
OutputRelations
),
Functor
=
F
.
P
,
Relations
=
relation_table_match_by_veloid_tight_cuts
),
'
Matched_to_Electron_ID_tight_cuts[nMatchTracks_tight_cuts]
'
:
F
.
MAP_INPUT_ARRAY
(
Functor
=
F
.
PARTICLE_ID
,
Relations
=
relation_table_match_by_veloid_tight_cuts
),
})
evt_variables
=
FC
.
SelectionInfo
(
...
...
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