-
Notifications
You must be signed in to change notification settings - Fork 15
Dead modules #319
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
Dead modules #319
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -411,6 +411,12 @@ void MkFinder::SelectHitIndices(const LayerOfHits &layer_of_hits, | |
| { | ||
| const int pb = pi & L.m_phi_mask; | ||
|
|
||
| if (L.m_phi_bin_deads[qi][pb] == true) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is checked for ALL phi/q bins within (potentially large?) search windows. This means, if we find a hit, that the missed-hit candidate will be generated as being in-gap -- i.e., without the missing hit penalty. Should we only set this if no hits are found? Or if the found hit is more than some dphi-sigma away?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, this is conservative. But I think CMSSW does the same. If there is a dead region within the search window you have no guarantee that the track did not pass through it - even if you find a hit it could be an accidental match. This does not mean that we cannot be more creative than CMSSW, but I think this is a reasonable starting point. |
||
| { | ||
| //std::cout << "dead module for track in layer=" << L.layer_id() << " qb=" << qi << " pb=" << pb << " q=" << q << " phi=" << phi<< std::endl; | ||
| XWsrResult[itrack].m_in_gap = true; | ||
| } | ||
|
|
||
| // MT: The following line is the biggest hog (4% total run time). | ||
| // This comes from cache misses, I presume. | ||
| // It might make sense to make first loop to extract bin indices | ||
|
|
@@ -610,15 +616,7 @@ void MkFinder::SelectHitIndices(const LayerOfHits &layer_of_hits, | |
| // Avi says we should have *minimal* search windows per layer. | ||
| // Also ... if bins are sufficiently small, we do not need the extra | ||
| // checks, see above. | ||
| if (L.GetHit(hi_orig).mcHitID() == -7) | ||
| { | ||
| //ARH: This will need a better treatment but works for now | ||
| XWsrResult[itrack].m_in_gap = true; | ||
| } | ||
| else | ||
| { | ||
| XHitArr.At(itrack, XHitSize[itrack]++, 0) = hi_orig; | ||
| } | ||
| XHitArr.At(itrack, XHitSize[itrack]++, 0) = hi_orig; | ||
| } | ||
| else | ||
| { | ||
|
|
@@ -1065,7 +1063,7 @@ void MkFinder::FindCandidatesCloneEngine(const LayerOfHits &layer_of_hits, CandC | |
| tmpList.hitIdx = fake_hit_idx; | ||
| tmpList.module = -1; | ||
| tmpList.nhits = NFoundHits(itrack,0,0); | ||
| tmpList.ntailholes= NTailMinusOneHits(itrack,0,0)+1; | ||
| tmpList.ntailholes= (fake_hit_idx == -1 ? NTailMinusOneHits(itrack,0,0)+1 : NTailMinusOneHits(itrack,0,0)); | ||
| tmpList.noverlaps= NOverlapHits(itrack,0,0); | ||
| tmpList.nholes = num_inside_minus_one_hits(itrack); | ||
| tmpList.pt = std::abs(1.0f / Par[iP].At(itrack,3,0)); | ||
|
|
||
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.
Config::m_nphi = 128, 6.28/128 = .04906
Should we consider trying to increase phi-bins to 256 to reduce false identification of bad hits? IIRC, Slava said there is little speed change if one varies this variable. It was 1024 before Slava's last changes 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.
at a radius of 1.1 m (roughly the last layer, TOB) 128 bins corresponds to 5.4 cm.
TOB modules are 9 cm. So, a phi bin is close to a half of the module or less.
TIB modules are 6 cm (the last TIB radius is 50 cm; a phi bin size at this radius is 2.5 cm).
BPIX is 1.6 cm (the last layer is 16 cm; a bin size is 0.8 cm).
So, unless this technology is going to appropriately pick up fractions of modules we will just be repeating the values.
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.
Since the overall structure of the bins is already in place, repeating values means just a bool and is thus a very small effect. So it's good that the bin size is smaller than the module size, I was more concerned that we could over-assign invalid hits. To me this means that the dead modules do not require an increase in phi bins, but if we choose to do so that is not going to create problems either
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.
Just to note that
std::array<bool, N>takes one byte per element (in case with you were after "bit per element" with "just a bool"). Nevertheless a byte per element could be ok storage-wise (128 bytes per layer if I guess correctly?), and avoids bit shifts (although their real cost in modern hardware is unclear to me).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.
yes, I assumed one bit. Thanks for clarifying. In any case it's still a minimal footprint (if we were to create a dedicated bin structure it would necessarily be larger, or even if we were to add many dummy hits as in the first implementation by Allie)
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 is actually even more pronounced for q-bins. We have both a) too large q bins (at least in some layers), and b) earch an extra q-bin up/down. So we effectively pick up dead regions way too often.
Maybe we could restrict this matching at least in q, unless the track passes relatively close to the edge of the bin.
We should re-check q-bins as well. @mmasciov haven't I tried to stick it on you a couple of months back? :)
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.
And it's 128 bytes * N_q_bins. We should switch to bits ... that part of code is heavily L1 limited.