Skip to content

NTB Decoder and data product - #490

Merged
bear-is-asleep merged 5 commits into
developfrom
feature/trj_ntb_decoder
Oct 17, 2024
Merged

NTB Decoder and data product#490
bear-is-asleep merged 5 commits into
developfrom
feature/trj_ntb_decoder

Conversation

@tomjunk

@tomjunk tomjunk commented Aug 6, 2024

Copy link
Copy Markdown
Contributor

This PR adds a producer module that reads Nevis Trigger Board (NTB) fragments (or container fragments) and writes out a new data product called raw::ntb::sbndntb. These can be browsed in the Events TTree in a decoded artROOT file.

docDB 37987

This PR starts out as a draft because it depends on sbndaq-artdaq-core PR 108

SBNSoftware/sbndaq-artdaq-core#108

which needs to be merged and included in a release before this decoder will work. There are headers for the NTB fragment and the format of the contents of that fragment, as well as a bugfix to the offsets within the data structure in that PR.

This code has been tested with running on an already-decoded artROOT file, though a raw DAQ file will also work as the input NTB data fragments are the same:

lar -c runntbdecoder.fcl decode_data_evb02_EventBuilder2_art1_run15040_2_20240717T115613-84aff87b-0059-4c97-8de9-0dcbf47d2e51.root

and plots from browsing the sbndntb data product in the output rootfile follow.
ntb_trailer
ntb_samplenumber
ntb_framenumber
ntb_eventnum_run15040
ntb_boardreader_timestamp
ntb_active

@tomjunk
tomjunk marked this pull request as draft August 6, 2024 21:54
@tomjunk
tomjunk requested review from ibsafa and kalradaisy August 6, 2024 21:54
Merge branch 'develop' into feature/trj_ntb_decoder
@tomjunk

tomjunk commented Sep 24, 2024

Copy link
Copy Markdown
Contributor Author

Many thanks to Ibrahim for releasing sbndaq_artdaq_core v1_09_02of1 which has the necessary header files for the NTB fragment and data format, and also sbncode v09_91_02_02 which depends on sbndaq_artdaq_core v1_09_02of1. This PR can now be addressed. It has already been tested and put to use -- see Seokju Chung's impressive timing study in SBN-doc-37987-v1. I include here some plots from run 15040 that I redecoded today to test that the chain works with the released sbncode and sbndaq_artdaq_core.
run15040_boardreader_timestamp
run15040_samplenum
run15040_framenum
run15040_eventnum

This PR has the added benefit of including the fixed PTB_content.h that was also included in sbndaq_artdaq_core v1_09_02of1 and undoes an unintentional clobber made earlier this year (by ICARUS!) of SBND's PTB_content.h.

@tomjunk
tomjunk marked this pull request as ready for review September 24, 2024 18:07
@bear-is-asleep

Copy link
Copy Markdown
Contributor

trigger build LArSoft/lar*@LARSOFT_SUITE_v09_91_02 SBNSoftware/sbncode@56dc342f SBNSoftware/sbnobj@a4b93770 e303cbe2 SBNSoftware/sbnanaobj@bug/coackley_ciCafv09_91_02

@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 LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild

Copy link
Copy Markdown
Collaborator

❌ CI build for SBND Failed at phase build SBND on slf7 for c14:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@FNALbuild

Copy link
Copy Markdown
Collaborator

❌ CI build for SBND Failed at phase build SBND on slf7 for e26:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@bear-is-asleep

Copy link
Copy Markdown
Contributor

trigger build LArSoft/lar*@LARSOFT_SUITE_v09_91_02 SBNSoftware/sbncode@56dc342f SBNSoftware/sbnobj@a4b93770 e303cbe2 SBNSoftware/sbnanaobj@bug/coackley_ciCafv09_91_02

@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 LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild

Copy link
Copy Markdown
Collaborator

❌ CI build for SBND Failed at phase ci_tests SBND on slf7 for c14:prof - ignored failure for unit_test - ignored warnings for build -- details available through the CI dashboard

🚨 For more details about the failed phase, check the ci_tests SBND phase logs

parent CI build details are available through the CI dashboard

@FNALbuild

Copy link
Copy Markdown
Collaborator

⚠️ CI build for SBND Warning at phase ci_tests SBND 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 SBND phase logs

parent CI build details are available through the CI dashboard

@bear-is-asleep

Copy link
Copy Markdown
Contributor

Hi @tomjunk the CI is working now. I did see that one of the reco1 products changed, which is a bit strange

1072: Check for differences in the size of data products
1073: difference(s)
1074: 
1075: 129c129
1076: < Reco1 | gaushit |  | art::Assns<recob::Wire,recob::Hit,void> | 12594
1077: ---
1078: > Reco1 | gaushit |  | art::Assns<recob::Wire,recob::Hit,void> | 12595
1079: 132c132
1080: < Reco1 | gaushit |  | std::vector<recob::Hit> | 12594
1081: ---
1082: > Reco1 | gaushit |  | std::vector<recob::Hit> | 12595

But I think we are safe to approve!

@bear-is-asleep

Copy link
Copy Markdown
Contributor

Approved for merge

@tomjunk

tomjunk commented Oct 14, 2024

Copy link
Copy Markdown
Contributor Author

Very good @bear-is-asleep ! I cannot imagine how the NTB decoder would impact the gaushit finder. Maybe some random number or uninitialized variable somewhere in the TPC processing / hit finding chain? It's just one out of 1295 so possibly hard to track down.

@bear-is-asleep bear-is-asleep mentioned this pull request Oct 15, 2024
6 tasks
@bear-is-asleep

Copy link
Copy Markdown
Contributor

Very good @bear-is-asleep ! I cannot imagine how the NTB decoder would impact the gaushit finder. Maybe some random number or uninitialized variable somewhere in the TPC processing / hit finding chain? It's just one out of 1295 so possibly hard to track down.

May be some stochastic processing within the CI that caused this, it's not a big enough deal to hold off on merging, though.

@bear-is-asleep
bear-is-asleep merged commit a7d4f4c into develop Oct 17, 2024
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.

5 participants