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
E/gamma HLT L1 Track Isolation Producer & TTTrack typedef: 11_3_X #32594
Conversation
1c75342
to
68e0824
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32594/20622
|
A new Pull Request was created by @Sam-Harper (Sam Harper) for master. It involves the following packages: DataFormats/L1TrackTrigger @perrotta, @cmsbuild, @fwyzard, @kpedro88, @jmduarte, @Martin-Grunewald, @rekovic, @slava77, @jpata can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
class EgammaHLTEleL1TrackIsolProducer : public edm::global::EDProducer<> { | ||
public: | ||
explicit EgammaHLTEleL1TrackIsolProducer(const edm::ParameterSet&); | ||
~EgammaHLTEleL1TrackIsolProducer() override; |
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.
just a suggestion:
~EgammaHLTEleL1TrackIsolProducer() override; | |
~EgammaHLTEleL1TrackIsolProducer() override = default; |
and drop the out-of-line implementation below.
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.
thanks, done, of course this is better :)
allow @Sam-Harper test rights |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-863d8c/11910/summary.html Comparison Summary@slava77 comparisons for the following workflows were not done due to missing matrix map:
Summary:
|
//based on the work of Swagata Mukherjee and Giulia Sorrentino | ||
|
||
class EgammaL1TkIsolation { | ||
public: |
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.
CMS code rule 4.25 (http://cms-sw.github.io/cms_coding_rules.html): "Each class may have only one each of public, protected, and private sections, which must be declared in that order."
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.
done
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.
to be pedantic, per 4.26, the order of functions in the .h and .cc should also be the same
float minDEta; | ||
float maxDZ; | ||
explicit TrkCuts(const edm::ParameterSet& para); | ||
static edm::ParameterSetDescription pSetDescript(); |
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 might be nicer to call this fillPSetDescription()
, following the naming scheme from https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideConfigurationValidationAndHelp#A_Plugin_Module_Using_Another_He (also for the instance below). Even better if it follows the pattern with edm::ParameterSetDescription& iDesc
provided as an argument rather than a return value.
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.
so this makes it cumbersome to use later on, eg here:
desc.add("isolCfg", EgammaL1TkIsolation::pSetDescript()); |
However hypothetically (though unlikely) somebody may wish to have this functionality and so I have provided both interfaces.
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.
That line would just need to change to:
EgammaL1TkIsolation::fillPSetDescription(desc);
(and then fillPSetDescription()
would call desc.add(...)
)
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.
still two lines and less clear than before? I dont see the problem with makePSetDescription() given I also supply a fillPSetDescription()
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.
@makortel please clarify how strongly the recommended pattern should be enforced
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 think the makePSetDescription()
that returns a edm::ParameterSetDescription
works fine here.
(for non-helper-plugin use cases I think the naming convention of ...PSetDescription
is more important than whether the ParameterSetDescription
is passed as an out-argument or returned)
double ptSum = 0.; | ||
int nrTrks = 0; | ||
|
||
const TrkCuts& cuts = std::abs(objEta) < 1.5 ? barrelCuts_ : endcapCuts_; |
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 number 1.5 should be named constant (or obtained from geometry...)
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.
made it configurable as its more a parameter than a strict geometry based variable
|
||
const TrkCuts& cuts = std::abs(objEta) < 1.5 ? barrelCuts_ : endcapCuts_; | ||
|
||
for (auto& trk : tracks) { |
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&
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.
ta missed that.
Hi, typedef of TTTrack<Ref_Phase2TrackerDigi_> is also available under namespace l1t in DataFormats/L1TCorrelator/interface/, inside L1CaloTkTau.h, TkEGTau.h etc. The typedef name is different though. They use this: but I understand that having the typedef in DataFormats/L1TrackTrigger/interface/L1Track.h is much better, as it is more central/generic place. but another L1Track.h exists under DataFormats/L1CSCTrackFinder/interface/ I had a quick chat with @guitargeek , and he suggested some things. I request him to write his suggestions here. Thanks! |
Okay, sure! My suggestion would be to adapt the names of the previously existing aliases in The content of the file would then be: using L1TTTrack = TTTrack<Ref_Phase2TrackerDigi_>;
using L1TTTrackCollection = std::vector<L1Track>; The file can then also be included in the https://github.com/cms-sw/cmssw/blob/master/DataFormats/L1TCorrelator/interface files to ensure consistency. |
In general, the class or type names used in CMS software do not have Also,
Just add
Well, yes, that is what namespaces are for: to distinguish |
@cmsbuild please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-863d8c/11987/summary.html Comparison SummarySummary:
|
#include "DataFormats/L1TrackTrigger/interface/TTTypes.h" | ||
#include <vector> | ||
|
||
using L1Track = TTTrack<Ref_Phase2TrackerDigi_>; |
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 was pointed out by Slava that this name is generic enough and might be more safer in a namespace, to avoid potential future symbol conficts. This is not strictly a reco file, so I let someone else give their suggestion as to what this could be.
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.
sure on this, I honestly have no preference, perhaps @rekovic could comment on what the L1 prefers here?
For what its worth on this point, I agree. I would have stuck it in whatever namespace TTrack is in but its in none.
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.
IIRC there is an l1t
namespace.
Perhaps we can place it there?
The full name l1t::L1Track
is a bit redundant though.
BTW, are there any other cases of TTTrack
instances? How would those be named with a typedef in a similar pattern?
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 dont believe there are any other such instances after having a brief but not exhaustive look. I'm fine with l1t::L1Track, we could also have l1t::TTTrack but given most code using a TTTrack is likely in the l1t namespace, its probably a bad idea. Last option would be l1t::Phase2Track which is a bit longer but also acceptable to me. I really have little preference here so if people have strong feelings I'm happy to change it to whatever.
I'll give it a little while to see if Vladimir comments.
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 should clarify one point: my main concern in the earlier discussion with @jpata was a possible conflict in compiled symbols. With a bit more thought, a typedef is just a synonym (it does not define a new type or compiled symbol) and a conflict if any will be at compile time and will be easily manageable.
So, perhaps there is no problem after all.
+reconstruction
|
+1 |
+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. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This is allows track isolation with L1 tracks to be produced for electrons for the E/g HLT. Part of this PR also introduces a typedef for a TTTrack<Ref_Phase2TrackerDigi_> to L1Track. This in my opinion should have been done a long time ago and such a typedef needs to exist centrally as people are already making their own. I dont care too much about the name.
Additionally in validation a "bug" was found with the track ambiguity solving for electrons in the HLT which will be fixed at a later date. Ie we seem to be picking the wrong track in a few cases and we should solve it.
Note, an example test config will not be provided for 11_3_X because of the difficulties of porting the HLT phase II between releases. A test config can be provided for 11_1_X on request but it'll be 50K lines of python
PR validation:
Tested in phase-II HLT setup and gives expected results.