Skip to content

Improvements to BeamSpotMonitor

Patrick Spradlin requested to merge spradlin_202403Mar_irmon into 2024-patches

Related MRs and Issues

Part of a set with Moore!3251 (merged) and MooreOnline!358 (merged).

Related to issue #288.

Description

Improvements to the BeamSpotMonitor algorith, including

  • Lighter representation of cached values
  • Initialization of cached conditions from most recent conditions file
  • Fixed histogram definitions so that their limits can be set via properties.
  • Changed configuration of thresholds so that subsets of the thresholds can be applied
  • Implemented publishing with LHCb::PublishSvc for online integration
  • New histograms to record unpubnlished conditions statistics
  • Switch to suppress cache and pulbishing updates when VELO is open

Changes to the configuration of thresholds

This MR changes the syntax and functionality of the threshold configuration.

Before this MR (old and busted)

The original implementation of BeamSpotMonitor always applied thresholds to each of the 9 values of the conditions. Each threshold was configured with a corresponding property. For example, see this clip from the test script Moore/Hlt/RecoConf/options/hlt1_pvs_with_beamspotmoni_2023.py at aa919797:

    beam_spot_moni = BeamSpotMonitor(
        name="BeamSpotMonitor",
        ...
        DeltaXMax=0.0 * mm,
        DeltaYMax=0.0 * mm,
        DeltaZMax=0.0 * mm,
        DeltaXXMax=0.0 * mm2,
        DeltaXYMax=0.0 * mm2,
        DeltaYYMax=0.0 * mm2,
        DeltaZXMax=0.0 * mm2,
        DeltaYZMax=0.0 * mm2,
        DeltaZZMax=0.0 * mm2)

After this MR

This MR allows an arbitrary subset of the thresholds to be set. Only the configured thresholds will be tested in the decision to update conditions. The thresholds are now set through a single property MaxAbsDeltaMap that is a std::map<std::string, double>. The allowed keys correspond to the description of the example conditions in https://gitlab.cern.ch/lhcb-conddb/lhcb-conditions-database/-/blob/b85b0cb6b433fef675540fdb7562efbff2f70fff/Conditions/LHCb/Online/InteractionRegion.yml/.pool/v0:

  • "x", "y", and "z" for thresholds of the elements of InteractionRegion.position
  • "xx", "xy", "yy", "xz", "yz", and "zz" for the thresholds of the elements of InteractionRegion.spread
  • "rho" for threshold on transverse displacement of InteractionRegion.position

For example, configuring only the x and y thresholds would be done like this:

    beam_spot_moni = BeamSpotMonitor(
        name="BeamSpotMonitor",
        ...
        MaxAbsDeltaMap={
            'x': 0.02 * mm,
            'y': 0.02 * mm,
        })

Implementation of PublishSvc publication

The usage of LHCb::PublishSvc is patterned after that in Alignment/TAlignment/src/AlignOnlineIterator.cpp. When active (configurable according to the property OnlineMode), immediately following the write of a new conditions file BeamSpotMonitor will publish a message containing the run number during which the counters for the newly written conditions were accumulated and the name of new conditions file.

The publishing is configured by the following new properties of BeamSpotMonitor:

  • OnlineMode: bool: defaults to false: Toggle for activating use of the PublishSvc
  • PublishSvc: string: defaults to "LHCb::PublishSvc": Name of the service implementing IPublishSvc
  • KnownAsToPublishSvc: string: defaults to "LHCb/Online/InteractionRegion": Name of the published information

Because the Gaudi IPublishSvc interface is used for all invocations of the publishing service, there is no direct build dependence on the Online project. However, BeamSpotMonitor will throw an exception if OnlineMode=True and the service named by the PublishSvc property is not available.

Attn: @freiss @mfontana

Edited by Patrick Spradlin

Merge request reports

Loading