epic icon indicating copy to clipboard operation
epic copied to clipboard

Add missing detector type flags

Open ruse-traveler opened this issue 1 month ago • 2 comments

Briefly, what does this PR introduce?

This PR adds DD4hep DetType flags to most detector elements missing them.

Note that since only FORWARD is defined as a flag, I opted to label the FF/FB elements as ENDCAP. Then, following what was done in the central tracker, only detectors and beampipes are labeled; support and other structures are not.

What kind of change does this PR introduce?

  • [x] Bug fix (issue #993 )
  • [ ] New feature (issue #__)
  • [ ] Documentation update
  • [ ] Other: __

Please check if this PR fulfills the following:

  • [ ] Tests for the changes have been added
  • [ ] Documentation has been added / updated
  • [x] Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

No.

Does this PR change default behavior?

No.

ruse-traveler avatar Nov 14 '25 22:11 ruse-traveler

Have you tested querying these values? I don't think this works without explicit calls to dd4hep::xml::setDetectorTypeFlag() in each constructor.

veprbl avatar Nov 17 '25 21:11 veprbl

Have you tested querying these values? I don't think this works without explicit calls to dd4hep::xml::setDetectorTypeFlag() in each constructor.

Oof! I haven't tried it out yet, but I'll report back when I do! If need be, I'll do a pass to add explicit calls where needed...

ruse-traveler avatar Nov 17 '25 22:11 ruse-traveler

Have you tested querying these values? I don't think this works without explicit calls to dd4hep::xml::setDetectorTypeFlag() in each constructor.

Confirmed: you do indeed need an explicit call in each constructor. I just pushed a round of commits to add these calls to all sensitive detectors.

I also now have a working example of how to extract the type flags during reconstruction/analysis. I'll do a pass with it to make sure I've haven't missed/messed up anything, and then post here and add the example to either snippets or benchmarks...

ruse-traveler avatar Dec 02 '25 17:12 ruse-traveler