Skip to content
Snippets Groups Projects

Add TurboStream and StrippingStream properties

Merged Michael Thomas Alexander requested to merge malexand-addstreamconfig-master into master
5 files
+ 189
2
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 42
0
###############################################################################
# (c) Copyright 2020 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 accessing candidates on Turbo mdst.'''
from Configurables import DaVinci, LoKi__HDRFilter
from GaudiConf import IOHelper
from PhysSelPython.Wrappers import AutomaticData, ValidBPVSelection, SelectionSequence
# 2018 Turbo data.
IOHelper('ROOT').inputFiles([
'PFN:root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/swtest/lhcb/LHCb/Collision18/CHARMTWOBODY.MDST/00075136/0000/00075136_00000005_1.charmtwobody.mdst',
'PFN:root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/swtest/lhcb/LHCb/Collision18/CHARMTWOBODY.MDST/00075136/0000/00075136_00000012_1.charmtwobody.mdst',
'PFN:root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/swtest/lhcb/LHCb/Collision18/CHARMTWOBODY.MDST/00075136/0000/00075136_00000026_1.charmtwobody.mdst',
])
# Configure the data settings.
DaVinci().TurboStream = 'Charmtwobody'
DaVinci().DataType = '2018'
DaVinci().DDDBtag = 'dddb-20190206-3'
DaVinci().CondDBtag = 'cond-20191004-3'
DaVinci().EvtMax = 1000
# Get particles from an HLT2 line and check that they have a valid BPV
line = 'Hlt2CharmHadDstp2D0Pip_D02KmPipTurbo'
data = AutomaticData(line + '/Particles')
validbpv = ValidBPVSelection([data])
selseq = SelectionSequence(line + 'Seq', TopSelection=validbpv)
DaVinci().UserAlgorithms.append(selseq.sequence())
DaVinci().EventPreFilters = [
LoKi__HDRFilter(
'PreFilter',
Code='HLT_PASS({0!r})'.format(line + 'Decision'),
Location='Hlt2/DecReports')
]
Loading