Skip to content

Commit

Permalink
Add brief description of new test case
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Sep 28, 2023
1 parent 7426a66 commit 3b94397
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 3b94397

Please sign in to comment.