19 using namespace ctfseeding;
28 : theLayerSubDet(subdet),
35 hasMatchedHits(
false),
39 hasRingSelector(
false),
40 hasSimpleRphiHitsCleaner(
true) {
81 assert(dynamic_cast<SiStripMatchedRecHit2D const*>(&matched));
88 if ((!rejectSt) & (!rejectMono)) {
90 return std::make_pair(
false, replaceMe);
95 return std::make_pair(
true, replaceMe);
100 auto cloner = ttrhBuilder.
cloner();
103 LogDebug(
"HitExtractorSTRP") <<
"a matched hit is partially masked, and the mono hit got projected onto: "
106 LogDebug(
"HitExtractorSTRP") <<
"a matched hit is partially masked, and the stereo hit got projected onto: "
109 return std::make_pair(
true, replaceMe);
116 unsigned int cleanFrom)
const {
117 unsigned int skipped = 0;
118 unsigned int projected = 0;
120 LogTrace(
"HitExtractorSTRP") <<
"getting " << hits.size() <<
" strip hit in input.";
124 for (
unsigned int iH = cleanFrom; iH < hits.size(); ++iH) {
126 auto id = hits[iH]->geographicalId();
128 auto [
replace, replaceMe] =
skipThis(ttrhBuilder, *hits[iH], stripClusterMask);
131 LogTrace(
"HitExtractorSTRP") <<
"skipping a matched hit on :" << hits[iH]->geographicalId().rawId();
136 hits[iH].reset(replaceMe);
137 if (replaceMe ==
nullptr)
142 }
else if (
skipThis(
id, hits[iH]->firstClusterRef(), stripClusterMask)) {
143 LogTrace(
"HitExtractorSTRP") <<
"skipping a hit on :" << hits[iH]->geographicalId().rawId() <<
" key: ";
150 LogTrace(
"HitExtractorSTRP") <<
"getting " << hits.size() <<
" vector hit in input.";
154 for (
unsigned int iH = cleanFrom; iH < hits.size(); ++iH) {
155 LogTrace(
"HitExtractorSTRP") <<
"analizing hit on :" << hits[iH]->geographicalId().rawId();
160 LogTrace(
"HitExtractorSTRP") <<
" key lower: " << hits[iH]->firstClusterRef().key();
165 LogTrace(
"HitExtractorSTRP") <<
"skipping a vector hit on :" << hits[iH]->geographicalId().rawId()
175 auto last = std::remove_if(hits.begin() + cleanFrom, hits.end(), [](
HitPointer const&
p) {
return p.empty(); });
176 hits.resize(
last - hits.begin());
178 LogTrace(
"HitExtractorSTRP") <<
"skipped :" << skipped <<
" rechits because of clusters and projected: " << projected;
184 LogDebug(
"HitExtractorSTRP") <<
"HitExtractorSTRP::hits";
186 unsigned int cleanFrom = 0;
195 LogTrace(
"HitExtractorSTRP") <<
"Getting hits into the TIB";
200 cleanFrom = result.size();
211 cleanFrom = result.size();
218 cleanFrom = result.size();
228 cleanFrom = result.size();
234 LogError(
"HitExtractorSTRP") <<
"TIB is not supposed to be in Phase2 TRK detector configuration. What follows "
235 "have never been checked before! ";
238 cleanFrom = result.size();
250 LogTrace(
"HitExtractorSTRP") <<
"Getting hits into the TID";
255 cleanFrom = result.size();
264 result.emplace_back(*
hit);
274 cleanFrom = result.size();
284 result.emplace_back(*
hit);
294 cleanFrom = result.size();
302 result.emplace_back(*
hit);
313 cleanFrom = result.size();
321 result.emplace_back(*
hit);
324 LogTrace(
"HitExtractorSTRP") <<
"result size value:" << result.size();
333 LogTrace(
"HitExtractorSTRP") <<
"Getting hits into the TOB";
338 cleanFrom = result.size();
346 result.emplace_back(*
hit);
361 cleanFrom = result.size();
368 cleanFrom = result.size();
378 cleanFrom = result.size();
389 cleanFrom = result.size();
401 LogTrace(
"HitExtractorSTRP") <<
"Getting hits into the TEC";
406 cleanFrom = result.size();
415 result.emplace_back(*
hit);
425 cleanFrom = result.size();
435 result.emplace_back(*
hit);
445 cleanFrom = result.size();
453 result.emplace_back(*
hit);
460 LogError(
"HitExtractorSTRP") <<
"TEC is not supposed to be in Phase2 TRK detector configuration. What follows "
461 "have never been checked before! ";
465 cleanFrom = result.size();
473 result.emplace_back(*
hit);
481 LogDebug(
"HitExtractorSTRP") <<
" giving: " << result.size() <<
" out for charge cut " <<
minGoodCharge;
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void range2SeedingHits(DSTV const &dstv, HitExtractor::Hits &v, std::pair< A, B > const &sel)
unsigned int tidRing(const DetId &id) const
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
std::pair< const_iterator, const_iterator > Range
bool getByToken(EDGetToken token, Handle< PROD > &result) const
TkClonerImpl cloner() const
OmniClusterRef const & stereoClusterRef() const
unsigned int tecRing(const DetId &id) const
ring id
constexpr uint32_t rawId() const
get the raw id
OmniClusterRef const upperClusterRef() const
Log< level::Error, false > LogError
std::pair< DetId, SameLayerComparator > tidDetIdWheelComparator(uint32_t side, uint32_t wheel) const
const uint16_t range(const Frame &aFrame)
bool getData(T &iHolder) const
std::pair< DetId, SameLayerComparator > tobDetIdLayerComparator(uint32_t layer) const
std::pair< DetId, SameLayerComparator > tibDetIdLayerComparator(uint32_t layer) const
ClusterStripRef cluster_strip() const
bool get(ProductID const &oid, Handle< PROD > &result) const
OmniClusterRef const & monoClusterRef() const
std::pair< DetId, SameLayerComparator > tecDetIdWheelComparator(uint32_t side, uint32_t wheel) const
OmniClusterRef const lowerClusterRef() const
Detector identifier class for the strip tracker.
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
DetId geographicalId() const