Skip to content
Snippets Groups Projects
Commit 2f069eda authored by amathad's avatar amathad
Browse files

Merge branch 'master'

parents 5d0e264b 25293e9f
No related branches found
No related tags found
1 merge request!731Make "process" a required input and configure pyconf functions globally once with user input
Pipeline #4607510 failed
This commit is part of merge request !731. Comments created here will be created in the context of that merge request.
......@@ -11,7 +11,7 @@
cmake_minimum_required(VERSION 3.15)
project(DaVinci VERSION 62.0
project(DaVinci VERSION 63.0
LANGUAGES CXX)
# Enable testing with CTest/CDash
......
###############################################################################
# (c) Copyright 2022 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. #
###############################################################################
"""
Read the output of an Sprucing job with the new DaVinci configuration.
"""
from FunTuple import FunctorCollection
from FunTuple import FunTuple_Particles as Funtuple
from FunTuple.functorcollections import Kinematics
from DaVinci.algorithms import add_filter
from DaVinci import Options, make_config
from PyConf.reading import get_particles
def main(options: Options):
line_B0DsK = 'SpruceB2OC_BdToDsmK_DsmToHHH_FEST'
line_B0Dspi = 'SpruceB2OC_BdToDsmPi_DsmToKpKmPim'
bd2dsk_line = get_particles(f"/Event/Spruce/{line_B0DsK}/Particles")
bd2dspi_line = get_particles(f"/Event/Spruce/{line_B0Dspi}/Particles")
fields_dsk = {
'B0': "[B0 -> D_s- K+]CC",
'Ds': "[B0 -> ^D_s- K+]CC",
'Kp': "[B0 -> D_s- ^K+]CC"
}
fields_dspi = {
'B0': "[B0 -> D_s- pi+]CC",
'Ds': "[B0 -> ^D_s- pi+]CC",
'pip': "[B0 -> D_s- ^pi+]CC",
}
variables = FunctorCollection({
'LOKI_MAXPT': 'TRACK_MAX_PT',
'LOKI_Muonp_PT': 'CHILD(PT, 1)',
'LOKI_Muonm_PT': 'CHILD(PT, 2)',
})
variables_extra = FunctorCollection({
'LOKI_NTRCKS_ABV_THRSHLD':
'NINTREE(ISBASIC & (PT > 15*MeV))'
})
variables += variables_extra
#FunTuple: make functor collection from the imported functor library Kinematics
variables_all = Kinematics()
#FunTuple: associate functor collections to field (branch) name
variables_dsk = {
'ALL': variables_all, #adds variables to all fields
'B0': variables,
'Ds': variables_extra,
'Kp': variables_extra
}
variables_dspi = {
'ALL': variables_all, #adds variables to all fields
'B0': variables,
'Ds': variables_extra,
'pip': variables_extra,
}
loki_preamble = ['TRACK_MAX_PT = MAXTREE(ISBASIC & HASTRACK, PT, -1)']
tuple_B0DsK = Funtuple(
name="B0DsK_Tuple",
tuple_name="DecayTree",
fields=fields_dsk,
variables=variables_dsk,
loki_preamble=loki_preamble,
inputs=bd2dsk_line)
tuple_B0Dspi = Funtuple(
name="B0Dspi_Tuple",
tuple_name="DecayTree",
fields=fields_dspi,
variables=variables_dspi,
loki_preamble=loki_preamble,
inputs=bd2dspi_line)
filter_B0DsK = add_filter(options, "HDRFilter_B0DsK",
f"HLT_PASS('{line_B0DsK}')")
filter_B0Dspi = add_filter(options, "HDRFilter_B0Dspi",
f"HLT_PASS('{line_B0Dspi}')")
algs = {
"B0DsK": [filter_B0DsK, tuple_B0DsK],
"B0Dspi": [filter_B0Dspi, tuple_B0Dspi]
}
return make_config(options, algs)
......@@ -23,9 +23,9 @@ def main(options: Options):
bs2jpsiphi_line = "Hlt2Generic_Bs0ToJpsiPhi_JPsiToMupMum_Line"
bs2jpsiphi_data = get_particles(f"/Event/HLT2/{bs2jpsiphi_line}/Particles")
fields = {
'Bs': "[B_s0 -> (J/psi(1S) -> mu+ mu-) (phi(1020) -> K+ K-)]CC",
'Jpsi': "[B_s0 -> ^(J/psi(1S) -> mu+ mu-) (phi(1020) -> K+ K-)]CC",
'Phi': "[B_s0 -> (J/psi(1S) -> mu+ mu-) ^(phi(1020) -> K+ K-)]CC"
'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
......@@ -38,15 +38,15 @@ def main(options: Options):
filter_bs = add_filter("HDRFilter_Bs2JpsiPhi",
f"HLT_PASS('{bs2jpsiphi_line}')")
tuple_bs = Funtuple(
name="Bs2JpsiPhi_Tuple",
tuple_bd = Funtuple(
name="B0DsPi_Tuple",
tuple_name="DecayTree",
fields=fields,
variables=variables,
inputs=bs2jpsiphi_data)
inputs=bd2dspi_data)
algs = {
"Bs2JpsiPhi": [filter_bs, tuple_bs],
"B0Dspi": [filter_bd, tuple_bd],
}
return make_config(options, algs)
###############################################################################
# (c) Copyright 2020-2022 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. #
###############################################################################
{
'evt_max': 100,
'skip_events': 2,
'ntuple_file': 'ExampleHistos.root',
'histo_file': 'ExampleTuple.root',
'enable_unpack': False,
'process': 'Spruce'
}
###############################################################################
# (c) Copyright 2020-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. #
###############################################################################
evt_max: 100
skip_events: 2
ntuple_file: 'ExampleTuple.root'
histo_file: 'ExampleHistos.root'
enable_unpack: False
process: 'Spruce'
\ No newline at end of file
2022-10-10 DaVinci v63r0
===
This version uses
Gaudi: [v36r7](../../../../Gaudi/-/tags/v36r7),
Detector: [v1r4](../../../../Detector/-/tags/v1r4),
LHCb: [v54r0](../../../../LHCb/-/tags/v54r0),
Lbcom: [v34r0](../../../../Lbcom/-/tags/v34r0),
Rec: [v35r0](../../../../Rec/-/tags/v35r0),
Analysis: [v41r0](../../../../Analysis/-/tags/v41r0),
Allen: [v3r0](../../../../Allen/-/tags/v3r0), and
Moore: [v54r0](../../../../Moore/-/tags/v54r0)
This version is released on `master` branch.
Built relative to DaVinci [v62r0](/../../tags/v62r0), with the following changes:
### New features ~"new feature"
- ~Configuration | Follow lbexec changes, !735 (@cburr)
- DaVinci to depend on Moore, !711 (@pkoppenb)
- Upstream project highlights :star:
### Fixes ~"bug fix" ~workaround
- ~Configuration | Fix a cyclic import among 2 config related files, !755 (@erodrigu)
- Fix for handling correctly IOVProducer location in dd4hep builds, !750 (@dfazzini) [#65]
- Added lbexec ganga workaround to docs, !732 (@roneil)
- Exclude fluctuating counters, !738 (@pkoppenb)
- Upstream project highlights :star:
### Enhancements ~enhancement
- ~Configuration ~Persistency | DV change default raw_event_format to 0.5, !730 (@amathad)
- ~Persistency | Move reco_object unpacking to PyConf, !764 (@sesen)
- ~Persistency | Use simplified unpacking, !747 (@sesen)
- Adapt config related files to ThOr and fix some issues for DD4hep, !754 (@erodrigu)
- Upstream project highlights :star:
### Code cleanups and changes to tests ~modernisation ~cleanup ~testing
- ~Configuration | Delete obsoleted Phys/DaVinci/options/jobOptions-Example.* files, !766 (@erodrigu)
- ~Configuration | Removing python modules duplicated from Moore, !700 (@dfazzini) [#68]
- ~Functors | Add working composition of track related functors, !739 (@amathad)
- ~Functors ~Tuples | Adding example for track isolation variables, !665 (@tfulghes)
- ~Persistency | Adapt to LHCb!3528 - Enforce use of an encoding/decoding key (TCK) in all Hlt encoders/decoders, do not use online-reserved bits in SourceID, remove explicit mention of 'packed' locations, enable 'stable' persist reco locations, !733 (@graven)
- ~Tuples | Store information from RecSummary (nTracks, nPVs), !729 (@amathad)
- Follow up !760, !761 (@lhcbsoft)
- Update References for: LHCb!3750, Moore!1638, Analysis!918, DaVinci!747, MooreAnalysis!92 based on lhcb-master-mr/5796, !760 (@lhcbsoft)
- Add an exception in DecayTreeFit - test, !759 (@pkoppenb)
- Add exclusions according to https://gitlab.cern.ch/lhcb/DaVinci/-/issues/72, !757 (@pkoppenb)
- Update option file for the LHCbIntegration test, !749 (@dfazzini)
- Option file for the LHCbIntegration Moore-DaVinci chain, !743 (@dfazzini)
- Update References for: LHCb!3756, Rec!3102 based on lhcb-master-mr/5556, !745 (@lhcbsoft)
- Upstream project highlights :star:
### Documentation ~Documentation
- ~Functors | Add working composition of track related functors, !739 (@amathad)
- ~"MC checking" ~Tuples | Thor functors for MCTrackInfo, !716 (@jzhuo)
- ~Tuples | DaVinciExamples example of EventInfo made to use all collection arguments, !758 (@erodrigu)
- DaVinci API documentation, !751 (@mamartin)
- DaVinci docs site - a bit more structure, !742 (@erodrigu)
- DaVinci website organisation, !719 (@mamartin)
### Other
- Update References for: LHCb!3802, DaVinci!764 based on lhcb-master-mr/5837, !765 (@lhcbsoft)
- Add a new line in the end of `lhcbproject.yml`, !748 (@jzhuo)
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