-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First pass at extracting digis from tracks #1343
First pass at extracting digis from tracks #1343
Conversation
…ks, and implementation for tracker
Hi @edcallaghan,
which require these tests: build. @Mu2e/write, @Mu2e/fnalbuild-users have access to CI actions on main. ⌛ The following tests have been triggered for c086bf4: build (Build queue is empty) |
☀️ The build tests passed at c086bf4.
N.B. These results were obtained from a build of this Pull Request at c086bf4 after being merged into the base branch at 38f72f8. For more information, please check the job page here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it makes sense to combine this module with the time-shifting module, as I suspect both will end up needing to reference a track, and both otherwise produce and consume the same products. It seem more efficient to do this in one pass.
📝 The HEAD of |
@FNALbuild run build test |
⌛ The following tests have been triggered for c086bf4: build (Build queue is empty) |
☀️ The build tests passed at c086bf4.
N.B. These results were obtained from a build of this Pull Request at c086bf4 after being merged into the base branch at 11e1039. For more information, please check the job page here. |
@brownd I envision the two as needing to be distinct via the following reasoning: When you propose that this part of the chain would reference the track, I assume you mean to use some fit |
@FNALbuild run build test |
⌛ The following tests have been triggered for fefea3d: build (Build queue has 1 jobs) |
☀️ The build tests passed at fefea3d.
N.B. These results were obtained from a build of this Pull Request at fefea3d after being merged into the base branch at e3e7160. For more information, please check the job page here. |
for (const auto& kalseed: *kalseeds){ | ||
// tracker | ||
auto seeds = kalseed.hits(); | ||
for (const auto& seed: seeds){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its not clear to me we want to keep the inactive hits in this use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only place I can identify this being set is in the TrkStrawHitSeed
constructor, where it propagates from a WireHitState
--- it looks like this is still a fit-level construct (e.g., it contains the decision on left/right ambiguity), so is contextual to the fit. If that's the case, then I think we'd want to keep the inactive hits, as they could become active when fit in the presence of pileup. Is that a reasonable take?
Or, if I'm wrong about the above, then we have to ask whether only propagating active hits risks a break in blindness. Since these are overlaid onto pileup which could contribute hits to the fit but end up inactive, the answer may be no, but it's worth mentioning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In OffSpill cosmic track events, the inactive hits will mostly be poorly measured hits created by the primary particle, so you want to keep them. However in a mixed event, many/most of the inactive hits will be from pileup, so you would not want to keep them if you planned to re-mix the extracted digis.
I think the current code covers 90% of the foreseeable use cases, lets go with this for now. If in future we want to use this code to extract digis from events with pileup we can extend it to include a hit selection algorithm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that all makes sense.
auto strawadcss = event.getValidHandle<StrawDigiADCWaveformCollection>(_strawdigi_tag); | ||
|
||
// sanity checks | ||
if (strawhits->size() != strawdigis->size()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test relies on this module's config being consistent with what was used when fitting the tracks.
A way to ensure consistency is to use the KKTrack instead of KalSeed; KKTrack can have Ptrs back to underlying collections, but it cannot be persisted, due to payload that includes std::Ptrs. We can discuss if that makes sense in this context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, ok. The current implementation does depend on this check passing, as e.g. StrawHit
s and StrawDigi
s do not contain any ptrs to each other. To be sure that both for a given hit are included, we have to assume that the collections in which they are contained are aligned (and the best check we have for that is same-length).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a long-term issue that we need to improve the robustness of the digi->hit->trkhit indexing using ProductPtr, which didn't exist when the original codes were written. That's beyond the scope of this PR. We can deal with this code when we address that issue in general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me.
public: | ||
struct Config{ | ||
// track | ||
fhicl::Atom<art::InputTag> kalseed_tag{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it conceivable this module will need to coherently process multiple KalSeed collections (ie multiple particle hypotheses)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is conceivable, but IMO unlikely for the conversion-blinding use case where we really only want electron-like tracks. Maybe we'll determine that selecting another stream is useful for some book-keeping purpose, but I doubt that we'd want to collate that with the electron-likes at this stage.
This PR implements a modules which deep-copies
StrawDigi
s andStrawDigiWaveform
s which are associated with a reconstructed track viaKalSeed
into new*Collection
s.This PR is marked as a draft for now; more detail will be added here before it's necessary to initiate review.New module:
TrackDigiExtractor
: Given aKalSeedCollection
, produces aStrawDigiCollection
andStrawDigiADCWaveformCollection
which contain data products pointed to byKalSeed
s in the specified collection. Future development implement include data products from the calorimeter.