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 tracking update #47067

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

L1 tracking update #47067

wants to merge 3 commits into from

Conversation

tschuh
Copy link
Contributor

@tschuh tschuh commented Jan 9, 2025

This PR updates mainly the modules

  • L1Trigger/TrackFindingTracklet
  • L1Trigger/TrackFindingTMTT
  • L1Trigger/TrackTrigger
  • L1Trigger/TrackerDTC
  • L1Trigger/TrackerTFP
  • DataFormats/L1TrackTrigger
  • SimTracker/TrackTriggerAssociation

in order to sync s/w emulation of L1 tracking with current f/w. Some name changes have also been propagated to additional modules.

The code changes of this PR did pass review of L1 tracking community checking for L1 tracking performance, code formats, etc.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2025

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47067/43234

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2025

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47067/43235

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2025

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47067/43238

ci workflow deleted from pr.

data folder deleted.
@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2025

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47067/43240

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2025

A new Pull Request was created by @tschuh for master.

It involves the following packages:

  • Configuration/StandardSequences (operations)
  • DataFormats/L1TrackTrigger (upgrade, l1)
  • DataFormats/WrappedStdDictionaries (core)
  • L1Trigger/L1TTrackMatch (upgrade, l1)
  • L1Trigger/Phase2L1ParticleFlow (upgrade, l1)
  • L1Trigger/TrackFindingTMTT (l1)
  • L1Trigger/TrackFindingTracklet (l1)
  • L1Trigger/TrackTrigger (upgrade, l1)
  • L1Trigger/TrackerDTC (upgrade, l1)
  • L1Trigger/TrackerTFP (l1)
  • SimTracker/TrackTriggerAssociation (simulation, l1)

@Dr15Jones, @Moanwar, @aloeliger, @antoniovilela, @civanch, @cmsbuild, @davidlange6, @epalencia, @fabiocos, @kpedro88, @makortel, @mandrenguyen, @mdhildreth, @rappoccio, @smuzaffar, @srimanob, @subirsarkar can you please review it and eventually sign? Thanks.
@GiacomoSguazzoni, @Martin-Grunewald, @VinInn, @VourMa, @dgulhan, @erikbutz, @fabiocos, @felicepantaleo, @makortel, @missirol, @mmusich, @mtosi, @rovere, @sameasy, @skinnari, @slomeo, @sviret, @threus, @wddgit this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@makortel
Copy link
Contributor

makortel commented Jan 9, 2025

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2025

+1

Size: This PR adds an extra 928KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f7f383/43702/summary.html
COMMIT: a5f36b2
CMSSW: CMSSW_15_0_X_2025-01-09-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/47067/43702/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f7f383/43702/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f7f383/43702/git-merge-result

Comparison Summary

Summary:

  • You potentially removed 129 lines from the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 14 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3818730
  • DQMHistoTests: Total failures: 517
  • DQMHistoTests: Total nulls: 12
  • DQMHistoTests: Total successes: 3818181
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.8560000000000004 KiB( 48 files compared)
  • DQMHistoSizes: changed ( 1000.0,... ): -0.012 KiB MessageLogger/Errors
  • DQMHistoSizes: changed ( 1000.0,... ): -0.012 KiB MessageLogger/Warnings
  • DQMHistoSizes: changed ( 24834.911,... ): -0.008 KiB MessageLogger/Errors
  • DQMHistoSizes: changed ( 24834.911,... ): -0.008 KiB MessageLogger/Warnings
  • DQMHistoSizes: changed ( 4.22,... ): -0.004 KiB MessageLogger/Errors
  • DQMHistoSizes: changed ( 4.22,... ): -0.004 KiB MessageLogger/Warnings
  • Checked 214 log files, 184 edm output root files, 49 DQM output files
  • TriggerResults: found differences in 3 / 47 workflows

@Moanwar
Copy link
Contributor

Moanwar commented Jan 12, 2025

+Upgrade

Copy link
Contributor

@makortel makortel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The core part itself (DataFormats/WrappedStdDictionaries/src/classes_def.xml) is fine, but I took a very cursory look to the other code.

I noticed two widespread patterns that should be improved:

  • holding copies of edm::ParameterSet and parsing them during event processing
    • ParameterSet copies take memory (they are not lightweight)
    • parsing ParameterSet is not fast (it's not super-slow either, but not intended to be done during data processing)
  • function-statics (even if const) that are initialized based on the state of some object
    • It was not straightforward to figure out whether those static constants are effectively build-time-defined constants, or depend on some runtime-dependent value(s) such as coming from the EventSetup. In the latter case this pattern effectively prevents these values changing between IOVs (or testing two payloads with different values in the same job), but in the way the situation can only be discovered from the physics results.
    • There was one non-const function static that is a thread-safety issue

Comment on lines +37 to +40
// increment of Process
inline constexpr Process operator++(Process p) { return Process(+p + 1); }
// increment of Variable
inline constexpr Variable operator++(Variable v) { return Variable(+v + 1); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could imagine prefix increment of ++a not incrementing a to lead to a confusion by a future reader of the code.

Comment on lines +10 to +13
typedef edm::mpl::Vector<ChannelAssignmentRcd> RcdsDataFormats;

// record of trklet::DataFormats
class DataFormatsRcd : public edm::eventsetup::DependentRecordImplementation<DataFormatsRcd, RcdsDataFormats> {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could ChannelAssignmentRcd be used directly, since DataFormatsRcd doesn't depend on anything else? Or is DataFormatsRcd foreseen to depend on additional Records?

// number of bits used to represent layer id [barrel: 0-5, discs: 6-10]
int widthLayerId_;
// TM parameter
edm::ParameterSet pSetTM_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if copying edm::ParameterSet could be avoided.

int iPhiSec,
int iEtaReg)
: settings_(settings),
stubs_(stubs),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
stubs_(stubs),
stubs_(std::move(stubs)),

to avoid a copy.

Comment on lines +87 to +88
stubsConst_(std::vector<const Stub*>()),
bestStubs_(std::unordered_set<const Stub*>()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These have the same effect as default constructor, and are thus not needed.

Suggested change
stubsConst_(std::vector<const Stub*>()),
bestStubs_(std::unordered_set<const Stub*>()),

Comment on lines +279 to +280
static const DataFormat& dfInv2R = dataFormats_->format(Variable::inv2R, Process::ht);
static const DataFormat& dfPhiT = dataFormats_->format(Variable::phiT, Process::ht);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function-statics

void produce(StreamID, Event&, const EventSetup&) const override;
void beginRun(const Run&, const EventSetup&) override;
void produce(Event&, const EventSetup&) override;
void endJob() {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
void endJob() {}

@@ -50,25 +54,70 @@ namespace tt {
EDPutTokenT<StubAssociation> putTokenSelection_;
// Setup token
ESGetToken<Setup, SetupRcd> esGetTokenSetup_;
//
ParameterSet pSet_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to avoid holding a copy of the edm::ParameterSet.

static constexpr bool intimeOnly = true;
static constexpr bool chargedOnly = true;
static constexpr bool stableOnly = false;
static const double maxEta = asinh((maxZT_ + maxZ0_) / setup_->chosenRofZ());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function-static

Comment on lines +139 to +140
StubAssociation reconstructable(pSet_, setup_);
StubAssociation selection(pSet_, setup_);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing edm::ParameterSet within event processing is slow

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.

4 participants