-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fixing the disp tracking bug #59
Conversation
Changed a couple of asserts into if statements
It's illegal to have unnamed constants hard-wired in code, such as 0.25. Are you able to name these, and perhaps add a comment explaining how the value is derived? |
Could you please check if comments in Settings.h make it clear how to switch between exact & approx floating point. Is it the same cfg param for prompt & displaced tracking? Perhaps useapprox_? |
|
||
imatch = (std::abs(ideltaphi * irstub) < idrphicut) && (std::abs(ideltar) < idrcut); |
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.
Compiler says imatch may be undefined at L482. I think it is right! Same true for variable match.
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, Sorry about that.
I Fixed it,
} | ||
else{ | ||
edm::LogProblem("Tracklet") << "WARNING dphi and/or dphiapprox too large : " << dphi << " " << dphiapprox | ||
<< "dphi " << dphi << " Seed / ISeed " << tracklet->getISeed()<< endl; |
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.
Replace "dphi " by " dphi "
These asserts were in place before. I don't know the exact reason for 0.25 or 0.2 |
@aryd do you know what motivates numbers 0.2 & 0.25 in MatchCalculator.cc? Displaced tracking code exceeds them, but don't know if it matters. Since these constants were already in the code, and the authors don't know what they are, they needn't delay this PR. I've added a request to eliminate them to #45 . |
I confirm that displaced tracking no longer crashes. Checked on 1k ttbarPU200. |
Fixed the following warning: /cms/threejet-2/abhijith/hware_temp/approx_cal/CMSSW_11_2_0_pre6/src/L1Trigger/TrackFindingTracklet/src/MatchCalculator.cc:482:7: warning: 'imatch' may be used uninitialized in this function [-Wmaybe-uninitialized]
I have added the switch to make sure approx turns on with the useapprox_ in settings.h |
I'm not sure this is what we want. Previously in the TrackletCalculatorDisplaced, we were assigning the exact floating point parameters and projections to all three sets of values in the corresponding Tracklet object: the exact, approximate, and integer. This was the only choice, since the approximate calculation hadn't been developed yet. But now that we have the approximate calculation, we can assign the results of that to the approximate parameters and projections. I don't think that needs to be controlled at all by a configuration flag, let alone
|
@tomalin Right now, I don't think there is an easy way to compare the exact and approximate calculations, either from the TrackletCalculator or TrackletCalculatorDisplaced. Everything downstream of the TrackletCalculatorDisplaced is set up to use the approximate calculation, whether that's the floating point or integer version, since that should match what is ultimately done on the FPGA. For example, when setting the input parameters for the fit: cmssw/L1Trigger/TrackFindingTracklet/src/HybridFit.cc Lines 132 to 136 in 3d8ee9b
Probably the most straightforward way of implementing the flag that you're proposing would be to have the methods in the Tracklet class that return the approximate parameters and projections return the exact versions instead, based on the value of the flag. Or the flag could control whether the exact or approximate values are stored in the approximate variables in the constructor. Are there preferences for how this is done? |
|
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've checked the issues raised during the review have been addressed. Happy to merge.
* Fixing the disp tracking bug Changed a couple of asserts into if statements * fixing warning Fixed the following warning: /cms/threejet-2/abhijith/hware_temp/approx_cal/CMSSW_11_2_0_pre6/src/L1Trigger/TrackFindingTracklet/src/MatchCalculator.cc:482:7: warning: 'imatch' may be used uninitialized in this function [-Wmaybe-uninitialized] * add use approx switch to Tracklet Calculator Displaced
* Fixing the disp tracking bug Changed a couple of asserts into if statements * fixing warning Fixed the following warning: /cms/threejet-2/abhijith/hware_temp/approx_cal/CMSSW_11_2_0_pre6/src/L1Trigger/TrackFindingTracklet/src/MatchCalculator.cc:482:7: warning: 'imatch' may be used uninitialized in this function [-Wmaybe-uninitialized] * add use approx switch to Tracklet Calculator Displaced
Changed a couple of asserts into if statements
PR description:
This is to fix the bug when using displaced tracking. The problem is coming from a couple of "pile-up" tracks, reconstructed using displaced seed. There is a slight discrepancy arising from the approx projection.
To rectify this, I have turned a couple of asserts in the match calculator to if statements. This way, the function of asserts is served when we have this discrepancy, that if conditions will do the job, without breaking the program.
PR validation:
The fix is run over ttbar+200 PU for validation.