Skip to content
Snippets Groups Projects
Commit 411f5380 authored by Samuel Belin's avatar Samuel Belin Committed by Maarten Van Veghel
Browse files

just keeping the test on FunTupleEvent

parent da8b953a
No related branches found
No related tags found
2 merge requests!1103Draft: Add AnalysisHelpers to DaVinci Stack,!926Adapt to split track container persistency
......@@ -27,7 +27,7 @@ import Functors as F
import FunTuple.functorcollections as FC
from FunTuple import FunctorCollection
from FunTuple import FunTuple_Particles as Funtuple
from PyConf.reading import get_particles, get_pvs, get_rec_summary
from PyConf.reading import get_particles, get_pvs
from DaVinci.algorithms import create_lines_filter
from PyConf.reading import get_odin # get_decreports,
from DecayTreeFitter import DecayTreeFitter
......@@ -109,7 +109,7 @@ def all_variables(pvs, dtf, mctruth, ptype, candidates=None, ftAlg=None):
# give a custom branch name for the index.
# This can be achieved by enclosing custom index
# name within square brackets (see code below).
# The branch name ("nPVs") will correspond to the
# The branch name ("nPV") will correspond to the
# index of the PV. If no index branch name given i.e.
# all_vars.update({ 'ALLPVX'] the default "indx" is used.
......@@ -293,7 +293,7 @@ def all_variables(pvs, dtf, mctruth, ptype, candidates=None, ftAlg=None):
return all_vars
def event_variables(ODIN, decreports, lines):
def event_variables(PVs, ODIN, decreports, lines):
"""
event variables
"""
......@@ -329,8 +329,8 @@ def event_variables(ODIN, decreports, lines):
# duplicated from FC evt_vars.update({ 'ODINTCK' : F.ODINTCK(ODIN)})
evt_vars.update({"PV_SIZE": F.SIZE(PVs)})
# duplicated from FC evt_vars.update({ 'GPSTIME' : F.GPSTIME(ODIN)})
# duplicated from FC evt_vars.update({ 'ODINTCK' : F.ODINTCK(ODIN)})
# duplicated from FC evt_vars.update({ 'GPSTIME' : F.GPSTIME(ODIN)})
# duplicated from FC evt_vars.update({ 'ODINTCK' : F.ODINTCK(ODIN)})
if decreports:
evt_vars.update({"TCK": F.TCK(decreports)})
......@@ -382,7 +382,7 @@ def alg_config(options: Options):
odin = get_odin()
# decreports = get_decreports('Spruce')
decreports = None
evt_vars = event_variables(odin, decreports, [bd2dsk_line + "Decision"])
evt_vars = event_variables(v2_pvs, odin, decreports, [bd2dsk_line + "Decision"])
#
# Sprucing filter
......
......@@ -37,14 +37,14 @@ def main(options: Options):
# (see MRs: https://gitlab.cern.ch/lhcb/Moore/-/merge_requests/1649)
rec_summary = get_rec_summary()
evt_vars = FunctorCollection({
'nPVs':
F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nPVs"),
'nFTClusters':
F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
'nTracks':
F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks")
})
evt_vars = FunctorCollection(
{
"nPVs": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nPVs"),
"nFTClusters": F.VALUE_OR(-1)
@ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
"nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
}
)
evt_vars += FC.EventInfo()
......
......@@ -39,14 +39,14 @@ def main(options: Options):
# Note more information can be added to the RecSummary object
# (see MRs: https://gitlab.cern.ch/lhcb/Moore/-/merge_requests/1649)
rec_summary = get_rec_summary()
evt_vars = FunctorCollection({
'nPVs':
F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nPVs"),
'nFTClusters':
F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
'nTracks':
F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks")
})
evt_vars = FunctorCollection(
{
"nPVs": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nPVs"),
"nFTClusters": F.VALUE_OR(-1)
@ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
"nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
}
)
evt_vars += FC.EventInfo()
# get particles to run over
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment