Skip to content

Example AP with the new T-Track functors

This AP is an example of using the new T-Track functors proposed in lhcb/Rec!4542. It uses Franklin build lhcb/Franklin!58 (merged)

How to use it in your production?

Use the following application tag in the info.yaml file:

application: "Franklin/v1r58@<platform>"

where <platform> can be x86_64_v3-el9-gcc13+detdesc-opt+g in the case of MC.

An example of functor invocation (used in this MR):

  # For basic particles:
  all_vars.update({"GSIP": F.GSIP(pvs) @ F.TRACK})
  
  # For composites:
  all_vars.update({"RKDOCA": F.NONLINEAR_DOCA(stateprovider_name="TrackStateProvider/ttracks_TrackStateProvider:PUBLIC").bind(
      F.TRACK @ F.CHILD(1) @ F.FORWARDARG0, F.TRACK @ F.CHILD(2) @ F.FORWARDARG0
  )})
Functor definitions

The functors' definitions are:

def GSIP(pvs, tool_name="TrackStateProvider/ttracks_TrackStateProvider:PUBLIC"):
    """
    Calculates the impact parameter (IP) of a track with respect to a best primary vertex (see BPV definition).
    The best primary vertex is choosen using a closest track state to point (0,0,0).

    Args:
        pvs: The event primary vertices.
        tool_name (str, optional): The name of the track state provider tool to use for extrapolation.
    """

and

def NONLINEAR_DOCA(
    stateprovider_name: str = "TrackStateProvider",
    trajpoca_name: str = "TrajPoca",
    min_dty=0.05,
    initial_z=5000.0,
):
    """Compute the distance of closest approach between two track-like objects using the TrajPoca algorithm with a user-defined TrackStateProvider tool.
    The starting point for the minimisation is computed as y-z interception. In the case that the difference in track slopes ty is less than min_dty, this functor uses a constant starting point, initial_z.

    Args:
        stateprovider_name (str, optional): TrackStateProvider tool to be used. Defaults to "TrackStateProvider".
        trajpoca_name (str, optional): ITrajPoca tool to be used. Defaults to "TrajPoca".
        min_dty (float, optional): The minimum difference in ty slopes to use TrajPoca. Defaults to 0.05.
        initial_z (float, optional): Initial z for the POCA minimisation. Defaults to 5000.0.
    """

FYI: @isanders @femartin

Edited by Volodymyr Svintozelskyi

Merge request reports

Loading