Search/Navigation:
Related:
SLAC/EPP/HPS Public
Jefferson Lab/Hall B/HPS Run Wiki
S30XL-LESA/LDMX
HPS uses a database conditions backend which is accessible through the DatabaseConditionsManager.
The conditions system is initialized using the ConditionsManager's setDetector method which takes the name of a detector and a run number.
DatabaseConditionsManager.getInstance().setDetector("RealDetectorNameHere", 1234);
HPS adds several features to the lcsim conditions system.
You can add one or more tags for filtering the conditions records. Only those records belonging to the tag will be accessible.
DatabaseConditionsManager.getInstance().addTag("pass0");
The conditions system can be "frozen" after it is initialized, meaning that subsequent calls to set a new detector and run number will be completely ignored.
DatabaseConditionsManager.getInstance().freeze();
This is useful to force the system to load a specific configuration by run number if the actual event data does not have the same run number (or for run 0 events from simulation).
Typically, the conditions system will be initialized for you automatically or configured using switches to the various HPS Java command line tools (exact syntax depends on the tool).
Initializing the Conditions System
Since the conditions system uses a global state, meaning there is one setup for the whole process, re-initializing the system from inside your reconstruction job is not at all a good idea!
Typically, conditions information is accessed in the beginning of the job through the Driver class's detectorChanged method.
public void detectorChanged(Detector detector) { DatabaseConditionsManager conditionsManager = DatabaseConditionsManager.getInstance(); EcalChannelCollection channels = conditionsManager.getCachedConditions(EcalChannelCollection.class, "ecal_channels").getCachedData(); System.out.println("got " + channels.size() + " ECal channels"); }
Typically, all conditions collections required by a Driver should be loaded in this method to avoid incurring a performance overhead by reading the conditions on every event.
Java Object Class | Java Collection Class | Default Database Table | Description |
---|---|---|---|
BeamEnergy | BeamEnergyCollection | beam_energies | nominal beam energies |
EcalBadChannel | EcalBadChannelCollection | ecal_bad_channels | ECal bad channel list |
EcalCalibration | EcalCalibrationCollection | ecal_calibrations | per channel ECal pedestals and noise |
EcalChannel | EcalChannelCollection | ecal_channels | ECal channel information including map of DAQ to physical channels |
EcalGain | EcalGainCollection | ecal_gains | per channel ECal gains |
EcalLed | EcalLedCollection | ecal_leds | per crystal LED configuration |
EcalLedCalibration | EcalLedCalibrationCollection | ecal_led_calibrations | per crystal LED calibration information (from calibration run) |
EcalPulseWidth | EcalPulseWidthCollection | ecal_pulse_widths | ECal signal pulse width (currently unused in recon) |
EcalTimeShift | EcalTimeShiftCollection | ecal_time_shifts | ECal signal time shift (currently unused in recon) |
SvtAlignmentConstant | SvtAlignmentConstantCollection | svt_alignment_constants | SVT alignment constants in Millepede format may be disabled using -DdisableSvtAlignmentConstants |
SvtBadChannel | SvtBadChannelCollection | svt_bad_channels | SVT bad channel list |
SvtBiasConstant | SvtBiasConstantCollection | svt_bias_constants | SVT bias setting for a time range |
SvtCalibration | SvtCalibrationCollection | svt_calibrations | per channel SVT noise and pedestal measurements |
SvtChannel | SvtChannelCollection | svt_channels | SVT channel information |
SvtDaqMapping | SvtDaqMappingCollection | svt_daq_map | SVT mapping of DAQ to physical channels |
SvtGain | SvtGainCollection | svt_gains | per channel SVT gains |
SvtMotorPosition | SvtMotorPositionCollection | svt_motor_positions | SVT motor position in mm |
SvtShapeFitParameters | SvtShapeFitParametersCollection | svt_shape_fit_parameters | SVT parameters for the signal fit |
svt_t0_shifts | SVT T0 (first sample) shifts | ||
svt_timing_constants | SVT timing configuration constants including offset and phase | ||
test_run_svt_channels | test run SVT channel information | ||
test_run_svt_daq_map | test run SVT DAQ mapping | ||
test_run_svt_t0_shifts | test run SVT T0 shift |