Skip to content
Snippets Groups Projects

Update options for LHCb integration tests

Merged Davide Fazzini requested to merge dfazzini_update_lhcbint_test into master
All threads resolved!
Files
2
###############################################################################
# (c) Copyright 2022-2023 CERN for the benefit of the LHCb Collaboration #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
"""
Test for checking the correct processing of Hlt2 .dst file where packed reco
objects are persisted by means of a pass through line.
"""
from PyConf.reading import get_particles
import Functors as F
from FunTuple import FunTuple_Particles as Funtuple
from FunTuple import FunctorCollection
import FunTuple.functorcollections as FC
from DaVinci import Options, make_config
from DaVinci.algorithms import add_filter
def main(options: Options):
line_bd2dspi = 'Hlt2B2OC_BdToDsmPi_DsmToKpKmPim'
data_bd2dspi = get_particles(f"/Event/HLT2/{line_bd2dspi}/Particles")
fields_dspi = {
'B0': "[B0 -> D_s- pi+]CC",
'Ds': "[B0 -> ^D_s- pi+]CC",
'pip': "[B0 -> D_s- ^pi+]CC",
}
#FunTuple: make functor collection from the imported functor library Kinematic
variables_all = FC.Kinematics()
variables = FunctorCollection({
'LOKI_daug1_PT': F.CHILD(1, F.PT),
'LOKI_daug2_PT': F.CHILD(2, F.PT),
})
variables_extra = FunctorCollection({
'LOKI_NTRCKS_ABV_THRSHLD':
'NINTREE(ISBASIC & (PT > 15*MeV))'
})
variables += variables_extra
#FunTuple: associate functor collections to field name
variables_dspi = {
'ALL': variables_all, #adds variables to all fields
'B0': variables,
'Ds': variables_extra,
'pip': variables_extra,
}
tuple_bd2dspi = Funtuple(
name="B0DsPi_Tuple",
tuple_name="DecayTree",
fields=fields_dspi,
variables=variables_dspi,
inputs=data_bd2dspi)
filter_bd2dspi = add_filter("HDRFilter_B0DsPi",
f"HLT_PASS('{line_bd2dspi}')")
algs = {
"B0DsPi": [filter_bd2dspi, tuple_bd2dspi],
}
return make_config(options, algs)
Loading