-
Notifications
You must be signed in to change notification settings - Fork 0
add dead strips from strip quality #24
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 1 commit
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 |
|---|---|---|
|
|
@@ -25,6 +25,10 @@ | |
| #include "RecoTracker/MkFit/interface/MkFitGeometry.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" | ||
|
|
||
| // ROOT | ||
| #include "Math/SVector.h" | ||
| #include "Math/SMatrix.h" | ||
|
|
@@ -76,6 +80,8 @@ class MkFitHitConverter : public edm::global::EDProducer<> { | |
| edm::ESGetToken<MkFitGeometry, TrackerRecoGeometryRecord> mkFitGeomToken_; | ||
| edm::EDPutTokenT<MkFitHitWrapper> wrapperPutToken_; | ||
| edm::EDPutTokenT<MkFitClusterIndexToHit> clusterIndexPutToken_; | ||
| edm::ESGetToken<SiStripQuality, SiStripQualityRcd> qualityToken_; | ||
| edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> geomToken_; | ||
| const float minGoodStripCharge_; | ||
| }; | ||
|
|
||
|
|
@@ -91,6 +97,9 @@ MkFitHitConverter::MkFitHitConverter(edm::ParameterSet const& iConfig) | |
| mkFitGeomToken_{esConsumes<MkFitGeometry, TrackerRecoGeometryRecord>()}, | ||
| wrapperPutToken_{produces<MkFitHitWrapper>()}, | ||
| clusterIndexPutToken_{produces<MkFitClusterIndexToHit>()}, | ||
| //qualityToken_{esConsumes<edm::Transition::BeginRun>()}, | ||
| qualityToken_{esConsumes<edm::Transition::Event>()}, | ||
| geomToken_{esConsumes<edm::Transition::Event>()}, | ||
| minGoodStripCharge_{static_cast<float>( | ||
| iConfig.getParameter<edm::ParameterSet>("minGoodStripCharge").getParameter<double>("value"))} {} | ||
|
|
||
|
|
@@ -118,6 +127,27 @@ void MkFitHitConverter::produce(edm::StreamID iID, edm::Event& iEvent, const edm | |
| MkFitHitWrapper hitWrapper{mkFitGeom.trackerInfo()}; | ||
| mkfit::StdSeq::Cmssw_LoadHits_Begin(hitWrapper.eventOfHits(), {&hitWrapper.pixelHits(), &hitWrapper.outerHits()}); | ||
|
|
||
| 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); | ||
| const auto subdet = detid.subdetId(); | ||
| const auto layer = ttopo.layer(detid); | ||
| const auto isStereo = ttopo.isStereo(detid); | ||
| bool isBarrel = (ttopo.side(detid) == static_cast<unsigned>(TrackerDetSide::Barrel)); | ||
| bool isPlusSide = (ttopo.side(detid) == static_cast<unsigned>(TrackerDetSide::PosEndcap)); | ||
| const auto ilay = mkFitGeom.layerNumberConverter().convertLayerNumber(subdet, layer, false, isStereo, isPlusSide); | ||
| //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,surf.phiSpan().second, | ||
| (isBarrel ? surf.zSpan().first : surf.rSpan().first),(isBarrel ? surf.zSpan().second : surf.rSpan().second)}); | ||
| } | ||
| mkfit::StdSeq::LoadDeads(hitWrapper.eventOfHits(), deadvectors); | ||
|
Collaborator
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. I suppose this code would go in
Collaborator
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. to be honest, I did not realize the branch I was using diverged from the main PR to central CMSSW. I am open to discuss what the best way to proceed is.
Collaborator
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.
Collaborator
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. Following the merge of #20 this PR should be rebased (or re-worked in
Collaborator
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. I can re-work it MkFitEventOfHitsProducer. What is the correct branch to use for development and for the PR?
Collaborator
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. I have reworked the changes in MkFitEventOfHitsProducer:
Collaborator
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. (was mkFitHitConverterDefault_cfi automatically created by RecoTracker/MkFit/plugins/MkFitHitConverter.cc? which has been removed in #20?)
Collaborator
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. Certainly related to #20, I'll fix that, thanks. You can either force-push into your current
Collaborator
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.
Collaborator
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. closing this PR, see #26 |
||
|
|
||
| MkFitClusterIndexToHit clusterIndexToHit; | ||
|
|
||
| auto convert = [&](auto& hits, auto& mkFitHits, auto& clusterIndexToHit, auto& clusterCharge) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.