Skip to content
Snippets Groups Projects
Commit 84ca2c33 authored by Patrick Koppenburg's avatar Patrick Koppenburg :leaves:
Browse files

Merge branch 'pkoppenb-readMoore' into 'master'

Add test for reading a Moore DST

See merge request !521
parents c8ccca7d a876a425
No related branches found
No related tags found
2 merge requests!1103Draft: Add AnalysisHelpers to DaVinci Stack,!521Add test for reading a Moore DST
Pipeline #2443383 passed
###############################################################################
# (c) Copyright 2021 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 of a DST produced by HLT2 (Moore).
"""
__author__ = "Patrick Koppenburg"
__date__ = "2021-03-22"
from PyConf.application import configure, configure_input
from PyConf.control_flow import CompositeNode, NodeLogic
from PyConf.Algorithms import PrintDecayTree
from DaVinci import options
from DaVinci.reco_objects import upfront_reconstruction_from_file as upfront_reconstruction
from DaVinci.common_particles import make_std_loose_d2kk
options.evt_max = -1
options.print_freq = 1
options.msg_svc_format = "% F%60W%S%7W%R%T %0W%M"
d0s = make_std_loose_d2kk()
pdt = PrintDecayTree(name="PrintD0s", Input=d0s)
# the "upfront_reconstruction" is what unpacks reconstruction objects, particles and primary vertices
# from file and creates protoparticles.
algs = upfront_reconstruction() + [d0s, pdt]
node = CompositeNode(
"PrintD0Node", children=algs, combine_logic=NodeLogic.NONLAZY_AND)
# File from Moore test
options.set_input_and_conds_from_testfiledb("Moore-Output-DST")
config = configure_input(options)
config.update(configure(options, node))
<?xml version="1.0" ?>
<!--
(c) Copyright 2021 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.
@author P. Koppenburg 2021-03-26
-->
<!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
<extension class="GaudiTest.GaudiExeTest" kind="test">
<argument name="program"><text>gaudirun.py</text></argument>
<argument name="timeout"><integer>3600</integer></argument>
<argument name="args"><set>
<text>../options/DVTestReadMooreOutput.py</text>
</set></argument>
<argument name="validator"><text>
findReferenceBlock("""StdLooseD02KK INFO Number of counters : 9
| Counter | # | sum | mean/eff^* | rms/err^* | min | max |
| "# D0 -> K+ K- " | 21 | 8 | 0.38095 | 0.48562 | 0.0000 | 1.0000 |
| "# K+" | 21 | 54 | 2.5714 | 2.2376 | 0.0000 | 8.0000 |
| "# K-" | 21 | 55 | 2.6190 | 1.8892 | 0.0000 | 7.0000 |
| "# StdLooseKaons/Particles" | 21 | 109 | 5.1905 | 3.0334 | 1.0000 | 12.000 |
| "# input particles" | 21 | 109 | 5.1905 | 3.0334 | 1.0000 | 12.000 |
| "# selected" | 21 | 8 | 0.38095 |
|*"#accept" | 21 | 8 |( 38.09524 +- 10.59712)% |
| "#pass combcut" | 148 | 8 | 0.054054 |
| "#pass mother cut" | 8 | 8 | 1.0000 |
""", stdout, result, causes, signature_offset = 0, id = "Stream3")
</text></argument>
</extension>
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