DUNE-DAQ / DUNE-DAQ/fdreadoutlibs

TriggerPrimitive::detid values seem like they can be improved

Open
#85 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
0
Forks
3
Avg merge
1d 11h
Merged PRs (30d)
5

Description

I don't know whether to file this Issue in the fdreadoutlibs repo, or the detdataformats repo, or both...

The starting point is that I was printing out information from TriggerPrimitive structures that had been written to disk as part of TriggerRecords, and I noticed that the value of the "detid" field is often (always?) set to one, even when the HD_TPC was being used or emulated. (Recall HD_TPC has Subdetector number 3 in DetID.hh.)

Looking at the TriggerPrimitive.hh file in detdataformats, I see that its "detid" field is not the same thing as detid fields that we have in other places in the code. The TP detid is more of a geographic region.

My first point is that this is rather unfortunate naming. It seems to me that the TP detid field should be called geoid or geoinfo or something that doesn't overlap with a different definition elsewhere in the code.

My second point is that it would be nice to start populating the TP detid field with better values. I see a comment in WIB2FrameProcessor that says something like "to-do: start populating detid with SourceID". I'm not sure that SourceID is the right thing to be using, but it might be better than what is being used now.

I think that it would be great to sort this out and improve the situation, and I'm filing this issue to start the discussion.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the TriggerPrimitive.hh detid definition with DetID.hh and the usage in WIB2FrameProcessor. Clarify whether the field should be renamed and what geographic or SourceID-based values it should carry across fdreadoutlibs and detdataformats. Done requires an agreed meaning, consistent naming, and correct population wherever TriggerPrimitives are produced.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend, data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.