Overlay workflow fixes [develop] [2/4] - #671
Conversation
Contains `sbn::RebindAssociatedProducts()` to make a copy of an association with the data product on one side replaced by another one.
…rms and baselines
Prevents things like magic "invalid" values like -9999.0 from becoming -9997.8 after a 1.2 us shift. Introduced an utility `caf::SRdefaults` for fetching those magic values.
Must be explicitly disabled if not desired. The data is currently not shifted (not clear what a shift on timestamps would mean).
Removed some unused or redundant code.
* added `CAFMaker::GetHandleStrict()` that directly returns a handle * `GetByLabelStrict()` and similar now use `art::InputTag` as label type * minor implementation changes and documentation fixes
* removed the support for "unshifted trigger" as a reference
* removed any support for different shifts in data and simulation
* the only supported shift is from trigger time to beam gate time
* both are learnt from `DetectorClocksService`
* it is assumed that the current data is on trigger reference; we don't have a general way to check that
* it is _possible_ to extend the system so that, given as parameter the value of the current reference (`1500`), then we can move to trigger time, beam time or any other time as reference, and also verify if we are already there. For once, I haven't gone all the way toward fancy and this is not implemented yet.
* an additional global shift is also supported
* an additional shift for CRT only is also supported
* time reference shifting moved from central place (one place, all shifts) to object filling places (many places, one object each); the latter was already the case for ICARUS CRT (at least some of it)
* filler functions are passed "shifter objects" which know which shift to apply
* time shift applied to:
* trigger information (shared; SBND should inherit the shift as before): `beam_gate_det_time`, `global_trigger_det_time`
* CRT hit collection: `t0`, `t1`, `time`
* CRT track collection: `time` (not sure if it is correct when using T0)
* CRT/PMT match collection: `flashTime_us`, `firstOpHitPeakTime`, `firstOpHitStartTime`, `matchedCRTHits.time`
* optical flashes
* ICARUS: `time`, `firstTime`
* SBND: `time`, `firstTime`
* slice TPC/PMT matching (OpT0Finder): `opt0.time`, `opt0_sec.time`
* slice TPC/PMT matching (barycentre): `barycenterFM.flashFirstHit`, `barycenterFM.flashTime`
* slice TPC/PMT matching (simple): `time`
* CRT hits for a track: same as for the event-wide collection
* CRT track for a track: `crttrack.time`
* removed configuration parameters (**breaking change**)
* `UnshiftedTriggerLabel`
* `CRTSimT0Offset`
* `ReferencePMTFromTriggerToBeam`
* `ReferenceCRTT0ToBeam`
* `ReferenceCRTT1FromTriggerToBeam`
* added configuration parameters:
* `ShiftTimeFromTriggerToBeamGate`
* `GlobalTimeReferenceOffset`
* `CRTreferenceTimeOffset`
develop] [2/4]
|
Putting this down here; forwarding to SBND. Thanks, @PetrilloAtWork ! |
|
I agree with @PetrilloAtWork that this would break SBND Data. For these changes in CAFMakers, they affect some data products shared between SBND & ICARUS: OpFlash/OpT0/BFM. |
| slice.correctedOpFlash.setDefault(); | ||
| if ( slcCorrectedOpFlash.empty()==false ) { | ||
| const sbn::CorrectedOpFlashTiming &_correctedOpFlash = *slcCorrectedOpFlash[0]; | ||
| slice.correctedOpFlash.OpFlashT0 = _correctedOpFlash.OpFlashT0; |
There was a problem hiding this comment.
| slice.correctedOpFlash.OpFlashT0 = shifter.shiftedTime(_correctedOpFlash.OpFlashT0); |
Hi! I wasn’t assigned as a reviewer, but I had a quick look at the PR. Just for completeness, although ICARUS is not currently using correctedOpFlash objects, they also include timing information that should be shifted accordingly
| slice.correctedOpFlash.OpFlashT0 = _correctedOpFlash.OpFlashT0; | ||
| slice.correctedOpFlash.NuToFLight = _correctedOpFlash.NuToFLight; | ||
| slice.correctedOpFlash.NuToFCharge = _correctedOpFlash.NuToFCharge; | ||
| slice.correctedOpFlash.OpFlashT0Corrected = _correctedOpFlash.OpFlashT0Corrected; |
There was a problem hiding this comment.
| slice.correctedOpFlash.OpFlashT0Corrected = shifter.shiftedTime(_correctedOpFlash.OpFlashT0Corrected); |
See #671 (comment)
This is part of the fixes to the overlay workflow delivered for production branch by #653, recast to
develop. The description of the content can be found in that request.The top pull request for
developis SBNSoftware/icaruscode#922.While this content was already approved and merged in the production branch, I would like to make sure that it is met with the appropriate awareness.
This PR affects the content of CAF and I have not tested it on any SBND data.
A feature, time shifting, has been modified/removed: I think SBND was not using it, but I am not sure. Also, this change was extensive, touching all the time variables I could spot; each change is a chance to introduce a bug. I have not seen anything wrong with ICARUS data, but SBND data mileage may vary.
I am available to help with testing, if provided appropriate instructions.
Reviewers: the SBN release managers to increase awareness.
This PR is required by SBNSoftware/icaruscode#922 and I think does not depend on other PR.