Commit 8b40146f authored by Rosen Matev's avatar Rosen Matev 🌲
Browse files

Merge branch 'doc_hlt1reports' into 'master'

Analysing HLT1 decision reports after HLT2

See merge request lhcb/Moore!1051
parents c5cadc07 c40c3429
......@@ -103,6 +103,7 @@ familiar to you::
ApplicationMgr,
DecayTreeTuple,
LHCbApp,
LHCb__UnpackRawEvent,
createODIN,
HltANNSvc,
HltDecReportsDecoder,
......@@ -124,10 +125,15 @@ familiar to you::
This is a temporary measure until support for Run 3 HLT2 output is added to
an LHCb application.
"""
unpacker = LHCb__UnpackRawEvent(
'UnpackRawEvent',
BankTypes=['ODIN'],
RawBankLocations=['/Event/DAQ/RawBanks/ODIN'])
dec_reports = HltDecReportsDecoder(
SourceID='Hlt2', OutputHltDecReportsLocation="/Event/Hlt2/DecReports")
reading_algs = ([reading.decoder()] + reading.unpackers() + [dec_reports] +
[createODIN()])
[unpacker, createODIN()])
if is_simulation:
reading_algs = reading.mc_unpackers() + reading_algs
return reading_algs
......@@ -285,4 +291,50 @@ To include tuple tools that use truth information, you need to ensure the
Here, ``dtt`` is the ``DecayTreeTuple`` instance you want to add the truth
tools to.
Analysing HLT1 decision reports after HLT2
-----------------------
If you run your simulation data through HLT1 and then through HLT2 you probably want to access both sets of decision reports.
The HLT1 and HLT2 decision reports are (currently) "decoded" differently (the HLT1 decision reports must use the ``TCKANNSvc``) so there are a couple of steps to this.
First run your simulation through the HLT1 step taking inspriration from the `Hlt/Hlt1Conf/tests/qmtest/persistency.qms/allen_mdf_write.qmt`_ unit test which runs::
./run gaudirun.py Hlt/Moore/tests/options/default_input_and_conds_hlt1.py Hlt/Hlt1Conf/tests/options/allen_hlt1_mdf_output.py Hlt/Hlt1Conf/options/allen_hlt1_pp_default.py
(The simulation files you are using should be ``.(x)digi`` files)
You now need to both make and assign a ``tck`` for HLT1 to use::
./run python Hlt/Hlt1Conf/tests/options/make_allen_tck.py
This uses the `get_allen_hlt1_decision_ids`_ method from Moore to collect the int->str decoding relations for the HLT1 lines. After running this you should see a file ``TCKData/config.cdb``.
We now assign this to the ``tck`` ID ``0x11300000``::
./run python ../LHCb/Hlt/HltServices/tests/options/assign_tck.py 0x11300000
The HLT1 decision reports can now by accessed using the following::
ConfigCDBAccessSvc().File = "TCKData/config.cdb"
HltDecReportsDecoder(
"Hlt1",
SourceID="Hlt1",
OutputHltDecReportsLocation="/Event/Hlt1/DecReports")
The HLT2 decision reports will still use the passed ``tck.json`` file and so you will need::
HltDecReportsDecoder(
"Hlt2",
SourceID="Hlt2",
OutputHltDecReportsLocation="/Event/Hlt2/DecReports")
Your HLT1 decision reports will then be located at ``/Event/Hlt1/DecReports`` and you HLT2 decision reports at ``/Event/Hlt2/DecReports``.
.. _analysed Turbo data: https://twiki.cern.ch/twiki/bin/view/LHCb/MakeNTupleFromTurbo
.. _Hlt/Hlt1Conf/tests/qmtest/persistency.qms/allen_mdf_write.qmt: https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt1Conf/tests/qmtest/persistency.qms/allen_mdf_write.qmt
.. _get_allen_hlt1_decision_ids: https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Moore/python/Moore/config.py
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment