-
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
pT dependent ROI producers for Muon HLT #37286
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37286/28914
|
A new Pull Request was created by @khaosmos93 (Minseok Oh) for master. It involves the following packages:
@jpata, @cmsbuild, @clacaputo, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
Hi @khaosmos93 , one question from HLT: would this update eventually be needed in HLT menus for |
Hi @missirol, the answer is yes, we would need this backported to |
Okay, good to know, will keep an eye on this (cc: @Martin-Grunewald , @silviodonato). |
explicit MuonTrackingRegionByPtBuilder(const edm::ParameterSet& par, edm::ConsumesCollector&& iC) { build(par, iC); } | ||
|
||
/// Destructor | ||
~MuonTrackingRegionByPtBuilder() 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.
could be default
.
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.
iC.consumes<MeasurementTrackerEvent>(regPSet.getParameter<edm::InputTag>("measurementTrackerName")); | ||
} | ||
m_searchOpt = false; | ||
if (regPSet.exists("searchOpt")) |
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 this practice is discouraged: #36261
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.
removed.
if (!valid_charge) | ||
charge = 0; | ||
|
||
int link = 36 + (int)(it->tfMuonIndex() / 3.); |
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
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.
move to static constexpr
|
||
int link = 36 + (int)(it->tfMuonIndex() / 3.); | ||
bool barrel = true; | ||
if ((link >= 36 && link <= 41) || (link >= 66 && link <= 71)) |
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.
more magic numbers
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.
move to static constexpr
GlobalTrajectoryParameters param(pos, mom, charge, &*service_->magneticField()); | ||
|
||
AlgebraicSymMatrix55 mat; | ||
mat[0][0] = (0.25 / pt) * (0.25 / pt); // sigma^2(charge/abs_momentum) |
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.
some more magic numbers.
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.
move to static constexpr
edm::Handle<MeasurementTrackerEvent> hmte; | ||
iEvent.getByToken(token_measurementTracker, hmte); | ||
measurementTracker = hmte.product(); |
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.
edm::Handle<MeasurementTrackerEvent> hmte; | |
iEvent.getByToken(token_measurementTracker, hmte); | |
measurementTracker = hmte.product(); | |
measurementTracker = &iEvent.get(token_measurementTracker); |
I think this whole section could be simplified.
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
if (pt < l1MinPt_ || std::abs(eta) > l1MaxEta_) | ||
continue; | ||
|
||
float theta = 2 * atan(exp(-eta)); |
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.
isn't this very expensive in a double loop? (note that I don't have a good suggestion to overcome this as you need it also to construct the momentum vector below - given the dataformat - , but maybe some of the reviewers have)
bool m_precise; | ||
edm::EDGetTokenT<MeasurementTrackerEvent> token_measurementTracker; | ||
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_whereToUseMeasurementTracker; | ||
edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> token_field; |
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 be const
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.
pt = minPtBarrel_; | ||
} else { | ||
// ME2 | ||
theid = theta < Geom::pi() / 2. ? CSCDetId(1, 2, 0, 0, 0) : CSCDetId(2, 2, 0, 0, 0); |
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.
any reason why it can't be M_PI
?
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
// Flag to use precise?? | ||
thePrecise = par.getParameter<bool>("precise"); | ||
|
||
// perigee reference point ToDo: Check this |
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.
What does ToDo: Check this
means here? Do you have some issues?
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.
sry, it's something I forgot to remove from the old code.
|
||
/// Add Fill Descriptions | ||
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); | ||
static void fillDescriptionsHLT(edm::ParameterSetDescription& descriptions); |
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.
if you are not planning to do something like this
cmssw/RecoMuon/GlobalTrackingTools/src/MuonTrackingRegionBuilder.cc
Lines 268 to 339 in f2bf00c
void MuonTrackingRegionBuilder::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { | |
{ | |
edm::ParameterSetDescription desc; | |
fillDescriptionsOffline(desc); | |
descriptions.add("MuonTrackingRegionBuilder", desc); | |
} | |
{ | |
edm::ParameterSetDescription desc; | |
fillDescriptionsHLT(desc); | |
descriptions.add("MuonTrackingRegionBuilderHLT", desc); | |
} | |
descriptions.setComment( | |
"Build a TrackingRegion around a standalone muon. Options to define region around beamspot or primary vertex and " | |
"dynamic regions are included."); | |
} | |
void MuonTrackingRegionBuilder::fillDescriptionsHLT(edm::ParameterSetDescription& desc) { | |
desc.add<double>("EtaR_UpperLimit_Par1", 0.25); | |
desc.add<double>("DeltaR", 0.2); | |
desc.add<edm::InputTag>("beamSpot", edm::InputTag("hltOnlineBeamSpot")); | |
desc.add<int>("OnDemand", -1); | |
desc.add<edm::InputTag>("vertexCollection", edm::InputTag("pixelVertices")); | |
desc.add<double>("Rescale_phi", 3.0); | |
desc.add<bool>("Eta_fixed", false); | |
desc.add<double>("Rescale_eta", 3.0); | |
desc.add<double>("PhiR_UpperLimit_Par2", 0.2); | |
desc.add<double>("Eta_min", 0.05); | |
desc.add<bool>("Phi_fixed", false); | |
desc.add<double>("Phi_min", 0.05); | |
desc.add<double>("PhiR_UpperLimit_Par1", 0.6); | |
desc.add<double>("EtaR_UpperLimit_Par2", 0.15); | |
desc.add<edm::InputTag>("MeasurementTrackerName", edm::InputTag("hltESPMeasurementTracker")); | |
desc.add<bool>("UseVertex", false); | |
desc.add<double>("Rescale_Dz", 3.0); | |
desc.add<bool>("Pt_fixed", false); | |
desc.add<bool>("Z_fixed", true); | |
desc.add<double>("Pt_min", 1.5); | |
desc.add<double>("DeltaZ", 15.9); | |
desc.add<double>("DeltaEta", 0.2); | |
desc.add<double>("DeltaPhi", 0.2); | |
desc.add<int>("maxRegions", 1); | |
desc.add<bool>("precise", true); | |
desc.add<edm::InputTag>("input", edm::InputTag("hltL2Muons", "UpdatedAtVtx")); | |
} | |
void MuonTrackingRegionBuilder::fillDescriptionsOffline(edm::ParameterSetDescription& desc) { | |
desc.add<double>("EtaR_UpperLimit_Par1", 0.25); | |
desc.add<double>("DeltaR", 0.2); | |
desc.add<edm::InputTag>("beamSpot", edm::InputTag("")); | |
desc.add<int>("OnDemand", -1); | |
desc.add<edm::InputTag>("vertexCollection", edm::InputTag("")); | |
desc.add<double>("Rescale_phi", 3.0); | |
desc.add<bool>("Eta_fixed", false); | |
desc.add<double>("Rescale_eta", 3.0); | |
desc.add<double>("PhiR_UpperLimit_Par2", 0.2); | |
desc.add<double>("Eta_min", 0.05); | |
desc.add<bool>("Phi_fixed", false); | |
desc.add<double>("Phi_min", 0.05); | |
desc.add<double>("PhiR_UpperLimit_Par1", 0.6); | |
desc.add<double>("EtaR_UpperLimit_Par2", 0.15); | |
desc.add<edm::InputTag>("MeasurementTrackerName", edm::InputTag("")); | |
desc.add<bool>("UseVertex", false); | |
desc.add<double>("Rescale_Dz", 3.0); | |
desc.add<bool>("Pt_fixed", false); | |
desc.add<bool>("Z_fixed", true); | |
desc.add<double>("Pt_min", 1.5); | |
desc.add<double>("DeltaZ", 15.9); | |
desc.add<double>("DeltaEta", 0.2); | |
desc.add<double>("DeltaPhi", 0.2); | |
desc.add<int>("maxRegions", 1); | |
desc.add<bool>("precise", true); | |
desc.add<edm::InputTag>("input", edm::InputTag("")); | |
} |
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.
/// Add Fill Descriptions | ||
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); | ||
static void fillDescriptionsHLT(edm::ParameterSetDescription& descriptions); | ||
static void fillDescriptionsOffline(edm::ParameterSetDescription& descriptions); |
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.
As above
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
@@ -0,0 +1,86 @@ | |||
#ifndef RecoMuon_TrackingTools_MuonTrackingRegionByPtBuilder_H |
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.
#ifndef RecoMuon_TrackingTools_MuonTrackingRegionByPtBuilder_H | |
#ifndef RecoMuon_GlobalTrackingTools_MuonTrackingRegionByPtBuilder_h | |
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
@@ -0,0 +1,411 @@ | |||
#ifndef L1MuonSeededTrackingRegionsProducer_h |
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.
#ifndef L1MuonSeededTrackingRegionsProducer_h | |
#ifndef RecoTracker_TkTrackingRegions_L1MuonSeededTrackingRegionsProducer_h |
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
@@ -0,0 +1,411 @@ | |||
#ifndef L1MuonSeededTrackingRegionsProducer_h | |||
#define L1MuonSeededTrackingRegionsProducer_h |
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.
#define L1MuonSeededTrackingRegionsProducer_h | |
#define RecoTracker_TkTrackingRegions_L1MuonSeededTrackingRegionsProducer_h |
@@ -0,0 +1,86 @@ | |||
#ifndef RecoMuon_TrackingTools_MuonTrackingRegionByPtBuilder_H | |||
#define RecoMuon_TrackingTools_MuonTrackingRegionByPtBuilder_H |
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.
#define RecoMuon_TrackingTools_MuonTrackingRegionByPtBuilder_H | |
#define RecoMuon_GlobalTrackingTools_MuonTrackingRegionByPtBuilder_h | |
Hi @khaosmos93 , on which workflow did you test it? |
@cmsbuild please test |
Just fyi, Minseok is moving to Europe currently, so questions and comments will be addressed next week. |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-60bbc1/23395/summary.html Comparison SummarySummary:
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37286/29107
|
Pull request #37286 was updated. @jpata, @cmsbuild, @clacaputo, @slava77 can you please check and sign again. |
Thank you very much for your comments, @mmusich, @clacaputo! I tried to address most of them. |
@cmsbuild please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-60bbc1/23596/summary.html Comparison SummarySummary:
|
urgent According to #37286 (comment), the plan of MUO-HLT experts is to have this PR (integrated in ("urgent" here means "to be backported in time for |
+reconstruction |
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. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
This PR adds two new tracking region producers with pt parametrized ROI sizes for the inside-out track reconstruction in Muon HLT. These modules are minimally changed from the existing modules:
RecoMuon/GlobalTrackingTools/interface/MuonTrackingRegionByPtBuilder.h
is updated fromRecoMuon/GlobalTrackingTools/interface/MuonTrackingRegionBuilder.h
RecoTracker/TkTrackingRegions/plugins/L1MuonSeededTrackingRegionsProducer.h
is updated fromRecoTracker/TkTrackingRegions/plugins/CandidateSeededTrackingRegionsProducer.h
Initial performance study was presented at the TSG meeting by @wonpoint4: https://indico.cern.ch/event/1131517/contributions/4751084/attachments/2396360/4097442/220223_TSG_MuonROI_wonjun.pdf
FYI: @JanFSchulte @wonpoint4