Skip to content

Update Moore-Allen python interface to use V3 converters rather than V2.

Patrick Spradlin requested to merge spradlin_2023Feb_gaudiallen_v3track into master

Related

Follow evolution of the Gaudi-Allen converters in Allen!1124 (merged). Also depends on Rec!3370 (merged).

Part of resolution to Allen#371.

Description

Allen!1124 (merged) implements new converters from Allen track views to LHCb::Event::v3::Tracks. It also removes the converters from Allen tracks to LHCb::Event::v2::Tracks. This MR implements the changes necessary updates to the python configuration interface to Moore, Hlt/RecoConf/python/RecoConf/hlt1_allen.py.

make_allen_velo_tracks()

Among the python wrappers for conversion of Allen tracks, make_allen_velo_tracks() has undergone the most significant changes.

For LHCb::Event::v3::Tracks, the track type is a property of the container rather than of individual tracks. In order to preserve the distinction between Velo and VeloBackward tracks, the new GaudiAllenVeloToV3Tracks converter in Allen!1124 (merged) produces two separate output containers---one for the tracks that were marked as VeloBackward and another for the remaining Velo tracks. Handles for these containers are available through the new v3fwd and v3bwd keys of the dictionary returned by make_allen_velo_tracks().

The two LHCb::Event::v3::Tracks output containers of GaudiAllenVeloToV3Tracks are separatly converted to LHCb::Event::v1::Tracks (keyed container). The converted LHCb::Event::v1::Tracks are merged to provide the v1keyed handle of the dictionary returned by make_allen_velo_tracks(). This should produce output that contains the same set of tracks as the old v1keyed output, although in a different order due to the tracks being sorted by forward/backward.

Hopefully, the following diagram illustrates the changes.

flowchart TD
  subgraph New conversion flow
    sn([GaudiAllenVeloToV3Tracks]) --> v3f[v3fwd]
    sn --> v3b[v3bwd]
    v3f -- fromV3TrackV1Track --> m([TrackContainersMerger])
    v3b -- fromV3TrackV1Track --> m
    m --> v1kn[v1keyed]
    v1kn -- fromV1TrackV2Track --> v2n[v2]
    v2n -- fromV2TrackV1TrackVector --> v1n[v1]
  end
  subgraph Old conversion flow
    so([GaudiAllenVeloToV2Tracks]) --> v2o[v2]
    v2o -- fromV2TrackV1TrackVector --> v1o[v1]
    v1o -- fromVectorLHCbTrack --> v1ko[v1keyed]
  end

make_allen_velo_ut_tracks(), make_allen_forward_tracks(), and make_allen_seed_and_match_tracks_no_ut()

The modifications to the single-container conversion chains are more straightforward. These should preserve the order of the tracks through conversion.

Hopefully, the following diagram illustrates the changes.

flowchart TD
  subgraph New conversion flow
    sn([GaudiAllen.*ToV3Tracks]) --> v3n[v3]
    v3n -- fromV3TrackV1Track --> v1kn[v1keyed]
    v1kn -- fromV1TrackV2Track --> v2n[v2]
    v2n -- fromV2TrackV1TrackVector --> v1n[v1]
  end
  subgraph Old conversion flow
    so([GaudiAllen.*ToV2Tracks]) --> v2o[v2]
    v2o -- fromV2TrackV1TrackVector --> v1o[v1]
    v1o -- fromVectorLHCbTrack --> v1ko[v1keyed]
  end
Edited by Patrick Spradlin

Merge request reports