Skip to content
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

Merged
merged 4 commits into from Oct 29, 2018

Conversation

emacdonald16
Copy link
Contributor

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.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

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.
@Martin-Grunewald, @sviret this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

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;
Copy link
Contributor

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));
Copy link
Contributor

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();
Copy link
Contributor

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++) {
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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);
Copy link
Contributor

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

@kpedro88
Copy link
Contributor

Another question: is this code actually used anywhere in the current track trigger emulation? It looks like just a standalone function right now.

@emacdonald16
Copy link
Contributor Author

Hey @kpedro88 ,
Right now the emulation just inputs a -1 for the stubPtConsistency of a track (https://github.com/skinnari/cmssw/blob/TrackletEmulation_937/L1Trigger/TrackFindingTracklet/plugins/L1FPGATrackProducer.cc#L930-L936), which is what we're trying to modify.

@kpedro88
Copy link
Contributor

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?

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #24972 was updated. @nsmith-, @rekovic, @cmsbuild, @thomreis, @kpedro88 can you please check and sign again.

@emacdonald16
Copy link
Contributor Author

@kpedro88 I believe the plan is a followup PR

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #24972 was updated. @nsmith-, @rekovic, @cmsbuild, @thomreis, @kpedro88 can you please check and sign again.

@kpedro88
Copy link
Contributor

please test
(thanks for prompt fixes @emacdonald16!)

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 24, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/31255/console Started: 2018/10/24 18:14

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-24972/31255/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 2994843
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2994645
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 134 log files, 14 edm output root files, 32 DQM output files

@rekovic
Copy link
Contributor

rekovic commented Oct 26, 2018

+1

@kpedro88
Copy link
Contributor

+upgrade

@cmsbuild
Copy link
Contributor

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)

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 2d4bb57 into cms-sw:master Oct 29, 2018
@emacdonald16 emacdonald16 deleted the L1TriggerSPC branch March 12, 2019 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants