21 using namespace ctfseeding;
26 theLayerSubDet(subdet), theSide(side), theIdLayer(idLayer),
27 minAbsZ(0), theMinRing(1), theMaxRing(0),
29 hasRingSelector(
false), hasSimpleRphiHitsCleaner(
true)
54 return stripClusterMask->mask(clus.
key());
60 const SiStripRecHit2D *
hit,
66 replaceMe=proj.
project( *sHit, *ptr->det());
67 if (!replaceMe)
LogDebug(
"HitExtractorSTRP")<<
"projection failed.";
74 const SiStripMatchedRecHit2D *
hit = (SiStripMatchedRecHit2D *) ptr->hit();
76 bool rejectSt =
skipThis(hit->stereoClusterRef(), stripClusterMask);
77 bool rejectMono =
skipThis(hit->monoClusterRef(), stripClusterMask);
79 if (rejectSt&&rejectMono){
85 auto const &
s= hit->stereoHit();
86 auto const &
m= hit->monoHit();
87 if (rejectSt)
project(ttrhBuilder, ptr,&
s,replaceMe);
88 else if (rejectMono)
project(ttrhBuilder, ptr,&
m,replaceMe);
89 if (!replaceMe)
return true;
91 LogDebug(
"HitExtractorSTRP")<<
"a matched hit is partially masked, and the mono hit got projected onto: "<<replaceMe->hit()->geographicalId().rawId()<<
" key: "<<hit->monoClusterRef().key();
93 LogDebug(
"HitExtractorSTRP")<<
"a matched hit is partially masked, and the stereo hit got projected onto: "<<replaceMe->hit()->geographicalId().rawId()<<
" key: "<<hit->stereoClusterRef().key();
103 unsigned int cleanFrom)
const{
104 LogDebug(
"HitExtractorPIX")<<
"getting: "<<hits.size()<<
" in input.";
108 unsigned int skipped=0;
109 unsigned int projected=0;
110 newHits.reserve(hits.size());
112 for (
unsigned int iH=0;iH<hits.size();++iH){
113 if (!hits[iH]->isValid())
continue;
116 newHits.push_back(replaceMe);
119 if (matched &&
skipThis(ttrhBuilder, hits[iH],stripClusterMask,replaceMe)){
120 LogDebug(
"HitExtractorSTRP")<<
"skipping a matched hit on :"<<hits[iH]->hit()->geographicalId().rawId();
125 LogDebug(
"HitExtractorSTRP")<<
"skipping a hit on :"<<hits[iH]->hit()->geographicalId().rawId()<<
" key: ";
129 if (replaceMe!=hits[iH]) projected++;
130 newHits.push_back(replaceMe);
132 LogDebug(
"HitExtractorPIX")<<
"skipped :"<<skipped<<
" strip rechits because of clusters and projected: "<<projected;
140 unsigned int cleanFrom=0;
189 result.push_back( ttrhBuilder.
build(
hit) );
204 result.push_back( ttrhBuilder.
build(
hit) );
218 result.push_back( ttrhBuilder.
build(
hit) );
238 if (fabs(ttrh->globalPosition().z())>=
minAbsZ) result.push_back( ttrh );
283 result.push_back( ttrhBuilder.
build(
hit) );
298 result.push_back( ttrhBuilder.
build(
hit) );
313 result.push_back( ttrhBuilder.
build(
hit) );
319 LogDebug(
"HitExtractorSTRP")<<
" giving: "<<result.size()<<
" out";
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
std::pair< DetId, DetIdTIDSameDiskComparator > stripTIDDisk(int side, int disk)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::pair< DetId, DetIdTIBSameLayerComparator > stripTIBLayer(int layer)
std::pair< const_iterator, const_iterator > Range
RecHitPointer project(const TransientTrackingRecHit &hit, const GeomDet &det, const TrajectoryStateOnSurface &ts) const
std::pair< DetId, DetIdTOBSameLayerComparator > stripTOBLayer(int layer)
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
std::pair< DetId, DetIdTECSameDiskComparator > stripTECDisk(int side, int disk)
Detector identifier class for the strip tracker.
void range2SeedingHits(DSTV const &dstv, HitExtractor::Hits &v, std::pair< A, B > const &sel, const TransientTrackingRecHitBuilder &ttrhBuilder, const edm::EventSetup &es)
volatile std::atomic< bool > shutdown_flag false