Skip to content

Preparation for beam gas imaging data collection

Patrick Spradlin requested to merge spradlin_202210Oct_bgi into master


This MR adds components and lines intended to support event selection for beam gas imaging (BGI) analysis for luminosity calibration. It also adds detector activity lines for ghost charge analysis. These new lines are collected in a new Allen configuration sequence.


The lines for BGI that are implemented in this MR are intended to reproduce the Run2 Hlt selections that were used for this purpose. The requirements and deisgn of the detector activity lines for ghost charge analysis emerged from discussions within the luminosity group.

BGI requirements

The BGI lines should accept events based on the bunch crossing type and on following properties of reconstructed PVs:

  • number of tracks composing the PV
  • PV location in cylindrical coordinates, i.e., in z and cylindrical radius \rho

A minimum number of tracks requirement is necessary for the analysis, which includes a split-vertex determination of the vertex reconstruction resolution. It can also be used as a proxy for a vertex quality cuts and a scale factor (see discussion in the Implementation section).

The z positions of PVs are used to partition the fiducial volume into luminous and non-luminous regions. Primarily, this is useful to control the rate of events from the luminous region in beam-beam events.

An upper limit on the \rho positions of the PVs allows exclusion of secondary vertexes from material interactions.

Ghost charge requirements

The ghost charge measurement relies on detecting activity in the detector in the absence of beams. In addition to event selection based on bunch crossing type, ideally, we would use activity metrics from three subdetectors:

  1. VELO
  2. CALO
  3. PLUME (not implemented in this MR)

For VELO activity, a minimum number of VELO clusters is required. Preferably, we would have the ability to select events that contain a minimum number of VELO clusters within a specified range of z or set of sensor planes. (This latter feature is not implemented in this MR.) It should accept events with bunch crossing types ee, be, and eb that satisfy the VELO cluster requirements.

The CALO activity line is specifically for studying ghost charge of Beam1, so it must trigger on bunch crossing for which Beam1 is absent: ee and eb. The CALO activity selection should accept events with a minimum amount of deposited energy in the calorimeters.

The PLUME activity line is specifically for studying ghost charge of Beam2, so it must trigger on bunch crossing for which Beam1 is absent: ee and be. The quantity to serve as the activity metric is not yet defined, and no PLUME activity line is implemented in this MR.



All of the thresholds implemented in this MR are preliminary. They are based on Run2 BGI selections and on algorithm defaults. We should plan to adjust them based on the characteristics of real data, when available.

BGI lines

No combination of previously existing filters and line algorithms was found to apply the desired selections. A combination of CheckPV filters and BeamCrossingLine line algorithm would be close---it could select events for a given bunch crossing type based on presence of a PV within a specified z range. However, it would not allow us filter out PVs that lie outside of a specified cylindrical radius or that have too few tracks to be useful.

This MR creates a new filter algorithm to meet our requirements, which is currently called CheckCylPV. It is a copy-mod of CheckPV that adds checks on the PV nTracks and on its \rho^2 = x^2 + y^2.

Lines for non-bb events

The current implementation is composed of three lines---one for each non-bb bunch crossing type---that select every event with a reconstructed PV that has

  • nTracks >= 10
  • -2000 mm <= z < 2000 mm
  • $\rho^2 < (3 \text{mm})^2$

Depending on SMOG2 operations and event rates, this structure may need to be modified to scale events with PVs in the target cell.

flowchart TD
  F["BGIPVsCylAll (CheckCylPV filter)"] --> EE["Hlt1BGIPVsCylNoBeam<br/>(BeamCrossingLine)<br/>Empty-Empty events"]
  F --> EB["Hlt1BGIPVsCylBeamOne<br/>(BeamCrossingLine)<br/>Beam-Empty events"]
  F --> BE["Hlt1BGIPVsCylBeamTwo<br/>(BeamCrossingLine)<br/>Empty-Beam events"]

Lines for bb events

Experience from Run2 indicates that beam-beam collisions can easily overwhelm BGI samples. We need to be able to control the rate of bb-events with PVs in the luminous region. In this MR, this is implemented by using three instances of CheckCylPV to partition the z-range. In order to control the rate in the luminous region, this MR includes a greater lower-limit on PV nTracks for the CheckCylPV instance for the luminous region. As a byproduct of the increased threshold, we expect the vertexes that are retained from this region to have a better resolution.

flowchart TD
  FUP["BGIPVsCylUp (CheckCylPV filter)<br/>nTracks >= 10<br/>-2000 < z <= -250 mm"] --> LUP["Hlt1BGIPVsCylUpBeamBeam<br/>(BeamCrossingLine)<br/>Beam-Beam events"]
  FIR["BGIPVsCylIR (CheckCylPV filter)<br/>nTracks >= 28<br/>-250 < z <= 250 mm"] --> LIR["Hlt1BGIPVsCylIRBeamBeam<br/>(BeamCrossingLine)<br/>Beam-Beam events"]
  FDW["BGIPVsCylDown (CheckCylPV filter)<br/>nTracks >= 10<br/>250 < z <= 2000 mm"] --> LDW["Hlt1BGIPVsCylDownBeamBeam<br/>(BeamCrossingLine)<br/>Beam-Beam events"]

Activity Lines


No known combination of preexisting filters and line algorithms satisfied the requirements of selecting events based on VELO clusters. This MR implements a new line algorithm, VeloClustersMicroBiasLine, that selects events based on the presence of a minimum number of VELO clusters. Note that it does not yet implement the desired refinement to select based on specific z regions or set of sensor planes. This new line algorithm was developed from scratch. However, the structure is patterned after the line algorithm VeloMicroBiasLine, and the computation of the number of VELO clusters is based on those in the function print_velo_clusters and in the algorithm velo_sort_by_phi_t.

This new algorithm is combined with an ODINBeamCrossingType to select non-bb crossings with VELO activity.

The current implementation sets a lower limit threshold of >= 1 VELO cluster for accepting the event.


This is currently implemented as an ODINBeamCrossingType filter to select non-bb crossings and a CaloDigitsMinADCLine line algorithm to accept events with a minimum ADC in the ECAL. Of the pre-existing line algorithms surveyed, this seemed best suited to the task.

The current threshold is the default value of >= 500.

Activity line diagram

flowchart TD
  BX["BX_BeamBeam (ODINBeamCrossingType filter)<br/>beam-beam crossings"] --> NB["BX_NoBeamBeam (event_list_inversion_t)<br/>Inverts previous step<br/>non-beam-beam crossings"]
  NB --> VELO["Hlt1BGIVeloClustersMicroBias<br/>(VeloClustersMicroBiasLine)<br/>n VELO clusters >=1"]
  NB --> CALO["Hlt1BGICaloDigits<br/>(CaloDigitsMinADCLine)<br/>ecal_digits.adc >= 500"]

Partially addresses #223.

Attn: @edallocc @balagura @agomezmo @dmilanes @nmchugh @psoler

Edited by Patrick Spradlin

Merge request reports