-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Update mkFit to support additional tracking iterations and other technical developments #34395
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
Changes from 8 commits
f2a9546
8cd4b38
8186b9a
4f5aa3f
54806c0
366373e
355e66a
1a35ee4
3be4df2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import FWCore.ParameterSet.Config as cms | ||
|
|
||
| # This modifier sets replaces the default pattern recognition with mkFit for pixelPairStep | ||
| trackingMkFitPixelPairStep = cms.Modifier() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,9 +12,15 @@ | |
| #include "RecoTracker/MkFit/interface/MkFitHitWrapper.h" | ||
| #include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h" | ||
|
|
||
| #include "CalibFormats/SiStripObjects/interface/SiStripQuality.h" | ||
| #include "CalibTracker/Records/interface/SiStripQualityRcd.h" | ||
| #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" | ||
| #include "DataFormats/TrackerCommon/interface/TrackerDetSide.h" | ||
|
|
||
| // mkFit includes | ||
| #include "mkFit/HitStructures.h" | ||
| #include "mkFit/MkStdSeqs.h" | ||
| #include "LayerNumberConverter.h" | ||
|
|
||
| class MkFitEventOfHitsProducer : public edm::global::EDProducer<> { | ||
| public: | ||
|
|
@@ -35,7 +41,10 @@ class MkFitEventOfHitsProducer : public edm::global::EDProducer<> { | |
| const edm::EDGetTokenT<MkFitClusterIndexToHit> pixelClusterIndexToHitToken_; | ||
| const edm::EDGetTokenT<MkFitClusterIndexToHit> stripClusterIndexToHitToken_; | ||
| const edm::ESGetToken<MkFitGeometry, TrackerRecoGeometryRecord> mkFitGeomToken_; | ||
| edm::ESGetToken<SiStripQuality, SiStripQualityRcd> qualityToken_; | ||
| edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> geomToken_; | ||
| const edm::EDPutTokenT<MkFitEventOfHits> putToken_; | ||
| const bool useStripStripQualityDB_; | ||
| }; | ||
|
|
||
| MkFitEventOfHitsProducer::MkFitEventOfHitsProducer(edm::ParameterSet const& iConfig) | ||
|
|
@@ -44,13 +53,20 @@ MkFitEventOfHitsProducer::MkFitEventOfHitsProducer(edm::ParameterSet const& iCon | |
| pixelClusterIndexToHitToken_{consumes(iConfig.getParameter<edm::InputTag>("pixelHits"))}, | ||
| stripClusterIndexToHitToken_{consumes(iConfig.getParameter<edm::InputTag>("stripHits"))}, | ||
| mkFitGeomToken_{esConsumes()}, | ||
| putToken_{produces<MkFitEventOfHits>()} {} | ||
| putToken_{produces<MkFitEventOfHits>()}, | ||
| useStripStripQualityDB_{iConfig.getParameter<bool>("useStripStripQualityDB")} { | ||
| if (useStripStripQualityDB_) { | ||
| qualityToken_ = esConsumes(); | ||
| geomToken_ = esConsumes(); | ||
| } | ||
| } | ||
|
|
||
| void MkFitEventOfHitsProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { | ||
| edm::ParameterSetDescription desc; | ||
|
|
||
| desc.add("pixelHits", edm::InputTag{"mkFitSiPixelHits"}); | ||
| desc.add("stripHits", edm::InputTag{"mkFitSiStripHits"}); | ||
| desc.add("useStripStripQualityDB", false)->setComment("Use SiStrip quality DB information"); | ||
|
|
||
| descriptions.addWithDefaultLabel(desc); | ||
| } | ||
|
|
@@ -63,6 +79,27 @@ void MkFitEventOfHitsProducer::produce(edm::StreamID iID, edm::Event& iEvent, co | |
| auto eventOfHits = std::make_unique<mkfit::EventOfHits>(mkFitGeom.trackerInfo()); | ||
| mkfit::StdSeq::Cmssw_LoadHits_Begin(*eventOfHits, {&pixelHits.hits(), &stripHits.hits()}); | ||
|
|
||
| if (useStripStripQualityDB_) { | ||
| std::vector<mkfit::DeadVec> deadvectors(mkFitGeom.layerNumberConverter().nLayers()); | ||
| const auto& siStripQuality = iSetup.getData(qualityToken_); | ||
| const auto& trackerGeom = iSetup.getData(geomToken_); | ||
| const auto& badStrips = siStripQuality.getBadComponentList(); | ||
| for (const auto& bs : badStrips) { | ||
| const auto& surf = trackerGeom.idToDet(DetId(bs.detid))->surface(); | ||
| const DetId detid(bs.detid); | ||
| bool isBarrel = (mkFitGeom.topology()->side(detid) == static_cast<unsigned>(TrackerDetSide::Barrel)); | ||
| const auto ilay = mkFitGeom.mkFitLayerNumber(detid); | ||
| // dump content of deadmodules.h in standalone setup | ||
| // std::cout << "deadvectors["<<ilay<<"].push_back({"<<surf.phiSpan().first<<","<<surf.phiSpan().second<<"," | ||
| // <<(isBarrel ? surf.zSpan().first : surf.rSpan().first)<<","<<(isBarrel ? surf.zSpan().second : surf.rSpan().second)<<"});"<<std::endl; | ||
| deadvectors[ilay].push_back({surf.phiSpan().first, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as already discussed at the TRK POG meeting, this might be excessive since if I understand correctly even a single masked strip in a module results in the full module being masked.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mmusich, thanks for your comment. |
||
| surf.phiSpan().second, | ||
| (isBarrel ? surf.zSpan().first : surf.rSpan().first), | ||
| (isBarrel ? surf.zSpan().second : surf.rSpan().second)}); | ||
| } | ||
| mkfit::StdSeq::LoadDeads(*eventOfHits, deadvectors); | ||
| } | ||
|
|
||
| fill(iEvent.get(pixelClusterIndexToHitToken_).hits(), *eventOfHits, mkFitGeom); | ||
| fill(iEvent.get(stripClusterIndexToHitToken_).hits(), *eventOfHits, mkFitGeom); | ||
|
|
||
|
|
||
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 usual comment about removing commented-out code applies here (or using LogDebug or ifdefs for debug printouts)
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. Those commented-out lines have been removed in a new commit.