-
Notifications
You must be signed in to change notification settings - Fork 20
How to write a Setup
Sascha Wagner edited this page May 20, 2019
·
7 revisions
As generically written physics analysis need additional information about a beamtime, such information is handled in Ant as so-called Setups. These Setups are kept in ant/src/expconfig/setups/. They implement the ant::expconfig::Setup_traits
interface and are kept within a SetupRegistry using the AUTO_REGISTER_SETUP
macro for easy access at run-time. The singleton class ExpConfig::Setup
provides access to this registry, and the method ExpConfig::Setup::Get
returns the currently selected setup. Each setup serves the following needs for reconstruction and analysis of events:
- Specify detectors the experimental setup consists of, in particular detectors. Reconstruct for example fetches clustering information from that, or physics classes can ask for the number of channels of specific detectors (if it's present at all).
- Specify calibrations, which turn the raw data into useful information for physics classes
- Basic time and energy calibrations typically use a
ant::Calibration::Converter
to decode the notorious MultiHit CATCH TDCs, for example.
- Basic time and energy calibrations typically use a
- Get general information about the beamtime, such as reasonable timing windows for prompt-random subtraction
- Set a start and end date of the beamtime via
SetTimeRange(string start, string end)
in the form"YYYY-MM-DD"
, this provides auto-detection of Setups for given input files viaExpConfig::Setup::SetByTID
Most of the basic functionality is already implemented in ant::expconfig::Setup
, which provides in addition:
- Tell unpackers how to treat raw data by implementing the interfaces such as
ant::unpacker::UnpackerAcquConfig
using a list of detectors and asking them for the relevant information. Still, the setup can tweak this, see theBuildMappings
method. - Provide basic methods to keep detectors and calibrations (and in general Reconstruct hooks).