Skip to content

Update Gaudi-Allen track converters to v3::Tracks

Patrick Spradlin requested to merge spradlin_2023Jan_gaudiallen_v3track into master

Related

Test and merge with Rec!3370 (merged) and Moore!2157 (merged).

Progress on Issue #371: This MR will remove most of the uses of v2::Tracks in the GaudiAllen interface.

Description

Revises the GaudiAllen track converters to create LHCb::Event::v3::Tracks. The following table relates the previous collection of converters to LHCb::Event::v2::Tracks to the new converters to v3::Tracks that replace them. The inputs have been conserved; the output types are the what i consider to be the closest valid matches among the defined LHCb::Event::v3::Tracks track types.

Allen track input v2 converter v3 converter Output LHCb::Event::v3::TrackType
Allen::Views::Velo::Consolidated::MultiEventTracks GaudiAllenVeloToV2Tracks GaudiAllenVeloToV3Tracks Velo, VeloBackward
Allen::Views::UT::Consolidated::MultiEventTracks GaudiAllenUTToV2Tracks GaudiAllenUTToV3Tracks Upstream
Allen::Views::Physics::MultiEventBasicParticles GaudiAllenForwardToV2Tracks GaudiAllenMEBasicParticlesToV3Tracks FittedForward

Much of the implementation of the v3::Tracks converters in this MR is an attempt to imitate various of the conversion components in the LHCb and Rec projects: LHCb/Event/TrackEvent/include/Event/SOATrackConversion.h, Rec/Pr/PrConverters/src/SOATrackConverters.cpp. Peculiarities of the Allen input and my inexperience with metaprogramming have thus far inhibited a clean generalized solution, but i have done my current best.

Consolidation of source files

All three of the new v3::Tracks converters are defined in a single source file, Rec/Allen/src/GaudiAllenTrackViewsToV3Tracks.cpp. This replaces the three independent source files---one for each track type---GaudiAllenVeloToV2Tracks.cpp, GaudiAllenUTToV2Tracks.cpp, and GaudiAllenForwardToV2Tracks.cpp. The source files were consolidated in order to share code components, make the suite of converters more consistent, and move toward a more generalized converter implementation.

Bifurcation of Velo output container (Velo and VeloBackward)

The previous v2 converter, GaudiAllenVeloToV2Tracks.cpp, produced a single output container in which each track is assigned either type Velo or VeloBackward as appropriate.

For the LHCb::Event::v3::Tracks containers, the track type is a property of the container. Thus, a single output container with heterogenous track types no longer appears to be supported. In order to support the distinction between Velo and VeloBackward tracks, the new GaudiAllenVeloToV3Tracks has two output containers:

  • OutputTracksForward, which has track type Velo and contains the forward Velo tracks, and
  • OutputTracksBackward, which has track type VeloBackward and contains the backward Velo tracks.

States

A fixed set of track states for each LHCb::Event::v3::TrackType is part of the definition of LHCb::Event::v3::Tracks. This differs from the previous iterations of the Track definition that had variable sets of states. The track state information available to the GaudiAllen..ToV2Tracks converters is, in general, inconsistent with the that associated with the corresponding LHCb::Event::v3::TrackType. The following table indicates what is provided by the previous collection of converters and what is expected for the targeted LHCb::Event::v3::TrackType.

v2 converter States provided LHCb::Event::v3::TrackType States of v3::TrackType
GaudiAllenVeloToV2Tracks ClosestToBeam1 Velo, VeloBackward ClosestToBeam, FirstMeasurement, LastMeasurement
GaudiAllenUTToV2Tracks ClosestToBeam1, EndVelo1 Upstream ClosestToBeam, FirstMeasurement, LastMeasurement, BegRich1, EndRich1
GaudiAllenForwardToV2Tracks ClosestToBeam2 FittedForward ClosestToBeam

In the converters created by this MR, i have opted to fill all of the state information in the output LHCb::Event::v3::TrackType with approximations of valid data. In my testing, frequent run-time error messages were produced when i left empty the output states for which no directly analogous input states were available. Most of these errors happened when a user of a v1 track converted from the v3 tracks tried to determine the momentum at one of the empty states. The output states are filled with straight-line extrapolations from the state provided by Allen that is nearest to it in z.

q/p and its variance

Each of the previous converters to v2 tracks had a different source of q/p.

The various methods for accessing and faking q/p have been carried into the v3 converters of this MR. The GaudiAllenForwardToV2Tracks method of faking var(q/p) has been uniformly adopted.

Tests

The algorithms created in this MR are tested in the existing Moore tests

  • RecoConf.allen_gaudi_forward_with_mcchecking
  • RecoConf.allen_gaudi_seed_and_match_with_mcchecking
  • RecoConf.allen_gaudi_velo_ut_with_mcchecking
  • RecoConf.allen_gaudi_velo_with_mcchecking
  • RecoConf.hlt1_hlt2_comparison
  1. Provided via input containers that are separate from the input tracks 2 3

  2. Provided as data members of input tracks

Edited by Patrick Spradlin

Merge request reports