Repository navigation
Adjust crossing to center of crossing clock, include global phase adj… - #104
Conversation
|
Will post some results Monday 9 Nov |
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
simonge
left a comment
There was a problem hiding this comment.
Thanks John.
While this hasn't been deployed yet so this change won't effect analysis in a meaningful way, I would still like to get some extra thoughts from outside, e.g. DAQ experts on what the intention is.
Shouldn't block this PR however.
| // Apply bunch crossing if enabled | ||
| if (config.use_bunch_crossing) { | ||
| time_offset = std::floor(time_offset / bunch_crossing_period) * bunch_crossing_period; | ||
| time_offset = std::floor(time_offset / bunch_crossing_period) * bunch_crossing_period + 0.5*bunch_crossing_period + global_phase; |
There was a problem hiding this comment.
I would perhaps have the phase in units of bunch crossing period and instead of ns then replace the 0.5 with the phase. The phase would then be set to 0.5 in the configuration. A configuration could also then simply be added to randomize the phase between 0 and 1 in case this is the way forward.
There was a problem hiding this comment.
I like the idea to make the phase in units of the crossing clock, I'll change that later today. Randomizing it could be interesting for the future as a tool for testing how an event tagger would handle things in a poorly aligned state. However, TimeframeBuilder already implicitly makes some alignment assumptions - like the different detector streams are aligned on the same clock. We'll need to think about how to incorporate that (and handle it) in the future as well - but for a later day.
Co-authored-by: Simon Gardner <simon.gardner@glasgow.ac.uk>
|
Latest commit changes global_phase to a fraction of a crossing period, per Simon's suggestion. This should be ready to merge. |
simonge
left a comment
There was a problem hiding this comment.
Looks good. I have added the offset to the example configs.


…ustment
Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.
What is the urgency of this PR?
What kind of change does this PR introduce?
Please check if any of the following apply
When an input source is configured with use_bunch_crossing, the event will be at the center of the crossing period. A global phase adjustment is included to allow you to move the event within the crossing window. The old behavior is recovered by setting the global phase to -(bunch_crossing_period/2.0)