42 void fill(
const std::vector<const TrackingRecHit*>&
hits,
62 pixelHitsToken_{consumes(iConfig.getParameter<
edm::InputTag>(
"pixelHits"))},
63 stripHitsToken_{consumes(iConfig.getParameter<
edm::InputTag>(
"stripHits"))},
64 pixelClusterIndexToHitToken_{consumes(iConfig.getParameter<
edm::InputTag>(
"pixelHits"))},
65 stripClusterIndexToHitToken_{consumes(iConfig.getParameter<
edm::InputTag>(
"stripHits"))},
67 putToken_{produces<MkFitEventOfHits>()},
68 usePixelQualityDB_{iConfig.getParameter<
bool>(
"usePixelQualityDB")},
69 useStripStripQualityDB_{iConfig.getParameter<
bool>(
"useStripStripQualityDB")} {
70 if (useStripStripQualityDB_ || usePixelQualityDB_)
72 if (usePixelQualityDB_) {
75 if (useStripStripQualityDB_) {
86 desc.add(
"usePixelQualityDB",
true)->setComment(
"Use SiPixelQuality DB information");
87 desc.add(
"useStripStripQualityDB",
true)->setComment(
"Use SiStrip quality DB information");
97 auto eventOfHits = std::make_unique<mkfit::EventOfHits>(mkFitGeom.trackerInfo());
101 std::vector<mkfit::DeadVec>
deadvectors(mkFitGeom.layerNumberConverter().nLayers());
106 const auto& badPixels = pixelQuality.getBadComponentList();
107 for (
const auto& bp : badPixels) {
108 const DetId detid(bp.DetID);
109 const auto& surf = trackerGeom.idToDet(detid)->surface();
111 const auto ilay = mkFitGeom.mkFitLayerNumber(detid);
112 const auto q1 =
isBarrel ? surf.zSpan().first : surf.rSpan().first;
113 const auto q2 =
isBarrel ? surf.zSpan().second : surf.rSpan().second;
114 if (bp.errorType == 0)
115 deadvectors[ilay].push_back({surf.phiSpan().first, surf.phiSpan().second, q1, q2});
121 const auto& badStrips = siStripQuality.getBadComponentList();
122 for (
const auto&
bs : badStrips) {
124 const auto& surf = trackerGeom.idToDet(detid)->surface();
126 const auto ilay = mkFitGeom.mkFitLayerNumber(detid);
127 const auto q1 =
isBarrel ? surf.zSpan().first : surf.rSpan().first;
128 const auto q2 =
isBarrel ? surf.zSpan().second : surf.rSpan().second;
130 deadvectors[ilay].push_back({surf.phiSpan().first, surf.phiSpan().second, q1, q2});
132 auto const& topo =
dynamic_cast<const StripTopology&
>(trackerGeom.idToDet(detid)->topology());
139 float phi1 = firstPoint.phi();
140 float phi2 = lastPoint.phi();
144 <<
"insert bad range " <<
first <<
" to " <<
last <<
" " << phi1 <<
" " << phi2;
145 dv.push_back({phi1, phi2, q1, q2});
149 for (
int apv = 0; apv < nApvs; ++apv) {
150 const bool isBad =
bs.BadApvs & (1 << apv);
152 LogTrace(
"SiStripBadComponents") <<
"bad apv " << apv <<
" on " <<
bs.detid;
156 }
else if (lastApv + 1 == apv)
159 if (apv + 1 == nApvs)
161 }
else if (firstApv != -1) {
191 if (
hit !=
nullptr) {
constexpr double deltaPhi(double phi1, double phi2)
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
MkFitEventOfHitsProducer(edm::ParameterSet const &iConfig)
T getParameter(std::string const &) const
~MkFitEventOfHitsProducer() override=default
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
void cmssw_LoadHits_End(EventOfHits &eoh)
const edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
void cmssw_LoadHits_Begin(EventOfHits &eoh, const std::vector< const HitVec *> &orig_hitvectors)
const bool usePixelQualityDB_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const edm::EDPutTokenT< MkFitEventOfHits > putToken_
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ESGetToken< SiPixelQuality, SiPixelQualityRcd > pixelQualityToken_
const bool useStripStripQualityDB_
void loadDeads(EventOfHits &eoh, const std::vector< DeadVec > &deadvectors)
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< MkFitHitWrapper > stripHitsToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
const edm::EDGetTokenT< MkFitClusterIndexToHit > pixelClusterIndexToHitToken_
const edm::ESGetToken< MkFitGeometry, TrackerRecoGeometryRecord > mkFitGeomToken_
const edm::EDGetTokenT< MkFitClusterIndexToHit > stripClusterIndexToHitToken_
Constants and enumerated types for FED/FEC systems.
const edm::EDGetTokenT< MkFitHitWrapper > pixelHitsToken_
std::vector< DeadRegion > DeadVec
int mkFitLayerNumber(DetId detId) const
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > stripQualityToken_
static const uint16_t STRIPS_PER_APV
void fill(const std::vector< const TrackingRecHit *> &hits, mkfit::EventOfHits &eventOfHits, const MkFitGeometry &mkFitGeom) const
std::vector< DeadVec > deadvectors