33 : theLayerSubDet(subdet),
39 hasMatchedHits(
false),
42 hasRingSelector(
false),
43 hasSimpleRphiHitsCleaner(
true) {
83 assert(dynamic_cast<SiStripMatchedRecHit2D const*>(&matched));
90 if ((!rejectSt) & (!rejectMono)) {
92 return std::make_pair(
false, replaceMe);
97 return std::make_pair(
true, replaceMe);
102 auto cloner = ttrhBuilder.
cloner();
105 LogDebug(
"HitExtractorSTRP") <<
"a matched hit is partially masked, and the mono hit got projected onto: " 108 LogDebug(
"HitExtractorSTRP") <<
"a matched hit is partially masked, and the stereo hit got projected onto: " 111 return std::make_pair(
true, replaceMe);
118 unsigned int cleanFrom)
const {
119 LogDebug(
"HitExtractorPIX") <<
"getting: " << hits.size() <<
" in input.";
124 unsigned int projected = 0;
125 for (
unsigned int iH = cleanFrom; iH < hits.size(); ++iH) {
126 assert(hits[iH]->isValid());
127 auto id = hits[iH]->geographicalId();
131 std::tie(replace, replaceMe) =
skipThis(ttrhBuilder, *hits[iH], stripClusterMask);
134 LogDebug(
"HitExtractorSTRP") <<
"skipping a matched hit on :" << hits[iH]->geographicalId().rawId();
138 hits[iH].reset(replaceMe);
139 if (replaceMe ==
nullptr)
140 assert(hits[iH].
empty());
142 assert(hits[iH].isOwn());
144 }
else if (
skipThis(
id, hits[iH]->firstClusterRef(), stripClusterMask)) {
145 LogDebug(
"HitExtractorSTRP") <<
"skipping a hit on :" << hits[iH]->geographicalId().rawId() <<
" key: ";
151 auto last = std::remove_if(hits.begin() + cleanFrom, hits.end(), [](
HitPointer const&
p) {
return p.empty(); });
152 hits.resize(
last - hits.begin());
155 LogDebug(
"HitExtractorSTRP") <<
"skipped :" << skipped
156 <<
" strip rechits because of clusters and projected: " << projected;
163 unsigned int cleanFrom = 0;
178 cleanFrom = result.size();
189 cleanFrom = result.size();
196 cleanFrom = result.size();
206 cleanFrom = result.size();
221 cleanFrom = result.size();
230 result.emplace_back(*
hit);
240 cleanFrom = result.size();
250 result.emplace_back(*
hit);
260 cleanFrom = result.size();
268 result.emplace_back(*
hit);
283 cleanFrom = result.size();
291 result.emplace_back(*
hit);
306 cleanFrom = result.size();
313 cleanFrom = result.size();
323 cleanFrom = result.size();
338 cleanFrom = result.size();
347 result.emplace_back(*
hit);
357 cleanFrom = result.size();
367 result.emplace_back(*
hit);
377 cleanFrom = result.size();
385 result.emplace_back(*
hit);
393 LogDebug(
"HitExtractorSTRP") <<
" giving: " << result.size() <<
" out";
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
Range equal_range(id_type i, CMP cmp, bool update=false) const
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
def replace(string, replacements)
std::pair< DetId, SameLayerComparator > tidDetIdWheelComparator(uint32_t side, uint32_t wheel) const
std::pair< DetId, SameLayerComparator > tobDetIdLayerComparator(uint32_t layer) const
std::pair< DetId, SameLayerComparator > tibDetIdLayerComparator(uint32_t layer) const
ClusterStripRef cluster_strip() const
OmniClusterRef const & monoClusterRef() const
std::pair< DetId, SameLayerComparator > tecDetIdWheelComparator(uint32_t side, uint32_t wheel) const
Detector identifier class for the strip tracker.
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
DetId geographicalId() const
T const * product() const