Skip to content

Update to RawWaveformAna module - wfm and trigger timestamps#140

Open
vpec0 wants to merge 4 commits into
developfrom
feature/vpec_update_rawwfmana
Open

Update to RawWaveformAna module - wfm and trigger timestamps#140
vpec0 wants to merge 4 commits into
developfrom
feature/vpec_update_rawwfmana

Conversation

@vpec0
Copy link
Copy Markdown
Member

@vpec0 vpec0 commented May 18, 2026

This PR includes timestamps in two types - double and uint64. Trigger timestamp is read and stored. Trigger info can now be read for PD HD or VD.

@vpec0 vpec0 requested review from JacobBoza and lpaulucc May 18, 2026 12:04
@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for c14:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

⚠️ CI build for DUNE Succeeded with warning at phase build on slf7 for c14:prof - ignored warnings for build -- details available through the CI dashboard

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

⚠️ CI build for DUNE Warning at phase ci_tests DUNE on slf7 for e26:prof - ignored warnings for build -- details available through the CI dashboard

🚨 For more details about the warning phase, check the ci_tests DUNE phase logs

parent CI build details are available through the CI dashboard

nSamples = wfm.Waveform().size();
TimeStamp = (uint64_t)wfm.TimeStamp();
TimeStamp_uint64 = (uint64_t)wfm.TimeStamp();
TimeStamp_double = wfm.TimeStamp(); // was in ticks (16 ns, PDS clock), now custom fix to microseconds
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This comment is valid for both time stamps, you are only changing the number format, not the units here, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah, this was an older comment.. I'll update this to be clearer.


// TriggerCandidateData::time_candidate ... time of the trigger signal?
// TriggerCandidateData::time_start ... time of the DAQ window opened?
ts_uint64 = trig.time_candidate; // in ticks (16 ns, time system clock) since epoch
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If I am reading this correctly, the trigger time and waveform timestamp will still be in different units: trigger in ticks since epoch and waveform in us. Given this is an analyzer already, would it be interesting to have both directly comparable, moving (or adding) the trigger time to us as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I consider this a data dumper more than a true analyzer. I wanted to store relevant data and keep the interpretation for later steps. As is, this dumper can be used on any PDS data (or at least that is the goal), not dependent on the underlying assumptions.

In the next iteration, I will consider adding another branch holding the waveform timestamp relative to the CTB trigger. Which would add the interpretation, but that would be data-format dependent.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was just wondering that having the trigger time converted to ticks could be interesting since this in principle requires obtaining info from the pd clock, something which would need to be put by hand in an analysis macro that reads this tree, instead of retrieving this info from the service. Not a big deal if people know what they are doing :-)

Added comments to clarify waveform timestamp conversion and backward compatibility.
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.

3 participants