Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated trigger-filter with functionality to use beam current from RAW::epics or a detector raw multiplicity to select events with beam when scalers are unavailable #86

Merged
merged 11 commits into from
Sep 21, 2023

Conversation

raffaelladevita
Copy link
Collaborator

Addresses RG-M issue of missing scalers in the first part of the run.

The modifications include:

  • trigger bit selection is now based on trigger masks, both to choose the bits that should be active and to veto bits that shouldn't be active;
  • the source of the beam current information can be chosen between the DSC2 scaler readouts from RUN::scaler (default) or a current readout from RAW::epics (selected via the -s pv-name command line option);
  • in addition, a threshold on the minimum number of entries in a bank can be applied.

A few notes:

  • Epics information is collected from tag-1 events, very similarly to the way scaler information is collected: here the code could be probably unified, creating a generic sequence class but it has not been attempted yet;
  • The Epics information is ordered based on Unix time from RUN::config because in some data sets (including RG-M) the RUN::config.timestamp for events with the Epics bank is always equal to -1.
  • Comparison of beam current from scalers and Epics suggests that the Epics readout available at a given time applies to an earlier time, with a delay of 1-2 s. For this reason, when choosing to use Epics information, the current threshold is not applied to a single readout but on the minimum within a window of -2 s : +4 s around the closest readout in time.

Copy link
Collaborator

@baltzell baltzell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's drop the "Daq" from the new class names.

(Later we should really inherit some of this, shared by DaqScalersSequence, later ...)

Copy link
Collaborator

@baltzell baltzell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FilterBank seems is only about number of rows in a bank? If so, and it's not planned to become something much more, it would be good to name it less generically, as there's many other things people refer to as "filtering". For example, FilterBankSize.

Copy link
Collaborator

@baltzell baltzell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think EpicsSequence.add was copied from a similar implementation supporting Java 8 from before SortedSet/List were fully functional in Java 11?

@raffaelladevita
Copy link
Collaborator Author

raffaelladevita commented Sep 11, 2023 via email

baltzell
baltzell previously approved these changes Sep 11, 2023
@raffaelladevita raffaelladevita merged commit 934281a into development Sep 21, 2023
14 checks passed
@raffaelladevita raffaelladevita deleted the iss64-bankFilter branch September 21, 2023 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants