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
Fix phi windows computation #12882
Merged
Merged
Fix phi windows computation #12882
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1c27098
fix acos
VinInn 59a6384
fix phi range computation, reduce max window
VinInn 7fa0e99
comment cout
VinInn 9ff211f
fix windows in seeding (part1)
VinInn 602a252
merge
VinInn 87ee93f
factorize, fix LTip as well
VinInn f7c52b9
fix byChi2 as well
VinInn 21044aa
fix bug and add limit on phiwindow
VinInn 3ee5181
simplify phiRange
VinInn 1e7d0a9
merge head
VinInn 3a362fa
Merged PhiWindows from repository VinInn
VinInn bfd721f
clean up
VinInn 1472fb6
fix hardwired default
VinInn 03b9f3c
fix logical error
VinInn 66c7f9e
protect cout with DEBUG flag
VinInn File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,30 @@ | ||
#ifndef Math_notmalizedPhi_h | ||
#define Math_notmalizedPhi_h | ||
#include "DataFormats/Math/interface/deltaPhi.h" | ||
/* return a value of phi into interval [-pi,+pi] | ||
* | ||
*/ | ||
|
||
// return a value of phi into interval [-pi,+pi] | ||
template<typename T> | ||
inline | ||
T normalizedPhi(T phi) { return reco::reduceRange(phi);} | ||
|
||
// cernlib V306 | ||
template<typename T> | ||
inline | ||
T proxim(T b, T a) { | ||
constexpr T c1 = 2.*M_PI; | ||
constexpr T c2 = 1/c1; | ||
return b+c1*std::round(c2*(a-b)); | ||
} | ||
|
||
template<typename T> | ||
inline | ||
bool checkPhiInRange(T phi, T phi1, T phi2) { | ||
constexpr T c1 = 2.*M_PI; | ||
phi1 = normalizedPhi(phi1); | ||
phi2 = proxim(phi2,phi1); | ||
// phi & phi1 are in [-pi,pi] range... | ||
return ( (phi1 <= phi) && (phi <= phi2) ) || | ||
( (phi1 <= phi+c1) && (phi+c1 <= phi2) ); | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 appears to be the only "bare" cout (not protected by DEBUG).
The bug disabled it.
If it should stay exposed for default processing, it has to be converted to LogWarning/LogInfo.
Otherwise, please add "& DEBUG"
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 not under my direct responsibility...
I will protect with DEBUG...