From 3b943976687ec96e0a330371921cbc4f0d66d642 Mon Sep 17 00:00:00 2001 From: tmadlener Date: Thu, 28 Sep 2023 16:18:47 +0200 Subject: [PATCH] Add brief description of new test case --- test/README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 test/README.md diff --git a/test/README.md b/test/README.md new file mode 100644 index 00000000..75efc033 --- /dev/null +++ b/test/README.md @@ -0,0 +1,39 @@ +# k4MarlinWrapper tests + +The test cases for the k4MarlinWrapper are somewhat involved in some cases. +Hence, we try to describe their intent and their high level layout a bit here. +We will be refering to the test cases by name as they are defined in the +[`CMakeLists.txt`](./CMakeLists.txt) file in here. + +## `global_converter_maps` + +The main purpose of this test is to make sure that the EDM conversions work as +expected, even if the event is converted piece-by-piece. In order to make that +work the individual converter tool instances have to share a mapping of all +corresponding LCIO and EDM4hep objects that have been converted (in either +direction). This map is referred to as the *global object map*. + +### Setup + +The test is using the +[`global_converter_maps.sh`](./scripts/global_converter_maps.sh) script which +effectively simply runs the +[`test_global_converter_maps.py`](./gaudi_opts/test_global_converter_maps.py) +options file after downloading some input data. This options file uses two +wrapped MarlinProcessors and one GaudiAlgorithm plus some converters inbetween +them: +- `PodioInput` to read the *MCParticles* collection from the input file (in + EDM4hep format) +- [`PseudoRecoProcessor`](./src/PseudoRecoProcessor.cc) creates a reco particle + for every MC particle in the input collection + - An EDM4hep to LCIO converter converts the input MC particles up front + - An LCIO to EDM4hep converter converts the output reco particles afterwards +- [`TrivalMCTruthLinkerProcessor`](./src/TrivialMCTruthLinkerProcessor.cc) + creates trivial links from the MC particles to the reco particles. + - An LCIO to EDM4hep converter converts the output collction to EDM4hep +- [`MCRecoLinkChecker`](./src/MCRecoLinkChecker.cc) is a Gaudi algorithm that + simply checks whether the MC-reco links are as expected. + +Without the global converter map, the second LCIO to EDM4hep converter that is +run after the MC - reco linker will not produce valid MC - reco links, as it +does not have any knowledge about the input MCs and recos.