Existing test chains

Currently some test chains have been implemented testing the whole offline chain starting with the HLT1 step in Moore up to the production of the final user-ntuples generated with FunTuple in DaVinci. Each test is repeated both on a data and a simulated sample to assert the correct behaviour in both cases.

You can issue the following command to run a whole test chain (e.g. Tupling_default) and generate the final root files:

run make test ARGS="-R LHCbIntegrationTests.Tupling_default"

Or, if you are working on an LHCb stack:

make fast/LHCbIntegrationTests/test ARGS="-R Tupling_default"

Moore+DaVinci chain

Simple test checking that both Moore and DaVinci application can be run correctly. Similar chains can be created for other LHCb applications if they are included in any test of this package.

Validation of Moore-DaVinci chain with default configuration

Project to validate the Moore-DaVinci-Tupling workflow. It consists of different tests, each one dedicated to test a specific step of the chain. All the test commands are reported in the Tupling_default/CMakeLists.txt file. The test chain starts with a MC .digi file available in the _TestFileDB_ and creates a root file containing a tuple produced with _FunTuple_. The final tuple is created reading both a passthrough and a Sprucing dst file. Each step of the chain is run using the Utilitites/logscript.sh script that saves the corresponding _stdout_ and _stderr_. The _stderr_ is then used for step validation by means of the Utilities/validator.sh script ensuring no error is dumped in the _stderr_. For the two final tuples an additional validation is performed using the Utilities/validator_tuple.py script checking that the _DecayTree_ is not empty and contains exactly all the expected branches.

The test chain consists of the following steps:

  1. Start the test chain running HLT1 Allen on a MC .digi file from the TestFileDB.
  2. Run the HLT2 on the HLT1 step output, testing the MC workflow.
  3. Run offline processing on the HLT2 step output with:
  4. Run DaVinci and create a tuple from:

Validation of the Moore-DaVinci chain with veloSP configuration

Project to validate the Moore-DaVinci-Tupling workflow when using the veloSP sequence, developed for MC samples without Retina clusters. It consists of different tests, each one dedicated to test a specific step of the chain. All the test commands are reported in the Tupling_veloSP/CMakeLists.txt file. The test chain consists of a dedicated HLT1 step while all the other are the same as the ones run in the Tupling_default test chain.

The test chain on simulation import the global [Utilities/jobMC_options.yaml](https://gitlab.cern.ch/lhcb/LHCbIntegrationTests/-/blob/master/Utilities/jobMC_options.yaml) configuration and consists of the following steps:

  1. Start the test chain running HLT1 Allen on a MC .digi file from the TestFileDB.
  2. Run the HLT2 on the HLT1 step output, testing the MC workflow.
  3. Run offline processing on the HLT2 step output with:
  4. Run DaVinci and create a tuple from:

Test for availability of Flavour Tagging variables

This integration test aims to determine if the flavour tagging variables are available in the ntuples. The input is Upgrade Bd->DPi simulation in xdigi format (used in [B2DX early measurements](https://gitlab.cern.ch/lhcb-b2oc/analyses/b2dx-early-measurements/-/blob/master/options/Hlt1/xdigi_input_Bd2DPi_down.py)). Afterwards, a Moore job runs HLT1 and saves the result as a dst file. Next, Moore is used to apply an exclusive flavour tagging HLT2 line, BdToDmPi_DmToPimPimKp, saving all long and upstream particles as extra_outputs and saving it to a dst file. Finally, Davinci is run to produce a root file from this and it is checked if the resulting nTuple contains the flavour tagging variables and the expected values and number of events. Each step of the chain is run using the Utilitites/logscript.sh script that saves the corresponding _stdout_ and _stderr_. The _stderr_ is then used for step validation by means of the Utilities/validator.sh script ensuring no error is dumped in the _stderr_. For the final ntuple, an additional validation is performed using the Tupling_FT/validator_tuple_FT.py script, checking that the _DecayTree_ is not empty and contains all the expected flavour tagging branches.

The test chain consists of the following steps:

  1. Start test chain on Bd->DPi MC xdigi file alse used in [B2DX early measurements](https://gitlab.cern.ch/lhcb-b2oc/analyses/b2dx-early-measurements/-/blob/master/options/Hlt1/xdigi_input_Bd2DPi_down.py)
  2. Run HLT2 on the HLT1 output
  3. Run DaVinci on the HLT2 output and create an ntuple:
  4. Test the resulting root file
    • Python file Tupling_FT/validator_tuple_FT.py

    • json file Tupling_FT/validator_tuple_FT.json

Test for neutrals

This integration test aims to determine if the neutral info in proto particles are stored correctly in the ntuples, using the Hlt2RD_BToEEGamma line.

The test chain consists of the following steps:

  1. Run HLT2 on the HLT1 input
  2. Run Passthrough on HLT2 output
  3. Run DaVinci on the Passthrough output and create an ntuple:
  4. Test the resulting root file
    • Python file Tupling_neutrals/variables_tuple.py