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
L1 trigger - TTTrack - stub pt consistency #24972
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-24972/6944 |
A new Pull Request was created by @emacdonald16 for master. It involves the following packages: L1Trigger/TrackTrigger @nsmith-, @rekovic, @cmsbuild, @thomreis, @kpedro88 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
double trk_bendchi2 = 0.0; | ||
|
||
if ( !(nPar==4 || nPar==5)) { | ||
std::cerr << "Not a valid nPar option!" << std::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.
std:cerr
is not allowed (not threadsafe)
It looks like this should case issue an exception rather than returning a default value.
|
||
double bend_resolution = 0.483; | ||
// Need the pT signed in order to determine if bend is positive or negative | ||
float trk_signedPt = 0.3*3.811202/100.0/(aTrack.getRInv(nPar)); |
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.
all of these magic numbers should be named constants
float trk_signedPt = 0.3*3.811202/100.0/(aTrack.getRInv(nPar)); | ||
|
||
// loop over stubs | ||
std::vector< edm::Ref< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > >, TTStub< Ref_Phase2TrackerDigi_ > > > stubRefs = aTrack.getStubRefs(); |
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.
const auto& stubRefs =
std::vector< edm::Ref< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > >, TTStub< Ref_Phase2TrackerDigi_ > > > stubRefs = aTrack.getStubRefs(); | ||
int nStubs = stubRefs.size(); | ||
|
||
for (int is=0; is<nStubs; is++) { |
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.
for(const auto& stubRef : stubRefs)
float stub_r = posStub.perp(); | ||
float stub_z = posStub.z(); | ||
|
||
bool isBarrel = false; |
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.
bool isBarrel = (detIdStub.subdetId()==StripSubdetector::TOB)
//Approximation of phiOverBendCorrection, from TMTT: https://github.com/CMS-TMTT/cmssw/blob/TMTT_938/L1Trigger/TrackFindingTMTT/src/Stub.cc#L440-L448 | ||
bool tiltedBarrel = (isBarrel && tTopo->tobSide(detIdStub)!=3); | ||
float correction; | ||
if (tiltedBarrel) correction= 0.886454*fabs(stub_z)/stub_r+0.504148; |
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.
magic numbers should be named constants
|
||
float stubBend = stubRefs.at(is)->getTriggerBend(); | ||
if (!isBarrel && stub_z<0.0) stubBend=-stubBend; | ||
float trackBend = -(sensorSpacing*stub_r*mMagneticFieldStrength*(3.0E8/2.0E11))/(stripPitch*trk_signedPt*correction); |
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.
magic numbers should be named constants
Another question: is this code actually used anywhere in the current track trigger emulation? It looks like just a standalone function right now. |
Hey @kpedro88 , |
Okay, thanks for the additional detail. What is the plan to connect the code in this PR with the rest of the emulation? A followup PR? |
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-24972/6949 |
@kpedro88 I believe the plan is a followup PR |
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-24972/6965 |
please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
+upgrade |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
Hello,
I have updated the module StubPtConsistency that used to live in SLHCUpgradeSimulations in CMSSW_6_2_X (https://github.com/skinnari/cmssw/blob/L1TK_62X_SLHC28/SLHCUpgradeSimulations/L1TrackTrigger/src/StubPtConsistency.cc).
The module is a track parameter that makes use of the stub bend information, and a part of the TTTrack object.
A talk on the variable (including definition, implementation, and performance) can be found here: https://indico.cern.ch/event/761293/contributions/3176150/attachments/1734157/2804056/UsingStubBend.pdf
NOTE: the talk shows the difference between two variables that use the bend information. The variable termed "bend chi2," which has better performance, is the variable that has been input into the empty StubPtConsistency module.