-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
base: master
Are you sure you want to change the base?
L1 tracking update #47067
Conversation
cms-bot internal usage |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47067/43234
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47067/43235
|
94ae2d7
to
e2dc5ef
Compare
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47067/43238
|
ci workflow deleted from pr. data folder deleted.
e2dc5ef
to
a5f36b2
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47067/43240
|
A new Pull Request was created by @tschuh for master. It involves the following packages:
@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. cms-bot commands are listed here |
@cmsbuild, please test |
+1 Size: This PR adds an extra 928KB to repository 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: Comparison SummarySummary:
|
+Upgrade |
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.
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 processingParameterSet
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-
static
s (even ifconst
) 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
- It was not straightforward to figure out whether those
// 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); } |
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 could imagine prefix increment of ++a
not incrementing a
to lead to a confusion by a future reader of the code.
typedef edm::mpl::Vector<ChannelAssignmentRcd> RcdsDataFormats; | ||
|
||
// record of trklet::DataFormats | ||
class DataFormatsRcd : public edm::eventsetup::DependentRecordImplementation<DataFormatsRcd, RcdsDataFormats> {}; |
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.
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_; |
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.
It would be great if copying edm::ParameterSet
could be avoided.
int iPhiSec, | ||
int iEtaReg) | ||
: settings_(settings), | ||
stubs_(stubs), |
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.
stubs_(stubs), | |
stubs_(std::move(stubs)), |
to avoid a copy.
stubsConst_(std::vector<const Stub*>()), | ||
bestStubs_(std::unordered_set<const Stub*>()), |
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.
These have the same effect as default constructor, and are thus not needed.
stubsConst_(std::vector<const Stub*>()), | |
bestStubs_(std::unordered_set<const Stub*>()), |
static const DataFormat& dfInv2R = dataFormats_->format(Variable::inv2R, Process::ht); | ||
static const DataFormat& dfPhiT = dataFormats_->format(Variable::phiT, Process::ht); |
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.
Function-static
s
void produce(StreamID, Event&, const EventSetup&) const override; | ||
void beginRun(const Run&, const EventSetup&) override; | ||
void produce(Event&, const EventSetup&) override; | ||
void endJob() {} |
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.
void endJob() {} |
@@ -50,25 +54,70 @@ namespace tt { | |||
EDPutTokenT<StubAssociation> putTokenSelection_; | |||
// Setup token | |||
ESGetToken<Setup, SetupRcd> esGetTokenSetup_; | |||
// | |||
ParameterSet pSet_; |
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.
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()); |
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.
Function-static
StubAssociation reconstructable(pSet_, setup_); | ||
StubAssociation selection(pSet_, setup_); |
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.
Parsing edm::ParameterSet
within event processing is slow
This PR updates mainly the modules
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.